Health-GPS  1.2.2.0
Global Health Policy Simulation model (Health-GPS)
hgps::PolicyImpact Struct Reference

Defines the policy impact on risk factors data structure. More...

#include <intervention_scenario.h>

Collaboration diagram for hgps::PolicyImpact:
[legend]

Public Member Functions

 PolicyImpact ()=delete
 
 PolicyImpact (core::Identifier risk_factor_key, double policy_impact, unsigned int start_age, std::optional< unsigned int > end_age=std::nullopt)
 Initialise a new instance of the PolicyImpact structure. More...
 
bool contains (const unsigned int &age) const noexcept
 Determine whether this impact should be applied to a given age. More...
 

Public Attributes

core::Identifier risk_factor {}
 The risk factor identifier. More...
 
double value {}
 The effect value. More...
 
unsigned int from_age {}
 Impact applies from age. More...
 
std::optional< unsigned int > to_age {}
 Impact applies to age, if no value, no upper limit. More...
 

Detailed Description

Defines the policy impact on risk factors data structure.

Constructor & Destructor Documentation

◆ PolicyImpact() [1/2]

hgps::PolicyImpact::PolicyImpact ( )
delete

◆ PolicyImpact() [2/2]

hgps::PolicyImpact::PolicyImpact ( core::Identifier  risk_factor_key,
double  policy_impact,
unsigned int  start_age,
std::optional< unsigned int >  end_age = std::nullopt 
)
inline

Initialise a new instance of the PolicyImpact structure.

Parameters
risk_factor_keyRisk factor identifier
policy_impactThe impact on risk factor value
start_ageImpact start age, inclusive
end_ageImpact end age, inclusive
Exceptions
std::out_of_rangefor impact end age less than the start age.

Member Function Documentation

◆ contains()

bool hgps::PolicyImpact::contains ( const unsigned int &  age) const
inlinenoexcept

Determine whether this impact should be applied to a given age.

Parameters
ageThe age to check
Returns
true, if the age is in the impact valid range; otherwise, false.

Member Data Documentation

◆ from_age

unsigned int hgps::PolicyImpact::from_age {}

Impact applies from age.

◆ risk_factor

core::Identifier hgps::PolicyImpact::risk_factor {}

The risk factor identifier.

◆ to_age

std::optional<unsigned int> hgps::PolicyImpact::to_age {}

Impact applies to age, if no value, no upper limit.

◆ value

double hgps::PolicyImpact::value {}

The effect value.


The documentation for this struct was generated from the following file: