Package org.opt4j.optimizer.ea
Class Hypervolume
java.lang.Object
org.opt4j.optimizer.ea.Hypervolume
- All Implemented Interfaces:
FrontDensityIndicator
The
Hypervolume
is a FrontDensityIndicator
based on
determination of the hypervolume contribution. The calculation is based on a
normalization between 0 and 1 in each dimension and a transformation to a
maximization problem. Additionally an offset values (default 1) is added to
each dimension.- See Also:
-
SMSModule
- "Zitzler, E., and Thiele, L. (1998): Multiobjective Optimization Using Evolutionary Algorithms - A Comparative Case Study. Parallel Problem Solving from Nature (PPSN-V), 292-301."
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected double
calculateHypervolume
(List<double[]> front, int nObjectives) Implements the hypervolume calculations as proposed by Zitzler, E., and Thiele, L.protected Map<Individual,
Double> calculateHypervolumeContribution2D
(List<Individual> individuals, double offset) Calculates the hypervolume contribution for two dimensions.protected Map<Individual,
Double> calculateHypervolumeContributionN
(List<Individual> individuals, double offset) Calculates the hypervolume contribution for n dimensions.protected boolean
dominates
(double[] p1, double[] p2, int nObjectives) protected List<double[]>
filterNondominatedSet
(List<double[]> front, int nObjectives) getDensityValues
(Collection<Individual> individuals) Returns the density values for a collection onIndividuals
.protected Map<Individual,
Double> getDensityValues
(Collection<Individual> individuals, double offset) Calculates the density values for a front of non-dominated individuals based on the contribution of the hypervolume.protected List<double[]>
getMinValues
(List<Individual> individuals) Transforms the non-dominated individuals to a front where each objective is to be minimized.protected List<double[]>
Inverts (from a minimization to a maximization problem) a front of solutions and adds an offset value to each dimension.protected List<double[]>
Normalizes a front of non-dominated solutions to values between 0 and 1.protected List<double[]>
reduceNondominatedSet
(List<double[]> front, int objective, double threshold) protected double
surfaceUnchangedTo
(List<double[]> front, int objective)
-
Field Details
-
offset
protected final double offset
-
-
Constructor Details
-
Hypervolume
@Inject public Hypervolume(double offset) Constructs aHypervolume
.- Parameters:
offset
- the offset that is added to each dimension before the hypervolume is calculated
-
-
Method Details
-
getDensityValues
Description copied from interface:FrontDensityIndicator
Returns the density values for a collection onIndividuals
.- Specified by:
getDensityValues
in interfaceFrontDensityIndicator
- Parameters:
individuals
- the individuals- Returns:
- a map of each individual to its density value
-
getDensityValues
protected Map<Individual,Double> getDensityValues(Collection<Individual> individuals, double offset) Calculates the density values for a front of non-dominated individuals based on the contribution of the hypervolume. A special approach for two dimension exists as well as a general approach for n dimensions.- Parameters:
individuals
- the individualsoffset
- the offset- Returns:
- the map of density values
-
calculateHypervolumeContributionN
protected Map<Individual,Double> calculateHypervolumeContributionN(List<Individual> individuals, double offset) Calculates the hypervolume contribution for n dimensions.- Parameters:
individuals
- the individualsoffset
- the offset- Returns:
- the map of density values
-
calculateHypervolumeContribution2D
protected Map<Individual,Double> calculateHypervolumeContribution2D(List<Individual> individuals, double offset) Calculates the hypervolume contribution for two dimensions.- Parameters:
individuals
- the individualsoffset
- the offset- Returns:
- the map of density values
-
getMinValues
Transforms the non-dominated individuals to a front where each objective is to be minimized.- Parameters:
individuals
- the individuals- Returns:
- the front of vectors that is minimized
-
normalize
Normalizes a front of non-dominated solutions to values between 0 and 1.- Parameters:
front
- the front of non-dominated solutions- Returns:
- the normalized front
-
invert
Inverts (from a minimization to a maximization problem) a front of solutions and adds an offset value to each dimension.- Parameters:
front
- the front of non-dominated solutionsoffset
- the offset- Returns:
- the inverted front
-
calculateHypervolume
Implements the hypervolume calculations as proposed by Zitzler, E., and Thiele, L. (1998). All points have positive values in all dimensions and the hypervolume is calculated from 0.- Parameters:
front
- the front of non-dominated solutionsnObjectives
- the number of objectives- Returns:
- the hypervolume
-
filterNondominatedSet
-
dominates
protected boolean dominates(double[] p1, double[] p2, int nObjectives) -
surfaceUnchangedTo
-
reduceNondominatedSet
-