Results Artifact Writer
Coordinator that writes the full artifact set on a successful run completion. Each writer is best-effort — a single failure (e.g. lets-plot PNG export failing because the JVM can't find its native renderer) doesn't abort the rest.
Host applications call writeCompleted from their terminal-state observer when the run resolves as RunResult.OptimizationCompleted. Cancelled / failed runs go through writeIncomplete which writes only the summary TOML with status = CANCELLED / FAILED.
Substrate-level API — the entry point any UI shell calls to materialise an optimization run's results to disk.
Functions
Link copied to clipboard
fun writeCompleted(config: OptimizationRunConfiguration, result: RunResult.OptimizationCompleted, solverResult: SolverResult, solverInstance: Solver, runDir: Path): ArtifactWriteResult
Write the full artifact set into runDir for a successful run. Returns per-artifact success flags.
Link copied to clipboard
fun writeIncomplete(config: OptimizationRunConfiguration, status: ResultsStatus, runId: String, startTimeIso: String, endTimeIso: String, elapsedMillis: Long, latestBest: LatestBestSnapshot?, statusReason: String?, runDir: Path, solverInstance: Solver? = null): ArtifactWriteResult
Write a partial artifact set for a cancelled or failed run.