Epidemic Simulation

Model and simulate the spread of an epidemic.

← Differential Equations projects

Learn Mathematics Differential Equations

Question

How can the flow between population groups help us predict an epidemic?

Goals

  • Build and modify an SIR model for the spread of disease.
  • Compare simulated curves with real data and test changes in transmission.

Method

Turn the movement of people between health groups into a system of equations.

  • Define susceptible, infected, and recovered groups with transmission and recovery rates.
  • Solve the system numerically with Euler's method or a Runge–Kutta method.
  • Change the rates, compare the results with data, and discuss what the model leaves out.

Try an example

An agent-based epidemic example in which contact changes agents from healthy to exposed, infected, and recovered.

Controls: Press Enter to start. The colours show each agent’s current state.