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
-
Constructor Summary
ConstructorDescriptionEpsilonBoxObjectiveComparator
(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 TypeMethodDescriptionint
Compares the two solutions using the additive ε-box dominance relation.Returns the ε values in use by this comparator.boolean
Returnstrue
if the the two solutions passed to the previous invocation ofcompare
existed within the same ε-box;false
otherwise.protected void
setSameBox
(boolean isSameBox) Set totrue
if the the two solutions passed to the previous invocation ofcompare
existed within the same ε-box;false
otherwise.
-
Field Details
-
isSameBox
protected boolean isSameBoxtrue
if the the two solutions passed to the previous invocation ofcompare
existed within the same ε-box;false
otherwise. -
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()Returnstrue
if the the two solutions passed to the previous invocation ofcompare
existed within the same ε-box;false
otherwise.- Returns:
true
if the the two solutions passed to the previous invocation ofcompare
existed within the same ε-box;false
otherwise.
-
setSameBox
protected void setSameBox(boolean isSameBox) Set totrue
if the the two solutions passed to the previous invocation ofcompare
existed within the same ε-box;false
otherwise.- Parameters:
isSameBox
-true
if the the two solutions passed to the previous invocation ofcompare
existed within the same ε-box;false
otherwise.
-
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:
compare
in interfaceDominanceComparator
- Parameters:
solution1
- the first solutionsolution2
- the second solution- Returns:
-1
ifsolution1
dominatessolution2
,1
ifsolution2
dominatessolution1
, and0
if the solutions are non-dominated
-