
Hi, I'm trying to write a program which considers some
"agents" traversing a graph following dijkstra, from some
source vertex to some destination. Each agent will have a
different weightmap for the network. Therefore, I need a
routine to which I pass the source & destination vertices,
and a pointer or reference to the calling agents weightmap.
This routine should return the next step for that agent.
Alternatively, I could write a visitor which, everytime any
agent calls dijkstra, overwrites the weight in the bundled
edge structure, with that agent's weights array.
Here below is the nuts of what I have, which works but only
with the bundled edge_weight (called "transit_time").
Below that, is what I'd like to do.
Anyway, the long & short of it is, I couldn't wrap my head
around the syntax for either. I've looked in the books, in
the lists, on the site, and I can't find any help on how to
incorporate external weightmaps with dijkstra. Can anyone
tell me how to proceed?
Thanks,
Fergal.
---------------
This works, but only with the bundled weight property,
identical for all agents:
class road;
typedef adjacency_list