Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
hgps Namespace Reference

Top-level namespace for Health-GPS Console host application. More...

Namespaces

namespace  core
 Top-level namespace for Health-GPS Core C++ API.
 
namespace  data
 Top-level namespace for Health-GPS Data C++ API.
 
namespace  detail
 Internal details namespace for private data types and functions.
 
namespace  input
 Data structures containing model parameters and configuration options.
 

Classes

struct  AdjustmentFactor
 Defined the risk factor adjustment data type. More...
 
class  AgeGenderTable
 Defines the age and gender lookup table data type. More...
 
struct  AgeGroupGenderEquation
 Define the age group dynamic equations data type. More...
 
class  AnalysisDefinition
 Burden of diseases (BoD) analysis module definition data type. More...
 
class  AnalysisModule
 Implements the burden of diseases (BoD) analysis module. More...
 
class  BaselineScenario
 Defines the baseline scenario data type. More...
 
struct  Birth
 Define the birth data type. More...
 
class  CachedRepository
 Implements the cached data repository for input datasets and back-end storage. More...
 
class  Channel
 Thread-safe communication channel data type. More...
 
struct  Coefficient
 Regression coefficients data type. More...
 
struct  CommandOptions
 Defines the Command Line Interface (CLI) arguments options. More...
 
struct  DALYsIndicator
 Defines the DALYs indicator result data type. More...
 
class  DataSeries
 Defines the Simulation results container for time series data. More...
 
class  DefaultCancerModel
 Defines the cancer disease model data type. More...
 
class  DefaultDiseaseModel
 Defines the standard diseases (non-cancer) model data type. More...
 
class  DefaultEventBus
 Implements the default memory-based simulation event bus type. More...
 
class  DemographicModule
 Implements the population demographic module data type. More...
 
struct  Disease
 Defines the disease history data type. More...
 
class  DiseaseDefinition
 Implements the disease full definition data type. More...
 
class  DiseaseMeasure
 Defines the disease measures collection data type. More...
 
class  DiseaseModel
 Diseases model interface. More...
 
class  DiseaseModule
 Defines the disease module container to hold disease models. More...
 
struct  DiseaseParameter
 Defines the cancer disease parameters data type. More...
 
class  DiseaseTable
 Defines the disease measure table data type. More...
 
class  DummyModel
 Implements the dummy risk factor model type. More...
 
class  DummyModelDefinition
 Defines the dummy risk factor model type. More...
 
class  DynamicHierarchicalLinearModel
 Implements the dynamic hierarchical linear model type. More...
 
class  DynamicHierarchicalLinearModelDefinition
 Defines the dynamic hierarchical linear model data type. More...
 
class  DynamicInterventionScenario
 Health-GPS dynamic intervention policy scenario interface. More...
 
struct  ErrorEventMessage
 Implements the simulation error event message data type. More...
 
class  EventAggregator
 Defines the event aggregator interface type. More...
 
struct  EventHandlerIdentifier
 Defines the event handler identifier type. More...
 
struct  EventMessage
 Simulation event messages interface. More...
 
class  EventMessageVisitor
 Event message types visitor interface (double dispatcher) More...
 
class  EventMonitor
 Defined the event monitor class used for processing Health-GPS event messages. More...
 
class  EventSubscriber
 Defines the event subscriber interface type. More...
 
class  EventSubscriberHandler
 Implements the event subscriber handler data type. More...
 
struct  ExperimentInfo
 Simulation experiment run-time information for reproducibility. More...
 
struct  FactorDynamicEquation
 Defines a factor linear regression equation. More...
 
class  Finally
 Define a scoped reset state data type. More...
 
struct  FiscalPolicyDefinition
 Fiscal policy intervention definition data type. More...
 
class  FiscalPolicyScenario
 Implements the fiscal policy intervention scenario. More...
 
struct  FoodLabellingDefinition
 Food labelling intervention definition data type. More...
 
class  FoodLabellingScenario
 Implements the food labelling intervention scenario. More...
 
class  GenderTable
 Defines the gender column lookup table data type. More...
 
struct  GenderValue
 Defines a gender associated value data type. More...
 
struct  HeightModelParams
 
struct  HierarchicalLevel
 Defines a hierarchical level data type. More...
 
class  HierarchicalMapping
 Defines the hierarchical model mapping data type. More...
 
struct  IncomeStratumAdjustmentExampleRow
 One debug row showing stratum expected/simulated delta and one sample applied update. More...
 
class  IndividualIDTrackingWriter
 
