Class EpsilonBoxObjectiveComparator
java.lang.Object
org.moeaframework.core.comparator.EpsilonBoxObjectiveComparator
- All Implemented Interfaces:
DominanceComparator
- Direct Known Subclasses:
EpsilonBoxDominanceComparator
Compares two solutions using the additive ε-box objective comparator. This dominance relation divides
objective space into boxes with side-length ε and specifies that only one solution may exist within the
same box. If two solutions were to reside in the same box, the solution closer to the box's minimum corner.
In general, the EpsilonBoxDominanceComparator should be used instead as it also incorporates constraint
violation checks.
References:
- Laumanns et al. "Combining Convergence and Diversity in Evolutionary Multi-Objective Optimization." Evolutionary Computation. 10(3). 2002
- Deb et al. "A Fast Multi-Objective Evolutionary Algorithm for Finding Well-Spread Pareto-Optimal Solutions." KanGAL Report No 2003002. Feb 2003.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEpsilonBoxObjectiveComparator(double epsilon) Constructs an additive ε-box dominance comparator with the specified ε value.EpsilonBoxObjectiveComparator(double[] epsilons) Constructs an additive ε-box dominance comparator with the specified ε values.EpsilonBoxObjectiveComparator(Epsilons epsilons) Constructs an additive ε-box dominance comparator with the specified ε values. -
Method Summary
Modifier and TypeMethodDescriptionintCompares the two solutions using the additive ε-box dominance relation.Returns the ε values in use by this comparator.booleanReturnstrueif the the two solutions passed to the previous invocation ofcompareexisted within the same ε-box;falseotherwise.protected voidsetSameBox(boolean isSameBox) Set totrueif the the two solutions passed to the previous invocation ofcompareexisted within the same ε-box;falseotherwise.
-
Field Details
-
isSameBox
protected boolean isSameBoxtrueif the the two solutions passed to the previous invocation ofcompareexisted within the same ε-box;falseotherwise. -
epsilons
The ε values used by this comparator.
-
-
Constructor Details
-
EpsilonBoxObjectiveComparator
public EpsilonBoxObjectiveComparator(double epsilon) Constructs an additive ε-box dominance comparator with the specified ε value.- Parameters:
epsilon- the ε value used by this comparator
-
EpsilonBoxObjectiveComparator
public EpsilonBoxObjectiveComparator(double[] epsilons) Constructs an additive ε-box dominance comparator with the specified ε values.- Parameters:
epsilons- the ε values used by this comparator
-
EpsilonBoxObjectiveComparator
Constructs an additive ε-box dominance comparator with the specified ε values.- Parameters:
epsilons- the ε values used by this comparator
-
-
Method Details
-
isSameBox
public boolean isSameBox()Returnstrueif the the two solutions passed to the previous invocation ofcompareexisted within the same ε-box;falseotherwise.- Returns:
trueif the the two solutions passed to the previous invocation ofcompareexisted within the same ε-box;falseotherwise.
-
setSameBox
protected void setSameBox(boolean isSameBox) Set totrueif the the two solutions passed to the previous invocation ofcompareexisted within the same ε-box;falseotherwise.- Parameters:
isSameBox-trueif the the two solutions passed to the previous invocation ofcompareexisted within the same ε-box;falseotherwise.
-
getEpsilons
Returns the ε values in use by this comparator.- Returns:
- the ε values
-
compare
Compares the two solutions using the additive ε-box dominance relation.- Specified by:
comparein interfaceDominanceComparator- Parameters:
solution1- the first solutionsolution2- the second solution- Returns:
-1ifsolution1dominatessolution2,1ifsolution2dominatessolution1, and0if the solutions are non-dominated
-