wiki:ScoringFormulas

Version 12 (modified by Stein Tore Erdal, 12 years ago) (diff)

--

Scoring Formulas

GAP2007

id="GAP2007"

GAP 2007 is GAP with options to produce GAP version 2000 or 2002 (with or without leading points) or OzGAP version 2005 as implemented in RACE.

How to achieve various versions of GAP formulas

(as implemented in version 7.1.0.18 of RACE)

RACE with OzGap2005

In FS: How to set FS GAP scoring formula to get !OzGap2005

RACE with GAP version 2000

Note: When using version 2000 of GAP in RACE one cannot turn off departure points.

In FS:

RACE with GAP version 2002 not using CompeGPS

In FS:

RACE with GAP version 2002 and CompeGPS

Using 2002 version of GAP in RACE together with CompeGPS one get a leading coefficient value for each pilot from CompeGPS.

In FS:

Download and use the Excel Workbook "scoring_formulas.xls" to compare FS scoring with parts of scoring the way it is done with the GAP versions in RACE.

Test scoring formula

(v 1.2)

id="Test scoring formula"

Just a test of scoring formula. Not to be used in competitions! Linar distance points min 500, sqrt time points.

Creating scoring formulas

(v 1.2)

(for developers, requires programming knowledge)

FS defines an interface that can be implemented to create new scoring formulas.

Create a dll (in .NET) with a class named "Sf" implementing the interface IFsSf in FsSf.dll.
You may have any number of classes here, but only the one named "Sf" will be used directly by FS and is expected to implement the IFsSf interface.

The name of the dll must start with "!FsSf_" (makes it easier for FS to find which dlls that have scoring formula).

For FS to find the dll it must be placed in the same folder as FsComp.exe.

Set the following Assembly Manifest Attributes as follows:

  • AssemblyTitleAttribute:
    Here goes the id of the scoring formula.
    This is used for the id attribute in the FsScoreFormula element in the fsdb file.
    NOTE: It is important to not change this id for a given dll (filename) once it is published. If one make significant changes, make a dll with a new name and give it a new id. This way the user have the choice ...
  • AssemblyDescriptionAttribute:
    A short description of the formula. Detailed description should be put on this page (or on a new page with link from here).

Example:

[assembly: AssemblyTitle("GAP2007")]
[assembly: AssemblyDescription("GAP 2007 is GAP with options to produce GAP version 2000 or 2002 (with or without leading points) or OzGAP version 2005 as implemented in RACE.")]

IFsSf interface

Implement the following methods:

  • bool ScoreTask(XmlElement xe_task_clone, out string msg);
    Should only change the FsParticipants/FsParticipant/FsResult under the xe_task_clone element. Remove any existing FsResult elements and add a new one for each pilot in task that has a FsFlightData element. FsParticipants/FsParticipant elements with no FsFlightData element is ABS and should not be counted in scoring. Empty FsFlightData element means DNF. DNF pilot may affect scoring. Best not to change anything else or FS might be confused.
    • xe_task_clone: A clone of FsTask element. Should not have any parent. To access the rest of the fsdb xml document use OwnerDocument property of the param.
    • msg: any messages regarding scoring
    • return: true if task was scored (meaning fsdb needs to be updated with xe_task_clone), false if not.
  • bool EditScoreFormula(XmlElement xe_sf_clone);
    Should provide a UI for setting scoring formula params. Should only change the xe_sf_clone element. Best not to change anything else or FS might be confused.
    • xe_sf_clone: A clone of a FsScoreFormula element. Should not have any parent. To access the rest of the fsdb xml document use OwnerDocument property of the param.
    • return: Return true if any changes to xe_sf_clone where done (meaning fsdb needs to be updated with xe_task_clone), false if not.

Attachments (9)

Download all attachments as: .zip