Class DifferentialEvolutionVariation
java.lang.Object
org.moeaframework.core.operator.real.DifferentialEvolutionVariation
- All Implemented Interfaces:
Configurable
,Variation
Differential evolution (DE) variation operator. Differential evolution works by randomly selecting three distinct
individuals from a population. A difference vector is calculated between the first two individuals (shown as
the left-most arrow in the figure below), which is subsequently applied to the third individual (shown as the
right-most arrow in the figure below).
The scaling factor parameter adjusts the magnitude of the difference vector, allowing the user to decrease or increase the magnitude in relation to the actual difference between the individuals. The crossover rate parameter controls the fraction of decision variables which are modified by the DE operator.
References:
- Storn and Price. "Differential Evolution - A Simple and Efficient Heuristic for Global Optimization over Continuous Spaces." Journal of Global Optimization, 11:341-359, 1997.
-
Constructor Summary
ConstructorDescriptionConstructs a differential evolution operator with default settings, including a crossover rate of0.1
and scaling factor of0.5
.DifferentialEvolutionVariation
(double crossoverRate, double scalingFactor) Constructs a differential evolution operator with the specified crossover rate and scaling factor. -
Method Summary
Modifier and TypeMethodDescriptionSolution[]
Evolves one or more parent solutions (specified bygetArity
) and produces one or more child solutions.int
getArity()
Returns the number of solutions that must be supplied to theevolve
method.double
Returns the crossover rate of this differential evolution operator.getName()
Returns the name of this variation operator.double
Returns the scaling factor of this differential evolution operator.void
setCrossoverRate
(double crossoverRate) Sets the crossover rate of this differential evolution operator.void
setScalingFactor
(double scalingFactor) Sets the scaling factor of this differential evolution operator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.core.configuration.Configurable
applyConfiguration, getConfiguration
-
Constructor Details
-
DifferentialEvolutionVariation
public DifferentialEvolutionVariation()Constructs a differential evolution operator with default settings, including a crossover rate of0.1
and scaling factor of0.5
. -
DifferentialEvolutionVariation
public DifferentialEvolutionVariation(double crossoverRate, double scalingFactor) Constructs a differential evolution operator with the specified crossover rate and scaling factor.- Parameters:
crossoverRate
- the crossover ratescalingFactor
- the scaling factor
-
-
Method Details
-
getName
Description copied from interface:Variation
Returns the name of this variation operator. This name should also be used as the prefix for any parameters. As such, the name should only contain alphanumeric characters, avoid using whitespace and other symbols. -
getCrossoverRate
public double getCrossoverRate()Returns the crossover rate of this differential evolution operator.- Returns:
- the crossover rate
-
setCrossoverRate
public void setCrossoverRate(double crossoverRate) Sets the crossover rate of this differential evolution operator. The default value is0.1
.- Parameters:
crossoverRate
- the crossover rate
-
getScalingFactor
public double getScalingFactor()Returns the scaling factor of this differential evolution operator.- Returns:
- the scaling factor
-
setScalingFactor
public void setScalingFactor(double scalingFactor) Sets the scaling factor of this differential evolution operator. The default value is0.5
.- Parameters:
scalingFactor
- the scaling factor
-
getArity
public int getArity()Description copied from interface:Variation
Returns the number of solutions that must be supplied to theevolve
method. -
evolve
Description copied from interface:Variation
Evolves one or more parent solutions (specified bygetArity
) and produces one or more child solutions. By contract, the parents must not be modified. The copy constructor should be used to create copies of the parents with these copies subsequently modified.
-