struct  IndividualTrackingEventMessage
 
struct  IndividualTrackingRow
 
struct  InfoEventMessage
 Implements the simulation information event message data type. More...
 
class  InterventionScenario
 Health-GPS scripted intervention policy scenario interface. More...
 
class  KevinHallModel
 Implements the energy balance model type. More...
 
class  KevinHallModelDefinition
 Defines the energy balance model data type. More...
 
class  LifeTable
 Defines the population life table data type. More...
 
struct  LinearModel
 Defines a linear regression model data type. More...
 
struct  LinearModelEvalOptions
 
struct  LinearModelParams
 Defines the linear model parameters used to initialise risk factors. More...
 
class  LmsDefinition
 LMS (lambda-mu-sigma) model definition data type. More...
 
class  LmsModel
 Implements the LMS (lambda-mu-sigma) model for children growth. More...
 
struct  LmsRecord
 Defines the LMS (lambda-mu-sigma) parameters record data type. More...
 
class  Map2d
 Defines the two-dimensional map (lookup table) data type. More...
 
class  MappingEntry
 Defines risk factor mapping entry data type. More...
 
struct  MarketingDynamicDefinition
 Dynamic marketing intervention definition data type. More...
 
class  MarketingDynamicScenario
 Implements the dynamic marketing regulation intervention scenario. More...
 
struct  MarketingPolicyDefinition
 Marketing intervention definition data type. More...
 
class  MarketingPolicyScenario
 Implements the marketing regulation intervention scenario. More...
 
struct  MeasureKey
 Disease measures key mapping. More...
 
class  ModelInput
 Defines the Simulation model inputs data type. More...
 
struct  ModelResult
 Defines the model results data type. More...
 
class  MonotonicVector
 Defines a monotonic vector container type. More...
 
class  MTRandom32
 Mersenne Twister random number generator algorithm. More...
 
struct  Person
 Defines a virtual population person data type. More...
 
struct  PhysicalActivityDefinition
 Physical activity intervention definition data type. More...
 
struct  PhysicalActivityModel
 Defines the physical activity model parameters. More...
 
class  PhysicalActivityScenario
 Implements the physical activity regulation intervention scenario. More...
 
struct  PolicyCoverage
 Define the policy population coverage data type. More...
 
struct  PolicyDynamic
 Defines the policy dynamic parameters. More...
 
struct  PolicyImpact
 Defines the policy impact on risk factors data structure. More...
 
struct  PolicyInterval
 Defines the policy active interval. More...
 
class  Population
 Defines the virtual population data type. More...
 
struct  PopulationRecord
 Define the population record data type for the demographic dataset. More...
 
class  Random
 General purpose Random number generator algorithms. More...
 
class  RandomBitGenerator
 Pseudo-random number generator algorithm interface. More...
 
struct  RelativeRisk
 Defines the relative risk factors data type. More...
 
class  RelativeRiskLookup
 Defines the relative risk factors lookup data type. More...
 
class  Repository
 Define the data repository interface for input datasets and back-end storage. More...
 
struct  ResultByGender
 Defines the measure by gender result data type. More...
 
struct  ResultByIncome
 Defines the measure by income result data type. More...
 
struct  ResultByIncomeGender
 Defines the measure by income and gender result data type. More...
 
struct  ResultEventMessage
 Implements the simulation results event message data type. More...
 
class  ResultFileWriter
 Defines the results message file stream writer class. More...
 
class  ResultWriter
 Defines the Health-GPS results message writer interface. More...
 
class  RiskFactorAdjustableModel
 Risk factor model interface with mean adjustment by sex and age. More...
 
class  RiskFactorAdjustableModelDefinition
 Risk factor adjustable model definition interface. More...
 
class  RiskFactorHostModule
 Generic risk factors module interface to host risk factor models. More...
 
class  RiskFactorModel
 Risk factor model interface. More...
 
class  RiskFactorModelDefinition
 Risk factor model definition interface. More...
 
class  RiskFactorModule
 Defines the risk factors module container to hold risk factor models. More...
 
struct  RunInfo
 Defines the Simulation run information data type. More...
 
class  Runner
 Defines the simulation executive data type class. More...
 
struct  RunnerEventMessage
 Implements the simulation executive event message data type. More...
 
class  RuntimeContext
 Defines the Simulation runtime context data type. More...
 
class  RuntimeMetric
 Defines the Simulation run-time metrics container data type. More...
 
class  Scenario
 Health-GPS simulation scenario interface. More...
 
