Optimization Run Configuration
Top-level persistable directive for a simulation-optimization run.
OptimizationRunConfiguration is the optimization counterpart to ksl.app.config.RunConfiguration. It deliberately uses ModelRunTemplate for the model-construction portion so that fixed/baseline model controls and RV overrides are kept separate from the optimizer-controlled decision variables declared in problem.
This document is the JSON/TOML round-trip target for app/UI workflows. It carries no live Solver or ProblemDefinition objects — those are built by OptimizationSolverFactory from the spec when the run is submitted.
Draft documents (partial saves)
problem and solver are nullable so that GUI editors can persist in-progress documents before every section is authored. A document with just a model selected (or a model + a problem but no solver yet) is a legitimate save target; loading it restores the same partial editor state. Submit-time consumers — OptimizationSolverFactory.build(...) and ksl.app.validation.OptimizationConfigurationValidator.validate(...) — reject null problem / solver with clear errors, so an incomplete draft cannot accidentally be run.
Typical workflow
// Load from TOML file:
val config = OptimizationRunConfigurationToml.decode(File("opt.toml").readText())
// Submit through the application-facing session:
val provider: ModelProviderIfc = MapModelProvider("Inventory", InventoryBuilder)
val session = KSLAppSession(provider)
val handle = session.submit(RunSpec.Optimization(config))
val result = handle.result.await()The session validates the configuration via ksl.app.validation.OptimizationConfigurationValidator, builds a ksl.simopt.solvers.Solver via OptimizationSolverFactory, and dispatches to ksl.app.orchestrator.OptimizationOrchestrator. Programmatic users who already hold a built solver can call OptimizationOrchestrator().submit(solver, …) directly and bypass the session entirely.
Constructors
Properties
cross-cutting evaluator/solver settings independent of the chosen algorithm
baseline model-construction template
document-wide output settings (analysis name and the host-resolved output directory). Defaults to OptimizationOutputConfig defaults — analysisName = "Untitled" and outputDirectory = null.
optimization problem (objective, decision variables, constraints); null for in-progress drafts that have not yet authored the problem section. Rejected at submit-time.
solver selection and algorithm-specific parameters; null for in-progress drafts that have not yet chosen an algorithm. Rejected at submit-time.
optional CSV / console trace settings; defaults to disabled