Package org.moeaframework.core.fitness
Class HypervolumeFitnessEvaluator
java.lang.Object
org.moeaframework.core.fitness.IndicatorFitnessEvaluator
org.moeaframework.core.fitness.HypervolumeFitnessEvaluator
- All Implemented Interfaces:
FitnessEvaluator
Indicator-based fitness using the hypervolume metric.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleDetermines the reference point for the hypervolume metric. -
Constructor Summary
ConstructorsConstructorDescriptionHypervolumeFitnessEvaluator(Problem problem) Constructs a hypervolume fitness evaluator. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif larger fitness values are preferred; otherwise smaller fitness values are preferred.doublecalculateHypervolume(Solution solution1, Solution solution2, int d) Calculates the hypervolume of the portion of the objective space that is dominated bysolution1but not bysolution2.protected doublecalculateIndicator(Solution solution1, Solution solution2) Returns the indicator value relative to the two solutions.Methods inherited from class org.moeaframework.core.fitness.IndicatorFitnessEvaluator
evaluate, getProblem, removeAndUpdate
-
Field Details
-
RHO
public static final double RHODetermines the reference point for the hypervolume metric. Larger fitness values are worse!- See Also:
-
-
Constructor Details
-
HypervolumeFitnessEvaluator
Constructs a hypervolume fitness evaluator.- Parameters:
problem- the problem
-
-
Method Details
-
calculateIndicator
Description copied from class:IndicatorFitnessEvaluatorReturns the indicator value relative to the two solutions.- Specified by:
calculateIndicatorin classIndicatorFitnessEvaluator- Parameters:
solution1- the first solutionsolution2- the second solution- Returns:
- the indicator value relative to the two solutions
-
calculateHypervolume
Calculates the hypervolume of the portion of the objective space that is dominated bysolution1but not bysolution2.- Parameters:
solution1- the first solutionsolution2- the second solutiond- the current objective- Returns:
- the hypervolume of the portion of the objective space that is dominated by
solution1but not bysolution2.
-
areLargerValuesPreferred
public boolean areLargerValuesPreferred()Description copied from interface:FitnessEvaluatorReturnstrueif larger fitness values are preferred; otherwise smaller fitness values are preferred.- Returns:
trueif larger fitness values are preferred; otherwise smaller fitness values are preferred
-