struct  SESDefinition
 Defines the socio-economic status (SES) model data type. More...
 
class  SESNoiseModule
 Implements the socio-economic status (SES) module. More...
 
class  Settings
 Defines the simulation experiment settings data type. More...
 
class  SHA256Context
 An object for computing a SHA256 hash. More...
 
struct  SimplePolicyDefinition
 Simple intervention policy definition data type. More...
 
class  SimplePolicyScenario
 Defines the simple development intervention scenario. More...
 
class  Simulation
 Defines the simulation engine data type class. More...
 
class  SimulationModule
 Simulation modules interface. More...
 
class  SimulationModuleFactory
 Defines the SimulationModule factory data type. More...
 
class  StaticHierarchicalLinearModel
 Implements the static hierarchical linear model type. More...
 
class  StaticHierarchicalLinearModelDefinition
 Defines the full hierarchical linear model data type. More...
 
class  StaticLinearModel
 Implements the static linear model type. More...
 
class  StaticLinearModelDefinition
 Defines the static linear model data type. More...
 
class  SyncDataMessage
 Implements a synchronisation message with payload. More...
 
class  SyncMessage
 Scenario data synchronisation message data type. More...
 
struct  TransferCoefficient
 Define the transfer coefficient data type. More...
 
struct  TwoStepValue
 Defines a two step value data type. More...
 
class  UnivariateVisitor
 Implements an core::UnivariateSummary visitor for core::DataTable columns. More...
 
class  UpdatableModule
 Generic disease module interface to host multiple diseases model. More...
 
class  WeightModel
 Weight classification model polymorphic wrapper class. More...
 

Typedefs

using ParameterLookup = const std::map< int, DoubleGenderValue >
 Disease definition parameter value lookup by age and gender.
 
using IntegerAgeGenderTable = AgeGenderTable< int >
 Age and Gender lookup table for integer values.
 
using FloatAgeGenderTable = AgeGenderTable< float >
 Age and Gender lookup table for single precision floating-point values.
 
using DoubleAgeGenderTable = AgeGenderTable< double >
 Age and Gender lookup table for double precision floating-point values.
 
using IntegerGenderValue = GenderValue< int >
 Gender value for integer value.
 
using FloatGenderValue = GenderValue< float >
 Gender value for single precision floating-point value.
 
using DoubleGenderValue = GenderValue< double >
 Gender value for double precision floating-point value.
 
using KevinHallAdjustmentTable = UnorderedMap2d< core::Gender, int, double >
 Defines a table type for Kevin Hall adjustments by sex and age.
 
using Mortality = GenderValue< float >
 Mortality by gender.
 
using LmsDataset = std::map< unsigned int, std::map< core::Gender, LmsRecord > >
 Defines the LMS (lambda-mu-sigma) model dataset.
 
template<class TRow , class TCol , class TCell >
using UnorderedMap2d = Map2d< std::unordered_map, TRow, TCol, TCell >
 Defines the two-dimensional unordered map data type.
 
template<class TRow , class TCol , class TCell >
using OrderedMap2d = Map2d< std::map, TRow, TCol, TCell >
 Defines the two-dimensional ordered map data type.
 
using OptionalInterval = std::optional< core::DoubleInterval >
 Optional Range of doubles data type.
 
using PIFDataItem = input::PIFDataItem
 
using PIFTable = input::PIFTable
 
using PIFData = input::PIFData
 
using RelativeRiskTableMap = std::map< core::Identifier, FloatAgeGenderTable >
 Defines the relative risk factor table type.
 
using RelativeRiskLookupMap = std::map< core::Identifier, std::map< core::Gender, RelativeRiskLookup > >
 Defines the relative risk factor lookup type.
 
using RiskFactorSexAgeTable = UnorderedMap2d< core::Gender, core::Identifier, std::vector< double > >
 Defines a table type for double values by sex and age.
 
using ElapsedTime = std::chrono::duration< double, std::milli >
 
using SyncChannel = Channel< std::unique_ptr< SyncMessage > >
 Scenario data synchronisation channel type.
 
using IncomeStratumExpectedTableEntry = std::pair< std::string, std::shared_ptr< RiskFactorSexAgeTable > >
 One expected factors-mean table mapped to a configured income stratum id.
 

Enumerations

enum struct  EventType : uint8_t {
  runner , info , result , individual_tracking ,
  error
}
 Event Message type enumeration. More...
 
