Hi Steve and Francesco,<div><br></div><div>The way Shooting Star cares about turn restrictions is through rules and an example how this works you can find here:</div><div><a href="http://pgrouting.postlbs.org/wiki/ShootingStar#Example">http://pgrouting.postlbs.org/wiki/ShootingStar#Example</a></div>

<div><br></div><div>Anton for sure can give a better answer than me, but what you have to do when more than one restriction applies, is to duplicate road links but keep their link ID same. The algorithm will check all links with same ID and take into account the rules there.</div>

<div><br></div><div>Whether this is the best way for turn restrictions or not, well, that&#39;s what the developer list is a good place to discuss. So thank you fors posting it here!</div><div><br></div><div>Greetings to Coolombia,</div>

<div>Daniel</div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br>
</span></div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br></span></div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br>
</span></div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br></span></div>-- <br>Georepublic UG &amp; Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66, 99, 171)" target="_blank">daniel.kastl@georepublic.de</a><br>


Web: <a href="http://georepublic.de" style="color:rgb(66, 99, 171)" target="_blank">http://georepublic.de</a><br><br></span>
<br></div><div><br><br><div class="gmail_quote">2010/7/10 Stephen Woodbridge <span dir="ltr">&lt;<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Francisco,<br>
<br>
I am forwarding your request about turn restrictions to the pgRouting lists. I do not have any more information on this. I think the way the discussion was left, that we needed more development in that area of turn restrictions, but have not found the time or funding to prioritize this effort.<br>


<br>
Anton, Daniel,<br>
<br>
Do we have any examples that demonstrate how to properly add multiple turn restrictions to a network?<br>
<br>
I have thought about this in the past and I think what is needed is something like the following, but it is not available yet.<br>
<br>
1. a new table of turn restrictions like: (node or segment based)<br>
   current node<br>
   list of come from nodes<br>
   list of node that are restricted<br>
<br>
This same design could be applied to either node based solutions or edge based solutions.<br>
<br>
2. then in the routing code we mark the nodes that have restrictions on them maybe using a pointer to the restriction structure or null if no restriction and apply them at that node.<br>
<br>
- current node is the node where the restriction needs to be applied<br>
- list of come from nodes is the path history that is relevant for this restriction<br>
- list of nodes that are connected but restricted for this path history<br>
<br>
    a   b<br>
    |   |<br>
    v   |<br>
c---d---e---f<br>
    |   ^<br>
    |   |<br>
    g   h<br>
<br>
<br>
for example here is a local road c-d-e-f crossing a dual lane highway with no u-turn allow for the highway traffic<br>
<br>
allowed travel would be:<br>
<br>
c-d-e-f and f-e-d-c<br>
f-e-b<br>
c-d-g<br>
a-d-c<br>
h-e-f<br>
<br>
restrictions would be:<br>
<br>
d-a      - wrong way<br>
e-h      - wrong way<br>
a-d-e-b  - u-turn<br>
h-e-d-g  - u-turn<br>
<br>
in the table format<br>
d|*|a     at node d all traffic is restricted to a<br>
e|*|h     at node e all traffic is restricted to h<br>
e|d,a|b   at node e if parent node is d, and grandparent node is a,<br>
          restrict traffic to b<br>
d|e,h|g   at node d if parent node is e and grand parent node is h,<br>
          restrict traffic to g<br>
<br>
I think this can be evaluated easily in boost using there visitor concept to do the evaluation and lookup of restrictions. The key to making this fast is that there is little or no cost when there is no restrictions.<br>


<br>
Best regards,<br>
-Steve<br>
<br>
Francisco Garcia Rincon wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello, My name is Francisco, I am from Colombia. First I want to apologize for contact you by this way but I find your email address in a discuss thread in pgrouting-users. I write you because I am trying to implement pgrouting using more than one restriction for a specific  edge. I read in your post 2 years ago, (A long time..) is just necessary to add one more row for the edge and order by gid. I looks really easy but it does not working. I find your thread and think that maybe you have the answer for this issue.<br>


<br>
Thanks for all your attention.<br>
<br>
Best regards,<br>
<br>
<br>
PS:<br>
<br>
I am using pgrouting 1.03, Postgres 8.4, linux Red Hat.<br>
<br>
*Francisco Garcia Rincon*<br>
*Director de Proyectos - Lider de GIS*<br>
*Cel: (057) 3163310936*<br>
*Tel: (0571)6109234*<br>
*DataTraffic SAS*<br>
*Cll 90 11-44 Off: 506*<br>
*<a href="http://www.datatraffic.com.co" target="_blank">www.datatraffic.com.co</a> &lt;<a href="http://www.datatraffic.com.co" target="_blank">http://www.datatraffic.com.co</a>&gt;*<br>
<br>
<br>
/-- BORRAR CACHE HACE QUE TODA APLICACION EN JAVASCRIPT FUNCIONE BN/<br>
<br>
</blockquote>
<br>
_______________________________________________<br>
pgrouting-dev mailing list<br>
<a href="mailto:pgrouting-dev@lists.osgeo.org" target="_blank">pgrouting-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a><br>
</blockquote></div><br></div>