[pgrouting-dev] Re: Grettings from colombia
Stephen Woodbridge
woodbri at swoodbridge.com
Fri Jul 9 23:36:26 EDT 2010
Hi Francisco,
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.
Anton, Daniel,
Do we have any examples that demonstrate how to properly add multiple
turn restrictions to a network?
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.
1. a new table of turn restrictions like: (node or segment based)
current node
list of come from nodes
list of node that are restricted
This same design could be applied to either node based solutions or edge
based solutions.
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.
- current node is the node where the restriction needs to be applied
- list of come from nodes is the path history that is relevant for this
restriction
- list of nodes that are connected but restricted for this path history
a b
| |
v |
c---d---e---f
| ^
| |
g h
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
allowed travel would be:
c-d-e-f and f-e-d-c
f-e-b
c-d-g
a-d-c
h-e-f
restrictions would be:
d-a - wrong way
e-h - wrong way
a-d-e-b - u-turn
h-e-d-g - u-turn
in the table format
d|*|a at node d all traffic is restricted to a
e|*|h at node e all traffic is restricted to h
e|d,a|b at node e if parent node is d, and grandparent node is a,
restrict traffic to b
d|e,h|g at node d if parent node is e and grand parent node is h,
restrict traffic to g
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.
Best regards,
-Steve
Francisco Garcia Rincon wrote:
> 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.
>
> Thanks for all your attention.
>
> Best regards,
>
>
> PS:
>
> I am using pgrouting 1.03, Postgres 8.4, linux Red Hat.
>
> *Francisco Garcia Rincon*
> *Director de Proyectos - Lider de GIS*
> *Cel: (057) 3163310936*
> *Tel: (0571)6109234*
> *DataTraffic SAS*
> *Cll 90 11-44 Off: 506*
> *www.datatraffic.com.co <http://www.datatraffic.com.co>*
>
>
> /-- BORRAR CACHE HACE QUE TODA APLICACION EN JAVASCRIPT FUNCIONE BN/
>
More information about the pgrouting-dev
mailing list