FlowGridAlgorithm Analytics
Simulation
Intelligence

Algorithm Analytics

Empirical scaling of the route solvers on synthetic cities up to 10,000 intersections, plus whole-network analysis of FlowGrid Metro.

Running benchmarks…

Runtime vs graph size

Median wall-clock time (log scale) · source and target on opposite sides of a jittered grid city

Search effort

Vertices expanded before reaching the target — A*'s heuristic prunes the search

Benchmark results

VEDijkstraA*BFSBellman–FordA* pruningExact solvers agree

Minimum spanning tree

Kruskal + disjoint-set union on road length — the cheapest network that still connects every junction (priority maintenance / fibre backbone)

Graph centre & closeness

Best site for a city-wide response hub: the junction with the smallest worst-case travel time

All-pairs travel-time matrix

Floyd–Warshall dynamic programming · free-flow minutes between every pair of junctions

0minutes—

Hover a cell to see the trip.

Complexity reference

Theoretical bounds of every algorithm in FlowGrid (V vertices, E edges, k phases/paths, n observations)

AlgorithmModuleTechniqueTimeSpaceGuarantee
Dijkstraalgorithms/dijkstra.pyGreedy, binary heapO((V+E) log V)O(V)Optimal for w ≥ 0
A* searchalgorithms/astar.pyBest-first with heuristicO((V+E) log V)O(V)Optimal with consistent h
Bellman–Fordalgorithms/bellman_ford.pyDynamic programmingO(V·E)O(V)Handles w < 0, detects negative cycles
BFSalgorithms/bfs.pyLevel-order traversalO(V+E)O(V)Fewest edges
Yen's k-shortestalgorithms/yen.pySpur-path deviationO(k·V·(V+E) log V)O(k·V)k loop-free paths in cost order
Floyd–Warshallalgorithms/floyd_warshall.pyDynamic programmingO(V³)O(V²)All-pairs optimum
Kruskal + DSUalgorithms/kruskal.pyGreedy, union by rank + path halvingO(E log E)O(V)Minimum spanning tree
Bounded proportional splitalgorithms/traffic_signal.pyGreedy, exact breakpoint solveO(k log k)O(k)Sum = budget, min ≤ gᵢ ≤ max
Webster timingalgorithms/traffic_signal.pyAnalytical optimisationO(k)O(k)Delay-minimising cycle (approx.)
Holt-Wintersalgorithms/forecast.pyExponential smoothing + grid searchO(n·|grid|)O(m)Back-tested vs seasonal naive