Skip to content

Agent-based simulation model for COVID-19 spread in society and patient outcomes

License

Notifications You must be signed in to change notification settings

chenzhouuu/reina-model

 
 

Repository files navigation

Agent-based COVID-19 simulation

This software implements an agent-based (or individual-based) model for simulating the spread of the coronavirus (SARS-CoV-2) in a healthcare district.

It models healthcare capacity (hospital beds and ICU units) and different public health simulations.

More documentation is also available in the repository.

Installation

If you're using Ubuntu/Debian, you might need to install a couple of packages:

apt install python3.8-dev libpython3.8-dev python3.8-venv \
    libfreetype6-dev libpng-dev libqhull-dev pkg-config \
    gcc gfortran libopenblas-dev liblapack-dev cython

Install a Python venv with Python 3.7 or 3.8. Install the requirements:

pip install -r requirements.txt

Compile translations:

pybabel compile -d locale

Usage

Run the simulation with:

python -m calc.simulation

Or visualize using Dash:

python -m corona

Installing and running with Docker

Alternatively, you can run Reina with Docker. To do so, run:

docker-compose up

The first time you run it, it will build the container for Reina, which takes some time. Once it's done, Reina Dash visualization is available at localhost:8123.

While the container is running, you can run the simulation like this:

docker exec -ti reina python -m calc.simulation

Development

Localisation

Extract new translation strings to the template:

pybabel extract -w 120 -F babel.cfg -o locale/messages.pot .

Merge new strings to language-specific translation files:

pybabel update -w 120 -i locale/messages.pot -d locale

About

Agent-based simulation model for COVID-19 spread in society and patient outcomes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.5%
  • CSS 2.2%
  • Dockerfile 0.3%