Class DefaultEpsilons

java.lang.Object
org.moeaframework.analysis.DefaultEpsilons
All Implemented Interfaces:
Displayable, Formattable<Map.Entry<String,Epsilons>>

public class DefaultEpsilons extends Object implements Formattable<Map.Entry<String,Epsilons>>
Provides ε values for algorithms and archives using ε-dominance. The search order is:
  1. Epsilons configured by the user by calling override(org.moeaframework.core.Problem, org.moeaframework.core.Epsilons)
  2. Epsilons configured by the user in the properties file "moeaframework.properties"
  3. Epsilons defined by the problem provider (i.e., our recommended defaults)
  4. The global default of DEFAULT
  • Field Details

    • DEFAULT

      public static final Epsilons DEFAULT
      The default ε value that is returned for any problem without an explicitly configured value.
  • Method Details

    • getInstance

      public static DefaultEpsilons getInstance()
      Returns the default ε provider.
      Returns:
      the default ε provider
    • setInstance

      public static void setInstance(DefaultEpsilons instance)
      Sets the default ε provider.
      Parameters:
      instance - default ε provider
    • clearOverrides

      public void clearOverrides()
      Clears any overrides.
    • getEpsilons

      public Epsilons getEpsilons(Problem problem)
      Returns the default ε values for the given problem. If the problem is not recognized, the default ε value of DEFAULT is returned.
      Parameters:
      problem - the problem
      Returns:
      the ε values
    • getEpsilons

      public Epsilons getEpsilons(String problemName)
      Returns the default ε values for the given problem. If the problem is not recognized, the default ε value of DEFAULT is returned.
      Parameters:
      problemName - the problem name
      Returns:
      the ε values
    • findOverride

      protected Epsilons findOverride(String problemName)
      Finds the overridden ε values for the given problem, either one set by calling override(org.moeaframework.core.Problem, org.moeaframework.core.Epsilons) or from Settings.getProblemSpecificEpsilons(String).
      Parameters:
      problemName - the problem name
      Returns:
      the ε values, or null if no match was found
    • override

      public void override(Problem problem, Epsilons epsilons)
      Overrides the ε value for the given problem. This expects the problem name to uniquely determine the ε values, typically implying problems with varying numbers of objectives provide distinct names.
      Parameters:
      problem - the problem
      epsilons - the ε values
    • override

      public void override(String problemName, Epsilons epsilons)
      Overrides the ε value for the given problem name. This expects the problem name to uniquely determine the ε values, typically implying problems with varying numbers of objectives provide distinct names.
      Parameters:
      problemName - the problem name
      epsilons - the ε values
    • asTabularData

      public TabularData<Map.Entry<String,Epsilons>> asTabularData()
      Description copied from interface: Formattable
      Returns the contents of this object as a TabularData instance, which can be used to save, print, or format the data in various ways.
      Specified by:
      asTabularData in interface Formattable<Map.Entry<String,Epsilons>>
      Returns:
      the TabularData instance