Skip to content
Skip to Content

The scenario file

A run is configured by TOML files only. Every key is typed, checked and documented, and every problem is reported at once.

A scenario file is the whole user interface of a run: no code is needed to describe a scenario. It is a TOML file with one table per group of settings.

Tables in 0.1

TableWhat it sets
[scenario]The name of the scenario and the root of its random seeds.
[time]The simulated period and the step length.
[phases]The phases run at every step, in order, and the depth limit of event cascades.
[data]The data manifest written by cohortix-data, and the table roles bound to its entries.
[population]The initial population.
[outputs]What the run writes to its output folder.
[plugins."<ns>/<plugin>"]The activated plugins, one table each.

Typed keys

Each table is a typed config group. Every key has a type, a range or a set of allowed values, a unit where it has one, a default or the mark "required", and a one-line comment. The scenario reference has one page per key, generated from these declarations, so the reference and the checker cannot disagree.

Checking

The whole file is checked before anything runs, and every problem is reported at once, located at file, line and column, in file order:

  • a value of the wrong type or out of range is refused with the expected type or range and an example;
  • an unknown table or key is refused, with "did you mean" when an accepted name is close (stpe gives step);
  • a key of the full format that 0.1 does not support yet is refused with a "not supported yet" diagnostic.
Standard error
error[E1022]: Unknown key `stpe` in [time]; did you mean `step`?
  --> docs/scenario.toml:36:1
  = fix: Rename `stpe` to `step`, or remove it; the accepted keys of [time] are "start", "end", "step".

Each code has a page under errors.

The effective configuration

After the run, the output folder holds effective.toml: the scenario with every default made explicit. Its text and its BLAKE3 hash are recorded in the provenance manifest, and running it again reproduces the journal byte for byte.

Not supported yet

[[policies]], [ensemble], [calibration], plugin variants and plugin config are part of the full format and come in later versions. In 0.1 they are refused with a "not supported yet" diagnostic, so a scenario never silently ignores a setting.

On this page

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