Interventions

Interventions provides the basic class framework to interact with different interventions

Overview:

class pyEpiabm.intervention.AbstractIntervention(start_time, policy_duration, population, case_threshold=0, **kwargs)[source]

Abstract class for Interventions. Detailed description of interventions can be found in github wiki: https://github.com/SABS-R3-Epidemiology/epiabm/wiki/Interventions.

__call__(time: float)[source]

Run intervention.

Parameters:

time (float) – Current simulation time

__init__(start_time, policy_duration, population, case_threshold=0, **kwargs)[source]

Set the parameters of the interventions.

Parameters:
  • start_time (float) – Start time of intervention

  • policy_duration (float) – Duration of the intervention

  • case_threshold (float) – Number of cases required to trigger the intervention

  • population (Population) – Population: Population to bind

is_active(time, num_cases)[source]

Query if the intervention is currently active.

Parameters:
  • time (float) – Current simulation time

  • num_cases (int) – Number of cases

Returns:

Whether the intervention is currently active

Return type:

bool

turn_off()[source]

Turn off intervention after intervention stops being active.

class pyEpiabm.intervention.CaseIsolation(isolation_duration, isolation_probability, isolation_delay, use_testing, population, **kwargs)[source]

Case isolation intervention. Isolate symptomatic individual based on the isolation_probability and stop isolating isolated individuals after their isolation period or after the end of the policy. Detailed description of the implementation can be found in github wiki: https://github.com/SABS-R3-Epidemiology/epiabm/wiki/Interventions.

__call__(time)[source]

Run case isolation intervention.

Parameters:

time (float) – Current simulation time

__init__(isolation_duration, isolation_probability, isolation_delay, use_testing, population, **kwargs)[source]

Set the parameters of the interventions.

Parameters:
  • start_time (float) – Start time of intervention

  • policy_duration (float) – Duration of the intervention

  • case_threshold (float) – Number of cases required to trigger the intervention

  • population (Population) – Population: Population to bind

person_selection_method(person)[source]

Method to determine whether a person is eligible for isolation based on whether they are symptomatic or have tested positive depending on the value of the use_testing parameter.

Parameters:

person (Person) – Instance of a Person class

Returns:

Whether the individual is eligible for case isolation (either symptomatic or has tested positive)

Return type:

bool

turn_off()[source]

Turn off intervention after intervention stops being active.

class pyEpiabm.intervention.DiseaseTesting(testing_capacity, false_positive, false_negative, population, **kwargs)[source]

Class to move through testing queue and assign positive test results depending on true/false positive rates. Detailed description of the implementation can be found in github wiki: https://github.com/SABS-R3-Epidemiology/epiabm/wiki/Interventions#testing

__call__(time)[source]

Run disease testing intervention.

Parameters:

time (float) – Current simulation time

__init__(testing_capacity, false_positive, false_negative, population, **kwargs)[source]

Set the parameters of the interventions.

Parameters:
  • start_time (float) – Start time of intervention

  • policy_duration (float) – Duration of the intervention

  • case_threshold (float) – Number of cases required to trigger the intervention

  • population (Population) – Population: Population to bind

do_testing(time, person, index)[source]

Method to detemine whether an individual tests positive depending on the false positive and false negative rates for PCR tests (index = 0) or LFTs (index = 1).

Parameters:
  • time (float) – Current simulation time

  • person (Person) – Instance of a Person class

  • index (int) – To indicate whether test is PCR or LFT

turn_off()[source]

Turn off intervention after intervention stops being active.

class pyEpiabm.intervention.HouseholdQuarantine(quarantine_duration, quarantine_delay, quarantine_house_compliant, quarantine_individual_compliant, population, **kwargs)[source]

Household/Home quarantine intervention. People who share household with a symptomatic case (who case isolates) stay home based on the household and individual compliance, if intervention is active. Quarantine stops after the quarantine period or after the end of the policy. Detailed description of the implementation can be found in github wiki: https://github.com/SABS-R3-Epidemiology/epiabm/wiki/Interventions.

__call__(time)[source]

Run household quarantine intervention.

Parameters:

time (float) – Current simulation time

__init__(quarantine_duration, quarantine_delay, quarantine_house_compliant, quarantine_individual_compliant, population, **kwargs)[source]

