<div dir="ltr">Hi Xavier,<div><br></div><div>  You can greatly penalize any turn the car profile here:</div><div><br></div><div><a href="https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua#L446">https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua#L446</a><br></div><div><br></div><div>  you can see an example returning `constants.max_turn_weight` there.</div><div><br></div><div>  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.</div><div><br></div><div>  In order to fully remove all left turns, the only way would be to augment your OSM file with artificial turn restriction relations.</div><div><br></div><div>  OSRM is actively developed - just look at the recent commit history and open pull requests to see what is being worked on right now.  </div><div><br></div><div>daniel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 23, 2018 at 5:02 PM, Xavier Prudent <span dir="ltr"><<a href="mailto:prudentxavier@gmail.com" target="_blank">prudentxavier@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Hello Daniel,<div dir="auto"><br><div dir="auto">Thank you for this fast answer. Is that then possible to forbid left turns?</div><div dir="auto"><br></div><div dir="auto">Our group may then want to implement this uturn restriction, are there still active developers on osrm?</div><div dir="auto"><br></div><div dir="auto">Regards,</div><div dir="auto">Xavier</div></div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">Le lun. 23 avr. 2018 à 18:27, Daniel Patterson <<a href="mailto:daniel@mapbox.com" target="_blank">daniel@mapbox.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Xavier,<div><br></div><div>  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.</div><div><br></div><div>  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).</div><div><br></div><div>  There's an open ticket about this problem: <a href="https://github.com/Project-OSRM/osrm-backend/issues/4368" rel="noreferrer" target="_blank">https://github.com/<wbr>Project-OSRM/osrm-backend/<wbr>issues/4368</a>, but nobody has really looked into fixing it yet.</div><div><br></div><div>daniel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 23, 2018 at 3:17 PM, Xavier Prudent <span dir="ltr"><<a href="mailto:prudentxavier@gmail.com" rel="noreferrer" target="_blank">prudentxavier@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I want to forbid u-turns during the routing.</div><div>I hence played with the u_turn_penalty parameter in profiles/car.lua </div><div><br></div><div>




<span></span>





<p class="m_-2179802987849026494m_-1305273273690967780m_1021261193229349479gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo"><span class="m_-2179802987849026494m_-1305273273690967780m_1021261193229349479gmail-Apple-converted-space">      </span>u_turn_penalty <span class="m_-2179802987849026494m_-1305273273690967780m_1021261193229349479gmail-Apple-converted-space">                </span>= 20,</p>


<br clear="all"><div>then reconstructed the osrm objects using osrm-extract and osrm-contract.</div><div>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.</div><div><br></div><div>My understanding was that the higher the parameter, the less u-turn one should have.</div><div><br></div><div>Did I understand correctly? How can I forbid u-turn then?</div><div><br></div><div>Regards,</div><div><br></div><div>Xavier </div><span class="m_-2179802987849026494m_-1305273273690967780HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_-2179802987849026494m_-1305273273690967780m_1021261193229349479gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><i style="font-size:12.8px"><img src="https://docs.google.com/uc?export=download&id=0B36xsKHULjaGdTNKMnJvcjk2bmc&revid=0B36xsKHULjaGY0xTSFJOcHlkOUtNUHVhTGdQSGZtSFhQOFNnPQ" width="96" height="68"></i><br></div><div dir="ltr"><div dir="ltr" style="font-size:12.8px"><i><b>Xavier Prudent </b></i></div><div dir="ltr" style="font-size:12.8px"><i><b><br></b></i></div></div><div dir="ltr"><div><i style="font-size:12.8px">Data Scientist  - Data Mining - Machine Learning</i><br></div><div><i><br></i></div><div>Web    :<i> <a href="http://www.xavierprudent.com" rel="noreferrer" target="_blank">www.xavierprudent.com</a></i></div><div>Tel (Québec)      : (514) 668 76 46</div><div>Skype : xavierprudent</div><div><br><br></div></div></div></div></div></div></div></div></div></div></div></div></div>
</font></span></div></div>
<br>______________________________<wbr>_________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org" rel="noreferrer" target="_blank">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer noreferrer" target="_blank">https://lists.openstreetmap.<wbr>org/listinfo/osrm-talk</a><br>
<br></blockquote></div><br></div>
______________________________<wbr>_________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org" rel="noreferrer" target="_blank">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer noreferrer" target="_blank">https://lists.openstreetmap.<wbr>org/listinfo/osrm-talk</a><br>
</blockquote></div>
</div></div><br>______________________________<wbr>_________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.<wbr>org/listinfo/osrm-talk</a><br>
<br></blockquote></div><br></div>