Skip to content

Constant speed street routing - #5057

Merged
vesameskanen merged 5 commits into
opentripplanner:dev-2.xfrom
HSLdevcom:constantspeedstreets
Apr 26, 2023
Merged

Constant speed street routing#5057
vesameskanen merged 5 commits into
opentripplanner:dev-2.xfrom
HSLdevcom:constantspeedstreets

Conversation

@vesameskanen

Copy link
Copy Markdown
Contributor

Summary

Some minor changes in OSM tag mapping and intersection traversal modules to allow street routing, which finds shortest paths instead of optimising traversal time. This is achieved as follows:

  • Car speed is requested via a tag mapper, so that full customisation is possible
  • New OSM tag mapper ignores speed limitation tagging of OSM and uses a single default speed
  • The existing ConstantIntersectionTraversalCalculator is now available via configuration

Unit tests

Unit tests for the new OSM tag mapper included.

@vesameskanen
vesameskanen requested a review from a team as a code owner April 19, 2023 10:50
@vesameskanen vesameskanen added the !New Feature A functional feature targeting the end user. label Apr 19, 2023
@codecov

codecov Bot commented Apr 19, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 40.90% and project coverage change: +0.13 🎉

Comparison is base (2f3b103) 64.35% compared to head (ba61472) 64.48%.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5057      +/-   ##
=============================================
+ Coverage      64.35%   64.48%   +0.13%     
- Complexity     13786    13866      +80     
=============================================
  Files           1689     1711      +22     
  Lines          66804    67037     +233     
  Branches        7200     7203       +3     
=============================================
+ Hits           42989    43228     +239     
+ Misses         21409    21388      -21     
- Partials        2406     2421      +15     
Impacted Files Coverage Δ
...section_model/IntersectionTraversalCalculator.java 40.00% <0.00%> (-10.00%) ⬇️
.../openstreetmap/tagmapping/ConstantSpeedMapper.java 26.66% <26.66%> (ø)
...r/openstreetmap/tagmapping/OsmTagMapperSource.java 55.00% <66.66%> (-0.56%) ⬇️
.../graph_builder/module/osm/OpenStreetMapModule.java 90.39% <100.00%> (ø)
...planner/openstreetmap/tagmapping/OsmTagMapper.java 100.00% <100.00%> (ø)
...intersection_model/IntersectionTraversalModel.java 100.00% <100.00%> (ø)

... and 76 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.

@hannesj

hannesj commented Apr 19, 2023

Copy link
Copy Markdown
Contributor

this is already implemented by selecting a different dominance function (See https://github.com/search?q=repo%3Aopentripplanner%2FOpenTripPlanner%20setDominanceFunction&type=code)

@vesameskanen

vesameskanen commented Apr 19, 2023

Copy link
Copy Markdown
Contributor Author

So we need a way to enable LeastWalk dominance for all street routing, right? A new parameter for routing request ?

@t2gran t2gran added this to the 2.4 milestone Apr 24, 2023
@vesameskanen

Copy link
Copy Markdown
Contributor Author

I tried hardcoding use of LeastWalk dominance function in GraphPathFinder.java and StreetSearchBuilder.java, but car routing still selects fastest route.

@leonardehrenfried

Copy link
Copy Markdown
Member

@hannesj I think it's because the walk distance is not increased for driving which this feature is for.

@leonardehrenfried leonardehrenfried left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As I said in the meeting, I think that @vesameskanen is aware of the shortcomings of this approach and that it's not suitable for a generic travel planner (which HSL is not planning on) therefore I'm approving this.

@vesameskanen
vesameskanen merged commit c3e0725 into opentripplanner:dev-2.x Apr 26, 2023
@vesameskanen
vesameskanen deleted the constantspeedstreets branch April 26, 2023 12:32
t2gran pushed a commit that referenced this pull request Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!New Feature A functional feature targeting the end user.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants