[pgrouting-dev] Re: Implementation of core Time Dependent Dijkstra function

Stephen Woodbridge woodbri at swoodbridge.com
Fri May 13 10:01:50 EDT 2011


On 5/13/2011 2:03 AM, Jay Mahadeokar wrote:
>
>
> On Thu, May 12, 2011 at 8:08 PM, Stephen Woodbridge
> <woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.com>> wrote:
>
>         *Few thoughts regarding implementation:*
>
>         Most important detail which needs to be finalised is the
>         implementation
>         of dynamic weight map.
>
>         1. Now, since the weight is function of time, the weight map is
>         now like:
>
>         Key: (Edge , Time)  - Since edge and time will form a unique key.
>         Value: weight
>
>         Is this interpretation reasonable?
>
>
>
>     This seems reasonable. The only extension to this that would be
>     valuable would to add a "class" to the key to allow filtering by
>     traveler class. So something like Key: (Class, Edge, Time) where the
>     default class is "Any". Hmmm, on second thought, it might be a
>     better abstraction to use the Boost Filtered Graph to do this and
>     keep your code simple because it is working in a tighter loop.
>
>
> Can you please explain what exactly do you mean by traveler class? Is it
> like - bus, 2-wheeler etc (they might have different costs at same time) .
>
> I am assuming that user will query only those entries(Edge,Time) that
> are useful. So, if he is querying for 2-wheeler, he should specify that
> in query, so that only entries related to that class are passed to boost
> graph and rest are filtered out  already.

Yes, you are correct, this is the appropriate way to do this. Sorry for 
the confusion.

-Steve


More information about the pgrouting-dev mailing list