Class NativeHypervolume

java.lang.Object
org.moeaframework.core.indicator.NormalizedIndicator
org.moeaframework.core.indicator.NativeHypervolume
All Implemented Interfaces:
Indicator

public class NativeHypervolume extends NormalizedIndicator
Calculates hypervolume using a compiled executable. This originally was intended to allow use of faster, natively compiled codes. However, today the MOEA Framework's default hypervolume code is sufficient for most purposes.

If this feature is still required, it can be configured by setting the Settings.KEY_HYPERVOLUME system property or in "moeaframework.properties". This setting specifies the command line for running the executable. The command can be customized using the following substitutions:

  • {0} number of objectives
  • {1} approximation set size
  • {2} file containing the approximation set
  • {3} file containing the reference point
  • {4} the reference point, separated by spaces
Note: To avoid unnecessarily writing files, the command is first checked if the above arguments are specified. Use the exact argument string as shown above (e.g., {3}) in the command.
  • Constructor Details

    • NativeHypervolume

      public NativeHypervolume(Problem problem, NondominatedPopulation referenceSet)
      Constructs a hypervolume evaluator for the specified problem and reference set. See DefaultNormalizer for details on configuring normalization.
      Parameters:
      problem - the problem
      referenceSet - the reference set
    • NativeHypervolume

      public NativeHypervolume(Problem problem, Normalizer normalizer)
      Constructs a hypervolume evaluator for the specified problem using the given minimum and maximum bounds.
      Parameters:
      problem - the problem
      normalizer - a user-provided normalizer
  • Method Details

    • invert

      protected static void invert(Problem problem, Solution solution)
      Inverts the objective values since this hypervolume algorithm operates on maximization problems.
      Parameters:
      problem - the problem
      solution - the solution to be inverted
    • evaluate

      public double evaluate(NondominatedPopulation approximationSet)
      Description copied from interface: Indicator
      Returns the value of this unary quality indicator given the specified non-dominated population.
      Parameters:
      approximationSet - the non-dominated population to be evaluated
      Returns:
      the value of this quality indicator given the specified non-dominated population
    • invokeNativeHypervolume

      protected static double invokeNativeHypervolume(Problem problem, Population population, boolean isInverted)
      Generates the input files and calls the executable to calculate hypervolume.
      Parameters:
      problem - the problem
      population - the normalized and possibly inverted solutions
      isInverted - true if the solutions are inverted; false otherwise
      Returns:
      the hypervolume value