SWEEPS¶
Sweeps implements classes which manage infection propagation mechanisms. Class sweeps through the population to decide infection transmission.
Overview:
SweepInterfaceHouseholdSweepSpatialSweepPlaceSweepBasicHostProgressionSweepHostProgressionSweepNewInfectionSweepRandomSeedSweep
SWEEPS¶
-
class SweepInterface¶
Interface class for sweeps Sweeps can have population bound, and then operate upon the bound populations each timestep.
Subclassed by epiabm::BasicHostProgressionSweep, epiabm::HostProgressionSweep, epiabm::HouseholdSweep, epiabm::NewInfectionSweep, epiabm::PlaceSweep, epiabm::RandomSeedSweep, epiabm::SpatialSweep
Public Functions
-
SweepInterface()¶
-
SweepInterface(SimulationConfigPtr cfg)¶
-
virtual ~SweepInterface() = default¶
-
void bind_population(PopulationPtr population)¶
Bind Population Attach population to the sweep.
- Parameters:
population –
-
inline virtual void operator()(const unsigned short)¶
Apply sweep Act on the population. Called by Simulation class each iteration timestep.
-
SweepInterface()¶
-
class HouseholdSweep : public epiabm::SweepInterface¶
Spread Infection within Households Process each infected person and try to infect all susceptibles in their household. People to be newly infected get queued in their cell’s people queue.
Public Functions
-
HouseholdSweep(SimulationConfigPtr cfg)¶
-
~HouseholdSweep() = default¶
-
virtual void operator()(const unsigned short timestep) override¶
Perform Household Sweep.
- Parameters:
timestep –
-
HouseholdSweep(SimulationConfigPtr cfg)¶
-
class SpatialSweep : public epiabm::SweepInterface¶
Spread Infection between cells (spatial infection) Process each infected person and try to infect all susceptibles in their household. People to be newly infected get queued in their cell’s people queue.
Public Functions
-
SpatialSweep(SimulationConfigPtr cfg)¶
-
~SpatialSweep() = default¶
-
virtual void operator()(const unsigned short timestep) override¶
Perform Spatial Sweep.
- Parameters:
timestep –
-
SpatialSweep(SimulationConfigPtr cfg)¶
-
class PlaceSweep : public epiabm::SweepInterface¶
Spread Infection within Places Process each infected person and try to infect all susceptibles in their place. People to be newly infected get queued in their cell’s people queue.
Public Functions
-
PlaceSweep(SimulationConfigPtr cfg)¶
-
~PlaceSweep() = default¶
-
virtual void operator()(const unsigned short timestep) override¶
Perform Place Sweep.
- Parameters:
timestep –
-
virtual bool cellCallback(const unsigned short timestep, Cell *cell) override¶
Cell callback Process each infectious person in the cell.
- Parameters:
timestep –
infectorCell –
- Returns:
true
- Returns:
false
-
bool cellInfectiousCallback(const unsigned short timestep, Cell *infectorCell, Person *infector)¶
Infectious person callback Process each Infectious person by finding their household and attempting to transmit to each houshold member.
- Parameters:
timestep –
infectorCell –
infector –
- Returns:
true
- Returns:
false
-
PlaceSweep(SimulationConfigPtr cfg)¶
-
class BasicHostProgressionSweep : public epiabm::SweepInterface¶
Replication of Covid-sim’s host progression sweep without Severity Checks Person’s time to next state. If the time is past, choose next state and update person. Also decides duration to remain in next state.
Public Functions
-
BasicHostProgressionSweep(SimulationConfigPtr cfg)¶
Construct a new Basic Host Progression Sweep:: Basic Host Progression Sweep object.
- Parameters:
cfg – Simulation configuration
-
~BasicHostProgressionSweep()¶
Destroy the Basic Host Progression Sweep:: Basic Host Progression Sweep object.
-
virtual void operator()(const unsigned short timestep) override¶
Perform Host Progression Sweep.
- Parameters:
timestep –
-
virtual bool cellCallback(const unsigned short timestep, Cell *cell) override¶
Cell callback Process Infectious. Process Exposed.
- Parameters:
timestep –
cell –
- Returns:
true
- Returns:
false
-
bool cellExposedCallback(const unsigned short timestep, Cell *cell, Person *person)¶
Exposed Person Callback Check if time to transition. If should transition, move person from Exposed to next status (always InfectAsymp in this basic class) Set time to remain in this state. Also update the cell of status for fast looping through subsets of people.
- Parameters:
timestep –
cell –
person –
- Returns:
true
- Returns:
false
-
bool cellInfectiousCallback(const unsigned short timestep, Cell *cell, Person *person)¶
Infectious person callback In this class infectious person’s status is always InfectAsymp Check if time to transition has passed. If should transition, decide person’s next state. (In this basic class, this is always Dead or Recovered) Update person’s state. (Since always Dead or Recovered, no next state time) Update cell of state change.
- Parameters:
timestep –
cell –
person –
- Returns:
true
- Returns:
false
-
BasicHostProgressionSweep(SimulationConfigPtr cfg)¶
-
class HostProgressionSweep : public epiabm::SweepInterface¶
Public Functions
-
HostProgressionSweep(SimulationConfigPtr cfg)¶
-
~HostProgressionSweep() = default¶
-
virtual void operator()(const unsigned short timestep) override¶
Perform Host Progression Sweep.
- Parameters:
timestep –
-
HostProgressionSweep(SimulationConfigPtr cfg)¶
-
class NewInfectionSweep : public epiabm::SweepInterface¶
Process New Infections Processes the people queued into each cell, and changes their status from Susceptible to Exposed. This sweep should be called after each of the infection spreading sweeps, which queue people to be infected. Dequeus people as they are moved to exposed. Also marks people as exposed in the Cell for fast looping through subsets.
Public Functions
-
NewInfectionSweep(SimulationConfigPtr cfg)¶
-
~NewInfectionSweep() = default¶
-
virtual void operator()(const unsigned short timestep) override¶
Perform New Infection Processing Sweep.
- Parameters:
timestep –
-
virtual bool cellCallback(const unsigned short timestep, Cell *cell) override¶
Callback for each cell For each cell, process each person in the queue.
- Parameters:
timestep –
cell –
- Returns:
true
- Returns:
false
-
void cellPersonQueueCallback(unsigned short timestep, Cell *cell, size_t personIndex)¶
Callback for each person in a cell’s queue Process the people queued to be infected. Change status to Exposed, set the next transition time and mark the person as Exposed in the cell for fast looping through subsets of people.
- Parameters:
timestep –
cell –
personIndex –
-
NewInfectionSweep(SimulationConfigPtr cfg)¶
-
class RandomSeedSweep : public epiabm::SweepInterface¶
Public Functions
-
RandomSeedSweep(SimulationConfigPtr simulationConfig, int per_n_people)¶
Construct a new Random Seed Sweep object One in every per_n_people is updated to infectious.
- Parameters:
infection_rate –
-
~RandomSeedSweep() = default¶
-
virtual void operator()(const unsigned short timestep) override¶
Sweep through population and infect people.
- Parameters:
timestep –
-
RandomSeedSweep(SimulationConfigPtr simulationConfig, int per_n_people)¶