[pgrouting-users] pgr_trsp - applying restrictions with no consideration to their cost
Stephen Woodbridge
woodbri at swoodbridge.com
Sat Nov 14 07:54:26 PST 2015
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
More information about the Pgrouting-users
mailing list