OptimizationPaths

Filesystem-path conventions for optimization runs.

Lays out a stable directory shape under any host application's workspace:

<appWorkspace>/
output/
<sanitizedAnalysisName>/ ← analysis output directory
run-001/ ← one run-NNN per submit
summary.toml
iteration_history.csv

<trace>.csv ← when tracking enabled
run-002/

These helpers are pure functions over Path / SolverSpec / SolverTrackingSpec — no Swing dependency, no live engine state. Any host application that wants to honour the standard layout (so users can navigate between runs in a file manager with stable expectations) calls these.

Substrate-level API — usable by any UI shell.

Functions

Link copied to clipboard

Default CSV-trace file stem when the user hasn't set one. Format: <solverName>_trace when the solver has a name; <kindLabel>_trace otherwise.

Link copied to clipboard
fun nextRunSubdir(analysisDir: Path): Path

Find the next unused run-NNN subdirectory under analysisDir.

Link copied to clipboard
fun outputDir(appWorkspace: Path, analysisName: String): Path

Resolve <appWorkspace>/output/<sanitizedAnalysisName>/. Caller supplies the host's appWorkspace. Delegates to AppWorkspacePaths.outputDir — the multi-document-app convention this layout layers on top of.

Link copied to clipboard
fun traceFilePath(runOutputDir: Path, trackingSpec: SolverTrackingSpec, solverSpec: SolverSpec?): Path?

Compute the CSV trace file path inside a specific run directory.