enum class  FiscalImpactType : uint8_t { pessimist , optimist }
 Health GPS policy impact types enumeration. More...
 
enum class  ModelAction { start , update , stop }
 Enumerates simulation model actions. More...
 
enum class  SimulationModuleType : uint8_t {
  RiskFactor , SES , Demographic , Disease ,
  Analysis
}
 Health GPS simulation modules types enumeration. More...
 
enum struct  DiseaseStatus : uint8_t { free , active }
 Disease status enumeration. More...
 
enum class  TrendType { Null , UPFTrend , IncomeTrend }
 Defines the trend type enumeration for factors mean adjustment. More...
 
enum class  RiskFactorModelType : uint8_t { Static , Dynamic }
 Health GPS risk factor module types enumeration. More...
 
enum class  RunnerAction {
  start , run_begin , cancelled , run_end ,
  finish
}
 Enumerates the simulation executive actions. More...
 
enum class  ScenarioType : uint8_t { baseline , intervention }
 Health GPS policy scenario types enumeration. More...
 
enum class  PolicyImpactType : uint8_t { absolute , relative }
 Health GPS policy impact types enumeration. More...
 
enum class  WeightCategory : uint8_t { normal , overweight , obese }
 Enumerates the Person weight categories. More...
 

Functions

cxxopts::Options create_options ()
 Creates the command-line interface (CLI) options.
 
std::optional< CommandOptionsparse_arguments (cxxopts::Options &options, int argc, char **argv)
 Parses the command-line interface (CLI) arguments.
 
core::Identifier operator""_id (const char *id, size_t)
 Allow users to use _id suffix to create Identifier (e.g. "Disease"_id)
 
std::unique_ptr< AnalysisModulebuild_analysis_module (Repository &repository, const ModelInput &config)
 Builds a new instance of the AnalysisModule using the given data infrastructure.
 
std::unique_ptr< DemographicModulebuild_population_module (Repository &repository, const ModelInput &config)
 Builds a new instance of the DemographicModule using the given data infrastructure.
 
std::unique_ptr< DiseaseModulebuild_disease_module (Repository &repository, const ModelInput &config)
 Builds a new instance of the DiseaseModule using the given data infrastructure.
 
std::map< core::DiseaseGroup, detail::DiseaseModelBuilderget_default_disease_model_registry ()
 Create the default disease model builder registry for disease group.
 
template<typename F >
Finally< F > make_finally (F &&f)
 Makes a finally instance.
 
FiscalImpactType parse_fiscal_impact_type (const std::string &impact_type)
 
template<core::Numerical TYPE>
GenderTable< int, TYPE > create_integer_gender_table (const core::IntegerInterval &rows_range)
 Creates an instance of the gender lookup table for integer rows breakpoints value.
 
template<core::Numerical TYPE>
AgeGenderTable< TYPE > create_age_gender_table (const core::IntegerInterval &age_range)
 Creates an instance of the age and gender lookup table.
 
double get_linear_predictor_value (const Person &person, const core::Identifier &name, const LinearModelEvalOptions &options={})
 Resolve one predictor for linear models (respects capped_age in options).
 
double evaluate_linear_model (const Person &person, const LinearModelParams &model, const LinearModelEvalOptions &options)
 
bool operator> (const MappingEntry &lhs, const MappingEntry &rhs)
 
bool operator< (const MappingEntry &lhs, const MappingEntry &rhs)
 
template<core::Numerical TYPE>
bool is_strict_monotonic (const std::vector< TYPE > &values) noexcept
 Determine whether a vector data is strict monotonic.
 
std::unordered_map< core::Identifier, std::vector< double > > load_nutrient_table (const std::string &csv_path, const std::vector< core::Identifier > &nutrients)
 Load nutrient information from a CSV file.
 
bool is_gender2_predictor (const std::string &key)
 True when the predictor name is the gender2 regression dummy row.
 
double gender2_regression_value (const Person &person, core::Gender indicator_sex)
 gender2 regression value: 1 if person matches indicator_sex, else 0.
 
core::Gender parse_gender2_indicator (const std::string &indicator_label)
 Parse project_requirements.demographics.gender2 ("male" or "female").
 
bool is_metadata_predictor (const std::string &name)
 
bool is_metadata_predictor (const core::Identifier &name)
 True for CSV/JSON rows that are model metadata, not regression predictors.
 
std::optional< double > resolve_derived_predictor (const Person &person, const std::string &key)
 Resolve a predictor name from person attributes (age polynomials, dummies, log_*, income_*).
 