Set the parameters of the interventions.

Parameters:
  • start_time (float) – Start time of intervention

  • policy_duration (float) – Duration of the intervention

  • case_threshold (float) – Number of cases required to trigger the intervention

  • population (Population) – Population: Population to bind

turn_off()[source]

Turn off intervention after intervention stops being active.

class pyEpiabm.intervention.PlaceClosure(closure_duration, closure_delay, case_microcell_threshold, population, **kwargs)[source]

Place closure intervention Close specific types of places based on the number of infectious persons in their microcells and reopen places after their closure period or after the end of the policy. Detailed description of the implementation can be found in github wiki: https://github.com/SABS-R3-Epidemiology/epiabm/wiki/Interventions.

__call__(time)[source]

Run place closure intervention.

Parameters:

time (float) – Current simulation time

__init__(closure_duration, closure_delay, case_microcell_threshold, population, **kwargs)[source]

Set the parameters of the interventions.

Parameters:
  • start_time (float) – Start time of intervention

  • policy_duration (float) – Duration of the intervention

  • case_threshold (float) – Number of cases required to trigger the intervention

  • population (Population) – Population: Population to bind

turn_off()[source]

Turn off intervention after intervention stops being active.

class pyEpiabm.intervention.SocialDistancing(distancing_duration, distancing_delay, case_microcell_threshold, distancing_enhanced_prob, population, **kwargs)[source]

Social distancing intervention Social distancing is based on the number of infectious persons in each microcell. The intensity of distancing for each individual is affected by the age group (with probability to take enhanced social distancing). Social distancing is stopped after the distancing period or after the end of the policy. Detailed description of the implementation can be found in github wiki: https://github.com/SABS-R3-Epidemiology/epiabm/wiki/Interventions.

__call__(time)[source]

Run social distancing intervention.

Parameters:

time (float) – Current simulation time

__init__(distancing_duration, distancing_delay, case_microcell_threshold, distancing_enhanced_prob, population, **kwargs)[source]

Set the parameters of the interventions.

Parameters:
  • start_time (float) – Start time of intervention

  • policy_duration (float) – Duration of the intervention

  • case_threshold (float) – Number of cases required to trigger the intervention

  • population (Population) – Population: Population to bind

turn_off()[source]

Turn off intervention after intervention stops being active.

class pyEpiabm.intervention.Vaccination(daily_doses, population, **kwargs)[source]

Vaccination intervention to vaccinate people in the vaccination queue according to the per day national vaccination capacity. For a description of this intervention see https://github.com/SABS-R3-Epidemiology/epiabm/wiki/Interventions#vaccination

__call__(time)[source]

Move down the priority queue removing people and vaccinating them.

Parameters:

time (float) – Current simulation time

__init__(daily_doses, population, **kwargs)[source]

Set the parameters for vaccinations.

Parameters:

daily_doses (int) – Number of vaccine doses administered per day nationwide

turn_off()[source]

Turn off intervention after intervention stops being active.

class pyEpiabm.intervention.TravelIsolation(isolation_duration, isolation_probability, isolation_delay, use_testing, hotel_isolate, population, **kwargs)[source]

Travel isolation intervention. Isolate travelling individual based on the isolation_probability and stop isolating isolated individuals after their isolation period or after the end of the policy. Detailed description of the implementation can be found in github wiki: https://github.com/SABS-R3-Epidemiology/epiabm/wiki/Interventions.

__call__(time)[source]

Run travel isolation intervention.

Parameters:

time (float) – Current simulation time

__init__(isolation_duration, isolation_probability, isolation_delay, use_testing, hotel_isolate, population, **kwargs)[source]

Set the parameters of the interventions.

Parameters:
  • start_time (float) – Start time of intervention

  • policy_duration (float) – Duration of the intervention

  • case_threshold (float) – Number of cases required to trigger the intervention

  • population (Population) – Population: Population to bind

person_selection_method(person)[source]

Method to determine whether a person is eligible for isolation. Depending on the value of the use_testing parameter person always isolates or isolates after testing positive.

Parameters:

person (Person) – Instance of the Person class

Returns:

Whether the individual is eligible for travel isolation (either always or has tested positive)

Return type:

bool

turn_off()[source]

Turn off intervention after intervention stops being active.