Classic epidemic models of disease transmission are described in Compartmental models in epidemiology. Here we discuss the behavior when such models are simulated on a lattice.
The mathematical modelling of epidemics was originally implemented in terms of differential equations, which effectively assumed that the various states of individuals were uniformly distributed throughout space. To take into account correlations and clustering, lattice-based models have been introduced. Grassberger considered synchronous (cellular automaton) versions of models, and showed how the epidemic growth goes through a critical behavior such that transmission remains local when infection rates are below critical values, and spread throughout the system when they are above a critical value. Cardy and Grassberger argued that this growth is similar to the growth of percolation clusters, which are governed by the "dynamical percolation" universality class (finished clusters are in the same class as static percolation, while growing clusters have additional dynamic exponents). In asynchronous models, the individuals are considered one at a time, as in kinetic Monte Carlo or as a "Stochastic Lattice Gas."
In the "SIR" model, there are three states:
It is to be distinguished from the "SIS" model, where sites recover without immunization, and are thus not "removed".
The asynchronous simulation of the model on a lattice is carried out as follows:
Making a list of I sites makes this run quickly.
The net rate of infecting one neighbor over the rate of removal is λ = (1-c)/c.
For the synchronous model, all sites are updated simultaneously (using two copies of the lattice) as in a cellular automaton.
I → S with unit rate; S → I with rate λnI/z where nI is the number of nearest neighbor I sites, and z is the total number of nearest neighbors (equivalently, each I attempts to infect one neighboring site with rate λ)
(Note: S → I with rate λn in some definitions, implying that lambda has one-fourth the values given here).
The simulation of the asynchronous model on a lattice is carried out as follows, with c = 1 / (1 + λ):
Note that the synchronous version is the same as the directed percolation model.