TL;DR
This paper introduces the first open-source, GPU-accelerated microscopic traffic simulator capable of simulating city-scale networks with millions of vehicles in real time (up to 84 Hz for ~2.5 million vehicles). By combining GPU-native spatial indexing with realistic behavioral models (IDM and randomized MOBIL), it achieves up to an 88x speedup over the fastest baselines while providing a unified Python API and benchmark suite for five major transportation optimization tasks across four global megacities.
What Problem Does This Paper Address?
Optimizing city-scale traffic—whether by re-timing traffic lights, introducing congestion pricing, or designing new roads—increasingly relies on reinforcement learning (RL) and black-box optimization algorithms. However, these methods require millions of interaction steps with a microscopic simulator (one that models individual vehicle kinetics and lane choices).
Existing microscopic simulators bottleneck this workflow in two ways:
- Computational Inefficiency: Popular CPU-based engines like SUMO (single-threaded) or CityFlow and CBLab (multi-threaded) take minutes to simulate a single hour of city-scale traffic (~100k+ vehicles), making large-scale RL training impractically slow.
- Narrow Scope: Most modern research platforms focus almost exclusively on isolated traffic signal control, lacking support for broader systemic interventions like dynamic lane assignment, tidal (reversible) lanes, road network planning, and dynamic congestion pricing.
Methods
The authors designed an end-to-end GPU-accelerated simulator implemented in CUDA and wrapped with a Python API:
- Two-Phase Parallel Process (Read/Write Separation): Simulating autonomous agents on GPUs (SIMD architecture) typically causes race conditions when vehicles read each other's states while updating their own. The engine resolves this by splitting vehicle state into a read-only
snapshot(previous timestep) and a private read-writeruntime(current timestep). Each simulation tick alternates between a Prepare Phase (synchronizing runtime to snapshot and updating indexes) and an Update Phase (executing vehicle motion models), eliminating mutex locking. - SIMD-Friendly Linked-List Spatial Indexing: Vehicles only need to sense immediate neighbors (lead car, plus front/rear cars in adjacent lanes). Rather than using spatial trees (which cause GPU thread divergence) or contiguous arrays (which incur high memory-copy overhead during lane changes), the authors implement bidirectional ordered linked lists augmented with side pointers. Finding adjacent-lane neighbors takes $O(1)$ single-pointer lookups without branching.
- Realistic Vehicle Dynamics: The engine incorporates the Intelligent Driver Model (IDM) for car-following and a randomized MOBIL model for lane changes, which prevents vehicles from executing unnaturally synchronized, lockstep lane shifts.
Datasets
- Real-World Validation Data: Evaluated against 4.22 million real-world vehicle GPS trajectories and 156,856 camera-tracked trips across 1,341 road segments in Shenzhen, China.
- Multi-City Benchmark Datasets: Street networks and junction topologies for Beijing, Shanghai, Paris, and New York extracted from OpenStreetMap. Realistic Origin-Destination (OD) travel matrices were generated using a diffusion model trained on satellite imagery, stratified into three congestion tiers (Smooth, Normal, and Congested).
Key Insights and Ideas
- Pointer-based spatial indexing on GPUs works when updates are sparse: Conventional GPU wisdom avoids linked lists due to non-contiguous memory access. However, because only a small fraction of vehicles change lanes or enter/exit in any given discrete second, the constant-time pointer lookups bypass thread divergence and outperform spatial trees.
- Holistic evaluation over modular optimization: Microscopic changes (like dynamic turn lanes) directly impact macro-scale traffic distribution. By unifying microscopic controls (signals, turn lanes) and macroscopic policies (congestion tolling, road addition) into a single high-throughput engine, optimization algorithms can be evaluated globally across an entire metropolitan area.
Key Results
- Computational Speedup: On a 2,464,950-vehicle scenario (Roadnet-L), the simulator runs at 84.09 Hz (totaling 42.81 seconds for 3,600 steps), outperforming the best baseline, CityFlow (3,806.7 seconds), by 88.92× on an RTX 4090.
- Simulation Realism: Compared to empirical Shenzhen traffic speeds, the proposed engine cut CityFlow's error nearly in half:
- Proposed Simulator: RMSE = 8.5 km/h, correlation $r = 0.7691$
- CityFlow: RMSE = 16.0 km/h, correlation $r = 0.5286$
- Algorithm Benchmarks: Benchmarking rule-based, RL (PPO, CoLight, MPLight), and black-box optimization (GeneralBO, Simulated Annealing) across five distinct operational tasks demonstrated consistent gains in vehicle throughput (TP) and average traveling time (ATT).
Limitations and Future Work
- Simplified Junction Dynamics: To avoid deadlock states (where three or more vehicles block each other in a gridlock loop inside an intersection), the simulator omits explicit vehicle overlap and priority checks within junctions. Realism at intersections therefore relies on conflict-free signal phase definitions.
- Single Mode of Transit: The engine currently simulates personal motor vehicles only; multimodal traffic (pedestrians, bicycles, buses, rail) is not yet supported.
- I/O Bottlenecks: Disk-writing trajectory dumps on CPUs remains bandwidth-limited, meaning detailed path traces must currently be sampled or evaluated in-memory during training.
Summary updated