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: sim: ignore overlapping scheduled points #7747

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

eckter
Copy link
Contributor

@eckter eckter commented Jun 17, 2024

Fix #7744

@eckter eckter requested a review from a team as a code owner June 17, 2024 12:37
@eckter eckter requested review from Khoyo and bougue-pe June 17, 2024 12:37
@codecov-commenter
Copy link

codecov-commenter commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 28.61%. Comparing base (09eead2) to head (4b033f9).
Report is 2 commits behind head on dev.

Files Patch % Lines
...r/sncf/osrd/standalone_sim/StandaloneSimulation.kt 0.00% 1 Missing and 2 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #7747      +/-   ##
============================================
- Coverage     28.62%   28.61%   -0.01%     
  Complexity     2038     2038              
============================================
  Files          1244     1244              
  Lines        153687   153671      -16     
  Branches       3012     3014       +2     
============================================
- Hits          43991    43976      -15     
+ Misses       107905   107902       -3     
- Partials       1791     1793       +2     
Flag Coverage Δ
core 75.03% <0.00%> (-0.02%) ⬇️
editoast 72.11% <ø> (-0.04%) ⬇️
front 9.91% <ø> (-0.01%) ⬇️
gateway 2.41% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 72.93% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eckter eckter force-pushed the ech/ignore-overlapping-scheduled-points branch from 4b033f9 to 74a6de6 Compare June 18, 2024 07:36
@eckter eckter added this pull request to the merge queue Jun 18, 2024
@eckter eckter removed this pull request from the merge queue due to a manual request Jun 18, 2024
Copy link
Contributor

@bougue-pe bougue-pe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's OK to merge as-is, but I would make that warning as rare as possible with an early dedup on consecutive identical steps (probably with an info/debug log) to ease the monitoring and separate "legitimate" cases (weird input) from the suspect ones (internal core behavior).

Context: As discussed, this case from the issue is not about consecutive identical step, as they are separated by another separate step on the same block but not at the same place.
So here, the pathfinding is wrongly aggregating identical steps because intermediate ones are on the same block (to be adressed in #7761)

@eckter eckter force-pushed the ech/ignore-overlapping-scheduled-points branch from 496dfb2 to a85eb96 Compare June 18, 2024 12:39
@eckter
Copy link
Contributor Author

eckter commented Jun 18, 2024

but I would make that warning as rare as possible with an early dedup on consecutive identical steps (probably with an info/debug log) to ease the monitoring and separate "legitimate" cases (weird input) from the suspect ones (internal core behavior).

I've added a simple check to dedup the scheduled items, but I've only merged the ones that are entirely identical (offset, time, stop duration, on stop signal)

Copy link
Contributor

@bougue-pe bougue-pe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !

Update core/src/main/kotlin/fr/sncf/osrd/standalone_sim/StandaloneSimulation.kt

Co-authored-by: bougue-pe <150040524+bougue-pe@users.noreply.github.com>
@eckter eckter force-pushed the ech/ignore-overlapping-scheduled-points branch from a85eb96 to 45e3f52 Compare June 18, 2024 13:58
@eckter eckter enabled auto-merge June 18, 2024 13:58
@eckter eckter added this pull request to the merge queue Jun 18, 2024
Merged via the queue into dev with commit ab93f26 Jun 18, 2024
17 checks passed
@eckter eckter deleted the ech/ignore-overlapping-scheduled-points branch June 18, 2024 14:18
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.

Assert check failed on a supposed to be valid train_schedule
6 participants