Skip to content
Skip to Content

mode

Key of the [time] table. Qualified name: time.mode

Time mode: "fixed" steps; "continuous" comes with a later release.

Type
stringfrom a closed set
Unit
none
Default
"fixed"used when the key is absent
Valid range
one of 1"fixed"
Set in
[time]required table
Since
0.1engine 0.1.0

Description

mode is optional. When it is absent, the engine uses "fixed", and writes that value into effective.toml in the output folder. Accepted values: "fixed". Any other value stops with E1009.

Example

scenario.toml
# scenario.toml

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

[time]
mode = "fixed"  # this page
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 mdoe, the key is refused before anything runs with the nearest accepted name:

cohortix run scenario.toml
error[E1022]: Unknown key `mdoe` in [time]; did you mean `mode`?
  --> scenario.toml:11:1
  = fix: Rename `mdoe` to `mode`, or remove it; the accepted keys of [time] are "mode", "start", "end", "step".

Errors that name this key

  • E1008: mode must be …, but it is ….
  • E1009: mode is …, which is not one of ….
  • E1022: Unknown key … in [time]; did you mean …?

See also

  • [time]Simulated period and step length.
  • startFirst day of the first simulated month, as a date or "YYYY-MM-DD".
  • endFirst day after the run, after start by a whole number of steps.

Generated from crates/cohortix-kernel/src/scenario/config.rs. Do not edit. This page (key time.mode) 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.time.mode 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.