Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Campaign file

A campaign file plans a set of runs of one project for taktwerk campaign. Unknown keys are errors; paths are relative to the campaign file. How the runs are formed, seeded, run and resumed is in Campaigns.

Top level

keytypedefaultmeaning
projectstringrequiredthe project file every run runs
outstringthe file’s stem, beside itthe output directory
jobsinteger1runs at a time, ≥ 1; --jobs overrides
speedstring"max"--speed of every run: "max" or a factor
seedinteger0the campaign’s seed; every run’s seed derives from it
scenariostringnonea scenario file every run starts from
settable{}overrides of every run, as a scenario’s [set]
stoptable{}stops of every run, as a scenario’s [stop]
eventarray of tables[]events of every run, as a scenario’s [[event]]
casearray of tables[]the list axis, below
gridtable{}the grid axis: key → list of values; every combination
sampletablenonethe random axis, below
replicatesinteger1repeats of every run with another seed, ≥ 1

Every run needs a stop limit, cycles or time_s, from the campaign, its scenario or its case’s.

[[case]]

keytypemeaning
namestringrequired, unique; ASCII letters, digits, - and _
scenariostringa scenario file merged over the common one
settableoverrides of this case

[grid]

Each key is an override key (as --set takes it) with a non-empty list of values. A grid key seed sets the run seed instead.

[sample]

keytypedefaultmeaning
nintegerrequireddraws, ≥ 1
methodstring"lhs""lhs" (Latin hypercube) or "uniform" (independent draws)
any other keytablean override key and its distribution, below; at least one
distributionparameters
{ uniform = [a, b] }finite a ≤ b
{ log_uniform = [a, b] }0 < a ≤ b; exp of uniform on [ln a, ln b]
{ normal = [mean, sd] }finite mean, sd ≥ 0
{ choice = [v1, v2, …] }at least one value, each equally likely

A sample key seed sets the run seed instead.

Merge order

Per run: the common scenario, then the campaign’s set, stop and events, then the case’s scenario and set, then the grid point’s and the sample’s values. Later values win; stop conditions and events add up. The result is the run’s run.toml, a scenario file that taktwerk run --scenario reruns alone.