Hi,
I am trying to write use BGL.dijkstra to calculate a shortest path in a
time dependent network where edge.cost C(u, v) is a function of
distance@edge.source and a variable wait time dependent on Edge.departure
i.e.
Cost(Edge(u,v), D(u)) = Wait(Edge(u, v).departure, D(u)) + Edge(u, v).delay
The cost function ( and edge property is defined as):
struct Eonnection {
Eonnection(const Vertex source, const Vertex destination, const
double departure, const double duration, const double cost) {
this->source = source;
this->destination = destination;
this->departure = departure;
this->duration = duration;
this->cost = cost;
};
Vertex source;
Vertex destination;
double departure; // Time of departure
double duration; // Duration of traversing edge
double cost; // Actual cost of traversing Edge
std::pair
(&Eonnection::dyn_cost, _1, _2, distances, 24 * 3600 * 3), get(boost::edge_bundle, g) ), get(vertex_index, g), smaller, combiner, std::pair
(std::numeric_limits<double>::infinity(), std::numeric_limits<double>::infinity()), std::pair (0, 0), vis );
However, this does not seem to work. How can I pass the weights as a dynamic function to dijkstra_shortest_paths?