Pedestrian Network Optimization

Pilot · Julia · JuMP/Ipopt

Project Overview

PedNetOpt treats walkways as a network and solves congestion-based traffic assignment for pedestrians — User Equilibrium (UE), System Optimum (SO), the Price of Anarchy (PoA), Level-of-Service (LOS) and crowding analysis, real-world (OSM) application, and network design optimization (NDP) — in a single pipeline. The core algorithms (network, BPR cost, Frank–Wolfe, SVG plotting) use only the Julia standard library.

Gwanghwamun design before/after Width design optimization on Gwanghwamun Plaza: a crowded central corridor is widened and congestion clears (total crowding exposure −86%).

“Can we optimize a pedestrian network?” → Yes.

Classical road traffic-assignment theory (Wardrop 1952, Beckmann 1956) applies to any network given a flow–cost function. For walking, that function is the pedestrian density–speed relation (Fruin LOS, HCM walking LOS, Weidmann). So “walkway = link, denser = slower = cost function,” and pedestrian assignment, Braess’ paradox, and evacuation optimization all follow.

Mathematical Model

Link travel time as a function of flow x_a (BPR-style):

\[t_a(x_a) = t^0_a \left( 1 + \alpha \left( \frac{x_a}{\text{cap}_a} \right)^{\beta} \right)\]
  • $t^0_a = \text{length} / \text{free-walk speed (1.34 m/s)}$ — uncongested walk time
  • $\text{cap}_a = \text{width} \times 23\ \text{ped/min/m} \times 60$ — practical capacity (Fruin/HCM LOS E)
  • $\alpha = 0.15,\ \beta = 4.0$ — congestion sensitivity
ProblemDefinitionMethod
UE (User Equilibrium)$\min \sum_a \int_0^{x_a} t_a(w)\,dw$Frank–Wolfe + Dijkstra
SO (System Optimum)$\min \sum_a x_a \cdot t_a(x_a)$marginal cost, same solver
PoA$\text{TTT(UE)} / \text{TTT(SO)} \ge 1$ratio of the two solutions

Real-World Networks (OSM)

Beyond synthetic examples, the same analysis runs on real urban walkways pulled from OpenStreetMap (Overpass API) and converted into the solver’s Network — BPR cost, Frank–Wolfe, and visualization are all reused unchanged.

Times Square UE assignment New York Times Square (grid, redundant detours): User-Equilibrium assignment on the real OSM walkway network, colored by pedestrian LOS.

Gwanghwamun UE assignment Seoul Gwanghwamun Plaza (linear, sparse detours): a contrasting structure where flow concentrates into a single corridor.

A key counter-intuitive finding from comparing the two plazas: the real cost of “no detours” shows up not as a higher PoA but as crowding over-saturation — Gwanghwamun reaches v/c 1.45 (oversaturated) while the Times Square grid disperses flow and stays within capacity. The value of route redundancy is in resilience and crowding relief, not average efficiency.

Comfort, Not Speed

For walking, what matters first is comfort (personal space, crowding), not travel time. PedNetOpt redefines the objective from “total walk time” to crowding discomfort, keeping the network/solver/OSM/visualization infrastructure intact — only what is minimized changes. This reshapes both behavior (pedestrians detour to avoid crowds, via comfort-weighted UE) and design.

Design Optimization (Bilevel NDP)

With walkway width as the design variable, a convex nonlinear bilevel problem is solved with JuMP + Ipopt: the upper level sets widths for comfort, the lower level responds with pedestrian equilibrium routing. Applied to Gwanghwamun:

 Total crowding exposure ★Min pedestrian spaceFruinBudget
Before37,2761.45 m²/personC
After5,305 (−85.8%)5.04 m²/personA150 m² (all)

The upper level concentrates the budget on the most crowded corridor and the lower level redistributes flow into the widened space, cutting crowding exposure by 86%.

Simulation (No Observed Data → Exploration, Not Calibration)

Without observed OD/behavior parameters, results are treated as simulation/parameter sweeps rather than calibrated predictions — robustness of patterns, not absolute values.

Resilience sweep Resilience curve: as demand rises, minimum pedestrian space collapses — the sparse-detour plaza (Gwanghwamun) breaks down at ×1.5, the redundant grid (Times Square) holds to ×2.

Comfort-weighting sweep Comfort-weighted routing (λ↑): the more pedestrians avoid crowds, the lower the crowding exposure (−81% at λ=10), then it saturates.

Demand sweep animation Demand-increase simulation: the Gwanghwamun walkway reddens (crowding rises) and approaches its resilience limit.

Why Julia

Assignment alone could be done in Python, but equilibrium-constrained nonlinear bilevel design optimization, automatic differentiation, and scale are where the JuMP / Ipopt / Graphs.jl ecosystem has a clear edge. A full 10,000-node / 40,000-link grid UE solves in 1.9 s with no special optimization — native speed where pure Python would take tens of seconds.

GitHub repository →