createGeneticAlgorithmSolver

fun createGeneticAlgorithmSolver(problemDefinition: ProblemDefinition, modelBuilder: ModelBuilderIfc, populationSize: Int = GeneticAlgorithmSolver.defaultPopulationSize, selectionOperator: SelectionOperatorIfc = TournamentSelection(), crossoverOperator: CrossoverOperatorIfc = BlendCrossover(), mutationOperator: MutationOperatorIfc? = null, startingPoint: MutableMap<String, Double>? = null, maxIterations: Int = GeneticAlgorithmSolver.gaDefaultMaxIterations, replicationsPerEvaluation: Int = defaultReplicationsPerEvaluation, solutionCache: SolutionCacheIfc = MemorySolutionCache(), simulationRunCache: SimulationRunCacheIfc? = null, experimentRunParameters: ExperimentRunParametersIfc? = null, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = RNStreamProvider(), name: String? = null, parallelOptions: ParallelEvaluationOptions = ParallelEvaluationOptions()): GeneticAlgorithmSolver(source)

Creates and configures a genetic algorithm solver for a given problem definition.

Return

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

populationSize

The number of individuals per generation. Defaults to GeneticAlgorithmSolver.defaultPopulationSize.

selectionOperator

The parent-selection strategy. Defaults to TournamentSelection.

crossoverOperator

The recombination strategy. Defaults to BlendCrossover.

mutationOperator

The mutation strategy. When null (the default), a GaussianMutation for the problem is created.

startingPoint

Optional initial coordinates seeded into the initial population. If left null, the solver will automatically generate a random feasible population upon initialization.

maxIterations

The maximum number of generations the algorithm will run. Defaults to 100.

replicationsPerEvaluation

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

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

experimentRunParameters

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

streamNum

the random number stream number; 0 (the default) means the next available stream

streamProvider

the provider of random number streams; defaults to a fresh RNStreamProvider, so each solver has its own streams