-
Notifications
You must be signed in to change notification settings - Fork 45
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
core: fix distance_range_map.to_range_map #8831
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #8831 +/- ##
==========================================
Coverage 37.01% 37.01%
+ Complexity 2212 2211 -1
==========================================
Files 1254 1255 +1
Lines 113938 114240 +302
Branches 3189 3182 -7
==========================================
+ Hits 42177 42290 +113
- Misses 69864 70059 +195
+ Partials 1897 1891 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
e7cf9a3
to
914f29e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the test too!
core/src/main/kotlin/fr/sncf/osrd/standalone_sim/StandaloneSimulation.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof. I was almost certain that building with closed intervals worked, with the old value being overwritten at the transition. I don't know if it was changed but it's kind of bad that we didn't notice it.
Though there's technically no value at the very end with this change. But I don't think it matters.
@eckter I believe the overwriting works when using a MutableRangeMap rather than an ImmutableRangeMap |
914f29e
to
62c072a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay :)
Without this fix, we can't simulate trains with more than 1 power restriction range.
I added a test case.