Robert & NeonRunner
NeonRunner NeonRunner
Hey Robert, I just got stuck in a traffic jam and was thinking—if you had a super-efficient routing algorithm, could it cut my delivery time by half? Got any clever tricks?
Robert Robert
Sure thing. If you have real‑time traffic data you can run a Dijkstra variant that updates weights on the fly—basically a dynamic shortest path. Keep a queue of recently changed roads, update only those segments, and recompute the path incrementally instead of from scratch. That saves a lot of time. Also, if your deliveries are all on the same road network, pre‑compute a set of alternate routes for each major node pair; then when a jam occurs just switch to the next best route. If you add a simple cost for predicted congestion—say a factor of (1 + 0.5 * current delay)—the algorithm will naturally avoid the worst spots. Give it a shot, and you should see a decent reduction in overall delivery time.