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

core: stdcm: lazy edge evaluation to avoid computing useless allowances #2364

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

eckter
Copy link
Contributor

@eckter eckter commented Nov 17, 2022

We avoid computing allowances and backtracking when computing an edge, we only compute this once needed.
This significantly reduces the amount of allowances computed.

@eckter eckter requested a review from a team November 17, 2022 08:58
@codecov
Copy link

codecov bot commented Nov 17, 2022

Codecov Report

Merging #2364 (15bc232) into dev (5674b35) will decrease coverage by 0.09%.
The diff coverage is 86.04%.

@@             Coverage Diff              @@
##                dev    #2364      +/-   ##
============================================
- Coverage     80.29%   80.19%   -0.10%     
  Complexity     1650     1650              
============================================
  Files           237      237              
  Lines          7420     7434      +14     
  Branches        923      928       +5     
============================================
+ Hits           5958     5962       +4     
- Misses         1134     1141       +7     
- Partials        328      331       +3     
Flag Coverage Δ
core 83.73% <86.04%> (-0.15%) ⬇️

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

Impacted Files Coverage Δ
...fr/sncf/osrd/api/stdcm/graph/AllowanceManager.java 89.87% <0.00%> (-2.34%) ⬇️
...sncf/osrd/api/stdcm/graph/BacktrackingManager.java 92.68% <33.33%> (-4.69%) ⬇️
...fr/sncf/osrd/api/stdcm/graph/STDCMPathfinding.java 95.87% <66.66%> (-2.00%) ⬇️
...n/java/fr/sncf/osrd/api/stdcm/graph/STDCMEdge.java 85.71% <100.00%> (+10.71%) ⬆️
...fr/sncf/osrd/api/stdcm/graph/STDCMEdgeBuilder.java 98.50% <100.00%> (-0.16%) ⬇️
...ain/java/fr/sncf/osrd/utils/graph/Pathfinding.java 98.33% <100.00%> (+0.02%) ⬆️
...llowances/utils/AllowanceConvergenceException.java 66.66% <0.00%> (-16.67%) ⬇️
...in/java/fr/sncf/osrd/utils/DoubleBinarySearch.java 87.50% <0.00%> (-3.13%) ⬇️
...pe_sim/allowances/AbstractAllowanceWithRanges.java 91.58% <0.00%> (-0.94%) ⬇️

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

@eckter eckter linked an issue Nov 17, 2022 that may be closed by this pull request
El-Youssef
El-Youssef previously approved these changes Nov 21, 2022
@eckter eckter force-pushed the ech/stdcm-reduce-allowances branch from 9cb6454 to 86ed116 Compare November 21, 2022 14:26
@eckter eckter enabled auto-merge (rebase) November 21, 2022 14:26
@eckter eckter force-pushed the ech/stdcm-reduce-allowances branch from 86ed116 to b831e8e Compare November 21, 2022 14:38
We avoid computing allowances and backtracking when
computing an edge, we only compute this once needed.

This significantly reduces the amount of allowances computed.
@eckter eckter force-pushed the ech/stdcm-reduce-allowances branch from b831e8e to 15bc232 Compare November 21, 2022 15:00
@eckter eckter merged commit 473ece8 into dev Nov 22, 2022
@eckter eckter deleted the ech/stdcm-reduce-allowances branch November 22, 2022 09:17
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: we compute too many engineering allowances
3 participants