This micro-course introduces how to use ‘events’ in the R package deSolve. The ‘events’ function can be used to implement changes in the model at fixed times. In this example, we illustrate how to add vaccination at fixed time points in an SIR model.
If you are unfamiliar with the R package deSolve, there is a prerequisite micro-course (Implementing ODEs in R) which covers the relevant background.
Events in deSolve
SIR model dynamics
Vaccination as an event