Class Hypervolume

  • All Implemented Interfaces:
    FrontDensityIndicator

    public class Hypervolume
    extends Object
    implements 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 Detail

      • offset

        protected final double offset
    • Constructor Detail

      • Hypervolume

        @Inject
        public Hypervolume​(double offset)
        Constructs a Hypervolume.
        Parameters:
        offset - the offset that is added to each dimension before the hypervolume is calculated
    • Method Detail

      • 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 individuals
        offset - 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 individuals
        offset - 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 individuals
        offset - the offset
        Returns:
        the map of density values
      • getMinValues

        protected List<double[]> getMinValues​(List<Individual> individuals)
        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

        protected List<double[]> normalize​(List<double[]> front)
        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

        protected List<double[]> invert​(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.
        Parameters:
        front - the front of non-dominated solutions
        offset - the offset
        Returns:
        the inverted front
      • calculateHypervolume

        protected double calculateHypervolume​(List<double[]> front,
                                              int nObjectives)
        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 solutions
        nObjectives - the number of objectives
        Returns:
        the hypervolume
      • filterNondominatedSet

        protected List<double[]> filterNondominatedSet​(List<double[]> front,
                                                       int nObjectives)
      • dominates

        protected boolean dominates​(double[] p1,
                                    double[] p2,
                                    int nObjectives)
      • surfaceUnchangedTo

        protected double surfaceUnchangedTo​(List<double[]> front,
                                            int objective)
      • reduceNondominatedSet

        protected List<double[]> reduceNondominatedSet​(List<double[]> front,
                                                       int objective,
                                                       double threshold)