std::filesystem::path get_program_directory ()
 Get the path to the directory of the currently executing program.
 
std::filesystem::path get_program_path ()
 Get the path to the currently executing program.
 
std::filesystem::path get_cache_directory ()
 The cache folder for Health-GPS.
 
std::filesystem::path get_temporary_directory ()
 A temporary directory for Health-GPS.
 
bool operator== (TrendType lhs, TrendType rhs) noexcept
 Equality comparison operator for TrendType.
 
bool operator!= (TrendType lhs, TrendType rhs) noexcept
 Inequality comparison operator for TrendType.
 
std::unique_ptr< RiskFactorModulebuild_risk_factor_module (Repository &repository, const ModelInput &config)
 
std::unique_ptr< SESNoiseModulebuild_ses_noise_module (Repository &repository, const ModelInput &config)
 Builds a new instance of the SESNoiseModule using the given data infrastructure.
 
std::string compute_sha256_for_file (const std::filesystem::path &file_path, size_t buffer_size=static_cast< size_t >(1024 *1024))
 Compute the SHA256 hash for a file.
 
SimulationModuleFactory get_default_simulation_module_factory (Repository &manager)
 Create the default simulation modules factory for production usage.
 
std::string weight_category_to_string (WeightCategory value)
 Converts a WeightCategory to a string representation.
 

Variables

constexpr double DALY_UNITS = 100'000.0
 DALYs result unit conversion constant.
 
constexpr int FOP_NO_EFFECT = -2
 Food labelling: the entity qualify but is not affected by the policy identifier.
 
const core::Identifier InterceptKey = core::Identifier{"intercept"}
 The constant in the regression model presentation identifier.
 
constexpr int MARKETING_NEVER = -1
 Dynamic marketing: Never applied the intervention status identifier.
 
constexpr int MARKETING_FORMER = -2
 Dynamic marketing: Previous applied the intervention status identifier.
 
constexpr int PA_CHILD_EFFECT = -1
 Physical activity: children effect identifier.
 
constexpr int PA_NO_EFFECT = -2
 Physical activity: no-effect identifier.
 

Detailed Description

Top-level namespace for Health-GPS Console host application.

Top-level namespace for Health-GPS C++ API.

Typedef Documentation

◆ DoubleAgeGenderTable

using hgps::DoubleAgeGenderTable = typedef AgeGenderTable<double>

Age and Gender lookup table for double precision floating-point values.

◆ DoubleGenderValue

using hgps::DoubleGenderValue = typedef GenderValue<double>

Gender value for double precision floating-point value.

◆ ElapsedTime

using hgps::ElapsedTime = typedef std::chrono::duration<double, std::milli>

◆ FloatAgeGenderTable

using hgps::FloatAgeGenderTable = typedef AgeGenderTable<float>

Age and Gender lookup table for single precision floating-point values.

◆ FloatGenderValue

using hgps::FloatGenderValue = typedef GenderValue<float>

Gender value for single precision floating-point value.

◆ IncomeStratumExpectedTableEntry

using hgps::IncomeStratumExpectedTableEntry = typedef std::pair<std::string, std::shared_ptr<RiskFactorSexAgeTable> >

One expected factors-mean table mapped to a configured income stratum id.

◆ IntegerAgeGenderTable

Age and Gender lookup table for integer values.

◆ IntegerGenderValue

using hgps::IntegerGenderValue = typedef GenderValue<int>

Gender value for integer value.

◆ KevinHallAdjustmentTable

Defines a table type for Kevin Hall adjustments by sex and age.

◆ LmsDataset

using hgps::LmsDataset = typedef std::map<unsigned int, std::map<core::Gender, LmsRecord> >

Defines the LMS (lambda-mu-sigma) model dataset.

◆ Mortality

using hgps::Mortality = typedef GenderValue<float>

Mortality by gender.

◆ OptionalInterval

using hgps::OptionalInterval = typedef std::optional<core::DoubleInterval>

Optional Range of doubles data type.

◆ OrderedMap2d

template<class TRow , class TCol , class TCell >
using hgps::OrderedMap2d = typedef Map2d<std::map, TRow, TCol, TCell>

Defines the two-dimensional ordered map data type.

◆ ParameterLookup

using hgps::ParameterLookup = typedef const std::map<int, DoubleGenderValue>

Disease definition parameter value lookup by age and gender.

◆ PIFData

using hgps::PIFData = typedef input::PIFData

◆ PIFDataItem

◆ PIFTable

