Aging Module

This module handles the annual aging process for all persons in the simulation. It also provides orca columns for identifying children, seniors, and age groups.

  • Increments age for all persons each simulation year.

  • Identifies children and seniors based on configurable criteria.

  • Categorizes persons into age groups for use in other modules and models.

Module function

Module configuration options: AgingModuleConfig

demos.models.aging.aging(persons)[source]

Increment the age of every person by one year.

This step updates the age column in the persons table, simulating the passage of one year for all agents in the population.

Parameters:

persons (orca.Table) – The persons table containing the age column.

Notes

  • Modifies persons.age in place.

  • Should be run once per simulation year.

Orca Columns

demos.models.aging.child(data='persons.relate')[source]

Identify children in the persons table.

Returns a binary indicator (1 or 0) for each person, where 1 indicates the person is a child based on the relate code (values 2, 3, 4, or 14).

Parameters:

data (pandas.Series) – The relate column from the persons table.

Returns:

Binary indicator for child status.

Return type:

pandas.Series

demos.models.aging.senior(data='persons.age')[source]

Identify seniors in the persons table.

Returns a binary indicator (1 or 0) for each person, where 1 indicates the person is a senior, defined as having an age greater than or equal to the threshold specified in the aging module config (default is 65).

Parameters:

data (pandas.Series) – The age column from the persons table.

Returns:

Binary indicator for senior status.

Return type:

pandas.Series

demos.models.aging.age_group(data='persons.age')[source]

Assign each person to an age group.

Categorizes persons into predefined age intervals for use in modeling and reporting.

Parameters:

data (pandas.Series) – The age column from the persons table.

Returns:

Categorical age group labels as strings.

Return type:

pandas.Series

Other Functions