stochasticHillClimber

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

Creates and configures a stochastic hill climber to solve the given problem definition using a simulation-based evaluation approach. The default configuration has the evaluator configured to use a solution cache.

Return

A configured instance of the StochasticHillClimber ready to begin optimization.

Parameters

problemDefinition

The definition of the optimization problem to solve, including parameters and constraints.

modelBuilder

An interface for building the simulation model required for evaluations.

startingPoint

An optional initial solution to start the search from. If null, a default starting point is randomly generated from the problem definition.

maxIterations

The maximum number of hill climbing iterations to perform.

replicationsPerEvaluation

The number of simulations or evaluations performed per solution to estimate its quality.

printer

An optional function to receive updates about solutions found during the search.