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

Christophe Damour sigeal at sigeal.com
Sat Mar 8 09:35:40 PST 2014


Steven,

Thank you very much again for your time !
Setting cost to -1 indeed solved the problem, the query returning "Path 
not found" as I expected.
I just wasn't aware of that option.

You and other devs do a really great work on pgRouting.
I appreciate and wish I can help in anyway.

-- 
Christophe DAMOUR


Le 08/03/2014 17:38, Stephen Woodbridge a écrit :
> 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.
>>
>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev



More information about the pgrouting-dev mailing list