Right now I am using PgRouting for vehicle routing and I have problem with Dijkstra shortest path. My query is:
SELECT * FROM shortest_path('SELECT gid AS id,
source::int4 AS source,
target::int4 AS target,
cost::float8 AS cost,
reverse_cost::float8 AS reverse_cost
from network ',
257027,
276521,
true,
true)
But, my table network is very large, so I should use "dijkstra_sp_delta_directed" wrapper function with bounding box to make query faster.
Select gid from dijkstra_sp_delta_directed('network', 5700, 6733, 0.1,true,true);
But I don't know how to write some where clause like "from network where road_class=1"
Also, I don't know where and how to write (road_class * cost)::float8 AS cost
Thank you in advance.