Compartmental modelling Python package
Check the docs to see more.
- Define a model with simple rules as strings or with custom functions.
- Pre-defined models like SIR, SIS, SEIR, ...
- Community-extensions of models.
- Solve numerically for fixed or time-dependent parameters.
- Best-fit to existing data, posibly using time windows.
- Create compartment graphs.
- Export LaTeX.
- Export to Wolfram Language (Mathematica).
Assuming you have a Python3 distribution with pip, the latest pypi release can be installed with:
pip3 install comod
To install the optional dependencies you can run
pip3 install 'comod[extras]'
Mind the quotes.
To install a development version, cd to the directory with this file and:
pip3 install -e '.[test]'
As an alternative, a virtualenv might be used to install the package:
# Prepare a clean virtualenv and activate it
virtualenv -p /usr/bin/python3.6 venv
source venv/bin/activate
# Install the package
pip3 install -e '.[test]'
To generate the documentation, the docs extra dependencies must be installed.
To generate an html documentation with sphinx run:
make docs
To generate a PDF documentation using LaTeX:
make pdf
To run the unitary tests:
make test