◆ RelativeRiskLookupMap

Defines the relative risk factor lookup type.

◆ RelativeRiskTableMap

Defines the relative risk factor table type.

◆ RiskFactorSexAgeTable

Defines a table type for double values by sex and age.

◆ SyncChannel

using hgps::SyncChannel = typedef Channel<std::unique_ptr<SyncMessage> >

Scenario data synchronisation channel type.

◆ UnorderedMap2d

template<class TRow , class TCol , class TCell >
using hgps::UnorderedMap2d = typedef Map2d<std::unordered_map, TRow, TCol, TCell>

Defines the two-dimensional unordered map data type.

Enumeration Type Documentation

◆ DiseaseStatus

enum struct hgps::DiseaseStatus : uint8_t
strong

Disease status enumeration.

Enumerator
free 

Declared free from condition.

active 

Current with the condition.

◆ EventType

enum struct hgps::EventType : uint8_t
strong

Event Message type enumeration.

Enumerator
runner 

Simulation executive message.

info 

General notification and progress message.

result 

Simulation result message.

individual_tracking 

MAHIMA: Per-person tracking rows for IndividualIDTracking CSV (same-person ID across scenarios)

error 

General error reporting message.

◆ FiscalImpactType

enum class hgps::FiscalImpactType : uint8_t
strong

Health GPS policy impact types enumeration.

Enumerator
pessimist 

Variable impact overtime - option 1.

optimist 

Incremental impact overtime - option 2.

◆ ModelAction

enum class hgps::ModelAction
strong

Enumerates simulation model actions.

Enumerator
start 

Simulation has started, time = start.

update 

Simulation time has updated, time = time + 1.

stop 

Simulation has stopped, time = end.

◆ PolicyImpactType

enum class hgps::PolicyImpactType : uint8_t
strong

Health GPS policy impact types enumeration.

Enumerator
absolute 

Absolute impact.

relative 

Relative impact.

◆ RiskFactorModelType

enum class hgps::RiskFactorModelType : uint8_t
strong

Health GPS risk factor module types enumeration.

Enumerator
Static 

Static model.

Dynamic 

Dynamic model.

◆ RunnerAction

enum class hgps::RunnerAction
strong

Enumerates the simulation executive actions.

Enumerator
start 

Start simulation experiment.

run_begin 

Begin a new simulation run.

cancelled 

Simulation experiment has been cancelled.

run_end 

End a simulation run.

finish 

Finish simulation experiment.

◆ ScenarioType

enum class hgps::ScenarioType : uint8_t
strong

Health GPS policy scenario types enumeration.

Enumerator
baseline 

Baseline scenario.

intervention 

Intervention scenario.

◆ SimulationModuleType

enum class hgps::SimulationModuleType : uint8_t
strong

Health GPS simulation modules types enumeration.

Enumerator
RiskFactor 

Risk factor module.

SES 

Socio-economic status module.

Demographic 

Demographic module.

Disease 

Disease module coordinator.

Analysis 

Statistical analysis module, e.g. BoD module.

◆ TrendType

enum class hgps::TrendType
strong

Defines the trend type enumeration for factors mean adjustment.

Enumerator
Null 

No trends applied to factors mean adjustment.

UPFTrend 

UPF (ultra-processed food) trends; config: "upf_trend", "trend" or "UPFTrend".

IncomeTrend 

Income-based trends applied to factors mean adjustment.

◆ WeightCategory

enum class hgps::WeightCategory : uint8_t
strong

Enumerates the Person weight categories.

Enumerator
normal 

Normal body fat weight.

overweight 

Above a weight considered normal or desirable.

obese 

A person who has excess body fat.

Function Documentation

◆ build_analysis_module()

std::unique_ptr< AnalysisModule > hgps::build_analysis_module ( Repository repository,
const ModelInput config 
)

Builds a new instance of the AnalysisModule using the given data infrastructure.

Parameters
repositoryThe data repository instance
configThe model inputs instance
Returns
A new AnalysisModule instance
Exceptions
std::logic_errorfor invalid disease analysis definition
Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_disease_module()

std::unique_ptr< DiseaseModule > hgps::build_disease_module ( Repository repository,
const ModelInput config 
)

Builds a new instance of the DiseaseModule using the given data infrastructure.

Parameters
repositoryThe data repository instance
configThe model inputs instance
Returns
A new DiseaseModule instance
Exceptions
std::out_of_rangefor unknown disease definition identifier
Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_population_module()

