PedNStream: Scalable Network Flow Simulation for Pedestrian Traffic Management
Managing large crowds in urban environments or at major events requires simulation tools that are both fast enough for real-time control and accurate enough to reflect human behavior. Current open-source software often relies on microscopic models that track individual people, which can be too computationally demanding for large networks, or on traffic models that ignore the unique ways pedestrians move. This paper introduces PedNStream, an open-source, Python-based simulator designed specifically for macroscopic pedestrian network modeling. It provides a practical testbed for testing crowd management strategies—such as rerouting, gating, and flow separation—in real-time.
A New Approach to Pedestrian Flow
PedNStream is built upon the Link Transmission Model (LTM), a framework originally developed for vehicular traffic. The authors have significantly adapted this model to better suit pedestrian dynamics. Unlike cars, pedestrians move in two-dimensional spaces and exhibit bidirectional flow, where people walking in opposite directions influence each other’s speed. PedNStream accounts for this by using area-based capacity constraints and incorporating the effects of counter-directional flow on available space. By shifting from a one-dimensional, length-based model to an area-based one, the simulator more accurately represents how crowds occupy and move through physical spaces.
Incorporating Stochastic Behavior
A key innovation in PedNStream is the inclusion of stochasticity—or randomness—to make simulations more realistic. Real-world pedestrian movement is not perfectly uniform; people linger to perform activities, walk at different speeds, and hesitate in congested areas. The simulator uses a diffusion model to represent how walking speeds disperse over time under free-flow conditions. Under congestion, it employs a binomial distribution to model the uncertainty of pedestrian discharge, capturing the reality that physical space does not always guarantee immediate movement. These features allow the simulator to move beyond rigid, deterministic patterns and better reflect the variability of human behavior.
Control-Oriented Design
Beyond its simulation capabilities, PedNStream is designed as a modular framework for closed-loop control. This means it can interact with external algorithms that continuously monitor network states—such as density and travel time—and adjust management interventions accordingly. The framework includes built-in controller baselines, such as rule-based and pressure-based gating, which allow researchers to test how different management strategies perform in a simulated environment. Because it is implemented in Python and optimized for macroscopic flow, it provides a scalable solution for evaluating large-scale crowd management strategies that would be too slow to test with traditional microscopic tools.
Validation and Scalability
The authors evaluated PedNStream through a staged approach to ensure its reliability. Synthetic scenarios were used to verify that the model correctly simulates fundamental crowd behaviors, such as queue formation, spillback, and congestion dissipation. The researchers also conducted real-network experiments to confirm that the simulator’s output aligns with observed pedestrian counts. Finally, a runtime analysis demonstrated that the framework is efficient enough to handle large-scale networks, establishing it as a practical tool for researchers and policymakers looking to optimize crowd safety and flow in complex, dynamic environments.
Comments (0)
to join the discussion
No comments yet
Be the first to share your thoughts!