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

stdcm: implement backtracking #2201

Merged
merged 6 commits into from
Nov 3, 2022
Merged

stdcm: implement backtracking #2201

merged 6 commits into from
Nov 3, 2022

Conversation

eckter
Copy link
Contributor

@eckter eckter commented Oct 27, 2022

This change lets us modify the previous edges, which is used to fix speed discontinuities.
It will also let us use engineering margins in a future PR.

Short summary of changes:

  • The edges keep track of the previous edges / nodes and we now reassemble the path ourselves at the end
  • When there is a speed discontinuity, we create a "new" previous edge with the appropriate slowdown
  • Some code was moved around, inner classes of STDCMGraph were extracted, code sections have been added

@eckter eckter requested a review from a team October 27, 2022 15:34
@eckter eckter linked an issue Oct 27, 2022 that may be closed by this pull request
3 tasks
@codecov
Copy link

codecov bot commented Oct 27, 2022

Codecov Report

Merging #2201 (0c1666e) into dev (e097895) will increase coverage by 0.21%.
The diff coverage is 93.79%.

@@             Coverage Diff              @@
##                dev    #2201      +/-   ##
============================================
+ Coverage     78.87%   79.09%   +0.21%     
- Complexity     1669     1696      +27     
============================================
  Files           274      277       +3     
  Lines          7575     7659      +84     
  Branches        945      959      +14     
============================================
+ Hits           5975     6058      +83     
+ Misses         1252     1251       -1     
- Partials        348      350       +2     
Flag Coverage Δ
core 82.20% <93.79%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ain/java/fr/sncf/osrd/api/stdcm/STDCMEndpoint.java 84.37% <ø> (ø)
...n/java/fr/sncf/osrd/api/stdcm/graph/STDCMEdge.java 50.00% <50.00%> (ø)
...fr/sncf/osrd/api/stdcm/graph/STDCMPathfinding.java 98.03% <94.28%> (ø)
.../java/fr/sncf/osrd/api/stdcm/graph/STDCMGraph.java 98.15% <97.93%> (ø)
.../sncf/osrd/api/stdcm/BacktrackingEnvelopeAttr.java 100.00% <100.00%> (ø)
...n/java/fr/sncf/osrd/api/stdcm/graph/STDCMNode.java 100.00% <100.00%> (ø)
...d/infra_state/implementation/TrainPathBuilder.java 83.33% <0.00%> (+1.38%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@eckter eckter force-pushed the ech/stdcm-backtrack branch from 4351cab to 764a421 Compare October 31, 2022 07:57
@eckter eckter changed the title wip: stdcm: implement backtracking stdcm: implement backtracking Oct 31, 2022
@eckter eckter force-pushed the ech/stdcm-backtrack branch from e04c9f4 to 0c1666e Compare October 31, 2022 09:36
@eckter eckter merged commit 0597973 into dev Nov 3, 2022
@eckter eckter deleted the ech/stdcm-backtrack branch November 3, 2022 13:36
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

Successfully merging this pull request may close these issues.

stdcm: handle backtracking
2 participants