SIvR: SIR with vaccination

class epydemic.SIvR

Reduced susceptiblility vaccination model

This model extends SIR with a simppe model of vaccination. A node may be vaccinated or not. When a vaccinated susceptible node undergoes an infect() event it only actually becomes infected in a proportiion of cases, controlled by the EFFICACY attribute: a high vaccine efficacy means that more infections will fail. The vaccine onnly becomes effective after an optional time offset determined by T_OFFSET: before this time after vaccination, vaccinated and unvaccinated individuals behave the same.

The model maintains two additional loci, containing vaccinated-but-infected-anyway individuals (INFECTED_V) and unvaccinated-and-infected individuals (INFECTED_N). These do noit affect the dynamics, but make it easy to monitor (using Monitor) the relative sizes of these classes within the infected population.

The vaccinateNode() method is defined to vaccinate a given node. It isn’t called by any events within this model, but can be called by another process to initiate vaccination.

Parameters

The SIvR process extends the parameters of SIR with two new parameters:

SIvR.EFFICACY: Final[str] = 'epydemic.SIvR.pEfficacy'

Experimental parameter for vaccine efficacy.

SIvR.T_OFFSET: Final[str] = 'epydemic.SIvR.tOffset'

Experimental parameter for delay in applying vaccine.

Loci

SIvR defines two additional loci:

SIvR.INFECTED_N: Final[str] = 'epydemic.SIvR.In'

Tracker for infected unvaccinated nodes.

SIvR.INFECTED_V: Final[str] = 'epydemic.SIvR.Iv'

Tracker for infected vaccinated nodes.

These loci don’t directly affect the dynamics, but they track the sub-populations of the SIR:INFECTED locus who are (un)vaccinated. This can be useful for reporting using Monitor, when the sizes of these sub-populations will be captured.

Helper method

SIvR defines additional “helper” methods that can be used to vaccinate a node, recording its vaccination status and time. This then feeds into how infections happen and the recording of (un)vaccinated sub-populations of the infected.

SIvR.vaccinateNode(t, n)

Vaccinate an individual. This updates the process to include the vaccination of the given individual (node).

Parameters:
  • t (float) – the simulation time

  • n (Any) – the node

Note that, when a node is removed (recovers from the disease) their vaccination status and time is retained, and so can be used in analysis.

SIvR.nodeVaccinated(n)

Tests the vaccination status of a node.

Parameters:

n (Any) – the node

Return type:

bool

Returns:

True if the node has been vaccinated

SIvR.nodeVaccinatedAt(n)

Return the vaccination time of a node. This is defined to be -1 – an illegal simulation time – if the node has not been vaccinated.

Parameters:

n (Any) – the node

Return type:

float

Returns:

the vaccination time or -1

Building the model

SIvR.build(params)

Build the SIvR model. This uses the same paraneters as SIR, and adds vaccine efficacy (EFFICACY) and (optionally) a time delay (T_OFFSET).

Parameters:

params (Dict[str, Any]) – experimental parameters

Event methods

SIvR.infect(t, e)

Extends SIR.infect() with functionality to reduce the probability of infection for vaccinated nodes according to EFFICACY. The vaccination effect only kicks-in after a time T_OFFSET from administration.

t: the simulation time e: the edge transmitting the infection, susceptible->infected

SIvR.remove(t, n)

Perform the remove event and also remove from the marker loci.

Parameters:
  • t (float) – the simulation time (unused)

  • n (Any) – the node