RunConfigurationToml

TOML codec for RunConfiguration.

Uses tomlkt, which integrates directly with kotlinx-serialization. The same @Serializable types — including those with custom serializers such as ksl.controls.experiments.DurationSerializer in ksl.controls.experiments.ExperimentRunParameters — work identically for both TOML and JSON without any additional DTO layer.

TOML is the preferred format for hand-authored configuration files because it supports comments, section headers ([modelReference], [tracingConfig]), and array-of-tables syntax ([[rvOverrides]]) that is cleaner than equivalent JSON.

Example output snippet

[modelReference]
type = "byProviderId"
providerId = "MM1"

[experimentRunParameters]
experimentName = "Experiment1"
numberOfReplications = 10
lengthOfReplication = 500.0
# ...

[[rvOverrides]]
rvName = "MM1:ServiceTime"
paramName = "mean"
value = 2.0

Functions

Link copied to clipboard

Deserialises a RunConfiguration from a TOML string produced by encode.

Link copied to clipboard

Serialises config to a TOML string, prefixed with DOCUMENT_HEADER.