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

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

#include <demographic.h>

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

Public Member Functions

 PopulationModule ()=delete
 
 PopulationModule (std::map< int, std::map< int, PopulationRecord >> &&pop_data, LifeTable &&life_table)
 Initialise a new instance of the PopulationModule class. More...
 
SimulationModuleType type () const noexcept override
 Gets the module type identifier. More...
 
const std::string & name () const noexcept override
 Gets the module name. More...
 
std::size_t get_total_population_size (int time_year) const noexcept override
 Gets the total population at a specific point in time. More...
 
const std::map< int, PopulationRecord > & get_population_distribution (int time_year) const override
 Gets the population age distribution at a specific point in time. More...
 
void initialise_population (RuntimeContext &context) override
 Initialises the virtual population. More...
 
void update_population (RuntimeContext &context, const DiseaseHostModule &disease_host) override
 Updates the virtual population status. More...
 
- Public Member Functions inherited from hgps::SimulationModule
virtual ~SimulationModule ()=default
 Destroys a SimulationModule instance. More...
 

Detailed Description

Implements the population demographic module data type.

Constructor & Destructor Documentation

◆ PopulationModule() [1/2]

hgps::PopulationModule::PopulationModule ( )
delete

◆ PopulationModule() [2/2]

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

Initialise a new instance of the PopulationModule 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::PopulationModule::get_population_distribution ( int  time_year) const
overridevirtual

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

Implements hgps::DemographicModule.

◆ get_total_population_size()

std::size_t hgps::PopulationModule::get_total_population_size ( int  time_year) const
overridevirtualnoexcept

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

Implements hgps::DemographicModule.

Here is the caller graph for this function:

◆ initialise_population()

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

Initialises the virtual population.

Parameters
contextThe simulation shared runtime context instance

Implements hgps::SimulationModule.

Here is the call graph for this function:

◆ name()

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

Gets the module name.

Returns
The human-readable module name

Implements hgps::SimulationModule.

◆ type()

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

Gets the module type identifier.

Returns
The module type identifier

Implements hgps::SimulationModule.

◆ update_population()

void hgps::PopulationModule::update_population ( RuntimeContext context,
const DiseaseHostModule disease_host 
)
overridevirtual

Updates the virtual population status.

Parameters
contextThe simulation run-time context
disease_hostThe diseases host module instance

Implements hgps::DemographicModule.

Here is the call graph for this function:

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