EvaluationSpec

@Serializable
data class EvaluationSpec(val useSolutionCache: Boolean = true, val useSimulationRunCache: Boolean = false, val snapshotFrequency: Int = 1, val ensureProblemFeasibleRequests: Boolean = false, val maxFeasibleSamplingIterations: Int? = null, val solutionPrecision: Double? = null, val parallelEvaluation: Boolean = false, val numEvaluationWorkers: Int? = null)(source)

Cross-cutting evaluator/solver settings that are not specific to one algorithm.

OptimizationSolverFactory applies these values after solver construction:

  • cache settings (useSolutionCache, useSimulationRunCache) are wired into the evaluator;

  • snapshotFrequency, ensureProblemFeasibleRequests, maxFeasibleSamplingIterations, and solutionPrecision are set directly on the ksl.simopt.solvers.Solver base class;

  • parallelEvaluation and numEvaluationWorkers select and size the evaluator's parallel oracle.

Domain invariants are enforced in init.

Nullable fields use null to mean "leave the solver default in place" so persisted documents do not bake in the current default values.

Constructors

Link copied to clipboard
constructor(useSolutionCache: Boolean = true, useSimulationRunCache: Boolean = false, snapshotFrequency: Int = 1, ensureProblemFeasibleRequests: Boolean = false, maxFeasibleSamplingIterations: Int? = null, solutionPrecision: Double? = null, parallelEvaluation: Boolean = false, numEvaluationWorkers: Int? = null)

Properties

Link copied to clipboard

when true the solver only sends problem-feasible inputs to the evaluator

Link copied to clipboard

cap on the inner-loop sampling iterations used when searching for an input-feasible point; null keeps the solver default

Link copied to clipboard

maximum concurrent model evaluations when parallelEvaluation is true; null uses the available processors

Link copied to clipboard

when true, evaluate the points of a multi-point request concurrently; defaults to false (sequential)

Link copied to clipboard

frequency, in iterations, at which the solver emits iteration snapshots; defaults to 1 (every iteration)

Link copied to clipboard

optional precision used by some convergence tests; null keeps the solver default

Link copied to clipboard

whether the evaluator should cache the underlying simulation runs; defaults to false

Link copied to clipboard

whether the evaluator should cache solutions by input map; defaults to true