Skip to content
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

Proper rounding procedure #128

Open
mmomtchev opened this issue Sep 18, 2022 · 2 comments
Open

Proper rounding procedure #128

mmomtchev opened this issue Sep 18, 2022 · 2 comments

Comments

@mmomtchev
Copy link
Owner

Currently the rounding rules of all flight leagues are not 100% clear and igc-xc-score seems to deviate from what is the most common practice, that is, by order:

  • Round each leg separately
  • Sum the rounded legs
  • Round the penalty
  • Apply the penalty
  • Apply the multiplier
  • Round the score
@mmomtchev
Copy link
Owner Author

Why is rounding so complicated and so important?

Because, very frequently, the optimizer has to choose between placing a TP in such way that you get

  • a leg of x.4 and y.4 km
    or
  • a leg of x.5 and y.3 km

If you simply round the final result, these can appear equivalent when they are not. Optimizing the rounded score is yet another layer to the general optimization problem that is definitely not trivial and straightforward.

@hyperknot
Copy link

hyperknot commented Oct 19, 2022

Mathematically I cannot imagine a situation where you'd like to round multiple small numbers before summing them. I'd just round everything at the very last step and keep floating point until that point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants