abm Namespace Reference
|
CPP API
|
Classes | |
| struct | AerosolTransmissionRates |
| Aerosol transmission rates. More... | |
| struct | AgeGroupGotoSchool |
| The set of AgeGroups that can go to school. More... | |
| struct | AgeGroupGotoWork |
| The set of AgeGroups that can go to work. More... | |
| struct | BasicShoppingRate |
| Parameter for the exponential distribution to decide if a Person goes shopping. More... | |
| struct | Cell |
| The Location can be split up into several Cells. More... | |
| struct | CellCapacity |
| CellCapacity describes the size of a Cell. More... | |
| struct | CellIndex |
| struct | ContactRates |
| contact rates More... | |
| struct | CriticalPerInfectedSevere |
| the percentage of ICU cases per hospitalized cases More... | |
| struct | DataWriterToMemoryDelta |
| This class writes data retrieved from loggers to memory. More... | |
| struct | DeathsPerInfectedCritical |
| the percentage of dead cases per ICU cases More... | |
| struct | DeathsPerInfectedSevere |
| the percentage of dead cases per hospitalized cases More... | |
| struct | GotoSchoolTimeMaximum |
| Latest time that a Person can go to school. More... | |
| struct | GotoSchoolTimeMinimum |
| Earliest time that a Person can go to school. More... | |
| struct | GotoWorkTimeMaximum |
| Latest time that a Person can go to work. More... | |
| struct | GotoWorkTimeMinimum |
| Earliest time that a Person can go to work. More... | |
| struct | HighViralLoadProtectionFactor |
| Personal protective factor against high viral load, which depends on ProtectionType, #AgeGroup and VirusVariant. More... | |
| class | Household |
| A Household represented by a vector with HouseholdMembers. More... | |
| class | HouseholdGroup |
| A HouseholdGroup represented by different Households. More... | |
| class | HouseholdMember |
| A HouseholdMember represented by a weighted age distribution. More... | |
| class | Infection |
| struct | InfectionProtectionFactor |
| Personal protection factor against #Infection% after #Infection and vaccination, which depends on ProtectionType, #AgeGroup and VirusVariant. More... | |
| struct | InfectionRateFromViralShed |
| Determines the infection rate by viral shed. More... | |
| class | Location |
| All Locations in the simulated Model where Persons gather. More... | |
| struct | LocationId |
| Unique identifier for a Location within a Model. More... | |
| struct | LockdownDate |
| Starting date of interventions. More... | |
| struct | LogDataForMobility |
| Logger to log mobility data of the agents in the simulation. More... | |
| struct | LogInfectionState |
| Logger to log the TimeSeries of the number of Persons in an InfectionState. More... | |
| struct | LogLocationInformation |
| Logger to log the LocationInformation of the simulation. More... | |
| struct | LogPersonInformation |
| Logger to log the Persons Information in the simulation. More... | |
| class | Mask |
| Reduces the probability that a Person becomes infected. More... | |
| struct | MaskProtection |
| Effectiveness of a Mask of a certain MaskType% against an Infection%. More... | |
| struct | MaximumContacts |
| Maximum number of Persons an infectious Person can infect at the respective Location. More... | |
| struct | mobility_data |
| Struct to save specific mobility data of an agent. More... | |
| class | Model |
| The Model of the Simulation. More... | |
| class | Parameters |
| Parameters of the simulation that are the same everywhere within the Model. More... | |
| class | Person |
| Agents in the simulated Model that can carry and spread the Infection. More... | |
| class | PersonalRandomNumberGenerator |
| Random number generator of individual persons. More... | |
| struct | PersonId |
| Unique ID for a Person within a Model. More... | |
| struct | ProtectionEvent |
| A tuple of ProtectionType and #TimePoint. More... | |
| struct | QuarantineDuration |
| Duration of quarantine. More... | |
| struct | QuarantineEffectiveness |
| Effectiveness of quarantine. More... | |
| class | ResultSimulation |
| Simulation holding its own History to provide a get_result member. Can be used for a ParameterStudy. More... | |
| struct | SchoolRatio |
| Percentage of Persons of the respective age going to school. More... | |
| struct | SeverePerInfectedSymptoms |
| the percentage of hospitalized cases per infected cases More... | |
| struct | SeverityProtectionFactor |
| Personal protective factor against severe symptoms after #Infection and vaccination, which depends on ProtectionType, #AgeGroup and VirusVariant. More... | |
| class | Simulation |
| Run the Simulation in discrete steps, evolve the Model and report results. More... | |
| struct | SocialEventRate |
| Parameter for the exponential distribution to decide if a Person goes to a social event. More... | |
| struct | StateTransition |
| Represents a transition period between two infection states. More... | |
| struct | SymptomsPerInfectedNoSymptoms |
| the percentage of symptomatic cases More... | |
| struct | TestData |
| Store a map from the TestTypes to their TestParameters. More... | |
| class | TestingCriteria |
| TestingCriteria for TestingScheme. More... | |
| class | TestingScheme |
| TestingScheme to regular test Persons. More... | |
| class | TestingStrategy |
| Set of TestingSchemes that are checked for testing. More... | |
| struct | TestParameters |
| Parameters that describe the reliability of a test. More... | |
| struct | TestResult |
| The TestResult of a Person. More... | |
| struct | TimeExposedToNoSymptoms |
| Time that a Person is infected but not yet infectious in day unit. More... | |
| struct | TimeInfectedCriticalToDead |
| Time that a Person is treated by ICU before dying in day unit. More... | |
| struct | TimeInfectedCriticalToRecovered |
| Time that a Person is treated by ICU before recovering in day unit. More... | |
| struct | TimeInfectedNoSymptomsToRecovered |
| Time that a Person is infected when staying asymptomatic in day unit. More... | |
| struct | TimeInfectedNoSymptomsToSymptoms |
| Time that a Person is infected but presymptomatic in day unit. More... | |
| struct | TimeInfectedSevereToCritical |
| Time that a Person is infected and 'simply' hospitalized before becoming critical in day unit. More... | |
| struct | TimeInfectedSevereToDead |
| Time that a Person is hospitalized before dying in day unit. More... | |
| struct | TimeInfectedSevereToRecovered |
| Time that a Person is infected and 'simply' hospitalized before recovering in day unit. More... | |
| struct | TimeInfectedSymptomsToRecovered |
| Time that a Person is infected and symptomatic who will recover in day unit. More... | |
| struct | TimeInfectedSymptomsToSevere |
| Time that a Person is infected and symptomatic but who do not need to be hospitalized yet in day unit. More... | |
| class | TimePoint |
| Represents a point in time. More... | |
| struct | TimeSeriesWriter |
| This is like the DataWriterToMemory, but it only logs time series data. More... | |
| class | TimeSpan |
| A duration of time. More... | |
| struct | Trip |
| A trip describes a change of Location from one Location to another Location. More... | |
| class | TripList |
| A list of Trips a Person follows. More... | |
| struct | UseLocationCapacityForTransmissions |
| struct | ViralLoad |
| Models the ViralLoad for an Infection, modelled on a log_10 scale. More... | |
| struct | ViralLoadDistributions |
| struct | ViralLoadDistributionsParameters |
| Parameters for the ViralLoad course. More... | |
| struct | ViralShedFactor |
| Individual viral shed factor to account for variability in infectious viral load spread. More... | |
| struct | ViralShedParameters |
| struct | ViralShedTuple |
| Parameters for the viral shed. More... | |
| struct | WorkRatio |
| Percentage of Persons of the respective age going to work. More... | |
Functions | ||||||||||||||||
| void | add_exposure_contribution (AirExposureRates &local_air_exposure, ContactExposureRates &local_contact_exposure, const Person &person, const Location &location, const Parameters ¶ms, const TimePoint t, const TimeSpan dt) | |||||||||||||||
| Add the contribution of a person to the local exposure rates. More... | ||||||||||||||||
| void | add_household_group_to_model (Model &model, const HouseholdGroup &household_group) | |||||||||||||||
| Adds Households from a HouseholdGroup to the Model. More... | ||||||||||||||||
| void | add_household_to_model (Model &model, const Household &household) | |||||||||||||||
| Adds a specific Household to the Model. More... | ||||||||||||||||
| void | adjust_contact_rates (Location &location, size_t num_agegroups) | |||||||||||||||
| Adjust ContactRates of location by MaximumContacts. More... | ||||||||||||||||
| bool | change_location (Person &person, const Location &destination, const TransportMode mode=TransportMode::Unknown, const std::vector< uint32_t > &cells={0}) | |||||||||||||||
| Change a persons location to another location. More... | ||||||||||||||||
| void | close_social_events (TimePoint t_begin, ScalarType p, Parameters ¶ms) | |||||||||||||||
| During lockdown Persons join social events less often. More... | ||||||||||||||||
| TimeSpan | days (int days) | |||||||||||||||
| Create a TimeSpan with a specified number of days. More... | ||||||||||||||||
| TimeSpan | days (ScalarType days) | |||||||||||||||
| template<class Model > | ||||||||||||||||
| std::vector< Model > | ensemble_params_percentile (const std::vector< std::vector< Model >> &ensemble_params, ScalarType p) | |||||||||||||||
| computes the p percentile of the parameters for each node. More... | ||||||||||||||||
| constexpr mio::abm::ActivityType | guess_activity_type (mio::abm::LocationType current_location) | |||||||||||||||
| TimeSpan | hours (int hours) | |||||||||||||||
| Create a TimeSpan of a specified number of hours. More... | ||||||||||||||||
| void | interact (PersonalRandomNumberGenerator &personal_rng, Person &person, const Location &location, const PopulationByAge &local_population_by_age, const AirExposureRates &local_air_exposure, const ContactExposureRates &local_contact_exposure, const TimePoint t, const TimeSpan dt, const Parameters &global_parameters) | |||||||||||||||
| Let a Person interact with the population at its current Location, possibly getting infected. More... | ||||||||||||||||
| TimeSpan | minutes (int minutes) | |||||||||||||||
| Create a TimeSpan of a specified number of minutes. More... | ||||||||||||||||
| void | normalize_exposure_contribution (ContactExposureRates &local_contact_exposure, const PopulationByAge &local_population_by_age) | |||||||||||||||
| Normalize contact exposure rate to average exposure per contact per time (from total exposure per time). More... | ||||||||||||||||
| template<class RNG , class T , size_t NumTransitions> | ||||||||||||||||
| T | random_transition (RNG &rng, T current_state, TimeSpan dt, const std::pair< T, ScalarType >(&transitions)[NumTransitions]) | |||||||||||||||
| Select a random transition from a list of possible transitions from the current state to others. More... | ||||||||||||||||
| TimeSpan | seconds (int seconds) | |||||||||||||||
| Create a TimeSpan of a specified number of seconds. More... | ||||||||||||||||
| void | set_home_office (TimePoint t_begin, ScalarType p, Parameters ¶ms) | |||||||||||||||
| Persons who are in home office are staying at home instead of going to work. More... | ||||||||||||||||
| void | set_school_closure (TimePoint t_begin, ScalarType p, Parameters ¶ms) | |||||||||||||||
| If schools are closed, students stay at home instead of going to school. More... | ||||||||||||||||
| ScalarType | total_exposure_by_air (const AirExposureRates &rates, const CellIndex cell_index, const VirusVariant virus, const Parameters &global_params) | |||||||||||||||
| Compute the total virus exposure for aerosol transmission in a cell (unit: per day). More... | ||||||||||||||||
| ScalarType | total_exposure_by_contacts (const ContactExposureRates &rates, const CellIndex cell_index, const VirusVariant virus, const AgeGroup age_receiver, size_t age_receiver_group_size, const LocalInfectionParameters ¶ms) | |||||||||||||||
| Compute the total virus exposure for contact transmission in a cell (unit: per day). More... | ||||||||||||||||
Rules for mobility between Locations. | ||||||||||||||||
| ||||||||||||||||
| LocationType | random_mobility (PersonalRandomNumberGenerator &rng, const Person &p, TimePoint t, TimeSpan dt, const Parameters ¶ms) | |||||||||||||||
| Completely random mobility to any other Location. More... | ||||||||||||||||
| LocationType | go_to_school (PersonalRandomNumberGenerator &rng, const Person &p, TimePoint t, TimeSpan dt, const Parameters ¶ms) | |||||||||||||||
| School age children go to school in the morning and return later in the day. More... | ||||||||||||||||
| LocationType | go_to_work (PersonalRandomNumberGenerator &rng, const Person &person, TimePoint t, TimeSpan dt, const Parameters ¶ms) | |||||||||||||||
| Adults go to work in the morning and return later in the day. More... | ||||||||||||||||
| LocationType | go_to_shop (PersonalRandomNumberGenerator &rng, const Person &person, TimePoint t, TimeSpan dt, const Parameters ¶ms) | |||||||||||||||
| Adults may go shopping in their free time. More... | ||||||||||||||||
| LocationType | go_to_event (PersonalRandomNumberGenerator &rng, const Person &person, TimePoint t, TimeSpan dt, const Parameters ¶ms) | |||||||||||||||
| Persons might go to social events. More... | ||||||||||||||||
| LocationType | go_to_quarantine (PersonalRandomNumberGenerator &rng, const Person &person, TimePoint, TimeSpan, const Parameters &) | |||||||||||||||
| Persons who are in quarantine should go home. More... | ||||||||||||||||
| LocationType | go_to_hospital (PersonalRandomNumberGenerator &rng, const Person &p, TimePoint t, TimeSpan dt, const Parameters ¶ms) | |||||||||||||||
| Infected Persons may be hospitalized. More... | ||||||||||||||||
| LocationType | go_to_icu (PersonalRandomNumberGenerator &rng, const Person &p, TimePoint t, TimeSpan dt, const Parameters ¶ms) | |||||||||||||||
| Persons in the hospital may be put in intensive care. More... | ||||||||||||||||
| LocationType | return_home_when_recovered (PersonalRandomNumberGenerator &rng, const Person &person, TimePoint t, TimeSpan dt, const Parameters ¶ms) | |||||||||||||||
| Persons in the hospital/icu return home when they recover. More... | ||||||||||||||||
| LocationType | get_buried (PersonalRandomNumberGenerator &rng, const Person &person, TimePoint t, TimeSpan dt, const Parameters ¶ms) | |||||||||||||||
| Persons in the icu go to cemetery when they are dead. More... | ||||||||||||||||
Variables | |
| constexpr const int | MAX_NUM_AGE_GROUPS = 64 |
| Maximum number of age groups allowed in the model. More... | |
Typedef Documentation
◆ AirExposureRates
| using mio::abm::AirExposureRates = typedef CustomIndexArray<boost::atomic<ScalarType>, CellIndex, VirusVariant> |
◆ ContactExposureRates
| using mio::abm::ContactExposureRates = typedef CustomIndexArray<boost::atomic<ScalarType>, CellIndex, VirusVariant, AgeGroup> |
◆ InitialInfectionStateDistribution
| using mio::abm::InitialInfectionStateDistribution = typedef CustomIndexArray<AbstractParameterDistribution, VirusVariant, AgeGroup> |
Distributions of the relative time that people have been in their initial infection state at the beginning of the simulation.
Values have to be within [0, 1]. This makes it possible to draw from a user-defined distribution instead of drawing from a uniform distribution.
◆ LocalInfectionParameters
| using mio::abm::LocalInfectionParameters = typedef ParameterSet<MaximumContacts, ContactRates, UseLocationCapacityForTransmissions> |
Parameters of the Infection that depend on the Location.
◆ ParametersBase
◆ PopulationByAge
| using mio::abm::PopulationByAge = typedef CustomIndexArray<std::atomic_int_fast32_t, CellIndex, AgeGroup> |
Enumeration Type Documentation
◆ ActivityType
|
strong |
◆ InfectionState
|
strong |
InfectionState in ABM.
Can be used as 0-based index.
| Enumerator | |
|---|---|
| Susceptible | |
| Exposed | |
| InfectedNoSymptoms | |
| InfectedSymptoms | |
| InfectedSevere | |
| InfectedCritical | |
| Recovered | |
| Dead | |
| Count | |
◆ InterventionType
|
strong |
◆ LocationType
|
strong |
Type of a Location.
| Enumerator | |
|---|---|
| Home | |
| School | |
| Work | |
| SocialEvent | |
| BasicsShop | |
| Hospital | |
| ICU | |
| Car | |
| PublicTransport | |
| TransportWithoutContact | |
| Cemetery | |
| Count | |
| Invalid | |
◆ MaskType
|
strong |
Type of a Mask.
| Enumerator | |
|---|---|
| None | |
| Community | |
| Surgical | |
| FFP2 | |
| Count | |
◆ ProtectionType
|
strong |
ProtectionType in ABM.
can be used as 0-based index
| Enumerator | |
|---|---|
| NoProtection | |
| NaturalInfection | |
| GenericVaccine | |
| Count | |
◆ TestType
|
strong |
◆ TransportMode
|
strong |
◆ VirusVariant
|
strong |
Function Documentation
◆ add_exposure_contribution()
| void mio::abm::add_exposure_contribution | ( | AirExposureRates & | local_air_exposure, |
| ContactExposureRates & | local_contact_exposure, | ||
| const Person & | person, | ||
| const Location & | location, | ||
| const Parameters & | params, | ||
| const TimePoint | t, | ||
| const TimeSpan | dt | ||
| ) |
Add the contribution of a person to the local exposure rates.
- Parameters
-
[in,out] local_air_exposure Exposure rates by aerosols for the local population. [in,out] local_contact_exposure Exposure by rates contacts for the local population. [in] person A person from the local population. [in] location The person's current location. [in] params The parameter set of the Model. [in] t Current Simulation time. [in] dt Length of the current Simulation time step.
◆ add_household_group_to_model()
| void mio::abm::add_household_group_to_model | ( | Model & | model, |
| const HouseholdGroup & | household_group | ||
| ) |
Adds Households from a HouseholdGroup to the Model.
- Parameters
-
[in,out] model The Model to which the group has to be added. [in] household_group The HouseholdGroup to add.
◆ add_household_to_model()
◆ adjust_contact_rates()
| void mio::abm::adjust_contact_rates | ( | Location & | location, |
| size_t | num_agegroups | ||
| ) |
Adjust ContactRates of location by MaximumContacts.
Every ContactRate is adjusted by the proportion MaximumContacts of the location has on the total number of contacts according to the ContactRates.
- Parameters
-
[in,out] location The location whose ContactRates are adjusted. [in] num_agegroup The number of AgeGroups in the model.
◆ change_location()
| bool mio::abm::change_location | ( | Person & | person, |
| const Location & | destination, | ||
| const TransportMode | mode = TransportMode::Unknown, |
||
| const std::vector< uint32_t > & | cells = {0} |
||
| ) |
Change a persons location to another location.
If the person already is at the destination, neither mode nor cells are set.
- Parameters
-
[in,out] person The person to change location. [in] destination The destination to change location to. [in] mode The transport mode the person uses to change location. [in] cells The cells within the destination the person should be in.
- Returns
- Returns false if the person already is at the given destination, true otherwise.
◆ close_social_events()
| void mio::abm::close_social_events | ( | TimePoint | t_begin, |
| ScalarType | p, | ||
| Parameters & | params | ||
| ) |
During lockdown Persons join social events less often.
Whether a Person joins a social event is a random event (exponentially distributed). The Damping changes the parameter of the exponential distribution, where a Damping of 0 corresponds to no Damping and a Damping of 1 means that no social events are happening.
- Parameters
-
[in] t_begin Begin of the intervention. [in] p Damping between 0 and 1 that changes the parameter of the exponential distribution. [in,out] params Simulation parameters that include Damping.
◆ days() [1/2]
|
inline |
◆ days() [2/2]
|
inline |
◆ ensemble_params_percentile()
| std::vector<Model> mio::abm::ensemble_params_percentile | ( | const std::vector< std::vector< Model >> & | ensemble_params, |
| ScalarType | p | ||
| ) |
computes the p percentile of the parameters for each node.
- Parameters
-
ensemble_result graph of multiple simulation runs p percentile value in open interval (0, 1)
- Returns
- p percentile of the parameters over all runs
◆ get_buried()
| LocationType mio::abm::get_buried | ( | PersonalRandomNumberGenerator & | , |
| const Person & | person, | ||
| const TimePoint | t, | ||
| TimeSpan | , | ||
| const Parameters & | |||
| ) |
Persons in the icu go to cemetery when they are dead.
◆ go_to_event()
| LocationType mio::abm::go_to_event | ( | PersonalRandomNumberGenerator & | rng, |
| const Person & | person, | ||
| TimePoint | t, | ||
| TimeSpan | dt, | ||
| const Parameters & | params | ||
| ) |
Persons might go to social events.
◆ go_to_hospital()
| LocationType mio::abm::go_to_hospital | ( | PersonalRandomNumberGenerator & | , |
| const Person & | person, | ||
| const TimePoint | t, | ||
| TimeSpan | , | ||
| const Parameters & | |||
| ) |
Infected Persons may be hospitalized.
◆ go_to_icu()
| LocationType mio::abm::go_to_icu | ( | PersonalRandomNumberGenerator & | , |
| const Person & | person, | ||
| const TimePoint | t, | ||
| TimeSpan | , | ||
| const Parameters & | |||
| ) |
Persons in the hospital may be put in intensive care.
◆ go_to_quarantine()
| LocationType mio::abm::go_to_quarantine | ( | PersonalRandomNumberGenerator & | , |
| const Person & | person, | ||
| TimePoint | t, | ||
| TimeSpan | , | ||
| const Parameters & | params | ||
| ) |
Persons who are in quarantine should go home.
◆ go_to_school()
| LocationType mio::abm::go_to_school | ( | PersonalRandomNumberGenerator & | , |
| const Person & | person, | ||
| TimePoint | t, | ||
| TimeSpan | dt, | ||
| const Parameters & | params | ||
| ) |
School age children go to school in the morning and return later in the day.
◆ go_to_shop()
| LocationType mio::abm::go_to_shop | ( | PersonalRandomNumberGenerator & | rng, |
| const Person & | person, | ||
| TimePoint | t, | ||
| TimeSpan | dt, | ||
| const Parameters & | params | ||
| ) |
Adults may go shopping in their free time.
◆ go_to_work()
| LocationType mio::abm::go_to_work | ( | PersonalRandomNumberGenerator & | , |
| const Person & | person, | ||
| TimePoint | t, | ||
| TimeSpan | dt, | ||
| const Parameters & | params | ||
| ) |
Adults go to work in the morning and return later in the day.
◆ guess_activity_type()
|
constexpr |
◆ hours()
|
inline |
◆ interact()
| void mio::abm::interact | ( | PersonalRandomNumberGenerator & | personal_rng, |
| Person & | person, | ||
| const Location & | location, | ||
| const PopulationByAge & | local_population_by_age, | ||
| const AirExposureRates & | local_air_exposure, | ||
| const ContactExposureRates & | local_contact_exposure, | ||
| const TimePoint | t, | ||
| const TimeSpan | dt, | ||
| const Parameters & | global_parameters | ||
| ) |
Let a Person interact with the population at its current Location, possibly getting infected.
- Parameters
-
[in,out] rng PersonalRandomNumberGenerator for this Person. [in,out] person The person to interact with the local population. [in] location The person's current location. [in] local_population_by_age Local population by AgeGroups at the given location. [in] local_air_exposure Precomputed exposure rates by aerosols for the local population. [in] local_contact_exposure Precomputed exposure by rates contacts for the local population. [in] t Current Simulation time. [in] dt Length of the current Simulation time step. [in] global_parameters Parameters of the Model.
◆ minutes()
|
inline |
◆ normalize_exposure_contribution()
| void mio::abm::normalize_exposure_contribution | ( | ContactExposureRates & | local_contact_exposure, |
| const PopulationByAge & | local_population_by_age | ||
| ) |
Normalize contact exposure rate to average exposure per contact per time (from total exposure per time).
- Parameters
-
[in,out] local_contact_exposure Exposure rates through contacts for the local population. [in] local_population_by_age Local population by AgeGroups.
◆ random_mobility()
| LocationType mio::abm::random_mobility | ( | PersonalRandomNumberGenerator & | rng, |
| const Person & | person, | ||
| TimePoint | t, | ||
| TimeSpan | dt, | ||
| const Parameters & | params | ||
| ) |
Completely random mobility to any other Location.
◆ random_transition()
| T mio::abm::random_transition | ( | RNG & | rng, |
| T | current_state, | ||
| TimeSpan | dt, | ||
| const std::pair< T, ScalarType >(&) | transitions[NumTransitions] | ||
| ) |
Select a random transition from a list of possible transitions from the current state to others.
Each transition is represented by the new state and the probability of the transition, e.g. a pair {1, 0.5} is the transition to state 1 with rate 0.5. Transition rates are not probabilities but the parameters of an exponential distribution. One of the transitions happens if x < dt, where x is a sample from the exponential distribution Exp(S), S begin the sum of all rates. Which transition happens is determined by sampling from a discrete distribution with the rates as weights. It's also possible that no transition happens in this time step. In this case the current state is returned.
- Template Parameters
-
RNG Type that satisfies the UniformRandomBitGenerator concept. T Type that represents the states. NumTransitions Number of possible transitions.
- Parameters
-
[in,out] rng RandomNumberGenerator. [in] current_state Current state before transition. [in] dt Length of the time step. [in] transitions Array of pairs of new states and their rates (probabilities).
- Returns
- New state from the list if transition happens, current_state otherwise.
◆ return_home_when_recovered()
| LocationType mio::abm::return_home_when_recovered | ( | PersonalRandomNumberGenerator & | , |
| const Person & | person, | ||
| const TimePoint | t, | ||
| TimeSpan | , | ||
| const Parameters & | |||
| ) |
Persons in the hospital/icu return home when they recover.
◆ seconds()
|
inline |
◆ set_home_office()
| void mio::abm::set_home_office | ( | TimePoint | t_begin, |
| ScalarType | p, | ||
| Parameters & | params | ||
| ) |
Persons who are in home office are staying at home instead of going to work.
- Parameters
-
[in] t_begin Begin of the intervention. [in] p Percentage of Persons that work in home office. [in,out] params Simulation parameters that include Damping.
◆ set_school_closure()
| void mio::abm::set_school_closure | ( | TimePoint | t_begin, |
| ScalarType | p, | ||
| Parameters & | params | ||
| ) |
If schools are closed, students stay at home instead of going to school.
- Parameters
-
[in] t_begin Begin of the intervention. [in] p Percentage of Persons that are homeschooled. [in,out] params Simulation parameters.
◆ total_exposure_by_air()
| ScalarType mio::abm::total_exposure_by_air | ( | const AirExposureRates & | rates, |
| const CellIndex | cell_index, | ||
| const VirusVariant | virus, | ||
| const Parameters & | global_params | ||
| ) |
◆ total_exposure_by_contacts()
| ScalarType mio::abm::total_exposure_by_contacts | ( | const ContactExposureRates & | rates, |
| const CellIndex | cell_index, | ||
| const VirusVariant | virus, | ||
| const AgeGroup | age_receiver, | ||
| size_t | age_receiver_group_size, | ||
| const LocalInfectionParameters & | params | ||
| ) |
Compute the total virus exposure for contact transmission in a cell (unit: per day).
- Parameters
-
[in] rates The local exposure rates. [in] cell_index Cell index of the Cell. [in] virus VirusVariant of interest. [in] age_receiver AgeGroup of the receiving Person. [in] age_receiver_group_size Number of persons in the AgeGroup of the receiving Person. [in] params The local infection parameters.
- Returns
- Total amount of virus exposure by contacts of the receiver.
Variable Documentation
◆ MAX_NUM_AGE_GROUPS
|
constexpr |
Maximum number of age groups allowed in the model.
Generated by