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 13775)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Calculators/HyperVolume.cs	(revision 13776)
@@ -57,4 +57,5 @@
       double[][] set = front.ToArray();   //Still no Good
       if (set.Length == 0) throw new ArgumentException("Fronts must not be empty");
+      if (refp.Length != set.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];
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/EmbeddedRessources/CF1.pf
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/EmbeddedRessources/CF1.pf	(revision 13776)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/EmbeddedRessources/CF1.pf	(revision 13776)
@@ -0,0 +1,21 @@
+﻿  0.0000000e+000	  1.0000000e+000	
+  5.0000000e-002	  9.5000000e-001	
+  1.0000000e-001	  9.0000000e-001	
+  1.5000000e-001	  8.5000000e-001	
+  2.0000000e-001	  8.0000000e-001	
+  2.5000000e-001	  7.5000000e-001	
+  3.0000000e-001	  7.0000000e-001	
+  3.5000000e-001	  6.5000000e-001	
+  4.0000000e-001	  6.0000000e-001	
+  4.5000000e-001	  5.5000000e-001	
+  5.0000000e-001	  5.0000000e-001	
+  5.5000000e-001	  4.5000000e-001	
+  6.0000000e-001	  4.0000000e-001	
+  6.5000000e-001	  3.5000000e-001	
+  7.0000000e-001	  3.0000000e-001	
+  7.5000000e-001	  2.5000000e-001	
+  8.0000000e-001	  2.0000000e-001	
+  8.5000000e-001	  1.5000000e-001	
+  9.0000000e-001	  1.0000000e-001	
+  9.5000000e-001	  5.0000000e-002	
+  1.0000000e+000	  0.0000000e+000	
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 13775)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/HeuristicLab.Problems.MultiObjectiveTestFunctions-3.3.csproj	(revision 13776)
@@ -154,4 +154,5 @@
     <Compile Include="Data\DTLZInstanceProvider.cs" />
     <Compile Include="Interfaces\IMOFrontModel.cs" />
+    <Compile Include="Testfunctions\CF1.cs" />
     <Compile Include="Views\MOSolution.cs" />
     <Compile Include="Views\MOFrontScatterPlotView.cs">
@@ -204,4 +205,5 @@
     <EmbeddedResource Include="EmbeddedRessources\ZDT4.pf" />
     <EmbeddedResource Include="EmbeddedRessources\ZDT6.pf" />
+    <EmbeddedResource Include="EmbeddedRessources\CF1.pf" />
     <None Include="HeuristicLab.snk" />
     <None Include="Plugin.cs.frame" />
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Interfaces/IConstrainedTestFunction.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Interfaces/IConstrainedTestFunction.cs	(revision 13776)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Interfaces/IConstrainedTestFunction.cs	(revision 13776)
@@ -0,0 +1,39 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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 HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+
+namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
+  /// <summary>
+  /// An interface which represents an evaluation operator for multi objective test functions.
+  /// </summary>
+  public interface IConstrainedTestFunction : INamedItem {
+
+    /// <summary>
+    /// checks whether a given solution violates the contraints of this function  
+    /// </summary>
+    /// <param name="point"></param>
+    /// <param name="objectives"></param>
+    /// <returns>a double array that holds the distances that describe how much every contraint is violated (0 is not violated) </returns>
+    double[] CheckConstraints(RealVector point, int objectives);
+  }
+}
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/MultiObjectiveTestFunctionProblem.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/MultiObjectiveTestFunctionProblem.cs	(revision 13775)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/MultiObjectiveTestFunctionProblem.cs	(revision 13776)
@@ -167,4 +167,17 @@
     }
 
