[pgrouting-users] Different comportment between 'shortest_path_astar' and 'driving_distance' functions.

Schembri Samuel Samuel.Schembri at mediapost.fr
Mon Jan 16 03:14:38 EST 2012


Hi,

I am new user of this pgrouting users list. I hope used correctly.

I used pgrouting 1.02 on postgres 8.2.17. At this time, I can't update Postgresql.

There is a different comportment between 'shortest_path_astar' and 'driving_distance' functions when I use reverse_cost column.

Here are graphe conditions :


  *   For each edge without one-way : cost=reverse_cost=length
  *   For each edge with one-way similar to digitalisation way : cost=length reverse_cost=-1 (or 100000)
  *   For each edge with one-way inverse of digitalisation way : cost=-1  (or 100000) reverse_cost=length
  *   All another edges are not in graphe.


shortest_path_astar:

has_reverse_cost = false :
Edges with 'cost=-1' are forbiden and Pgrouting don't used them. 'Reverse_cost' information is not used.

has_reverse_cost = true:
Edges with 'cost=-1' are used if 'reserve_cost' is more than 0. Cost used by pgrouting is 'reserve_cost' column.
Edges with 'reverse_cost=-1' are used if 'cost' is more than 0. Cost used by pgrouting is 'cost' column.

This computing is correct.

Driving_distance:

has_reverse_cost = false :
Edges with 'cost=-1' are forbiden and Pgrouting don't used them. 'Reverse_cost' information is not used.

has_reverse_cost = true :
Case one : Edge with 'cost=-1'  and 'reverse_cost=length':
Edge can be traveled on digitalisation way ( cost =-1!!). Cost used by pgrouting is 'Reverse_cost' column.

Case two : Edge with cost=length  and reverse_cost=-1:
Edge can be traveled on inverse digitalisation way. More,  Cost used by pgrouting is 'cost' column.

In this two case, pgrouting don't respect restrictions. This computing is not correct.


Could you me if this result is normal or not ?

Sorry for my bad english and best regards


Samuel -- Paris



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20120116/6bbec818/attachment.html


More information about the Pgrouting-users mailing list