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

Add ERTMS-ETCS brake params and signaling to rolling-stock model #10147

Merged
merged 10 commits into from
Jan 9, 2025

Conversation

bougue-pe
Copy link
Contributor

@bougue-pe bougue-pe commented Dec 20, 2024

Note: not managing towed rolling-tock so far (may not have a max_speed, not sure how to merge brake values).

Also:

  • Add ETCS_LEVEL2 signaling for infra and rolling-stock (complete duplicate of TVM430 for now).
  • Compute ETCS_LEVEL2 ranges of the path
  • Fix some small bits (🔍 review by commit)
  • Tests:
    • add tests ETCS_LEVEL2 rolling-stock (derived from fast_rolling_stock).
    • add tests ETCS infra (including electrical_profile). Derived from small_infra, just switching all the signaling from BAL to
      ETCS_LEVEL2.

✅ Hand-tested only for now:

  • keeps ETCS params when editing RS
  • when removing the TODO() on core ETCS-brake part processing, it "works" as expected, with the TODO() it fails in core

fix #9708 and #9706

TODO after this PR:

  • add integration tests (circumvent ETCS intervals for now with a TODO) > For this PI : tests: add ETCS braking curve integration tests for stops only #10294
  • prioritize signaling systems for blocks of pathfinding: ETCS>TVM430>TVM300>BAL>BAPR
  • use the signaling system output from pathfinding everywhere (remove recoverBlockPath - only deprecated now)
  • merge small_infra BAL and ERTMS (and TVM?)

@bougue-pe bougue-pe requested review from eckter and Erashin December 20, 2024 08:29
@bougue-pe bougue-pe requested review from a team as code owners December 20, 2024 08:29
@github-actions github-actions bot added area:railjson Work on Proposed Unified Rail Assets Data Exchange Format area:core Work on Core Service area:front Work on Standard OSRD Interface modules area:editoast Work on Editoast Service area:integration-tests Work on Integration test, by nature related to different services labels Dec 20, 2024
@codecov-commenter
Copy link

codecov-commenter commented Dec 20, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 44.94382% with 49 lines in your changes missing coverage. Please review.

Project coverage is 81.49%. Comparing base (cae4d30) to head (85ccac8).
Report is 22 commits behind head on dev.

Files with missing lines Patch % Lines
...ast_schemas/src/rolling_stock/etcs_brake_params.rs 4.54% 42 Missing ⚠️
editoast/editoast_schemas/src/rolling_stock.rs 81.81% 4 Missing ⚠️
editoast/src/core/simulation.rs 85.71% 2 Missing ⚠️
...tock/components/RollingStockSelector/sampleData.ts 0.00% 1 Missing ⚠️

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

Additional details and impacted files
@@           Coverage Diff            @@
##              dev   #10147    +/-   ##
========================================
  Coverage   81.49%   81.49%            
========================================
  Files        1058     1061     +3     
  Lines      104270   104575   +305     
  Branches      722      722            
========================================
+ Hits        84973    85226   +253     
- Misses      19256    19308    +52     
  Partials       41       41            
Flag Coverage Δ
editoast 73.64% <45.45%> (-0.11%) ⬇️
front 89.24% <0.00%> (+0.03%) ⬆️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.50% <ø> (ø)
tests 87.05% <ø> (ø)

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.

@bougue-pe bougue-pe changed the title Add ETCS brake params and signaling to rolling-stock model Add ERTMS-ETCS brake params and signaling to rolling-stock model Dec 20, 2024
Copy link
Contributor

@woshilapin woshilapin left a comment

Choose a reason for hiding this comment

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

I've only looked at the editoast part. Looks good. I'm only worry about the "towed rolling stock" not being handled yet, which might means an incorrect feature (not an incomplete one). What's your take on that?

Copy link
Contributor

@eckter eckter left a comment

Choose a reason for hiding this comment

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

Nice job!

