Answers to: Dynamic routing algorithmhttps://help.openstreetmap.org/questions/44799/dynamic-routing-algorithm<p>I have a graph extracted from an American city: vertices represent road intersections, edges/arcs represent road segments connecting the intersections. For each road segment, I have the length and allowed driving speed. Furthermore, roads belong to different classes such as highway/residential/primary roads/....</p>
<p>I am looking for a routing algorithm which does the following:</p>
<ul>
<li>Compute a pairwise travel time matrix for each intersection (i.e how long it would take to travel from intersection i to intersection j.</li>
<li>Query the quickest route from intersection i to j and returns a path (sequence of edges/arcs).
The algorithm should be able to take updates into consideration. For instance, if there is a congestion on road segment (x,y) which increases its anticipated travel time, or if road segment (x,y) becomes blocked, the data structures should be updated incrementally, thereby updating all affected shortest paths (i.e. update all shortest paths through (x,y)).</li>
<li>The distance matrix will be queried very often so this should be precomputed, but the actual shortest paths can be computed at a later stage if that's more efficient. The number of nodes in the graph is roughly 5000-10000.</li>
</ul>
<p>I was hoping that people could refer me to literature about this, preferably something that doesn't take weeks to implement. Obviously, simply running Dijkstra for each intersection takes too long. Running Floydâ€“Warshall all-pairs shortest path algorithm could be a possibility, but I'm not so sure how to update the result if the cost of one of the edges/arcs changes. Furthermore, it seems to be a slow approach since the algorithm ignores that most of the routes go through a small subset of the road segments.</p>
<p>I'm not looking for an exact approach. A good approximation suffices. Any pointers to literature or algorithm descriptions are welcome. I presume that any kind of routing software needs a similar algorithm. I'm mainly interested in something that works; it shouldn't necessarily be state of the art.
I'm not sure what would be a good place to ask this question?</p>enSun, 03 Dec 2023 10:49:32 -0000