MOEA Framework 2.12
API Specification

org.moeaframework.core.comparator
Class EpsilonBoxObjectiveComparator

java.lang.Object
  extended by org.moeaframework.core.comparator.EpsilonBoxObjectiveComparator
All Implemented Interfaces:
Serializable, DominanceComparator
Direct Known Subclasses:
EpsilonBoxDominanceComparator

public class EpsilonBoxObjectiveComparator
extends Object
implements DominanceComparator, Serializable

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:

  1. Laumanns et al. "Combining Convergence and Diversity in Evolutionary Multi-Objective Optimization." Evolutionary Computation. 10(3). 2002
  2. Deb et al. "A Fast Multi-Objective Evolutionary Algorithm for Finding Well-Spread Pareto-Optimal Solutions." KanGAL Report No 2003002. Feb 2003.

See Also:
Serialized Form

Field Summary
protected  double[] epsilons
          The ε values used by this comparator.
protected  boolean isSameBox
          true if the the two solutions passed to the previous invocation of compare existed within the same ε-box; false otherwise.
 
Constructor Summary
EpsilonBoxObjectiveComparator(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.
 
Method Summary
 int compare(Solution solution1, Solution solution2)
          Compares the two solutions using the additive ε-box dominance relation.
 double getEpsilon(int objective)
          Returns the ε value used by this comparator for the specified objective.
 int getNumberOfDefinedEpsilons()
          Returns the number of defined ε values.
 boolean isSameBox()
          Returns true if the the two solutions passed to the previous invocation of compare existed within the same ε-box; false otherwise.
protected  void setSameBox(boolean isSameBox)
          Set to true if the the two solutions passed to the previous invocation of compare existed within the same ε-box; false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isSameBox

protected boolean isSameBox
true if the the two solutions passed to the previous invocation of compare existed within the same ε-box; false otherwise.


epsilons

protected final double[] epsilons
The ε values used by this comparator.

Constructor Detail

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
Method Detail

isSameBox

public boolean isSameBox()
Returns true if the the two solutions passed to the previous invocation of compare existed within the same ε-box; false otherwise.

Returns:
true if the the two solutions passed to the previous invocation of compare existed within the same ε-box; false otherwise.

setSameBox

protected void setSameBox(boolean isSameBox)
Set to true if the the two solutions passed to the previous invocation of compare existed within the same ε-box; false otherwise.

Parameters:
isSameBox - true if the the two solutions passed to the previous invocation of compare existed within the same ε-box; false otherwise.

getEpsilon

public double getEpsilon(int objective)
Returns the ε value used by this comparator for the specified objective. For cases where (objective >= epsilons.length), the last ε value in this array is used (epsilons[epsilons.length-1]).

Returns:
the ε value used by this comparator for the specified objective

getNumberOfDefinedEpsilons

public int getNumberOfDefinedEpsilons()
Returns the number of defined ε values. If getEpsilon is invoked with an index larger than the number of defined εs, the value of the last defined ε is returned.

Returns:
the number of defined ε values

compare

public int compare(Solution solution1,
                   Solution solution2)
Compares the two solutions using the additive ε-box dominance relation.

Specified by:
compare in interface DominanceComparator
Parameters:
solution1 - the first solution
solution2 - the second solution
Returns:
-1 if solution1 dominates solution2, 1 if solution2 dominates solution1, and 0 if the solutions are non-dominated

MOEA Framework 2.12
API Specification

Copyright 2009-2016 MOEA Framework. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage. Visit us on Github!