[pgrouting-users] Working with the functions SHORTEST_PATH

Stephen Woodbridge woodbri at swoodbridge.com
Thu Mar 26 17:44:32 EDT 2009


Paul, this is a very small table, it might help if you pg_dump of the 
tables in plain format and posted them to the list. That way people and 
install them and try it on their systems ans analyze the tables to see 
if they are built correctly based on your explanation.

Thanks,
   -Steve W

pvela at uci.cu wrote:
> 
> 
>  Hello colleagues
>  I am working with the functions SHORTEST_PATH and
>  SHORTEST_PATH_SOOTING_STAR, both are very potent for the work with
>  guided grapho and the definition of restrictions to the circulation.
> 
>  Nevertheless, I am presenting problems with both functions,
>  The following figure, I will use it to illustrate the concrete
>  situation of the case of study that I develop.
>  By way of explanation:
>  1-Red arches, represent roads of double circulation
>  2-Blue arches, represent roads of one way
>  3-The arrows in each arch represent the sense of the digitalization
>  4-The numbers, red, represent the ID of the arch
>  5-The circles and numbers, green, represent the vertexes or nodes.
> 
> 
> 
>  Note: Figure enclose
> 
>  I have created the necessary structure of fields, such as: gid  as
>  ID, source, target, cost, reverse_cost, x1, y1, x2, y2, rule and
>  to_cost.
> 
>  For the arches of double circulation: cost and reverse_cost = longitude 
> arch
>  For those of a single sense: cost = longitude arch and and
>  reverse_cost = longitude arch + 100000.
> 
>  After these elements to put in context the investigation problem, I
>  passed to their concrete explanation.
> 
>  In the case of:
>  SHORTEST_PATH_SOOTING_STAR--- which works with the you GO of the
>  Arches of Exit and Destination, I don't achieve that the function
>  analyzes an arch of double sense (when this it is: source) in sense
>  contrary to their layout (that is to say, of the final vertex to the
>  initial vertex). Always part the beginning analysis to final and
>  starting from there, it builds the road. For example (to see the
>  figure) if I want to go of the Arch 2 at the 1, the solution that I
>  obtain is: 2,5,8,4,3,1 and not 2,1 like it should really be.
> 
>  In the case of:
>  SHORTEST_PATH and also with SHORTEST_PATH_SOOTING_STAR--- it happens
>  me something that has me confused, and I don't know how to solve,
>  although it already identifies their manifestation.  For example, when
>  the function analyzes an arch that is connected to other two, in
>  common through a vertex, and each one of these it is of a circulation
>  sense (to see figure; example: 4, 8 and 9), in the resulting solution
>  I obtain the first arch that the algorithm resourceful analyzes, this
>  is in function of the ordination approach applied to the consultation
>  to the chart of arches. He/she always leaves with the first arch that
>  finds, not respecting in approach of inverse cost, which is up to a
>  million units of measure superior.
> 
>  I hope to be able to transmit them clearly the problem that I confront
>  with these functions and that if some of you, has faced something
>  similar I can throw a hand with this.
> 
>  Greetings to all, and I look forward to their answer
> 
> Paul
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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