model.h Source File
|
CPP API
|
ode_seair/model.h
Go to the documentation of this file.
36 class Model : public mio::CompartmentalModel<FP, InfectionState, mio::Populations<FP, InfectionState>, Parameters<FP>>
38 using Base = mio::CompartmentalModel<FP, InfectionState, mio::Populations<FP, InfectionState>, Parameters<FP>>;
49 void get_derivatives(Eigen::Ref<const Eigen::VectorX<FP>> pop, Eigen::Ref<const Eigen::VectorX<FP>> y, FP /* t */,
56 -params.template get<SocialDistancing<FP>>() / pop_total * y[(size_t)InfectionState::Susceptible] *
62 params.template get<SocialDistancing<FP>>() / pop_total * y[(size_t)InfectionState::Susceptible] *
69 (params.template get<TestingRate<FP>>() + params.template get<RecoveryRateFromAsymptomatic<FP>>()) *
76 params.template get<RecoveryRateFromAsymptomatic<FP>>() * y[(size_t)InfectionState::Asymptomatic] +
79 dydt[(size_t)InfectionState::Dead] = params.template get<DeathRate<FP>>() * y[(size_t)InfectionState::Infected];
Definition: ode_seair/model.h:37
void get_derivatives(Eigen::Ref< const Eigen::VectorX< FP >> pop, Eigen::Ref< const Eigen::VectorX< FP >> y, FP, Eigen::Ref< Eigen::VectorX< FP >> dydt) const override
Definition: ode_seair/model.h:49
@ Susceptible
@ Asymptomatic
@ Recovered
@ Exposed
@ Infected
A collection of classes to simplify handling of matrix shapes in meta programming.
Definition: models/abm/analyze_result.h:30
constexpr std::tuple_element< I, std::tuple< Index< CategoryTags >... > >::type & get(Index< CategoryTags... > &i) noexcept
Retrieves the Index (by reference) at the Ith position of a MultiIndex.
Definition: index.h:294
CompartmentalModel is a template for a compartmental model for an array of initial populations and a ...
Definition: compartmental_model.h:59
mio::Populations< FP, InfectionState > Populations
Definition: compartmental_model.h:62
Parameters< FP > ParameterSet
Definition: compartmental_model.h:63
ParameterSet parameters
Definition: compartmental_model.h:157
Infectious period for unconfirmed infected people.
Definition: ode_seair/parameters.h:136
Rate recovered people become susceptible again.
Definition: ode_seair/parameters.h:152
Generated by