-
-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Lap time alignment fails if a driver retires on the first lap of a race and pits #549
Comments
Hi, |
Currently, there are two requirements for a lap that can be used to align the data.
Assume the following scenario: Driver A pits on the first lap of the GP and then continues the race, driver B retires on the second lap. With the current logic, it is now impossible to correctly align any of the data. But in theory, you could align all drivers except driver A based on the first lap. Driver A can then be aligned based on the second lap. This requires the following:
Also, when a driver retires on the very first lap, it will always be impossible to correctly align that driver with the other drivers. This should not cause the whole alignment procedure to fail, but just leave that one driver unaligned. |
Thanks for your response, based on that explanation I have come up with the following strategy:
Can either run it recursively until the entire field is aligned or set a hard "passes" limit, i.e max 3 passes (pass limit would be faster for obvious reasons. Does that sound reasonable? |
That sounds like a reasonable way to solve this problem 👍 I don't think a hard limit to the number of passes will be necessary. Correctly aligning all data should be preferred over performance, even though performance is important of course. But passes that don't align any drivers should not take much time. And all other passes are time well spent. |
@HarshitACE what's the current status on this? Are you still working on it? |
Hey, yes I'm going to tidy it a bit and submit a PR (by next weekend at the earliest). |
Ok, great to hear 👍 |
Describe the issue:
The alignment of the (absolute) lap start times across drivers fails if a driver retires on the first lap and pits.
Example: 2024, Saudi Arabia, Race
Other combinations of factors may have the same effect.
The lap time alignment should be extended to be able to align laps based on different reference laps for each driver instead of being fixed to one single lap where the constraints must be met by all drivers.
Reproduce the code example:
Error message:
The text was updated successfully, but these errors were encountered: