This demo showcases a discrete Multi-Agent System (MAS) designed to simulate and analyze crowd dynamics during emergency evacuations. Built using the MESA framework in Python, the system models how individual behaviors and architectural constraints impact overall safety and efficiency.
Github repo
https://github.com/MiquelGomezCorral/...
Key Features Demonstrated:
Heterogeneous Agents: Simulation of three distinct behavioral profiles:
Polite: Cooperative agents prone to waiting.
Aggressive: Competitive agents that prioritize their own movement.
Slow: Agents acting as dynamic obstacles (e.g., reduced mobility).
Navigation Logic: Comparison between informed pathfinding (A*) and reactive signal following (BFS).
Scenarios: Stress-testing layouts including "Mall," "Corridor," and "Auditorium/Seats" to observe bottlenecks.
Real-time Metrics: Visualization of flow rates, local density, and deadlock factors (panic).
Key Findings: The simulation reveals counter-intuitive insights, such as how moderate aggression can sometimes reduce total evacuation time in discrete models by resolving gridlocks faster than polite behavior, while rigid exit preferences (e.g., "going back the way I came") can catastrophically increase congestion.
Tech Stack:
Language: Python
Framework: MESA (Agent-based modeling)
Model: Discrete Grid-Based / Moore Neighborhood
Pathfinding: Static Floor Fields (Heatmaps) A*, BFS
#Python #Simulation #MultiAgentSystems #MESA #DataScience #CrowdDynamics #Evacuation