Changes between Version 13 and Version 14 of ScoringFormulas


Ignore:
Timestamp:
Mar 30, 2008, 12:48:00 PM (11 years ago)
Author:
Stein Tore Erdal
Comment:

removed v 1.2 specific details regarding creation of scoring formulas

Legend:

Unmodified
Added
Removed
Modified
  • ScoringFormulas

    v13 v14  
    2828Download 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.
    2929
    30 
    31 == Test scoring formula ==
    32 (v 1.2)
    33 
    34 id="Test scoring formula"
    35 
    36 Just a test of scoring formula. Not to be used in competitions! Linar distance points min 500, sqrt time points.
    37 
    38 
    39 == Creating scoring formulas ==#Creating
    40 (v 1.2)
    41 
    42 (for developers, requires programming knowledge)
    43 
    44 FS defines an interface that can be implemented to create new scoring formulas.
    45 
    46 Create a dll (in .NET) with a class named "Sf" implementing the interface IFsSf in !FsSf.dll.[[BR]]
    47 ''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.''
    48 
    49 The name of the dll must start with "!FsSf_" (makes it easier for FS to find which dlls that have scoring formula).
    50 
    51 For FS to find the dll it must be placed in the same folder as !FsComp.exe.
    52 
    53 Set the following Assembly Manifest Attributes as follows:[[BR]]
    54  * AssemblyTitleAttribute:[[BR]]
    55   Here goes the id of the scoring formula.[[BR]]
    56   This is used for the id attribute in the !FsScoreFormula element in the fsdb file.[[BR]]
    57   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 ...
    58  * AssemblyDescriptionAttribute:[[BR]]
    59   A short description of the formula. Detailed description should be put on this page (or on a new page with link from here).
    60 
    61 Example:[[BR]]
    62 {{{
    63 [assembly: AssemblyTitle("GAP2007")]
    64 [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.")]
    65 }}}
    66 
    67 
    68 === IFsSf interface ===#Interface
    69 Implement the following methods:
    70  * bool !ScoreTask(!XmlElement xe_task_clone, out string msg);[[BR]]
    71    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.
    72      * xe_task_clone: A clone of !FsTask element. Should not have any parent.
    73        To access the rest of the fsdb xml document use !OwnerDocument property of the param.
    74      * msg: any messages regarding scoring
    75      * return: true if task was scored (meaning fsdb needs to be updated with xe_task_clone), false if not.
    76  * bool !EditScoreFormula(!XmlElement xe_sf_clone);[[BR]]
    77    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.
    78      * xe_sf_clone: A clone of a !FsScoreFormula element. Should not have any parent.
    79        To access the rest of the fsdb xml document use !OwnerDocument property of the param.
    80      * 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.
    81