Skip to content

Fix timeshifting of Flex ~ Walk ~ Flex paths in Raptor - #4952

Merged
leonardehrenfried merged 37 commits into
dev-2.xfrom
otp2_flex_raptor_fix
Mar 22, 2023
Merged

Fix timeshifting of Flex ~ Walk ~ Flex paths in Raptor#4952
leonardehrenfried merged 37 commits into
dev-2.xfrom
otp2_flex_raptor_fix

Conversation

@leonardehrenfried

@leonardehrenfried leonardehrenfried commented Mar 9, 2023

Copy link
Copy Markdown
Member

Summary

For Raptor Flex ~ Walk ~ Flex are valid paths (even though they don't make an awful lot of sense). Right now these paths throw an exception when they are time shifted.

In collaboration with @t2gran we decided that it's easier to fix the PathBuilder rather than complicating Raptor to deal with this special case.

There were also quite a bit of Raptor refactoring and bug fixing necessary to make all use cases work.

Issue

Closes #4862

Supersedes #4907

Unit tests

Added.

t2gran and others added 30 commits March 2, 2023 11:33
Replace with `RaptorModuleTestCase.addMinDuration("20m", 0, T00_00, T01_00)`
This also add the ability to modify the request parameters together
with the test-cases. For tests with multiple request configuration this
become more readable since the parameters is set together with the expected
outcome. All tests are now just one line, instead of repeating the 3 same
lines.
This just add two possibilities for creating the pareto-set, it does not change mc-raptor.
To find the AccessArrival the StopsCursor used departure-time and not arrival-time for access
where no transit connection existed. This, has probably little effect up-to know, since we
require at least one transit-leg. This error however cased problems in the debugger witch
logged access arrival events off by the duration of the leg.
This commit revert the onBoard as a criteria for all stop arrival in MC-Raptor, and only do it
in the stops reached by access or egress.
@leonardehrenfried
leonardehrenfried requested a review from a team as a code owner March 9, 2023 08:37
@leonardehrenfried leonardehrenfried added !Bug Apply to issues describing a bug and PRs witch fixes it. IBI Developed by or important for IBI Group labels Mar 9, 2023
@codecov

codecov Bot commented Mar 9, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 82.95% and project coverage change: +1.03 🎉

Comparison is base (53e6645) 62.94% compared to head (14803d4) 63.98%.

❗ Current head 14803d4 differs from pull request most recent head 51b6a60. Consider uploading reports for the commit 51b6a60 to get more accurate results

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #4952      +/-   ##
=============================================
+ Coverage      62.94%   63.98%   +1.03%     
- Complexity     13268    13535     +267     
=============================================
  Files           1662     1675      +13     
  Lines          66327    66148     -179     
  Branches        7217     7131      -86     
=============================================
+ Hits           41752    42325     +573     
+ Misses         22194    21450     -744     
+ Partials        2381     2373       -8     
Impacted Files Coverage Δ
...geraptor/debug/DebugHandlerPatternRideAdapter.java 33.33% <0.00%> (+3.33%) ⬆️
...geraptor/debug/DebugHandlerStopArrivalAdapter.java 33.33% <0.00%> (+3.33%) ⬆️
...tor/multicriteria/DebugStopArrivalsStatistics.java 89.47% <ø> (ø)
...standard/stoparrivals/DefaultStopArrivalState.java 75.00% <ø> (+1.78%) ⬆️
...er/raptor/rangeraptor/path/DestinationArrival.java 82.35% <50.00%> (-10.99%) ⬇️
...rangeraptor/standard/stoparrivals/view/Access.java 90.00% <50.00%> (+1.11%) ⬆️
...ngeraptor/standard/stoparrivals/view/Transfer.java 90.90% <50.00%> (-9.10%) ⬇️
...angeraptor/standard/stoparrivals/view/Transit.java 91.66% <50.00%> (-8.34%) ⬇️
...anner/raptor/rangeraptor/SystemErrDebugLogger.java 86.46% <66.66%> (+2.29%) ⬆️
...ner/raptor/rangeraptor/path/ForwardPathMapper.java 82.14% <70.00%> (-3.58%) ⬇️
... and 19 more

... and 183 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jtorin jtorin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have performed a technical review. I have not delved into neither architecture nor accuracy or coverage of tests.

@t2gran
t2gran requested a review from jtorin March 14, 2023 12:44
@t2gran t2gran added this to the 2.3 milestone Mar 14, 2023
Comment thread src/main/java/org/opentripplanner/raptor/api/model/PathLegType.java Outdated
Comment thread src/main/java/org/opentripplanner/raptor/api/model/PathLegType.java Outdated
Comment thread src/main/java/org/opentripplanner/raptor/api/view/ArrivalView.java Outdated
@leonardehrenfried
leonardehrenfried merged commit 4780e13 into dev-2.x Mar 22, 2023
@leonardehrenfried
leonardehrenfried deleted the otp2_flex_raptor_fix branch March 22, 2023 11:42
t2gran pushed a commit that referenced this pull request Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Bug Apply to issues describing a bug and PRs witch fixes it. IBI Developed by or important for IBI Group

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exception when planning FLEX_ACCESS,WALK trip with no transit leg

4 participants