simulatedAnnealer

fun simulatedAnnealer(problemDefinition: ProblemDefinition, modelBuilder: ModelBuilderIfc, startingPoint: MutableMap<String, Double>? = null, initialTemperature: Double = defaultInitialTemperature, maxIterations: Int = defaultMaxNumberIterations, replicationsPerEvaluation: Int = defaultReplicationsPerEvaluation, printer: (Solution) -> Unit? = null): SimulatedAnnealing

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

Return

An instance of SimulatedAnnealing 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.

startingPoint

Optional initial solution to start the optimization. Defaults to the starting point provided by the problem definition.

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 100.

replicationsPerEvaluation

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

printer

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