[pgrouting-users] pgrouting2 and turn restrictions

Hi,

I have a small question.

Most of the algos do not take turn restrictions into account.

If wanted to use for example pgr_ksp (k-shortest path) for example, then that algo will not take turn restrictions into account.

The only way i could think about making the algo’s work, is to rewire the graph table, so that nodes with turn restrictions, will be removed and instead adding longer edges instead to cover all the travel options. (for each edge, that contains the node in question, append and rewire, its a bit complicated but you should get the idea from my very limited description)

My question is, is there such a tool which extends the graph table as produced by either osm2po or osm2pgrouting for turn restrictions?

Is there a different solution i am missing?

Thanks for your help!

On 10/22/2013 4:50 AM, Yaron Lev wrote:

Hi,

I have a small question.

Most of the algos do not take turn restrictions into account.

Yes this is correct. Only the TRSP code handles turn restrictions.

If wanted to use for example pgr_ksp (k-shortest path) for example, then
that algo will not take turn restrictions into account.

It might be feasible to implement the KSP algorithm on top of TRSP.
https://github.com/pgRouting/pgrouting/issues/206
If you are interested in developing something and submitting a pull request or funding this it would be a great contribution. Or if you have funding, we can look at getting getting something developed.

The only way i could think about making the algo's work, is to rewire
the graph table, so that nodes with turn restrictions, will be removed
and instead adding longer edges instead to cover all the travel options.
(for each edge, that contains the node in question, append and rewire,
its a bit complicated but you should get the idea from my very limited
description)

Yes, when I researched ways to solve turn restriction, I did find articles about how it is possible to reconstruct a graph around turn restrictions by removing and adding edges to make a "regular" graph that would generate the equivalent of the turn restricted routes. But it seemed very complicated.

My question is, is there such a tool which extends the graph table as
produced by either osm2po or osm2pgrouting for turn restrictions?

Not that I know of. I think the OSM routing engine does support turn restrictions, but it is not part of pgRouting.

Is there a different solution i am missing?

Sorry not that I know of. This is a good suggestion.

Regards,
   -Steve

Thanks for your help!

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

thanks, that was helpful as always

i will try to share the code to “fix” the graph, should i have enough time to implement this.

thanks.

···

On Fri, Oct 25, 2013 at 5:26 PM, Stephen Woodbridge <woodbri@swoodbridge.com> wrote:

On 10/22/2013 4:50 AM, Yaron Lev wrote:

Hi,

I have a small question.

Most of the algos do not take turn restrictions into account.

Yes this is correct. Only the TRSP code handles turn restrictions.

If wanted to use for example pgr_ksp (k-shortest path) for example, then
that algo will not take turn restrictions into account.

It might be feasible to implement the KSP algorithm on top of TRSP.
https://github.com/pgRouting/pgrouting/issues/206
If you are interested in developing something and submitting a pull request or funding this it would be a great contribution. Or if you have funding, we can look at getting getting something developed.

The only way i could think about making the algo’s work, is to rewire
the graph table, so that nodes with turn restrictions, will be removed
and instead adding longer edges instead to cover all the travel options.
(for each edge, that contains the node in question, append and rewire,
its a bit complicated but you should get the idea from my very limited
description)

Yes, when I researched ways to solve turn restriction, I did find articles about how it is possible to reconstruct a graph around turn restrictions by removing and adding edges to make a “regular” graph that would generate the equivalent of the turn restricted routes. But it seemed very complicated.

My question is, is there such a tool which extends the graph table as
produced by either osm2po or osm2pgrouting for turn restrictions?

Not that I know of. I think the OSM routing engine does support turn restrictions, but it is not part of pgRouting.

Is there a different solution i am missing?

Sorry not that I know of. This is a good suggestion.

Regards,
-Steve

Thanks for your help!


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users


Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users