model.h Source File
|
CPP API
|
sde_seirvv/model.h
Go to the documentation of this file.
51 : public mio::StochasticModel<FP, InfectionState, mio::Populations<FP, InfectionState>, Parameters<FP>, Flows>
53 using Base = mio::StochasticModel<FP, InfectionState, mio::Populations<FP, InfectionState>, Parameters<FP>, Flows>;
61 void get_flows(Eigen::Ref<const Eigen::VectorX<FP>> pop, Eigen::Ref<const Eigen::VectorX<FP>> y, FP t,
66 FP coeffStoIV1 = params.template get<ContactPatterns<FP>>().get_matrix_at(SimulationTime<FP>(t))(0, 0) *
68 FP coeffStoIV2 = params.template get<ContactPatterns<FP>>().get_matrix_at(SimulationTime<FP>(t))(0, 0) *
71 flows[this->template get_flat_flow_index<InfectionState::Susceptible, InfectionState::ExposedV1>()] =
74 flows[this->template get_flat_flow_index<InfectionState::Susceptible, InfectionState::ExposedV2>()] =
78 flows[this->template get_flat_flow_index<InfectionState::ExposedV1, InfectionState::InfectedV1>()] =
81 flows[this->template get_flat_flow_index<InfectionState::ExposedV2, InfectionState::InfectedV2>()] =
84 flows[this->template get_flat_flow_index<InfectionState::InfectedV1, InfectionState::RecoveredV1>()] =
87 flows[this->template get_flat_flow_index<InfectionState::InfectedV2, InfectionState::RecoveredV2>()] =
90 flows[this->template get_flat_flow_index<InfectionState::RecoveredV1, InfectionState::ExposedV1V2>()] =
94 flows[this->template get_flat_flow_index<InfectionState::ExposedV1V2, InfectionState::InfectedV1V2>()] =
97 flows[this->template get_flat_flow_index<InfectionState::InfectedV1V2, InfectionState::RecoveredV1V2>()] =
101 void get_noise(Eigen::Ref<const Eigen::VectorX<FP>> pop, Eigen::Ref<const Eigen::VectorX<FP>> y, FP t,
A CompartmentalModel with an additional get_noise member.
Definition: stochastic_model.h:35
auto white_noise(Eigen::Index size) const
Sample a vector of independent standard normal distributed values from the model's RNG.
Definition: stochastic_model.h:66
Definition: sde_seirvv/model.h:52
void get_noise(Eigen::Ref< const Eigen::VectorX< FP >> pop, Eigen::Ref< const Eigen::VectorX< FP >> y, FP t, Eigen::Ref< Eigen::VectorX< FP >> noise) const
Calculate random changes to the population at a certain time point.
Definition: sde_seirvv/model.h:101
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
Definition: sde_seirvv/model.h:61
Parameters of stochastic SEIRVV model.
Definition: sde_seirvv/parameters.h:161
@ InfectedV1V2
@ Susceptible
@ InfectedV2
@ ExposedV1V2
@ InfectedV1
@ ExposedV1
@ ExposedV2
@ RecoveredV1
A collection of classes to simplify handling of matrix shapes in meta programming.
Definition: models/abm/analyze_result.h:30
A Flow defines a possible transition between two Compartments in a FlowModel.
Definition: flow.h:33
Collection of types. Each type is mapped to an index of type size_t.
Definition: type_list.h:32
static constexpr size_t size()
returns the number of Types in TypeList
Definition: type_list.h:45
Generated by