Hi Xavier,

  You can greatly penalize any turn the car profile here:

https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua#L446

  you can see an example returning `constants.max_turn_weight` there.

  Unfortunately, this doesn't actually make left turns impossible, just
very expensive.  If there is no other possible route, a left turn may still
be used.

  In order to fully remove all left turns, the only way would be to augment
your OSM file with artificial turn restriction relations.

  OSRM is actively developed - just look at the recent commit history and
open pull requests to see what is being worked on right now.

daniel

On Mon, Apr 23, 2018 at 5:02 PM, Xavier Prudent <prudentxav...@gmail.com>
wrote:

> Hello Daniel,
>
> Thank you for this fast answer. Is that then possible to forbid left turns?
>
> Our group may then want to implement this uturn restriction, are there
> still active developers on osrm?
>
> Regards,
> Xavier
>
> Le lun. 23 avr. 2018 à 18:27, Daniel Patterson <dan...@mapbox.com> a
> écrit :
>
>> Hi Xavier,
>>
>>   This u-turn penalty only applies to what you might call "direct
>> u-turns" - those that occur on a single line feature, like at the end of a
>> cul-de-sac.
>>
>>   Unfortunately, for u-turns between divided roads, this penalty value
>> isn't applied - OSRM treats those as two consecutive left turns (or right
>> turns, depending on your country).
>>
>>   There's an open ticket about this problem: https://github.com/
>> Project-OSRM/osrm-backend/issues/4368, but nobody has really looked into
>> fixing it yet.
>>
>> daniel
>>
>> On Mon, Apr 23, 2018 at 3:17 PM, Xavier Prudent <prudentxav...@gmail.com>
>> wrote:
>>
>>> Hello,
>>>
>>> I want to forbid u-turns during the routing.
>>> I hence played with the u_turn_penalty parameter in profiles/car.lua
>>>
>>>       u_turn_penalty                 = 20,
>>>
>>> then reconstructed the osrm objects using osrm-extract and osrm-contract.
>>> I tried values 0, 20, 240 and 1000. The routing clearly changed, but I
>>> keep on getting u-turns. For higher parameters I even get more u-turns.
>>>
>>> My understanding was that the higher the parameter, the less u-turn one
>>> should have.
>>>
>>> Did I understand correctly? How can I forbid u-turn then?
>>>
>>> Regards,
>>>
>>> Xavier
>>>
>>> --
>>>
>>> *Xavier Prudent *
>>>
>>> *Data Scientist  - Data Mining - Machine Learning*
>>>
>>> Web    :* www.xavierprudent.com <http://www.xavierprudent.com>*
>>> Tel (Québec)      : (514) 668 76 46
>>> Skype : xavierprudent
>>>
>>>
>>>
>>> _______________________________________________
>>> OSRM-talk mailing list
>>> OSRM-talk@openstreetmap.org
>>> https://lists.openstreetmap.org/listinfo/osrm-talk
>>>
>>>
>> _______________________________________________
>> OSRM-talk mailing list
>> OSRM-talk@openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/osrm-talk
>>
>
> _______________________________________________
> OSRM-talk mailing list
> OSRM-talk@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
>
_______________________________________________
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk

Reply via email to