simulatedAnnealingSolverWithRestarts

fun simulatedAnnealingSolverWithRestarts(problemDefinition: ProblemDefinition, modelBuilder: ModelBuilderIfc, maxNumRestarts: Int = defaultMaxRestarts, initialTemperature: Double = defaultInitialTemperature, maxIterations: Int = defaultMaxNumberIterations, replicationsPerEvaluation: Int = defaultReplicationsPerEvaluation, solutionCache: SolutionCacheIfc = MemorySolutionCache(), simulationRunCache: SimulationRunCacheIfc? = null, restartPrinter: (Solver) -> Unit? = null, printer: (Solver) -> Unit? = null, experimentRunParameters: ExperimentRunParametersIfc? = null, defaultKSLDatabaseObserverOption: Boolean = false): RandomRestartSolver(source)

Creates and configures a simulated annealing optimization algorithm for a given problem definition.

Return

An instance of RandomRestartSolver that encapsulates the optimization process and results.

Parameters

problemDefinition

The definition of the optimization problem, including constraints and objectives.

modelBuilder

The model builder interface used to create models for evaluation.

maxNumRestarts

The maximum number of restarts to be performed.

initialTemperature

The initial temperature for the annealing process. Determines the likelihood of accepting worse solutions at the start of the process. Defaults to 1000.0.

maxIterations

The maximum number of iterations the algorithm will run. Defaults to 1000.

replicationsPerEvaluation

The number of replications to use during each evaluation to reduce stochastic noise. Defaults to 50.

solutionCache

Specifies if the evaluator uses a solution cache. By default, this is MemorySolutionCache.

simulationRunCache

Specifies if the simulation oracle will use a SimulationRunCache. The default is null (no cache).

restartPrinter

Optional callback function to print or handle intermediate solutions. Can be used to observe the restart optimization process.

printer

Optional callback function to print or handle intermediate solutions. Can be used to observe the inner solver optimization process.

experimentRunParameters

the run parameters to apply to the model during the building process

defaultKSLDatabaseObserverOption

indicates if a default KSL database should be created and attached to the model. The default is false.