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

Fix sort order bug in optimized transfers #5446

Merged

Conversation

t2gran
Copy link
Member

@t2gran t2gran commented Oct 20, 2023

Summary

The optimized path service relay on sorting transfer between two trips on the toTrip boardStopPosition. The sort function used board time, witch in most cases works. But, it is allowed to use the same time for two stops next to each other. Many trip schedules only uses minutes precision, so two stops close to each other can be visited within the same minute.

Issue

Closes #5444

Unit tests

A regression unit-test is added.

Documentation

Not applicable.

Changelog

✅ This is a minor bugfix.

Bumping the serialization version id

No

@t2gran t2gran added the bug label Oct 20, 2023
@t2gran t2gran added this to the 2.5 (next release) milestone Oct 20, 2023
@t2gran t2gran requested a review from a team as a code owner October 20, 2023 22:54
@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (0c97ab9) 66.76% compared to head (afc010d) 66.85%.
Report is 70 commits behind head on dev-2.x.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5446      +/-   ##
=============================================
+ Coverage      66.76%   66.85%   +0.08%     
- Complexity     15445    15495      +50     
=============================================
  Files           1798     1800       +2     
  Lines          69777    69812      +35     
  Branches        7354     7353       -1     
=============================================
+ Hits           46590    46674      +84     
+ Misses         20725    20678      -47     
+ Partials        2462     2460       -2     
Files Coverage Δ
...ntripplanner/ext/traveltime/IsochroneRenderer.java 0.00% <ø> (ø)
...ntripplanner/framework/geometry/GeometryUtils.java 75.18% <ø> (ø)
...nner/graph_builder/issue/report/GeoJsonWriter.java 0.00% <ø> (ø)
...nner/graph_builder/module/ned/ElevationModule.java 65.33% <100.00%> (ø)
...der/module/ned/GeotiffGridCoverageFactoryImpl.java 76.00% <ø> (ø)
...builder/module/ned/NEDGridCoverageFactoryImpl.java 0.00% <ø> (ø)
...r/graph_builder/module/ned/NoDataGridCoverage.java 27.58% <ø> (ø)
.../graph_builder/module/ned/UnifiedGridCoverage.java 0.00% <ø> (ø)
...timization/services/OptimizePathDomainService.java 90.76% <100.00%> (ø)
...planner/street/model/elevation/ElevationUtils.java 72.72% <100.00%> (ø)
... and 5 more

... and 35 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…timization/services/OptimizePathDomainServiceTest.java

Co-authored-by: Johan Torin <jtorin@users.noreply.github.com>
Bartosz-Kruba
Bartosz-Kruba previously approved these changes Oct 26, 2023
@t2gran t2gran merged commit 20b9177 into opentripplanner:dev-2.x Oct 31, 2023
5 checks passed
@t2gran t2gran deleted the otp2_fix_bug_in_optimized_transfers_5444 branch October 31, 2023 16:28
t2gran pushed a commit that referenced this pull request Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IllegalStateException: The next method must be called with decreasing time
4 participants