SIS
: The SIS process
- class epydemic.SIS
The Susceptible-Infected-Susceptible compartmented model of disease. Susceptible nodes are infected by infected neighbours, and recover back to the susceptible state (which allows future re-infection, unlike for
SIR
.Because SIS allows re-infection, it’s useful to store additional information as part of the simulation. By default the process records the numbber of times a node has been infected (using the
SIS.N_INFECTED
node attribute) and the number of time the infection has been passed over an edge (using theSIS.N_OCCUPIED
edge attribute). These are not returned in results in any way, but can be used by sub-classes wanting to analyse the behaviour of the epidemic.
The Synchronous-Infected-Susceptible or SIS process is a variant of the more common SIR process which cycles between only two states, keeping nodes part of the dynamics indefinitely.
Nodes in the network represent individuals, with edges representing contacts between them. Each individual is assigned a dynamical state which changes according to the rules of the model.
SIS is a compartmented model of disease with two compartments:
Susceptible (S), when an individual be infected with the disease; and
Infected (I), when an individual can infect neighbouring susceptible individuals.
Dynamical states
SIS simulation places nodes into one of two compartments:
-
SIS.SUSCEPTIBLE:
Final
[str
] = 'epydemic.sis.S' Compartment for nodes susceptible to infection.
-
SIS.INFECTED:
Final
[str
] = 'epydemic.sis.I' Compartment/event name for nodes infected.
There is an extra event recorded when a node recovers and returns to being susceptible.
-
SIS.RECOVERED:
Final
[str
] = 'epydemic.sis.R' Event name for nodes that become susceptible again.
Parameters
The process is parameterised by three parameters:
-
SIS.P_INFECTED:
Final
[str
] = 'epydemic.sis.pInfected' Parameter for probability of initially being infected.
-
SIS.P_INFECT:
Final
[str
] = 'epydemic.sis.pInfect' Parameter for probability of infection on contact.
-
SIS.P_RECOVER:
Final
[str
] = 'epydemic.sis.pRecover' Parameter for probability of recovery (returning to susceptible).
The SIS.P_INFECTED
parameter defines the proportion of nodes
that are initially placed into the SIS.INFECTED
compartment, with
all other nodes being placed into the SIS.SUSCEPTIBLE
compartment.
Loci
Dynamics in SIS occurs in two places:
At infected nodes, which which recover back to susceptible with a probability given by the
SIS.P_RECOVER
parameter; andAt SI edges, where the node at one endpoint is susceptible and the node at the other is infected.
These two options define the loci for the SIS model.
-
SIS.SI:
Final
[str
] = 'epydemic.sis.SI' Edge able to transmit infection.
The other locus is named SIS.INFECTED
, the same as the
compartment.
Building the model
Building the model creates the two epidemic compartments and installs the necessary loci and events to define the disease dynamics. The event methods are described more thoroughly below.
- SIS.build(params)
Build the SIS 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 recovery.
- SIS.infect(t, e)
Perform an infection event. This changes the compartment of the susceptible-end node to
INFECTED
. It also marks the edge traversed as occupied, records the hitting time for the node if it is the first, and the number of times a node has been infected,- Parameters:
t (
float
) – the simulation timee (
Tuple
[Any
,Any
]) – the edge transmitting the infection, susceptible-infected
- SIS.recover(t, n)
Perform a recovery event. This changes the compartment of the node back to
SUSCEPTIBLE
, allowing re-infection.- Parameters:
t (
float
) – the simulation time (unused)n (
Any
) – the node