std::unique_ptr< DemographicModule > hgps::build_population_module ( Repository repository,
const ModelInput config 
)

Builds a new instance of the DemographicModule using the given data infrastructure.

Parameters
repositoryThe data repository instance
configThe model inputs instance
Returns
A new DemographicModule instance
Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_risk_factor_module()

std::unique_ptr< RiskFactorModule > hgps::build_risk_factor_module ( Repository repository,
const ModelInput config 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_ses_noise_module()

std::unique_ptr< SESNoiseModule > hgps::build_ses_noise_module ( Repository repository,
const ModelInput config 
)

Builds a new instance of the SESNoiseModule using the given data infrastructure.

Parameters
repositoryThe data repository instance
configThe model inputs instance
Returns
A new SESNoiseModule instance
Exceptions
std::out_of_rangefor unknown disease definition identifier
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_sha256_for_file()

std::string hgps::compute_sha256_for_file ( const std::filesystem::path &  file_path,
size_t  buffer_size = static_cast< size_t >(1024 *1024) 
)

Compute the SHA256 hash for a file.

Parameters
file_pathPath to the file
buffer_sizeSize of the buffer for reading the file in chunks
Returns
The SHA256 hash
Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_age_gender_table()

template<core::Numerical TYPE>
AgeGenderTable< TYPE > hgps::create_age_gender_table ( const core::IntegerInterval age_range)

Creates an instance of the age and gender lookup table.

Template Parameters
TYPEThe values data type
Parameters
age_rangeThe age breakpoints range
Returns
A new instance of the AgeGenderTable class
Exceptions
std::out_of_rangefor age range 'lower' of negative value or equal to the 'upper' value
Here is the call graph for this function:

◆ create_integer_gender_table()

template<core::Numerical TYPE>
GenderTable< int, TYPE > hgps::create_integer_gender_table ( const core::IntegerInterval rows_range)

Creates an instance of the gender lookup table for integer rows breakpoints value.

Template Parameters
TYPEThe cell value type
Parameters
rows_rangeThe rows breakpoints range
Returns
A new instance of the GenderTable class
Exceptions
std::out_of_rangefor rows range 'lower' of negative value or less than the 'upper' value
Here is the call graph for this function:

◆ create_options()

cxxopts::Options hgps::create_options ( )

Creates the command-line interface (CLI) options.

Returns
Health-GPS CLI options

◆ evaluate_linear_model()

double hgps::evaluate_linear_model ( const Person person,
const LinearModelParams model,
const LinearModelEvalOptions options 
)
Here is the call graph for this function:

◆ gender2_regression_value()

double hgps::gender2_regression_value ( const Person person,
core::Gender  indicator_sex 
)

gender2 regression value: 1 if person matches indicator_sex, else 0.

Here is the caller graph for this function:

◆ get_cache_directory()

std::filesystem::path hgps::get_cache_directory ( )

The cache folder for Health-GPS.

Here is the caller graph for this function:

◆ get_default_disease_model_registry()

std::map< core::DiseaseGroup, detail::DiseaseModelBuilder > hgps::get_default_disease_model_registry ( )

Create the default disease model builder registry for disease group.

Returns
the default production instance of the disease model builder registry.
Here is the caller graph for this function:

◆ get_default_simulation_module_factory()

SimulationModuleFactory hgps::get_default_simulation_module_factory ( Repository manager)

Create the default simulation modules factory for production usage.

Parameters
managerthe data repository manger to be used to create the modules.
Returns
the default production instance of simulation modules factory.
Here is the call graph for this function:

◆ get_linear_predictor_value()

double hgps::get_linear_predictor_value ( const Person person,
const core::Identifier name,
const LinearModelEvalOptions options 
)

Resolve one predictor for linear models (respects capped_age in options).

Here is the call graph for this function:

◆ get_program_directory()

std::filesystem::path hgps::get_program_directory ( )

Get the path to the directory of the currently executing program.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_program_path()

std::filesystem::path hgps::get_program_path ( )

Get the path to the currently executing program.

Here is the caller graph for this function:

◆ get_temporary_directory()

std::filesystem::path hgps::get_temporary_directory ( )

A temporary directory for Health-GPS.

◆ is_gender2_predictor()

bool hgps::is_gender2_predictor ( const std::string &  key)

True when the predictor name is the gender2 regression dummy row.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_metadata_predictor() [1/2]

bool hgps::is_metadata_predictor ( const core::Identifier name)

True for CSV/JSON rows that are model metadata, not regression predictors.

Here is the call graph for this function:

◆ is_metadata_predictor() [2/2]

bool hgps::is_metadata_predictor ( const std::string &  name)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_strict_monotonic()

template<core::Numerical TYPE>
bool hgps::is_strict_monotonic ( const std::vector< TYPE > &  values)
noexcept

Determine whether a vector data is strict monotonic.

Template Parameters
TYPEThe vector data type
Parameters
valuesThe vector value
Returns
true, if the vector data is strict monotonic; otherwise, false
Here is the caller graph for this function:

◆ load_nutrient_table()

std::unordered_map< core::Identifier, std::vector< double > > hgps::load_nutrient_table ( const std::string &  csv_path,
const std::vector< core::Identifier > &  nutrients 
)

Load nutrient information from a CSV file.

Parameters
csv_pathPath to CSV file
nutrientsNames of macronutrients
Returns
Mapping from food name to constituent macronutrients
Here is the call graph for this function:

◆ make_finally()

template<typename F >
Finally< F > hgps::make_finally ( F &&  f)

Makes a finally instance.

Template Parameters
FFunctor type
Parameters
fThe functor instance
Returns
The new Finally instance
Here is the caller graph for this function:

◆ operator!=()

bool hgps::operator!= ( TrendType  lhs,
TrendType  rhs 
)
inlinenoexcept

Inequality comparison operator for TrendType.

◆ operator""_id()

core::Identifier hgps::operator""_id ( const char *  id,
size_t   
)

Allow users to use _id suffix to create Identifier (e.g. "Disease"_id)

◆ operator<()

bool hgps::operator< ( const MappingEntry lhs,
const MappingEntry rhs 
)
inline
Here is the call graph for this function:

◆ operator==()

bool hgps::operator== ( TrendType  lhs,
TrendType  rhs 
)
inlinenoexcept

Equality comparison operator for TrendType.

◆ operator>()

bool hgps::operator> ( const MappingEntry lhs,
const MappingEntry rhs 
)
inline
Here is the call graph for this function:

◆ parse_arguments()

std::optional< CommandOptions > hgps::parse_arguments ( cxxopts::Options &  options,
int  argc,
char **  argv 
)

Parses the command-line interface (CLI) arguments.

Parameters
optionsThe valid CLI options
argcNumber of input arguments
argvList of input arguments
Returns
User command-line options or std::nullopt if program should exit

◆ parse_fiscal_impact_type()

FiscalImpactType hgps::parse_fiscal_impact_type ( const std::string &  impact_type)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_gender2_indicator()

core::Gender hgps::parse_gender2_indicator ( const std::string &  indicator_label)

Parse project_requirements.demographics.gender2 ("male" or "female").

Here is the call graph for this function:

◆ resolve_derived_predictor()

std::optional< double > hgps::resolve_derived_predictor ( const Person person,
const std::string &  key 
)

Resolve a predictor name from person attributes (age polynomials, dummies, log_*, income_*).

Returns
Value if the name is a known derived predictor; nullopt if not handled here.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ weight_category_to_string()

std::string hgps::weight_category_to_string ( WeightCategory  value)

Converts a WeightCategory to a string representation.

Parameters
valueEnumeration value to convert
Returns
The equivalent string
Exceptions
std::invalid_argumentfor unknown weight category value.

Variable Documentation

◆ DALY_UNITS

constexpr double hgps::DALY_UNITS = 100'000.0
inlineconstexpr

DALYs result unit conversion constant.

◆ FOP_NO_EFFECT

constexpr int hgps::FOP_NO_EFFECT = -2
inlineconstexpr

Food labelling: the entity qualify but is not affected by the policy identifier.

◆ InterceptKey

const core::Identifier hgps::InterceptKey = core::Identifier{"intercept"}
inline

The constant in the regression model presentation identifier.

◆ MARKETING_FORMER

constexpr int hgps::MARKETING_FORMER = -2
inlineconstexpr

Dynamic marketing: Previous applied the intervention status identifier.

◆ MARKETING_NEVER

constexpr int hgps::MARKETING_NEVER = -1
inlineconstexpr

Dynamic marketing: Never applied the intervention status identifier.

◆ PA_CHILD_EFFECT

constexpr int hgps::PA_CHILD_EFFECT = -1
inlineconstexpr

Physical activity: children effect identifier.

◆ PA_NO_EFFECT

constexpr int hgps::PA_NO_EFFECT = -2
inlineconstexpr

Physical activity: no-effect identifier.