Class EpsilonBoxObjectiveComparator

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

public class EpsilonBoxObjectiveComparator extends Object implements DominanceComparator
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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Epsilons
    The ε values used by this comparator.
    protected boolean
    true if the the two solutions passed to the previous invocation of compare existed within the same ε-box; false otherwise.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an additive ε-box dominance comparator with the specified ε value.
    EpsilonBoxObjectiveComparator(double[] epsilons)
    Constructs an additive ε-box dominance comparator with the specified ε values.
    Constructs an additive ε-box dominance comparator with the specified ε values.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compare(Solution solution1, Solution solution2)
    Compares the two solutions using the additive ε-box dominance relation.
    Returns the ε values in use by this comparator.
    boolean
    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 Details

    • 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 Epsilons 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

      public EpsilonBoxObjectiveComparator(Epsilons epsilons)
      Constructs an additive ε-box dominance comparator with the specified ε values.
      Parameters:
      epsilons - the ε values used by this comparator
  • Method Details

    • 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.
    • getEpsilons

      public Epsilons getEpsilons()
      Returns the ε values in use by this comparator.
      Returns:
      the ε 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