graph_abmodel.h Source File
|
CPP API
|
graph_abmodel.h
Go to the documentation of this file.
165 if (person.is_in_quarantine(t, parameters) || person.get_infection_state(t) == InfectionState::Dead) {
171 if (target_location.is_mask_required() && !person.is_compliant(personal_rng, InterventionType::Mask)) {
194 person.set_location(abm::LocationType::Invalid, trip.destination, std::numeric_limits<int>::max());
Definition: graph_abmodel.h:43
std::vector< size_t > m_person_buffer
List with indices of persons that are subject to move to another node.
Definition: graph_abmodel.h:205
void evolve(TimePoint t, TimeSpan dt)
Evolve the Graph Model one time step.
Definition: graph_abmodel.h:81
void perform_mobility(TimePoint t, TimeSpan dt)
Definition: graph_abmodel.h:91
std::vector< size_t > & get_person_buffer()
Get person buffer.
Definition: graph_abmodel.h:60
void remove_person(size_t pos)
Removes person from the model.
Definition: graph_abmodel.h:69
GraphABModel(size_t num_agegroups, int id, std::vector< Base::MobilityRuleType > mobility_rules=std::vector< Base::MobilityRuleType >{&get_buried, &return_home_when_recovered, &go_to_hospital, &go_to_icu, &go_to_school, &go_to_work, &go_to_shop, &go_to_event, &go_to_quarantine})
Definition: graph_abmodel.h:47
All Locations in the simulated Model where Persons gather.
Definition: location.h:92
LocationId get_id() const
Get the location's identifier in a Model.
Definition: location.h:143
bool is_mask_required() const
Get the information whether masks are required to enter this Location.
Definition: location.h:219
CellCapacity get_capacity(uint32_t cell_idx=0) const
Get the capacity of a specific Cell in persons and volume.
Definition: location.h:209
MaskType get_required_mask() const
Get the type of Mask that is demanded when entering this Location.
Definition: location.h:177
MaskType get_type() const
Get the MaskType of this Mask.
Definition: mask.h:49
Agents in the simulated Model that can carry and spread the Infection.
Definition: person.h:51
void set_location(LocationType type, LocationId id, int model_id)
Change the location of the person.
Definition: person.cpp:101
Mask & get_mask()
Get the current Mask of the Person.
Definition: person.h:299
int get_assigned_location_model_id(LocationType type) const
Returns the model id of an assigned location of the Person.
Definition: person.cpp:130
bool is_compliant(PersonalRandomNumberGenerator &rng, InterventionType intervention) const
Checks whether the Person complies an Intervention.
Definition: person.cpp:222
LocationId get_location() const
Get the current Location of the Person.
Definition: person.cpp:96
void set_mask(MaskType type, TimePoint t)
Change the mask to new type.
Definition: person.cpp:267
Random number generator of individual persons.
Definition: personal_rng.h:50
static double floor(const ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > &x)
Definition: ad.hpp:2451
static min_max_return_type< ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 >, ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > >::type max(const ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > &a, const ad::internal::active_type< AD_TAPE_REAL, DATA_HANDLER_1 > &b)
Definition: ad.hpp:2596
bool change_location(Person &person, const Location &destination, const TransportMode mode, const std::vector< uint32_t > &cells)
Change a persons location to another location.
Definition: model_functions.cpp:162
LocationType return_home_when_recovered(PersonalRandomNumberGenerator &, const Person &person, const TimePoint t, TimeSpan, const Parameters &)
Persons in the hospital/icu return home when they recover.
Definition: mobility_rules.cpp:159
LocationType go_to_event(PersonalRandomNumberGenerator &rng, const Person &person, TimePoint t, TimeSpan dt, const Parameters ¶ms)
Persons might go to social events.
Definition: mobility_rules.cpp:104
@ Invalid
LocationType go_to_school(PersonalRandomNumberGenerator &, const Person &person, TimePoint t, TimeSpan dt, const Parameters ¶ms)
School age children go to school in the morning and return later in the day.
Definition: mobility_rules.cpp:47
LocationType go_to_icu(PersonalRandomNumberGenerator &, const Person &person, const TimePoint t, TimeSpan, const Parameters &)
Persons in the hospital may be put in intensive care.
Definition: mobility_rules.cpp:149
TimeSpan seconds(int seconds)
Create a TimeSpan of a specified number of seconds.
Definition: time.h:321
LocationType go_to_work(PersonalRandomNumberGenerator &, const Person &person, TimePoint t, TimeSpan dt, const Parameters ¶ms)
Adults go to work in the morning and return later in the day.
Definition: mobility_rules.cpp:66
LocationType get_buried(PersonalRandomNumberGenerator &, const Person &person, const TimePoint t, TimeSpan, const Parameters &)
Persons in the icu go to cemetery when they are dead.
Definition: mobility_rules.cpp:170
TimeSpan days(int days)
Create a TimeSpan with a specified number of days.
Definition: time.h:348
LocationType go_to_shop(PersonalRandomNumberGenerator &rng, const Person &person, TimePoint t, TimeSpan dt, const Parameters ¶ms)
Adults may go shopping in their free time.
Definition: mobility_rules.cpp:85
LocationType go_to_hospital(PersonalRandomNumberGenerator &, const Person &person, const TimePoint t, TimeSpan, const Parameters &)
Infected Persons may be hospitalized.
Definition: mobility_rules.cpp:139
LocationType go_to_quarantine(PersonalRandomNumberGenerator &, const Person &person, TimePoint t, TimeSpan, const Parameters ¶ms)
Persons who are in quarantine should go home.
Definition: mobility_rules.cpp:128
@ None
A collection of classes to simplify handling of matrix shapes in meta programming.
Definition: models/abm/analyze_result.h:30
requires details::IsElementReference< M > RowMajorIterator< M, false > begin(M &m)
create a non-const iterator to first element of the matrix m.
Definition: eigen_util.h:421
uint32_t persons
Maximal number of Persons at the Cell.
Definition: location.h:59
static const LocationId invalid_id()
Value for invalid IDs.
Definition: location_id.h:48
Effectiveness of a Mask of a certain MaskType% against an Infection%.
Definition: abm/parameters.h:382
Generated by