FAI-CIVL / FAI-Airscore

AirScore - online paragliding / hanggliding GAP-based scoring software.
https://airscore.cc/
GNU General Public License v3.0
13 stars 17 forks source link

Stopped task scoring forced full rescore #142

Open kuaka opened 3 years ago

kuaka commented 3 years ago

When hitting "score" for a task that has been stopped airscore forces a full rescore: https://github.com/FAI-CIVL/FAI-Airscore/blob/92784931eec8d7a9f4c83a3f91ed678608833706/airscore/core/task.py#L609

I am not sure what the reason is, presumably we are being prudent in case the stopped time was entered into the task after some tracks had been processed (and those tracks were flying at the stopped time).

This will happen everytime this task is scored which is a waste of time. A better strategy IMHO would be: when stopped time saved (or changed) in task - > check if there are already processed tracklogs -> if so, reprocess->else do nothing.

That way we are not reprocessing every track every time we score.

Any issues with this? Am I missing something?

biuti commented 3 years ago

So, in case we have a Race with a single start, that is correct, we could full rescore just once if there are already tracks at the time task status has been changed. In multi start / elapsed time, all pilots tracks are scored for the minimum flight time, so we need a check in track admin, case a new track has a flight time < previous min flight time -> need full rescore. At the moment there isn't this logic.

Probably ideal solution would be to add a check for tracks already checked when stopped time is changed, and trigger a full rescore or advice it is needed / add a flag to task. Then if multi-start/elapsed time, add logic for min_flight_time in track_admin and trigger a new full rescore.

kuaka commented 3 years ago

ok thanks for the clarification.

kuaka commented 3 years ago

Then if multi-start/elapsed time, add logic for min_flight_time in track_admin and trigger a new full rescore.

is this min_flight_time or last sss time? i.e. if a pilot took start gate 70min before stopped time (and all other pilots took it before) then the min available time would be 70min. however if a pilot took sss and landed after 15min but the task was not stopped when they landed then this flight should not be considered as min time. in other words take all pilots in air at stopped time and find latest gate/sss from these pilots. or am I wrong?

biuti commented 3 years ago

Actually it would make sense, but in the rules it is stated all pilots who took the start pilot: typeOfTask ≠ RaceToGoal ∨ numberOfStartGates >1: scoreTime = taskStopTime − max(∀p :p ∈ StartedPilots :startTime p ) ∀p:p∈StartedPilots:scoreTimeWindowp =(startTimep,startTimep +scoreTime) Probably there is a reason even if I'm not aware of it at the moment. In task there are already sone properties giving all the correct numbers following the rules, they depend also from class. It should also be documented.

biuti commented 3 years ago

While in PG min score time and validity time are connected, so if pilot who started later did not have the possibility to fly minimum scoring time, the task validity is 0, in HG they consider first start, if stop time - first start > min score time, task is valid. Then, they do the math above to get score time for each pilot, that could be much less than min score time.

kuaka commented 3 years ago

ok rules are similar to what I asked. It is not min flight time but min available flight time. (We don't care about a pilot that lands after 1 min if he started before the last start gate)