This webpage uses the Runge-Kutta-Fehlberg fourth-order method with fifth-order error checking RKF45 to approximate the solution to the SEIRS equations:
dtdSdtdEdtdIdtdR=λN+ωR−μS−NβI(1−δ)S=NβI(1−δ)S−(μ+σ)E=σE−(α+γ+μ)I=γI−(μ+ω)R. Where:
S is the number of susceptible persons.
E is the number of exposed persons, that is those that have been exposed to the disease but have not yet become infectious.
I is the number of infectious persons.
R is the number of recovered persons.
α is the infection mortality rate. This does not perfectly align with how we usually use the term "mortality rate" as it is not just the rate of death per case of infection it is also per time. So more rapidly lethal infections would have a higher α than their slower counterparts.
β is a parameter that pertains to the average number of contacts per person per time and the rate of transmission for the disease.
γ is the inverse of the average time a person is infected with the disease. Diseases with faster recovery therefore have larger γ.
δ refers to the efficacy of quarantine effects. δ=0 means quarantine measures are completely ineffective. δ=1 means they are completely effective.
λ is the birth rate. It is essentially how many new people join the population per time per existing member of the population.
μ is the overall population death rate. It is essentially how many people die per population per time.
σ is the latency rate, which is the inverse of the incubation period. Smaller incubation periods therefore lead to larger σ.
ω is the rate of immunity loss in recovered individuals. Like λ and μ it is per population per time, although the population it applies to is the recovered population.
N=S+E+I+R is the total population.
This model is heavily based on Bjørnstad et al. (2020), with some amendments. Specifically, δ has been added to account for quarantine effects and λ has been accounted for a innate birth rate that may not match the innate death rate of μ. Hence the basic reproduction number R0 (not to be confused with the initial number of recovered individuals) is given by:
R0=(μ+σ)(α+γ+μ)β(1−δ)σ. If you would like to examine a more simple model, without birth and death rates, immunity loss, and incubation periods, then check out the SIR model solver webpage.
Bjørnstad ON, Shea K, Krzywinski M, & Altman N (2020). The SEIRS model for infectious disease dynamics. Nature Methods, 17(6): 557–558.