public class Hypervolume
extends java.lang.Object
implements org.opt4j.core.common.archive.FrontDensityIndicator
Hypervolume
, see "Zitzler, E., and Thiele, L. (1998):
Multiobjective Optimization Using Evolutionary Algorithms - A Comparative
Case Study. Parallel Problem Solving from Nature (PPSN-V), 292-301." 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 value (default 1) is added to each dimension.SMSModule
Modifier and Type | Field and Description |
---|---|
protected double |
offset |
Constructor and Description |
---|
Hypervolume(double offset)
Constructs a
Hypervolume . |
Modifier and Type | Method and Description |
---|---|
protected double |
calculateHypervolume(java.util.List<double[]> front,
int nObjectives)
Implements the
Hypervolume calculations as proposed by Zitzler,
E., and Thiele, L. (1998). |
protected java.util.Map<org.opt4j.core.Individual,java.lang.Double> |
calculateHypervolumeContribution2D(java.util.List<org.opt4j.core.Individual> individuals,
double offset)
Calculates the
Hypervolume contribution for two dimensions. |
protected java.util.Map<org.opt4j.core.Individual,java.lang.Double> |
calculateHypervolumeContributionN(java.util.List<org.opt4j.core.Individual> individuals,
double offset)
Calculates the
Hypervolume contribution for n dimensions. |
protected boolean |
dominates(double[] p1,
double[] p2,
int nObjectives) |
protected java.util.List<double[]> |
filterNondominatedSet(java.util.List<double[]> front,
int nObjectives) |
java.util.Map<org.opt4j.core.Individual,java.lang.Double> |
getDensityValues(java.util.Collection<org.opt4j.core.Individual> individuals) |
protected java.util.Map<org.opt4j.core.Individual,java.lang.Double> |
getDensityValues(java.util.Collection<org.opt4j.core.Individual> individuals,
double offset)
Calculates the density values for a front of non-dominated individuals
based on the contribution of the
Hypervolume . |
protected java.util.List<double[]> |
getMinValues(java.util.List<org.opt4j.core.Individual> individuals)
Transforms the non-dominated
Individual s to a front where each
objective is to be minimized. |
protected java.util.List<double[]> |
invert(java.util.List<double[]> front,
double offset)
Inverts (from a minimization to a maximization problem) a front of
solutions and adds an offset value to each dimension.
|
protected java.util.List<double[]> |
normalize(java.util.List<double[]> front)
Normalizes a front of non-dominated solutions to values between 0 and 1.
|
protected java.util.List<double[]> |
reduceNondominatedSet(java.util.List<double[]> front,
int objective,
double threshold) |
protected double |
surfaceUnchangedTo(java.util.List<double[]> front,
int objective) |
@Inject public Hypervolume(double offset)
Hypervolume
.offset
- the offset that is added to each dimension before the
hypervolume is calculatedpublic java.util.Map<org.opt4j.core.Individual,java.lang.Double> getDensityValues(java.util.Collection<org.opt4j.core.Individual> individuals)
getDensityValues
in interface org.opt4j.core.common.archive.FrontDensityIndicator
protected java.util.Map<org.opt4j.core.Individual,java.lang.Double> getDensityValues(java.util.Collection<org.opt4j.core.Individual> individuals, double offset)
Hypervolume
.
A special approach for two dimension exists as well as a general approach
for n dimensions.individuals
- the individualsoffset
- the offsetprotected java.util.Map<org.opt4j.core.Individual,java.lang.Double> calculateHypervolumeContributionN(java.util.List<org.opt4j.core.Individual> individuals, double offset)
Hypervolume
contribution for n dimensions.individuals
- the individualsoffset
- the offsetprotected java.util.Map<org.opt4j.core.Individual,java.lang.Double> calculateHypervolumeContribution2D(java.util.List<org.opt4j.core.Individual> individuals, double offset)
Hypervolume
contribution for two dimensions.individuals
- the individualsoffset
- the offsetprotected java.util.List<double[]> getMinValues(java.util.List<org.opt4j.core.Individual> individuals)
Individual
s to a front where each
objective is to be minimized.individuals
- the individualsprotected java.util.List<double[]> normalize(java.util.List<double[]> front)
front
- the front of non-dominated solutionsprotected java.util.List<double[]> invert(java.util.List<double[]> front, double offset)
front
- the front of non-dominated solutionsoffset
- the offsetprotected double calculateHypervolume(java.util.List<double[]> front, int nObjectives)
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.front
- the front of non-dominated solutionsnObjectives
- the number of objectivesprotected java.util.List<double[]> filterNondominatedSet(java.util.List<double[]> front, int nObjectives)
protected boolean dominates(double[] p1, double[] p2, int nObjectives)
protected double surfaceUnchangedTo(java.util.List<double[]> front, int objective)
protected java.util.List<double[]> reduceNondominatedSet(java.util.List<double[]> front, int objective, double threshold)