OpenRailAssociation / osrd

An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation
https://osrd.fr
GNU Lesser General Public License v3.0
415 stars 40 forks source link

core: stdcm: remove list of heuristics + related simplifications #7858

Closed eckter closed 1 week ago

eckter commented 1 week ago

I started this while rebasing https://github.com/OpenRailAssociation/osrd/pull/7844 but it ended up being a fair amount of changes, it feels like this deserves its own PR

I started as removing the list of heuristic and using a single function instead (it's simpler).

Then I figured out node.remainingTimeEstimation doesn't have to be optional (or with a default value) anymore with this change, if we just move the place where it's computed

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 28.53%. Comparing base (891f5fd) to head (1832a7d).

Files Patch % Lines
...c/main/kotlin/fr/sncf/osrd/stdcm/STDCMHeuristic.kt 88.88% 0 Missing and 1 partial :warning:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #7858 +/- ## ============================================ - Coverage 28.54% 28.53% -0.02% + Complexity 2060 2059 -1 ============================================ Files 1249 1249 Lines 154183 154170 -13 Branches 3041 3039 -2 ============================================ - Hits 44016 43996 -20 - Misses 108353 108361 +8 + Partials 1814 1813 -1 ``` | [Flag](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7858/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [core](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `74.95% <95.00%> (-0.01%)` | :arrow_down: | | [editoast](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `71.65% <ø> (-0.04%)` | :arrow_down: | | [front](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `10.01% <ø> (ø)` | | | [gateway](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `2.34% <ø> (ø)` | | | [railjson_generator](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `87.49% <ø> (ø)` | | | [tests](https://app.codecov.io/gh/OpenRailAssociation/osrd/pull/7858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `72.93% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.