Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Analyzers/HypervolumeAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Analyzers/HypervolumeAnalyzer.cs	(revision 13935)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Analyzers/HypervolumeAnalyzer.cs	(revision 13936)
@@ -29,89 +29,98 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
-namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
-  [StorableClass]
-  [Item("GenerationalDistanceAnalyzer", "Computes the enclosed Hypervolume between the current front and a given reference Point")]
-  public class HypervolumeAnalyzer : MOTFAnalyzer {
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions
+{
+    [StorableClass]
+    [Item("GenerationalDistanceAnalyzer", "Computes the enclosed Hypervolume between the current front and a given reference Point")]
+    public class HypervolumeAnalyzer : MOTFAnalyzer
+    {
+        [StorableHook(HookType.AfterDeserialization)]
+        private void AfterDeserialization()
+        {
+        }
+        [StorableConstructor]
+        protected HypervolumeAnalyzer(bool deserializing) : base(deserializing) { }
+        public HypervolumeAnalyzer(HypervolumeAnalyzer original, Cloner cloner) : base(original, cloner) { }
+        public override IDeepCloneable Clone(Cloner cloner)
+        {
+            return new HypervolumeAnalyzer(this, cloner);
+        }
+
+        public IValueParameter<DoubleArray> ReferencePointParameter
+        {
+            get
+            {
+                return (IValueParameter<DoubleArray>)Parameters["ReferencePoint"];
+            }
+        }
+
+        public IValueParameter<DoubleValue> BestKnownHyperVolumeParameter
+        {
+            get
+            {
+                return (IValueParameter<DoubleValue>)Parameters["BestKnownHyperVolume"];
+            }
+            set
+            {
+                Parameters["BestKnownHyperVolume"].ActualValue = value;
+            }
+        }
+
+        public HypervolumeAnalyzer()
+        {
+            Parameters.Add(new ValueParameter<DoubleArray>("ReferencePoint", "The reference point for hypervolume calculation"));
+            Parameters.Add(new ValueParameter<DoubleValue>("BestKnownHyperVolume", "The currently best known hypervolume"));
+        }
+
+        private void RegisterEventHandlers()
+        {
+            ReferencePointParameter.ValueChanged += ReferencePointParameterOnValueChanged;
+        }
+
+        private void ReferencePointParameterOnValueChanged(object sender, EventArgs e)
+        {
+            BestKnownHyperVolumeParameter.Value = new DoubleValue(0);
+        }
+
+        public override void Analyze(Individual[] individuals, double[][] qualities, ResultCollection results)
+        {
+            if (qualities == null || qualities.Length < 1) return;
+            int objectives = qualities[0].Length;
+            double best = BestKnownHyperVolumeParameter.Value.Value;
+
+            double diff;
+
+            if (!results.ContainsKey("Hypervolume")) results.Add(new Result("Hypervolume", typeof(DoubleValue)));
+            IEnumerable<double[]> front = NonDominatedSelect.selectNonDominatedVectors(qualities, TestFunctionParameter.ActualValue.Maximization(objectives), true);
+            if (!results.ContainsKey("BestKnownHypervolume")) results.Add(new Result("BestKnownHypervolume", typeof(DoubleValue)));
+            else
+            {
+                DoubleValue dv = (DoubleValue)(results["BestKnownHypervolume"].Value);
+                best = dv.Value;
+            }
+            if (!results.ContainsKey("Absolute Distance to BestKnownHypervolume")) results.Add(new Result("Absolute Distance to BestKnownHypervolume", typeof(DoubleValue)));
+
+            double hv = Double.NaN;
+
+            hv = Hypervolume.Calculate(front, TestFunctionParameter.ActualValue.ReferencePoint(objectives), TestFunctionParameter.ActualValue.Maximization(objectives));
+
+
+            if (best < 0)
+            {
+                best = hv;
+            }
+            diff = best - hv;
+            if (!Double.IsNaN(hv) && (diff < 0 || best < 0))
+            {
+                best = hv;
+                diff = 0;
+                BestKnownFrontParameter.ActualValue = new DoubleMatrix(MultiObjectiveTestFunctionProblem.To2D(qualities));
+            }
+
+            results["Hypervolume"].Value = new DoubleValue(hv);
+            results["Absolute Distance to BestKnownHypervolume"].Value = new DoubleValue(diff);
+            results["BestKnownHypervolume"].Value = new DoubleValue(best);
+
+        }
     }
-    [StorableConstructor]
-    protected HypervolumeAnalyzer(bool deserializing) : base(deserializing) { }
-    public HypervolumeAnalyzer(HypervolumeAnalyzer original, Cloner cloner) : base(original, cloner) { }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new HypervolumeAnalyzer(this, cloner);
-    }
-
-    public IValueParameter<DoubleArray> ReferencePointParameter {
-      get {
-        return (IValueParameter<DoubleArray>)Parameters["ReferencePoint"];
-      }
-    }
-
-    public IValueParameter<DoubleValue> BestKnownHyperVolumeParameter {
-      get {
-        return (IValueParameter<DoubleValue>)Parameters["BestKnownHyperVolume"];
-      }
-      set {
-        Parameters["BestKnownHyperVolume"].ActualValue = value;
-      }
-    }
-
-    public HypervolumeAnalyzer() {
-      Parameters.Add(new ValueParameter<DoubleArray>("ReferencePoint", "The reference point for hypervolume calculation"));
-      Parameters.Add(new ValueParameter<DoubleValue>("BestKnownHyperVolume", "The currently best known hypervolume"));
-    }
-
-    private void RegisterEventHandlers() {
-      ReferencePointParameter.ValueChanged += ReferencePointParameterOnValueChanged;
-    }
-
-    private void ReferencePointParameterOnValueChanged(object sender, EventArgs e) {
-      BestKnownHyperVolumeParameter.Value = new DoubleValue(0);
-    }
-
-    public override void Analyze(Individual[] individuals, double[][] qualities, ResultCollection results) {
-      if (qualities == null || qualities.Length < 1) return;
-      int objectives = qualities[0].Length;
-      double best = BestKnownHyperVolumeParameter.Value.Value;
-
-      double diff;
-
-      if (!results.ContainsKey("Hypervolume")) results.Add(new Result("Hypervolume", typeof(DoubleValue)));
-      IEnumerable<double[]> front = NonDominatedSelect.selectNonDominatedVectors(qualities, TestFunctionParameter.ActualValue.Maximization(objectives), true);
-      if (!results.ContainsKey("BestKnownHypervolume")) results.Add(new Result("BestKnownHypervolume", typeof(DoubleValue)));
-      else {
-        DoubleValue dv = (DoubleValue)(results["BestKnownHypervolume"].Value);
-        best = dv.Value;
-      }
-      if (!results.ContainsKey("Absolute Distance to BestKnownHypervolume")) results.Add(new Result("Absolute Distance to BestKnownHypervolume", typeof(DoubleValue)));
-
-      double hv = Double.NaN;
-      try {
-        if (objectives == 2) { //Hypervolume analysis only with 2 objectives for now
-          hv = Hypervolume.Calculate(front, ReferencePointParameter.Value, TestFunctionParameter.ActualValue.Maximization(objectives));
-        } else if (Array.TrueForAll(TestFunctionParameter.ActualValue.Maximization(objectives), x => !x)) {
-          hv = MultiDimensionalHypervolume.Calculate(front, ReferencePointParameter.Value);
-        }
-      }
-      catch (ArgumentException) {
-
-      }
-
-      if (best < 0) {
-        best = hv;
-      }
-      diff = best - hv;
-      if (!Double.IsNaN(hv) && (diff < 0 || best < 0)) {
-        best = hv;
-        diff = 0;
-        BestKnownFrontParameter.ActualValue = new DoubleMatrix(MultiObjectiveTestFunctionProblem.To2D(qualities));
-      }
-
-      results["Hypervolume"].Value = new DoubleValue(hv);
-      results["Absolute Distance to BestKnownHypervolume"].Value = new DoubleValue(diff);
-      results["BestKnownHypervolume"].Value = new DoubleValue(best);
-
-    }
-  }
 }
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Calculators/Crowding.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Calculators/Crowding.cs	(revision 13935)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Calculators/Crowding.cs	(revision 13936)
@@ -24,44 +24,52 @@
 using System.Linq;
 
-namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions
+{
 
-  /// <summary>
-  /// Crowding distance d(x,A) is usually defined between a point x and a set of points A
-  /// d(x,A) is then a weighted sum over all dimensions where for each dimension the next larger and the next smaller Point to x are subtracted
-  /// I extended the concept and defined the Crowding distance of a front A as the mean of the crowding distances of every point x in A 
-  /// C(A) = mean(d(x,A)) where x in A  and d(x,A) is not infinite 
-  /// </summary>
-  public class Crowding {
+    /// <summary>
+    /// Crowding distance d(x,A) is usually defined between a point x and a set of points A
+    /// d(x,A) is then a weighted sum over all dimensions where for each dimension the next larger and the next smaller Point to x are subtracted
+    /// I extended the concept and defined the Crowding distance of a front A as the mean of the crowding distances of every point x in A 
+    /// C(A) = mean(d(x,A)) where x in A  and d(x,A) is not infinite 
+    /// </summary>
+    public class Crowding
+    {
 
-    public static double Calculate(IEnumerable<double[]> front, double[,] bounds) {
-      double sum = 0;
-      int c = 0;
-      double[] pointsums = new double[front.Count()];
+        public static double Calculate(IEnumerable<double[]> front, double[,] bounds)
+        {
+            double sum = 0;
+            int c = 0;
+            double[] pointsums = new double[front.Count()];
 
-      for (int dim = 0; dim < bounds.GetLength(0); dim++) {
-        double[] arr = front.Select(x => x[dim]).ToArray();
-        Array.Sort(arr);
-        double fmax = bounds[dim % bounds.GetLength(0), 1];
-        double fmin = bounds[dim % bounds.GetLength(0), 0];
-        int pointIdx = 0;
-        foreach (double[] point in front) {
-          double d = 0;
-          int pos = Array.BinarySearch(arr, point[dim]);
-          if (pos != 0 && pos != arr.Count() - 1) {
-            d = (arr[pos + 1] - arr[pos - 1]) / (fmax - fmin);
-            pointsums[pointIdx++] += d;
-          }
+            for (int dim = 0; dim < front.First().Length; dim++)
+            {
+                double[] arr = front.Select(x => x[dim]).ToArray();
+                Array.Sort(arr);
+                double fmax = bounds[dim % bounds.GetLength(0), 1];
+                double fmin = bounds[dim % bounds.GetLength(0), 0];
+                int pointIdx = 0;
+                foreach (double[] point in front)
+                {
+                    double d = 0;
+                    int pos = Array.BinarySearch(arr, point[dim]);
+                    if (pos != 0 && pos != arr.Count() - 1)
+                    {
+                        d = (arr[pos + 1] - arr[pos - 1]) / (fmax - fmin);
+                        pointsums[pointIdx++] += d;
+                    }
+                }
+            }
+
+            foreach (double d in pointsums)
+            {
+                if (!Double.IsInfinity(d))
+                {
+                    sum += d;
+                    c++;
+                }
+            }
+            return c == 0 ? Double.PositiveInfinity : sum / c;
         }
-      }
 
-      foreach (double d in pointsums) {
-        if (!Double.IsInfinity(d)) {
-          sum += d;
-          c++;
-        }
-      }
-      return c == 0 ? Double.PositiveInfinity : sum / c;
     }
-
-  }
 }
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Calculators/HyperVolume.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Calculators/HyperVolume.cs	(revision 13935)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Calculators/HyperVolume.cs	(revision 13936)
@@ -19,63 +19,360 @@
  */
 #endregion
+using HeuristicLab.Common;
 using System;
 using System.Collections.Generic;
 using System.Linq;
 
-namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
-
-  public class Hypervolume {
-
-    /// <summary>
-    /// The Hyprevolume-metric is defined as the Hypervolume enclosed between a given reference point,
-    /// that is fixed for every evaluation function and the evaluated front.
-    /// 
-    /// Example:
-    /// r is the reference Point at (1|1)  and every Point p is part of the evaluated front
-    /// The filled Area labled HV is the 2 diensional Hypervolume enclosed by this front. 
-    /// 
-    /// (0|1)                (1|1)
-    ///   +      +-------------r
-    ///   |      |###### HV ###|
-    ///   |      p------+######|
-    ///   |             p+#####|
-    ///   |              |#####|
-    ///   |              p-+###|
-    ///   |                p---+
-    ///   |                 
-    ///   +--------------------1
-    /// (0|0)                (1|0)
-    /// 
-    ///  Please note that in this example both dimensions are minimized. The reference Point need to be dominated by EVERY point in the evaluated front 
-    /// 
-    /// </summary>
-    public static double Calculate(IEnumerable<double[]> front, IEnumerable<double> reference, bool[] maximization) {
-      List<double> list = new List<double>();
-      foreach (double d in reference) list.Add(d);
-      double[] refp = list.ToArray<double>();
-      if (front == null) throw new ArgumentException("Fronts must not be null");
-      double[][] set = front.ToArray();   //Still no Good
-      if (set.Length == 0) throw new ArgumentException("Fronts must not be empty");
-      if (refp.Length != set[0].Length) throw new ArgumentException("Front and referencepoint need to be of the same dimensionality");
-      Array.Sort<double[]>(set, Utilities.getDimensionComparer(0, maximization[0]));
-      double[] last = set[set.Length - 1];
-      CheckConsistency(last, 0, refp, maximization);
-      CheckConsistency(last, 1, refp, maximization);
-
-      double sum = 0;
-      for (int i = 0; i < set.Length - 1; i++) {
-        CheckConsistency(set[i], 1, refp, maximization);
-        sum += Math.Abs((set[i][0] - set[i + 1][0])) * Math.Abs((set[i][1] - refp[1]));
-      }
-
-      sum += Math.Abs(refp[0] - last[0]) * Math.Abs(refp[1] - last[1]);
-      return sum;
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions
+{
+
+    public class Hypervolume
+    {
+
+        /// <summary>
+        /// The Hyprevolume-metric is defined as the Hypervolume enclosed between a given reference point,
+        /// that is fixed for every evaluation function and the evaluated front.
+        /// 
+        /// Example:
+        /// r is the reference Point at (1|1)  and every Point p is part of the evaluated front
+        /// The filled Area labled HV is the 2 diensional Hypervolume enclosed by this front. 
+        /// 
+        /// (0|1)                (1|1)
+        ///   +      +-------------r
+        ///   |      |###### HV ###|
+        ///   |      p------+######|
+        ///   |             p+#####|
+        ///   |              |#####|
+        ///   |              p-+###|
+        ///   |                p---+
+        ///   |                 
+        ///   +--------------------1
+        /// (0|0)                (1|0)
+        /// 
+        ///  Please note that in this example both dimensions are minimized. The reference Point need to be dominated by EVERY point in the evaluated front 
+        /// 
+        /// </summary>
+        /// 
+        public static double Calculate(IEnumerable<double[]> points, IEnumerable<double> reference, bool[] maximization)
+        {
+            var front = NonDominatedSelect.removeNonReferenceDominatingVectors(points, reference.ToArray<double>(), maximization, false);
+            if (maximization.Length == 2)
+            { //Hypervolume analysis only with 2 objectives for now
+                return Hypervolume.Calculate2D(front, reference, maximization);
+            }
+            else if (Array.TrueForAll(maximization, x => !x))
+            {
+                return Hypervolume.CalculateMD(front, reference);
+            }
+            else
+            {
+                throw new NotImplementedException("Hypervolume calculation for more than two dimensions is supported only with minimization problems");
+            }
+        }
+
+
+        private static double Calculate2D(IEnumerable<double[]> front, IEnumerable<double> reference, bool[] maximization)
+        {
+            List<double> list = new List<double>();
+            foreach (double d in reference) list.Add(d);
+            double[] refp = list.ToArray<double>();
+            if (front == null) throw new ArgumentException("Fronts must not be null");
+            double[][] set = front.ToArray();   //Still no Good
+            if (set.Length == 0) throw new ArgumentException("Fronts must not be empty");
+            if (refp.Length != set[0].Length) throw new ArgumentException("Front and referencepoint need to be of the same dimensionality");
+            Array.Sort<double[]>(set, Utilities.getDimensionComparer(0, maximization[0]));
+            double[] last = set[set.Length - 1];
+            CheckConsistency(last, 0, refp, maximization);
+            CheckConsistency(last, 1, refp, maximization);
+
+            double sum = 0;
+            for (int i = 0; i < set.Length - 1; i++)
+            {
+                CheckConsistency(set[i], 1, refp, maximization);
+                sum += Math.Abs((set[i][0] - set[i + 1][0])) * Math.Abs((set[i][1] - refp[1]));
+            }
+
+            sum += Math.Abs(refp[0] - last[0]) * Math.Abs(refp[1] - last[1]);
+            return sum;
+        }
+
+        private static void CheckConsistency(double[] point, int dim, double[] reference, bool[] maximization)
+        {
+            if (!maximization[dim] && point[dim] > reference[dim]) throw new ArgumentException("Reference Point must be dominated by all points of the front");
+            if (maximization[dim] && point[dim] < reference[dim]) throw new ArgumentException("Reference Point must be dominated by all points of the front");
+            if (point.Length != 2) throw new ArgumentException("Only 2-dimensional cases are supported yet");
+        }
+
+        private static double CalculateMD(IEnumerable<double[]> points, IEnumerable<double> reference)
+        {
+            double[] referencePoint = reference.ToArray<double>();
+            if (referencePoint == null || referencePoint.Length < 3) throw new ArgumentException("ReferencePoint unfit for complex Hypervolume calculation");
+            if (!IsDominated(referencePoint, points))
+            {
+                throw new ArgumentException("ReferencePoint unfit for complex Hypervolume calculation");
+            }
+            int objectives = referencePoint.Length;
+            List<double[]> lpoints = new List<double[]>();
+            foreach (double[] p in points)
+            {
+                lpoints.Add(p);
+            }
+            lpoints.StableSort(Utilities.getDimensionComparer(objectives - 1, false));
+
+            double[] regLow = new double[objectives];
+            for (int i = 0; i < objectives; i++)
+            {
+                regLow[i] = 1E15;
+            }
+            foreach (double[] p in lpoints)
+            {
+                for (int i = 0; i < regLow.Length; i++)
+                {
+                    if (regLow[i] > p[i]) regLow[i] = p[i];
+                }
+            }
+
+            return Stream(regLow, referencePoint, lpoints, 0, referencePoint[objectives - 1], (int)Math.Sqrt(points.Count()), objectives);
+        }
+
+        private static bool IsDominated(double[] referencePoint, IEnumerable<double[]> points)
+        {
+            foreach (double[] point in points)
+            {
+                for (int i = 0; i < referencePoint.Length; i++)
+                {
+                    if (referencePoint[i] < point[i])
+                    {
+                        return false;
+                    }
+                }
+            }
+            return true;
+        }
+
+        private static double Stream(double[] regionLow, double[] regionUp, List<double[]> points, int split, double cover, int sqrtNoPoints, int objectives)
+        {
+            double coverOld = cover;
+            int coverIndex = 0;
+            int coverIndexOld = -1;
+            int c;
+            double result = 0;
+
+            double dMeasure = GetMeasure(regionLow, regionUp, objectives);
+            while (cover == coverOld && coverIndex < points.Count())
+            {
+                if (coverIndexOld == coverIndex) break;
+                coverIndexOld = coverIndex;
+                if (Covers(points[coverIndex], regionLow, objectives))
+                {
+                    cover = points[coverIndex][objectives - 1];
+                    result += dMeasure * (coverOld - cover);
+                }
+                else coverIndex++;
+
+            }
+
+            for (c = coverIndex; c > 0; c--) if (points[c - 1][objectives - 1] == cover) coverIndex--;
+            if (coverIndex == 0) return result;
+
+            bool allPiles = true;
+            int[] piles = new int[coverIndex];
+            for (int i = 0; i < coverIndex; i++)
+            {
+                piles[i] = IsPile(points[i], regionLow, regionUp, objectives);
+                if (piles[i] == -1)
+                {
+                    allPiles = false;
+                    break;
+                }
+            }
+
+            if (allPiles)
+            {
+                double[] trellis = new double[regionUp.Length];
+                for (int j = 0; j < trellis.Length; j++) trellis[j] = regionUp[j];
+                double current = 0;
+                double next = 0;
+                int i = 0;
+                do
+                {
+                    current = points[i][objectives - 1];
+                    do
+                    {
+                        if (points[i][piles[i]] < trellis[piles[i]]) trellis[piles[i]] = points[i][piles[i]];
+                        i++;
+                        if (i < coverIndex) next = points[i][objectives - 1];
+                        else { next = cover; break; }
+                    } while (next == current);
+                    result += ComputeTrellis(regionLow, regionUp, trellis, objectives) * (next - current);
+                } while (next != cover);
+            }
+            else
+            {
+                double bound = -1;
+                double[] boundaries = new double[coverIndex];
+                double[] noBoundaries = new double[coverIndex];
+                int boundIdx = 0;
+                int noBoundIdx = 0;
+
+                do
+                {
+                    for (int i = 0; i < coverIndex; i++)
+                    {
+                        int contained = ContainesBoundary(points[i], regionLow, split);
+                        if (contained == 0) boundaries[boundIdx++] = points[i][split];
+                        else if (contained == 1) noBoundaries[noBoundIdx++] = points[i][split];
+                    }
+                    if (boundIdx > 0) bound = GetMedian(boundaries, boundIdx);
+                    else if (noBoundIdx > sqrtNoPoints) bound = GetMedian(noBoundaries, noBoundIdx);
+                    else split++;
+                } while (bound == -1.0);
+
+                List<double[]> pointsChildLow, pointsChildUp;
+                pointsChildLow = new List<double[]>();
+                pointsChildUp = new List<double[]>();
+                double[] regionUpC = new double[regionUp.Length];
+                for (int j = 0; j < regionUpC.Length; j++) regionUpC[j] = regionUp[j];
+                double[] regionLowC = new double[regionLow.Length];
+                for (int j = 0; j < regionLowC.Length; j++) regionLowC[j] = regionLow[j];
+
+                for (int i = 0; i < coverIndex; i++)
+                {
+                    if (PartCovers(points[i], regionUpC, objectives)) pointsChildUp.Add(points[i]);
+                    if (PartCovers(points[i], regionUp, objectives)) pointsChildLow.Add(points[i]);
+                }
+                //this could/should be done in Parallel
+
+                if (pointsChildUp.Count() > 0) result += Stream(regionLow, regionUpC, pointsChildUp, split, cover, sqrtNoPoints, objectives);
+                if (pointsChildLow.Count() > 0) result += Stream(regionLowC, regionUp, pointsChildLow, split, cover, sqrtNoPoints, objectives);
+            }
+            return result;
+        }
+
+        private static double GetMedian(double[] vector, int length)
+        {
+            if (vector.Length != length)
+            {
+                double[] vec = new double[length];
+                Array.Copy(vector, vec, length);
+                vector = vec;
+            }
+            return vector.Median();
+
+        }
+
+        private static double ComputeTrellis(double[] regionLow, double[] regionUp, double[] trellis, int objectives)
+        {
+            bool[] bs = new bool[objectives - 1];
+            for (int i = 0; i < bs.Length; i++) bs[i] = true;
+
+            double result = 0;
+            uint noSummands = BinarayToInt(bs);
+            int oneCounter; double summand;
+            for (uint i = 1; i <= noSummands; i++)
+            {
+                summand = 1;
+                IntToBinary(i, bs);
+                oneCounter = 0;
+                for (int j = 0; j < objectives - 1; j++)
+                {
+                    if (bs[j])
+                    {
+                        summand *= regionUp[j] - trellis[j];
+                        oneCounter++;
+                    }
+                    else
+                    {
+                        summand *= regionUp[j] - regionLow[j];
+                    }
+                }
+                if (oneCounter % 2 == 0) result -= summand;
+                else result += summand;
+
+            }
+            return result;
+        }
+
+        private static void IntToBinary(uint i, bool[] bs)
+        {
+            for (int j = 0; j < bs.Length; j++) bs[j] = false;
+            uint rest = i;
+            int idx = 0;
+            while (rest != 0)
+            {
+                bs[idx] = rest % 2 == 1;
+                rest = rest / 2;
+                idx++;
+            }
+
+        }
+
+        private static uint BinarayToInt(bool[] bs)
+        {
+            uint result = 0;
+            for (int i = 0; i < bs.Length; i++)
+            {
+                result += bs[i] ? ((uint)1 << i) : 0;
+            }
+            return result;
+        }
+
+        private static int IsPile(double[] cuboid, double[] regionLow, double[] regionUp, int objectives)
+        {
+            int pile = cuboid.Length;
+            for (int i = 0; i < objectives - 1; i++)
+            {
+                if (cuboid[i] > regionLow[i])
+                {
+                    if (pile != objectives) return 1;
+                    pile = i;
+                }
+            }
+            return pile;
+        }
+
+        private static double GetMeasure(double[] regionLow, double[] regionUp, int objectives)
+        {
+            double volume = 1;
+            for (int i = 0; i < objectives - 1; i++)
+            {
+                volume *= (regionUp[i] - regionLow[i]);
+            }
+            return volume;
+        }
+
+        private static int ContainesBoundary(double[] cub, double[] regionLow, int split)
+        {
+            if (regionLow[split] >= cub[split]) return -1;
+            else
+            {
+                for (int j = 0; j < split; j++)
+                {
+                    if (regionLow[j] < cub[j]) return 1;
+                }
+            }
+            return 0;
+        }
+
+        private static bool PartCovers(double[] v, double[] regionUp, int objectives)
+        {
+            for (int i = 0; i < objectives - 1; i++)
+            {
+                if (v[i] >= regionUp[i]) return false;
+            }
+            return true;
+        }
+
+        private static bool Covers(double[] v, double[] regionLow, int objectives)
+        {
+            for (int i = 0; i < objectives - 1; i++)
+            {
+                if (v[i] > regionLow[i]) return false;
+            }
+            return true;
+        }
+
+
     }
-
-    private static void CheckConsistency(double[] point, int dim, double[] reference, bool[] maximization) {
-      if (!maximization[dim] && point[dim] > reference[dim]) throw new ArgumentException("Reference Point must be dominated by all points of the front");
-      if (maximization[dim] && point[dim] < reference[dim]) throw new ArgumentException("Reference Point must be dominated by all points of the front");
-      if (point.Length != 2) throw new ArgumentException("Only 2-dimensional cases are supported yet");
-    }
-  }
 }
+
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Data/IHRInstanceProvider.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Data/IHRInstanceProvider.cs	(revision 13936)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Data/IHRInstanceProvider.cs	(revision 13936)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.Instances;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  public class IHRInstanceProvider : ProblemInstanceProvider<MOTFData> {
+
+    public override string Name
+    {
+      get { return "IHR"; }
+    }
+
+    public override string Description
+    {
+      get { return "IHR Problems"; }
+    }
+
+    public override Uri WebLink
+    {
+      get { return new Uri("http://dev.heuristiclab.com/trac.fcgi/wiki/Documentation/Reference/Test%20Functions"); }
+    }
+
+    public override string ReferencePublication
+    {
+      get { return "http://repository.ias.ac.in/81671/ [30.11.15]"; }
+    }
+
+    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
+      var evaluators = ApplicationManager.Manager.GetInstances<IHR>().OrderBy(x => x.Name);
+      return evaluators.Select(x => new MOTFDataDescriptor(x));
+    }
+
+    public override MOTFData LoadData(IDataDescriptor id) {
+      var descriptor = (MOTFDataDescriptor)id;
+      return new MOTFData {
+        Name = descriptor.Name,
+        Description = descriptor.Description,
+        Evaluator = descriptor.Evaluator
+      };
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Data/MISCInstanceProvider.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Data/MISCInstanceProvider.cs	(revision 13935)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Data/MISCInstanceProvider.cs	(revision 13936)
@@ -28,17 +28,21 @@
   public class MISCInstanceProvider : ProblemInstanceProvider<MOTFData> {
 
-    public override string Name {
+    public override string Name
+    {
       get { return "Miscellaneous"; }
     }
 
-    public override string Description {
+    public override string Description
+    {
       get { return "Miscellaneous Testfunctions"; }
     }
 
-    public override Uri WebLink {
+    public override Uri WebLink
+    {
       get { return new Uri("http://dev.heuristiclab.com/trac.fcgi/wiki/Documentation/Reference/Test%20Functions"); }
     }
 
-    public override string ReferencePublication {
+    public override string ReferencePublication
+    {
       get { return String.Empty; }
     }
@@ -55,5 +59,5 @@
 
 
-      return f is DTLZ || f is ZDT;
+      return f is DTLZ || f is ZDT || f is IHR;
     }
 
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/HeuristicLab.Problems.MultiObjectiveTestFunctions-3.3.csproj
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/HeuristicLab.Problems.MultiObjectiveTestFunctions-3.3.csproj	(revision 13935)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/HeuristicLab.Problems.MultiObjectiveTestFunctions-3.3.csproj	(revision 13936)
@@ -45,4 +45,12 @@
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\ALGLIB-3.7.0.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
+    </Reference>
     <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
@@ -95,4 +103,8 @@
       <Private>False</Private>
     </Reference>
+    <Reference Include="HeuristicLab.Optimization.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
+    </Reference>
     <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
@@ -113,4 +125,8 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
     </Reference>
     <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
@@ -139,4 +155,8 @@
     <Compile Include="Analyzers\GenerationalDistanceAnalyzer.cs" />
     <Compile Include="Analyzers\SpacingAnalyzer.cs" />
+    <Compile Include="Data\IHRInstanceProvider.cs" />
+    <Compile Include="MOCMAES\HypervolumeIndicator.cs" />
+    <Compile Include="MOCMAES\CrowdingIndicator.cs" />
+    <Compile Include="MOCMAES\IIndicator.cs" />
     <Compile Include="Interfaces\IConstrainedTestFunction.cs" />
     <Compile Include="Interfaces\IMultiObjectiveTestFunctionAnalyzer.cs" />
@@ -154,5 +174,13 @@
     <Compile Include="Data\DTLZInstanceProvider.cs" />
     <Compile Include="Interfaces\IMOFrontModel.cs" />
-    <Compile Include="Testfunctions\CF1.cs" />
+    <Compile Include="MOCMAES\MOCMASEvolutionStrategy.cs" />
+    <Compile Include="Testfunctions\CIGTAB.cs" />
+    <Compile Include="Testfunctions\IHR\IHR.cs" />
+    <Compile Include="Testfunctions\IHR\IHR1.cs" />
+    <Compile Include="Testfunctions\IHR\IHR6.cs" />
+    <Compile Include="Testfunctions\IHR\IHR4.cs" />
+    <Compile Include="Testfunctions\IHR\IHR3.cs" />
+    <Compile Include="Testfunctions\IHR\IHR2.cs" />
+    <Compile Include="Testfunctions\ELLI1.cs" />
     <Compile Include="Views\MOSolution.cs" />
     <Compile Include="Views\MOFrontScatterPlotView.cs">
@@ -215,4 +243,7 @@
     </EmbeddedResource>
   </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Testfunctions\CIGTAB\" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/NonDominatedSelect.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/NonDominatedSelect.cs	(revision 13935)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/NonDominatedSelect.cs	(revision 13936)
@@ -24,65 +24,92 @@
 using HeuristicLab.Core;
 
-namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions
+{
 
-  public class NonDominatedSelect {
-    private enum DominationResult { Dominates, IsDominated, IsNonDominated };
+    public class NonDominatedSelect
+    {
+        private enum DominationResult { Dominates, IsDominated, IsNonDominated };
 
-    public static IEnumerable<double[]> selectNonDominatedVectors(IEnumerable<double[]> qualities, bool[] maximization, bool dominateOnEqualQualities) {
-      int populationSize = qualities.Count();
+        public static IEnumerable<double[]> selectNonDominatedVectors(IEnumerable<double[]> qualities, bool[] maximization, bool dominateOnEqualQualities)
+        {
+            int populationSize = qualities.Count();
 
-      List<double[]> front = new List<double[]>();
-      foreach (double[] row in qualities) {
-        bool insert = true;
-        for (int i = 0; i < front.Count; i++) {
-          DominationResult res = Dominates(front[i], row, maximization, dominateOnEqualQualities);
-          if (res == DominationResult.Dominates) { insert = false; break; }           //Vector domiates Row
-          else if (res == DominationResult.IsDominated) {   //Row dominates Vector
-            front.RemoveRange(i, 1);
-          }
+            List<double[]> front = new List<double[]>();
+            foreach (double[] row in qualities)
+            {
+                bool insert = true;
+                for (int i = 0; i < front.Count; i++)
+                {
+                    DominationResult res = Dominates(front[i], row, maximization, dominateOnEqualQualities);
+                    if (res == DominationResult.Dominates) { insert = false; break; }           //Vector domiates Row
+                    else if (res == DominationResult.IsDominated)
+                    {   //Row dominates Vector
+                        front.RemoveRange(i, 1);
+                    }
+                }
+                if (insert)
+                {
+                    front.Add(row);
+                }
+            }
+
+            return front;
         }
-        if (insert) {
-          front.Add(row);
+
+        public static IEnumerable<double[]> removeNonReferenceDominatingVectors(IEnumerable<double[]> qualities, double[] reference, bool[] maximization, bool dominateOnEqualQualities)
+        {
+            List<double[]> front = new List<double[]>();
+            foreach (double[] vec in qualities)
+            {
+                if (Dominates(vec, reference, maximization, dominateOnEqualQualities) == DominationResult.Dominates)
+                {
+                    front.Add(vec);
+                }
+            }
+            return front;
         }
-      }
 
-      return front;
+        private static DominationResult Dominates(double[] left, double[] right, bool[] maximizations, bool dominateOnEqualQualities)
+        {
+            //mkommend Caution: do not use LINQ.SequenceEqual for comparing the two quality arrays (left and right) due to performance reasons
+            if (dominateOnEqualQualities)
+            {
+                var equal = true;
+                for (int i = 0; i < left.Length; i++)
+                {
+                    if (left[i] != right[i])
+                    {
+                        equal = false;
+                        break;
+                    }
+                }
+                if (equal) return DominationResult.Dominates;
+            }
+
+            bool leftIsBetter = false, rightIsBetter = false;
+            for (int i = 0; i < left.Length; i++)
+            {
+                if (IsDominated(left[i], right[i], maximizations[i])) rightIsBetter = true;
+                else if (IsDominated(right[i], left[i], maximizations[i])) leftIsBetter = true;
+                if (leftIsBetter && rightIsBetter) break;
+            }
+
+            if (leftIsBetter && !rightIsBetter) return DominationResult.Dominates;
+            if (!leftIsBetter && rightIsBetter) return DominationResult.IsDominated;
+            return DominationResult.IsNonDominated;
+        }
+
+        private static bool IsDominated(double left, double right, bool maximization)
+        {
+            return maximization && left < right
+              || !maximization && left > right;
+        }
+
+        private static void AddToFront(IScope p, List<ScopeList> fronts, int i)
+        {
+            if (i == fronts.Count) fronts.Add(new ScopeList());
+            fronts[i].Add(p);
+        }
+
     }
-
-    private static DominationResult Dominates(double[] left, double[] right, bool[] maximizations, bool dominateOnEqualQualities) {
-      //mkommend Caution: do not use LINQ.SequenceEqual for comparing the two quality arrays (left and right) due to performance reasons
-      if (dominateOnEqualQualities) {
-        var equal = true;
-        for (int i = 0; i < left.Length; i++) {
-          if (left[i] != right[i]) {
-            equal = false;
-            break;
-          }
-        }
-        if (equal) return DominationResult.Dominates;
-      }
-
-      bool leftIsBetter = false, rightIsBetter = false;
-      for (int i = 0; i < left.Length; i++) {
-        if (IsDominated(left[i], right[i], maximizations[i])) rightIsBetter = true;
-        else if (IsDominated(right[i], left[i], maximizations[i])) leftIsBetter = true;
-        if (leftIsBetter && rightIsBetter) break;
-      }
-
-      if (leftIsBetter && !rightIsBetter) return DominationResult.Dominates;
-      if (!leftIsBetter && rightIsBetter) return DominationResult.IsDominated;
-      return DominationResult.IsNonDominated;
-    }
-
-    private static bool IsDominated(double left, double right, bool maximization) {
-      return maximization && left < right
-        || !maximization && left > right;
-    }
-
-    private static void AddToFront(IScope p, List<ScopeList> fronts, int i) {
-      if (i == fronts.Count) fronts.Add(new ScopeList());
-      fronts[i].Add(p);
-    }
-
-  }
 }
Index: anches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/CF1.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/CF1.cs	(revision 13935)
+++ 	(revision )
@@ -1,123 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.MultiObjectiveTestFunctions
-{
-    [Item("CF1", "The unconstrained CF1 test problem from the CEC 2009 special session and competition. // http://www.ntu.edu.sg/home/epnsugan/index_files/CEC-06/CEC06.htm")]
-    [StorableClass]
-    public class CF1 : MultiObjectiveTestFunction
-    {
-
-        public override double[,] Bounds(int objectives)
-        {
-            return new double[,] { { -4, 4 } };
-        }
-
-        public override bool[] Maximization(int objecitves)
-        {
-            return new bool[2];
-        }
-
-        public override int MaximumSolutionLength
-        {
-            get { return int.MaxValue; }
-        }
-
-        public override int MinimumSolutionLength
-        {
-            get { return 1; }
-        }
-
-        public override int MinimumObjectives
-        {
-            get { return 2; }
-        }
-
-        public override int MaximumObjectives
-        {
-            get { return 2; }
-        }
-
-
-        public override IEnumerable<double[]> OptimalParetoFront(int objectives)
-        {
-            return PFStore.get(this.ItemName);
-        }
-        public override double BestKnownHypervolume(int objectives)
-        {
-            return Hypervolume.Calculate(OptimalParetoFront(objectives), ReferencePoint(objectives), Maximization(objectives));
-        }
-
-        public override double[] ReferencePoint(int objectives)
-        {
-            return new double[] { 11, 11 };
-        }
-
-        [StorableConstructor]
-        protected CF1(bool deserializing) : base(deserializing) { }
-        protected CF1(CF1 original, Cloner cloner) : base(original, cloner) { }
-        public override IDeepCloneable Clone(Cloner cloner)
-        {
-            return new CF1(this, cloner);
-        }
-        public CF1() : base() { }
-
-
-        public override double[] Evaluate(RealVector r, int objectives)
-        {
-            return new double[]{r[0],r[0]};
-            if (objectives != 2) throw new ArgumentException("The CF1 problem must always have 2 objectives");
-            double f0 = 0.0, f1 = 0.0, c0 = 0.0;
-
-            int j, count1, count2;
-            double sum1, sum2, yj, N, a;
-            N = 10.0; a = 1.0;
-            sum1 = sum2 = 0.0;
-            count1 = count2 = 0;
-            for (j = 2; j <= r.Length; j++)
-            {
-                yj = r[j - 1] - Math.Pow(r[0], 0.5 * (1.0 + 3.0 * (j - 2.0) / (r.Length - 2.0)));
-                if (j % 2 == 1)
-                {
-                    sum1 += yj * yj;
-                    count1++;
-                }
-                else {
-                    sum2 += yj * yj;
-                    count2++;
-                }
-            }
-            f0 = r[0] + 2.0 * sum1 / (double)count1;
-            f1 = 1.0 - r[0] + 2.0 * sum2 / (double)count2;
-            c0 = f1 + f0 - a * Math.Abs(Math.Sin(N * Math.PI * (f0 - f1 + 1.0))) - 1.0;
-
-            double[] res = { f0, f1, c0 };
-            return res;
-        }
-    }
-}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/CIGTAB.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/CIGTAB.cs	(revision 13936)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/CIGTAB.cs	(revision 13936)
@@ -0,0 +1,118 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  [Item("CIGTAB", "to be aded")]
+  [StorableClass]
+  public class CIGTAB : MultiObjectiveTestFunction {
+
+    public override double[,] Bounds(int objectives) {
+      return new double[,] { { -10, 10 } };
+    }
+
+    public override bool[] Maximization(int objecitves) {
+      return new bool[2];
+    }
+
+    public override int MinimumSolutionLength
+    {
+      get { return 1; }
+    }
+    public override int MaximumSolutionLength
+    {
+      get { return int.MaxValue; }
+    }
+
+
+    public override int MinimumObjectives
+    {
+      get { return 2; }
+    }
+
+    public override int MaximumObjectives
+    {
+      get { return 2; }
+    }
+
+
+    public override double[] ReferencePoint(int objecitves) {
+      return new double[] { 11, 11 };
+    }
+
+
+    public override IEnumerable<double[]> OptimalParetoFront(int objecitves) {
+      List<double[]> res = new List<double[]>();
+      for (int i = 0; i <= 500; i++) {
+        RealVector r = new RealVector(2);
+        r[0] = 2 / 500.0 * i;
+        r[1] = 2 / 500.0 * i;
+        res.Add(this.Evaluate(r, 2));
+      }
+
+
+      return res;
+    }
+    public override double BestKnownHypervolume(int objectives) {
+      return Hypervolume.Calculate(OptimalParetoFront(objectives), ReferencePoint(objectives), Maximization(objectives));
+    }
+
+    [StorableConstructor]
+    protected CIGTAB(bool deserializing) : base(deserializing) { }
+    protected CIGTAB(CIGTAB original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CIGTAB(this, cloner);
+    }
+
+    public CIGTAB() : base(minimumObjectives: 2, maximumObjectives: 2, minimumSolutionLength: 1, maximumSolutionLength: int.MaxValue) { }
+
+    public override double[] Evaluate(RealVector r, int objectives) {
+      if (objectives != 2) throw new ArgumentException("The CIGTAB problem must always have 2 objectives");
+      double x = r[0];
+      double a = 1000;
+      double sum = x * x;
+      for (int i = 1; i < r.Length - 1; i++) {
+        sum += a * r[i] * r[i];
+      }
+      sum += a * a * r[r.Length - 1] * r[r.Length - 1];
+
+      //objective1
+      double f0 = 1 / (a * a * r.Length) * sum;
+
+      x = x - 2;
+      sum = x * x;
+      for (int i = 1; i < r.Length - 1; i++) {
+        sum += a * (r[i] - 2) * (r[i] - 2);
+      }
+
+      sum += a * a * (r[r.Length - 1] - 2) * (r[r.Length - 1] - 2);
+      //objective0
+      double f1 = 1 / (a * a * r.Length) * sum;
+
+      return new double[] { f0, f1 };
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/ELLI1.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/ELLI1.cs	(revision 13936)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/ELLI1.cs	(revision 13936)
@@ -0,0 +1,114 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  [Item("ELLI", "to be aded")]
+  [StorableClass]
+  public class ELLI : MultiObjectiveTestFunction {
+
+    public override double[,] Bounds(int objectives) {
+      return new double[,] { { -10, 10 } };
+    }
+
+    public override bool[] Maximization(int objecitves) {
+      return new bool[2];
+    }
+
+    public override int MinimumSolutionLength
+    {
+      get { return 1; }
+    }
+    public override int MaximumSolutionLength
+    {
+      get { return int.MaxValue; }
+    }
+
+
+    public override int MinimumObjectives
+    {
+      get { return 2; }
+    }
+
+    public override int MaximumObjectives
+    {
+      get { return 2; }
+    }
+
+
+    public override double[] ReferencePoint(int objecitves) {
+      return new double[] { 11, 11 };
+    }
+
+
+    public override IEnumerable<double[]> OptimalParetoFront(int objecitves) {
+      List<double[]> res = new List<double[]>();
+      for (int i = 0; i <= 500; i++) {
+        RealVector r = new RealVector(2);
+        r[0] = 2 / 500.0 * i;
+        r[1] = 2 / 500.0 * i;
+        res.Add(this.Evaluate(r, 2));
+      }
+
+
+      return res;
+    }
+    public override double BestKnownHypervolume(int objectives) {
+      return Hypervolume.Calculate(OptimalParetoFront(objectives), ReferencePoint(objectives), Maximization(objectives));
+    }
+
+    [StorableConstructor]
+    protected ELLI(bool deserializing) : base(deserializing) { }
+    protected ELLI(ELLI original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ELLI(this, cloner);
+    }
+
+    public ELLI() : base(minimumObjectives: 2, maximumObjectives: 2, minimumSolutionLength: 1, maximumSolutionLength: int.MaxValue) { }
+
+    public override double[] Evaluate(RealVector r, int objectives) {
+      if (objectives != 2) throw new ArgumentException("The ELLI problem must always have 2 objectives");
+      double x = r[0];
+      double a = 1000;
+      double sum = 0.0;
+      for (int i = 0; i < r.Length; i++) {
+        sum += Math.Pow(a, 2 * i / (r.Length - 1)) * r[i] * r[i];
+      }
+
+      //objective1
+      double f0 = 1 / (a * a * r.Length) * sum;
+
+      sum = 0.0;
+      for (int i = 0; i < r.Length; i++) {
+        sum += Math.Pow(a, 2 * i / (r.Length - 1)) * (r[i] - 2) * (r[i] - 2);
+      }
+      //objective0
+      double f1 = 1 / (a * a * r.Length) * sum;
+
+      return new double[] { f0, f1 };
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR.cs	(revision 13936)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR.cs	(revision 13936)
@@ -0,0 +1,104 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  [StorableClass]
+  public abstract class IHR : MultiObjectiveTestFunction {
+
+
+    public override IEnumerable<double[]> OptimalParetoFront(int objectives) {
+      if (objectives == 2) return PFStore.get(this.ItemName + ".2D");
+      return null;
+    }
+
+    public override double[,] Bounds(int objectives) {
+      return new double[,] { { -1, 1 } };
+    }
+
+    public override bool[] Maximization(int objectives) {
+      return new bool[objectives];
+    }
+
+    public override int MinimumSolutionLength
+    {
+      get { return 2; }
+    }
+    public override int MaximumSolutionLength
+    {
+      get { return int.MaxValue; }
+    }
+
+
+    public override int MinimumObjectives
+    {
+      get { return 2; }
+    }
+    public override int MaximumObjectives
+    {
+      get { return 2; }
+    }
+
+    public override double[] ReferencePoint(int objectives) {
+      double[] rp = new double[objectives];
+      for (int i = 0; i < objectives; i++) {
+        rp[i] = 11;
+      }
+      return rp;
+    }
+
+    [StorableConstructor]
+    protected IHR(bool deserializing) : base(deserializing) { }
+    protected IHR(IHR original, Cloner cloner) : base(original, cloner) { }
+    public IHR() : base(minimumObjectives: 2, minimumSolutionLength: 2, maximumSolutionLength: int.MaxValue) { }
+
+    public override double[] Evaluate(RealVector r, int objectives) {
+      if (r.Length < objectives) {
+        throw new ArgumentException("The dimensionality of the problem(ProblemSize) must be larger than or equal to the number of objectives");
+      }
+      RealVector y = Y(r);
+      return new double[] { F1(y), F2(r, y) };
+    }
+    protected abstract double F1(RealVector y);
+    protected abstract double F2(RealVector r, RealVector y);
+    protected abstract double G(RealVector y);
+
+
+    protected double H(double x, RealVector r) {
+      return 1.0 / (1 + Math.Exp(-x / Math.Sqrt(r.Length)));
+    }
+    protected double HF(double x, RealVector r) {
+      double ymax = 1;
+      return Math.Abs(r[0]) <= ymax ? x : 1 + Math.Abs(r[0]);    //replace  with maximum of first column of matrix used in Y(x)
+    }
+    protected double HG(double x) {
+      return (x * x) / (Math.Abs(x) + 0.1);
+    }
+    protected RealVector Y(RealVector x) {
+      return x; //replace with matrix*x
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR1.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR1.cs	(revision 13936)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR1.cs	(revision 13936)
@@ -0,0 +1,76 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  [Item("IHR1", "Testfunction as defined as IHR1 in \"Igel, C., Hansen, N., & Roth, S. (2007). Covariance matrix adaptation for multi-objective optimization. Evolutionary computation, 15(1), 1-28.\" [24.06.16]")]
+  [StorableClass]
+  public class IHR1 : IHR {
+
+    public override IEnumerable<double[]> OptimalParetoFront(int objectives) {
+      List<double[]> res = new List<double[]>();
+      for (int i = 0; i <= 500; i++) {
+        RealVector r = new RealVector(objectives);
+        r[0] = 1 / 500.0 * i;
+
+        res.Add(this.Evaluate(r, objectives));
+      }
+
+
+      return res;
+    }
+    public override double BestKnownHypervolume(int objectives) {
+      return Hypervolume.Calculate(OptimalParetoFront(objectives), ReferencePoint(objectives), Maximization(objectives));
+    }
+
+    [StorableConstructor]
+    protected IHR1(bool deserializing) : base(deserializing) { }
+    protected IHR1(IHR1 original, Cloner cloner) : base(original, cloner) { }
+    public IHR1() : base() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new IHR1(this, cloner);
+    }
+
+    protected override double F1(RealVector y) {
+      return Math.Abs(y[0]);
+    }
+
+    protected override double F2(RealVector r, RealVector y) {
+      var g = G(y);
+      return g * HF(1 - Math.Sqrt(H(y[0], y) / g), y);
+    }
+
+    protected override double G(RealVector y) {
+      double sum = 0.0;
+      for (int i = 1; i < y.Length; i++) {
+        sum += HG(y[i]);
+      }
+      return 1 + 9 * sum / (y.Length - 1);
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR2.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR2.cs	(revision 13936)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR2.cs	(revision 13936)
@@ -0,0 +1,77 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  [Item("IHR2", "Testfunction as defined as IHR2 in \"Igel, C., Hansen, N., & Roth, S. (2007). Covariance matrix adaptation for multi-objective optimization. Evolutionary computation, 15(1), 1-28.\" [24.06.16]")]
+  [StorableClass]
+  public class IHR2 : IHR {
+
+    public override IEnumerable<double[]> OptimalParetoFront(int objectives) {
+      List<double[]> res = new List<double[]>();
+      for (int i = 0; i <= 500; i++) {
+        RealVector r = new RealVector(objectives);
+        r[0] = 1 / 500.0 * i;
+
+        res.Add(this.Evaluate(r, objectives));
+      }
+
+
+      return res;
+    }
+    public override double BestKnownHypervolume(int objectives) {
+      return Hypervolume.Calculate(OptimalParetoFront(objectives), ReferencePoint(objectives), Maximization(objectives));
+    }
+
+    [StorableConstructor]
+    protected IHR2(bool deserializing) : base(deserializing) { }
+    protected IHR2(IHR2 original, Cloner cloner) : base(original, cloner) { }
+    public IHR2() : base() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new IHR2(this, cloner);
+    }
+
+    protected override double F1(RealVector y) {
+      return Math.Abs(y[0]);
+    }
+
+    protected override double F2(RealVector r, RealVector y) {
+      var g = G(y);
+      var d = H(y[0], y) / g;
+      return g * HF(1 - d * d, y);
+    }
+
+    protected override double G(RealVector y) {
+      double sum = 0.0;
+      for (int i = 1; i < y.Length; i++) {
+        sum += HG(y[i]);
+      }
+      return 1 + 9 * sum / (y.Length - 1);
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR3.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR3.cs	(revision 13936)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR3.cs	(revision 13936)
@@ -0,0 +1,77 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  [Item("IHR3", "Testfunction as defined as IHR3 in \"Igel, C., Hansen, N., & Roth, S. (2007). Covariance matrix adaptation for multi-objective optimization. Evolutionary computation, 15(1), 1-28.\" [24.06.16]")]
+  [StorableClass]
+  public class IHR3 : IHR {
+
+    public override IEnumerable<double[]> OptimalParetoFront(int objectives) {
+      List<double[]> res = new List<double[]>();
+      for (int i = 0; i <= 500; i++) {
+        RealVector r = new RealVector(objectives);
+        r[0] = 1 / 500.0 * i;
+
+        res.Add(this.Evaluate(r, objectives));
+      }
+
+
+      return res;
+    }
+    public override double BestKnownHypervolume(int objectives) {
+      return Hypervolume.Calculate(OptimalParetoFront(objectives), ReferencePoint(objectives), Maximization(objectives));
+    }
+
+    [StorableConstructor]
+    protected IHR3(bool deserializing) : base(deserializing) { }
+    protected IHR3(IHR3 original, Cloner cloner) : base(original, cloner) { }
+    public IHR3() : base() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new IHR3(this, cloner);
+    }
+
+    protected override double F1(RealVector y) {
+      return Math.Abs(y[0]);
+    }
+
+    protected override double F2(RealVector r, RealVector y) {
+      var g = G(y);
+      var d = H(y[0], y) / g;
+      return g * HF(1 - Math.Sqrt(d) - d * Math.Sin(10 * Math.PI * y[0]), y);
+    }
+
+    protected override double G(RealVector y) {
+      double sum = 0.0;
+      for (int i = 1; i < y.Length; i++) {
+        sum += HG(y[i]);
+      }
+      return 1 + 9 * sum / (y.Length - 1);
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR4.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR4.cs	(revision 13936)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR4.cs	(revision 13936)
@@ -0,0 +1,82 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  [Item("IHR4", "Testfunction as defined as IHR4 in \"Igel, C., Hansen, N., & Roth, S. (2007). Covariance matrix adaptation for multi-objective optimization. Evolutionary computation, 15(1), 1-28.\" [24.06.16]")]
+  [StorableClass]
+  public class IHR4 : IHR {
+
+
+    public override IEnumerable<double[]> OptimalParetoFront(int objectives) {
+      List<double[]> res = new List<double[]>();
+      for (int i = 0; i <= 500; i++) {
+        RealVector r = new RealVector(objectives);
+        r[0] = 1 / 500.0 * i;
+
+        res.Add(this.Evaluate(r, objectives));
+      }
+
+
+      return res;
+    }
+    public override double BestKnownHypervolume(int objectives) {
+      return Hypervolume.Calculate(OptimalParetoFront(objectives), ReferencePoint(objectives), Maximization(objectives));
+    }
+
+    public override double[,] Bounds(int objectives) {
+      return new double[,] { { -5, 5 } };
+    }
+
+    [StorableConstructor]
+    protected IHR4(bool deserializing) : base(deserializing) { }
+    protected IHR4(IHR4 original, Cloner cloner) : base(original, cloner) { }
+    public IHR4() : base() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new IHR4(this, cloner);
+    }
+
+    protected override double F1(RealVector y) {
+      return Math.Abs(y[0]);
+    }
+
+    protected override double F2(RealVector r, RealVector y) {
+      var g = G(y);
+      var d = H(y[0], y) / g;
+      return g * HF(1 - Math.Sqrt(d), y);
+    }
+
+    protected override double G(RealVector y) {
+      double sum = 0.0;
+      for (int i = 1; i < y.Length; i++) {
+        sum += y[i] * y[i] - 10 * Math.Cos(4 * Math.PI * y[i]);
+      }
+      return 1 + 10 * (y.Length - 1) + sum;
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR6.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR6.cs	(revision 13936)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/IHR/IHR6.cs	(revision 13936)
@@ -0,0 +1,77 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  [Item("IHR6", "Testfunction as defined as IHR6 in \"Igel, C., Hansen, N., & Roth, S. (2007). Covariance matrix adaptation for multi-objective optimization. Evolutionary computation, 15(1), 1-28.\" [24.06.16]")]
+  [StorableClass]
+  public class IHR6 : IHR {
+
+    public override IEnumerable<double[]> OptimalParetoFront(int objectives) {
+      List<double[]> res = new List<double[]>();
+      for (int i = 0; i <= 500; i++) {
+        RealVector r = new RealVector(objectives);
+        r[0] = 1 / 500.0 * i;
+
+        res.Add(this.Evaluate(r, objectives));
+      }
+
+
+      return res;
+    }
+    public override double BestKnownHypervolume(int objectives) {
+      return Hypervolume.Calculate(OptimalParetoFront(objectives), ReferencePoint(objectives), Maximization(objectives));
+    }
+
+    [StorableConstructor]
+    protected IHR6(bool deserializing) : base(deserializing) { }
+    protected IHR6(IHR6 original, Cloner cloner) : base(original, cloner) { }
+    public IHR6() : base() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new IHR6(this, cloner);
+    }
+
+    protected override double F1(RealVector y) {
+      return 1 - Math.Exp(-4 * Math.Abs(y[0])) * Math.Pow(Math.Sin(6 * Math.PI * y[0]), 6);
+    }
+
+    protected override double F2(RealVector r, RealVector y) {
+      var g = G(y);
+      var d = H(y[0], y) / g;
+      return g * HF(1 - d * d, y);
+    }
+
+    protected override double G(RealVector y) {
+      double sum = 0.0;
+      for (int i = 1; i < y.Length; i++) {
+        sum += HG(y[i]);
+      }
+      return 1 + 9 * Math.Pow(sum / (y.Length - 1), 0.25);
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Views/MOSolution.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Views/MOSolution.cs	(revision 13935)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Views/MOSolution.cs	(revision 13936)
@@ -24,143 +24,177 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
-namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
-  [StorableClass]
-  class MOSolution : IMOFrontModel {
-    public bool CanChangeDescription {
-      get {
-        return false;
-      }
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions
+{
+    [StorableClass]
+    class MOSolution : IMOFrontModel
+    {
+        public bool CanChangeDescription
+        {
+            get
+            {
+                return false;
+            }
+        }
+
+        public bool CanChangeName
+        {
+            get
+            {
+                return false;
+            }
+        }
+
+        public string Description
+        {
+            get
+            {
+                return "MYResult";
+            }
+
+            set { }
+        }
+
+        public string Filename
+        {
+            get { return "MyFilename"; }
+
+            set { }
+        }
+
+        public string ItemDescription
+        {
+            get { return "this is MOSolutionImplementation"; }
+        }
+
+        public Image ItemImage
+        {
+            get
+            {
+                return HeuristicLab.Common.Resources.VSImageLibrary.Function;
+            }
+        }
+
+        public string ItemName
+        {
+            get
+            {
+                return "MOSolution";
+            }
+        }
+
+        public Version ItemVersion
+        {
+            get { return Version.Parse("0.1"); }
+        }
+
+        public string Name
+        {
+            get
+            {
+                return ItemName;
+            }
+
+            set { }
+        }
+
+        private double[][] qualities;
+
+        public double[][] Qualities
+        {
+            get
+            {
+                return qualities;
+            }
+
+            set
+            {
+                qualities = value;
+            }
+        }
+
+        private int objectives;
+        public int Objectives
+        {
+            get
+            {
+                return objectives;
+            }
+
+            set
+            {
+                objectives = value;
+            }
+        }
+
+        private double[][] solutions;
+        public double[][] Solutions
+        {
+            get
+            {
+                return solutions;
+            }
+
+            set
+            {
+                solutions = value;
+            }
+        }
+
+        private double[][] paretoFront;
+        public double[][] ParetoFront
+        {
+            get
+            {
+                return paretoFront;
+            }
+
+            set
+            {
+                paretoFront = value;
+            }
+        }
+
+        public event EventHandler DescriptionChanged;
+        public event EventHandler ItemImageChanged;
+        public event EventHandler NameChanged;
+        public event EventHandler<CancelEventArgs<string>> NameChanging;
+        public event EventHandler ToStringChanged;
+
+        [StorableConstructor]
+        protected MOSolution(bool deserializing) : base() { }
+
+
+        protected MOSolution(MOSolution original, Cloner cloner) : this(original)
+        {
+            this.qualities = original.qualities;
+            this.solutions = original.solutions;
+            this.paretoFront = original.paretoFront;
+            this.objectives = original.objectives;
+        }
+        protected MOSolution(MOSolution original) : base()
+        {
+            this.qualities = original.qualities;
+            this.solutions = original.solutions;
+            this.paretoFront = original.paretoFront;
+            this.objectives = original.objectives;
+        }
+        protected MOSolution() : base() { }
+        public MOSolution(double[][] qualities, double[][] solutions, double[][] paretoFront, int objectives)
+        {
+            this.qualities = qualities;
+            this.solutions = solutions;
+            this.paretoFront = paretoFront;
+            this.objectives = objectives;
+        }
+
+        public object Clone()
+        {
+            return new MOSolution(this);
+        }
+
+        public IDeepCloneable Clone(Cloner cloner)
+        {
+            return (IDeepCloneable)Clone();
+        }
     }
-
-    public bool CanChangeName {
-      get {
-        return false;
-      }
-    }
-
-    public string Description {
-      get {
-        return "MYResult";
-      }
-
-      set { }
-    }
-
-    public string Filename {
-      get { return "MyFilename"; }
-
-      set { }
-    }
-
-    public string ItemDescription {
-      get { return "this is MOSolutionImplementation"; }
-    }
-
-    public Image ItemImage {
-      get {
-        return HeuristicLab.Common.Resources.VSImageLibrary.Function;
-      }
-    }
-
-    public string ItemName {
-      get {
-        return "MOSolution";
-      }
-    }
-
-    public Version ItemVersion {
-      get { return Version.Parse("0.1"); }
-    }
-
-    public string Name {
-      get {
-        return ItemName;
-      }
-
-      set { }
-    }
-
-    private double[][] qualities;
-
-    public double[][] Qualities {
-      get {
-        return qualities;
-      }
-
-      set {
-        qualities = value;
-      }
-    }
-
-    private int objectives;
-    public int Objectives {
-      get {
-        return objectives;
-      }
-
-      set {
-        objectives = value;
-      }
-    }
-
-    private double[][] solutions;
-    public double[][] Solutions {
-      get {
-        return solutions;
-      }
-
-      set {
-        solutions = value;
-      }
-    }
-
-    private double[][] paretoFront;
-    public double[][] ParetoFront {
-      get {
-        return paretoFront;
-      }
-
-      set {
-        paretoFront = value;
-      }
-    }
-
-    public event EventHandler DescriptionChanged;
-    public event EventHandler ItemImageChanged;
-    public event EventHandler NameChanged;
-    public event EventHandler<CancelEventArgs<string>> NameChanging;
-    public event EventHandler ToStringChanged;
-
-    [StorableConstructor]
-    protected MOSolution(bool deserializing) : base() { }
-
-
-    protected MOSolution(MOSolution original, Cloner cloner) : this(original) {
-      this.qualities = original.qualities;
-      this.solutions = original.solutions;
-      this.paretoFront = original.paretoFront;
-      this.objectives = original.objectives;
-    }
-    protected MOSolution(MOSolution original) : base() {
-      this.qualities = original.qualities;
-      this.solutions = original.solutions;
-      this.paretoFront = original.paretoFront;
-      this.objectives = original.objectives;
-    }
-    protected MOSolution() : base() { }
-    public MOSolution(double[][] qualities, double[][] solutions, double[][] paretoFront, int objectives) {
-      this.qualities = qualities;
-      this.solutions = solutions;
-      this.paretoFront = paretoFront;
-      this.objectives = objectives;
-    }
-
-    public object Clone() {
-      return new MOSolution(this);
-    }
-
-    public IDeepCloneable Clone(Cloner cloner) {
-      return (IDeepCloneable)Clone();
-    }
-  }
 }
