Closed kuaka closed 3 years ago
Fixed with https://github.com/FAI-CIVL/FAI-Airscore/commit/6bcad15fd36aada901338daabedbf147a6de943a.
On a side note, original version was consistent with rules:
typeOfTask = RaceToGoal ∧ numberOfStartGates =1: timePointsReduction = timePoints(taskStopTime − startTime) TypeOfTask ≠ RaceToGoal ∨ numberOfStartGates > 1: timePointsReduction = timePoints(taskStopTime − max(∀p :p ∈ StartedPilots :startTime p )) ∀p : p ∈ PilotsInGoal : finalTimePoints p = timePoints p − timePointsReduction
But this speed section time can easily be better than first in goal, causing Speed Factor formula to return complex numbers. So I suspect Rules should be:
TypeOfTask ≠ RaceToGoal ∨ numberOfStartGates > 1: timePointsReduction = timePoints(taskStopTime − max(∀p :p ∈ PilotsAtESS :startTime p ))
I'll ask Joerg.
This is Joerg answer:
About your problem: You are correct, we should only look at start times of pilots who actually get time points. So I’d use max(∀p :p ∈ PilotsInGoal :startTime p )
So I'll do the same.
worker_1 | File "/app/airscore/core/task.py", line 636, in create_results worker_1 | lib.calculate_results(self) worker_1 | File "/app/airscore/core/formulas/gap2016.py", line 155, in calculate_results worker_1 | points_weight(task) worker_1 | File "/app/airscore/core/formulas/libs/gap.py", line 272, in points_weight worker_1 | task.time_points_reduction = 0 if not task.stopped_time else calculate_time_points_reduction(task) worker_1 | File "/app/airscore/core/formulas/libs/gap.py", line 445, in calculate_time_points_reduction worker_1 | return pilot_speed(t, p) worker_1 | File "/app/airscore/core/formulas/libs/gap.py", line 361, in pilot_speed worker_1 | if SF > 0: worker_1 | TypeError: '>' not supported between instances of 'complex' and 'int'
this task (111 airscore_fai) was able to be scored in devlopment branch prior to merge with "dev_candidate" it now fails