RandomRestartSpec

@Serializable
data class RandomRestartSpec(val maxNumRestarts: Int)(source)

Optional random-restart wrapper for any SolverSpec variant.

When non-null on a SolverSpec, OptimizationSolverFactory wraps the chosen algorithm in a ksl.simopt.solvers.algorithms.RandomRestartSolver performing at most maxNumRestarts restarts from randomly drawn starting points.

Modeling restart as data on the base sealed class (rather than as additional RandomRestartX sealed variants) keeps the sealed hierarchy focused on algorithm choice and lets every algorithm be wrapped uniformly.

Constructors

Link copied to clipboard
constructor(maxNumRestarts: Int)

Properties

Link copied to clipboard

maximum number of restarts; must be positive when validated