Extra: Mathematical model of an infectious disease

(Adapted from Python2 Kurs, G: Duckeck, A. Mann)

Consider the SIR model characterized through the following coupled systems of ordinary differential equations:

with the boundary condition that the total number of individuals N is the sum of S, I, and R and constant:
\bgroup\color{dgreen}$N=S+I+R$\egroup

Herein are:

We have a ROOT/C++ Notebook SIRModelRoot.ipynb which numerically solves the differential equations for the SIR model and visualizes it in ROOT.

Your tasks:

The SIR model is one of the simplest of a group of compartmental models in theoretical biology.

There is also an older stand-alone C++ version (but it requires a graphical desktop connection to do the visualization):
The header file ODESolv.h provides a relatively simple class and interface to solve ordinary differential equations (ODE) based on the predictor-corrector method.

ODESir.C implements the calculation of the derivatives for the SIR model and performs the calculation.

For visualization it uses in addition the header file matplotlibcpp.h which implements an easy-to-use plotting interface to Python matplotlib (matplotlib-cpp).

To compile and link execute:
g++ -o ODESir ODESir.C -I/usr/include/python2.7 -lpython2.7