Class DifferentialEvolutionCrossover
java.lang.Object
org.uma.jmetal.operator.crossover.impl.DifferentialEvolutionCrossover
- All Implemented Interfaces:
Serializable,CrossoverOperator<DoubleSolution>,Operator<List<DoubleSolution>,List<DoubleSolution>>
public class DifferentialEvolutionCrossover
extends Object
implements CrossoverOperator<DoubleSolution>
Differential evolution crossover operator
- Author:
- Antonio J. Nebro
Comments: - The operator receives two parameters: the current individual and an array of three parent individuals - The best and rand variants depends on the third parent, according whether it represents the current of the "best" individual or a random one. The implementation of both variants are the same, due to that the parent selection is external to the crossover operator. - Implemented variants: - rand/1/bin (best/1/bin) - rand/1/exp (best/1/exp) - current-to-rand/1 (current-to-best/1) - current-to-rand/1/bin (current-to-best/1/bin) - current-to-rand/1/exp (current-to-best/1/exp)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionConstructorDifferentialEvolutionCrossover(double cr, double f, DifferentialEvolutionCrossover.DE_VARIANT variant) ConstructorDifferentialEvolutionCrossover(double cr, double f, DifferentialEvolutionCrossover.DE_VARIANT variant, BoundedRandomGenerator<Integer> jRandomGenerator, BoundedRandomGenerator<Double> crRandomGenerator) ConstructorDifferentialEvolutionCrossover(double cr, double f, DifferentialEvolutionCrossover.DE_VARIANT variant, RandomGenerator<Double> randomGenerator) Constructor -
Method Summary
Modifier and TypeMethodDescriptiondoubleexecute(List<DoubleSolution> parentSolutions) Execute() methoddoublegetCr()doublegetF()intgetVariantFromString(String variant) intintvoidsetBestSolution(DoubleSolution bestSolution) voidsetCr(double cr) voidsetCurrentSolution(DoubleSolution current) voidsetF(double f)
-
Constructor Details
-
DifferentialEvolutionCrossover
public DifferentialEvolutionCrossover()Constructor -
DifferentialEvolutionCrossover
public DifferentialEvolutionCrossover(double cr, double f, DifferentialEvolutionCrossover.DE_VARIANT variant) Constructor- Parameters:
cr-f-variant-
-
DifferentialEvolutionCrossover
public DifferentialEvolutionCrossover(double cr, double f, DifferentialEvolutionCrossover.DE_VARIANT variant, RandomGenerator<Double> randomGenerator) Constructor- Parameters:
cr-f-variant-randomGenerator-
-
DifferentialEvolutionCrossover
public DifferentialEvolutionCrossover(double cr, double f, DifferentialEvolutionCrossover.DE_VARIANT variant, BoundedRandomGenerator<Integer> jRandomGenerator, BoundedRandomGenerator<Double> crRandomGenerator) Constructor- Parameters:
cr-f-variant-jRandomGenerator-crRandomGenerator-
-
-
Method Details
-
getCr
public double getCr() -
getF
public double getF() -
getVariant
-
getNumberOfDifferenceVectors
public int getNumberOfDifferenceVectors() -
getCrossoverType
-
getMutationType
-
numberOfRequiredParents
public int numberOfRequiredParents()- Specified by:
numberOfRequiredParentsin interfaceCrossoverOperator<DoubleSolution>
-
numberOfGeneratedChildren
public int numberOfGeneratedChildren()- Specified by:
numberOfGeneratedChildrenin interfaceCrossoverOperator<DoubleSolution>
-
crossoverProbability
public double crossoverProbability()- Specified by:
crossoverProbabilityin interfaceCrossoverOperator<DoubleSolution>
-
setCurrentSolution
-
setBestSolution
-
setCr
public void setCr(double cr) -
setF
public void setF(double f) -
execute
Execute() method- Specified by:
executein interfaceOperator<List<DoubleSolution>,List<DoubleSolution>> - Parameters:
parentSolutions- The data to process
-
getVariantFromString
-