Epidemiology simulator
Outbreak Lab
The Kermack-McKendrick SIR model (1927) splits a population into Susceptible, Infected, and Recovered, then evolves it by a transmission rate beta and a recovery rate gamma. This run drives a fast disease: beta = 0.5, gamma = 0.1, so R0 = 5.
How to read it: the infected wave (red) rises as susceptibles (blue) are consumed, peaks near day 15 with ~48% of the population sick at once, then decays as the recovered pool (green) fills. Only 0.7% are ever spared.
Infected wave - I(t), every 5 days
| day | S% | I% | R% | wave |
|---|---|---|---|---|
| 0 | 99.0 | 1.0 | 0.0 | |
| 5 | 91.7 | 6.8 | 1.5 | |
| 10 | 60.8 | 29.4 | 9.7 | |
| 15 | 21.7 | 47.9 | 30.4 | |
| 20 | 7.0 | 40.0 | 53.0 | |
| 25 | 3.0 | 27.3 | 69.7 | |
| 30 | 1.7 | 17.5 | 80.8 | |
| 35 | 1.2 | 11.0 | 87.8 | |
| 40 | 1.0 | 6.9 | 92.1 | |
| 45 | 0.9 | 4.3 | 94.9 | |
| 50 | 0.8 | 2.6 | 96.6 | |
| 60 | 0.7 | 1.0 | 98.3 | |
| 80 | 0.7 | 0.1 | 99.2 | |
| 100 | 0.7 | 0.0 | 99.3 |
The peak height matches the SIR approximation 1 - (1 + ln R0)/R0 ~= 47.8% for R0 = 5.
Raw program output (100 days, dt = 1 day)
OUTBREAK LAB - SIR epidemic curve simulator
powered by OnlyCSharp 1.8 - Medicine.Epidemiology (SirModel + OutbreakMetrics)
==============================================================================
Model parameters : beta = 0.50 gamma = 0.10 dt = 1.0 day
Initial state : S(0) = 99.0% I(0) = 1.0% R(0) = 0.0%
Basic reproduction number R0 = beta / gamma = 5.00 (500.0%)
Herd-immunity threshold HIT = 1 - 1/R0 = 0.800 (80.0%)
==============================================================================
Day S% I% R% Infected wave (I%) - one '#' per (int)(I*60)
--------------------------------------------------------------------------
0 99.0% 1.0% 0.0%
5 91.7% 6.8% 1.5% ####
10 60.8% 29.4% 9.7% #################
15 21.7% 47.9% 30.4% ############################ <- peak
20 7.0% 40.0% 53.0% ########################
25 3.0% 27.3% 69.7% ################
30 1.7% 17.5% 80.8% ##########
35 1.2% 11.0% 87.8% ######
40 1.0% 6.9% 92.1% ####
45 0.9% 4.3% 94.9% ##
50 0.8% 2.6% 96.6% #
55 0.8% 1.6% 97.6%
60 0.7% 1.0% 98.3%
65 0.7% 0.6% 98.7%
70 0.7% 0.4% 98.9%
75 0.7% 0.2% 99.1%
80 0.7% 0.1% 99.2%
85 0.7% 0.1% 99.2%
90 0.7% 0.1% 99.3%
95 0.7% 0.0% 99.3%
100 0.7% 0.0% 99.3%
PEAK: day 15 - 47.9% of the population infected at once.
FINAL STATE at day 100:
Susceptible (never infected) : 0.7%
Infected (still active) : 0.0%
Recovered (infected & immune) : 99.3%
Check S + I + R : 100.0% (should be ~100%)