Elysia Tools

Browse tools, examples, visual explainers, and topic guides from one clear workspace.

Top Categories

Hubs

Language
ZHESPTRUFRDEEN

Elysia Tools

Navigation

Health

SIR SEIR Compartmental Epidemic R0 and Intervention Modeling Coach

· Last updated:2026-09-10

This tool is for informational purposes only and does not constitute medical, financial, or legal advice; consult a qualified professional for advice.

Run SIR / SEIR / SEIR+V / SEIR+H ODEs with RK4: R0, herd-immunity threshold, analytic peak and final-size equations, growth-rate conversion, WAIFW next-generation-matrix R0, incidence fitting and intervention simulation.

Details

What this tool helps you do

A deterministic compartmental coach for learning and teaching infectious-disease dynamics.

Models: SIR, SEIR, SEIR+V (vaccination S→V) and SEIR+H (hospitalization arm I→H→R), solved with classic RK4 at a 0.05-day step. Derived quantities: R0 = β/γ, post-intervention effective R0, herd-immunity threshold 1−1/R0, analytic SIR peak I/N = 1−(1+lnR0)/R0, final size z = 1−e^(−R0·z), and the exact growth-rate relation R0 = 1+r/γ (SIR) or (1+r/σ)(1+r/γ) (SEIR, Wallinga–Lipsitch).

Optional inputs: a "day,incidence" series triggers a grid + coordinate-descent least-squares fit of (R0, reporting fraction, I0) with a log-linear growth-rate cross-check; a WAIFW matrix (e.g. "10 2; 2 1") computes the age-stratified next-generation-matrix R0 = ρ(βij/γj) by power iteration; intervention day + beta reduction, vaccination campaign, and a hospital arm with LOS show policy trade-offs on the curve.

Execution

Run this tool

Fill in the form, run the tool, and review the result in one place.

Samples

Examples that match this tool

Related

Continue with connected tools and hubs

Written by the Elysia Tools team

Tool usage guide

Learn when to use this tool, what it supports, and how real users apply it.

Key facts

Category
Health
Input types
select, number, textarea
Output type
html
Sample coverage
4
API ready
Yes

Overview

The SIR SEIR Compartmental Epidemic Modeling Coach integrates deterministic disease dynamics (SIR, SEIR, SEIR+V, and SEIR+H) using a 4th-order Runge-Kutta (RK4) solver. It calculates key epidemiological metrics—including R0, herd-immunity thresholds, analytic peak timing, final outbreak size, and growth-rate conversions—while supporting empirical incidence fitting, next-generation WAIFW matrices, and public health intervention scenarios.

When to use

  • Simulating infectious disease dynamics to project infection peaks, attack rates, and hospital bed occupancy across customizable horizons.
  • Estimating the basic reproduction number (R0) and reporting rates from reported daily incidence time series using least-squares optimization.
  • Evaluating the epidemiological impact of non-pharmaceutical interventions, vaccination rollouts, or structured age-contact matrices.

How it works

  1. 1Select the compartmental model (SIR, SEIR, SEIR+V, or SEIR+H) and configure baseline parameters such as population size, R0, infectious period, and latent duration.
  2. 2Optionally enter intervention parameters (transmission beta reduction, vaccination rate, hospitalization fraction and LOS), a contact matrix (WAIFW), or empirical incidence data.
  3. 3The solver computes compartment trajectories via classic RK4 integration at a 0.05-day step size while evaluating analytic milestones and optimization routines.
  4. 4Review the interactive HTML report featuring dynamic compartment curves, effective Rt metrics, herd-immunity thresholds, and fitting diagnostics.

Use cases

  • Healthcare capacity planning to estimate peak hospitalizations and bed occupancy under varying lengths of stay.
  • Epidemiological education to illustrate analytical final size relations, herd immunity thresholds, and Wallinga–Lipsitch growth conversions.
  • Outbreak analysis to calibrate transmission rates (R0) and reporting fractions against observed case counts.

Examples

1. SEIR Outbreak with Mid-Course Transmission Reduction

Epidemiologist

Background

An analyst is assessing how a 40% reduction in transmission starting on day 40 will mitigate an emerging pathogen in a population of 1,000,000.

Problem

Determine post-intervention effective reproduction number, shift in peak burden, and final attack rate.

How to use

Select the SEIR model, specify R0 = 2.5, 5-day infectious period, 3-day latent period, and set intervention start to day 40 with a 40% beta reduction.

model=SEIR, population=1000000, r0=2.5, infectiousDays=5, latentDays=3, initialInfectious=10, days=180, interventionDay=40, interventionBetaReduction=40

Outcome

Generates epidemic trajectories showing the reduced Rt, the delayed lower peak, and the updated final epidemic size compared against theoretical benchmarks.

2. Fitting R0 from Early-Stage Incidence Data

Public Health Researcher

Background

A research team has 14 days of reported case numbers from a newly reported respiratory cluster in a city of 100,000.

Problem

Estimate the underlying R0, case reporting fraction, and initial infectious seed from empirical notifications.

FAQ

Which numerical integration method does the simulator use?

It uses a classic 4th-order Runge-Kutta (RK4) integration algorithm solved at a fixed step size of 0.05 days.

How are the SIR and SEIR models differentiated?

SIR transitions susceptible hosts directly to infectious status, while SEIR includes an explicit latent compartment (Exposed) parameterized by the latent period.

How does incidence fitting estimate R0 and initial cases?

It performs grid and coordinate-descent least-squares fitting over R0, reporting fraction, and I0, accompanied by a log-linear growth-rate regression.

