parameters.h Source File
|
CPP API
|
ide_secir/parameters.h
Go to the documentation of this file.
63 std::vector<StateAgeFunctionWrapper<ScalarType>> state_age_function_vector((int)InfectionTransition::Count,
78 /*For consistency, also define TransitionProbabilities for each transition in #InfectionTransition.
79 Transition Probabilities should be set to 1 if there is no possible other flow from starting compartment.*/
205 ParameterSet<TransitionDistributions, TransitionProbabilities, ContactPatterns, TransmissionProbabilityOnContact,
265 log_error("Constraint check: One parameter in TransitionProbabilities smaller {} or larger {}", 0,
272 this->get<TransitionProbabilities>()[group][(int)InfectionTransition::SusceptibleToExposed], 1.0,
274 log_error("Constraint check: Parameter transition probability for SusceptibleToExposed unequal to {}",
280 this->get<TransitionProbabilities>()[group][(int)InfectionTransition::ExposedToInfectedNoSymptoms],
282 log_error("Constraint check: Parameter transition probability for ExposedToInfectedNoSymptoms unequal "
305 log_error("Constraint check: Sum of transition probability for InfectedSymptomsToInfectedSevere and "
316 log_error("Constraint check: Sum of transition probability for InfectedSevereToInfectedCritical and "
333 /* The first entry of TransitionDistributions is not checked because the distribution S->E is never used
336 if (floating_point_less(this->get<TransitionDistributions>()[group][i].get_support_max(10), 0.0,
represents a collection of contact frequency matrices that whose sum is the total number of contacts.
Definition: contact_matrix.h:536
represents time dependent contact frequencies between groups.
Definition: contact_matrix.h:505
A class template for an array with custom indices.
Definition: custom_index_array.h:136
static IOResult< ParameterSet > deserialize(IOContext &io)
deserialize an object of this class.
Definition: parameter_set.h:393
const ParameterTagTraits< Tag >::Type & get() const
get value of a parameter
Definition: parameter_set.h:262
The UncertainContactMatrix class consists of a ContactMatrix with fixed baseline and uncertain Dampin...
Definition: uncertain_matrix.h:43
Parameters of an age-resolved SECIR/SECIHURD model.
Definition: ide_secir/parameters.h:212
static IOResult< Parameters > deserialize(IOContext &io)
deserialize an object of this class.
Definition: ide_secir/parameters.h:357
bool check_constraints() const
Checks whether all Parameters satisfy their corresponding constraints and logs an error.
Definition: ide_secir/parameters.h:225
Parameters(ParametersBase &&base)
Definition: ide_secir/parameters.h:364
Parameters(AgeGroup num_agegroups)
Definition: ide_secir/parameters.h:214
ApplyResultT< F, T... > eval(F f, const IOResult< T > &... rs)
Evaluates a function f using values of the given IOResults as arguments, assumes all IOResults are su...
Definition: io.h:448
@ InfectedSevereToInfectedCritical
@ InfectedCriticalToRecovered
@ InfectedSymptomsToInfectedSevere
@ InfectedNoSymptomsToRecovered
@ InfectedNoSymptomsToInfectedSymptoms
@ InfectedSevereToRecovered
@ SusceptibleToExposed
@ InfectedCriticalToDead
@ InfectedSymptomsToRecovered
@ ExposedToInfectedNoSymptoms
int size(Comm comm)
Return the size of the given communicator.
Definition: miompi.cpp:75
A collection of classes to simplify handling of matrix shapes in meta programming.
Definition: models/abm/analyze_result.h:30
void log_warning(spdlog::string_view_t fmt, const Args &... args)
Definition: logging.h:112
bool floating_point_equal(FP v1, FP v2, FP abs_tol=0, FP rel_tol=std::numeric_limits< FP >::min())
compare two floating point values for equality with tolerances.
Definition: floating_point.h:57
auto success()
Create an object that is implicitly convertible to a succesful IOResult<void>.
Definition: io.h:359
bool floating_point_less(FP v1, FP v2, FP abs_tol=0, FP rel_tol=std::numeric_limits< FP >::min())
compare two floating point values with tolerances.
Definition: floating_point.h:78
void log_error(spdlog::string_view_t fmt, const Args &... args)
Definition: logging.h:100
boost::outcome_v2::unchecked< T, IOStatus > IOResult
Value-or-error type for operations that return a value but can fail.
Definition: io.h:353
Definition: io.h:94
The AgeGroup struct is used as a dynamically sized tag for all age dependent categories.
Definition: age_group.h:32
Class that defines an smoother_cosine function depending on the state age.
Definition: state_age_function.h:421
Wrapper around StateAgeFunction so that one can work with an arbitrary StateAgeFunction.
Definition: state_age_function.h:831
The contact patterns within the society are modelled using an UncertainContactMatrix.
Definition: ide_secir/parameters.h:99
static Type get_default(AgeGroup size)
Definition: ide_secir/parameters.h:102
UncertainContactMatrix< ScalarType > Type
Definition: ide_secir/parameters.h:100
The relative InfectedNoSymptoms infectability.
Definition: ide_secir/parameters.h:135
CustomIndexArray< StateAgeFunctionWrapper< ScalarType >, AgeGroup > Type
Definition: ide_secir/parameters.h:137
static std::string name()
Definition: ide_secir/parameters.h:143
static Type get_default(AgeGroup size)
Definition: ide_secir/parameters.h:138
The risk of infection from symptomatic cases in the SECIR model.
Definition: ide_secir/parameters.h:152
CustomIndexArray< StateAgeFunctionWrapper< ScalarType >, AgeGroup > Type
Definition: ide_secir/parameters.h:153
static std::string name()
Definition: ide_secir/parameters.h:159
static Type get_default(AgeGroup size)
Definition: ide_secir/parameters.h:154
The seasonality parameter k in the IDE-SECIR model.
Definition: ide_secir/parameters.h:191
static Type get_default(AgeGroup)
Definition: ide_secir/parameters.h:193
Sets the day in a year at which a simulation with an IDE-SECIR model is started.
Definition: ide_secir/parameters.h:174
static Type get_default(AgeGroup)
Definition: ide_secir/parameters.h:176
Transition distribution for each transition in InfectionTransition.
Definition: ide_secir/parameters.h:56
static Type get_default(AgeGroup size)
Definition: ide_secir/parameters.h:59
CustomIndexArray< std::vector< StateAgeFunctionWrapper< ScalarType > >, AgeGroup > Type
Definition: ide_secir/parameters.h:58
static std::string name()
Definition: ide_secir/parameters.h:68
Defines the probability for each possible transition to take this flow/transition.
Definition: ide_secir/parameters.h:77
CustomIndexArray< std::vector< ScalarType >, AgeGroup > Type
Definition: ide_secir/parameters.h:80
static Type get_default(AgeGroup size)
Definition: ide_secir/parameters.h:81
static std::string name()
Definition: ide_secir/parameters.h:90
Probability of getting infected from a contact.
Definition: ide_secir/parameters.h:119
static Type get_default(AgeGroup size)
Definition: ide_secir/parameters.h:121
static std::string name()
Definition: ide_secir/parameters.h:126
CustomIndexArray< StateAgeFunctionWrapper< ScalarType >, AgeGroup > Type
Definition: ide_secir/parameters.h:120
Generated by