[pgrouting-users] Multiple Turn Restrictions?
Anton Patrushev
anton at orkney.co.jp
Mon Aug 18 21:14:14 EDT 2008
You just need to add one more row for that edge.
Like this:
gid | source | target | cost | x1 | y1 | x2 | y2 | to_cost | rule
-----+--------+--------+------+----+----+----+----+---------+------
11 | 3 | 10 | 2 | 4 | 3 | 4 | 5 | 1000 | 4
11 | 3 | 10 | 2 | 4 | 3 | 4 | 5 | 1000 | 12
And then you always need to order your data by gid when you load it to
a shortest path function..
Anton.
On Mon, Aug 18, 2008 at 11:06 PM, Stephen Woodbridge
<woodbri at swoodbridge.com> wrote:
> Anton,
>
> Ok, that makes sense, but I still do not see how to specify multiple
> restrictions for a single edge. For example in the graph below how to I
> specify the cost of going from either edge EB(4) or CB(12) to edge DB(11) is
> 1000. Both of these turns should be disallowed.
>
> -Steve
>
> PS: Sorry looks like the list is still broken regardless of what email I
> send it to.
>
>
> Anton Patrushev wrote:
>>
>> Steve,
>>
>> Here is the table for your case:
>>
>> Edge | Source | Target | Cost | to_cost | rule
>> AB | A | B | 1 | 1000 | EB
>> BC | B | C | 1 | 1000 | DB
>> EB | E | B | 2 | 1000 | BC
>>
>> and nothing more.
>>
>>> gid | source | target | cost | x1 | y1 | x2 | y2 | to_cost | rule
>>> -----+--------+--------+------+----+----+----+----+---------+------
>>> 12 | 3 | 10 | 2 | 4 | 3 | 4 | 5 | 1000 | 14, 4
>>
>> This means completely different things.
>> For example, you have a graph like this:
>>
>> C
>> |
>> |
>> A-------B--------E--------F
>> | |
>> | |
>> D |
>> G
>>
>> where edge ids are:
>> AB: 10
>> BC: 12
>> BD: 11
>> BE: 4
>> EF: 2
>> EG: 14
>>
>> So, the restriction we have describes a way 14->4->12 (G->E->B->C)
>> which is restricted (has cost 1000).
>>
>> Anton.
>> _______________________________________________
>> Pgrouting-users mailing list
>> Pgrouting-users at lists.postlbs.org
>> http://lists.postlbs.org/mailman/listinfo/pgrouting-users
>
>
More information about the Pgrouting-users
mailing list