SIR Compartmental Model
The SIR model is a compartmental model which is comprised of three main compartments: susceptible (S), infected (I), and recovered (R). Additionally, discovered (D) and hidden (H) compartments keep track of the number of infected or recovered that have been discovered. The population is divided into “groups” which interact with one another. Every generation in the simulation, some people move from susceptible to infected based on internal group interactions and an external outside rate of infection. The length of a generation is referred to as a generation time. A person infected in one generation will be recovered by the next. Furthermore, people move from hidden to discovered based on an infection discovery and recovered discovery fraction. The infection discovery fraction denotes the fraction of infected population that is discovered in the generation in which they are infected. The recovered discovery fraction denotes the fraction of the hidden recovered population that become discovered in every generation. This is non-standard and arises from a desire to model the “discovery” of infections as a result of testing.
Mathematically, let
be the number of groups and
be the
number generations to simulate. Let
,
,
,
, and
be
by
matrices such that
is the number of people in group
susceptible during
generation
. State variables in SIR models are usually fractions
of an overall population but these are counts. Let
be a
by
matrix encoding the interactions between groups such that
is the number of infections in group
caused by a
single infection in group
. Let
be the vector representing
the outside rate of infection such that
is the count of infections
per generation time occurring in group
as a result of outside
infection. Lastly, let
and
be the vectors representing the
infection and recovered discovery fractions respectively.
Given a state at generation
, the following state at generation
is given as follows.
|
|
|
|
|
|
|
|
|
|
The simpar.sim module implements this exact SIR model.
![S[t+1] =](../_images/math/18ef69ffaa1f6480568a45c57728b28b2bf91207.png)
![S[t] - I[t+1]](../_images/math/6913611a72be6b887eef5386af4f33fe562019b3.png)
![I[t+1] =](../_images/math/8d6ca51636013f6216aadc1edc3d7cfcfc45128a.png)
![\min((I[t]A + o) * (S[t] / (S[t] + I[t] + R[t])), S[t])](../_images/math/50b34a1cc918bbe64149db4c4364961c2e9e5f93.png)
![R[t+1] =](../_images/math/51f2cad1e7f3dd6cecb6c79c50384c3dbd1f8971.png)
![R[t] + I[t]](../_images/math/015291a64872f8cfa0261d6c376cad3d46c1f42e.png)
![D[t+1] =](../_images/math/a2348a7e74a918b02e8f69e0e869b47b55478eb0.png)
![D[t] + a \cdot I[t+1] + r \cdot H[t]](../_images/math/1b8e1ab9e861394786e6e103c85e763c7e4c06d1.png)
![H[t+1] =](../_images/math/0c33485f3b0903d639f97435c1bdc20719b7944f.png)
![(1-a) \cdot I[t+1] + (1-r) \cdot H[t]](../_images/math/6c096c92b08f1777463c9d8bd9a3aba55b45656a.png)