This project is a Python implementation of the Extended Social Force Model [2]. It extends the vanilla social force model [1] to simulate the walking behaviour of pedestrians with social group interactions.
The pedestrian states and other simulated entities are represented by NumPy arrays. Performance-critical implementations of forces use Numba for significant speed-ups.
Clone the source code.
git clone https://github.com/Bonifatius94/PySocialForce.git
Install the pysocialforce package and its dependencies using pip + setup.py.
pip install -e .
For development, run the automated tests and lint the coding style.
pylint pysocialforce
pytest tests
See the usage examples in the examples folder.
This project is available under the MIT License.
[1] Helbing, D., & Molnár, P. (1995). Social force model for pedestrian dynamics. Physical Review E, 51(5), 4282–4286. https://doi.org/10.1103/PhysRevE.51.4282
[2] Moussaïd, M., Perozo, N., Garnier, S., Helbing, D., & Theraulaz, G. (2010). The walking behaviour of pedestrian social groups and its impact on crowd dynamics. PLoS ONE, 5(4), 1–7. https://doi.org/10.1371/journal.pone.0010047
[3] Sven Kreiss's original Social Force implementation on GitHub