# Program 3.5 SEIR model with multiple E and I classes

The final program in this section considers heterogeneity in the exposed and infectious cases, effectively using the time-since infection to descriminate differences in behaviour. This formulism means that we have far greater control over the distribution of times that an individual remains in the exposed and infectious classes. The basic equations for a disease with m exposed classes and n-m infectious classes is:

When n=2 and m=1 we return to the standard SEIR model, with exponentially distributed periods; however as n and m become large the distributions become closer to fixed times.

**Parameters**

β | is the transmission rate and incorporates the encounter rate between susceptible and infectious individuals together with the probability of transmission. |

γ | is called the removal or recovery rate, though often we are more interested in its reciprocal (1/γ) which determines the average infected period. Note that movement between classes is scaled by n to maintain the average infected period even when the number of stages changes. |

μ | is the death rate and we assume that ν=μ |

n | is the number of stages in the infected period. |

m | is the number of stages in the exposed period. |

S(0) | is the vector of initial proportions of the population that are both susceptible |

I(0) | is the vector of initial proportions of the population that are both infected ( I_{i}(0)=I(0)/n ) |

All rates are specified in days.**Requirements**.

All parameters must be positive, S(0) + I(0) ≤ 1, m < n_{}**Files**

C++ Program, Python Program, Fortran Program, Parameters, MATLAB Code.