|
| void | evolve (TimePoint t, TimeSpan dt) |
| | Evolve the Graph Model one time step. More...
|
| |
| std::vector< size_t > & | get_person_buffer () |
| | Get person buffer. More...
|
| |
| | 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}) |
| |
| void | remove_person (size_t pos) |
| | Removes person from the model. More...
|
| |
| LocationId | add_location (LocationType type, uint32_t num_cells=1) |
| | Add a Location to the Model. More...
|
| |
| PersonId | add_person (const LocationId id, AgeGroup age) |
| | Add a Person to the Model. More...
|
| |
| PersonId | add_person (Person &&person) |
| | Adds a copy of a given Person to the Model. More...
|
| |
| void | assign_location (PersonId person, LocationId location) |
| | Assign a Location to a Person. More...
|
| |
| void | begin_step (TimePoint t, TimeSpan dt) |
| | Prepare the Model for the next Simulation step. More...
|
| |
| void | change_location (PersonId person, LocationId destination, TransportMode mode=TransportMode::Unknown, const std::vector< uint32_t > &cells={0}) |
| | Let a Person change to another Location. More...
|
| |
| void | evolve (TimePoint t, TimeSpan dt) |
| | Evolve the Model one time step. More...
|
| |
| LocationId | find_location (LocationType type, const PersonId person) const |
| | Find an assigned Location of a Person. More...
|
| |
| int | get_id () const |
| | Get the model id. More...
|
| |
| size_t | get_number_persons (LocationId location) const |
| | Get the total number of Persons at the Location. More...
|
| |
| size_t | get_number_persons_age (LocationId location, CellIndex cell_idx, AgeGroup age) const |
| | Get the number of Persons of a specific AgeGroup in a specific Cell at the Location. More...
|
| |
| Person & | get_person (PersonId person_id) |
| |
| const Person & | get_person (PersonId person_id) const |
| | Get a reference to a Person from this Model. More...
|
| |
| RandomNumberGenerator & | get_rng () |
| | Get the RandomNumberGenerator used by this Model for random events. More...
|
| |
| size_t | get_subpopulation (LocationId location, TimePoint t, InfectionState state) const |
| | Get the number of Persons of a particular InfectionState for all Cells. More...
|
| |
| size_t | get_subpopulation_combined (TimePoint t, InfectionState s) const |
| | Get the number of Persons in one InfectionState at all Locations. More...
|
| |
| size_t | get_subpopulation_combined_per_location_type (TimePoint t, InfectionState s, LocationType type) const |
| | Get the number of Persons in one InfectionState at all Locations of a type. More...
|
| |
| TestingStrategy & | get_testing_strategy () |
| | Get the TestingStrategy. More...
|
| |
| const TestingStrategy & | get_testing_strategy () const |
| |
| TripList & | get_trip_list () |
| | Get the mobility data. More...
|
| |
| const TripList & | get_trip_list () const |
| |
| bool | has_location (LocationType type) const |
| | Check if at least one Location with a specified LocationType exists. More...
|
| |
| template<class C = std::initializer_list<LocationType>> |
| bool | has_locations (const C &location_types) const |
| | Check if at least one Location of every specified LocationType exists. More...
|
| |
| void | interact (PersonId person, TimePoint t, TimeSpan dt) |
| | Let a person interact with the population at its current location. More...
|
| |
| | Model (const Model &other, int id=0) |
| |
| | Model (const Parameters ¶ms, int id=0) |
| | Create a Model. More...
|
| |
| | Model (Model &&)=default |
| |
| | Model (size_t num_agegroups, int id=0) |
| | Create a Model. More...
|
| |
| Model & | operator= (const Model &)=default |
| |
| Model & | operator= (Model &&)=default |
| |
| template<class IOContext > |
| void | serialize (IOContext &io) const |
| | serialize this. More...
|
| |
| bool | use_mobility_rules () const |
| |
| void | use_mobility_rules (bool param) |
| | Decide if mobility rules (like go to school/work) are used or not; The mobility rules regarding hospitalization/ICU/quarantine are always used. More...
|
| |
| Range< ConstLocationIterator > | get_locations () const |
| | Get a range of all Locations in the Model. More...
|
| |
| Range< LocationIterator > | get_locations () |
| | Get a range of all Locations in the Model. More...
|
| |
| Range< ConstPersonIterator > | get_persons () const |
| | Get a range of all Persons in the Model. More...
|
| |
| Range< PersonIterator > | get_persons () |
| | Get a range of all Persons in the Model. More...
|
| |
| Range< ConstActivenessIterator > | get_activeness_statuses () const |
| | Get a range of all Persons activeness statuses in the Model. More...
|
| |
| Range< ActivenessIterator > | get_activeness_statuses () |
| | Get a range of all Persons activeness statuses in the Model. More...
|
| |
| const Location & | get_location (LocationId id) const |
| | Get a reference to a location in this Model. More...
|
| |
| void | assign_location (Person &person, LocationId location) |
| | Assign a Location to a Person. More...
|
| |
| Location & | get_location (LocationId id) |
| | Get a reference to a location in this Model. More...
|
| |
| Location & | get_location (PersonId id) |
| | Get a reference to the location of a person. More...
|
| |
| const Location & | get_location (PersonId id) const |
| | Get a reference to the location of a person. More...
|
| |
| uint32_t | get_person_index (PersonId person_id) const |
| | Get index of person in m_persons. More...
|
| |
|
| using | ActivenessIterator = std::vector< bool >::iterator |
| |
| using | Compartments = mio::abm::InfectionState |
| |
| using | ConstActivenessIterator = std::vector< bool >::const_iterator |
| |
| using | ConstLocationIterator = std::vector< Location >::const_iterator |
| |
| using | ConstPersonIterator = std::vector< Person >::const_iterator |
| |
| using | LocationIterator = std::vector< Location >::iterator |
| |
| using | MobilityRuleType = LocationType(*)(PersonalRandomNumberGenerator &, const Person &, TimePoint, TimeSpan, const Parameters &) |
| |
| using | PersonIterator = std::vector< Person >::iterator |
| |
| template<class IOContext > |
| static IOResult< Model > | deserialize (IOContext &io) |
| | deserialize an object of this class. More...
|
| |
| Parameters | parameters |
| | The simulation parameters of the Model. More...
|
| |
| void | interaction (TimePoint t, TimeSpan dt) |
| | Persons interact at their Location and may become infected. More...
|
| |
| void | perform_mobility (TimePoint t, TimeSpan dt) |
| | Persons change location in the Model according to rules. More...
|
| |
| void | build_compute_local_population_cache () const |
| | Shape the cache and store how many Persons are at any Location. Use from single thread! More...
|
| |
| void | build_exposure_caches () |
| | Shape the air and contact exposure cache according to the current Locations. More...
|
| |
| void | compute_exposure_caches (TimePoint t, TimeSpan dt) |
| | Store all air/contact exposures for the current simulation step. More...
|
| |
| void | change_location (Person &person, LocationId destination, TransportMode mode=TransportMode::Unknown, const std::vector< uint32_t > &cells={0}) |
| | Let a Person change to another Location. More...
|
| |
| Location & | get_location (Person &person) |
| | Get a reference to the location of a person. More...
|
| |
| const Location & | get_location (Person &person) const |
| | Current number of Persons in a given location. More...
|
| |
| LocationId | find_location (LocationType type, const Person &person) const |
| | Find an assigned Location of a Person. More...
|
| |
| void | interact (Person &person, TimePoint t, TimeSpan dt) |
| | Let a person interact with the population at its current location. More...
|
| |
| template<class M > |
| static std::conditional_t< std::is_const_v< M >, const Person &, Person & > | get_person_impl (M &m, PersonId person_id) |
| | Implementation of Model::get_person. More...
|
| |
| Eigen::Matrix< std::atomic_int_fast32_t, Eigen::Dynamic, 1 > | m_local_population_cache |
| | Current number of Persons in a given location. More...
|
| |
| Eigen::Matrix< PopulationByAge, Eigen::Dynamic, 1 > | m_local_population_by_age_cache |
| | Current number of Persons per AgeGroup in a given location. More...
|
| |
| Eigen::Matrix< AirExposureRates, Eigen::Dynamic, 1 > | m_air_exposure_rates_cache |
| | Cache for local exposure through droplets in #transmissions/day. More...
|
| |
| Eigen::Matrix< ContactExposureRates, Eigen::Dynamic, 1 > | m_contact_exposure_rates_cache |
| | Cache for local exposure through contacts in #transmissions/day. More...
|
| |
| bool | m_is_local_population_cache_valid = false |
| | Current number of Persons in a given location. More...
|
| |
| bool | m_are_exposure_caches_valid = false |
| | Current number of Persons in a given location. More...
|
| |
| bool | m_exposure_caches_need_rebuild = true |
| | Current number of Persons in a given location. More...
|
| |
| int | m_id |
| | Model id. Is only used for abm graph model or hybrid model. More...
|
| |
| std::vector< Person > | m_persons |
| | Vector of every Person. More...
|
| |
| std::vector< Location > | m_locations |
| | Vector of every Location. More...
|
| |
| std::vector< bool > | m_activeness_statuses |
| | Vector with activeness status for every person. Is only used for abm graph model or hybrid model. More...
|
| |
| std::bitset< size_t(LocationType::Count)> | m_has_locations |
| | Flags for each LocationType, set if a Location of that type exists. More...
|
| |
| TestingStrategy | m_testing_strategy |
| | List of TestingSchemes that are checked for testing. More...
|
| |
| TripList | m_trip_list |
| | List of all Trips the Persons do. More...
|
| |
| bool | m_use_mobility_rules |
| | Whether mobility rules are considered. More...
|
| |
| std::vector< MobilityRuleType > | m_mobility_rules |
| | Rules that govern the mobility between Locations. More...
|
| |
| LocationId | m_cemetery_id |
| | Current number of Persons in a given location. More...
|
| |
| RandomNumberGenerator | m_rng |
| | Global random number generator. More...
|
| |
| bool | m_person_ids_equal_index |
| | Current number of Persons in a given location. More...
|
| |