A scenario file is a test of a project: overrides, swapped model packages, stop limits, a seed
and timed events, given to taktwerk run --scenario <file> and used by every campaign run.
Unknown keys are errors. What the events do while a run runs is in
Scenario events.
Each event has a time, exactly one action and the values that action takes.
key
type
meaning
at_s
float
engine time, seconds: the event applies at the first tick at or after it
cycle
integer
or the tick it applies at
action
values
does
set = "<target>"
value
sets a tunable or external input; a number sets every element (or name[i] one), an array the whole signal
add = "<target>"
value
adds value: a step
ramp = "<target>"
to, over_s
moves linearly from the value at the event to to, one step per tick, reaching it over_s seconds later
fault = "<signal>"
one fault below, optional for_s
changes what the signal’s readers see, for for_s seconds or until cleared or the end of the run
clear = "<signal>"
ends the fault on the signal
fault
readers see
hold = true
the value the signal had when the fault started
value = <x>
x (nan allowed: a lost reading)
offset = <x>
the value plus x: a bias
scale = <x>
the value times x: a gain error
noise_sd = <x>
the value plus normal noise of standard deviation x
drop = true
an external input no longer written: its last value; with an age limit it goes stale like a lost connection
A target is a tunable or an external input, a fault’s signal an output or an external input,
whole or one element name[i]. Events are checked against the plan at start: an unknown
signal, a target of the wrong kind, a missing or misplaced value fails the run before the first
tick. Events of one tick apply in file order, before the models step.
The file’s set applies before --set, its models before --model; --seed,
--cycles and --until-time win over the file’s; stop conditions add up.
run.json’s invocation keeps the file whole: path, hash and text
(run.json).
A campaign merges its common scenario, its own [set], [stop] and events, a case’s scenario
and the axes’ values into one scenario per run, run.toml
(Campaign file).