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

Improve logic for transfers in consolidated stops #6157

Merged

Conversation

leonardehrenfried
Copy link
Member

Summary

This improves the logic of the consolidated stops according to the latest Arcadis supplied specification: some walk legs are removed when you transfer in consolidated stops.

Unit tests

Added.

Documentation

Javadoc.

Copy link

codecov bot commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 61.53846% with 10 lines in your changes missing coverage. Please review.

Project coverage is 69.90%. Comparing base (7a9996f) to head (129cb63).
Report is 6 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...opconsolidation/DecorateConsolidatedStopNames.java 65.00% 2 Missing and 5 partials ⚠️
...tion/internal/DefaultStopConsolidationService.java 33.33% 1 Missing and 1 partial ⚠️
...rithm/mapping/RouteRequestToFilterChainMapper.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #6157   +/-   ##
==========================================
  Coverage      69.90%   69.90%           
- Complexity     17709    17710    +1     
==========================================
  Files           1996     1996           
  Lines          75330    75328    -2     
  Branches        7715     7713    -2     
==========================================
- Hits           52660    52659    -1     
+ Misses         19993    19992    -1     
  Partials        2677     2677           

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

Copy link
Contributor

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

Looks good, would be nice to reuse more of the short walk leg criteria.

* Removes walk legs from and to a consolidated stop if they are deemed "short". This means that
* they are from a different element of the consolidated stop.
*/
private void removeWalkLegs(Itinerary itinerary) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename to removeShortWalkLegs, and maybe there is a way to consolidate the various conditions?

@leonardehrenfried
Copy link
Member Author

This is a pure sandbox feature and I will merge it without a second reviewer.

@leonardehrenfried leonardehrenfried merged commit c5a988e into opentripplanner:dev-2.x Oct 15, 2024
5 checks passed
@leonardehrenfried leonardehrenfried deleted the consolidated-stops-fixup branch October 15, 2024 12:51
@t2gran t2gran added this to the 2.7 (next release) milestone Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants