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

core: ignore impossible allowance constraints #7520

Merged
merged 1 commit into from
May 28, 2024

Conversation

eckter
Copy link
Contributor

@eckter eckter commented May 27, 2024

In this case the user wants a result that's realistic and as close to the input times as possible, rather than an error. This is in line with how we ignore impossible scheduled points. It should fix a significant amount of regression in the basic import (caused by a bug in the previous version that would result in too little ranges).

We would ideally raise a warning here, but that's not supported yet (see #6925).

The implementation isn't super clean, but this code is meant to be replaced soon-ish by the simulation v3. This behavior is in line with what's been designed for the v3 (warnings instead of errors).


It triggers #5778 in a regression test (which was a known bug for a long time and is unrelated). #7529 should be merged first for the CI to pass.

@eckter eckter requested a review from a team as a code owner May 27, 2024 12:38
@eckter eckter requested a review from multun May 27, 2024 12:38
@eckter eckter force-pushed the ech/ignore-allowance-errors branch from a900f6c to f6aa1d6 Compare May 27, 2024 12:43
@codecov-commenter
Copy link

codecov-commenter commented May 27, 2024

Codecov Report

Attention: Patch coverage is 92.68293% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 29.37%. Comparing base (6c405e6) to head (416d8ef).

Files Patch % Lines
...pe_sim/allowances/AbstractAllowanceWithRanges.java 92.68% 1 Missing and 2 partials ⚠️

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

Additional details and impacted files
@@            Coverage Diff            @@
##                dev    #7520   +/-   ##
=========================================
  Coverage     29.36%   29.37%           
- Complexity     2012     2014    +2     
=========================================
  Files          1200     1200           
  Lines        147377   147400   +23     
  Branches       2889     2891    +2     
=========================================
+ Hits          43283    43297   +14     
- Misses       102393   102401    +8     
- Partials       1701     1702    +1     
Flag Coverage Δ
core 75.10% <92.68%> (+0.02%) ⬆️
editoast 72.52% <ø> (-0.03%) ⬇️
front 9.76% <ø> (ø)
gateway 2.41% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 71.78% <ø> (ø)

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

@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.

Reduces simulation errors in all_waypoints.json from 143 to 72.

@eckter eckter self-assigned this May 28, 2024
@eckter eckter force-pushed the ech/ignore-allowance-errors branch from f6aa1d6 to 62b8665 Compare May 28, 2024 08:48
@eckter eckter requested a review from a team as a code owner May 28, 2024 08:48
@eckter eckter requested a review from shenriotpro May 28, 2024 08:48
@eckter eckter force-pushed the ech/ignore-allowance-errors branch 2 times, most recently from 4a1412e to b441f8a Compare May 28, 2024 12:56
In this case the user wants a result that's realistic
and as close to the input times as possible, rather
than an error. This is in line with how we ignore
impossible scheduled points.

We would ideally raise a warning here, but that's
not supported yet.
@eckter eckter force-pushed the ech/ignore-allowance-errors branch from b441f8a to 416d8ef Compare May 28, 2024 13:35
@eckter eckter removed request for a team, multun and shenriotpro May 28, 2024 13:36
@eckter eckter added this pull request to the merge queue May 28, 2024
Merged via the queue into dev with commit e669997 May 28, 2024
17 checks passed
@eckter eckter deleted the ech/ignore-allowance-errors branch May 28, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants