-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Short way routing - weird unnecessary turns - not enough penalty for turns #21424
Comments
I have seen this behavior more than once with Osmand. It is usually a map problem. I suggest again that the routing algorithm incorporate some common sense to see if the route makes sense. Google maps does not exhibit this behavior, maybe they have better maps? |
My guess is - the straight ahead is 60km/h. |
The bug has been confirmed. Here's how you can consistently reproduce the behavior:
The issue appears to be specifically linked to the "Short way" routing option.
|
That explains why I see this bug so often. I use the shortest way routing so routing will take more interesting roads. |
It looks like not enough penalties for turns in shortway somehow. But there is a penalty for traffic signals 5 seconds |
To be honest, the penalty of 5 seconds for traffic signals is surprisingly low to me. No traffic lights switch every 20 seconds. |
If someone can confirm the no-left-turn restriction (no street-level available and aerial are inconclusive), I will fix the map. |
The very similar old Issue is found: #17641 Technically, we do not consider any penalty for turns in the short_way mode. Ref: GeneralRouter - calculateTurnTime - shortestRoute. Additionally, penalty_transition could help, but in this case, the difference between secondary and secondary_link is zero (15-15 = 0). Ref: routing.xml lines 759-760 (penalty_transition - short_way). It seems that short_way's traffic_signals penalty of 5 seconds is useless in this case and should be set to 0. We're working on the fix and tests. |
You know your product best, but no penalty for traffic lights... + in the app I see that the mode is called "fuel efficient". Standing at traffic lights in not fuel efficient at all. |
@mdykierek, I already saved the OSM data for this intersection for our tests and fixes so that you can safely apply your fixes (fixing traffic_signals direction and "no-left-turn" is a good idea there if it fits the road). The question about penalties in the "fuel efficient" mode (short_way, actually) is open for discussion. If your car is equipped with a start-stop system, a zero penalty for traffic_signals is reasonable. If not equipped... Yeah, we could apply the smaller values of turn penalties, but any penalties for the turns might break the whole idea of searching for the shortest way. Imagine you are a cyclist and want to search for the shortest way, literally. @vshcherb, please share your opinion. Would we try other options and check how the routing tests will be affected? |
Good points. Yet left turns (assuming right side traffic) are always slower and less safe than straight and right. Always involve yield the opposite traffic. I bet there are lots of variables e.g. should paths (non-public) roads follow the same rules, should profile /e.g. bicycle/ affect these rules? For sure I don't know enough to play the smart guy. Keep the good work! |
Routing engine
Routing Profile
Routing profile: Car
Restriction: None?
Enabled:
Start and end points
An example route on openstreetmap.org.
Example route on osmand.net
Any route that goes through that intersection in that direction has the same problem.
Actual route
The actual route turns onto Leitrim Road then turns immediately back onto River Road.
It also shows up on osmand.net with "Short way" enabled
Expected route
The route should go straight through the intersection along River Road as on openstreetmap.org.
Also works properly on osmand.net without "Short way" enabled.
Maps you used (online or offline)
Your Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: