OptimizationRunConfigurationJson

JSON codec for OptimizationRunConfiguration.

Mirrors the configuration of ksl.app.config.RunConfigurationJson:

  • prettyPrint = true — human-readable output;

  • encodeDefaults = true — optional fields always appear in the output so JSON files are self-documenting and round-trip stable across future default changes;

  • allowSpecialFloatingPointValues = true — required because nested types (e.g. control bounds, replication length) may carry ±Infinity.

Sealed-class variants of SolverSpec, TemperatureSpec, CoolingScheduleSpec, and CESamplerSpec use kotlinx-serialization's default polymorphic encoding with a "type" discriminator carrying the @SerialName value of each subtype.

Functions

Link copied to clipboard

Deserialises an OptimizationRunConfiguration from a JSON string produced by encode.

Link copied to clipboard

Serialises config to a pretty-printed JSON string.