Boost logo

Boost Users :

Subject: [Boost-users] [graph] Implementing turn restrictions
From: Stephen Woodbridge (woodbri_at_[hidden])
Date: 2011-11-03 23:54:20


Hi all,

I need to solve Dijkstra shortest path with turn restrictions. I am
wondering if anyone has an example of how to implement this?

I'm thinking that this can be done something like this:

1. a restriction(s) could be represented as: at a given node X if my
ancestry is some list of of nodes, then restrict going forward to a node
or list of nodes.

2. any given node can optionally have a list of restrictions attached to it

3. a visitor function would then get the list of restrictions for the
visited node and compare ancestor list of each restriction to the
current path ancestry and then filter forward nodes if there is an
ancestry match(s).

Does this sound like a reasonable approach?
Does anyone have an example of this or something similar?
Any thoughts on how to efficiently implement matching the path to the
restriction lists?

Many thanks,
   -Steve


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net