mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-23 06:06:11 +00:00
Merge remote-tracking branch 'origin/master' into maneuver_refactoring
This commit is contained in:
+1
-1
@@ -78,7 +78,7 @@ public class MockedTrackedRaceWithFixedRank extends MockedTrackedRace {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boat getBoatOfCompetitorById(Serializable competitorID) {
|
||||
public Boat getBoatOfCompetitor(Competitor competitor) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class MockedTrackedRaceWithFixedRankAndManyCompetitors extends MockedTrac
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Boat getBoatOfCompetitorById(Serializable competitorID) {
|
||||
public Boat getBoatOfCompetitor(Competitor competitor) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -29,7 +29,7 @@ public interface RaceDefinition extends NamedWithID {
|
||||
/**
|
||||
* Gets the boat used by the competitor for this race.
|
||||
*/
|
||||
Boat getBoatOfCompetitorById(Serializable competitorID);
|
||||
Boat getBoatOfCompetitor(Competitor competitor);
|
||||
|
||||
/**
|
||||
* The MD5 hash as produced by
|
||||
|
||||
+4
-4
@@ -27,7 +27,7 @@ public class RaceDefinitionImpl extends NamedImpl implements RaceDefinition {
|
||||
private final Course course;
|
||||
private final LinkedHashMap<Serializable, Competitor> competitorsById;
|
||||
private final Set<Competitor> competitors;
|
||||
private final Map<Serializable, Boat> competitorBoats;
|
||||
private final Map<Competitor, Boat> competitorBoats;
|
||||
private final BoatClass boatClass;
|
||||
private final Serializable id;
|
||||
private final RaceCompetitorIdsAsStringWithMD5Hash raceCompetitorsMD5Hash;
|
||||
@@ -65,7 +65,7 @@ public class RaceDefinitionImpl extends NamedImpl implements RaceDefinition {
|
||||
for (Entry<Competitor, Boat> competitorAndBoat : competitorsAndTheirBoats.entrySet()) {
|
||||
Competitor competitor = competitorsById.get(competitorAndBoat.getKey().getId()); // only assign boat if competitor is part of race
|
||||
if (competitor != null && competitorAndBoat.getValue() != null) {
|
||||
competitorBoats.put(competitor.getId(), competitorAndBoat.getValue());
|
||||
competitorBoats.put(competitor, competitorAndBoat.getValue());
|
||||
} else {
|
||||
logger.warning("Trying to set boat "+competitorAndBoat.getValue()+" for competitor "+competitorAndBoat.getKey()+
|
||||
" which is not part of race "+getName()+"'s set of competitors");
|
||||
@@ -111,7 +111,7 @@ public class RaceDefinitionImpl extends NamedImpl implements RaceDefinition {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boat getBoatOfCompetitorById(Serializable competitorID) {
|
||||
return competitorBoats.get(competitorID);
|
||||
public Boat getBoatOfCompetitor(Competitor competitor) {
|
||||
return competitorBoats.get(competitor);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1770,7 +1770,7 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
|
||||
competitorDTOsMap.put(competitorDTO.getIdAsString(), competitorDTO);
|
||||
}
|
||||
for (Competitor competitor : race.getCompetitors()) {
|
||||
Boat boatOfCompetitor = race.getBoatOfCompetitorById(competitor.getId());
|
||||
Boat boatOfCompetitor = race.getBoatOfCompetitor(competitor);
|
||||
if (boatOfCompetitor != null) {
|
||||
BoatDTO boatDTO = new BoatDTO(boatOfCompetitor.getName(), boatOfCompetitor.getSailID(),
|
||||
boatOfCompetitor.getColor());
|
||||
|
||||
+4
-4
@@ -26,9 +26,9 @@ public class CompetitorWithChangingBoatJsonSerializer extends CompetitorJsonSeri
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Color getColor(Competitor competitor ) {
|
||||
protected Color getColor(Competitor competitor) {
|
||||
if (race != null) {
|
||||
Boat boatOfCompetitor = race.getBoatOfCompetitorById(competitor.getId());
|
||||
Boat boatOfCompetitor = race.getBoatOfCompetitor(competitor);
|
||||
if (boatOfCompetitor != null) {
|
||||
return boatOfCompetitor.getColor();
|
||||
}
|
||||
@@ -37,9 +37,9 @@ public class CompetitorWithChangingBoatJsonSerializer extends CompetitorJsonSeri
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Boat getBoat(Competitor competitor ) {
|
||||
protected Boat getBoat(Competitor competitor) {
|
||||
if (race != null) {
|
||||
Boat boatOfCompetitor = race.getBoatOfCompetitorById(competitor.getId());
|
||||
Boat boatOfCompetitor = race.getBoatOfCompetitor(competitor);
|
||||
if (boatOfCompetitor != null) {
|
||||
return boatOfCompetitor;
|
||||
}
|
||||
|
||||
+6
-6
@@ -127,16 +127,16 @@ public class TrackRaceBoatCompetitorMetadataReplicationTest extends AbstractServ
|
||||
Competitor replicaCompetitor = findCompetitor(replicaCompetitors, competitor);
|
||||
switch (competitor.getBoat().getSailID()) {
|
||||
case boat1CompetitorName:
|
||||
compareBoatOfCompetitors(masterTrackedRace.getRace().getBoatOfCompetitorById(competitor.getId()),
|
||||
replicaTrackedRace.getRace().getBoatOfCompetitorById(replicaCompetitor.getId()), boat1Name, boat1Color);
|
||||
compareBoatOfCompetitors(masterTrackedRace.getRace().getBoatOfCompetitor(competitor),
|
||||
replicaTrackedRace.getRace().getBoatOfCompetitor(replicaCompetitor), boat1Name, boat1Color);
|
||||
break;
|
||||
case boat2CompetitorName:
|
||||
compareBoatOfCompetitors(masterTrackedRace.getRace().getBoatOfCompetitorById(competitor.getId()),
|
||||
replicaTrackedRace.getRace().getBoatOfCompetitorById(replicaCompetitor.getId()), boat2Name, boat2Color);
|
||||
compareBoatOfCompetitors(masterTrackedRace.getRace().getBoatOfCompetitor(competitor),
|
||||
replicaTrackedRace.getRace().getBoatOfCompetitor(replicaCompetitor), boat2Name, boat2Color);
|
||||
break;
|
||||
case boat3CompetitorName:
|
||||
compareBoatOfCompetitors(masterTrackedRace.getRace().getBoatOfCompetitorById(competitor.getId()),
|
||||
replicaTrackedRace.getRace().getBoatOfCompetitorById(replicaCompetitor.getId()), boat3Name, boat3Color);
|
||||
compareBoatOfCompetitors(masterTrackedRace.getRace().getBoatOfCompetitor(competitor),
|
||||
replicaTrackedRace.getRace().getBoatOfCompetitor(replicaCompetitor), boat3Name, boat3Color);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,4 @@
|
||||
#General
|
||||
This page provides some useful information about pairinglists and the calculation of pairinglists.
|
||||
|
||||
###Quality
|
||||
The quality of a pairinglist is measured by the standard deviation of its template. The main aim of a pairinglist is that every competitor competes against every other competitor equal times. So if all counts of matches against the other competitors are equal it would be a "perfect" pairinglist. The standard deviation which is used as quality describes the average deviation from this "perfect" state, so a very low number is better than a high number. The average quality of a pairinglist varies for different numbers of flights and fleets and competitors. If you think the quality is too bad, try to hit the refresh button and get a new template.
|
||||
|
||||
###Flight Multiplier
|
||||
In some cases it is necessary to reduce the transfer traffic while an event (e.g. if only electrical motorboats can be used). In this case you can use the flight multiplier. It will duplicate flights as often as given. In other words: the flights are repeated. Furthermore it will set the "Fleets Can Run In Parallel"-flag, so you can run the first fleets of the repeated flights in a straight row without any changes. If you use the flight multiplier a smaller template is calculated and duplicated, because of this the quality can be worse than normal.
|
||||
|
||||
###CSV-Export
|
||||
If you want to use a csv-file to export a pairinglist into excel you have to download it by clicking the link. After that you have t> o follow these steps:
|
||||
|
||||
1. Go to the first cell of the space, where your template should be imported to.
|
||||
2. Click on the "Data" tab of excel.
|
||||
3. Click "From Text" and choose the csv-file, which you downloaded.
|
||||
4.Now there should be a "Text import Wizard" window. You do not have to change anything in the first step and just click "Next>".
|
||||
5. In the second window you have to change "Delimiters" to "Comma" and click "Next>".
|
||||
6. In the third step you do not have anything to change. Just click "Finish".
|
||||
7. There should be a "Import Data" window. Click the "Properties..." button.
|
||||
8. Check "Overwrite existing cells with new data, clear unused cells"
|
||||
9. Click "OK".
|
||||
10. Back in the "Import Data" window, click "OK".
|
||||
|
||||
Your data should be imported. You can adjust the columns to get good formatting.
|
||||
|
||||
#Pairing Lists
|
||||
#Pairing list
|
||||
This page provides some useful information about pairing lists. It is divided in a general part where the setup of a generation process is explained and a part that provides additional functions.
|
||||
|
||||
##General
|
||||
@@ -31,42 +6,62 @@ This page provides some useful information about pairing lists. It is divided in
|
||||
A pairing list provides basically the associations of competitor and boat in every single racecolumn of their regatta.
|
||||
It is highly important that the competitors sail as frequent as possible against each other. In addition every competitor should sail as frequent as possible on every boat. These two constraints are considered by the generation process.
|
||||
|
||||
###How to create a Pairing List
|
||||
###How to create a pairing list
|
||||
First of all you need a regatta with at least one series with fleets and races that is not a medal series and registered competitors and boats.
|
||||
|
||||
Now follow these steps:
|
||||
**Open Adminconsole > Select 'Leaderboards' on the left menu > Enter your leaderboard name in the Leaderboards tab > Click on the 'Pairing List' Button inside the 'Actions' Column:**
|
||||
**Open Adminconsole > Select 'Leaderboards' on the left menu > Enter your leaderboard name in the leaderboards tab > Click on the 'Pairing List' button inside the 'Actions' column:**
|
||||
|
||||
[Screenshot 1]
|
||||
<img src="/wiki/images/pairinglist/screenshot_1.jpg"/>
|
||||
|
||||
Right now the setup dialog appears:
|
||||
|
||||
[screenshot 2]
|
||||
<img src="/wiki/images/pairinglist/screenshot_2.jpg"/>
|
||||
|
||||
You can specify the number of competitors, flight multiplier and which series should be used.
|
||||
**(Note! When changing the standard count of competitors you can not apply your generated Pairing list to Racelogs or print it. For adding/removing competitors please use the register function!)**
|
||||
For more information about flight multiplier please read below.
|
||||
Now you can specify the number of competitors and flight repeats. In addition you can select one or more series that should be used. When selecting multiple series they must have the same number of races per flight.
|
||||
**(Note! When changing the standard count of competitors you cannot apply your generated pairing list to race logs or print it. For adding/removing competitors please use the register function!)**
|
||||
For more information about flight repeats please read below.
|
||||
When you hit the **'ok'** button a small progress dialog appears and after a few seconds a new window will be opened:
|
||||
|
||||
[screenshot 3]
|
||||
<img src="/wiki/images/pairinglist/screenshot_3.jpg"/>
|
||||
|
||||
In this window there are some attributes of the Pairing list in the left box:
|
||||
* Number of Flights: This number corresponds to the count of all Races in your selected series
|
||||
* Number of Groups: It describes the number of Fleets in one single Race
|
||||
* Number of Competitors: This is equal to the count of all registered Competitors on this Leaderboard
|
||||
* Quality: This value describes the quality of one Pairing list Template (for more information about Quality please read below)
|
||||
On the right side a box with the title **'Pairinglist Template'** is displayed. If there are registered competitors every different value in this matrix will be replaced with one competitor. The matrix describes the assignments of each Competitor to a boat where each row represents a single fleet and each column a single boat.
|
||||
When you hit **'Apply to Racelogs'** the Competitor to boat assignments will be registered into Racelogs. In the print preview the assignment of all Competitors to Boats are displayed. For more information about the print function and the csv export please read below.
|
||||
In this window there are some attributes of the pairing list in the left box:
|
||||
* Number of flights: This number corresponds to the count of all flights in your selected series
|
||||
* Number of races per flight: It describes the number of races in one single flight
|
||||
* Number of competitors: This is equal to the count of all registered competitors on this regatta
|
||||
* Quality: This value describes the quality of one pairing list template (for more information about quality please read below)
|
||||
On the right side a box with the title **'Pairinglist Template'** is displayed. If there are registered competitors every different value in this box will be replaced with one competitor. The matrix describes the assignments of each competitor to a boat where each row represents a single fleet and each column a single boat.
|
||||
When you hit **'Apply to race logs'** the competitor to boat assignments will be registered into race logs. In the print preview the assignment of all competitors to boats are displayed. For more information about the print function and the csv export please read below.
|
||||
|
||||
###Flight Multiplier
|
||||
In some cases it is necessary to reduce the transfer traffic while an event (e.g. if only electrical motorboats can be used). In this case you can use the flight multiplier. It will duplicate flights as often as given (eg.: flightMultiplier equals two means that a Flight occurs two times). Furthermore it will set the "Fleets Can Run In Parallel"-flag, so you can run the first fleets of the repeated flights in a straight row without any changes. If you use the flight multiplier a smaller template is calculated and duplicated, because of this the quality can be worse than normal.
|
||||
**(Note! If there is more than one Series selected the Flight Multiplier can not be used!)**
|
||||
###Flight repeats
|
||||
In some cases it is necessary to reduce the transfer traffic while an event (e.g. if only electrical motorboats can be used). In this case you can set flight repeats. It will duplicate flights as often as given (eg.: flight repeats equals 2 means that a flight occurs 2 times). Furthermore it will set the 'fleet can run in parallel'-flag, so you can run the first fleets of the repeated flights in a straight row without any changes. If you use the flight repeats a smaller template is calculated and duplicated, because of this the quality can be worse than normal.
|
||||
**(Note! If there is more than one series selected the flight repeats cannot be set!)**
|
||||
|
||||
###Quality
|
||||
The quality of a pairinglist is measured by the standard deviation of its template. The main aim of a pairinglist is that every competitor competes against every other competitor equal times. So if all counts of matches against the other competitors are equal it would be a "perfect" pairinglist with a quality value of 0. The standard deviation which is used as quality describes the average deviation from this "perfect" state, so a very low number is better than a high number. The average quality of a pairinglist varies for different numbers of flights and fleets and competitors. If you think the quality is too bad, try to hit the refresh button and a new template with a different quality will be generated.
|
||||
The quality of a pairing list is measured by the standard deviation of its template. The main aim of a pairing list is that every competitor competes against every other competitor equal times. So if all counts of matches against the other competitors are equal it would be a "perfect" pairing list with a quality value of 0. The standard deviation which is used as quality describes the average deviation from this "perfect" state, so a very low number is better than a high number. The average quality of a pairing list varies for different numbers of flights and fleets and competitors. If you think the quality is too bad, try to hit the refresh button and a new template with a different quality will be generated.
|
||||
|
||||
#Additional functions
|
||||
##Additional functions
|
||||
|
||||
###CSV-Export
|
||||
This function can be used to put the numbers from the generated pairing list template into Excel. After generating the template you can hit a link called **'Export as CSV'** and a file called **'pairingListTemplate.csv'** will be downloaded.
|
||||
Now follow these steps:
|
||||
**Open a new or existing Excel file > In your table select the cell in the top left corner of the excerpt in which you want to place your template in > On the top header bar select the 'Data' tab > From the selection underneath select 'From Text' > Switch to your download directory (Default path: C:\Users\[username]\Downloads) and open your downloaded template file > On the appeared window click 'Next' > Under 'Delimiters' select 'Comma' and hit 'Next' and confirm with 'Finish' > On the next appeared window hit 'Properties', select 'Overwrite existing cells with new data...' and confirm twice**
|
||||
Each value should now be in a single cell.
|
||||
|
||||
###Print function
|
||||
This function can be used to print your final Pairing list as paper or PDF document.
|
||||
**(Note! We highly recommend to use Chrome because you can setup various layout settings (In Firefox it does not work!):**
|
||||
* Layout: Orientation of the page
|
||||
* Paper size: various formats of paper sizes
|
||||
* Margins: Space on the pages borders (It is recommended to set this to 'Default' because otherwise the printer may cut some content)
|
||||
* Background graphics: Enables a beautiful background styling)
|
||||
|
||||
After selecting your leaderboard in the 'Leaderboards' section hit the 'Print' button under 'Actions':
|
||||
**(Note! You can only print a pairing list if you applied one to your race logs!)**
|
||||
|
||||
<img src="/wiki/images/pairinglist/screenshot_printing_1.jpg"/>
|
||||
|
||||
A new tab displaying the pairing list table opens. Now hit 'Print' and the browsers print dialog will open:
|
||||
|
||||
(Usually the first row of the table below is colored with boat colors. In our test regatta the boat colors are not set)
|
||||
<img src="/wiki/images/pairinglist/screenshot_printing_2.jpg"/>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 169 KiB |
Reference in New Issue
Block a user