Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Crowd Dynamics

Crowd dynamics is a simulation environment written in Python package for simulation movement of crowds. The project was created in summer 2016 for Systems Analysis Laboratory at Aalto University in Finland. The documentation has more detail about the project.


Crowd dynamics is tested on Ubuntu 16.04 using Python 3.6. First, install the Conda package manager. Miniconda distribution is the easiest to install. Then, clone the crowddynamics repository.

git clone

Inside the crowddynamics directory, install the Conda environment, activate it, and install crowddynamics as an editable.

conda env create -f environment.yml
conda activate crowd36
pip install --editable .

Graphical User Interface

We can use a graphical user interface (GUI) for visualizing the crowd simulations and display data interactively, which can be very useful for designing new simulations and debugging. We have implemented the GUI for crowddynamics using Qt via pyqt and pyqtgraph. It is maintained separately from the crowddynamics repository due to its dependencies on Qt.

We start by cloning the repository.

git clone

Inside crowddynamics-qtgui directory, install the requirements and install crowddynamics-qtgui as editable. We must install pyqt version 4 using Conda from the conda-force channel for it to work correctly. Be sure that you activate the environment where you installed crowddynamics.

conda activate crowd36
conda install pyqt=4 -c conda-forge
pip install -r requirements.txt
pip install --editable .


Inside the crowddynamics/examples directory, we can find example simulations.

from crowddynamics.examples.simulations import Hallway
from crowddynamics.simulation.agents import Circular
from crowddynamics.logging import setup_logging

if __name__ == '__main__':
    iterations = 1000
    simulation = Hallway(agent_type=Circular)
    for i in range(iterations):


Tests are implemented using Pytest and Hypothesis.

Install test dependencies.

pip install -r requirements-tests.txt

In the project's root directory, run pystest test suite.



Documentation is created using Sphinx.

Install documentation dependencies

pip install -r requirement-docs.txt

In docs directory.

make html


Versioneer is used for versioning.