The model is the classic SIR system: dS/dt = −βSI, dI/dt = βSI − γI, dR/dt = γI with γ = 1/(infectious period) and β = R·γ, where R = R0 · (1 − masks)(1 − hygiene)(1 − distancing). Vaccination moves a fraction coverage×protection of people to an immune pool before the outbreak. The dashed lines are the deterministic RK4 solution; the solid lines are one random run of 600 people.
Herd immunity: the epidemic cannot grow when R·S < 1, i.e. immune share > 1 − 1/R. Final size: S∞ = S0·exp(−R·(1 − w − S∞)). The epidemic peaks exactly when S = 1/R.
Simplifications: everyone mixes equally (the drifting dots are only for display), no latent period, no births/deaths, no age or network structure, constant measures, protection is all-or-nothing. The percentages for masks and hygiene are illustrative, not measured effects. Educational model, not a forecast.