population
Key of the [scenario] table. Qualified name: scenario.population
Whether the population is "closed" (no one enters or leaves the domain except by birth and death) or "open" (migration flows); recorded in provenance (FR-7).
- Type
- stringfrom a closed set
- Unit
- none
- Default
- requiredexample: "closed"
- Valid range
- one of 2"closed", "open"
- Set in
- [scenario]required table
- Since
- 0.1engine 0.1.0
Description
population is required: a [scenario] table without it stops with E1006. Accepted values: "closed", "open". Any other value stops with E1009.
Example
# scenario.toml
[scenario]
name = "tracer"
seed = 20180101
population = "closed" # this page
aligned = false
scale_factor = 1.0
[time]
start = 2018-01-01
end = 2019-01-01
[plugins."test/ticker"]Run it with the engine built from source: cohortix run scenario.toml --output output/example.
Related
When the key is misspelled
Written ppoulation, the key is refused before anything runs, as missing and as unknown, with the nearest accepted name:
error[E1006]: [scenario] has no `population`, which is required and must be a string.
--> scenario.toml:3:2
= fix: Add `population` under [scenario], as a string, for example `population = "closed"`.
error[E1022]: Unknown key `ppoulation` in [scenario]; did you mean `population`?
--> scenario.toml:6:1
= fix: Rename `ppoulation` to `population`, or remove it; the accepted keys of [scenario] are "name", "seed", "population", "aligned", "scale_factor".
Errors that name this key
E1006: [scenario] has nopopulation, which is required and must be ….E1008:populationmust be …, but it is ….E1009:populationis …, which is not one of ….E1022: Unknown key…in [scenario]; did you mean…?
See also
- [scenario]Identity of the scenario: its name and the root of its random seeds.
- nameName of the scenario (ASCII letters, digits, `-` and `_`)
- seedRoot of the seed tree, an integer from 0 to 2^63 - 1
Generated from crates/cohortix-kernel/src/scenario/config.rs. Do not edit. This page (key scenario.population) is built from the engine sources at every documentation build. To change it, edit its ConfigKey in kernel_groups() and its one-line comment config.key.scenario.population in schemas/messages/en.toml and open a pull request.