Model< FP > Class Template Reference
|
CPP API
|
mio::osecirts::Model< FP > Class Template Reference
#include <model.h>
Inheritance diagram for mio::osecirts::Model< FP >:
Collaboration diagram for mio::osecirts::Model< FP >:
Public Member Functions | |
| void | get_flows (Eigen::Ref< const Eigen::VectorX< FP >> pop, Eigen::Ref< const Eigen::VectorX< FP >> y, FP t, Eigen::Ref< Eigen::VectorX< FP >> flows) const override |
| Model (const Populations &pop, const ParameterSet ¶ms) | |
| Model (int num_agegroups) | |
| template<class IOContext > | |
| void | serialize (IOContext &io) const |
| serialize this. More... | |
| Eigen::VectorX< FP > | vaccinations_at (const FP t, const CustomIndexArray< FP, AgeGroup, SimulationDay > &daily_vaccinations, const FP eps=0.15) const |
| Calculates smoothed vaccinations for a given time point. More... | |
Public Member Functions inherited from mio::FlowModel< FP, InfectionState, mio::Populations< FP, AgeGroup, InfectionState >, Parameters< FP >, Flows > | |
| FlowModel (Args... args) | |
| Default constructor, forwarding args to Base constructor. More... | |
| void | get_derivatives (Eigen::Ref< const Eigen::VectorX< FP >> flows, Eigen::Ref< Eigen::VectorX< FP >> dydt) const |
| Compute the right-hand-side of the ODE dydt = f(y, t) from flow values. More... | |
| void | get_derivatives (Eigen::Ref< const Eigen::VectorX< FP >> pop, Eigen::Ref< const Eigen::VectorX< FP >> y, FP t, Eigen::Ref< Eigen::VectorX< FP >> dydt) const final |
| Compute the right-hand-side f(y, t) of the ODE and store it in dydt. More... | |
| constexpr size_t | get_flat_flow_index () const |
| A flat index into an array of flows (as computed by get_flows), if the only used category in Pop is Comp. More... | |
| size_t | get_flat_flow_index (const FlowIndex &indices) const |
| A flat index into an array of flows (as computed by get_flows), given the indices of each category. More... | |
| Eigen::VectorX< FP > | get_initial_flows () const |
| Initial values for flows. More... | |
Public Member Functions inherited from mio::CompartmentalModel< FP, InfectionState, mio::Populations< FP, AgeGroup, InfectionState >, Parameters< FP > > | |
| bool | apply_constraints () |
| Checks whether the model satisfies all constraints. More... | |
| bool | check_constraints () const |
| Checks that the model satisfies all constraints (e.g. More... | |
| CompartmentalModel (CompartmentalModel &&)=default | |
| CompartmentalModel (const CompartmentalModel &)=default | |
| CompartmentalModel (Populations const &po, ParameterSet const &pa) | |
| CompartmentalModel default constructor. More... | |
| void | eval_right_hand_side (Eigen::Ref< const Eigen::VectorX< FP >> pop, Eigen::Ref< const Eigen::VectorX< FP >> y, FP t, Eigen::Ref< Eigen::VectorX< FP >> dydt) const |
| This function evaluates the right-hand-side f of the ODE dydt = f(y, t). More... | |
| Eigen::VectorX< FP > | get_initial_values () const |
| Get the initial conditions for the ODE dydt = f(y, t). More... | |
| CompartmentalModel & | operator= (CompartmentalModel &&)=default |
| CompartmentalModel & | operator= (const CompartmentalModel &)=default |
| virtual | ~CompartmentalModel ()=default |
Static Public Member Functions | |
| template<class IOContext > | |
| static IOResult< Model > | deserialize (IOContext &io) |
| deserialize an object of this class. More... | |
Private Types | |
| using | Base = FlowModel< FP, InfectionState, mio::Populations< FP, AgeGroup, InfectionState >, Parameters< FP >, Flows > |
Additional Inherited Members | |
Public Types inherited from mio::FlowModel< FP, InfectionState, mio::Populations< FP, AgeGroup, InfectionState >, Parameters< FP >, Flows > | |
| using | Base = CompartmentalModel< FP, InfectionState, mio::Populations< FP, AgeGroup, InfectionState >, Parameters< FP > > |
Public Types inherited from mio::CompartmentalModel< FP, InfectionState, mio::Populations< FP, AgeGroup, InfectionState >, Parameters< FP > > | |
| using | Compartments = InfectionState |
| using | ParameterSet = Parameters< FP > |
| using | Populations = mio::Populations< FP, AgeGroup, InfectionState > |
Public Attributes inherited from mio::CompartmentalModel< FP, InfectionState, mio::Populations< FP, AgeGroup, InfectionState >, Parameters< FP > > | |
| ParameterSet | parameters |
| Populations | populations |
Member Typedef Documentation
◆ Base
template<typename FP >
|
private |
Constructor & Destructor Documentation
◆ Model() [1/2]
template<typename FP >
|
inline |
◆ Model() [2/2]
template<typename FP >
|
inline |
Member Function Documentation
◆ deserialize()
template<typename FP >
template<class IOContext >
|
inlinestatic |
deserialize an object of this class.
- See also
- mio::deserialize
◆ get_flows()
template<typename FP >
|
inlineoverridevirtual |
◆ serialize()
template<typename FP >
template<class IOContext >
|
inline |
serialize this.
- See also
- mio::serialize
◆ vaccinations_at()
template<typename FP >
|
inline |
Calculates smoothed vaccinations for a given time point.
This function calculates the number of vaccinations for each age group at a given time t, based on daily vaccinations data. The smoothing is done using a cosine function.
- Parameters
-
t The time in the simulation. daily_vaccinations The daily vaccinations data, indexed by age group and simulation day. eps [Default: 0.15] The smoothing factor used in the cosine smoothing function.
- Returns
- A vector containing the number of vaccinations for each age group at time t.
Generated by
Public Member Functions inherited from