What is calculated when supplying a WAIFW matrix?

The tool builds the next-generation matrix from age-stratified transmission rates and computes the spectral radius (R0) using power iteration.

How do vaccination and hospitalization parameters alter the compartments?

SEIR-V transfers a daily percentage of susceptible individuals to a protected compartment (V), while SEIR-H diverts infectious cases into a hospital compartment (H) governed by length of stay.

Home
Tools3197
Samples593
Visualizations461
Viewers103
Hubs229
Tags333
Images, Audio & Video655

Image, audio, and video processing, conversion, and optimization tools

Math, Date & Finance644

Calculators, numerics, date logic, statistics, and finance tools

Design & Color296

Color, layout, graphics, visual styling, and design helper tools

Text & Writing209

Writing, cleanup, formatting, extraction, and text analysis tools

Developer & Web193

Developer utilities, networking, web debugging, and automation helpers

Conversion & Encoding175

Format, file, archive, unit, and encoding conversion tools

UI Screenshot Structure Review and Development Handoff
Piano Sketch Creation, MIDI Review and Listening Demo Handoff
Retro Game Texture Review and Asset Handoff
Screenshot-Based Procedure Guide Review and Handoff
Responsive Page Change Review and Evidence Handoff

© 2026 Elysia Tools. All rights reserved.

DocsPricingAboutTerms of ServicePrivacy PolicyCookiesContact
Python

Web Image Processing Python Samples

Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion

Java

Android Image Processing Java Samples

Android Java image processing examples including reading/saving images, scaling, and format conversion

Kotlin

Android Image Processing Kotlin Samples

Android Kotlin image processing examples including reading/saving images, scaling, and format conversion

Rust

Web Image Processing Rust Samples

Web Rust image processing examples including image read/save, scaling, and format conversion

Health

Base Excess Calculator (Metabolic Component)

Calculate base excess (BE) using the Siggaard-Andersen formula. BE < −3 metabolic acidosis, > +3 metabolic alkalosis. HCO₃⁻ auto-calculated from pH + PaCO₂ if omitted. Derived from Siggaard-Andersen 1974, Cornell PICU, Medscape, and Langer 2022. Not medical advice.

Health

Blood Gas Acid-Base Interpretation (AG / ΔAG)

Complete ABG analysis: pH, primary disorder, compensation (Winter's formula), anion gap ± albumin correction, delta ratio for mixed disorder detection. Derived from Emmett 2016, Kraut 2007, Rastegar 2007, LITFL, MDCalc, and Adrogué 1998. Not medical advice.

Health

Caprini Score (VTE Risk, 2005)

Calculate the 2005 Caprini Risk Assessment Model to stratify venous thromboembolism (VTE) risk in surgical patients. ~40 items weighted 1/2/3/5 points: 1 point (age 41-60, minor surgery, BMI >25, swollen legs, varicose veins, pregnancy/postpartum, recurrent miscarriage, OCP/HRT, sepsis <1mo, lung disease/pneumonia <1mo, COPD, acute MI, CHF <1mo, bedridden, medical bed rest, IBD); 2 points (age 61-74, arthroscopic surgery, major open surgery >45min, laparoscopic >45min, malignancy, bed >72h, plaster cast, central line); 3 points (age ≥75, personal/family VTE history, factor V Leiden, prothrombin 20210A, lupus anticoagulant, anticardiolipin, homocysteine, HIT, other thrombophilia); 5 points (stroke <1mo, elective major lower-extremity arthroplasty, hip/pelvis/leg fracture <1mo, acute spinal cord injury <1mo, multiple trauma <1mo). Management tiers: 0 lowest, 1-4 low-moderate (mechanical), 5-6 high (consider LMWH 7-10d), 7-8 high (LMWH 7-10d), ≥9 highest (LMWH 30d). Derived from Caprini 2005. Not medical advice.

Health

CHA₂DS₂-VASc Score (AFib Stroke Risk)

Calculate the CHA₂DS₂-VASc score to stratify stroke risk in non-valvular atrial fibrillation and guide oral anticoagulation. Components: Congestive heart failure/LV dysfunction (+1), Hypertension (+1), Age ≥75 (+2), Diabetes (+1), prior Stroke/TIA/thromboembolism (+2), Vascular disease — prior MI/PAD/aortic plaque (+1), Age 65–74 (+1), Sex category female (+1). Range 0–9 (women) / 0–8 (men). Thresholds: men ≥2 or women ≥3 → recommend oral anticoagulation (DOAC preferred over warfarin); men 1 or women 2 → consider anticoagulation; men 0 or women ≤1 → omit. Female sex alone is not an independent risk factor (score 1 from sex alone is treated as 0). Includes an approximate annual stroke-risk estimate (Lip 2010 derivation cohort). Derived from Lip 2010 (Chest), 2019 AHA/ACC/HRS update, and 2023 ACC/AHA/ACCP/HRS AF guideline. Combine with bleeding risk (HAS-BLED) and shared decision-making. Not medical advice.

How to use

Choose SEIR, enter infectious and latent durations, and paste the daily notification counts into the incidence input box.

model=SEIR, population=100000, infectiousDays=5, latentDays=3, fitData="1,10\n2,14\n3,22\n4,34\n5,50\n6,75\n7,110\n8,160\n9,240\n10,350\n11,520\n12,760\n13,1100\n14,1600"

Outcome

Provides a fitted R0, estimated reporting fraction, RMSE metrics, observed vs. fitted curves, and exponential growth rate validation via Wallinga–Lipsitch equations.