SEIR: The SEIR process

class epydemic.SEIR

The Susceptible-Exposed-Infected-Removed compartmented model of disease. A susceptible node becomes exposed when infected by either an exposed or an infected neighbour. Exposed nodes become infected (symptomatic) to infected and then recover to removed.

In contrast to the more familiar SIR model, SEIR has two compartments that can pass infection. The utility of the model from two aspects: exploring what fraction of the contract tree arises from infected individuals versus exposed individuals, capturing the significance of asymptomatic infection; and allowing countermeasures to be applied to symptomatic individuals whose presence could be more easily detected than those who are exposed by asymptomatic.

The SEIR model in epydemic is very flexible, allowing different infection probabilities for susceptible-exposed or susceptible-infected interactions. The initial seed population is placed into EXPOSED, rather than into INFECTED as happens for SIR.

Dynamical states

SEIR simulation places nodes into one of four compartments:

SEIR.SUSCEPTIBLE: Final[str] = 'epydemic.seir.S'

Compartment for nodes susceptible to infection.

SEIR.EXPOSED: Final[str] = 'epydemic.seir.E'

Compartment/event name for nodes exposed and infectious.

SEIR.INFECTED: Final[str] = 'epydemic.seir.I'

Compartment for nodes symptomatic and infectious.

SEIR.REMOVED: Final[str] = 'epydemic.seir.R'

Compartment/event name for nodes recovered/removed.

Parameters

The process is parameterised by five parameters:

SEIR.P_EXPOSED: Final[str] = 'epydemic.seir.pExposed'

Parameter for probability of initially being exposed.

SEIR.P_INFECT_ASYMPTOMATIC: Final[str] = 'epydemic.seir.pInfectAsymp'

Parameter for probability of infection on contact with an exposed individual

SEIR.P_INFECT_SYMPTOMATIC: Final[str] = 'epydemic.seir.pInfect'

Parameter for probability of infection on contact with a symptomatic individual.

SEIR.P_SYMPTOMS: Final[str] = 'epydemic.seir.pSymptoms'

Parameter for probability of becoming symptomatic after exposure.

SEIR.P_REMOVE: Final[str] = 'epydemic.seir.pRemove'

Parameter for probability of removal (recovery).

The SEIR.P_EXPOSED parameter defines the proportion of nodes that are initially placed into the SEIR.EXPOSED compartment, with all other nodes being placed into the SEIR.SUSCEPTIBLE compartment.

Loci

Dynamics in SEIR occurs in four places:

  • At SI edges, where the node at one endpoint is susceptible and the node at the other is infected;

  • At SI edges, where the node at one endpoint is susceptible and the node at the other is infected;

  • At exposed nodes which show symptoms; and

  • At infected nodes, which which are removed.

These four options define the loci for the SEIR model.

SEIR.SE: Final[str] = 'SEIR.SE'

Edge able to transmit infection from an exposed individual.

SEIR.SI: Final[str] = 'SEIR.SI'

Edge able to transmit infection from an infected individual.

The other loci are named SEIR.EXPOSED and SEIR.INFECTED, the same as the corresponding compartments.

Building the model

Building the model creates the three epidemic compartments and installs the necessary loci and events to define the disease dynamics. The event methods are described more thoroughly below.

SEIR.build(params)

Build the SEIR model.

Parameters:

params (Dict[str, Any]) – the model parameters

Event methods

Event methods are defined for each of the two dynamical rules for the process: infection and removal.

SEIR.infectAsymptomatic(t, e)

Perform an infection event when an EXPOSED individual infects a neighbouring SUSCEPTIBLE, rendering them EXPOSED in turn. The default calls infect() so that infections by way of exposed or symptomatic individuals are treated in the same way. Sub-classes can override this to, for example, record that the infection was passed asymptomatically.

Parameters:
  • t (float) – the simulation time

  • e (Tuple[Any, Any]) – the edge transmitting the infection

SEIR.infect(t, e)

Perform an infection event when an INFECTED individual infects a neighbouring SUSCEPTIBLE, rendering them EXPOSED in turn.

Parameters:
  • t (float) – the simulation time

  • e (Tuple[Any, Any]) – the edge transmitting the infection

SEIR.symptoms(t, n)

Perform the symptoms-developing event. This changes the compartment of the node to INFECTED.

Parameters:
  • t (float) – the simulation time

  • n (Any) – the node

SEIR.remove(t, n)

Perform a removal event. This changes the compartment of the node to REMOVED.

Parameters:
  • t (float) – the simulation time

  • n (Any) – the node