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

Implements the energy balance model type. More...

#include <energy_balance_model.h>

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

Public Member Functions

 EnergyBalanceModel (const std::unordered_map< core::Identifier, double > &energy_equation, const std::unordered_map< core::Identifier, std::pair< double, double >> &nutrient_ranges, const std::unordered_map< core::Identifier, std::map< core::Identifier, double >> &nutrient_equations, const std::unordered_map< core::Identifier, std::optional< double >> &food_prices, const std::unordered_map< core::Gender, std::vector< double >> &age_mean_height)
 Initialises a new instance of the EnergyBalanceModel class. More...
 
HierarchicalModelType type () const noexcept override
 Gets the model type identifier. More...
 
std::string name () const noexcept override
 Gets the model name. More...
 
void generate_risk_factors (RuntimeContext &context) override
 Generates the initial risk factors for a population and newborns. More...
 
void update_risk_factors (RuntimeContext &context) override
 Update risk factors for population. More...
 
- Public Member Functions inherited from hgps::HierarchicalLinearModel
virtual ~HierarchicalLinearModel ()=default
 Destroys a HierarchicalLinearModel instance. More...
 

Detailed Description

Implements the energy balance model type.

The dynamic model is used to advance the virtual population over time.

Constructor & Destructor Documentation

◆ EnergyBalanceModel()

hgps::EnergyBalanceModel::EnergyBalanceModel ( const std::unordered_map< core::Identifier, double > &  energy_equation,
const std::unordered_map< core::Identifier, std::pair< double, double >> &  nutrient_ranges,
const std::unordered_map< core::Identifier, std::map< core::Identifier, double >> &  nutrient_equations,
const std::unordered_map< core::Identifier, std::optional< double >> &  food_prices,
const std::unordered_map< core::Gender, std::vector< double >> &  age_mean_height 
)

Initialises a new instance of the EnergyBalanceModel class.

Parameters
energy_equationThe energy coefficients for each nutrient
nutrient_rangesThe minimum and maximum nutrient values
nutrient_equationsThe nutrient coefficients for each food group
food_pricesThe unit price for each food group
age_mean_heightThe mean height at all ages (male and female)

Member Function Documentation

◆ generate_risk_factors()

void hgps::EnergyBalanceModel::generate_risk_factors ( RuntimeContext context)
overridevirtual

Generates the initial risk factors for a population and newborns.

Parameters
contextThe simulation run-time context
Exceptions
std::logic_errorthe dynamic model does not generate risk factors.

Implements hgps::HierarchicalLinearModel.

◆ name()

std::string hgps::EnergyBalanceModel::name ( ) const
overridevirtualnoexcept

Gets the model name.

Returns
The human-readable model name

Implements hgps::HierarchicalLinearModel.

◆ type()

HierarchicalModelType hgps::EnergyBalanceModel::type ( ) const
overridevirtualnoexcept

Gets the model type identifier.

Returns
The module type identifier

Implements hgps::HierarchicalLinearModel.

◆ update_risk_factors()

void hgps::EnergyBalanceModel::update_risk_factors ( RuntimeContext context)
overridevirtual

Update risk factors for population.

Parameters
contextThe simulation run-time context

Implements hgps::HierarchicalLinearModel.

Here is the call graph for this function:

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