For the test infra, we may not need something as complex as a clone of small_infra. Maybe an infra with a few tracks, a switch and a few slopes would be enough and easier to maintain. (But it's fine as it is if you prefer it this way)
-> Adding a non-ERTMS section would be nice.

@bougue-pe bougue-pe force-pushed the peb/editoast/add_etcs_brake_params_to_rs_model branch 2 times, most recently from e28a6af to fe27737 Compare January 7, 2025 14:54
@bougue-pe bougue-pe force-pushed the peb/editoast/add_etcs_brake_params_to_rs_model branch from fe27737 to d1ab72f Compare January 8, 2025 08:50
Copy link
Contributor

@woshilapin woshilapin left a comment

Choose a reason for hiding this comment

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

Thank you for the improvements. The editoast part looks good!

Copy link
Contributor

@eckter eckter left a comment

Choose a reason for hiding this comment

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

LGTM

Great job there! 👍

@bougue-pe bougue-pe requested a review from emersion January 8, 2025 11:02
Copy link
Contributor

@Erashin Erashin left a comment

Choose a reason for hiding this comment

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

Gj! We'll need to report the todo things in our meta issue.

@bougue-pe bougue-pe requested a review from achrafmohye January 8, 2025 13:26
@bougue-pe bougue-pe removed the request for review from louisgreiner January 8, 2025 13:26
Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

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

LGTM for the frontend part!

Copy link
Contributor

@achrafmohye achrafmohye left a comment

Choose a reason for hiding this comment

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

the front LGTM 👍

Also add tests ETCS_LEVEL2 rolling-stock (derived from fast_rolling_stock).

Note: not managing towed rolling-tock so far (may not have a max_speed,
  not sure how to merge brake values).

Signed-off-by: Pierre-Etienne Bougué <bougue.pe@proton.me>
Complete duplicate of TVM430 for now.

Also add tests ETCS infra (including electrical_profile).
Derived from small_infra, just switching all the signaling from BAL to
ETCS_LEVEL2.

Signed-off-by: Pierre-Etienne Bougué <bougue.pe@proton.me>
Signed-off-by: Pierre-Etienne Bougué <bougue.pe@proton.me>
Note: In StandaloneSimulationTest, using `getRouteBlocks` is another valid
option for now, but it uses `recoverBlocks` and we want to get rid of it
eventually.

Signed-off-by: Pierre-Etienne Bougué <bougue.pe@proton.me>
recovering blocks from route can lead to different results than the
pathfinding (especially for signaling system)

Signed-off-by: Pierre-Etienne Bougué <bougue.pe@proton.me>
Signed-off-by: Pierre-Etienne Bougué <bougue.pe@proton.me>
Also: remove easy parts and minor improvements

Signed-off-by: Pierre-Etienne Bougué <bougue.pe@proton.me>
Signed-off-by: Pierre-Etienne Bougué <bougue.pe@proton.me>
This implies offsetting ETCS ranges (the dangerPoints were already OK)

Signed-off-by: Pierre-Etienne Bougué <bougue.pe@proton.me>
As it's only used as output and serde serializes optional fields

Signed-off-by: Pierre-Etienne Bougué <bougue.pe@proton.me>
@bougue-pe bougue-pe force-pushed the peb/editoast/add_etcs_brake_params_to_rs_model branch from fb63ad4 to 85ccac8 Compare January 9, 2025 08:49
@bougue-pe bougue-pe added this pull request to the merge queue Jan 9, 2025
Merged via the queue into dev with commit 9757f4e Jan 9, 2025
27 checks passed
@bougue-pe bougue-pe deleted the peb/editoast/add_etcs_brake_params_to_rs_model branch January 9, 2025 09:49
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 area:editoast Work on Editoast Service area:front Work on Standard OSRD Interface modules area:integration-tests Work on Integration test, by nature related to different services area:railjson Work on Proposed Unified Rail Assets Data Exchange Format
Projects
None yet
10 participants