MobilityParameters< FP > Class Template Reference
|
CPP API
|
parameters that influence mobility. More...
#include <metapopulation_mobility_instant.h>
Public Member Functions | |
| MobilityParameters (const Eigen::VectorX< FP > &coeffs) | |
| constructor from mobility coefficients. More... | |
| MobilityParameters (const Eigen::VectorX< FP > &coeffs, const std::vector< std::vector< size_t >> &save_indices) | |
| Constructor for initializing mobility parameters with coefficients from an Eigen Vector and specific save indices. More... | |
| MobilityParameters (const MobilityCoefficientGroup< FP > &coeffs) | |
| constructor from mobility coefficients. More... | |
| MobilityParameters (const MobilityCoefficientGroup< FP > &coeffs, const std::vector< std::vector< size_t >> &save_indices) | |
Constructor for initializing mobility parameters with coefficients from type MobilityCoefficientGroup and specific save indices. More... | |
| bool | operator!= (const MobilityParameters &other) const |
| bool | operator== (const MobilityParameters &other) const |
| equality comparison operators More... | |
| template<class IOContext > | |
| void | serialize (IOContext &io) const |
| serialize this. More... | |
| const MobilityCoefficientGroup< FP > & | get_coefficients () const |
| Get/Setthe mobility coefficients. More... | |
| MobilityCoefficientGroup< FP > & | get_coefficients () |
| Get/Setthe mobility coefficients. More... | |
| void | set_coefficients (const MobilityCoefficientGroup< FP > &coeffs) |
| const auto & | get_save_indices () const |
| Get the indices of compartments to be saved during mobility. More... | |
| const DynamicNPIs< FP > & | get_dynamic_npis_infected () const |
| Get/Set dynamic NPIs that are implemented when relative infections exceed thresholds. More... | |
| DynamicNPIs< FP > & | get_dynamic_npis_infected () |
| Get/Setthe mobility coefficients. More... | |
| void | set_dynamic_npis_infected (const DynamicNPIs< FP > &v) |
Static Public Member Functions | |
| template<class IOContext > | |
| static IOResult< MobilityParameters > | deserialize (IOContext &io) |
| deserialize an object of this class. More... | |
Private Attributes | |
| MobilityCoefficientGroup< FP > | m_coefficients |
| DynamicNPIs< FP > | m_dynamic_npis |
| std::vector< std::vector< size_t > > | m_saved_compartment_indices |
Detailed Description
template<typename FP>
class mio::MobilityParameters< FP >
parameters that influence mobility.
- Template Parameters
-
FP the underlying floating point type, e.g., double
Constructor & Destructor Documentation
◆ MobilityParameters() [1/4]
|
inline |
constructor from mobility coefficients.
- Parameters
-
coeffs mobility coefficients
◆ MobilityParameters() [2/4]
|
inline |
constructor from mobility coefficients.
- Parameters
-
coeffs mobility coefficients
◆ MobilityParameters() [3/4]
|
inline |
Constructor for initializing mobility parameters with coefficients from type MobilityCoefficientGroup and specific save indices.
- Parameters
-
[in] coeffs A group of mobility coefficients represented by a MobilityCoefficientGroupobject, defining how individuals move between nodes.[in] save_indices A 2D vector of indices. The outer vector represents different sets of compartments. Each inner vector represents a set of compartments whose data will be saved in the member m_mobility_resultsof theMobilityEdgeclass during the simulation using theadd_mobility_result_time_pointfunction.
◆ MobilityParameters() [4/4]
|
inline |
Constructor for initializing mobility parameters with coefficients from an Eigen Vector and specific save indices.
- Parameters
-
[in] coeffs An Eigen::VectorX<FP>containing mobility coefficients.[in] save_indices A 2D vector of indices. The outer vector represents different sets of compartments. Each inner vector represents a set of compartments whose data will be saved in the member m_mobility_resultsof theMobilityEdgeclass during the simulation using theadd_mobility_result_time_pointfunction.
Member Function Documentation
◆ deserialize()
|
inlinestatic |
deserialize an object of this class.
- See also
- mio::deserialize
◆ get_coefficients() [1/2]
|
inline |
Get/Setthe mobility coefficients.
The coefficients represent the (time-dependent) percentage of people moving from one node to another by age and infection compartment.
- Returns
- the mobility coefficients.
◆ get_coefficients() [2/2]
|
inline |
Get/Setthe mobility coefficients.
The coefficients represent the (time-dependent) percentage of people moving from one node to another by age and infection compartment.
- Returns
- the mobility coefficients.
◆ get_dynamic_npis_infected() [1/2]
|
inline |
Get/Setthe mobility coefficients.
The coefficients represent the (time-dependent) percentage of people moving from one node to another by age and infection compartment.
- Returns
- the mobility coefficients.
◆ get_dynamic_npis_infected() [2/2]
|
inline |
Get/Set dynamic NPIs that are implemented when relative infections exceed thresholds.
This feature is optional. The simulation model needs to overload the get_infected_relative function.
- Returns
- dynamic NPIs for relative infections.
◆ get_save_indices()
|
inline |
Get the indices of compartments to be saved during mobility.
This function returns a reference to the vector of m_saved_compartment_indices, which specifies the groups of compartments that are saved in the member m_mobility_results of the MobilityEdge class during the simulation using the add_mobility_result_time_point function.
- Returns
- A reference to the 2D vector containing indices of compartments to be saved. The outer vector represents different sets of compartments. Each inner vector represents a group of compartments defined by indices.
◆ operator!=()
|
inline |
◆ operator==()
|
inline |
equality comparison operators
◆ serialize()
|
inline |
serialize this.
- See also
- mio::serialize
◆ set_coefficients()
|
inline |
- Parameters
-
coeffs the mobility coefficients.
◆ set_dynamic_npis_infected()
|
inline |
- Parameters
-
v dynamic NPIs for relative infections.
Member Data Documentation
◆ m_coefficients
|
private |
◆ m_dynamic_npis
|
private |
◆ m_saved_compartment_indices
|
private |
Generated by