This repository contains the implementation and experiments from my Master’s thesis at the Technical University of Munich, focusing on predicting macroscopic evacuation properties using the SWIM algorithm.
The project integrates crowd:it simulation data with neural network surrogates to predict evacuation times efficiently without running full simulations.
The work is organized into three main parts:
- Scenario 1 - Predicting evacuation time from synthetic 3-room configurations (N1, N2, N3).
- Scenario 2 - Predicting evacuation time from architectural parameters (E: floors, T: stair width, P: people per floor).
- Sampling Experiments - Comparing Quasi Monte Carlo (QMC), Randomized QMC (RQMC), Sparse Grids, Informative/Entropy, and K-Means sampling strategies for minimal yet accurate training sets.
All models are trained using the SWIM network, which constructs neural network weights based on pairwise sample relationships instead of random initialization.
Category | Main Files / Purpose |
---|---|
Scenario 1 – Data & Model | data_preparation/simulation_automation.py (run crowd:it batch simulations) · model_training/swim_reg_simulation.ipynb (SWIM regression) |
Scenario 2 – Data & Models | sc2_data_preparation/sc2_data_preparation.py (aggregate *-stat.csv) · sc2_model_training/ (SWIM + Vanilla NN experiments, plots) |
Scenario 2 – Sampling | sc2_sampling/ (QMC, RQMC, KMeans, Entropy, Uncertainty, Sparse Grid experiments + visualizations) |
Configs & Docs | minimal_requirements.txt · README.md · USAGE.md |
Use Python ≥ 3.9 (tested with 3.10–3.11)
pip install -r minimal_requirements.txt
Make sure datafold >= 2.0.0 is available.
Install SWIM libraries directly from source (not PyPI): SWIMNetworks (core algorithm) pip install git+https://gitlab.com/felix.dietrich/swimnetworks.git
SWIMRNN (optional, for recurrent extensions) pip install git+https://gitlab.com/felix.dietrich/swimrnn.git
(Optional) Jupyter pip install jupyterlab
Several scripts/notebooks use absolute Windows paths (e.g., C:\Users\cagat...). → Please edit the path variables at the top of each script/notebook to match your machine.
crowd:it and SWIM libraries are not actually included; please install them separately as noted above.
Scaling of X and y is applied in most experiments to stabilize model performance.
Gültekin, Çağatay (2025).
Predicting Macroscopic Crowd Properties Using the SWIM Algorithm.
Master’s Thesis, Technical University of Munich (TUM).
Code in this repository is provided under the MIT License.
Third-party tools (e.g., crowd:it, swimnetworks, swimrnn) are subject to their own licenses and are not distributed here.