22 const std::unordered_map<core::Identifier, double> &energy_equation,
23 const std::unordered_map<
core::Identifier, std::pair<double, double>> &nutrient_ranges,
24 const std::unordered_map<
core::Identifier, std::map<core::Identifier, double>>
26 const std::unordered_map<
core::Identifier, std::optional<double>> &food_prices,
27 const std::unordered_map<
core::Gender, std::vector<double>> &age_mean_height);
31 std::string
name()
const noexcept
override;
40 const std::unordered_map<core::Identifier, double> &energy_equation_;
41 const std::unordered_map<core::Identifier, std::pair<double, double>> &nutrient_ranges_;
42 const std::unordered_map<core::Identifier, std::map<core::Identifier, double>>
44 const std::unordered_map<core::Identifier, std::optional<double>> &food_prices_;
45 const std::unordered_map<core::Gender, std::vector<double>> &age_mean_height_;
51 double bounded_nutrient_value(
const core::Identifier &nutrient,
double value)
const;
53 std::map<core::Identifier, double> get_current_risk_factors(
const HierarchicalMapping &mapping,
69 std::unordered_map<core::Identifier, double> energy_equation,
70 std::unordered_map<
core::Identifier, std::pair<double, double>> nutrient_ranges,
71 std::unordered_map<
core::Identifier, std::map<core::Identifier, double>> nutrient_equations,
73 std::unordered_map<
core::Gender, std::vector<double>> age_mean_height);
77 std::unique_ptr<HierarchicalLinearModel>
create_model()
const override;
80 std::unordered_map<core::Identifier, double> energy_equation_;
81 std::unordered_map<core::Identifier, std::pair<double, double>> nutrient_ranges_;
82 std::unordered_map<core::Identifier, std::map<core::Identifier, double>> nutrient_equations_;
83 std::unordered_map<core::Identifier, std::optional<double>> food_prices_;
84 std::unordered_map<core::Gender, std::vector<double>> age_mean_height_;
Defines the energy balance model data type.
Definition: energy_balance_model.h:59
std::unique_ptr< HierarchicalLinearModel > create_model() const override
Construct a new EnergyBalanceModel from this definition.
Definition: energy_balance_model.cpp:142
EnergyBalanceModelDefinition(std::unordered_map< core::Identifier, double > energy_equation, std::unordered_map< core::Identifier, std::pair< double, double >> nutrient_ranges, std::unordered_map< core::Identifier, std::map< core::Identifier, double >> nutrient_equations, std::unordered_map< core::Identifier, std::optional< double >> food_prices, std::unordered_map< core::Gender, std::vector< double >> age_mean_height)
Initialises a new instance of the EnergyBalanceModelDefinition class.
Definition: energy_balance_model.cpp:115
Implements the energy balance model type.
Definition: energy_balance_model.h:13
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.
Definition: energy_balance_model.cpp:8
void generate_risk_factors(RuntimeContext &context) override
Generates the initial risk factors for a population and newborns.
Definition: energy_balance_model.cpp:42
void update_risk_factors(RuntimeContext &context) override
Update risk factors for population.
Definition: energy_balance_model.cpp:46
std::string name() const noexcept override
Gets the model name.
Definition: energy_balance_model.cpp:40
HierarchicalModelType type() const noexcept override
Gets the model type identifier.
Definition: energy_balance_model.cpp:36
Hierarchical linear model interface.
Definition: interfaces.h:137
Defines the hierarchical model mapping data type.
Definition: mapping.h:128
Risk factor model definition interface.
Definition: interfaces.h:160
Defines the Simulation runtime context data type.
Definition: runtime_context.h:21
Gender
Enumerates gender types.
Definition: forward_type.h:18
Top-level namespace for Health-GPS C++ API.
Definition: analysis_definition.h:8
HierarchicalModelType
Health GPS risk factor module types enumeration.
Definition: interfaces.h:29
Defines a virtual population person data type.
Definition: person.h:40
Entity unique identifier data type.
Definition: identifier.h:17