Closed gmellemstrand closed 2 years ago
I also noticed these walk/bike turn cost computations in my work with adding eScooter routing. I think they are kind of odd in how simplistic they are. I started some work on refactoring turn cost calculations here: https://github.com/ibi-group/OpenTripPlanner/commit/e25df6d8a435c0e0559bac88e1be182ee5ce8b63. My motivations for refactoring that was that I was seeing car and eScooter trips avoid one-way streets which I think is due to having a lot of straight-turn penalties due to a high number pseudo-intersections with crosswalks, driveways, etc.
However, a lot of these turn cost penalties are all non-scientific and it'd be nice to have a more rigorous empirical study to model the turn costs off of.
I have retested this, and it work now.
NOTE: this issue system is intended for reporting bugs and tracking progress in software development. For all other usage and software development questions or discussion, please write to one of the mailing lists (Google groups): https://groups.google.com/forum/#!forum/opentripplanner-dev https://groups.google.com/forum/#!forum/opentripplanner-users
Expected behavior
The walking distance should be the same regardless of speed.
Observed behavior
The walking distance changes depending on the walk speed input. The distances of the legs themselves remain the same.
Version of OTP used (exact commit hash or JAR name)
Latest OTP1 or OTP2.
Data sets in use (links to GTFS and OSM PBF files)
Command line used to start OTP
Router config and graph build config JSON
Steps to reproduce the problem
Do a walk only travel search and compare the distance and walking distance. Then change the walking speed and do the same search again. The walking distance should have changed.
It seems that this is caused by the walk distance being increased by the realTurnCost:
https://github.com/opentripplanner/OpenTripPlanner/blob/dev-1.x/src/main/java/org/opentripplanner/routing/edgetype/StreetEdge.java#L453
Which is in turn dependent on the walk speed:
https://github.com/opentripplanner/OpenTripPlanner/blob/dev-1.x/src/main/java/org/opentripplanner/routing/core/AbstractIntersectionTraversalCostModel.java#L50
There is a comment about the walk distance increase being just a tie-breaker. Why is it necessary to break a tie here?