Print Page | Close Window

Update Ratings

Printed From: Yachts and Yachting Online
Category: General
Forum Name: Sailwave Support
Forum Discription: The place to ask questions relating to this popular sailing results program
URL: http://www.yachtsandyachting.com/forum/forum_posts.asp?TID=11224
Printed Date: 23 Oct 17 at 2:23pm
Software Version: Web Wiz Forums 9.665y - http://www.webwizforums.com


Topic: Update Ratings
Posted By: kevinwhead
Subject: Update Ratings
Date Posted: 23 Nov 13 at 7:11pm
What do you have to do to get sailwave to update all the sailors Ratings when a new Ratings file is presented? I have got the global options pointing at the new Ratings file because if I click on any one helm and select their existing Class then the rating is updated. But I really don't want to go through every helm one by one and do this. There was a menu option that appeared a couple of years back; Tools / Update Ratings  - but this has been removed in the more recent versions! Help.



Replies:
Posted By: sailingsue
Date Posted: 16 Feb 14 at 8:37pm
I have the same question... I have a all the club racers in a sailwave file which I use to populate future series, but I can't find a way to update the PY numbers using the new 2014 ratings file. Have you found a solution anywhere else?
Hope someone can help Smile


Posted By: sailingsue
Date Posted: 16 Feb 14 at 9:28pm
Just found a way to work around the problem...
 
On the Tools menu, use 'Set Competitor Field...'
Then for example:
CLASS=TOPPER
Field to change 'Rating'
Set this value '1313'
Replace existing
 
This will change all the competitors with Toppers to PY 1313
 
Hope this helps. If anyone finds a better fix then post here!
SS


Posted By: kevinwhead
Date Posted: 18 Feb 14 at 10:14pm
Hum, still requires going into each class one at a time. The alternative is that you go into "Edit Competitor", and re-select the class to what it already is (picking up a change in the process), If the Edit Next tickbox is set then this makes it easier to work down the whole fleet.

My other solution was to write some Java which would read the blw file and re-write it !
import java.io.*;
import java.lang.*;
import java.util.Vector;
public class StartHere {
public static void main(String[] args) {
Vector<Ratings> Ratings = new Vector<Ratings>();
System.out.println("Hello World");
String RatingsFile = "";
String OutputFile  = "";
String inputStr = "";
if(args[0].compareTo("Normal")==0) {
RatingsFile = "C:/Dropbox/Kevin/Sailing/PH_Sailwave/NormalHandicaps/NormalRatingsXXAutumn2013.csv";
OutputFile  = "C:/Dropbox/Kevin/Sailing/PH_Sailwave/PH Everybody 2014 Normal.blw";
} else if(args[0].compareTo("Personal")==0) {
RatingsFile = "C:/Dropbox/Kevin/Sailing/PH_Sailwave/PersonalHandicaps/PHratingsXXAutumn2013.csv";
OutputFile  = "C:/Dropbox/Kevin/Sailing/PH_Sailwave/PH Everybody 2014 PH.blw";
} else {
System.out.println("Usage is ConvertBLW Normal/Personal");
}
if(RatingsFile.compareTo("")!=0) {
try{
InputStream is = new FileInputStream(RatingsFile);
int size = is.available();
int iField = 0;
String TextFieldOne   = "";
String TextFieldTwo   = "";
String TextFieldThree = "";
for(int iReadLine=0; iReadLine< size; iReadLine++){
char nextchar=(char)is.read();
if(nextchar==','){
if( iField==0) {
TextFieldOne = inputStr;
inputStr = "";
} else if( iField==1) {
TextFieldTwo = inputStr;
inputStr = "";
}
iField += 1;
}else if (nextchar=='\r') {
TextFieldThree = inputStr;
inputStr = "";
iField = 0;
System.out.println(".");
}else if (nextchar=='\n') {
Ratings ptrRating = new Ratings(TextFieldOne, TextFieldTwo, TextFieldThree);
Ratings.add(ptrRating);
}else{
System.out.print(nextchar);
inputStr = inputStr.concat(Character.toString(nextchar));
}
} // end for
is.close();
}catch(IOException e){
System.out.print("Exception failed to read ratings file");
}
// now read and convert the blw file
try{
int iField = 0;
boolean bFoundClass = false;
boolean bFoundRating = false;
String inputLine = "";
String StringNewRating = "";
String StrCompClass  = "\"compclass\"";
String StrCompRating = "\"comprating\"";
InputStream is = new FileInputStream("C:/Dropbox/Kevin/Sailing/PH_Sailwave/PH Everybody 2014.blw");
int size = is.available();
OutputStream iout = new FileOutputStream(OutputFile);
for (int iReadLine=0; iReadLine< size; iReadLine++){
char nextchar=(char)is.read();
inputLine = inputLine.concat(Character.toString(nextchar));
if (nextchar==','){
if (iField==0) { // looking for start of first field
if (inputStr.compareTo(StrCompClass)==0) {
bFoundClass = true;
}else if (inputStr.compareTo(StrCompRating)==0) {
bFoundRating = true;
}
}else if (iField==1) {
if (bFoundClass == true) {
// look through the vectors of ratings to find this one
int iRatings = Ratings.size();
int iLength  = inputStr.length()-1;
String StrClass = inputStr.substring(1,iLength);
boolean boolFound = false;
for (int i=0; (i<iRatings && boolFound==false); i++){
Ratings ptrRating = (Ratings) Ratings.elementAt(i);
StringNewRating = ptrRating.Match(StrClass);
if (StringNewRating.compareTo("")!=0){
boolFound = true; // break out of loop
}
}  // end for
if (boolFound == false) {
System.out.println("There is no Rating entry for " + inputStr + " FIX THIS NOW!");
}
bFoundClass = false;
}
}
iField += 1;
inputStr = "";
}else if (nextchar=='\n') {
// write the line back out
if (bFoundRating == true) {
// overwrite inputLine with a nobled version
String StrTail = inputLine.substring(18);
if (inputLine.charAt(17)=='"') {
StrTail = inputLine.substring(17);
}
inputLine = "\"comprating\",\"";
inputLine = inputLine.concat(StringNewRating);
inputLine = inputLine.concat(StrTail);
bFoundRating = false;
}
int iBytes = inputLine.length();
for (int i=0; i<iBytes; i++){
int iChar = inputLine.charAt(i);
try {
iout.write(iChar);
} catch (IOException e) {
e.printStackTrace();
}
} // end for
iField    = 0;
inputStr  = "";
inputLine = "";
} else {
inputStr = inputStr.concat(Character.toString(nextchar));
}
System.out.print(nextchar);
} // end for
is.close();
iout.flush();
iout.close();
}catch(IOException e){
System.out.print("Exception failed to read the blw file correctly");
}
finally {
}
}
System.out.println("Goodbye World");
}
}


Posted By: Eskdale
Date Posted: 19 Feb 14 at 12:11am
There is an easy way built into Sailwave

Go to Setup - Scoring System - Rating system tab

At the bottom there is a tick box Auto set competitor ratings
see screen shot below




When you score the series this will read the ratings file and update the competitors automatically

Hope this helps

If you need any help let me know

Jon




Posted By: kevinwhead
Date Posted: 19 Feb 14 at 9:31pm
Excellent - that works fine.

Shame its so difficult to find.

Thanks for the Info.
Kevin W,
SCSC


Posted By: Medway Maniac
Date Posted: 29 Mar 15 at 4:57pm
Thanks to all above for this thread from last year.  It's just saved me a lot of head-scratching.

If I was a seven-days-a-week race officer I'd no doubt fully master Sailwave, but it just has too many hidden tricks and pitfalls like this for occasional ROs, or even for semi-regular ROs like myself to discover then remember.

Hope that doesn't sound ungrateful, because I'm not.  Sailwave is  great program for sailing clubs that covers a host of possibilities, but I'd suggest that future development needs to be focussed improving accessibility for twice-a-year ROs.


-------------
http://www.wilsoniansc.org.uk" rel="nofollow - Wilsonian SC
http://www.3000class.org.uk" rel="nofollow - 3000 Class


Posted By: Eskdale
Date Posted: 31 Mar 15 at 3:06pm
Hi Medway Maniac,

Hopefully I can clarify it a little.  Ratings come from the ratings file when you first enter them and Sailwave remembers the ratings for any class that you override.  So in normal use it is very easy it gives you the default but allows you to override it to a value that is specific to your club.

If you want to load all the values from a file every time (or a new set then you tick the box) but this is not the normal.

You don't say what version of Sailwave you are running but the later ones do have a User interface in the Setup to make it easier for the twice a year RO's as this enables it to be configured with features removed that are not applicable to the specific user.  Unfortunately Scoring is not always a simple job due to the different rules and parameters that different clubs use.  Please if you have any suggestions as to how it can be made easier then please let us know.

Jon




Posted By: Medway Maniac
Date Posted: 31 Mar 15 at 3:46pm
We're currently using 2.9.7.0, frozen simply so that the various users in the club can exchange files without the risk of problems such as we had in the past when we upgraded independently.  We should probably update the version regularly, say once a year, and now would be a good time to do it.

I think to make S'wave really user-friendly would probably require a complete re-write, but one thing everyone I've introduced it to stumbles on is that it looks like an Excel spreadsheet but can't be edited the same way. Typically (trivially even, but I must admit this erks me still) you can't just double click on a cell or press F2 to edit it, you get the whole entry with the cursor where you don't want it.  If the cursor sprang to the data you'd clicked it would do the trick, I guess - I seem to be forever changing helm/crew names Confused



-------------
http://www.wilsoniansc.org.uk" rel="nofollow - Wilsonian SC
http://www.3000class.org.uk" rel="nofollow - 3000 Class


Posted By: JimC
Date Posted: 31 Mar 15 at 6:55pm
I must agree. The more it behaves like a spreadsheet the better for the casual user.


Posted By: Eskdale
Date Posted: 31 Mar 15 at 7:18pm
Hi Medway Maniac,

First all the versions for the last couple of years have been file compatible. OK if you use a feature that is only in a newer version then that won't work in the older version and any thing specific to that feature will of course not be saved but for general work there is no problem

To edit any competitor field simply click on the field and press enter - you can then edit it or select from the presented dropdown - I think that is what you are looking for.

Double clicking will bring up the whole competitor form for editing.

So if you want to change a helm/crew name select it and press enter - Bingo

Hope this helps

Jon


Posted By: Medway Maniac
Date Posted: 31 Mar 15 at 7:52pm
Originally posted by Eskdale


To edit any competitor field simply click on the field and press enter - you can then edit it or select from the presented dropdown - I think that is what you are looking for.


Thanks for the tip, but actually that is another good example of something only a very regular user would learn and remember.  

I'm sure that most of ROs would prefer a more Excel-like interaction, even if it was just one of the F2 or double-click Excel options, or as I said before, if when the whole competitor form was brought up on double-clicking, the cursor was already in the appropriate place corresponding to the double-clicked cell.


-------------
http://www.wilsoniansc.org.uk" rel="nofollow - Wilsonian SC
http://www.3000class.org.uk" rel="nofollow - 3000 Class


Posted By: Eskdale
Date Posted: 28 May 15 at 12:56am
Hi Medway Maniac

If you didn't already know 2.18.5 is available from the Sailwave site.  This allows you to use the F2 key to edit a cell (Same as Excel ) and you also have the Copy Paste and Cut available on the competitor cells.
2.19.0 is available on request now and will be released generally very soon this has the other feature that was on your wish list.  Double click on a competitor parameter cell and the competitor form is display on the matching tab and the field you clicked is selected and highlighted.

Let me know what you think
Jon 

jon@sailwave.com



Posted By: Medway Maniac
Date Posted: 28 May 15 at 2:40pm
Thanks Jon.  Yes, I was aware of 2.18.5, but it's beta, and we are delaying updating the club's laptops until there is a stable version.

Certainly steps in the right direction.


-------------
http://www.wilsoniansc.org.uk" rel="nofollow - Wilsonian SC
http://www.3000class.org.uk" rel="nofollow - 3000 Class


Posted By: Eskdale
Date Posted: 28 May 15 at 3:50pm
Hi Medway Maniac,

Version 2.18.5 is stable - there are no known issues
Version 2.19.0 is available at 
https://dl.dropboxusercontent.com/u/220425/sailwave.exe
This is an exe only so you need to install 2.18.5 then replace the Sailwave.exe

2.19.0 has all of your wish list implemented for you Smile

Jon


Posted By: Medway Maniac
Date Posted: 28 May 15 at 5:48pm
2.19.0 installed.  Thanks very much.

-------------
http://www.wilsoniansc.org.uk" rel="nofollow - Wilsonian SC
http://www.3000class.org.uk" rel="nofollow - 3000 Class



Print Page | Close Window

Bulletin Board Software by Web Wiz Forums® version 9.665y - http://www.webwizforums.com
Copyright ©2001-2010 Web Wiz - http://www.webwizguide.com