osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

appart from #100 u-turns should be avoided by (big) penalty

Open DrVanScott opened this issue 14 years ago • 5 comments

I agree that using u-turns is good for pedestrian or bikers (and maybe cars) - if the u-turn is exactly on a via point. This is what #100 refers to.

Currently there is a problem that affects cars and bikers. Suppose following situation (without via point):

      g
      |
- a - b - c - d - e -
          |
          f

There is a restriction at b: Coming from a it is not allowed to turn left to g. In addition g and f are dead ends. If you route from a to g osrm is currently suggesting a route a - b - c - f - c - b - g. Is this intentional or a bug? In real life this is a bad idea. It would be better to go on trying to find a loop, even if it looks like an penalty. So i vote for an u-turn penalty.

DrVanScott avatar Feb 04 '12 00:02 DrVanScott

what route do you think it should follow? if you can't turn left at b into g, would you say a,b,c,b,g? i agree that even though it's perhaps not pretty, it's better that going into a dead-end to do the u-turn you can't avoid.

emiltin avatar Feb 04 '12 10:02 emiltin

This route a - b - c - f - c - b - g is expected behavior. What one could do is to add an additional penalty at the ends of dead-end streets to make it find a cycle. Nevertheless, I am flagging this as duplicate to issue #100. Discussion is welcome of course.

DennisOSRM avatar Feb 04 '12 14:02 DennisOSRM

@emiltin: a,b,c,b,g would just be another u-turn. I would prefer a route which uses a cycle, which indeed would only be possible in the above example, if there were additional ways behind 'e'. U-turns should be the last choice.

This problem comes to my mind after osrm recommends a u turn in a dead end which i do know. Well, i would never go by car in that damn small dead end... Bad luck for those who don't know about that street. A u turn is just impossible there ;-)

@Dennis: Yes, a penality would be a very good solution as it would be freely configurable. I would love to see this beeing part of milestone 0.3.

DrVanScott avatar Feb 04 '12 21:02 DrVanScott

I'll add it to the ever growing todo list.

DennisOSRM avatar Feb 05 '12 10:02 DennisOSRM

Hey! I'm working on a heavy vehicle routing system using OSRM. It has proven very useful but the issue mentioned by @DrVanScott is kinda annoying, has there been any work done on this? Using the car.lua file as the profile, I noticed there is a "u_turn_penalty" variable but changing it doesn't seem to have an effect. Am I missing something? Thanks in advance.

JMGGarcia avatar Dec 15 '15 15:12 JMGGarcia