Health-GPS  1.2.2.0
Global Health Policy Simulation model (Health-GPS)
hgps::RiskFactorModule Class Referencefinal

Defines the risk factors module container to hold hierarchical linear models. More...

#include <riskfactor.h>

Inheritance diagram for hgps::RiskFactorModule:
[legend]
Collaboration diagram for hgps::RiskFactorModule:
[legend]

Public Member Functions

 RiskFactorModule ()=delete
 
 RiskFactorModule (std::map< HierarchicalModelType, std::unique_ptr< HierarchicalLinearModel >> &&models, RiskfactorAdjustmentModel &&adjustments)
 Initialises a new instance of the RiskFactorModule class. More...
 
SimulationModuleType type () const noexcept override
 Gets the module type identifier. More...
 
const std::string & name () const noexcept override
 Gets the module name. More...
 
std::size_t size () const noexcept override
 Gets the number of diseases model hosted. More...
 
bool contains (const HierarchicalModelType &modelType) const noexcept override
 Indicates whether the host contains a model of type. More...
 
HierarchicalLinearModelat (const HierarchicalModelType &model_type) const
 
void initialise_population (RuntimeContext &context) override
 Initialises the virtual population. More...
 
void update_population (RuntimeContext &context) override
 Updates the virtual population status. More...
 
void apply_baseline_adjustments (RuntimeContext &context) override
 Apply baseline risk factor adjustments to population. More...
 
- Public Member Functions inherited from hgps::SimulationModule
virtual ~SimulationModule ()=default
 Destroys a SimulationModule instance. More...
 

Detailed Description

Defines the risk factors module container to hold hierarchical linear models.

Constructor & Destructor Documentation

◆ RiskFactorModule() [1/2]

hgps::RiskFactorModule::RiskFactorModule ( )
delete

◆ RiskFactorModule() [2/2]

hgps::RiskFactorModule::RiskFactorModule ( std::map< HierarchicalModelType, std::unique_ptr< HierarchicalLinearModel >> &&  models,
RiskfactorAdjustmentModel &&  adjustments 
)

Initialises a new instance of the RiskFactorModule class.

Parameters
modelsCollection of hierarchical linear model instances
adjustmentsThe baseline risk factor adjustments values
Exceptions
std::invalid_argumentfor empty hierarchical models collection or missing required module type.
std::out_of_rangefor model type and model instance type mismatch.

Member Function Documentation

◆ apply_baseline_adjustments()

void hgps::RiskFactorModule::apply_baseline_adjustments ( RuntimeContext context)
overridevirtual

Apply baseline risk factor adjustments to population.

Parameters
contextThe simulation run-time context

Implements hgps::RiskFactorHostModule.

Here is the call graph for this function:

◆ at()

HierarchicalLinearModel & hgps::RiskFactorModule::at ( const HierarchicalModelType model_type) const

◆ contains()

bool hgps::RiskFactorModule::contains ( const HierarchicalModelType modelType) const
overridevirtualnoexcept

Indicates whether the host contains a model of type.

Parameters
modelTypeThe hierarchical model type identifier
Returns
true if the hierarchical model is found, otherwise false.

Implements hgps::RiskFactorHostModule.

◆ initialise_population()

void hgps::RiskFactorModule::initialise_population ( RuntimeContext context)
overridevirtual

Initialises the virtual population.

Parameters
contextThe simulation shared runtime context instance

Implements hgps::SimulationModule.

◆ name()

const std::string & hgps::RiskFactorModule::name ( ) const
overridevirtualnoexcept

Gets the module name.

Returns
The human-readable module name

Implements hgps::SimulationModule.

◆ size()

std::size_t hgps::RiskFactorModule::size ( ) const
overridevirtualnoexcept

Gets the number of diseases model hosted.

Returns
Number of hosted diseases models

Implements hgps::RiskFactorHostModule.

◆ type()

SimulationModuleType hgps::RiskFactorModule::type ( ) const
overridevirtualnoexcept

Gets the module type identifier.

Returns
The module type identifier

Implements hgps::SimulationModule.

◆ update_population()

void hgps::RiskFactorModule::update_population ( RuntimeContext context)
overridevirtual

Updates the virtual population status.

Parameters
contextThe simulation run-time context

Implements hgps::UpdatableModule.


The documentation for this class was generated from the following files: