SolverStateSnapshot

data class SolverStateSnapshot(val iterationNumber: Int, val numOracleCalls: Int, val numReplicationsRequested: Int, val bestSolutionSoFar: Solution, val currentSolution: Solution, val estimatedObjFncValue: Double = bestSolutionSoFar.estimatedObjFncValue, val penalizedObjFncValue: Double = bestSolutionSoFar.penalizedObjFncValue, val solverSpecificState: Map<String, Double>? = null)(source)

An immutable representation of a solver's state at a specific point in time during the optimization process.

  • This class is designed to be emitted or recorded at the end of algorithmic iterations (or macro-steps). Because it is strictly an immutable snapshot, it can be safely stored in historical lists or passed across threads without risking the "live reference" mutation problem.

Parameters

iterationNumber

The current algorithmic iteration or step at which this snapshot was taken.

numOracleCalls

The cumulative total number of times the simulation oracle has been invoked by the solver up to this point.

numReplicationsRequested

The cumulative total number of individual simulation replications requested across all oracle calls up to this point.

bestSolutionSoFar

The best Solution discovered by the solver up to this iteration.

estimatedObjFncValue

The objective function value associated with the bestSolutionSoFar.

penalizedObjFncValue

The penalized objective function value associated with the bestSolutionSoFar.

currentSolution

The latest solution found. It may not be the best due to algorithm trajectories.

solverSpecificState

An optional map containing algorithm-specific metrics that do not apply generally to all solvers (e.g., mapOf("temperature" to 50.0) for Simulated Annealing, or "splineCalls" for R-SPLINE). Defaults to null.

Constructors

Link copied to clipboard
constructor(iterationNumber: Int, numOracleCalls: Int, numReplicationsRequested: Int, bestSolutionSoFar: Solution, currentSolution: Solution, estimatedObjFncValue: Double = bestSolutionSoFar.estimatedObjFncValue, penalizedObjFncValue: Double = bestSolutionSoFar.penalizedObjFncValue, solverSpecificState: Map<String, Double>? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard