[pgrouting-users] TDSP

Hi everyone!

I’m using pgr_kdijkstraPath to find less path from vertex A to vertex D.

Using st_lenght()/(road velocity) to cost/reverse_cost.

Now, I need to use the road velocity at current travel time…

Something like this:


target source lenght velocity velocity_at_07 velocity_at_08 velocity_at_09
A B 70km 65km/h 50km/h 45km/h 60km/h
B C 10km 65km/h 60km/h 55km/h 70km/h
C D 2km 65km/h 60km/h 60km/h 70km/h

How can I use pgr_K/pgr_Dijkstra to get this costs?

Starting at 07am.
A - 07am - 70km - use velocity_at_07 to B
B - ~08am - 10km - use velocity_at_08 to C
C - ~08am - 2km - use velocity_at_08 to D

Omar Fernando Pessôa
Desenvolvedor de sistemas
Programador C# e C++