[pgrouting-dev] [pgrouting-users] TRSP Problem

Stephen Woodbridge woodbri at swoodbridge.com
Sat Mar 8 08:38:22 PST 2014


On 3/8/2014 2:06 AM, Christophe Damour wrote:
> Hi Steven,
>
> Thank you for answering.
>
> I double checked the topology and it looks ok.
>
> By the way, when you say "the only way to follow the route is to go the
> wrong way down a one-way street" :
> Do you mean that this is the expected behaviour ?

The code is in somewhat of a transition in this regard. Historically we 
could not set the cost to -1 (meaning not allowed) so users set the cost 
(or reverse cost) to a large number.

I have been up dating the code as I I fix things so that it accepts 
negative values and eliminates that edge from the graph so it will fail 
if not route is found.

I thought TRSP already did this. so look at your data and make sure you 
are not setting and costs to large values.

> I expected an error or an exception saying : "Path Not Found" in such a
> case.
> Is there a workaround for that situation or should I handle it with a
> post-query process ?

You can try to set the cost to -1 instead of a large value to eliminate 
that directed edge. It should work most places but you might run into 
some algorithms that do not support that and should write a bug if you 
find one.

Thanks,
   -Steve

> Thank you again for your time.
>



More information about the pgrouting-dev mailing list