|
| using | Base = CompartmentalModel< FP, LctState, mio::Populations< FP, LctState >, Parameters< FP > > |
| |
| using | LctState = LctInfectionState< FP, InfectionState, 1, NumExposed, NumInfectedNoSymptoms, NumInfectedSymptoms, NumInfectedSevere, NumInfectedCritical, 1, 1 > |
| | This class specifies the number of subcompartments. More...
|
| |
| using | ParameterSet = Params |
| |
| using | Populations = Pop |
| |
| using | Compartments = LctInfectionState< FP, InfectionState, 1, NumExposed, NumInfectedNoSymptoms, NumInfectedSymptoms, NumInfectedSevere, NumInfectedCritical, 1, 1 > |
| |
| using | ParameterSet = Parameters< FP > |
| |
| using | Populations = mio::Populations< FP, LctInfectionState< FP, InfectionState, 1, NumExposed, NumInfectedNoSymptoms, NumInfectedSymptoms, NumInfectedSevere, NumInfectedCritical, 1, 1 > > |
| |
|
| TimeSeries< FP > | calculate_compartments (const TimeSeries< FP > &subcompartments_ts) const |
| | Cumulates a simulation result with subcompartments to produce a result that divides the population only into the infection states defined in InfectionState. More...
|
| |
| bool | check_constraints () const |
| | Checks that the model satisfies all constraints (e.g. 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 override |
| | Evaluates the right-hand-side f of the GLCT dydt = f(y, t). More...
|
| |
| | Model () |
| | Default constructor. More...
|
| |
| 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 |
| |
template<typename FP, size_t NumExposed, size_t NumInfectedNoSymptoms, size_t NumInfectedSymptoms, size_t NumInfectedSevere, size_t NumInfectedCritical>
class mio::glsecir::Model< FP, NumExposed, NumInfectedNoSymptoms, NumInfectedSymptoms, NumInfectedSevere, NumInfectedCritical >
Class that defines an GLCT-SECIR model.
- Template Parameters
-
| NumExposed | The number of subcompartments used for the Exposed compartment. |
| NumInfectedNoSymptoms | The number of subcompartments used for the InfectedNoSymptoms compartment. |
| NumInfectedSymptoms | The number of subcompartments used for the InfectedSymptoms compartment. |
| NumInfectedSevere | The number of subcompartments used for the InfectedSevere compartment. |
| NumInfectedCritical | The number of subcompartments used for the InfectedCritical compartment. |
template<typename FP , size_t NumExposed, size_t NumInfectedNoSymptoms, size_t NumInfectedSymptoms, size_t NumInfectedSevere, size_t NumInfectedCritical>
| TimeSeries<FP> mio::glsecir::Model< FP, NumExposed, NumInfectedNoSymptoms, NumInfectedSymptoms, NumInfectedSevere, NumInfectedCritical >::calculate_compartments |
( |
const TimeSeries< FP > & |
subcompartments_ts | ) |
const |
|
inline |
Cumulates a simulation result with subcompartments to produce a result that divides the population only into the infection states defined in InfectionState.
If the model is used for simulation, we will get a result in form of a TimeSeries with infection states divided in subcompartments. The function calculates a TimeSeries without subcompartments from another TimeSeries with subcompartments. This is done by summing up the corresponding subcompartments.
- Parameters
-
| [in] | subcompartments_ts | Result of a simulation with the model. |
- Returns
- Result of the simulation divided in infection states without subcompartments. Returns TimeSeries with values -1 if calculation is not possible.
template<typename FP , size_t NumExposed, size_t NumInfectedNoSymptoms, size_t NumInfectedSymptoms, size_t NumInfectedSevere, size_t NumInfectedCritical>
| bool mio::glsecir::Model< FP, NumExposed, NumInfectedNoSymptoms, NumInfectedSymptoms, NumInfectedSevere, NumInfectedCritical >::check_constraints |
( |
| ) |
const |
|
inline |
Checks that the model satisfies all constraints (e.g.
parameter or population constraints), and logs an error if constraints are not satisfied.
- Returns
- Returns true if one or more constraints are not satisfied, false otherwise.
template<typename FP , size_t NumExposed, size_t NumInfectedNoSymptoms, size_t NumInfectedSymptoms, size_t NumInfectedSevere, size_t NumInfectedCritical>
| void mio::glsecir::Model< FP, NumExposed, NumInfectedNoSymptoms, NumInfectedSymptoms, NumInfectedSevere, NumInfectedCritical >::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 |
|
inlineoverridevirtual |
Evaluates the right-hand-side f of the GLCT dydt = f(y, t).
The GLCT-SECIR model is defined through ordinary differential equations of the form dydt = f(y, t). y is a vector containing number of individuals for each (sub-) compartment. This function evaluates the right-hand-side f of the ODE and can be used in an ODE solver.
- Parameters
-
| [in] | pop | The current state of the population in the geographic unit we are considering. |
| [in] | y | The current state of the model (or a subpopulation) as a flat array. |
| [in] | t | The current time. |
| [out] | dydt | A reference to the calculated output. |
Reimplemented from mio::CompartmentalModel< FP, LctInfectionState< FP, InfectionState, 1, NumExposed, NumInfectedNoSymptoms, NumInfectedSymptoms, NumInfectedSevere, NumInfectedCritical, 1, 1 >, mio::Populations< FP, LctInfectionState< FP, InfectionState, 1, NumExposed, NumInfectedNoSymptoms, NumInfectedSymptoms, NumInfectedSevere, NumInfectedCritical, 1, 1 > >, Parameters< FP > >.