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

#include <jacardi_employment_static.h>

Classes

struct  FactorTerm
struct  Assignment
 Drawn detailed id + recoded 4-cat id (both NaN when missing). More...
struct  AgeFactors
 Age-only predictors (precomputed for 19..80). More...

Public Member Functions

void set_coefficients (std::unordered_map< int, std::vector< FactorTerm > > by_category)
void set_recode (std::array< int, category_count+1 > detailed_to_cat4)
bool has_coefficients () const noexcept
bool has_recode () const noexcept
std::array< double, category_count > score_probabilities (unsigned int age, core::Gender gender, int education_id) const
 Softmax probabilities p_1..p_6 for SCORE checks (indices 0..5 = categories 1..6).
Assignment initialise (unsigned int age, core::Gender gender, int education_id, Random &rng) const
 Part A — missing 0..18; else SCORE → DRAW → recode.
Assignment update (unsigned int age, core::Gender gender, int education_id, const Assignment &current, Random &rng) const
 Part B — missing under 19; first assign if still missing at 19+; else hold (temporary).
int recode (int employment_id) const

Static Public Member Functions

static Assignment hold (const Assignment &current) noexcept
 MAHIMA: Isolated hold — yearly package replaces this path only.
static int gender_code (core::Gender gender)
static AgeFactors compute_age_factors (int age_capped)
static double factor_value (const std::string &factor, const AgeFactors &age_f, int gender, int education_id)

Static Public Attributes

static constexpr double missing = std::numeric_limits<double>::quiet_NaN()
static constexpr unsigned int age_missing_max = 18U
static constexpr unsigned int age_assign_min = 19U
static constexpr int age_cap = 80
static constexpr int category_count = 6
static constexpr int category_min = 1
static constexpr int category_max = 6

Detailed Description

MAHIMA: Slovenia employment static (partner algo 16 Oct 2026) — P1b after education.

Part A (initialise): start year + still-missing adults. Part B (update): after ageing + education; first SCORE/DRAW at 19+ when missing; otherwise temporary hold (swappable when yearly package arrives).

Person fields: EmploymentDetailed (1..6) and Employment (1..4). Ages 0–18 = NaN. CSV gender: 1 = male, 0 = female. Needs finite education_id at ages 19+.

Serial person loops only — shared Random is not thread-safe (same as education).

Member Function Documentation

◆ compute_age_factors()

EmploymentStaticTables::AgeFactors hgps::EmploymentStaticTables::compute_age_factors ( int age_capped)
static
Here is the caller graph for this function:

◆ factor_value()

double hgps::EmploymentStaticTables::factor_value ( const std::string & factor,
const AgeFactors & age_f,
int gender,
int education_id )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gender_code()

int hgps::EmploymentStaticTables::gender_code ( core::Gender gender)
static
Here is the caller graph for this function:

◆ has_coefficients()

bool hgps::EmploymentStaticTables::has_coefficients ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ has_recode()

bool hgps::EmploymentStaticTables::has_recode ( ) const
inlinenoexcept

◆ hold()

Assignment hgps::EmploymentStaticTables::hold ( const Assignment & current)
inlinestaticnoexcept

MAHIMA: Isolated hold — yearly package replaces this path only.

Here is the caller graph for this function:

◆ initialise()

EmploymentStaticTables::Assignment hgps::EmploymentStaticTables::initialise ( unsigned int age,
core::Gender gender,
int education_id,
Random & rng ) const

Part A — missing 0..18; else SCORE → DRAW → recode.

◆ recode()

int hgps::EmploymentStaticTables::recode ( int employment_id) const

◆ score_probabilities()

std::array< double, EmploymentStaticTables::category_count > hgps::EmploymentStaticTables::score_probabilities ( unsigned int age,
core::Gender gender,
int education_id ) const

Softmax probabilities p_1..p_6 for SCORE checks (indices 0..5 = categories 1..6).

Here is the call graph for this function:

◆ set_coefficients()

void hgps::EmploymentStaticTables::set_coefficients ( std::unordered_map< int, std::vector< FactorTerm > > by_category)

◆ set_recode()

void hgps::EmploymentStaticTables::set_recode ( std::array< int, category_count+1 > detailed_to_cat4)

◆ update()

EmploymentStaticTables::Assignment hgps::EmploymentStaticTables::update ( unsigned int age,
core::Gender gender,
int education_id,
const Assignment & current,
Random & rng ) const

Part B — missing under 19; first assign if still missing at 19+; else hold (temporary).

Here is the call graph for this function:

Member Data Documentation

◆ age_assign_min

unsigned int hgps::EmploymentStaticTables::age_assign_min = 19U
staticconstexpr

◆ age_cap

int hgps::EmploymentStaticTables::age_cap = 80
staticconstexpr

◆ age_missing_max

unsigned int hgps::EmploymentStaticTables::age_missing_max = 18U
staticconstexpr

◆ category_count

int hgps::EmploymentStaticTables::category_count = 6
staticconstexpr

◆ category_max

int hgps::EmploymentStaticTables::category_max = 6
staticconstexpr

◆ category_min

int hgps::EmploymentStaticTables::category_min = 1
staticconstexpr

◆ missing

double hgps::EmploymentStaticTables::missing = std::numeric_limits<double>::quiet_NaN()
staticconstexpr

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