Skip to content
Skip to Content

scale_factor

Key of the [scenario] table. Qualified name: scenario.scale_factor

Real persons each simulated agent stands for, from 0.001 to 1000000000; counts in outputs are written unscaled and multiplied by this factor (FR-7).

Type
float
Unit
oneDimensionless quantity (ratio, share, index)
Default
requiredexample: 1.0
Valid range
0.001 to 1000000000a finite number
Set in
[scenario]required table
Since
0.1engine 0.1.0

Description

scale_factor is required: a [scenario] table without it stops with E1006. The value is a finite number from 0.001 to 1000000000; outside that range the engine stops with E1013. Unit: one (dimensionless quantity (ratio, share, index)).

Example

scenario.toml
# scenario.toml

[scenario]
name = "tracer"
seed = 20180101
population = "closed"
aligned = false
scale_factor = 1.0  # this page

[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.

When the key is misspelled

Written sacle_factor, the key is refused before anything runs, as missing and as unknown, with the nearest accepted name:

cohortix run scenario.toml
error[E1006]: [scenario] has no `scale_factor`, which is required and must be a float.
  --> scenario.toml:3:2
  = fix: Add `scale_factor` under [scenario], as a float, for example `scale_factor = 1.0`.
 
error[E1022]: Unknown key `sacle_factor` in [scenario]; did you mean `scale_factor`?
  --> scenario.toml:8:1
  = fix: Rename `sacle_factor` to `scale_factor`, or remove it; the accepted keys of [scenario] are "name", "seed", "population", "aligned", "scale_factor".

Errors that name this key

  • E1006: [scenario] has no scale_factor, which is required and must be ….
  • E1008: scale_factor must be …, but it is ….
  • E1013: scale_factor is …, outside the allowed range … to ….
  • 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.scale_factor) 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.scale_factor in schemas/messages/en.toml and open a pull request.

On this page

You are reading the docs for 0.1. Keys can change between versions: use the version that matches cohortix --version.