attach
fun attach(solver: Solver, trackingSpec: SolverTrackingSpec, runDir: Path, solverSpec: SolverSpec? = null): OptimizationTrackerAttacher.TrackerAttachResult(source)
Attach the requested trackers to solver.
Parameters
solver
The live solver instance. When this is a RandomRestartSolver, nested tracker variants are used so both macro and micro iterations appear in the trace.
tracking Spec
The host's tracking preferences.
run Dir
The run-output directory. CSV trace lands inside this directory at the filename derived from trackingSpec (via OptimizationPaths.traceFilePath).
solver Spec
Used by OptimizationPaths.traceFilePath to derive a default CSV filename when trackingSpec doesn't specify one. Pass null when the spec is unknown — the helper falls back to a generic stem.