This demo illustrates Agent-Based Modeling (ABM) applied to a complex urban crossing system. Autonomous pedestrians move towards their target points while avoiding collisions with cars. Lanes are controlled by traffic lights, and agents obey traffic rules dynamically.
The system can be made more complex by introducing pedestrian crossing behaviors that vary by individual characteristics, incorporating heterogeneity in walking speed, decision-making, and compliance levels. Additionally, dynamic environmental conditions such as time-dependent traffic flow, yellow light transitions, and car collision avoidance strategies can be added to enhance realism and enable multi-scenario experimentation.
Figure: Visualization of the crossing behavior simulation. Green represents active pedestrians, Gray represents inactive pedestrians after collisions, Red represents cars. Traffic lights regulate lane access. This demo demonstrates emergent patterns from agent interactions in a simple two-lane crossing environment.
The full source code for this demo is available on GitHub: 📥 Download / View Source