|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.moeaframework.core.spi.OperatorFactory
public class OperatorFactory
Factory for creating operator instances. The table below shows the supported
operators. The name and properties columns show the values accepted by
getVariation(String, Properties, Problem).
| Operator | Type | Name | Properties |
|---|---|---|---|
SBX |
Real | sbx |
sbx.rate, sbx.distributionIndex |
PM |
Real | pm |
pm.rate, pm.distributionIndex |
UM |
Real | um |
um.rate |
DifferentialEvolution |
Real | de |
de.crossoverRate, de.stepSize |
PCX |
Real | pcx |
pcx.parents, pcx.offspring, pcx.eta, pcx.zeta |
SPX |
Real | spx |
spx.parents, spx.offspring, spx.epsilon |
UNDX |
Real | undx |
undx.parents, undx.offspring, undx.eta, undx.zeta |
AdaptiveMetropolis |
Real | am |
am.parents, am.offspring, am.coefficient |
HUX |
Binary | hux |
hux.rate |
BitFlip |
Binary | bf |
bf.rate |
PMX |
Permutation | pmx |
pmx.rate |
Insertion |
Permutation | insertion |
insertion.rate |
Swap |
Permutation | swap |
swap.rate |
GrammarCrossover |
Grammar | gx |
gx.rate |
GrammarMutation |
Grammar | gm |
gm.rate |
SubtreeCrossover |
Program | bx |
bx.rate |
PointMutation |
Program | ptm |
ptm.rate |
OnePointCrossover |
Any | 1x |
1x.rate |
TwoPointCrossover |
Any | 2x |
2x.rate |
UniformCrossover |
Any | ux |
ux.rate |
Operators can be combined by joining the two operator names with the plus
sign, such as "sbx+pm". Not all operators can be joined this way.
See CompoundVariation for the restrictions.
This class is thread safe.
| Constructor Summary | |
|---|---|
OperatorFactory()
Constructs a new operator factory. |
|
| Method Summary | |
|---|---|
String |
getDefaultMutation(Problem problem)
Returns the name of the default mutation operator for the given problem. |
String |
getDefaultVariation(Problem problem)
Returns the name of the default variation operator (e.g., crossover with mutation) for the given problem. |
static OperatorFactory |
getInstance()
Returns the default operator factory. |
Variation |
getVariation(String name,
Properties properties,
Problem problem)
Equivalent to calling getVariation(String, TypedProperties, Problem). |
Variation |
getVariation(String name,
TypedProperties properties,
Problem problem)
Returns an instance of the variation operator with the specified name. |
static void |
setInstance(OperatorFactory instance)
Sets the default operator factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OperatorFactory()
| Method Detail |
|---|
public static OperatorFactory getInstance()
public static void setInstance(OperatorFactory instance)
instance - the default operator factorypublic String getDefaultMutation(Problem problem)
problem - the problem
ProviderNotFoundException - if no default mutation operator could
be determinedpublic String getDefaultVariation(Problem problem)
problem - the problem
ProviderNotFoundException - if no default variation operator could
be determined
public Variation getVariation(String name,
Properties properties,
Problem problem)
getVariation(String, TypedProperties, Problem).
name - the name identifying the variation operatorproperties - the implementation-specific propertiesproblem - the problem to be solved
ProviderNotFoundException - if no provider for the algorithm is
available
public Variation getVariation(String name,
TypedProperties properties,
Problem problem)
ProviderNotFoundException if no
suitable operator is found. If name is null, the factory should
return a default variation operator appropriate for the problem.
name - the name identifying the variation operatorproperties - the implementation-specific propertiesproblem - the problem to be solved
ProviderNotFoundException - if no provider for the algorithm is
available
|
MOEA Framework 2.5 API Specification |
|||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||