Package org.moeaframework.core.indicator
Class NativeHypervolume
java.lang.Object
org.moeaframework.core.indicator.NormalizedIndicator
org.moeaframework.core.indicator.NativeHypervolume
- All Implemented Interfaces:
Indicator
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
{3}
) in the command.-
Field Summary
Fields inherited from class org.moeaframework.core.indicator.NormalizedIndicator
problem
-
Constructor Summary
ConstructorDescriptionNativeHypervolume
(Problem problem, Normalizer normalizer) Constructs a hypervolume evaluator for the specified problem using the given minimum and maximum bounds.NativeHypervolume
(Problem problem, NondominatedPopulation referenceSet) Constructs a hypervolume evaluator for the specified problem and reference set. -
Method Summary
Modifier and TypeMethodDescriptiondouble
evaluate
(NondominatedPopulation approximationSet) Returns the value of this unary quality indicator given the specified non-dominated population.protected static void
Inverts the objective values since this hypervolume algorithm operates on maximization problems.protected static double
invokeNativeHypervolume
(Problem problem, Population population, boolean isInverted) Generates the input files and calls the executable to calculate hypervolume.Methods inherited from class org.moeaframework.core.indicator.NormalizedIndicator
getNormalizedReferenceSet, normalize
-
Constructor Details
-
NativeHypervolume
Constructs a hypervolume evaluator for the specified problem and reference set. SeeDefaultNormalizer
for details on configuring normalization.- Parameters:
problem
- the problemreferenceSet
- the reference set
-
NativeHypervolume
Constructs a hypervolume evaluator for the specified problem using the given minimum and maximum bounds.- Parameters:
problem
- the problemnormalizer
- a user-provided normalizer
-
-
Method Details
-
invert
Inverts the objective values since this hypervolume algorithm operates on maximization problems.- Parameters:
problem
- the problemsolution
- the solution to be inverted
-
evaluate
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 problempopulation
- the normalized and possibly inverted solutionsisInverted
-true
if the solutions are inverted;false
otherwise- Returns:
- the hypervolume value
-