Class PCX
java.lang.Object
org.moeaframework.core.operator.real.MultiParentVariation
org.moeaframework.core.operator.real.PCX
- All Implemented Interfaces:
Configurable
,Variation
Parent-centric crossover (PCX) operator. PCX is a multiparent operator, allowing a user-defined number of parents
and offspring. Offspring are clustered around the parents, as depicted in the figure below.
References:
- Deb, K., Anand, A., and Joshi, D., "A Computationally Efficient Evolutionary Algorithm for Real-Parameter Optimization," Evolutionary Computation, 10(4):371-395, 2002.
-
Field Summary
Fields inherited from class org.moeaframework.core.operator.real.MultiParentVariation
numberOfOffspring, numberOfParents
-
Constructor Summary
ConstructorDescriptionPCX()
Constructs a PCX operator with default settings, taking10
parents and producing2
offspring.PCX
(int numberOfParents, int numberOfOffspring) Constructs a PCX operator with the specified number of parents and offspring.PCX
(int numberOfParents, int numberOfOffspring, double eta, double zeta) Constructs a PCX operator with the specified number of parents and offspring, and the specified values forsigma_eta
andsigma_zeta
. -
Method Summary
Modifier and TypeMethodDescriptionSolution[]
Evolves one or more parent solutions (specified bygetArity
) and produces one or more child solutions.double
getEta()
Returns the standard deviation of the normal distribution controlling the spread of solutions in the direction of the selected parent.getName()
Returns the name of this variation operator.double
getZeta()
Returns the standard deviation of the normal distribution controlling the spread of solutions in the directions defined by the remaining parents.protected Solution
Returns one randomly-generated offspring produced by this operator usingparents[parents.length-1]
as the selected parent.void
setEta
(double eta) Sets the standard deviation of the normal distribution controlling the spread of solutions in the direction of the selected parent.void
setZeta
(double zeta) Sets the standard deviation of the normal distribution controlling the spread of solutions in the directions defined by the remaining parents.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
-
PCX
public PCX()Constructs a PCX operator with default settings, taking10
parents and producing2
offspring. Theeta
andzeta
parameters are set to0.1
, as suggested by Deb et al. (2002). -
PCX
public PCX(int numberOfParents, int numberOfOffspring) Constructs a PCX operator with the specified number of parents and offspring. Theeta
andzeta
parameters are set to0.1
, as suggested by Deb et al. (2002).- Parameters:
numberOfParents
- the number of parents required by this operatornumberOfOffspring
- the number of offspring produced by this operator
-
PCX
public PCX(int numberOfParents, int numberOfOffspring, double eta, double zeta) Constructs a PCX operator with the specified number of parents and offspring, and the specified values forsigma_eta
andsigma_zeta
.- Parameters:
numberOfParents
- the number of parents required by this operatornumberOfOffspring
- the number of offspring produced by this operatoreta
- the standard deviation of the normal distribution controlling the spread of solutions in the direction of the selected parentzeta
- the standard deviation of the normal distribution controlling the spread of solutions in the directions defined by the remaining parents
-
-
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
-
getEta
public double getEta()Returns the standard deviation of the normal distribution controlling the spread of solutions in the direction of the selected parent.- Returns:
- the standard deviation value
-
setEta
public void setEta(double eta) Sets the standard deviation of the normal distribution controlling the spread of solutions in the direction of the selected parent. The default value is0.1
.- Parameters:
eta
- the standard deviation value
-
getZeta
public double getZeta()Returns the standard deviation of the normal distribution controlling the spread of solutions in the directions defined by the remaining parents.- Returns:
- the standard deviation value
-
setZeta
public void setZeta(double zeta) Sets the standard deviation of the normal distribution controlling the spread of solutions in the directions defined by the remaining parents. The default value is0.1
.- Parameters:
zeta
- the standard deviation value
-
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
-
pcx
Returns one randomly-generated offspring produced by this operator usingparents[parents.length-1]
as the selected parent. Multiple invocations of this method with the same argument will produce offspring distributed about the selected parent.- Parameters:
parents
- the parent solutions- Returns:
- one randomly-generated offspring produced by this operator using
parents[parents.length-1]
as the selected parent
-