🏥 SEIR Epidemic Model — Exposed & Intervention Dynamics

Extend the classic SIR model with an Exposed compartment (SEIR) to model incubation periods and pre-symptomatic spread. Compare intervention strategies — lockdowns, mask mandates, and vaccine rollout — to see how they flatten the curve and reduce total cases.

Peak I: %
Attack rate: %
Days to peak:
Herd imm. p_c: %
R_eff:

Physics / Epidemiology

SEIR model: dS/dt = −β·S·I/N; dE/dt = β·S·I/N − σ·E; dI/dt = σ·E − γ·I; dR/dt = γ·I. The incubation period 1/σ captures the time between exposure and becoming infectious. R₀ = β/γ. Interventions reduce β: lockdown ×0.4, masks ×0.7. Herd immunity threshold: p_c = 1 − 1/R₀. The SEIR model better captures diseases like COVID-19 (σ = 1/5 days) where infected people are contagious before showing symptoms.

About Epidemic SEIR Model

The SEIR model divides a population into four compartments: Susceptible (S), Exposed (E), Infected (I), and Recovered (R). Individuals move through these states as a disease spreads: susceptible people become exposed through contact with infected individuals, exposed people become infectious after an incubation period, and infectious individuals eventually recover and gain immunity. The model is described by a system of ordinary differential equations governing the flow rates between compartments.

The basic reproduction number R₀ is the average number of secondary infections produced by one infected person in a fully susceptible population. When R₀ > 1 the epidemic grows exponentially; when R₀ < 1 it dies out. The herd immunity threshold—the fraction of the population that must be immune to prevent epidemic growth—is 1 − 1/R₀. For measles (R₀ ≈ 15) this requires ~93% immunity; for COVID-19 (R₀ ≈ 3–5) it requires ~67–80%.

This simulator lets you adjust transmission rate β, recovery rate γ, incubation rate σ, and initial conditions to observe epidemic curves, peak timing, and final epidemic size. Explore how vaccination (reducing S) or contact reduction (reducing β) can flatten the curve, delay the peak, or prevent an outbreak entirely—insights critical for public health decision-making.

Frequently Asked Questions

What does R₀ mean and why is it important?

R₀ (the basic reproduction number) is the expected number of new infections caused by a single infectious person in a population where everyone is susceptible. An R₀ greater than 1 means each person infects more than one other on average, so the epidemic grows. An R₀ below 1 means the disease will die out naturally. R₀ determines the scale of outbreak, required vaccine coverage, and effectiveness of interventions.

What is the difference between the SEIR and simpler SIR models?

The SIR model has three compartments (Susceptible, Infected, Recovered) and assumes people become immediately infectious upon exposure. SEIR adds the Exposed (E) compartment to represent the incubation period—the delay between infection and becoming contagious. This delay is crucial for diseases like COVID-19, influenza, or measles where the incubation period significantly affects the shape and timing of epidemic curves.

How does vaccination change the epidemic dynamics?

Vaccination moves individuals directly from Susceptible to Recovered (or Immune), effectively reducing the starting size of the susceptible pool. As more people are vaccinated, the effective reproduction number Rₑ = R₀ × (S/N) decreases. Once Rₑ falls below 1—the herd immunity threshold—the epidemic cannot sustain itself, protecting even unvaccinated individuals through indirect immunity.

Why does the epidemic curve have a single peak and then decline?

At the start, almost everyone is susceptible, so each infected person easily infects others and the epidemic grows. As infections accumulate, the susceptible pool shrinks—infected people increasingly encounter immune individuals. Eventually Rₑ drops below 1 and new infections occur more slowly than recoveries, causing the infected compartment to peak and then decline. The timing and height of the peak depend on R₀ and population size.

What are the limitations of SEIR models?

SEIR models assume a well-mixed homogeneous population where every person has an equal probability of contacting any other person. Real populations have age structure, spatial clustering, household networks, and behavioral heterogeneity. More advanced models incorporate network structure, age-stratified contact matrices, and stochastic effects for small populations. Despite these simplifications, SEIR models accurately capture the qualitative dynamics of many epidemic outbreaks.

What does the Incubation 1/σ slider control, and why does it delay the epidemic without changing its final size?

1/σ (1 to 14 days) is the average time a person spends Exposed but not yet infectious before moving into the Infectious compartment. A longer incubation period stretches out the timeline of the whole epidemic and delays the peak, because people take longer to start transmitting after being exposed, but it does not change R₀ or the fraction of the population that ultimately gets infected — that outcome is governed by R₀ alone in the simplified SEIR model.

How does the Infectious 1/γ slider affect the shape of the epidemic curve?

1/γ (3 to 21 days) sets how long an infected person remains contagious before recovering. Since R₀ = β/γ in the underlying model, changing 1/γ while holding R₀ fixed on the slider actually adjusts the transmission rate β to compensate — but a longer infectious period on its own (if R₀ were not re-normalised) would mean each person has more opportunities to spread the disease, producing a taller and more prolonged outbreak.

What does the Vax rate slider do, and why does a small percentage per day matter so much?

Vax rate (0 to 2%/day) moves that fraction of the Susceptible compartment directly into Recovered every simulated day, before those people ever have a chance to be exposed. Because this steadily shrinks S/N, even a modest daily rate compounds over the weeks of an outbreak, pushing the effective reproduction number Rₑ = R₀ x (S/N) below 1 sooner and flattening or fully preventing the epidemic peak if vaccination starts early enough relative to R₀.

Why does setting R₀ below 1 prevent an outbreak from happening at all?

With R₀ below 1, each infectious person on average infects fewer than one other person even when the whole population is susceptible, so the chain of transmission shrinks with every generation instead of growing. Dragging the R₀ slider (0.5 to 15) below 1 shows the Exposed and Infectious compartments barely rise above their initial seed values before decaying back toward zero, rather than producing the characteristic epidemic bump.

Why do higher R₀ values produce a taller but narrower epidemic peak?

A higher R₀ means each infected person spreads the disease to more people per generation, so the Exposed and Infectious compartments grow faster in the model's exponential early phase. But faster growth also burns through the Susceptible pool more quickly, so Rₑ = R₀ x (S/N) crosses below 1 sooner in absolute time — the result is a sharper, higher peak that occurs earlier and resolves faster than a low-R₀ epidemic of the same population.