P10 Residence and households
Planned plugin: households as collective entities, and every housing decision: the dwelling each mover goes to, the people who move together, fostering and household splits. Later.
In development
This plugin is planned for a later release. This page describes its design; names and details may still change until it ships, when its generated model description replaces this page.
Status: Later. Version 0.1 ships no official plugin.
Purpose
Residence and households keeps households and owns every housing decision. Other plugins decide that a person moves and to which territorial unit; this plugin decides the dwelling. It covers the dwelling of a newly formed union and of an added wife, the minors who follow a mover, the destination of a fostered child and the split of a household. It also gives the household head and holds the household's wealth.
State and owned attributes
- Households: a household is a collective entity, with its members linked to it. The membership carries the member's attendance as a share of waking time.
- Dwellings: each person has at most one active residence link to a dwelling, which ends on death.
- The household head, offered as a view for each person, and the household's wealth.
How surveys and censuses delimit a household is not the household's state: those rules become tabulations of the outputs.
Processes and their order within the step
Residence and households runs in the households phase, the last phase of the step in phases.order, after every birth, union, move and death of the step.
- When Union or Mobility moves a person to a territorial unit, the kernel forwards the request to this plugin, with the reason and the target unit, and the plugin chooses the dwelling. Only this plugin sends a move that names a dwelling.
- A newborn starts its residence link in its mother's dwelling.
- The plugin recomposes households after the step's events: who joins, who leaves, who heads it, and when a household splits.
The rules for the residence of an added wife, the minors who follow a mover and the destination of a fostered child are not decided yet.
Events emitted
DwellingCreatedandDwellingRetired.- Other events, such as fostering, are named when the plugin is built.
Every change of residence is journaled by the kernel with its reason.
Contract
Residence and households provides two contracts together: official/Residence and official/Households. official/Residence is coupled to the kernel.
| Item | Kind | What it is |
|---|---|---|
dwelling | place type | a dwelling |
resident | link | a person's residence in a dwelling; one active per person, ended on death |
Move | request | a move forwarded by the kernel, with the agent, the reason and the target unit |
DwellingCreated, DwellingRetired | events | a dwelling enters or leaves the stock |
dwelling_of | view | the dwelling a person lives in |
household | collective type | a household, with its members |
| household head | view | the head of a person's household |
community | collective type | a community, declared by a minor version of official/Residence |
The reasons for a change of residence form a closed list: migration, union_formation, union_dissolution, household_change and dwelling_retired. A new reason enters only through a minor version of the contract. The households contract also declares an invariant: at each step, the household's members equal the previous members plus births and arrivals, minus deaths and departures (name provisional).
When no Residence provider is active, the kernel owns the residence links and dwellings, and applies only a few fixed rules: a newborn takes its mother's dwelling, a residence link ends when the person changes unit, and it ends on emigration. Nothing else: no housing decision is made before this plugin exists. Union and Mobility already send a destination unit, never a dwelling, so nothing changes in them when this plugin arrives.
Parameters
Fixed when the plugin is built.
Data needed from the pipeline
The initial residence links of the population, through the data pipeline. The other tables are fixed when the plugin is built.
Data format
The kernel loads the dwellings and residence links of the initial population; this plugin starts from them.
- Dwellings:
population.dwelling2.0; keydwelling_id. Columnsdwelling_id,realization,initial_household_id,territory_unit,feature_id,lon,lat,coord_precision,stock,opened_date,opened_date_precision,closed_date,closed_date_precision;stockisoccupied,vacantorreserve. - Residence links:
population.residence2.0; keyperson_id. Columnsperson_id,dwelling_id,start_date,start_date_precision,end_date,end_date_precision,source_residence_id: who lives in which dwelling, from which date, until which date. - Links between people:
population.link2.0; keylink_type,from_person_id,to_person_id. Kin.
Dwelling positions come only from open layers or a user's own table, never from survey cluster points. The household tables and the other parameters are fixed when the plugin is built.
Each table is registered with cohortix-data register and bound to a table role in the scenario's [data.bindings]; see Bring your own data.
Reads
- From the kernel: territorial unit, kin, whether a person is in the domain or abroad and, from 1.1, who lives with whom.
- From Activity and time budget, each member's attendance, which it copies onto the membership.
- It listens to the births, unions and their ends, emigrations and deaths of the step.
Variants
No variant is named yet.
Policies that can modulate it
Its modulation points are named when the plugin is built.
P9 Mobility
Planned plugin: emigration abroad, moves between territorial units, return and immigration, through the kernel's moves. Later; its contract is written for 1.0, with no plugin.
P12a Activity and time budget
Planned plugin: each person's activity role, such as pupil or worker, and the time budget of each role, of which it is the only author. Planned for 1.1, first as a minimal provider.