Skip to content

Kandil2001/Jupedsim-Evacuation-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

      Bergische Universität Wuppertal Logo         JuPedSim Logo         Python Logo  

Jupedsim Evacuation Analysis

Python Badge JuPedSim Badge License Badge Contributions Badge

🚨 High-performance pedestrian evacuation simulation with parallel processing & Numba acceleration

Evacuation Simulation Demo

📑 Table of Contents

Overview

This project delivers a scalable, realistic, and lightning-fast framework for simulating building evacuations using JuPedSim.
It combines parallel agent distribution, Numba-accelerated computations, and efficient geometry handling for advanced crowd analysis.

Designed for:

  • Researchers studying pedestrian dynamics
  • Safety engineers optimizing evacuation plans
  • Urban planners improving public space layouts

Features

🚀 High Performance – Parallel simulation with ThreadPoolExecutor
🔥 Numba Acceleration – JIT speed-ups for heavy math
🗺 Flexible Geometry – Import .wkt or XML building layouts
📊 Detailed Analytics – Density heatmaps, bottleneck detection, evacuation times
🎯 Customizable Agents – Adjustable speeds, behaviors, and spawn zones
📈 Visual Outputs – Real-time plots & post-simulation analysis

Pedestrian Density Heatmap

Quick Start

git clone https://github.com/Kandil2001/Jupedsim-Evacuation-Analysis.git
cd Jupedsim-Evacuation-Analysis
pip install -r requirements.txt

Run in Jupyter Notebook

jupyter notebook "Ped1 - Copy.ipynb"

Or run a Python script directly

from jupedsim import Simulation
sim = Simulation(geometry="HC.wkt", agents=200)
sim.run()
sim.plot_heatmap()

Theoretical Background

🔹 Social Force Model

Pedestrians are modeled as particles influenced by attractive forces (towards exits) and repulsive forces (from obstacles and others). This model is a cornerstone of microscopic pedestrian dynamics simulations. For a detailed description of the model, refer to the resources at https://pedestriandynamics.org/models/.

  Social Force Model

---

🔹 Bottleneck Behavior

When many agents attempt to pass through a narrow exit, congestion forms, reducing flow efficiency.

  Bottleneck Behavior

---

🔹 Pedestrian Flow Heatmaps

Heatmaps visualize crowd density and movement intensity to identify congestion hotspots.

  Pedestrian Flow Heatmap

---

🔹 Microscopic vs. Macroscopic Models

  • Microscopic: Simulates each pedestrian individually (detailed interactions).  
  • Macroscopic: Treats crowds as continuous flows (good for large-scale analysis).  

JuPedSim primarily uses WKT geometry definitions for simulation.

Tested on: Intel i7-11800H, 16GB RAM, Python 3.10

Real-World Applications

🏟 Event planning – Stadium crowd dispersal
🏢 Architecture – Optimizing exit placements
🚉 Transport hubs – Reducing congestion
🏙 Urban design – Public space flow analysis

Ethical Considerations

  • Privacy: Real-world data must be anonymized
  • Inclusivity: Account for individuals with varied mobility needs
  • Transparency: Document assumptions and limitations of the model

Roadmap

  • Parallel agent simulation
  • Heatmap visualizations
  • Adaptive route choice AI

Troubleshooting

Q: Simulation runs slowly
A: Ensure Numba is enabled, use Python ≥3.9, and reduce visualization frequency.

Q: How do I change exits?
A: Edit the .wkt file to define new exit polygons.

Q: Output file is empty
A: Check that spawn zones and exits are correctly defined in geometry.

Acknowledgments

This project was developed as a practical assignment for the Pedestrian Dynamics course at the Bergische Universität Wuppertal. We extend our gratitude to:

  • Mohcine Chraibi for supervision and guidance. His personal page is available at https://www.chraibi.de/.
  • The JuPedSim development team for providing the powerful simulation framework. More information is available on the official website: https://www.jupedsim.org/stable/.
  • The Python community for the essential tools and libraries (Numba, Matplotlib, etc.) that made high-performance analysis possible.

Contributing

We welcome contributions of all kinds — bug fixes, performance improvements, documentation updates, and new features.

Please read our CONTRIBUTING.md for detailed contribution guidelines, coding standards, and workflow instructions before submitting a pull request.

License

MIT License – see LICENSE for details.

About

A Jupedsim-based pedestrian evacuation simulator that models crowd dynamics and analyzes evacuation efficiency. Features configurable scenarios, real-time visualization, and performance metrics to evaluate optimal exit strategies and crowd behaviors.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors