a, Three population groups in the model. b, The trajectory of S (black), I (orange) and R (blue) for an outbreak with R0 = 2 and 1/γ = 14 days (β = R0γ = 0.14/day). Values at end of traces show cumulative epidemic size (R(∞) = 80%), fraction escaping infection (S(∞) = 20%) and peak infection rate (Imax = 15%, dashed orange line), which occurs at S = 1/R0 = 0.5 and t = 95 days (black dashed line). Initial SIR conditions were S(0) = 0.999 and I(0) = 0.001, R(0) = 0, implying a population size of 1,000. Trajectories are computed numerically for 100 time steps. c, Same as b but for a more serious outbreak with R0 = 3 (β = 0.21/day).