SIR Agent-Based Simulation

0.15
0.020
3

Agent-Based SIR Model

S (white) = Susceptible — can be infected.   I (red) = Infected — contagious.   R (green) = Recovered — immune.
Dots move randomly. Infected dots near susceptible ones transmit disease with probability β per frame. Infected dots recover spontaneously with probability γ per frame.

SIR Population Curves

0.15
0.020
500

Differential SIR Equations

dS/dt = -β·S·I/N   dI/dt = β·S·I/N - γ·I   dR/dt = γ·I

The peak of the red curve is when the healthcare system is most stressed. R₀ = β/γ — if >1, epidemic grows; if <1, it fades.

Flattening the Curve — Interventions

OFF
0%

Interventions

Social distancing — reduces movement speed, lowering contact rate and effective β.
Vaccination — converts susceptible dots directly to recovered (immune) at start.
Quarantine — infected individuals stop moving, reducing transmission dramatically.

Epidemiology Parameters

0.15
0.020

Your Parameters

Historical R₀ Values

MeaslesR₀ ≈ 12–18
Whooping coughR₀ ≈ 12–17
ChickenpoxR₀ ≈ 10–12
MumpsR₀ ≈ 4–7
COVID-19 (Delta)R₀ ≈ 5–6
COVID-19 (original)R₀ ≈ 2–3
Seasonal fluR₀ ≈ 1.3
EbolaR₀ ≈ 1.5–2.5
SARS (2003)R₀ ≈ 2–5

Key Formulas

R₀ = β / γ  —  Basic reproduction number (avg new infections per infected person)
Herd immunity threshold = 1 − 1/R₀  —  Fraction of population that must be immune to stop spread
Peak infection time ≈ ln(N·β/γ) / (β−γ)