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

editoast: fix all units about rolling resistance #9666

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

woshilapin
Copy link
Contributor

Fixes #9657 (or we hope it does at least).

The database is populated with SI units, which means Newton, kg, meter and seconds.

Another important piece of information is:

  • Units of rolling resistance for traction engines (also named rolling stocks) are in N, N/(m/s) and N/(m/s)²
  • Units of rolling resistance for towed rolling stocks are in (N/kg), (N/kg)/(m/s) and (N/kg)/(m/s)².

Therefore, we need 2 different struct for storing those, hence the introduction of RollingResistancePerWeight.

@woshilapin woshilapin added kind:bug Something isn't working component:rollingstock work related to rollingstock definitions area:editoast Work on Editoast Service module:stdcm Short-Term DCM severity:critical Critical severity bug rust Pull requests that update Rust code labels Nov 8, 2024
@woshilapin woshilapin requested a review from a team as a code owner November 8, 2024 22:11
@github-actions github-actions bot removed the area:editoast Work on Editoast Service label Nov 8, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2024

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

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 30.41%. Comparing base (0e1ea9b) to head (81beeb0).
Report is 23 commits behind head on dev.

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

❗ There is a different number of reports uploaded between BASE (0e1ea9b) and HEAD (81beeb0). Click for more details.

HEAD has 8 uploads less than BASE
Flag BASE (0e1ea9b) HEAD (81beeb0)
railjson_generator 2 1
osrdyne 2 1
gateway 2 1
tests 2 1
front 2 1
core 2 1
editoast 2 0
Additional details and impacted files
@@              Coverage Diff              @@
##                dev    #9666       +/-   ##
=============================================
- Coverage     42.51%   30.41%   -12.10%     
- Complexity     2271     2272        +1     
=============================================
  Files          1311     1041      -270     
  Lines        105413    77197    -28216     
  Branches       3297     3304        +7     
=============================================
- Hits          44812    23482    -21330     
+ Misses        58655    51762     -6893     
- Partials       1946     1953        +7     
Flag Coverage Δ
core 75.05% <ø> (+<0.01%) ⬆️
editoast ?
front 18.79% <ø> (-0.01%) ⬇️
gateway 2.18% <ø> (-0.02%) ⬇️
osrdyne 3.28% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 86.74% <ø> (ø)

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.

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.

Tests seem to fail and I haven't tested yet, but the units match.

The database is populated with SI units, which means
Newton, kg, meter and seconds.

Another important piece of information is:
- Units of rolling resistance for traction engines (also named rolling stocks)
  are in N, N/(m/s) and N/(m/s)²
- Units of rolling resistance for towed rolling stocks
  are in (N/kg), (N/kg)/(m/s) and (N/kg)/(m/s)².

Therefore, we need 2 different `struct` for storing those, hence the
introduction of `RollingResistancePerWeight`.

Signed-off-by: Jean SIMARD <woshilapin@tuziwo.info>
@woshilapin woshilapin force-pushed the wsl/editoast/9657-fix-consists-rolling-resistance branch from 81beeb0 to 3433850 Compare November 15, 2024 14:29
@github-actions github-actions bot added the area:editoast Work on Editoast Service label Nov 15, 2024
Copy link
Contributor

@leovalais leovalais left a comment

Choose a reason for hiding this comment

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

LGTM

@woshilapin woshilapin enabled auto-merge November 15, 2024 14:52
@woshilapin woshilapin added this pull request to the merge queue Nov 15, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 15, 2024
@woshilapin woshilapin added this pull request to the merge queue Nov 15, 2024
Merged via the queue into dev with commit bd87087 Nov 15, 2024
27 checks passed
@woshilapin woshilapin deleted the wsl/editoast/9657-fix-consists-rolling-resistance branch November 15, 2024 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editoast Work on Editoast Service component:rollingstock work related to rollingstock definitions kind:bug Something isn't working module:stdcm Short-Term DCM rust Pull requests that update Rust code severity:critical Critical severity bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

towed rolling stocks don't forward rolling resistance values in the right unit
4 participants