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
Unusual routing decision #4754
Comments
|
Here's the router's response for the first request: {
"weight": 912.2,
"duration": 178.5,
"distance": 275.5
}And here is the response for the second query {
"weight": 886.3,
"duration": 638.2,
"distance": 6862.3
}For some reason the route's weight we optimize for is smaller for the second route, even though duration and distance are higher. I quickly skimmed the data but couldn't find anything suspicious. Traffic signals change duration here: osrm-backend/src/extractor/edge_based_graph_factory.cpp Lines 578 to 597 in 84b6ef4
Lines 426 to 428 in 84b6ef4
|
|
Nah, this didn't make any sense. The higher duration is mainly caused by a longer route. However even though the second case avoids this particular traffic light it has to pass another one at https://www.openstreetmap.org/?mlat=50.85119&mlon=-1.15675#map=18/50.85119/-1.15675 Still it results in a lowered weight. |
|
I found the origin of this problem that is the result of an invalidly applied U-Turn penalty. This is amplified by the fact that the demo sever uses 60 seconds for the U-Turn penalty, as opposed to 20 seconds like the stock profile. A fix for this is in #4755 and will be shipped with the next bug fix release. |
|
Fixed in v5.14.3 |
Changes from 5.14.2:
Bugfixes:
FIXED Project-OSRM#4754: U-Turn penalties are applied to straight turns.
FIXED Project-OSRM#4756: Removed too restrictive road name check in the sliproad handler
FIXED Project-OSRM#4731: Use correct weights for edge-based graph duplicated via nodes.
Profile:
CHANGED: added Belarus speed limits
CHANGED: set default urban speed in Ukraine to 50kmh
Issue forwarded from https://help.openstreetmap.org/questions/61189/unusual-routing-decision
Expected behavior:

https://www.openstreetmap.org/directions?engine=osrm_car&route=50.85216%2C-1.16498%3B50.85311%2C-1.16852#map=18/50.85265/-1.16674
Unexpected behavior:

https://www.openstreetmap.org/directions?engine=osrm_car&route=50.85217%2C-1.16484%3B50.85311%2C-1.16852#map=18/50.85265/-1.16674
The starting position in the second case is only slightly altered and includes an additional traffic signal. It leads however to a completely different route which is 6.9km long (time: 0:11) instead of only 276m (time: 0:03).
Other routing engines (GraphHopper, Mapzen) don't show this behavior.
The map data seems to be fine. Routing across the traffic signal is not an option and works perfectly:

https://www.openstreetmap.org/directions?engine=osrm_car&route=50.85217%2C-1.16484%3B50.85232%2C-1.16560#map=18/50.85265/-1.16674
The text was updated successfully, but these errors were encountered: