Table of Contents
Fetching ...

LightSim: A Lightweight Cell Transmission Model Simulator for Traffic Signal Control Research

Haoran Su, Hanxiao Deng

TL;DR

LightSim, a pure Python, pip-installable traffic simulator with Gymnasium and PettingZoo interfaces that runs over 20000 steps per second on a single CPU, is introduced, lowering the barrier to signal control research from days to minutes.

Abstract

Reinforcement learning for traffic signal control is bottlenecked by simulators: training in SUMO takes hours, reproducing results often requires days of platform-specific setup, and the slow iteration cycle discourages the multi-seed experiments that rigorous evaluation demands. Much of this cost is unnecessary, since for signal timing optimization the relevant dynamics are queue formation and discharge, which the Cell Transmission Model (CTM) captures as a macroscopic flow model. We introduce LightSim, a pure Python, pip-installable traffic simulator with Gymnasium and PettingZoo interfaces that runs over 20000 steps per second on a single CPU. Across cross-simulator experiments spanning single intersections, grid networks, arterial corridors, and six real-world city networks, LightSim preserves controller rankings from SUMO for both classical and reinforcement learning strategies while training 3 to 7 times faster. LightSim is released as an open-source benchmark with nineteen built-in scenarios, seven controllers, and full reinforcement learning pipelines, lowering the barrier to signal control research from days to minutes.

LightSim: A Lightweight Cell Transmission Model Simulator for Traffic Signal Control Research

TL;DR

LightSim, a pure Python, pip-installable traffic simulator with Gymnasium and PettingZoo interfaces that runs over 20000 steps per second on a single CPU, is introduced, lowering the barrier to signal control research from days to minutes.

Abstract

Reinforcement learning for traffic signal control is bottlenecked by simulators: training in SUMO takes hours, reproducing results often requires days of platform-specific setup, and the slow iteration cycle discourages the multi-seed experiments that rigorous evaluation demands. Much of this cost is unnecessary, since for signal timing optimization the relevant dynamics are queue formation and discharge, which the Cell Transmission Model (CTM) captures as a macroscopic flow model. We introduce LightSim, a pure Python, pip-installable traffic simulator with Gymnasium and PettingZoo interfaces that runs over 20000 steps per second on a single CPU. Across cross-simulator experiments spanning single intersections, grid networks, arterial corridors, and six real-world city networks, LightSim preserves controller rankings from SUMO for both classical and reinforcement learning strategies while training 3 to 7 times faster. LightSim is released as an open-source benchmark with nineteen built-in scenarios, seven controllers, and full reinforcement learning pipelines, lowering the barrier to signal control research from days to minutes.
Paper Structure (43 sections, 6 equations, 12 figures, 13 tables)

This paper contains 43 sections, 6 equations, 12 figures, 13 tables.

Figures (12)

  • Figure 1: Cell Transmission Model mechanics. (a) A road link is discretized into cells, each storing aggregate density $k$ (color indicates congestion level). (b) Flow between cells is the minimum of the upstream sending flow $S_i$ and downstream receiving flow $R_{i+1}$. (c) At signalized intersections, a binary signal mask $\sigma_m$ controls which movements receive green; the phase alternates between NS (green) and EW (red) in this example.
  • Figure 2: LightSim architecture. The core engine implements CTM flow dynamics, signal management, and demand injection using vectorized NumPy operations. RL environments wrap the engine with standard Gymnasium/PettingZoo interfaces. Users interact through a high-level API with built-in scenarios, benchmarks, a web visualization dashboard, and OpenStreetMap network import.
  • Figure 3: Representative real-world city networks from OpenStreetMap (500 m radius). Red circles: signalized intersections; green triangles: boundary origin points. Six of sixteen built-in city scenarios are shown.
  • Figure 4: A $3 \times 3$ grid under MaxPressure control at $t = 300$s. Link color indicates density (blue = free-flow, red = congested); circles show the active phase at each intersection.
  • Figure 5: Simulation dynamics on a single intersection. Left: Spatial density at $t = 300$s (color intensity = congestion). Right: Queue oscillation from signal cycles and steady throughput growth over 600s.
  • ...and 7 more figures