Skip to content

Pandemic Simulator - Compartmental Models

A library of compartmental disease models in the WHO Pandemic Simulator.

For Modelers

Describe a model once -- its compartments, the flows between them, and the parameters it takes -- and the framework builds everything else from that description:

  • the file the web app reads to build its input forms and store model settings
  • the checks that catch a bad or incomplete configuration before a run starts
  • a ready-to-run example configuration, filled in with sensible defaults

You can use functions from any of the existing models, or write your own custom model -- see the Model Integration Documentation to get started. - Parameter Framework Reference -- all available parameter types, the ParameterSchemaBuilder API, and ValueType options

API Reference

Module Description
Parameter Framework ParameterSchemaBuilder, ValueType, ParameterDef, and all schema dataclasses
Base Model Model ABC -- the base class all disease models extend
Interventions JAX-compatible intervention functions for modifying transmission rates

Disease Models

Model Module Description
Novel Respiratory (SEIHDR) covid_jax_model An SEIHDR compartmental model for novel respiratory diseases with age-stratified transmission
Novel Respiratory (SEIHR) covid_jax_model.variants An SEIHR compartmental model for novel respiratory diseases with age-stratified transmission
Novel Respiratory (SEIDR) covid_jax_model.variants An SEIDR compartmental model for novel respiratory diseases with age-stratified transmission
Novel Respiratory (SEIR) covid_jax_model.variants An SEIR compartmental model for novel respiratory diseases with age-stratified transmission
Novel Respiratory (SIHDR) covid_jax_model.variants An SIHDR compartmental model for novel respiratory diseases with age-stratified transmission
Novel Respiratory (SIHR) covid_jax_model.variants An SIHR compartmental model for novel respiratory diseases with age-stratified transmission
Novel Respiratory (SIDR) covid_jax_model.variants An SIDR compartmental model for novel respiratory diseases with age-stratified transmission
Age-Stratified SIR (per-age transmission) age_stratified_sir_model An SIR model in which each age group has its own transmission rate, with age mixing through a contact matrix and spatial mixing through a travel matrix.
Novel Respiratory (SIR) covid_jax_model.variants An SIR compartmental model for novel respiratory diseases with age-stratified transmission
Example SIR basic_sir_model A simple SIR model with frequency-dependent transmission
Ebola Virus Disease ebola_jax_model Discrete-time stochastic SEIR model with hospitalisation and funeral transmission, Erlang(2) passage times via linear chain (Li et al. 2019, Getz & Dougherty 2018).
Ebola SEI1I2RD ebola_importation_model Ebola SEI(R)I(D)RD model with separate infectious strata for recovering and dying cases, used to estimate importation risk
Hantavirus (spatial spillover) hantavirus_jax_model Three-sector (urban / rural-populated / rural-empty) rodent-to-human hantavirus spillover model with explicit human and rodent commuting and residence-by-infection-site case bookkeeping (Cornejo-Donoso et al., PMC10536976).
Hantavirus (person-to-person + risk perception) hantavirus_human_jax_model SEIR hantavirus model coupling rodent-to-human spillover with Andes-virus person-to-person transmission and a dynamic risk-perception state that modulates both betas (Gutiérrez Jara & Muñoz Quezada, Medwave 2022).
MPOX mpox_jax_model A simple SIR compartmental model for MPOX
Respiratory disease with adaptive behavior based on reported (or hospitalized) cases respxiety_model A simple model of a respiratory disease with adaptive behavior determined by the number and rate of change of detected (reported or hospitalized) cases
Age-structured SEIcIscR (clinical/subclinical) wuhan_seir_model Age-structured SEIcIscR model of the Wuhan COVID-19 outbreak with clinical and subclinical infectious compartments and contact-matrix mediated transmission.
Dengue (4-serotype) dengue_jax_model A 4-serotype vector-borne dengue model with temperature-driven mosquito dynamics
Dengue (2-Strain) dengue_2strain_jax_model A two-strain dengue model with seasonal transmission, temporary cross-protective immunity, and antibody-dependent enhancement of secondary infections.
Chikungunya SIR Model chikungunya_sir_model A deterministic SIR model of chikungunya transmission with optional NPI and vaccination interventions.
Ebola (SEIHFR, Community/Hospital/Burial) — Legrand et al. 2007 ebola_seihfr_burial_legrand_model SEIHFR compartmental model of Ebola virus disease with explicit community, hospital, and traditional-burial transmission routes, fitted to the 1995 DRC and 2000 Uganda outbreaks (Legrand et al., Epidemiol. Infect. 2007).
ebola_seihfr_stochastic_lai_v1 ebola_seihfr_stochastic_lai_v1_model Stochastic (chain-binomial tau-leap) SEIHFR model of Ebola virus disease with explicit community, hospital, and traditional-burial transmission routes, based on Legrand et al. (Epidemiol. Infect. 2007). Demographic-noise counterpart of the deterministic ebola_test model. Defaults are the DRC (Kikwit) 1995 preset.
Example Disease with Parameter Uncertainty and Custom Equation example_parameter_uncertainty_custom_model A SIR model for an example disease with parameter uncertainty, a custom written equation and a ramped intervention
Example Disease with Declarative Parameter Uncertainty example_parameter_uncertainty_declarative_model A SIR model for an example disease with declarative parameter uncertainty
Example Disease with Spatial Mobility example_spatial_mobility_v2_model A spatial, age-structured SIR model with selectable inter-zone mobility, contact-matrix age mixing, and a single transmission rate
Example Disease with Stochasticity example_stochastic_model A stochastic SIR model for an example disease
Measles SEIR calibrated to the 2025 Texas outbreak (Gonzalez-Parra et al.) measles_seir_calibrated_gonzalezparra_model SEIR measles model whose transmission rate is calibrated to the 2025 Texas weekly case series (rising limb) via the dataset input, then simulated forward. The transmission rate is fixed by the data and is not a user input; the latent and infectious periods remain adjustable.
Test: COVID-19 Stochastic SIR test_covid_sir_stochastic A simple stochastic SIR model for COVID-19
Test: Klebsiella pneumoniae AMR test_klebsiella_amr_model Compartmental model for ESBL and carbapenem-resistant K. pneumoniae transmission across hospital and community settings (Kachalov et al. 2021)