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

Too strict requirements on u-turns #1982

Closed
purew opened this issue Oct 18, 2019 · 0 comments · Fixed by #2018
Closed

Too strict requirements on u-turns #1982

purew opened this issue Oct 18, 2019 · 0 comments · Fixed by #2018
Assignees

Comments

@purew
Copy link
Contributor

purew commented Oct 18, 2019

In the linked route below, Valhalla fails in providing a route due to not adequately allowing for a u-turn on Quay St.
http://valhalla.github.io/demos/routing/index-internal.html#loc=19,51.455433,-2.595520&locations=[{%22lat%22:51.45552952902732,%22lon%22:-2.594244182055263},{%22lat%22:51.455145118493185,%22lon%22:-2.5958588718822284}]&costing=%22auto%22&directionsoptions={%22language%22:%22en-US%22}

Quay St, Bristol UK, converts into an outward flowing one-way street. In order to arrive at the destination, a U-turn is required on Quay st. Valhalla does not do a u-turn since that's only allowed when at a complete dead-end today.

A solution might be to allow for u-turns in more locations by relaxing the requirements in the Allowed/AllowedReverse function in sif/autocost.cc. In the case of the reverse route expansion of Quay st, in reality it actually is a dead-end due to the conversion into a one-way street.

To resolve this, the deadend flag could be expanded to differentiate between outgoing deadend via “is this node able to enter more than one outgoing edge” as well as an incoming reverse_deadend meaning “Is more than one opposing node able to enter this node”.

Another solution would be to calculate the concept of deadend and reverse_deadend at runtime which would allow for a more dynamic notion of what a deadend is. Time of day and routing profile may influence this, for example.

In the case of the Whitelion route failure, a correct reverse_deadend would mean that the reverse expanding A* would detect a deadend and make a u-turn, resulting in a route found.

@purew purew self-assigned this Oct 21, 2019
purew added a commit to purew/valhalla that referenced this issue Nov 7, 2019
This allows for time dependence as well as resolving an issue
where a path only is a deadend in the reverse expansion of
bidirectional_astar.

Fixes valhalla#1982
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants