autosim.simulations.epidemic#
SIR epidemic simulator and ODE helper functions.
- class Epidemic(parameters_range=None, output_names=None, log_level='progress_bar')[source]#
Bases:
SimulatorSimulator of infectious disease spread using the SIR model.
The compartment dynamics are:
\[\begin{split}\begin{aligned} \frac{dS}{dt} &= -\beta S I / N \\ \frac{dI}{dt} &= \beta S I / N - \gamma I \\ \frac{dR}{dt} &= \gamma I \end{aligned}\end{split}\]The simulator returns the peak infection rate as a fraction of the total population.
- Parameters:
log_level (str)
- simulate_epidemic(x, N=1000, I0=1)[source]#
Simulate an epidemic using the SIR model.
The compartment dynamics are:
\[\begin{split}\begin{aligned} \frac{dS}{dt} &= -\beta S I / N \\ \frac{dI}{dt} &= \beta S I / N - \gamma I \\ \frac{dR}{dt} &= \gamma I \end{aligned}\end{split}\]- Parameters:
- Returns:
The peak infection rate as a fraction of the total population.
- Return type: