Changes between Version 3 and Version 4 of ScoringFormulas


Ignore:
Timestamp:
Feb 19, 2008, 1:32:32 PM (12 years ago)
Author:
Stein Tore Erdal
Comment:

TODO: provide code examples of scoring formulas dll's

Legend:

Unmodified
Added
Removed
Modified
  • ScoringFormulas

    v3 v4  
    11= Scoring Formulas =
    22
    3 == How to achive various versions of GAP formulas in FS ==
     3== GAP2007 ==
     4
     5id="GAP2007"
     6
     7GAP 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.
     8
     9=== How to achive various versions of GAP formulas ===
    410
    511Download and use the Excel Workbook "scoring_formulas.xls" to compare FS scoring with scoring the way it is done with the GAP versions in RACE.
     
    2228
    2329
     30== Test scoring formula ==
     31
     32id="Test scoring formula"
     33
     34Just a test of scoring formula. Not to be used in competitions! Linar distance points min 500, sqrt time points.
     35
     36
     37== Creating scoring formulas ==
     38(for developers, requires programming knowledge)
     39
     40FS defines an interface that can be implemented to create new scoring formulas.
     41
     42Create a dll (in .NET) implementing the interface IFsSf in !FsSf.dll.
     43
     44The name of the dll must start with "!FsSf_" (makes it easier for FS to find what dlls that have scoring formula).
     45
     46Set the following Assembly Manifest Attributes as follows:[[BR]]
     47 * AssemblyTitleAttribute:[[BR]]
     48  Here goes the id of the scoring formula.[[BR]]
     49  This is used for the id attribute in the !FsScoreFormula element in the fsdb file.[[BR]]
     50  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 ...
     51 * AssemblyDescriptionAttribute:[[BR]]
     52  A short description of the formula. Detailed description should be put on this page (or on a new page with link from here).
     53
     54Example:[[BR]]
     55{{{
     56[assembly: AssemblyTitle("GAP2007")]
     57[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.")]
     58}}}
     59
     60
     61=== IFsSf interface ===
     62Implement the following methods:
     63 * bool !ScoreTask(!XmlElement xe_task_clone, out string msg);[[BR]]
     64   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.
     65     * xe_task_clone: A clone of FsTask element. Should not have any parent.
     66       To access the rest of the fsdb xml document use OwnerDocument property of the param.
     67     * msg: any messages regarding scoring
     68     * return: true if task was scored (meaning fsdb needs to be updated with xe_task_clone), false if not.
     69 * bool !EditScoreFormula(XmlElement xe_sf_clone);[[BR]]
     70   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.
     71     * xe_sf_clone: A clone of a !FsScoreFormula element. Should not have any parent.
     72       To access the rest of the fsdb xml document use !OwnerDocument property of the param.
     73     * 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.
     74