-
Notifications
You must be signed in to change notification settings - Fork 64
editoast: implement /level_crossing_occupancy endpoint logic
#14545
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
base: dev
Are you sure you want to change the base?
Conversation
…jection Signed-off-by: aschantraine <[email protected]>
/level_crossing_occupancy endpoint logic
Signed-off-by: aschantraine <[email protected]>
|
ed563d5 to
79833c2
Compare
| ) | ||
| .await?; | ||
|
|
||
| // Load rolling stocks lengths |
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.
Nit: do we really need this kind of comment? The function called below has the exact same name, except for the word separators.
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.
Done
- Load infra, level crossings and trains - Run train pathfinding and simulation - Compute occupancy time windows - Group results by level crossing ID - Skip trains with missing rolling stock, failed simulations, no pedal intersection, or that do not fully traverse the short zone - Add i18n messages for level_crossing errors in en and fr Signed-off-by: aschantraine <[email protected]>
79833c2 to
60b81f8
Compare
Implements full logic for
/level_crossing_occupancy/endpoint assuming all trains arePacedTrain:interpolate_arrival_time()fromtrack_occupancy.rstoprojection.rsto be reused forlevel_crossing_occupancytrack_offset()method toLevelCrossingschemaThis only works for
PacedTrainas long as theTrainSchedulemigration has not been completed.