Skip to main content
Latest PyPI version https://img.shields.io/badge/License-GPLv3-blue.svg

Introduction

MiTepid_sim: A repository to simulate the spread of COVID-19 in any population with a known age-structure, Made in Tübingen.

What this library has to offer can be summarized as follows:

  • The MiTepid_sim library simulates the dynamics of a stratified compartmental epidemiological model. A set of Ordinary Differential Equations (ODEs) is used as the mathematical basis for the model. Hence, the computational cost to run the simulations is that of a set of ODEs. Currently, SIS, SIR, and SEIR compartmental models are defined in the code, but the user can easily add any other model in the models module of the library.

  • In order to make the code relevant to the spread of SARS-CoV-2 in a population and not simply a generic model, MiTepid_sim comes with a set of contact rates that are obtained based on the available data on the spread of SARS-CoV-2 in a population. The mathematical basis of how these contact rates are calculated is explained in this manuscript. The contact rates are calculated assuming the population is stratified into nine age-groups, every 10 years and then 80+. The contact rates accompanying the code should be adapted based on the population density of each population in each age-group. Population distribution of some sample countries is already added to the policies module of the library. The user can easily add any other population of interest to the module.

  • The MiTepid_sim library allows us to study the effects of applying various containment policies to a given population. Such policies can affect each age-group differently and can vary in time.

  • The library can also be used to study the effects of vaccination in a population and how wide-spread vaccination should be to achieve herd-immunity. The vaccinated population can be considered simply as initial values for the Recovered (R) compartment. And the code allows us to change the initial conditions in any arbitrary time-step of choice to emulate the gradual introduction of the vaccine in a population.

  • The library comes with a set of visualizations tools that allows us to generate various plots necessary to study the effects of each policy in the evolution of the trajectories of different compartments. We can plot the trajectories per age group or as an aggregate for the whole population.

Examples

There are a few scripts in the examples folder in the repository which can be used as examples of what the code can do. To see samples of the plots generated by the code, you can look at this manuscript or this one . All the plots in these two manuscripts are generated using MiTepid_sim.

Installation

The MiTepid_sim library can be installed using the following command:

pip install mitepid

Or you can install it directly from the repository.

Requirements

numpy
scipy
matplotlib
pathlib

Compatibility

This code is tested under Python 3.8, and should work well for earlier versions of Python 3.

Licence

GNU General Public License (Version 3).

Author

MiTepid is maintained by Vahid Samadi Bokharaie.

Release files for MiTepid 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for MiTepid 0.0.5
File Interpreter ABI Platform
MiTepid-0.0.5-py3-none-any.whl Python 3 none any Details

Release files / MiTepid-0.0.5-py3-none-any.whl

Download URL MiTepid-0.0.5-py3-none-any.whl
Size 129.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6783b8f67f34a9f8adeb409bf7dbc3e947d489fc394c17588cfce9db4a53fe20
BLAKE2b-256 checksum
How to use checksums
78b61ca56e4697ee4547cd2a28d650b9cc8047ace8423343b68c74c6f1b107d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page