Package org.opt4j.operator.crossover
Class CrossoverDoubleSBX
- java.lang.Object
-
- org.opt4j.operator.crossover.CrossoverDouble
-
- org.opt4j.operator.crossover.CrossoverDoubleElementwise
-
- org.opt4j.operator.crossover.CrossoverDoubleSBX
-
- All Implemented Interfaces:
Operator<DoubleGenotype>,Crossover<DoubleGenotype>
- Direct Known Subclasses:
CrossoverDoubleDefault
public class CrossoverDoubleSBX extends CrossoverDoubleElementwise
TheCrossoverDoubleSBXis an implementation of the simulated binary crossover operator proposed by Deb and Kumar, 1995.The SBX crossover is applied bitwise. In the original work, two offspring are created using
z_1 = 0.5 * [(1 + beta)x + (1 - beta)y]
z_2 = 0.5 * [(1 - beta)x + (1 + beta)y].In this implementation, one offspring is created while the actual bit is set to
z_1with a probability of0.5and toz_2with a probability of0.5, respectively.
The valuebetais defined as
beta = (2u)^(1 / (nu + 1))ifu <= 0.5and
beta = (1 / (2 (1 - u)))^(1 / (nu + 1))otherwiseAt this juncture,
uis a random number between(0, 1). The variablenuinfluences the crossover with a high value leading to a higher probability of 'near-parent' solution while a small value leads to a higher probability of more distant solutions, respectively.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceCrossoverDoubleSBX.Nu
-
Field Summary
Fields Modifier and Type Field Description protected doublenu-
Fields inherited from class org.opt4j.operator.crossover.CrossoverDouble
normalize, random
-
-
Constructor Summary
Constructors Constructor Description CrossoverDoubleSBX(double nu, NormalizeDouble normalize, Rand random)Constructs aCrossoverDoubleSBXwith a nu value and a random generator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pair<Double>crossover(double x, double y)Performs a crossover with two double values.-
Methods inherited from class org.opt4j.operator.crossover.CrossoverDoubleElementwise
crossover
-
Methods inherited from class org.opt4j.operator.crossover.CrossoverDouble
crossover
-
-
-
-
Constructor Detail
-
CrossoverDoubleSBX
@Inject public CrossoverDoubleSBX(double nu, NormalizeDouble normalize, Rand random)Constructs aCrossoverDoubleSBXwith a nu value and a random generator.- Parameters:
nu- thenuvaluenormalize- the normalize operatorrandom- the random number generator
-
-
Method Detail
-
crossover
public Pair<Double> crossover(double x, double y)
Description copied from class:CrossoverDoubleElementwisePerforms a crossover with two double values.- Specified by:
crossoverin classCrossoverDoubleElementwise- Parameters:
x- the first valuey- the second value- Returns:
- the resulting values
-
-