Infection Models and their Simulation
(including CoViD-19 pandemic)


Classical models (selection) and their development

The spread of a disease depends on its biological properties and the contact situation of individuals with different effects (amongst others: contact duration, immune status, type of contact like touching or exchange of liquids) leading to single or combined probabilities of infection. Therefore in the following, "infection model" denotes the dynamics of a disease yet without direct processes between pathogen and host.

In mathematical epidemiology, one possibility of modeling infectious diseases would be to consider each individual (and not the group they belong to) and all contacts between individuals as singular events with certain rules. Agent-based modeling (ABM) offers one possibility for such a detailed description, [1, 2].

An alternative to this is to consider individuals of the same propperties as "well mixed" groups and to describe the probabilities as well as the type of contact with alternative mathematical terms and "macroscopic" parameters. The groups can also be referred to as compartments and in the present case are subpopulations. (Ordinary) differential equations whose state variables correspond to the groups and whose temporal solution corresponds to the simulation of these models can be used to describe the dynamic behavior of these subpopulations.

Historically, [3], there are different infection models of different degrees of detail that describe the spread of a disease and thus the temporal change of groups of a population with the help of differential equations, which reproduce very specific realistic effects. Typical and simple representatives of these models are presented below.

"SI" model

One classical infection model that describes the very fundamental transition from healthy to sick individuals is the SI model. "S" stands for "susceptible" (here also healthy) and "I" for "infectious" (here also sick). These two groups are linked by their constant total number (N = S+I = const.) and there is an irreversible transformation from healthy to sick (more realistic effects will be added in the models described later).

This model is built by two differential equations (actually, due to the constant total number, only one is actually necessary and the solution of the other results automatically at any point in time):

\begin{align} {\dot S} &= -\beta SI \\ {\dot I} &= \beta SI \\ &= \beta (N-I)I \end{align}

The healthy have a decreasing conversion rate $-\beta SI$, which depends on the interaction between healthy and sick as well as a parameter. The latter corresponds to the strength or the speed of infection. The equation for the sick person contains this rate with a positive sign, respectively. For the typical case that there are almost 100% healthy people at time point 0, the temporal solution has a sigmoid curve for both groups (logistic function), at the beginning of which there is exponential growth of the sick and at the end all healthy people have become sick (saturation or convergence curve):


"SIS" model

A possible extension of the SI model is that sick people can become healthy again, whereby the differential equations change as follows:

\begin{align} \dot{S} & =-\beta SI+bI\\ & =-\beta SI+\gamma I +\mu(N-S)\\ \dot{I} & =\beta SI-bI\\ & =\beta SI-\gamma I-\mu I \end{align}

One interpretation of this SIS model is that sick people generate an immune response, whereby they become healthy again. However, this is not a permanent immunity and a renewed illness is possible. This is done by the "total recovery rate" $bI$. An alternative, albeit unusual, interpretation would be the simultaneous existence of a recovery rate $\gamma I$, a birth rate $\mu (N-S)$, which repeatedly produces "new healthy people", and a death rate among the sick $\mu I$, which thus corresponds exactly to the birth rate.

Correspondingly, the time course of the two groups changes compared to the SI model in such a way that an equilibrium is established in the end that does not converge towards 100% sick people and 0% healthy people:


"SIR" model

An alternative extension of the SI model is the "spread of a disease with absolute immunity formation". A third state variable R is introduced, which includes individuals who can no longer become ill (here, too, there is a corresponding total number N = S+I+R = const.):

\begin{align} \dot{S} & =-\beta SI\\ \dot{I} & =\beta SI-\gamma I\\ \dot{R} & =\gamma I \end{align}

The abbreviation R stands either for "recovered" or for "removed" (from the group of sick people). The latter can happen in different ways and is a matter of interpretation, for example "removed by immunity" or "removed by death". In the former case, $\gamma I$ is thus an immunization rate. In contrast to the previous models, it becomes clear why here for S the term "susceptible" is more appropriate than "healthy".

The temporal solution of the SIR model typically looks like that for a certain period of time an increase in the number of sick people can be observed, which decreases again after a maximum, while at the same time the number of susceptible people converges towards 0% and the recovered ones towards 100%:


"SIRS" model

In the SIRS model, there are birth and death rates, but primarily it is assumed that immunity is not permanent and that the (temporarily) recovered can become susceptible again via a rate $fR$ (i.e. with a dynamic time delay):

\begin{align} \dot{S} & =-\beta SI+\mu(N-S)+fR\\ \dot{I} & =\beta SI-\gamma I-\mu I\\ \dot{R} & =\gamma I-\mu R-fR \end{align}

As a result of both effects, on the one hand, a characteristic time course of all three variables is established, and on the other hand, after some time and depending on the parameters, an equilibrium of the variables between 0% and 100% of the total population is established:


"SEIR" model

A typical effect in the spread of diseases is that an individual is already sick but is not (yet) able to infect susceptibles (the resulting latency period can, but does not have to coincide with the so-called incubation period). With the help of the SEIR model, this effect can be described by dividing the sick into two subgroups, namely the infected "E" and the infectious "I":

\begin{align} \dot{S} & =-\beta SI+\mu(N-S)\\ \dot{E} & =\beta SI -\varepsilon E -\mu E\\ \dot{I} & =\varepsilon E -\gamma I -\mu I\\ \dot{R} & =\gamma I-\mu R \end{align}

These two abbreviations stand for "exposed" and "infectious". To reproduce the effect described it is important, that the disease progress $\beta SI$ from S to E depends accordingly on I and not on E. After some time, the infected become infectious via the rate $\varepsilon E$, which in turn can become recovered by $\gamma I$.

Similar to the previous models with birth and death rates, an equilibrium is established between the 4 subpopulations here, too, after the desired effect of a delayed transition between these groups in an early phase of the infection:


CoViD-19 and the simulation of various scenarios



  1. [1] M. Niazi, A. Hussain: Agent-based computing from multi-agent systems to agent-based Models: a visual survey. In: Scientometrics, 89:479–499, 2011. doi: 10.1007/s11192-011-0468-9
  2. [2] L. Perez, S. Dragicevic: An agent-based approach for modeling dynamics of contagious disease spread. In: Int. J. Health Geogr., 8:50, 2009. doi: 10.1186/1476-072X-8-50
  3. [3] W. O. Kermack, A. G. McKendrick: A contribution to the mathematical theory of epidemics. In: Proceedings of the Royal Society of London A, 115:700–721, 1927. doi: 10.1098/rspa.1927.0118