Code for the project of the course Complex System Simulation, UvA 2021.
The model is based on the Social Force Model for pedestrian dynamics created by Dirk Helbing and Péter Molnár.
The contributors of this project are:
- Caterina Buranelli
- Marija Pujic
- Robbert van Koesveld
- Iris Reitsma
The contributors added to the original code of the model the features listed in the Expansions section; the source of the original code is: https://github.com/svenkreiss/socialforce.
Social force model for pedestrian dynamics Dirk Helbing and Péter Molnár Phys. Rev. E 51, 4282 – Published 1 May 1995
# install from PyPI
pip install 'socialforce[test,plot]'
# or install from source
pip install -e '.[test,plot]'
# run linting and tests
pylint socialforce
pytest tests/*.pyinclusion of different obstacles
removal of periodic movement of agents ( an agent passes the coridor, new agent is randomly placed in the opposite edge )
different tendency of respawning on the agent's right side of the corridor
higher repulsive force between the agents and the obstacles
- HOW TO IMPLEMENT:
- socialforce/potentials.py - line 86 - change to : return self.u0 * np.exp(-0.4 * np.linalg.norm(r_aB, axis=-1) / self.r)
Different setups together with the code for running of the simulations can be found in the 'test' file
results of the simulations can be plotted by running the read_and_plot.py file
- the file path has to be edited depending on which resutls are being accessed




