BlendCrossover

class BlendCrossover(alpha: Double = defaultAlpha) : CrossoverOperatorIfc(source)

Blend crossover (BLX-alpha): the default real-coded crossover operator. For each coordinate i, let cMin = min(p1[i], p2[i]) and cMax = max(p1[i], p2[i]) with spread I = cMax - cMin. Each offspring's coordinate is drawn uniformly from the interval [cMin - alpha*I, cMax + alpha*I], allowing exploration slightly beyond the parents' range. Two offspring are produced per call. The returned points are not clamped or rounded; the solver does that via ksl.simopt.problem.ProblemDefinition.toInputMap.

When the parents share a coordinate value (I == 0), that coordinate is copied unchanged (the blend interval degenerates to a point).

Parameters

alpha

the blend expansion factor. Must be greater than 0. The default is defaultAlpha.

Constructors

Link copied to clipboard
constructor(alpha: Double = defaultAlpha)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun crossover(parent1: DoubleArray, parent2: DoubleArray, solver: GeneticAlgorithmSolver): List<DoubleArray>

Recombines two parents into one or more offspring.

Link copied to clipboard
open override fun toString(): String