37 std::vector<double> calculated_factors);
41 const
std::
string &
name() const noexcept override;
53 std::optional<
hgps::input::IndividualIdTrackingConfig> config) noexcept;
65 std::vector<
std::
string> channels_;
66 unsigned int comorbidities_;
67 std::
string name_{
"Analysis"};
68 std::vector<core::Identifier> factors_to_calculate_ = {
"Gender"_id,
"Age"_id};
69 std::vector<double> calculated_stats_;
70 std::vector<size_t> factor_bins_;
71 std::vector<double> factor_bin_widths_;
72 std::vector<double> factor_min_values_;
73 bool enable_income_analysis_{
75 std::optional<hgps::input::IndividualIdTrackingConfig> individual_id_tracking_config_{};
77 void initialise_vector(RuntimeContext &context);
79 double calculate_residual_disability_weight(
int age,
core::Gender gender,
83 void publish_result_message(RuntimeContext &context)
const;
84 void publish_individual_tracking_if_enabled(RuntimeContext &context)
const;
85 void calculate_historical_statistics(RuntimeContext &context, ModelResult &
result)
const;
86 void calculate_income_based_statistics(RuntimeContext &context, ModelResult &
result)
const;
87 double calculate_disability_weight(
const Person &entity)
const;
88 DALYsIndicator calculate_dalys(Population &population,
unsigned int max_age,
89 unsigned int death_year)
const;
91 void calculate_population_statistics(RuntimeContext &context);
92 void calculate_population_statistics(RuntimeContext &context, DataSeries &series)
const;
93 void calculate_income_based_population_statistics(RuntimeContext &context,
94 DataSeries &series)
const;
96 void calculate_income_based_standard_deviation(RuntimeContext &context,
97 DataSeries &series)
const;
100 void initialise_output_channels(RuntimeContext &context);
101 void initialise_income_output_channels(RuntimeContext &context)
const;
106 void calculate_standard_deviation(RuntimeContext &context, DataSeries &series)
const;
115 const ModelInput &config);
Burden of diseases (BoD) analysis module definition data type.
Definition analysis_definition.h:11
Implements the burden of diseases (BoD) analysis module.
Definition analysis_module.h:17
static std::vector< core::Income > get_available_income_categories(RuntimeContext &context)
Gets available income categories from the runtime context (for tests and callers).
Definition analysis_module.cpp:684
void update_population(RuntimeContext &context) override
Updates the virtual population status.
Definition analysis_module.cpp:167
void set_individual_id_tracking_config(std::optional< hgps::input::IndividualIdTrackingConfig > config) noexcept
MAHIMA: Sets optional individual ID tracking config for per-person CSV output.
Definition analysis_module.cpp:196
static std::string income_category_to_string(core::Income income)
Converts income category enum to string representation (for tests and callers).
Definition analysis_module.cpp:704
void set_income_analysis_enabled(bool enabled) noexcept
Sets whether income-based analysis is enabled.
Definition analysis_module.cpp:113
const std::string & name() const noexcept override
Gets the module name.
Definition analysis_module.cpp:111
void initialise_population(RuntimeContext &context) override
Initialises the virtual population.
Definition analysis_module.cpp:118
SimulationModuleType type() const noexcept override
Gets the module type identifier.
Definition analysis_module.cpp:64
Defines the Simulation results container for time series data.
Definition data_series.h:16
Defines the Simulation runtime context data type.
Definition runtime_context.h:22
Generic disease module interface to host multiple diseases model.
Definition interfaces.h:50
Weight classification model polymorphic wrapper class.
Definition weight_model.h:12
Gender
Enumerates gender types.
Definition forward_type.h:18
Top-level namespace for Health-GPS Console host application.
Definition command_options.cpp:8
std::unique_ptr< AnalysisModule > build_analysis_module(Repository &repository, const ModelInput &config)
Builds a new instance of the AnalysisModule using the given data infrastructure.
Definition analysis_module.cpp:2178
AgeGenderTable< int > IntegerAgeGenderTable
Age and Gender lookup table for integer values.
Definition gender_table.h:177
@ result
Simulation result message.
SimulationModuleType
Health GPS simulation modules types enumeration.
Definition interfaces.h:13
AgeGenderTable< double > DoubleAgeGenderTable
Age and Gender lookup table for double precision floating-point values.
Definition gender_table.h:183
Global namespace.
Definition column_iterator.h:123
Defines a virtual population person data type.
Definition person.h:39