-
Notifications
You must be signed in to change notification settings - Fork 44
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 allowance space search discontinuities #5399
Conversation
933e3fa
to
40070b8
Compare
f1890d7
to
ce36774
Compare
ce36774
to
a2a3f4b
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #5399 +/- ##
=========================================
Coverage 19.58% 19.58%
- Complexity 2326 2327 +1
=========================================
Files 886 886
Lines 106098 106105 +7
Branches 2576 2576
=========================================
+ Hits 20777 20780 +3
- Misses 83812 83813 +1
- Partials 1509 1512 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
core/envelope-sim/src/main/java/fr/sncf/osrd/envelope/part/EnvelopePart.java
Outdated
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.
"PR authors can't approve their own PR", but LGTM (once the other discussion is resolved)
Good job for figuring this out
a2a3f4b
to
0d8bdbc
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.
Also kind of a co-author of this PR but i agree with the changes ! Great job and perseverance ! 💪
Couple of coasting problems for Mareco allowances, creating discontinuities in the search space for a solution validating said allowance.
First discontinuity was due to
coastFromBeginning
not starting at thestartSpeed
found whencoastFromEnd
never reaches the envelope. The solutions would then always fluctuate between braking=>coasting and coasting=>braking, but never with any solution in the middle.Second discontinuity was due to
EnvelopePart
not always having anEnvelopeProfile
attribute, in this case, theBraking
one: coasting opportunities were not found because of that (braking opportunities are found by firstly checking if saidEnvelopePart
has aBraking
attribute). It is now compulsory.Comparison between doubles played a small part in this: a PR will be arriving to use
areSpeedsEqual
everywhere (as long as I find all the comparisons).