Class SPX
java.lang.Object
org.moeaframework.core.operator.real.MultiParentVariation
org.moeaframework.core.operator.real.SPX
- All Implemented Interfaces:
Configurable
,Variation
Simplex crossover (SPX) operator. SPX is a multiparent operator, allowing a user-defined number of parents and
offspring. The parents form a convex hull, called a simplex. Offspring are generated uniformly at random from
within the simplex. The expansion rate parameter can be used to expand the size of the simplex beyond the bounds
of the parents. For example, the figure below shows three parent points and the offspring distribution,
clearly filling an expanded triangular simplex.
References:
- Tsutsui, S., Yamamura, M., and Higuchi, T., "Multi-parent Recombination with Simplex Crossover in Real Coded Genetic Algorithms," Proceedings of the Genetic and Evolutionary Computation Conference, vol. 1, pp. 657-664, 1999.
- Higuchi, T., Tsutsui, S., and Yamamura, M., "Theoretical Analysis of Simplex Crossover for Real-Coded Genetic Algorithms," Parallel Problem Solving from Nature PPSN VI, pp. 365-374, 2000.
-
Field Summary
Fields inherited from class org.moeaframework.core.operator.real.MultiParentVariation
numberOfOffspring, numberOfParents
-
Constructor Summary
ConstructorDescriptionSPX()
Constructs a SPX operator with default settings, taking 10 parents and producing 2 offspring.SPX
(int numberOfParents, int numberOfOffspring) Constructs a SPX operator with the specified number of parents and number of offspring.SPX
(int numberOfParents, int numberOfOffspring, double epsilon) Constructs a simplex operator with the specified number of parents, number of offspring, and expansion rate. -
Method Summary
Modifier and TypeMethodDescriptionSolution[]
Evolves one or more parent solutions (specified bygetArity
) and produces one or more child solutions.double
Returns the expansion rate of this operator.getName()
Returns the name of this variation operator.void
setEpsilon
(double epsilon) Sets the expansion rate of this operator.Methods inherited from class org.moeaframework.core.operator.real.MultiParentVariation
getArity, getNumberOfOffspring, getNumberOfParents, setNumberOfOffspring, setNumberOfParents
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
-
SPX
public SPX()Constructs a SPX operator with default settings, taking 10 parents and producing 2 offspring. The expansion rate is set tosqrt(numberOfParents+1)
to preserve the covariance matrix of the population. -
SPX
public SPX(int numberOfParents, int numberOfOffspring) Constructs a SPX operator with the specified number of parents and number of offspring. The expansion rate is set tosqrt(numberOfParents+1)
to preserve the covariance matrix of the population.- Parameters:
numberOfParents
- the number of parentsnumberOfOffspring
- the number of offspring
-
SPX
public SPX(int numberOfParents, int numberOfOffspring, double epsilon) Constructs a simplex operator with the specified number of parents, number of offspring, and expansion rate.- Parameters:
numberOfParents
- the number of parentsnumberOfOffspring
- the number of offspringepsilon
- the expansion rate
-
-
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.- Returns:
- the name of this variation operator
-
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.- Parameters:
parents
- the array of parent solutions- Returns:
- an array of child solutions
-
getEpsilon
public double getEpsilon()Returns the expansion rate of this operator.- Returns:
- the expansion rate
-
setEpsilon
public void setEpsilon(double epsilon) Sets the expansion rate of this operator. The recommended default issqrt(numberOfParents+1)
.- Parameters:
epsilon
- the expansion rate
-