Model Class Reference

CPP API: mio::abm::Model Class Reference

The Model of the Simulation. More...

#include <model.h>

Inheritance diagram for mio::abm::Model:
Collaboration diagram for mio::abm::Model:

Public Types

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
 

Public Member Functions

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...
 
Personget_person (PersonId person_id)
 
const Personget_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...
 
TestingStrategyget_testing_strategy ()
 Get the TestingStrategy. More...
 
const TestingStrategyget_testing_strategy () const
 
TripListget_trip_list ()
 Get the mobility data. More...
 
const TripListget_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 &params, int id=0)
 Create a Model. More...
 
 Model (Model &&)=default
 
 Model (size_t num_agegroups, int id=0)
 Create a Model. More...
 
Modeloperator= (const Model &)=default
 
Modeloperator= (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< ConstLocationIteratorget_locations () const
 Get a range of all Locations in the Model. More...
 
Range< LocationIteratorget_locations ()
 Get a range of all Locations in the Model. More...
 
Range< ConstPersonIteratorget_persons () const
 Get a range of all Persons in the Model. More...
 
Range< PersonIteratorget_persons ()
 Get a range of all Persons in the Model. More...
 
Range< ConstActivenessIteratorget_activeness_statuses () const
 Get a range of all Persons activeness statuses in the Model. More...
 
Range< ActivenessIteratorget_activeness_statuses ()
 Get a range of all Persons activeness statuses in the Model. More...
 
const Locationget_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...
 
Locationget_location (LocationId id)
 Get a reference to a location in this Model. More...
 
Locationget_location (PersonId id)
 Get a reference to the location of a person. More...
 
const Locationget_location (PersonId id) const
 Get a reference to the location of a person. More...
 

Static Public Member Functions

template<class IOContext >
static IOResult< Modeldeserialize (IOContext &io)
 deserialize an object of this class. More...
 

Public Attributes

Parameters parameters
 The simulation parameters of the Model. 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< Personm_persons
 Vector of every Person. More...
 
std::vector< Locationm_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< MobilityRuleTypem_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...
 
uint32_t get_person_index (PersonId person_id) const
 Get index of person in m_persons. 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...
 
Locationget_location (Person &person)
 Get a reference to the location of a person. More...
 
const Locationget_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...
 

Detailed Description

The Model of the Simulation.

It consists of Locations and Persons (Agents).

Member Typedef Documentation

◆ ActivenessIterator

using mio::abm::Model::ActivenessIterator = std::vector<bool>::iterator

◆ Compartments

◆ ConstActivenessIterator

using mio::abm::Model::ConstActivenessIterator = std::vector<bool>::const_iterator

◆ ConstLocationIterator

using mio::abm::Model::ConstLocationIterator = std::vector<Location>::const_iterator

◆ ConstPersonIterator

using mio::abm::Model::ConstPersonIterator = std::vector<Person>::const_iterator

◆ LocationIterator

using mio::abm::Model::LocationIterator = std::vector<Location>::iterator

◆ MobilityRuleType

◆ PersonIterator

using mio::abm::Model::PersonIterator = std::vector<Person>::iterator

Constructor & Destructor Documentation

◆ Model() [1/4]

mio::abm::Model::Model ( size_t  num_agegroups,
int  id = 0 
)
inline

Create a Model.

Parameters
[in]num_agegroupsThe number of AgeGroups in the simulated Model. Must be less than MAX_NUM_AGE_GROUPS.

◆ Model() [2/4]

mio::abm::Model::Model ( const Parameters params,
int  id = 0 
)
inline

Create a Model.

Parameters
[in]paramsInitial simulation parameters.

◆ Model() [3/4]

mio::abm::Model::Model ( const Model other,
int  id = 0 
)
inline

◆ Model() [4/4]

mio::abm::Model::Model ( Model &&  )
default

Member Function Documentation

◆ add_location()

LocationId mio::abm::Model::add_location ( LocationType  type,
uint32_t  num_cells = 1 
)

Add a Location to the Model.

Parameters
[in]typeType of Location to add.
[in]num_cells[Default: 1] Number of Cells that the Location is divided into.
Returns
ID of the newly created Location.

◆ add_person() [1/2]

PersonId mio::abm::Model::add_person ( const LocationId  id,
AgeGroup  age 
)

Add a Person to the Model.

Parameters
[in]idThe LocationID of the initial Location of the Person.
[in]ageAgeGroup of the person.
Returns
Id of the newly created Person.

◆ add_person() [2/2]

PersonId mio::abm::Model::add_person ( Person &&  person)

Adds a copy of a given Person to the Model.

Parameters
[in]personThe Person to copy from.
Returns
Id of the newly created Person.

◆ assign_location() [1/2]

void mio::abm::Model::assign_location ( Person person,
LocationId  location 
)
inline

Assign a Location to a Person.

A Person can have at most one assigned Location of a certain LocationType. Assigning another Location of an already assigned LocationType will replace the prior assignment.

Parameters
[in]personreference to the Person the location will be assigned to.
[in]locationThe LocationId of the Location.

◆ assign_location() [2/2]

void mio::abm::Model::assign_location ( PersonId  person,
LocationId  location 
)
inline

Assign a Location to a Person.

A Person can have at most one assigned Location of a certain LocationType. Assigning another Location of an already assigned LocationType will replace the prior assignment.

Parameters
[in]personThe Id of the person this location will be assigned to.
[in]locationThe LocationId of the Location.

◆ begin_step()

void mio::abm::Model::begin_step ( TimePoint  t,
TimeSpan  dt 
)

Prepare the Model for the next Simulation step.

Parameters
[in]tCurrent time.
[in]dtLength of the time step.

◆ build_compute_local_population_cache()

void mio::abm::Model::build_compute_local_population_cache ( ) const
protected

Shape the cache and store how many Persons are at any Location. Use from single thread!

◆ build_exposure_caches()

void mio::abm::Model::build_exposure_caches ( )
protected

Shape the air and contact exposure cache according to the current Locations.

◆ change_location() [1/2]

void mio::abm::Model::change_location ( Person person,
LocationId  destination,
TransportMode  mode = TransportMode::Unknown,
const std::vector< uint32_t > &  cells = {0} 
)
inlineprotected

Let a Person change to another Location.

Parameters
[in]personReference to Person.
[in]destinationLocationId of the Location in this Model, which the Person should change to.
[in]modeThe transport mode the person uses to change the Location.
[in]cellsThe cells within the destination the person should be in.

◆ change_location() [2/2]

void mio::abm::Model::change_location ( PersonId  person,
LocationId  destination,
TransportMode  mode = TransportMode::Unknown,
const std::vector< uint32_t > &  cells = {0} 
)
inline

Let a Person change to another Location.

Parameters
[in]personId of a person from this Model.
[in]destinationLocationId of the Location in this Model, which the Person should change to.
[in]modeThe transport mode the person uses to change the Location.
[in]cellsThe cells within the destination the person should be in.

◆ compute_exposure_caches()

void mio::abm::Model::compute_exposure_caches ( TimePoint  t,
TimeSpan  dt 
)
protected

Store all air/contact exposures for the current simulation step.

This will also compute the local population cache if it is not valid, as it is required for the computation of the exposure rates.

Parameters
[in]tCurrent TimePoint of the simulation.
[in]dtThe duration of the simulation step.

◆ deserialize()

template<class IOContext >
static IOResult<Model> mio::abm::Model::deserialize ( IOContext &  io)
inlinestatic

deserialize an object of this class.

See also
mio::deserialize

◆ evolve()

void mio::abm::Model::evolve ( TimePoint  t,
TimeSpan  dt 
)

Evolve the Model one time step.

Parameters
[in]tCurrent time.
[in]dtLength of the time step.

◆ find_location() [1/2]

LocationId mio::abm::Model::find_location ( LocationType  type,
const Person person 
) const
inlineprotected

Find an assigned Location of a Person.

Parameters
[in]typeThe LocationType that specifies the assigned Location.
[in]personReference to Person.
Returns
ID of the Location of LocationType type assigend to person.

◆ find_location() [2/2]

LocationId mio::abm::Model::find_location ( LocationType  type,
const PersonId  person 
) const

Find an assigned Location of a Person.

Parameters
[in]typeThe LocationType that specifies the assigned Location.
[in]personId of the Person.
Returns
ID of the Location of LocationType type assigend to person.

◆ get_activeness_statuses() [1/2]

auto mio::abm::Model::get_activeness_statuses ( )

Get a range of all Persons activeness statuses in the Model.

Returns
A range of all Persons activeness statuses.

◆ get_activeness_statuses() [2/2]

auto mio::abm::Model::get_activeness_statuses ( ) const

Get a range of all Persons activeness statuses in the Model.

Returns
A range of all Persons activeness statuses.

◆ get_id()

int mio::abm::Model::get_id ( ) const
inline

Get the model id.

Is only relevant for graph abm or hybrid model.

Returns
The model id

◆ get_location() [1/6]

Location& mio::abm::Model::get_location ( LocationId  id)
inline

Get a reference to a location in this Model.

Parameters
[in]idLocationId of the Location.
Returns
Reference to the Location.

◆ get_location() [2/6]

const Location& mio::abm::Model::get_location ( LocationId  id) const
inline

Get a reference to a location in this Model.

Parameters
[in]idLocationId of the Location.
Returns
Reference to the Location.

◆ get_location() [3/6]

Location& mio::abm::Model::get_location ( Person person)
inlineprotected

Get a reference to the location of a person.

Parameters
[in]personReference to a Person.
Returns
Reference to the Location.

◆ get_location() [4/6]

const Location& mio::abm::Model::get_location ( Person person) const
inlineprotected

Current number of Persons in a given location.

◆ get_location() [5/6]

Location& mio::abm::Model::get_location ( PersonId  id)
inline

Get a reference to the location of a person.

Parameters
[in]idId of a person.
Returns
Reference to the Location.

◆ get_location() [6/6]

const Location& mio::abm::Model::get_location ( PersonId  id) const
inline

Get a reference to the location of a person.

Parameters
[in]idId of a person.
Returns
Reference to the Location.

◆ get_locations() [1/2]

auto mio::abm::Model::get_locations ( )

Get a range of all Locations in the Model.

Returns
A range of all Locations.

◆ get_locations() [2/2]

auto mio::abm::Model::get_locations ( ) const

Get a range of all Locations in the Model.

Returns
A range of all Locations.

◆ get_number_persons()

size_t mio::abm::Model::get_number_persons ( LocationId  location) const
inline

Get the total number of Persons at the Location.

Parameters
[in]locationA LocationId from the Model.
Returns
Number of Persons at the location.

◆ get_number_persons_age()

size_t mio::abm::Model::get_number_persons_age ( LocationId  location,
CellIndex  cell_idx,
AgeGroup  age 
) const
inline

Get the number of Persons of a specific AgeGroup in a specific Cell at the Location.

Parameters
[in]locationA LocationId from the Model.
[in]cell_idxIndex of the Cell.
[in]AgeGroupAn AgeGroup from the Model.
Returns
Number of Persons of the AgeGroup in the Cell at the Location.

◆ get_person() [1/2]

Person& mio::abm::Model::get_person ( PersonId  person_id)
inline

◆ get_person() [2/2]

const Person& mio::abm::Model::get_person ( PersonId  person_id) const
inline

Get a reference to a Person from this Model.

Parameters
[in]person_idA Person's PersonId.
Returns
A reference to the Person.

◆ get_person_impl()

template<class M >
static std::conditional_t<std::is_const_v<M>, const Person&, Person&> mio::abm::Model::get_person_impl ( M &  m,
PersonId  person_id 
)
inlinestaticprotected

Implementation of Model::get_person.

This function needs to use a template to deduce whether the model and returned person should be const.

Parameters
[in]mA reference to *this, so we can access m_persons.
[in]person_idA Person's PersonId.
Returns
A reference to the Person with matching ID.

◆ get_person_index()

uint32_t mio::abm::Model::get_person_index ( PersonId  person_id) const
inline

Get index of person in m_persons.

Parameters
[in]person_idA person's unique PersonId. First 32 bit are the Person's individual id and second 32 bit the Persons's home model id.
Returns
Index of Person in m_persons vector.

◆ get_persons() [1/2]

auto mio::abm::Model::get_persons ( )

Get a range of all Persons in the Model.

Returns
A range of all Persons.

◆ get_persons() [2/2]

auto mio::abm::Model::get_persons ( ) const

Get a range of all Persons in the Model.

Returns
A range of all Persons.

◆ get_rng()

RandomNumberGenerator& mio::abm::Model::get_rng ( )
inline

Get the RandomNumberGenerator used by this Model for random events.

Persons use their own generators with the same key as the global one.

Returns
The random number generator.

◆ get_subpopulation()

size_t mio::abm::Model::get_subpopulation ( LocationId  location,
TimePoint  t,
InfectionState  state 
) const
inline

Get the number of Persons of a particular InfectionState for all Cells.

Parameters
[in]locationA LocationId from the Model.
[in]tTimePoint of querry.
[in]stateInfectionState of interest.
Returns
Amount of Persons of the InfectionState in all Cells of the Location.

◆ get_subpopulation_combined()

size_t mio::abm::Model::get_subpopulation_combined ( TimePoint  t,
InfectionState  s 
) const

Get the number of Persons in one InfectionState at all Locations.

Parameters
[in]tSpecified #TimePoint.
[in]sSpecified InfectionState.

◆ get_subpopulation_combined_per_location_type()

size_t mio::abm::Model::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.

Parameters
[in]tSpecified #TimePoint.
[in]sSpecified InfectionState.
[in]typeSpecified LocationType.

◆ get_testing_strategy() [1/2]

TestingStrategy & mio::abm::Model::get_testing_strategy ( )

Get the TestingStrategy.

Returns
Reference to the list of TestingSchemes that are checked for testing.

◆ get_testing_strategy() [2/2]

const TestingStrategy & mio::abm::Model::get_testing_strategy ( ) const

◆ get_trip_list() [1/2]

TripList & mio::abm::Model::get_trip_list ( )

Get the mobility data.

Returns
Reference to the list of Trips that the Persons make.

◆ get_trip_list() [2/2]

const TripList & mio::abm::Model::get_trip_list ( ) const

◆ has_location()

bool mio::abm::Model::has_location ( LocationType  type) const
inline

Check if at least one Location with a specified LocationType exists.

Returns
True if there is at least one Location of LocationType type. False otherwise.

◆ has_locations()

template<class C = std::initializer_list<LocationType>>
bool mio::abm::Model::has_locations ( const C &  location_types) const
inline

Check if at least one Location of every specified LocationType exists.

Template Parameters
CA type of container of LocationType.
Parameters
location_typesA container of LocationTypes.
Returns
True if there is at least one Location of every LocationType in location_types. False otherwise.

◆ interact() [1/2]

void mio::abm::Model::interact ( Person person,
TimePoint  t,
TimeSpan  dt 
)
inlineprotected

Let a person interact with the population at its current location.

Parameters
[in]personReference to Person.
[in]tTime step of the simulation.
[in]dtStep size of the simulation.

◆ interact() [2/2]

void mio::abm::Model::interact ( PersonId  person,
TimePoint  t,
TimeSpan  dt 
)
inline

Let a person interact with the population at its current location.

Parameters
[in]personId of a person from this Model.
[in]tTime step of the simulation.
[in]dtStep size of the simulation.

◆ interaction()

void mio::abm::Model::interaction ( TimePoint  t,
TimeSpan  dt 
)
protected

Persons interact at their Location and may become infected.

Parameters
[in]tThe current TimePoint.
[in]dtThe length of the time step of the Simulation.

◆ operator=() [1/2]

Model& mio::abm::Model::operator= ( const Model )
default

◆ operator=() [2/2]

Model& mio::abm::Model::operator= ( Model &&  )
default

◆ perform_mobility()

void mio::abm::Model::perform_mobility ( TimePoint  t,
TimeSpan  dt 
)
protected

Persons change location in the Model according to rules.

Parameters
[in]tThe current TimePoint.
[in]dtThe length of the time step of the Simulation.

◆ serialize()

template<class IOContext >
void mio::abm::Model::serialize ( IOContext &  io) const
inline

serialize this.

See also
mio::serialize

◆ use_mobility_rules() [1/2]

bool mio::abm::Model::use_mobility_rules ( ) const

◆ use_mobility_rules() [2/2]

void mio::abm::Model::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.

Parameters
[in]paramIf true uses the mobility rules for changing location to school/work etc., else only the rules regarding hospitalization/ICU/quarantine.

Member Data Documentation

◆ m_activeness_statuses

std::vector<bool> mio::abm::Model::m_activeness_statuses
protected

Vector with activeness status for every person. Is only used for abm graph model or hybrid model.

◆ m_air_exposure_rates_cache

Eigen::Matrix<AirExposureRates, Eigen::Dynamic, 1> mio::abm::Model::m_air_exposure_rates_cache
protected

Cache for local exposure through droplets in #transmissions/day.

◆ m_are_exposure_caches_valid

bool mio::abm::Model::m_are_exposure_caches_valid = false
protected

Current number of Persons in a given location.

◆ m_cemetery_id

LocationId mio::abm::Model::m_cemetery_id
protected

Current number of Persons in a given location.

◆ m_contact_exposure_rates_cache

Eigen::Matrix<ContactExposureRates, Eigen::Dynamic, 1> mio::abm::Model::m_contact_exposure_rates_cache
protected

Cache for local exposure through contacts in #transmissions/day.

◆ m_exposure_caches_need_rebuild

bool mio::abm::Model::m_exposure_caches_need_rebuild = true
protected

Current number of Persons in a given location.

◆ m_has_locations

std::bitset<size_t(LocationType::Count)> mio::abm::Model::m_has_locations
protected

Flags for each LocationType, set if a Location of that type exists.

◆ m_id

int mio::abm::Model::m_id
protected

Model id. Is only used for abm graph model or hybrid model.

◆ m_is_local_population_cache_valid

bool mio::abm::Model::m_is_local_population_cache_valid = false
mutableprotected

Current number of Persons in a given location.

◆ m_local_population_by_age_cache

Eigen::Matrix<PopulationByAge, Eigen::Dynamic, 1> mio::abm::Model::m_local_population_by_age_cache
mutableprotected

Current number of Persons per AgeGroup in a given location.

◆ m_local_population_cache

Eigen::Matrix<std::atomic_int_fast32_t, Eigen::Dynamic, 1> mio::abm::Model::m_local_population_cache
mutableprotected

Current number of Persons in a given location.

◆ m_locations

std::vector<Location> mio::abm::Model::m_locations
protected

Vector of every Location.

◆ m_mobility_rules

std::vector<MobilityRuleType> mio::abm::Model::m_mobility_rules
protected

Rules that govern the mobility between Locations.

◆ m_person_ids_equal_index

bool mio::abm::Model::m_person_ids_equal_index
protected

Current number of Persons in a given location.

◆ m_persons

std::vector<Person> mio::abm::Model::m_persons
protected

Vector of every Person.

◆ m_rng

RandomNumberGenerator mio::abm::Model::m_rng
protected

Global random number generator.

◆ m_testing_strategy

TestingStrategy mio::abm::Model::m_testing_strategy
protected

List of TestingSchemes that are checked for testing.

◆ m_trip_list

TripList mio::abm::Model::m_trip_list
protected

List of all Trips the Persons do.

◆ m_use_mobility_rules

bool mio::abm::Model::m_use_mobility_rules
protected

Whether mobility rules are considered.

◆ parameters

Parameters mio::abm::Model::parameters

The simulation parameters of the Model.