+
+    /// <summary>
+    /// Checks whether a given solution violates the contraints of this function.
+    /// </summary>
+    /// <param name="individual"></param>
+    /// <returns>a double array that holds the distances that describe how much every contraint is violated (0 is not violated). If the current TestFunction does not have constraints an array of length 0 is returned</returns>
+    public double[] checkContraints(RealVector individual) {
+      if (TestFunction is IConstrainedTestFunction) {
+        return ((IConstrainedTestFunction)TestFunction).CheckConstraints(individual, Objectives);
+      }
+      return new double[0];
+    }
+
     public double[] Evaluate(RealVector individual, IRandom random) {
       return TestFunction.Evaluate(individual, Objectives);
Index: /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/CF1.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/CF1.cs	(revision 13776)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/CF1.cs	(revision 13776)
@@ -0,0 +1,123 @@
+﻿#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/DTLZ/DTLZ8.cs
===================================================================
--- /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/DTLZ/DTLZ8.cs	(revision 13775)
+++ /branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/DTLZ/DTLZ8.cs	(revision 13776)
@@ -26,7 +26,7 @@
 
 namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
-  [Item("DTLZ8", "Testfunction as defined as DTLZ7 in http://repository.ias.ac.in/81671/ [30.11.15]")]
+  [Item("DTLZ8", "Testfunction as defined as DTLZ7 in http://repository.ias.ac.in/81671/ [30.11.15]. There has been a renumbering therefore the numbers do not match")]
   [StorableClass]
-  public class DTLZ8 : DTLZ {
+  public class DTLZ8 : DTLZ, IConstrainedTestFunction {
 
 
@@ -38,40 +38,4 @@
     }
     public DTLZ8() : base() { }
-
-    public double[] Evaluate2(RealVector r, int objectives) {
-      if (r.Length < objectives) {
-        throw new ArgumentException("The dimensionality of the problem(ProblemSize) must be larger than or equal to ten times the number of objectives ");
-      }
-      double[] res = new double[objectives];
-
-      //calculate f0...fM-1;
-      double n = 10 * objectives;
-      for (int i = 1; i <= objectives; i++) {
-        double d = 0;
-        int c = 0;
-        for (int j = (int)Math.Floor((i - 1) * n / objectives); j < Math.Min((int)Math.Floor(i * n / objectives), r.Length); j++) {
-          d += r[j];
-          c++;
-        }
-        if (c != 0) {
-          d *= 1.0 / c;
-        }
-        res[i - 1] = d;
-      }
-
-      //evaluate constraints g0...gM-2
-      for (int i = 0; i < objectives - 1; i++) {
-        if (res[objectives - 1] + 4 * res[i] - 1 < 0) return MultiObjectiveTestFunction.IllegalValue(objectives, Maximization(objectives));
-      }
-      //evaluate gM-1
-      double min = Double.PositiveInfinity;
-      for (int i = 0; i < objectives - 1; i++) {
-        for (int j = 0; j < i; j++) min = Math.Min(min, res[i] + res[j]);
-      };
-      if (2 * res[objectives - 1] + min - 1 < 0) return MultiObjectiveTestFunction.IllegalValue(objectives, Maximization(objectives));
-
-      return res;
-    }
-
 
     public override double[] Evaluate(RealVector r, int objectives) {
@@ -104,5 +68,34 @@
     }
 
-
+    double[] IConstrainedTestFunction.CheckConstraints(RealVector r, int objectives) {
+      if (r.Length < 10 * objectives) throw new Exception("The dimensionality of the problem(ProblemSize) must be larger than ten times the number of objectives ");
+      double n = r.Length;
+      double M = objectives;
+      double ratio = n / M;
+      double[] res = new double[objectives];
+      double[] constraints = new double[objectives];
+      for (int j = 0; j < objectives; j++) {
+        double sum = 0;
+        for (int i = (int)(j * ratio); i < (j + 1) + ratio; i++) {
+          sum += r[i];
+        }
+        sum /= (int)ratio;
+        res[j] = sum;
+      }
+      for (int j = 0; j < M - 1; j++) {
+        double d1 = res[objectives - 1] + 4 * res[j] - 1;
+        constraints[j] = d1 < 0 ? -d1 : 0;
+      }
+      double min = Double.PositiveInfinity;
+      for (int i = 0; i < res.Length - 1; i++) {
+        for (int j = 0; j < i; j++) {
+          double d2 = res[i] + res[j];
+          if (min < d2) min = d2;
+        }
+      }
+      double d = 2 * res[objectives - 1] + min - 1;
+      constraints[constraints.Length - 1] = d < 0 ? -d : 0;
+      return constraints;
+    }
   }
 }
