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

schedule-table: wrong real/thoretical margin computation when arrival time is set on a waypoint #10520

Open
Castavo opened this issue Jan 24, 2025 · 1 comment
Assignees
Labels
area:core Work on Core Service component:schedule-table from:users Something reported directly by the users kind:bug Something isn't working module:operational-studies Multi-train simulation with structured studies management severity:major Major severity bug

Comments

@Castavo
Copy link
Contributor

Castavo commented Jan 24, 2025

What happened?

The first train is set with a margin of 5%.
When I duplicate the train, and set an arrival time on one of the stops at the time at which it arrives naturally with the margin, then the margin computations are off

Enregistrement.de.l.ecran.2025-01-24.125205.mp4

What did you expect to happen?

I expect the margins to be okay (theoretical and real should match in this case)

How can we reproduce it (as minimally and precisely as possible)?

  1. Create a first train with some margin
  2. Add an arrival time on a waypoint, at the time it is supposed to cross this waypoint with the margin
  3. Witness the discrepancy

You can use this pre-made example too

On which environments the bug occurs?

Recette (SNCF)

On which browser the bug occurs?

Firefox

OSRD version (top right corner Account button > Informations)

fff6686

@Castavo Castavo added area:front Work on Standard OSRD Interface modules component:schedule-table from:users Something reported directly by the users kind:bug Something isn't working module:operational-studies Multi-train simulation with structured studies management severity:major Major severity bug labels Jan 24, 2025
@Castavo Castavo changed the title schedule-table: wrong real margin computation when arrival time is set on a waypoint schedule-table: wrong real/thoretical margin computation when arrival time is set on a waypoint Jan 24, 2025
@eckter eckter self-assigned this Jan 24, 2025
@eckter
Copy link
Contributor

eckter commented Jan 24, 2025

The issue is that we add margin ranges at every scheduled point, including when it's very close to the original result. But we've always had issues when it comes to ordering the margin ranges and the constraints we set on transitions. In such a case we'd need to simulate them in chronological order, but we wouldn't do that if the point is close to the origin.

This won't be fixed until the future large refactoring of running time simulations. Which sadly isn't planned soon and has been postponed for quite a while.

The best I could do for a partial fix would be to ignore scheduled points if they are all close to the initial result. But that's a very specific case and it wouldn't fix the issue, just kind of hide it.

@Castavo Castavo added area:core Work on Core Service and removed area:front Work on Standard OSRD Interface modules labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core Work on Core Service component:schedule-table from:users Something reported directly by the users kind:bug Something isn't working module:operational-studies Multi-train simulation with structured studies management severity:major Major severity bug
Projects
None yet
Development

No branches or pull requests

2 participants