We model a population of agents on a two-dimensional grid of cells that can move randomly or away from infected agents. Each cell can be in one of the following states:
empty: there is no agent on the cell.
susceptible: the agent on the cell is healthy but susceptible to the disease and can be exposed if in contact with the disease.
exposed: the agent on the cell is exposed to the disease, meaning that it can already infect other agents in contact with the disease; however, there are no symptoms yet, thus, the agent gets noticed as infected only after the incubation period.
infected: the agent on the cell is infected and can infect neighboring agents.
recovered: the agent on the cell is recovered, thus, it is immune to the disease. However, it can lose its immunity after a while and become susceptible again.
deceased: the agent on the cell is deceased. The cell will again be empty in the next time step.
Special Cell States
Additionally, cells can also have the following “special” states:
source: the cells are infection sources, thus, they can transition neighboring agents from the susceptible to the exposed state.
inert: inert cells are cells that do not partake in any of the model dynamics. They can be used to model spatial heterogeneities like compartmentalization, much like
stonesin the ForestFire model.
Cells that are initialized in one of these states should not be regarded as representing agents: there is no movement for these cells, nor can these cells change their state.
The implementation allows for a range of different storylines by changing the parameters. Keep in mind that individual processes can often be disabled by setting probabilities to zero.
In each time step the cells update their respective states asynchronously, but randomly shuffled to reduce artefacts, according to the following rules:
- A living (susceptible, exposed, infected, or recovered) cell becomes empty with probability
emptycell turns into a
susceptibleone with probability
p_susceptible. With probability
p_immunethe cell is
immuneto being infected.
susceptiblecell either becomes randomly exposed with probability
p_exposedor becomes exposed with probability
p_transmit * (1 - p_random_immunity)if a neighboring cell is
p_transmitbeing the neighboring cell’s probability of transmitting the disease. Disease transmission happens only if the cell is not
infectedcell recovers with probability
p_deceased, or else stays infected.
recoveredcell can lose its immunity with
deceasedcell turns into an
In each time step, the agents on the cells can move to
empty neighboring cells according to the following rules:
- A living (susceptible, exposed, infected, or recovered) cell moves with probability
p_move_randomlyto a randomly chosen
emptyneighboring cell, if there is any.
- A living cell moves away from an
infectedneighboring cell to a randomly selected neighboring
emptycell if there is any.
As in the Forest Fire model, there is the possibility to introduce heterogeneities into the grid that are implemented as two additional possible cell states:
source: these are constant exposure sources. They spread the infection like normal infected or exposed cells, but don not revert to the empty state. If activated, they are per default at the lower boundary of the grid, though this can be changed in the configuration.
inert: inert cells are cells that do not partake in the dynamics of the model, and hence can be used to represent barriers. If enabled, the default mode is
clustered_simple, which leads to randomly distributed inert cells whose neighbors have a certain probability to also be inert.
Both make use of the entity selection interface.
immunity_control parameter in the model configuration, additional immunities can be introduced at desired times, thereby manipulating a cell’s
This feature can be used e.g. to investigate the effect of vaccination. The immunities are introduced before the update rule above is carried out.
exposure_control parameter in the model configuration, additional exposures can be introduced at desired times. The exposures are introduced before the update rule above is carried out.
transmission_control parameter in the model configuration, the cell-specific state
p_transmit can be manipulated. The cell state manipulation happens before the update rule above is carried out.
The following data is stored alongside the simulation:
kind: the state of each cell:
source, is constantly infectious
inert, does not take part in any interaction
age: the age of each cell, reset after a cell turns empty.
cluster_id: a number identifying to which cluster a cell belongs; is
0for non-living cells. Recovered cells do not count towards it.
exposed_time: the time steps a living cell has already been exposed to the disease, for each cell.
immunity: whether or not a cell is immune, for each cell.
densities: the densities of each of the kind of cells over time; this is a labeled 2D array with the dimensions
counts: cumulative counters for a number of events, e.g. state transitions. This is a 2D array with the dimensions
label, where the latter describes the name of the counted event:
empty_to_susceptible, i.e. “birth”
living_to_empty, i.e. “random death”
susceptible_to_exposed_contact, via local contact with a neighbor
susceptible_to_exposed_random, via a random point exposure, controlled by
susceptible_to_exposed_controlled, via exposure control.
exposed_to_infected, as controlled by
infected_to_recovered, as controlled by
infected_to_deceased, as controlled by
recovered_to_susceptible, which happens when losing immunity, as controlled by
move_randomly, as controlled by
move_away_from_infected, as enabled by