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
uturn incorrectly detected and penalized #4635
Comments
Hm I’d say it mad the wrong uturn, but it very much seems a uturn would be needed right? Albeit a much “earlier” one as you pointed out. Not sure why that isn’t happening. |
@nilsnolde Thanks for your response. I've debugged the code and got the cost of each 'uturn'. Valhalla doesn't treat way 964184744 as an uturn actually, because the length of it is larger than 8m I think. That's why it turns at 964184744, the furthest one. |
yeah detecting what is and isn't a utrun is trickier than you think. we have another open issue about this in which I made a suggestion for fixing this using updates to the edge label in the issue you linked #3886 (comment) |
@kevinkreiser Yes, yes, I understand it's a tough challenge, and I know we can't fix all bad cases. Appreciate your great work and your response, let me figure out whether we can do some work to help this issue. |
How about we set |
Hi, I'm a freshman of Valhalla, I found a case below and am looking for your kind help:
request parameter:
car (auto)
Ideally link:
https://valhalla.openstreetmap.de/directions?profile=car&wps=100.65868142013117%2C13.759098685948903%2C100.66893643970043%2C13.75446497964344
description:
Similar to #3886, Valhalla made a wrong route of car mode according to the u-turn detection and penalty.
Three short ways (964183843, 964183844, 964184744) can make a turn heading to the destination, and all properties of them are the same, except the length. Valhalla detects 964183843 and 964183844 u-turns and adds a cost of 600 to them. This penalty makes 964184744 the best candidate and it looks weird.
My question is: Is there a way to prevent cases like that or improve it?
PS, I notice that the
kShortInternalLength
is 8m and thedestination_only_penalty_
is 600 default, may I know why?Official result:
Wished result:
The text was updated successfully, but these errors were encountered: