[pgrouting-users] TRSP

Stephen Woodbridge woodbri at swoodbridge.com
Wed Jun 27 08:37:26 PDT 2012


On 6/27/2012 10:19 AM, Steve Horn wrote:
> Hey Stephen,
> I am working with the TRSP code. Instead of returning an error when the
> path cannot be found, I was wondering how difficult it would be to
> change the function to return no path result instead?


I think you might be able to just just comment out the if block at 
trsp.c:536-541

This is where the error is thrown from. With that commented out then the 
code should just return without an error. You will not know why it 
failed, because no error message will be throw. I suppose you could 
throw a NOTICE instead of an error with something like:

elog(NOTICE, "Error computing path: %s", err_msg);

You will notice that the block already has a commented out

  //elog(ERROR, "Error computing path: %s", err_msg);

Try uncommenting that nad change the ERROR to NOTICE and then comment 
out the ereport(...); section.
Let us know how that works.

-Steve W


More information about the Pgrouting-users mailing list