Executable

Covasim

Cliff Kerr + 6 others
v0.0.1MITOct 2026

Citation: Covasim: an agent-based model of COVID-19 dynamics and interventions

Covasim performs projections of indicators such as numbers of infections and peak hospital demand, and explores interventions including social distancing, school closures, testing, contact tracing, quarantine, and vaccination.

How this model is classified mathematically and dynamically.

Determinism
Stochastic
Time dynamics
Discrete
Spatial
Non-spatial
Multiscale
No

Organisms, entities and processes this model represents.

Organisms
Infectious agents
Health conditions
Not recorded
Biological processes
Molecular entities
Not recorded
Proteins / genes
Not recorded

The data this model consumes and produces when executed.

Parameters

NameDefaultUnitMeaning
pop_size20000countpopulation size
pop_infected20countinitial infections
pop_typerandomdimensionless unitPopulation data type: random or hybrid.
start_day2020-03-01dayStart day of the simulation.
n_days60dayNumber of days to run when end_day is not specified.
rand_seed1dimensionless unitRandom seed; None means do not reset.
pop_scale1dimensionless unitFactor by which to scale the population.
rescaletruedimensionless unitEnable dynamic rescaling of the population.
beta0.016dimensionless unittransmissibility
n_imports0countAverage daily number of imported cases; actual number is drawn from a Poisson distribution.
use_waningtruedimensionless unitimmunity

Initial conditions

NameValueUnit
initial_infected_agents20count

Outputs

NameQuantityUnitFormat
epidemic_time_seriesepidemiological indicatorscountNot recorded
simulation_plotepidemiological indicatorsNot recordedPNG
results_workbookepidemiological indicatorsNot recordedxlsx

Experiment protocol

A typical run constructs cv.Sim with default parameters, advances the simulation for 60 days at a one-day timestep, and may plot or save results.

Timestep
1 day
Duration
60 day
Observables
new infectionscumulative infectionsdeathseffective reproduction number

Runtime environment, dependencies, and compute requirements.

Language
Python >=3.11
Environment
native

Covasim advances with a one-day timestep. Fire-based bin scripts expose function arguments as CLI options; the package also provides an importable Python API (cv.Sim).

Compute requirements

GPU
Not required
Parallelism
multi-process

Dependencies

runtime
  • numpy
  • numba
  • pandas
  • scipy
  • statsmodels
  • matplotlib
  • sciris >=3.4.0
  • starsim >=3.7.2
optional
  • fire
  • pytest >=7.3

Containers

  • docker · docker.io/mismplatform/envbuild@sha256:cff512c840c7ed43e47f7918d5ae83808450feef7d9853b2bad3c05ca4c0fe5f · docker.io

Image approved · envbuild-agent · Oct 2026

Entry points

  • python bin/covasim

    Run a Covasim simulation through the Fire CLI

  • covasim-migrate3to4 <paths>

    Migrate Covasim v3 scripts to v4

    paths
    Files or folders to migrate
    --apply
    Change files instead of only showing changes
  • python bin/covascens

    Run Covasim scenarios through the Fire CLI

  • python examples/run_sim.py

    Run and plot a configured simulation example

  • python examples/run_scenarios.py

    Run intervention scenarios and plot uncertainty

  • python examples/calibration/sweep.py

    Run a calibration sweep

  • python examples/cruise_ship/cruise_ship.py

    Run the Diamond Princess cruise ship application

Tests

pytestcd tests && pytest

Artifacts stored with this model.

  • 116 KB
  • 4.5 KB
  • 3.4 KB
  • 5.5 KB
  • 30 KB
  • 9.8 KB
  • 1.1 KB
  • 8.0 KB
  • 5.6 KB
  • 2.1 KB
  • 11 KB
  • 18 KB

Identifiers and integrity.

Metadata review
Approved · 1da614bf-946a-4400-a0be-4fd0f1d00f74 · Oct 2026
Contacts
External IDs
  • url:https://github.com/starsimhub/covasim
MISM — Multiscale Immune Systems Modeling

Multiscale Model Portal

Research reported on this website is supported by the National Institute of Allergy and Infectious Diseases (NIAID) of the National Institutes of Health under award number U54AI191253. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.

© 2026 Multiscale Immune Systems Modeling. All rights reserved.

Privacy Policy