-
Notifications
You must be signed in to change notification settings - Fork 40
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: change pathfinding errors on rolling-stock constraints #7953
base: dev
Are you sure you want to change the base?
core: change pathfinding errors on rolling-stock constraints #7953
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #7953 +/- ##
============================================
+ Coverage 28.06% 28.09% +0.03%
- Complexity 2075 2077 +2
============================================
Files 1289 1289
Lines 157764 157834 +70
Branches 3121 3134 +13
============================================
+ Hits 44281 44350 +69
+ Misses 111606 111592 -14
- Partials 1877 1892 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
0e4eb4c
to
0a2d394
Compare
core/src/main/kotlin/fr/sncf/osrd/api/api_v2/pathfinding/PathfindingBlockResponse.kt
Outdated
Show resolved
Hide resolved
2f0ca04
to
2f67537
Compare
core/src/main/kotlin/fr/sncf/osrd/api/api_v2/pathfinding/PathfindingBlocksEndpointV2.kt
Show resolved
Hide resolved
core/src/main/kotlin/fr/sncf/osrd/api/api_v2/pathfinding/PathfindingBlocksEndpointV2.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/fr/sncf/osrd/api/api_v2/pathfinding/PathfindingBlocksEndpointV2.kt
Outdated
Show resolved
Hide resolved
abccc44
to
8ee6553
Compare
core/src/main/kotlin/fr/sncf/osrd/api/api_v2/pathfinding/PathfindingBlocksEndpointV2.kt
Show resolved
Hide resolved
8ee6553
to
d20609e
Compare
core/kt-osrd-utils/src/main/kotlin/fr/sncf/osrd/utils/DistanceRangeMap.kt
Outdated
Show resolved
Hide resolved
waypoints: ArrayList<Collection<PathfindingEdgeLocationId<Block>>>, | ||
constraints: List<PathfindingConstraint<Block>>, | ||
remainingDistanceEstimators: List<AStarHeuristicId<Block>>, | ||
timeout: Double? |
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.
Not sure we need the timeout. Timeout is used to prevent the algorithm to compute for too much time when it doesn't find a solution. Since we've arrived here, it means the constrained pathfinding has already taken less than 2min. As a result, there's no reason the unconstrained pathfinding should take more than 2min.
Edit: might be fine to actually keep the timeout here, but having it be only 2min - basePathfindingTime is harsh.
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.
Since we've arrived here, it means the constrained pathfinding has already taken less than 2min. As a result, there's no reason the unconstrained pathfinding should take more than 2min.
It can, the unconstrained pathfinding has more edges to explore.
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.
After first discussions: we want to be able to distinguish a timeout using initial (real) constraints and a timeout unconstrained if we have an "unconstrained" timeout.
Now the question is (@bloussou ?): What timeout do we want on unconstrained PF (launched to "explain" failure) ?
- shared with the constrained PF
- equal to the constrained PF
- no timeout
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.
Is it triggered for each failing PF ?
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.
Yes. For each failing PF (except if it takes >2min and fails due to timeout), the unconstrained PF is triggered, to find out why it failed (ex: due to electrification constraints), the explanation is returned and will be displayed in the front end of the app (back end part of this feature is this PR).
If your question was if the timeout was triggered for every failing PF, the answer is no, it depends.
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.
We may not care about explaining PF failure (RS constraints) when using the timeout (BASIC import).
It would let more freedom and maybe aim at a quicker fail, so a mutualized timeout?
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.
okay lets go for a mutualized timeout I think
core/src/main/kotlin/fr/sncf/osrd/api/api_v2/pathfinding/PathfindingBlocksEndpointV2.kt
Show resolved
Hide resolved
core/src/main/kotlin/fr/sncf/osrd/api/api_v2/pathfinding/PathfindingBlocksEndpointV2.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/fr/sncf/osrd/api/pathfinding/constraints/ElectrificationConstraints.kt
Outdated
Show resolved
Hide resolved
d20609e
to
65f3fe1
Compare
also makes incompatibleGaugeRanges consistent with the rest (nest range)
65f3fe1
to
fe3b779
Compare
Change interface for pathfinding errors on rolling-stock constraints and project RS constraints on the relaxed path.
⚠️ this breaks core interface and will be handled in another PR by editoast.
TODO:
Fix: #7719