infection.h Source File
|
CPP API
|
infection.h
Go to the documentation of this file.
43 TimeSpan duration; // Duration that the infection stays in from_state before transitioning to to_state.
75 using InitialInfectionStateDistribution = CustomIndexArray<AbstractParameterDistribution, VirusVariant, AgeGroup>;
92 Infection(PersonalRandomNumberGenerator& rng, VirusVariant virus, AgeGroup age, const Parameters& params,
94 ProtectionEvent latest_protection = {ProtectionType::NoProtection, TimePoint(0)}, bool detected = false);
108 Infection(PersonalRandomNumberGenerator& rng, VirusVariant virus, AgeGroup age, const Parameters& params,
109 TimePoint init_date, InfectionState init_state, const InitialInfectionStateDistribution& init_state_dist,
110 ProtectionEvent latest_protection = {ProtectionType::NoProtection, TimePoint(0)}, bool detected = false);
196 void draw_infection_course_forward(PersonalRandomNumberGenerator& rng, AgeGroup age, const Parameters& params,
211 TimePoint draw_infection_course_backward(PersonalRandomNumberGenerator& rng, AgeGroup age, const Parameters& params,
222 void initialize_viral_load(PersonalRandomNumberGenerator& rng, VirusVariant virus, AgeGroup age,
232 void initialize_viral_shed(PersonalRandomNumberGenerator& rng, VirusVariant virus, AgeGroup age,
245 StateTransition get_forward_transition(PersonalRandomNumberGenerator& rng, AgeGroup age, const Parameters& params,
257 StateTransition get_backward_transition(PersonalRandomNumberGenerator& rng, AgeGroup age, const Parameters& params,
267 StateTransition get_recovered_backward_transition(PersonalRandomNumberGenerator& rng, AgeGroup age,
296 ScalarType get_severity_protection_factor(const Parameters& params, ProtectionEvent latest_protection, AgeGroup age,
A class template for an array with custom indices.
Definition: custom_index_array.h:136
Definition: infection.h:78
auto default_serialize()
This method is used by the default serialization feature.
Definition: infection.h:163
void set_detected()
Set the Infection to detected.
Definition: infection.cpp:147
StateTransition get_forward_transition(PersonalRandomNumberGenerator &rng, AgeGroup age, const Parameters ¶ms, InfectionState current_state, TimePoint current_time, ProtectionEvent latest_protection) const
Get the forward transition from a given infection state.
Definition: infection.cpp:162
ViralLoad m_viral_load
ViralLoad of the Infection.
Definition: infection.h:301
StateTransition get_recovered_backward_transition(PersonalRandomNumberGenerator &rng, AgeGroup age, const Parameters ¶ms) const
Get the backward transition from recovered state.
Definition: infection.cpp:291
ScalarType get_severity_protection_factor(const Parameters ¶ms, ProtectionEvent latest_protection, AgeGroup age, TimePoint current_time) const
Get the severity protection factor based on latest protection.
Definition: infection.cpp:356
StateTransition get_dead_backward_transition(PersonalRandomNumberGenerator &rng, AgeGroup age, const Parameters ¶ms) const
Get the backward transition from dead state.
Definition: infection.cpp:328
ScalarType calculate_death_probability(AgeGroup age, const Parameters ¶ms) const
Calculate the overall death probability for the infection.
Definition: infection.cpp:348
void draw_infection_course_forward(PersonalRandomNumberGenerator &rng, AgeGroup age, const Parameters ¶ms, TimePoint init_date, InfectionState init_state, ProtectionEvent latest_protection)
Determine Infection course subsequent to the given InfectionState start_state.
Definition: infection.cpp:366
Infection()=default
VirusVariant m_virus_variant
Variant of the Infection.
Definition: infection.h:300
VirusVariant get_virus_variant() const
: Get VirusVariant.
Definition: infection.cpp:129
bool m_detected
Whether an Infection is detected or not.
Definition: infection.h:305
TimePoint draw_infection_course_backward(PersonalRandomNumberGenerator &rng, AgeGroup age, const Parameters ¶ms, TimePoint init_date, InfectionState init_state)
Determine Infection course prior to the given InfectionState start_state.
Definition: infection.cpp:384
std::vector< std::pair< TimePoint, InfectionState > > m_infection_course
Start date of each InfectionState.
Definition: infection.h:299
void initialize_viral_load(PersonalRandomNumberGenerator &rng, VirusVariant virus, AgeGroup age, const Parameters ¶ms, ProtectionEvent latest_protection)
Initialize the viral load parameters for the infection.
Definition: infection.cpp:31
StateTransition get_backward_transition(PersonalRandomNumberGenerator &rng, AgeGroup age, const Parameters ¶ms, InfectionState current_state) const
Get the backward transition from a given infection state.
Definition: infection.cpp:249
ScalarType m_individual_viral_shed_factor
Individual viral shed factor.
Definition: infection.h:304
ScalarType get_viral_load(TimePoint t) const
Gets the ViralLoad of the Infection at a given TimePoint.
Definition: infection.cpp:104
void initialize_viral_shed(PersonalRandomNumberGenerator &rng, VirusVariant virus, AgeGroup age, const Parameters ¶ms)
Initialize the viral shed parameters and individual factor for the infection.
Definition: infection.cpp:49
ScalarType get_viral_shed(TimePoint t) const
Get viral shed at a specific time.
Definition: infection.cpp:121
ScalarType m_log_norm_beta
Parameters for the viral shed mapping, which is modelled through an invlogit function.
Definition: infection.h:303
InfectionState get_infection_state(TimePoint t) const
Get the InfectionState of the Infection.
Definition: infection.cpp:134
Parameters of the simulation that are the same everywhere within the Model.
Definition: abm/parameters.h:764
Random number generator of individual persons.
Definition: personal_rng.h:50
@ NoProtection
@ Exposed
A collection of classes to simplify handling of matrix shapes in meta programming.
Definition: models/abm/analyze_result.h:30
The AgeGroup struct is used as a dynamically sized tag for all age dependent categories.
Definition: age_group.h:32
Creates an instance of T for later initialization.
Definition: default_serialize.h:173
Members< ValueTypes..., T > add(const char *member_name, T &member)
Add a class member.
Definition: default_serialize.h:139
Represents a transition period between two infection states.
Definition: infection.h:40
Models the ViralLoad for an Infection, modelled on a log_10 scale.
Definition: infection.h:51
ScalarType incline
Incline of the ViralLoad during incline phase in log_10 scale per day (always positive).
Definition: infection.h:55
TimePoint end_date
End date of the ViralLoad concentration in the Person.
Definition: infection.h:53
TimePoint start_date
Start date of the ViralLoad concentration in the Person.
Definition: infection.h:52
auto default_serialize()
This method is used by the default serialization feature.
Definition: infection.h:59
ScalarType decline
Decline of the ViralLoad during decline phase in log_10 scale per day (always negative).
Definition: infection.h:56
Generated by