Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
hgps::DemographicModule Class Referencefinal

Implements the population demographic module data type. More...

#include <demographic.h>

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

Public Member Functions

 DemographicModule ()=delete
 
 DemographicModule (std::map< int, std::map< int, PopulationRecord > > &&pop_data, LifeTable &&life_table)
 Initialise a new instance of the DemographicModule class.
 
SimulationModuleType type () const noexcept override
 Gets the module type identifier.
 
const std::string & name () const noexcept override
 Gets the module name.
 
std::size_t get_total_population_size (int time_year) const noexcept
 Gets the total population at a specific point in time.
 
const std::map< int, PopulationRecord > & get_population_distribution (int time_year) const
 Gets the population age distribution at a specific point in time.
 
void initialise_population (RuntimeContext &context) override
 Initialises the virtual population status.
 
void update_population (RuntimeContext &context, const DiseaseModule &disease_host)
 Updates the virtual population status.
 
void set_region_prevalence (const std::map< core::Identifier, std::map< core::Gender, std::map< std::string, double > > > &region_data)
 Sets the region prevalence data for assignment.
 
void set_ethnicity_prevalence (const std::map< core::Identifier, std::map< core::Gender, std::map< std::string, std::map< std::string, double > > > > &ethnicity_data)
 Sets the ethnicity prevalence data for assignment.
 
- Public Member Functions inherited from hgps::SimulationModule
virtual ~SimulationModule ()=default
 Destroys a SimulationModule instance.
 

Detailed Description

Implements the population demographic module data type.

Constructor & Destructor Documentation

◆ DemographicModule() [1/2]

hgps::DemographicModule::DemographicModule ( )
delete

◆ DemographicModule() [2/2]

hgps::DemographicModule::DemographicModule ( std::map< int, std::map< int, PopulationRecord > > &&  pop_data,
LifeTable &&  life_table 
)

Initialise a new instance of the DemographicModule class.

Parameters
pop_dataPopulation demographic trends table with year and age lookup
life_tablePopulation life trends table with births and deaths
Here is the call graph for this function:

Member Function Documentation

◆ get_population_distribution()

const std::map< int, PopulationRecord > & hgps::DemographicModule::get_population_distribution ( int  time_year) const

Gets the population age distribution at a specific point in time.

Parameters
time_yearThe reference point in time (in year)
Returns
The respective population age distribution

◆ get_total_population_size()

std::size_t hgps::DemographicModule::get_total_population_size ( int  time_year) const
noexcept

Gets the total population at a specific point in time.

Parameters
time_yearThe reference point in time (in year)
Returns
The respective total population size
Here is the caller graph for this function:

◆ initialise_population()

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

Initialises the virtual population status.

Parameters
contextThe simulation run-time context

Implements hgps::SimulationModule.

Here is the call graph for this function:

◆ name()

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

Gets the module name.

Returns
The human-readable module name

Implements hgps::SimulationModule.

◆ set_ethnicity_prevalence()

void hgps::DemographicModule::set_ethnicity_prevalence ( const std::map< core::Identifier, std::map< core::Gender, std::map< std::string, std::map< std::string, double > > > > &  ethnicity_data)

Sets the ethnicity prevalence data for assignment.

Parameters
ethnicity_dataMap of age group, gender, and region-specific ethnicity probabilities

◆ set_region_prevalence()

void hgps::DemographicModule::set_region_prevalence ( const std::map< core::Identifier, std::map< core::Gender, std::map< std::string, double > > > &  region_data)

Sets the region prevalence data for assignment.

Parameters
region_dataMap of age-specific region probabilities by gender

◆ type()

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

Gets the module type identifier.

Returns
The module type identifier

Implements hgps::SimulationModule.

◆ update_population()

void hgps::DemographicModule::update_population ( RuntimeContext context,
const DiseaseModule disease_host 
)

Updates the virtual population status.

Parameters
contextThe simulation run-time context
disease_hostThe diseases host module instance
Here is the call graph for this function:

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