[pgrouting-users] pgr_trsp - applying restrictions with no consideration to their cost

Vicky Vergara vicky_vergara at hotmail.com
Sat Nov 14 08:55:04 PST 2015


There is a wiki about this kind of problem here:

https://github.com/pgRouting/pgrouting/wiki/TRSP-for-railroads

but I think it has some issues:
https://github.com/pgRouting/pgrouting/issues/286
https://github.com/pgRouting/pgrouting/issues/288

One of them is because contradictory input (or maybe both)
I have comments about it there.

I suggest you read all three links (maybe try the simple example).
and instead of negatives give a big number as cost.

Vicky

> To: pgrouting-users at lists.osgeo.org
> From: woodbri at swoodbridge.com
> Date: Sat, 14 Nov 2015 10:54:26 -0500
> Subject: Re: [pgrouting-users] pgr_trsp - applying restrictions with no consideration to their cost
> 
> On 11/13/2015 6:00 AM, Pedro wrote:
> > Hi there,
> >
> >   I'm trying to solve a common problem which is railway routing, thus
> > enforcing some turn restrictions that may never happen in a
> > pedestrian/car network.
> >
> > Trains cannot do sharp turns, so what I have now is a list of source and
> > target edges that i dont want to occur on my shortest path. The problem
> > is that the way pgr_trsp works right now with weighted restrictions is
> > not good for me because those turns cannot happen, not based on their
> > weights but by the simple fact that it is impossible for a train to
> > maneuver like that under normal conditions and speed.
> >
> > My question is, is there the possibility of ignoring the weight and just
> > to check if the turn is allowed or not ? Am I missing something on the
> > documentation that specifies that ? Setting the weight to some specific
> > vale perhaps ?
> 
> I'm not sure if that is implemented. Try setting the cost to -1 and see 
> if that works.
> 
> Otherwise all you can do is set the cost to a really high number which 
> will force it to find a lower cost alternative route. Then you will need 
> to check the results and if the high cost turn was included then you 
> need to realize that the requested route is not possible without taking 
> an impossible turn, so treat that as no route was found.
> 
> -Steve
> 
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20151114/ee62e89a/attachment.html>


More information about the Pgrouting-users mailing list