CLADES v0.2 - Compartmental Lightweight Agent-based Disease Epidemiology Simulator

C++17 / Dear ImGui / SDL2 / OpenGL3  —  x86_64 Linux, cross-platform

Stochastic SEIVRD compartmental model with Ornstein-Uhlenbeck noise on β, age-stratified POLYMOD contact mixing, waning immunity, and vaccination sub-compartments. Results are 5-run ensemble averages.

Source (GitHub)  |  Build instructions  |  Model details

Screenshots
main tab

Fig. 1 — Main simulation tab

Left pane contains all model parameters. Right pane shows four plots after a run: S/E/I/R/V compartments, cumulative deaths with 10–90% ensemble band, active hospitalisations, and Rt.

  • 5-run stochastic ensemble, mean ± band plotted
  • Rt=1 threshold line
  • Live progress bar per ensemble run
  • INI import/export of all parameters
  • Full time series CSV export

Fig. 2 — Age-stratified mode

8 age bands (0–9 through 70+) with an editable 8×8 POLYMOD contact matrix. Per-group IFR, hospitalisation rate, and vaccine uptake. Separate plots for I(t), D(t), and Rt(t) per group.

  • POLYMOD 2008 / Prem 2017 default matrix
  • Symmetrise button (reciprocal contact correction)
  • Age summary table: peak I, peak day, total D per group
  • Separate age params INI file
age groups tab
Model

Extended SEIVRD compartmental model. Deterministic backbone with stochastic SDE layer (Ornstein-Uhlenbeck on β), integrated via Euler-Maruyama.

Force of infection

Homogeneous:    λ = β · (I + 0.3·E) / N

Age-stratified: λ_i = β · ∑_j C[i,j] · I_j / N_j      (WAIFW)

OU noise:       dβ = θ·(β_0 - β)·dt + σ·β·dW

Integration:    Euler-Maruyama,  dt = 0.5 d (configurable)

Compartments

SymbolDescriptionExits to
SSusceptibleE (infection), V (vaccination)
EExposed / latentI (at rate σ = 1/incubation)
IInfectiousR (1−IFR), D (IFR), both at rate γ
HHospitalised (flow tracker)resolved at 1/14 d, extra mort δ
RRecoveredS (waning ωr)
VVaccinatedE (breakthrough, efficacy-reduced), S (waning ωv)
DDead (absorbing)

Age-stratified extension

8 groups: 0–9, 10–19, 20–29, 30–39, 40–49, 50–59, 60–69, 70+. Contact matrix C[i,j] defaults to POLYMOD European average (Mossong 2008, Prem 2017). IFR follows a COVID-like age gradient as default; all values user-editable. Vaccination budget distributed proportionally to group-level uptake fractions, capped at configurable coverage ceiling per group.

Ensemble strategy

N_RUNS=5 independent Euler-Maruyama integrations from distinct MT19937-64 seeds. Time series averaged pointwise. 10th and 90th percentile bands computed per compartment. Removes single-seed luck without masking structural uncertainty.

Parameters

ParameterDefaultDescription
β0.3Baseline contact × transmission probability (per day)
σ0.21 / incubation period (E→I rate)
γ0.11 / infectious period
IFR0.01Infection fatality ratio
hosp_rate0.05Fraction of I requiring hospitalisation
ωr0.003Waning rate, recovered (~1 yr)
ωv0.002Waning rate, vaccinated
vax_rate0.0Daily fraction of S vaccinated
vax_eff0.85Vaccine efficacy against infection
season_amp0.0Cosine forcing amplitude on β
σOU0.05OU noise amplitude (fraction of β)
θOU0.1OU mean-reversion speed
Build

CMake 3.18+, C++17 compiler, OpenGL. SDL2 and Dear ImGui fetched automatically via FetchContent if not present on the system.

# Linux (primary target)
sudo apt install libsdl2-dev libgl-dev   # optional; FetchContent fallback
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
./build/clades

# Windows / macOS - identical
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

Source files

FileRole
model.hpp / model.cppHomogeneous SEIVRD integrator, ensemble runner, all core types
age_strat.hpp / age_strat.cppAge-stratified integrator, POLYMOD defaults, per-group ensemble
io.hpp / io.cppINI param save/load for base and age params
main.cppDear ImGui frontend, all UI panels, SDL2/OpenGL loop

Auto-fetched dependencies

LibraryVersionPurpose
Dear ImGui1.90.8Immediate-mode GUI
ImPlot0.16Plot widgets inside ImGui
SDL22.30.2Window, OpenGL context, input

CLADES — open source, C++17  |  github