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
TheCrossoverDoubleSBX
is 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_1
with a probability of0.5
and toz_2
with a probability of0.5
, respectively.
The valuebeta
is defined as
beta = (2u)^(1 / (nu + 1))
ifu <= 0.5
and
beta = (1 / (2 (1 - u)))^(1 / (nu + 1))
otherwiseAt this juncture,
u
is a random number between(0, 1)
. The variablenu
influences 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 interface
CrossoverDoubleSBX.Nu
-
Field Summary
Fields Modifier and Type Field Description protected double
nu
-
Fields inherited from class org.opt4j.operator.crossover.CrossoverDouble
normalize, random
-
-
Constructor Summary
Constructors Constructor Description CrossoverDoubleSBX(double nu, NormalizeDouble normalize, Rand random)
Constructs aCrossoverDoubleSBX
with 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 aCrossoverDoubleSBX
with a nu value and a random generator.- Parameters:
nu
- thenu
valuenormalize
- the normalize operatorrandom
- the random number generator
-
-
Method Detail
-
crossover
public Pair<Double> crossover(double x, double y)
Description copied from class:CrossoverDoubleElementwise
Performs a crossover with two double values.- Specified by:
crossover
in classCrossoverDoubleElementwise
- Parameters:
x
- the first valuey
- the second value- Returns:
- the resulting values
-
-