Index: anches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/CrowdingIndicator.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/CrowdingIndicator.cs	(revision 15044)
+++ 	(revision )
@@ -1,65 +1,0 @@
-﻿#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 System;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Algorithms.MOCMAEvolutionStrategy {
-  [Item("CrowdingIndicator", "Selection of Offspring based on CrowdingDistance")]
-  [StorableClass]
-  internal class CrowdingIndicator : Item, IIndicator {
-
-    public int LeastContributer<TR>(IEnumerable<TR> front, Func<TR, double[]> extractor, MultiObjectiveBasicProblem<RealVectorEncoding> problem) {
-      var bounds = problem.Encoding.Bounds;
-      var extracted = front.Select(extractor.Invoke).ToArray();
-      if (extracted.Length <= 2) return 0;
-      var pointsums = new double[extracted.Length];
-
-      for (var dim = 0; dim < problem.Maximization.Length; dim++) {
-        var arr = extracted.Select(x => x[dim]).ToArray();
-        Array.Sort(arr);
-        var fmax = problem.Encoding.Bounds[dim % bounds.Rows, 1];
-        var fmin = bounds[dim % bounds.Rows, 0];
-        var pointIdx = 0;
-        foreach (var point in extracted) {
-          var pos = Array.BinarySearch(arr, point[dim]);
-          var d = pos != 0 && pos != arr.Length - 1 ? (arr[pos + 1] - arr[pos - 1]) / (fmax - fmin) : double.PositiveInfinity;
-          pointsums[pointIdx] += d;
-          pointIdx++;
-        }
-      }
-      //find min
-      return pointsums.ArgMin();
-    }
-
-    [StorableConstructor]
-    protected CrowdingIndicator(bool deserializing) : base(deserializing) { }
-    protected CrowdingIndicator(CrowdingIndicator original, Cloner cloner) : base(original, cloner) { }
-    public override IDeepCloneable Clone(Cloner cloner) { return new CrowdingIndicator(this, cloner); }
-    public CrowdingIndicator() { }
-  }
-}
Index: /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/DoubleMatrixHelper.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/DoubleMatrixHelper.cs	(revision 15045)
+++ /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/DoubleMatrixHelper.cs	(revision 15045)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * and the BEACON Center for the Study of Evolution in Action.
+ * 
+ * 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Algorithms.MOCMAEvolutionStrategy {
+  internal static class DoubleMatrixHelper {
+    internal static double[][] ToJaggedArray(this DoubleMatrix m) {
+      if (m == null) return null;
+      var i = m.Rows - 1;
+      var a = new double[i][];
+      for (i--; i >= 0; i--) {
+        var j = m.Columns;
+        a[i] = new double[j];
+        for (j--; j >= 0; j--) a[i][j] = m[i, j];
+      }
+      return a;
+    }
+
+    internal static DoubleMatrix ToMatrix(this IEnumerable<IReadOnlyList<double>> data) {
+      var d2 = data.ToArray();
+      var mat = new DoubleMatrix(d2.Length, d2[0].Count);
+      for (var i = 0; i < mat.Rows; i++)
+        for (var j = 0; j < mat.Columns; j++)
+          mat[i, j] = d2[i][j];
+      return mat;
+    }
+  }
+}
Index: /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/HeuristicLab.Algorithms.MOCMAEvolutionStrategy-3.3.csproj
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/HeuristicLab.Algorithms.MOCMAEvolutionStrategy-3.3.csproj	(revision 15044)
+++ /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/HeuristicLab.Algorithms.MOCMAEvolutionStrategy-3.3.csproj	(revision 15045)
@@ -106,14 +106,13 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="MinimalDistanceIndicator.cs" />
-    <Compile Include="CrowdingIndicator.cs" />
-    <Compile Include="HypervolumeIndicator.cs" />
+    <Compile Include="Indicators\MinimalDistanceIndicator.cs" />
+    <Compile Include="Indicators\CrowdingIndicator.cs" />
+    <Compile Include="Indicators\HypervolumeIndicator.cs" />
     <Compile Include="IIndicator.cs" />
-    <Compile Include="MocmaesIndividual.cs" />
-    <Compile Include="MocmaesParameters.cs" />
-    <Compile Include="MOCMASEvolutionStrategy.cs" />
+    <Compile Include="Individual.cs" />
+    <Compile Include="MOCMAEvolutionStrategy.cs" />
     <Compile Include="Plugin.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Utilities.cs" />
+    <Compile Include="DoubleMatrixHelper.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: anches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/HypervolumeIndicator.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/HypervolumeIndicator.cs	(revision 15044)
+++ 	(revision )
@@ -1,68 +1,0 @@
-﻿#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 System;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.TestFunctions.MultiObjective;
-namespace HeuristicLab.Algorithms.MOCMAEvolutionStrategy {
-  [Item("HypervolumeIndicator", "Selection of Offspring based on contributing Hypervolume")]
-  [StorableClass]
-  internal class HypervolumeIndicator : Item, IIndicator {
-
-    public int LeastContributer<TR>(IEnumerable<TR> front, Func<TR, double[]> extractor, MultiObjectiveBasicProblem<RealVectorEncoding> problem) {
-      var frontArr = front.Select(extractor.Invoke).ToList();
-      if (frontArr.Count <= 1) return 0;
-      var p = problem as MultiObjectiveTestFunctionProblem;
-      var refPoint = BuildReference(p != null ? frontArr.Concat(new[] { p.TestFunction.ReferencePoint(p.Objectives) }) : frontArr, problem.Maximization);
-      var hv = Hypervolume.Calculate(frontArr, refPoint, problem.Maximization);
-      var contributions = Enumerable.Range(0, frontArr.Count).Select(i => Contribution(frontArr, i, problem.Maximization, refPoint, hv));
-      return contributions.ArgMin();
-    }
-
-    private static double Contribution(IList<double[]> front, int idx, bool[] maximization, double[] refPoint, double hv) {
-      var point = front[idx];
-      front.RemoveAt(idx);
-      var contribution = hv - Hypervolume.Calculate(front, refPoint, maximization);
-      front.Insert(idx, point);
-      return contribution;
-    }
-    private static double[] BuildReference(IEnumerable<double[]> front, IReadOnlyList<bool> maximization) {
-      var refPoint = new double[maximization.Count];
-      foreach (var point in front)
-        for (var i = 0; i < maximization.Count; i++)
-          refPoint[i] = maximization[i] ? Math.Min(refPoint[i], point[i]) : Math.Max(refPoint[i], point[i]);
-      return refPoint;
-    }
-
-    [StorableConstructor]
-    protected HypervolumeIndicator(bool deserializing) : base(deserializing) { }
-    protected HypervolumeIndicator(HypervolumeIndicator original, Cloner cloner) : base(original, cloner) { }
-    public override IDeepCloneable Clone(Cloner cloner) { return new HypervolumeIndicator(this, cloner); }
-    public HypervolumeIndicator() { }
-  }
-}
Index: /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/IIndicator.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/IIndicator.cs	(revision 15044)
+++ /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/IIndicator.cs	(revision 15045)
@@ -19,5 +19,4 @@
  */
 #endregion
-using System;
 using System.Collections.Generic;
 using HeuristicLab.Core;
@@ -33,8 +32,7 @@
     /// <typeparam name="TR"></typeparam>
     /// <param name="front">a front which will be evaluated</param>
-    /// <param name="extractor">some mapping function to map any R to double[]</param>
     /// <param name="problem">The problem on which the front is evaluated (!! The function itself will NOT be evluated only bounds referencePoints & other metadate will be used</param>
     /// <returns>the index of the least contributing point according to any type of quality criteria</returns>
-    int LeastContributer<TR>(IEnumerable<TR> front, Func<TR, double[]> extractor, MultiObjectiveBasicProblem<RealVectorEncoding> problem);
+    int LeastContributer(IReadOnlyList<Individual> front, MultiObjectiveBasicProblem<RealVectorEncoding> problem);
   }
 }
Index: /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Indicators/CrowdingIndicator.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Indicators/CrowdingIndicator.cs	(revision 15045)
+++ /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Indicators/CrowdingIndicator.cs	(revision 15045)
@@ -0,0 +1,68 @@
+﻿#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 System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.MOCMAEvolutionStrategy {
+  [Item("CrowdingIndicator", "Selection of Offspring based on CrowdingDistance")]
+  [StorableClass]
+  internal class CrowdingIndicator : Item, IIndicator {
+    #region Constructors and Cloning
+    [StorableConstructor]
+    protected CrowdingIndicator(bool deserializing) : base(deserializing) { }
+    protected CrowdingIndicator(CrowdingIndicator original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new CrowdingIndicator(this, cloner); }
+    public CrowdingIndicator() { }
+    #endregion
+
+    public int LeastContributer(IReadOnlyList<Individual> front, MultiObjectiveBasicProblem<RealVectorEncoding> problem) {
+      var bounds = problem.Encoding.Bounds;
+      var extracted = front.Select(x => x.PenalizedFitness).ToArray();
+      if (extracted.Length <= 2) return 0;
+      var pointsums = new double[extracted.Length];
+
+      for (var dim = 0; dim < problem.Maximization.Length; dim++) {
+        var arr = extracted.Select(x => x[dim]).ToArray();
+        Array.Sort(arr);
+        var fmax = problem.Encoding.Bounds[dim % bounds.Rows, 1];
+        var fmin = bounds[dim % bounds.Rows, 0];
+        var pointIdx = 0;
+        foreach (var point in extracted) {
+          var pos = Array.BinarySearch(arr, point[dim]);
+          var d = pos != 0 && pos != arr.Length - 1 ? (arr[pos + 1] - arr[pos - 1]) / (fmax - fmin) : double.PositiveInfinity;
+          pointsums[pointIdx] += d;
+          pointIdx++;
+        }
+      }
+      //find min
+      return pointsums.Select((value, index) => new { value, index }).OrderBy(x => x.value).First().index;
+    }
+
+
+  }
+}
Index: /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Indicators/HypervolumeIndicator.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Indicators/HypervolumeIndicator.cs	(revision 15045)
+++ /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Indicators/HypervolumeIndicator.cs	(revision 15045)
@@ -0,0 +1,70 @@
+﻿#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 System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.TestFunctions.MultiObjective;
+namespace HeuristicLab.Algorithms.MOCMAEvolutionStrategy {
+  [Item("HypervolumeIndicator", "Selection of Offspring based on contributing Hypervolume")]
+  [StorableClass]
+  internal class HypervolumeIndicator : Item, IIndicator {
+    #region Constructors and Cloning
+    [StorableConstructor]
+    protected HypervolumeIndicator(bool deserializing) : base(deserializing) { }
+    protected HypervolumeIndicator(HypervolumeIndicator original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new HypervolumeIndicator(this, cloner); }
+    public HypervolumeIndicator() { }
+    #endregion
+
+    public int LeastContributer(IReadOnlyList<Individual> front, MultiObjectiveBasicProblem<RealVectorEncoding> problem) {
+      var frontCopy = front.Select(x => x.PenalizedFitness).ToList();
+      if (frontCopy.Count <= 1) return 0;
+      var p = problem as MultiObjectiveTestFunctionProblem;
+      var refPoint = BuildReferencePoint(p != null ? frontCopy.Concat(new[] { p.ReferencePoint.CloneAsArray() }) : frontCopy, problem.Maximization);
+      var contributions = Enumerable.Range(0, frontCopy.Count).Select(i => Contribution(frontCopy, i, problem.Maximization, refPoint));
+      return contributions.Select((value, index) => new { value, index }).OrderBy(x => x.value).First().index;
+    }
+
+    #region Helpers
+    private static double Contribution(IList<double[]> front, int idx, bool[] maximization, double[] refPoint) {
+      var point = front[idx];
+      front.RemoveAt(idx);
+      var contribution = -Hypervolume.Calculate(front, refPoint, maximization);
+      front.Insert(idx, point);
+      return contribution;
+    }
+    private static double[] BuildReferencePoint(IEnumerable<double[]> front, IReadOnlyList<bool> maximization) {
+      var refPoint = new double[maximization.Count];
+      foreach (var point in front)
+        for (var i = 0; i < maximization.Count; i++)
+          refPoint[i] = maximization[i] ? Math.Min(refPoint[i], point[i]) : Math.Max(refPoint[i], point[i]);
+      return refPoint;
+    }
+    #endregion
+  }
+}
Index: /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Indicators/MinimalDistanceIndicator.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Indicators/MinimalDistanceIndicator.cs	(revision 15045)
+++ /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Indicators/MinimalDistanceIndicator.cs	(revision 15045)
@@ -0,0 +1,101 @@
+﻿#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 System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.MOCMAEvolutionStrategy {
+  [Item("MinimalDistanceIndicator", "Selection of Offspring based on distance to nearest neighbour")]
+  [StorableClass]
+  internal class MinimalDistanceIndicator : Item, IIndicator {
+
+    #region Constructor and Cloning
+    [StorableConstructor]
+    protected MinimalDistanceIndicator(bool deserializing) : base(deserializing) { }
+    protected MinimalDistanceIndicator(MinimalDistanceIndicator original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new MinimalDistanceIndicator(this, cloner); }
+    public MinimalDistanceIndicator() { }
+    #endregion
+
+    public int LeastContributer(IReadOnlyList<Individual> front, MultiObjectiveBasicProblem<RealVectorEncoding> problem) {
+      var extracted = front.Select(x => x.PenalizedFitness).ToArray();
+      if (extracted.Length <= 2) return 0;
+      var distances = CalcDistances(extracted);
+      var mindexI = 0;
+      var mindexJ = 0;
+      var min = double.MaxValue;
+      for (var i = 0; i < extracted.Length; i++) {
+        var d = double.MaxValue;
+        var minj = 0;
+        for (var j = 0; j < extracted.Length; j++) {
+          if (i == j) continue;
+          var d1 = distances[i, j];
+          if (!(d1 < d)) continue;
+          minj = j;
+          d = d1;
+        }
+        if (!(d < min)) continue;
+        min = d;
+        mindexI = i;
+        mindexJ = minj;
+      }
+
+      //break tie with distance to second nearest
+      var minI = double.MaxValue;
+      var minJ = double.MaxValue;
+
+      for (var i = 0; i < extracted.Length; i++) {
+        double d;
+        if (mindexI != i) {
+          d = distances[mindexI, i];
+          if (!d.IsAlmost(min)) minI = Math.Min(minI, d);
+        }
+        if (mindexJ == i) continue;
+        d = distances[mindexJ, i];
+        if (!d.IsAlmost(min)) minJ = Math.Min(minJ, d);
+      }
+
+      //find min
+      return minI < minJ ? mindexI : mindexJ;
+    }
+
+    #region helpers
+    private static double[,] CalcDistances(IReadOnlyList<double[]> extracted) {
+      var res = new double[extracted.Count, extracted.Count];
+      for (var i = 0; i < extracted.Count; i++)
+        for (var j = 0; j < i; j++)
+          res[i, j] = res[j, i] = Dist(extracted[i], extracted[j]);
+      return res;
+    }
+
+    private static double Dist(IEnumerable<double> a, IEnumerable<double> b) {
+      return Math.Sqrt(a.Zip(b, (x, y) => (x - y) * (x - y)).Sum());
+    }
+    #endregion
+
+  }
+}
Index: /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Individual.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Individual.cs	(revision 15045)
+++ /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Individual.cs	(revision 15045)
@@ -0,0 +1,221 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * and the BEACON Center for the Study of Evolution in Action.
+ * 
+ * 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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Algorithms.MOCMAEvolutionStrategy {
+  [StorableClass]
+  public class Individual : IDeepCloneable {
+
+    public enum OffspringSuccess {
+      Success, NoSuccess
+    }
+
+    #region Properties
+    [Storable]
+    private MOCMAEvolutionStrategy strategy;
+
+    //Chromosome
+    [Storable]
+    public RealVector Mean { get; private set; }
+    [Storable]
+    private double sigma;//stepsize
+    [Storable]
+    private RealVector evolutionPath; // pc
+    [Storable]
+    private RealVector lastStep;
+    [Storable]
+    private RealVector lastZ;
+    [Storable]
+    private double[,] lowerCholesky;
+
+
+    //Phenotype
+    [Storable]
+    public double[] Fitness { get; set; }
+    [Storable]
+    public double[] PenalizedFitness { get; set; }
+    [Storable]
+    public bool Selected { get; set; }
+    [Storable]
+    public double Rank { get; set; }
+    [Storable]
+    public double SuccessProbability { get; set; }
+    #endregion
+
+    #region Constructors and Cloning
+    [StorableConstructor]
+    protected Individual(bool deserializing) { }
+
+    /// <summary>
+    /// 
+    /// </summary>
+    /// <param name="mean">has to be 0-vector with correct lenght</param>
+    /// <param name="pSucc">has to be ptargetsucc</param>
+    /// <param name="sigma">initialSigma</param>
+    /// <param name="pc">has to be 0-vector with correct lenght</param>
+    /// <param name="c">has to be a symmetric positive definit Covariance matrix</param>
+    public Individual(RealVector mean, double pSucc, double sigma, RealVector pc, double[,] c, MOCMAEvolutionStrategy strategy) {
+      Mean = mean;
+      lastStep = new RealVector(mean.Length);
+      SuccessProbability = pSucc;
+      this.sigma = sigma;
+      evolutionPath = pc;
+      CholeskyDecomposition(c);
+      Selected = true;
+      this.strategy = strategy;
+    }
+
+    public Individual(Individual other) {
+      SuccessProbability = other.SuccessProbability;
+      sigma = other.sigma;
+      evolutionPath = (RealVector)other.evolutionPath.Clone();
+      Mean = (RealVector)other.Mean.Clone();
+      lowerCholesky = (double[,])other.lowerCholesky.Clone();
+      Selected = true;
+      strategy = other.strategy;
+    }
+
+    public Individual(Individual other, Cloner cloner) {
+      strategy = cloner.Clone(other.strategy);
+      Mean = cloner.Clone(other.Mean);
+      sigma = other.sigma;
+      evolutionPath = cloner.Clone(other.evolutionPath);
+      lastStep = cloner.Clone(other.evolutionPath);
+      lastZ = cloner.Clone(other.lastZ);
+      lowerCholesky = other.lowerCholesky != null ? other.lowerCholesky.Clone() as double[,] : null;
+      Fitness = other.Fitness != null ? other.Fitness.Select(x => x).ToArray() : null;
+      PenalizedFitness = other.PenalizedFitness != null ? other.PenalizedFitness.Select(x => x).ToArray() : null;
+      Selected = other.Selected;
+      Rank = other.Rank;
+      SuccessProbability = other.SuccessProbability;
+    }
+
+    public object Clone() {
+      return new Cloner().Clone(this);
+    }
+
+    public IDeepCloneable Clone(Cloner cloner) {
+      return new Individual(this, cloner);
+    }
+    #endregion
+
+    public void Mutate(NormalDistributedRandom gauss) {
+      //sampling a random z from N(0,I) where I is the Identity matrix;
+      lastZ = new RealVector(Mean.Length);
+      var n = lastZ.Length;
+      for (var i = 0; i < n; i++) lastZ[i] = gauss.NextDouble();
+      //Matrixmultiplication: lastStep = lowerCholesky * lastZ;
+      lastStep = new RealVector(Mean.Length);
+      for (var i = 0; i < n; i++) {
+        double sum = 0;
+        for (var j = 0; j <= i; j++) sum += lowerCholesky[i, j] * lastZ[j];
+        lastStep[i] = sum;
+      }
+      //add the step to x weighted by stepsize;
+      for (var i = 0; i < Mean.Length; i++) Mean[i] += sigma * lastStep[i];
+    }
+
+    public void UpdateAsParent(bool offspringSuccessful) {
+      SuccessProbability = (1 - strategy.StepSizeLearningRate) * SuccessProbability + strategy.StepSizeLearningRate * (offspringSuccessful ? 1 : 0);
+      sigma *= Math.Exp(1 / strategy.StepSizeDampeningFactor * (SuccessProbability - strategy.TargetSuccessProbability) / (1 - strategy.TargetSuccessProbability));
+      if (!offspringSuccessful) return;
+      if (SuccessProbability < strategy.SuccessThreshold && lastZ != null) {
+        var stepNormSqr = lastZ.Sum(d => d * d);
+        var rate = strategy.CovarianceMatrixUnlearningRate;
+        if (stepNormSqr > 1 && 1 < strategy.CovarianceMatrixUnlearningRate * (2 * stepNormSqr - 1)) rate = 1 / (2 * stepNormSqr - 1);
+        CholeskyUpdate(lastStep, 1 + rate, -rate);
+
+      } else RoundUpdate();
+
+    }
+
+    public void UpdateAsOffspring() {
+      SuccessProbability = (1 - strategy.StepSizeLearningRate) * SuccessProbability + strategy.StepSizeLearningRate;
+      sigma *= Math.Exp(1 / strategy.StepSizeDampeningFactor * (SuccessProbability - strategy.TargetSuccessProbability) / (1 - strategy.TargetSuccessProbability));
+      var evolutionpathUpdateWeight = strategy.EvolutionPathLearningRate * (2.0 - strategy.EvolutionPathLearningRate);
+      if (SuccessProbability < strategy.SuccessThreshold) {
+        UpdateEvolutionPath(1 - strategy.EvolutionPathLearningRate, evolutionpathUpdateWeight);
+        CholeskyUpdate(evolutionPath, 1 - strategy.CovarianceMatrixLearningRate, strategy.CovarianceMatrixLearningRate);
+      } else {
+        RoundUpdate();
+      }
+    }
+
+    public void UpdateEvolutionPath(double learningRate, double updateWeight) {
+      updateWeight = Math.Sqrt(updateWeight);
+      for (var i = 0; i < evolutionPath.Length; i++) {
+        evolutionPath[i] *= learningRate;
+        evolutionPath[i] += updateWeight * lastStep[i];
+      }
+    }
+
+    #region helpers
+    private void CholeskyDecomposition(double[,] c) {
+      if (!alglib.spdmatrixcholesky(ref c, c.GetLength(0), false))
+        throw new ArgumentException("Covariancematrix is not symmetric positiv definit");
+      lowerCholesky = (double[,])c.Clone();
+    }
+
+    private void CholeskyUpdate(RealVector v, double alpha, double beta) {
+      var n = v.Length;
+      var temp = new double[n];
+      for (var i = 0; i < n; i++) temp[i] = v[i];
+      double betaPrime = 1;
+      var a = Math.Sqrt(alpha);
+      for (var j = 0; j < n; j++) {
+        var ljj = a * lowerCholesky[j, j];
+        var dj = ljj * ljj;
+        var wj = temp[j];
+        var swj2 = beta * wj * wj;
+        var gamma = dj * betaPrime + swj2;
+        var x1 = dj + swj2 / betaPrime;
+        if (x1 < 0.0) return;//throw new ArgumentException("Update makes Covariancematrix indefinite");//TODO check wether ignoring this update is valid
+        var nLjj = Math.Sqrt(x1);
+        lowerCholesky[j, j] = nLjj;
+        betaPrime += swj2 / dj;
+        if (j + 1 >= n) continue;
+        for (var i = j + 1; i < n; i++) lowerCholesky[i, j] *= a;
+        for (var i = j + 1; i < n; i++) temp[i] = wj / ljj * lowerCholesky[i, j];
+        if (gamma.IsAlmost(0)) continue;
+        for (var i = j + 1; i < n; i++) lowerCholesky[i, j] *= nLjj / ljj;
+        for (var i = j + 1; i < n; i++) lowerCholesky[i, j] += nLjj * beta * wj / gamma * temp[i];
+
+      }
+
+    }
+
+    private void RoundUpdate() {
+      var evolutionPathUpdateWeight = strategy.EvolutionPathLearningRate * (2.0 - strategy.EvolutionPathLearningRate);
+      UpdateEvolutionPath(1 - strategy.EvolutionPathLearningRate, 0);
+      CholeskyUpdate(evolutionPath, 1 - strategy.CovarianceMatrixLearningRate + evolutionPathUpdateWeight, strategy.CovarianceMatrixLearningRate);
+    }
+    #endregion
+
+  }
+
+}
Index: /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/MOCMAEvolutionStrategy.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/MOCMAEvolutionStrategy.cs	(revision 15045)
+++ /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/MOCMAEvolutionStrategy.cs	(revision 15045)
@@ -0,0 +1,649 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * and the BEACON Center for the Study of Evolution in Action.
+ * 
+ * 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 System.Threading;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.TestFunctions.MultiObjective;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Algorithms.MOCMAEvolutionStrategy {
+  [Item("MOCMA Evolution Strategy (MOCMAES)", "A multi objective evolution strategy based on covariance matrix adaptation. Code is based on 'Covariance Matrix Adaptation for Multi - objective Optimization' by Igel, Hansen and Roth")]
+  [Creatable(CreatableAttribute.Categories.PopulationBasedAlgorithms, Priority = 210)]
+  [StorableClass]
+  [System.Runtime.InteropServices.Guid("5AC20A69-BBBF-4153-B57D-3EAF92DC505E")]
+  public class MOCMAEvolutionStrategy : BasicAlgorithm {
+    public override Type ProblemType
+    {
+      get { return typeof(MultiObjectiveBasicProblem<RealVectorEncoding>); }
+    }
+    public new MultiObjectiveBasicProblem<RealVectorEncoding> Problem
+    {
+      get { return (MultiObjectiveBasicProblem<RealVectorEncoding>)base.Problem; }
+      set { base.Problem = value; }
+    }
+    public override bool SupportsPause
+    {
+      get { return true; }
+    }
+
+    #region storable fields
+    [Storable]
+    private IRandom random = new MersenneTwister();
+    [Storable]
+    private NormalDistributedRandom gauss;
+    [Storable]
+    private Individual[] solutions;
+    [Storable]
+    private double stepSizeLearningRate; //=cp learning rate in [0,1]
+    [Storable]
+    private double stepSizeDampeningFactor; //d
+    [Storable]
+    private double targetSuccessProbability;// p^target_succ
+    [Storable]
+    private double evolutionPathLearningRate;//cc
+    [Storable]
+    private double covarianceMatrixLearningRate;//ccov
+    [Storable]
+    private double covarianceMatrixUnlearningRate;
+    [Storable]
+    private double successThreshold; //ptresh
+    #endregion
+
+    #region ParameterNames
+    private const string MaximumRuntimeName = "Maximum Runtime";
+    private const string SeedName = "Seed";
+    private const string SetSeedRandomlyName = "SetSeedRandomly";
+    private const string PopulationSizeName = "PopulationSize";
+    private const string MaximumGenerationsName = "MaximumGenerations";
+    private const string MaximumEvaluatedSolutionsName = "MaximumEvaluatedSolutions";
+    private const string InitialSigmaName = "InitialSigma";
+    private const string IndicatorName = "Indicator";
+
+    private const string EvaluationsResultName = "Evaluations";
+    private const string IterationsResultName = "Generations";
+    private const string TimetableResultName = "Timetable";
+    private const string HypervolumeResultName = "Hypervolume";
+    private const string GenerationalDistanceResultName = "Generational Distance";
+    private const string InvertedGenerationalDistanceResultName = "Inverted Generational Distance";
+    private const string CrowdingResultName = "Crowding";
+    private const string SpacingResultName = "Spacing";
+    private const string CurrentFrontResultName = "Pareto Front";
+    private const string BestHypervolumeResultName = "Best Hypervolume";
+    private const string BestKnownHypervolumeResultName = "Best known hypervolume";
+    private const string DifferenceToBestKnownHypervolumeResultName = "Absolute Distance to BestKnownHypervolume";
+    private const string ScatterPlotResultName = "ScatterPlot";
+    #endregion
+
+    #region ParameterProperties
+    public IFixedValueParameter<IntValue> MaximumRuntimeParameter
+    {
+      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumRuntimeName]; }
+    }
+    public IFixedValueParameter<IntValue> SeedParameter
+    {
+      get { return (IFixedValueParameter<IntValue>)Parameters[SeedName]; }
+    }
+    public FixedValueParameter<BoolValue> SetSeedRandomlyParameter
+    {
+      get { return (FixedValueParameter<BoolValue>)Parameters[SetSeedRandomlyName]; }
+    }
+    public IFixedValueParameter<IntValue> PopulationSizeParameter
+    {
+      get { return (IFixedValueParameter<IntValue>)Parameters[PopulationSizeName]; }
+    }
+    public IFixedValueParameter<IntValue> MaximumGenerationsParameter
+    {
+      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumGenerationsName]; }
+    }
+    public IFixedValueParameter<IntValue> MaximumEvaluatedSolutionsParameter
+    {
+      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumEvaluatedSolutionsName]; }
+    }
+    public IValueParameter<DoubleArray> InitialSigmaParameter
+    {
+      get { return (IValueParameter<DoubleArray>)Parameters[InitialSigmaName]; }
+    }
+    public IConstrainedValueParameter<IIndicator> IndicatorParameter
+    {
+      get { return (IConstrainedValueParameter<IIndicator>)Parameters[IndicatorName]; }
+    }
+    #endregion
+
+    #region Properties
+    public int MaximumRuntime
+    {
+      get { return MaximumRuntimeParameter.Value.Value; }
+      set { MaximumRuntimeParameter.Value.Value = value; }
+    }
+    public int Seed
+    {
+      get { return SeedParameter.Value.Value; }
+      set { SeedParameter.Value.Value = value; }
+    }
+    public bool SetSeedRandomly
+    {
+      get { return SetSeedRandomlyParameter.Value.Value; }
+      set { SetSeedRandomlyParameter.Value.Value = value; }
+    }
+    public int PopulationSize
+    {
+      get { return PopulationSizeParameter.Value.Value; }
+      set { PopulationSizeParameter.Value.Value = value; }
+    }
+    public int MaximumGenerations
+    {
+      get { return MaximumGenerationsParameter.Value.Value; }
+      set { MaximumGenerationsParameter.Value.Value = value; }
+    }
+    public int MaximumEvaluatedSolutions
+    {
+      get { return MaximumEvaluatedSolutionsParameter.Value.Value; }
+      set { MaximumEvaluatedSolutionsParameter.Value.Value = value; }
+    }
+    public DoubleArray InitialSigma
+    {
+      get { return InitialSigmaParameter.Value; }
+      set { InitialSigmaParameter.Value = value; }
+    }
+    public IIndicator Indicator
+    {
+      get { return IndicatorParameter.Value; }
+      set { IndicatorParameter.Value = value; }
+    }
+
+    public double StepSizeLearningRate { get { return stepSizeLearningRate; } }
+    public double StepSizeDampeningFactor { get { return stepSizeDampeningFactor; } }
+    public double TargetSuccessProbability { get { return targetSuccessProbability; } }
+    public double EvolutionPathLearningRate { get { return evolutionPathLearningRate; } }
+    public double CovarianceMatrixLearningRate { get { return covarianceMatrixLearningRate; } }
+    public double CovarianceMatrixUnlearningRate { get { return covarianceMatrixUnlearningRate; } }
+    public double SuccessThreshold { get { return successThreshold; } }
+    #endregion
+
+    #region ResultsProperties
+    private int ResultsEvaluations
+    {
+      get { return ((IntValue)Results[EvaluationsResultName].Value).Value; }
+      set { ((IntValue)Results[EvaluationsResultName].Value).Value = value; }
+    }
+    private int ResultsIterations
+    {
+      get { return ((IntValue)Results[IterationsResultName].Value).Value; }
+      set { ((IntValue)Results[IterationsResultName].Value).Value = value; }
+    }
+    #region Datatable
+    private DataTable ResultsQualities
+    {
+      get { return (DataTable)Results[TimetableResultName].Value; }
+    }
+    private DataRow ResultsBestHypervolumeDataLine
+    {
+      get { return ResultsQualities.Rows[BestHypervolumeResultName]; }
+    }
+    private DataRow ResultsHypervolumeDataLine
+    {
+      get { return ResultsQualities.Rows[HypervolumeResultName]; }
+    }
+    private DataRow ResultsGenerationalDistanceDataLine
+    {
+      get { return ResultsQualities.Rows[GenerationalDistanceResultName]; }
+    }
+    private DataRow ResultsInvertedGenerationalDistanceDataLine
+    {
+      get { return ResultsQualities.Rows[InvertedGenerationalDistanceResultName]; }
+    }
+    private DataRow ResultsCrowdingDataLine
+    {
+      get { return ResultsQualities.Rows[CrowdingResultName]; }
+    }
+    private DataRow ResultsSpacingDataLine
+    {
+      get { return ResultsQualities.Rows[SpacingResultName]; }
+    }
+    private DataRow ResultsHypervolumeDifferenceDataLine
+    {
+      get { return ResultsQualities.Rows[DifferenceToBestKnownHypervolumeResultName]; }
+    }
+    #endregion
+    //QualityIndicators
+    private double ResultsHypervolume
+    {
+      get { return ((DoubleValue)Results[HypervolumeResultName].Value).Value; }
+      set { ((DoubleValue)Results[HypervolumeResultName].Value).Value = value; }
+    }
+    private double ResultsGenerationalDistance
+    {
+      get { return ((DoubleValue)Results[GenerationalDistanceResultName].Value).Value; }
+      set { ((DoubleValue)Results[GenerationalDistanceResultName].Value).Value = value; }
+    }
+    private double ResultsInvertedGenerationalDistance
+    {
+      get { return ((DoubleValue)Results[InvertedGenerationalDistanceResultName].Value).Value; }
+      set { ((DoubleValue)Results[InvertedGenerationalDistanceResultName].Value).Value = value; }
+    }
+    private double ResultsCrowding
+    {
+      get { return ((DoubleValue)Results[CrowdingResultName].Value).Value; }
+      set { ((DoubleValue)Results[CrowdingResultName].Value).Value = value; }
+    }
+    private double ResultsSpacing
+    {
+      get { return ((DoubleValue)Results[SpacingResultName].Value).Value; }
+      set { ((DoubleValue)Results[SpacingResultName].Value).Value = value; }
+    }
+    private double ResultsBestHypervolume
+    {
+      get { return ((DoubleValue)Results[BestHypervolumeResultName].Value).Value; }
+      set { ((DoubleValue)Results[BestHypervolumeResultName].Value).Value = value; }
+    }
+    private double ResultsBestKnownHypervolume
+    {
+      get { return ((DoubleValue)Results[BestKnownHypervolumeResultName].Value).Value; }
+      set { ((DoubleValue)Results[BestKnownHypervolumeResultName].Value).Value = value; }
+    }
+    private double ResultsDifferenceBestKnownHypervolume
+    {
+      get { return ((DoubleValue)Results[DifferenceToBestKnownHypervolumeResultName].Value).Value; }
+      set { ((DoubleValue)Results[DifferenceToBestKnownHypervolumeResultName].Value).Value = value; }
+
+    }
+    //Solutions
+    private DoubleMatrix ResultsSolutions
+    {
+      get { return (DoubleMatrix)Results[CurrentFrontResultName].Value; }
+      set { Results[CurrentFrontResultName].Value = value; }
+    }
+    private ScatterPlotContent ResultsScatterPlot
+    {
+      get { return (ScatterPlotContent)Results[ScatterPlotResultName].Value; }
+      set { Results[ScatterPlotResultName].Value = value; }
+    }
+    #endregion
+
+    #region Constructors
+    public MOCMAEvolutionStrategy() {
+      Parameters.Add(new FixedValueParameter<IntValue>(MaximumRuntimeName, "The maximum runtime in seconds after which the algorithm stops. Use -1 to specify no limit for the runtime", new IntValue(3600)));
+      Parameters.Add(new FixedValueParameter<IntValue>(SeedName, "The random seed used to initialize the new pseudo random number generator.", new IntValue(0)));
+      Parameters.Add(new FixedValueParameter<BoolValue>(SetSeedRandomlyName, "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true)));
+      Parameters.Add(new FixedValueParameter<IntValue>(PopulationSizeName, "λ (lambda) - the size of the offspring population.", new IntValue(20)));
+      Parameters.Add(new ValueParameter<DoubleArray>(InitialSigmaName, "The initial sigma can be a single value or a value for each dimension. All values need to be > 0.", new DoubleArray(new[] { 0.5 })));
+      Parameters.Add(new FixedValueParameter<IntValue>(MaximumGenerationsName, "The maximum number of generations which should be processed.", new IntValue(1000)));
+      Parameters.Add(new FixedValueParameter<IntValue>(MaximumEvaluatedSolutionsName, "The maximum number of evaluated solutions that should be computed.", new IntValue(int.MaxValue)));
+      var set = new ItemSet<IIndicator> { new HypervolumeIndicator(), new CrowdingIndicator(), new MinimalDistanceIndicator() };
+      Parameters.Add(new ConstrainedValueParameter<IIndicator>(IndicatorName, "The selection mechanism on non-dominated solutions", set, set.First()));
+    }
+
+    [StorableConstructor]
+    protected MOCMAEvolutionStrategy(bool deserializing) : base(deserializing) { }
+
+    protected MOCMAEvolutionStrategy(MOCMAEvolutionStrategy original, Cloner cloner) : base(original, cloner) {
+      random = cloner.Clone(original.random);
+      gauss = cloner.Clone(original.gauss);
+      solutions = original.solutions.Select(cloner.Clone).ToArray();
+      stepSizeLearningRate = original.stepSizeLearningRate;
+      stepSizeDampeningFactor = original.stepSizeDampeningFactor;
+      targetSuccessProbability = original.targetSuccessProbability;
+      evolutionPathLearningRate = original.evolutionPathLearningRate;
+      covarianceMatrixLearningRate = original.covarianceMatrixLearningRate;
+      covarianceMatrixUnlearningRate = original.covarianceMatrixUnlearningRate;
+      successThreshold = original.successThreshold;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) { return new MOCMAEvolutionStrategy(this, cloner); }
+    #endregion
+
+    #region Initialization
+    protected override void Initialize(CancellationToken cancellationToken) {
+      if (SetSeedRandomly) Seed = new System.Random().Next();
+      random.Reset(Seed);
+      gauss = new NormalDistributedRandom(random, 0, 1);
+
+      InitResults();
+      InitStrategy();
+      InitSolutions();
+      Analyze();
+
+      ResultsIterations = 1;
+      cancellationToken.ThrowIfCancellationRequested();
+    }
+    private Individual InitializeIndividual(RealVector x) {
+      var zeros = new RealVector(x.Length);
+      var c = new double[x.Length, x.Length];
+      var sigma = InitialSigma.Max();
+      for (var i = 0; i < x.Length; i++) {
+        var d = InitialSigma[i % InitialSigma.Length] / sigma;
+        c[i, i] = d * d;
+      }
+      return new Individual(x, targetSuccessProbability, sigma, zeros, c, this);
+    }
+    private void InitSolutions() {
+      solutions = new Individual[PopulationSize];
+      for (var i = 0; i < PopulationSize; i++) {
+        var x = new RealVector(Problem.Encoding.Length); // Uniform distibution in all dimensions assumed.
+        var bounds = Problem.Encoding.Bounds;
+        for (var j = 0; j < Problem.Encoding.Length; j++) {
+          var dim = j % bounds.Rows;
+          x[j] = random.NextDouble() * (bounds[dim, 1] - bounds[dim, 0]) + bounds[dim, 0];
+        }
+        solutions[i] = InitializeIndividual(x);
+        PenalizeEvaluate(solutions[i]);
+      }
+    }
+    private void InitStrategy() {
+      const int lambda = 1;
+      double n = Problem.Encoding.Length;
+      targetSuccessProbability = 1.0 / (5.0 + Math.Sqrt(lambda) / 2.0);
+      stepSizeDampeningFactor = 1.0 + n / (2.0 * lambda);
+      stepSizeLearningRate = targetSuccessProbability * lambda / (2.0 + targetSuccessProbability * lambda);
+      evolutionPathLearningRate = 2.0 / (n + 2.0);
+      covarianceMatrixLearningRate = 2.0 / (n * n + 6.0);
+      covarianceMatrixUnlearningRate = 0.4 / (Math.Pow(n, 1.6) + 1);
+      successThreshold = 0.44;
+    }
+    private void InitResults() {
+      Results.Add(new Result(IterationsResultName, "The number of gererations evaluated", new IntValue(0)));
+      Results.Add(new Result(EvaluationsResultName, "The number of function evaltions performed", new IntValue(0)));
+      Results.Add(new Result(HypervolumeResultName, "The hypervolume of the current front considering the Referencepoint defined in the Problem", new DoubleValue(0.0)));
+      Results.Add(new Result(BestHypervolumeResultName, "The best hypervolume of the current run considering the Referencepoint defined in the Problem", new DoubleValue(0.0)));
+      Results.Add(new Result(BestKnownHypervolumeResultName, "The best knwon hypervolume considering the Referencepoint defined in the Problem", new DoubleValue(double.NaN)));
+      Results.Add(new Result(DifferenceToBestKnownHypervolumeResultName, "The difference between the current and the best known hypervolume", new DoubleValue(double.NaN)));
+      Results.Add(new Result(GenerationalDistanceResultName, "The generational distance to an optimal pareto front defined in the Problem", new DoubleValue(double.NaN)));
+      Results.Add(new Result(InvertedGenerationalDistanceResultName, "The inverted generational distance to an optimal pareto front defined in the Problem", new DoubleValue(double.NaN)));
+      Results.Add(new Result(CrowdingResultName, "The average crowding value for the current front (excluding infinities)", new DoubleValue(0.0)));
+      Results.Add(new Result(SpacingResultName, "The spacing for the current front (excluding infinities)", new DoubleValue(0.0)));
+
+      var table = new DataTable("QualityIndicators");
+      table.Rows.Add(new DataRow(BestHypervolumeResultName));
+      table.Rows.Add(new DataRow(HypervolumeResultName));
+      table.Rows.Add(new DataRow(CrowdingResultName));
+      table.Rows.Add(new DataRow(GenerationalDistanceResultName));
+      table.Rows.Add(new DataRow(InvertedGenerationalDistanceResultName));
+      table.Rows.Add(new DataRow(DifferenceToBestKnownHypervolumeResultName));
+      table.Rows.Add(new DataRow(SpacingResultName));
+      Results.Add(new Result(TimetableResultName, "Different quality meassures in a timeseries", table));
+      Results.Add(new Result(CurrentFrontResultName, "The current front", new DoubleMatrix()));
+      Results.Add(new Result(ScatterPlotResultName, "A scatterplot displaying the evaluated solutions and (if available) the analytically optimal front", new ScatterPlotContent(null, null, null, 2)));
+
+      var problem = Problem as MultiObjectiveTestFunctionProblem;
+      if (problem == null) return;
+      if (problem.BestKnownFront != null) {
+        ResultsBestKnownHypervolume = Hypervolume.Calculate(problem.BestKnownFront.ToJaggedArray(), problem.TestFunction.ReferencePoint(problem.Objectives), Problem.Maximization);
+        ResultsDifferenceBestKnownHypervolume = ResultsBestKnownHypervolume;
+      }
+      //TODO? move FrontScatterPlotContent partially? to MultiobjectiveTestProblem?
+      ResultsScatterPlot = new ScatterPlotContent(new double[0][], new double[0][], problem.BestKnownFront.ToJaggedArray(), problem.Objectives);
+    }
+    #endregion
+
+    #region Mainloop
+    protected override void Run(CancellationToken cancellationToken) {
+      while (ResultsIterations < MaximumGenerations) {
+        try {
+          Iterate();
+          ResultsIterations++;
+          cancellationToken.ThrowIfCancellationRequested();
+        }
+        finally {
+          Analyze();
+        }
+      }
+    }
+    private void Iterate() {
+      var offspring = solutions.Select(i => {
+        var o = new Individual(i);
+        o.Mutate(gauss);
+        PenalizeEvaluate(o);
+        return o;
+      });
+      var parents = solutions.Concat(offspring).ToArray();
+      SelectParents(parents, solutions.Length);
+      UpdatePopulation(parents);
+    }
+    protected override void OnExecutionTimeChanged() {
+      base.OnExecutionTimeChanged();
+      if (CancellationTokenSource == null) return;
+      if (MaximumRuntime == -1) return;
+      if (ExecutionTime.TotalSeconds > MaximumRuntime) CancellationTokenSource.Cancel();
+    }
+    #endregion
+
+    #region Evaluation
+    private void PenalizeEvaluate(Individual individual) {
+      if (IsFeasable(individual.Mean)) {
+        individual.Fitness = Evaluate(individual.Mean);
+        individual.PenalizedFitness = individual.Fitness;
+      } else {
+        var t = ClosestFeasible(individual.Mean);
+        individual.Fitness = Evaluate(t);
+        individual.PenalizedFitness = Penalize(individual.Mean, t, individual.Fitness);
+      }
+    }
+    private double[] Evaluate(RealVector x) {
+      var res = Problem.Evaluate(new SingleEncodingIndividual(Problem.Encoding, new Scope { Variables = { new Variable(Problem.Encoding.Name, x) } }), random);
+      ResultsEvaluations++;
+      return res;
+    }
+    private double[] Penalize(RealVector x, RealVector t, IEnumerable<double> fitness) {
+      var penalty = x.Zip(t, (a, b) => (a - b) * (a - b)).Sum() * 1E-6;
+      return fitness.Select((v, i) => Problem.Maximization[i] ? v - penalty : v + penalty).ToArray();
+    }
+    private RealVector ClosestFeasible(RealVector x) {
+      var bounds = Problem.Encoding.Bounds;
+      var r = new RealVector(x.Length);
+      for (var i = 0; i < x.Length; i++) {
+        var dim = i % bounds.Rows;
+        r[i] = Math.Min(Math.Max(bounds[dim, 0], x[i]), bounds[dim, 1]);
+      }
+      return r;
+    }
+    private bool IsFeasable(RealVector offspring) {
+      var bounds = Problem.Encoding.Bounds;
+      for (var i = 0; i < offspring.Length; i++) {
+        var dim = i % bounds.Rows;
+        if (bounds[dim, 0] > offspring[i] || offspring[i] > bounds[dim, 1]) return false;
+      }
+      return true;
+    }
+    #endregion
+
+    private void SelectParents(IReadOnlyList<Individual> parents, int length) {
+      //perform a nondominated sort to assign the rank to every element
+      var fronts = NonDominatedSort(parents);
+
+      //deselect the highest rank fronts until we would end up with less or equal mu elements
+      var rank = fronts.Count - 1;
+      var popSize = parents.Count;
+      while (popSize - fronts[rank].Count >= length) {
+        var front = fronts[rank];
+        foreach (var i in front) i.Selected = false;
+        popSize -= front.Count;
+        rank--;
+      }
+
+      //now use the indicator to deselect the approximatingly worst elements of the last selected front
+      var front1 = fronts[rank].OrderBy(x => x.PenalizedFitness[0]).ToList();
+      for (; popSize > length; popSize--) {
+        var lc = Indicator.LeastContributer(front1, Problem);
+        front1[lc].Selected = false;
+        front1.Swap(lc, front1.Count - 1);
+        front1.RemoveAt(front1.Count - 1);
+      }
+    }
+
+    private void UpdatePopulation(IReadOnlyList<Individual> parents) {
+      foreach (var p in parents.Skip(solutions.Length).Where(i => i.Selected))
+        p.UpdateAsOffspring();
+
+      for (var i = 0; i < solutions.Length; i++)
+        if (parents[i].Selected)
+          parents[i].UpdateAsParent(parents[i + solutions.Length].Selected);
+
+      solutions = parents.Where(p => p.Selected).ToArray();
+    }
+
+    private void Analyze() {
+      //TODO? move FrontScatterPlotContent partially to MultiobjectiveTestProblem 
+      ResultsScatterPlot = new ScatterPlotContent(solutions.Select(x => x.Fitness).ToArray(), solutions.Select(x => x.Mean.ToArray()).ToArray(), ResultsScatterPlot.ParetoFront, ResultsScatterPlot.Objectives);
+
+      ResultsSolutions = solutions.Select(x => x.Mean.ToArray()).ToMatrix();
+
+      var problem = Problem as MultiObjectiveTestFunctionProblem;
+      if (problem == null) return;
+
+      var front = NonDominatedSelect.GetDominatingVectors(solutions.Select(x => x.Fitness), problem.ReferencePoint.CloneAsArray(), Problem.Maximization, true).ToArray();
+      if (front.Length == 0) return;
+      var bounds = problem.Bounds.CloneAsMatrix();
+      ResultsCrowding = Crowding.Calculate(front, bounds);
+      ResultsSpacing = Spacing.Calculate(front);
+      ResultsGenerationalDistance = problem.BestKnownFront != null ? GenerationalDistance.Calculate(front, problem.BestKnownFront.ToJaggedArray(), 1) : double.NaN;
+      ResultsInvertedGenerationalDistance = problem.BestKnownFront != null ? InvertedGenerationalDistance.Calculate(front, problem.BestKnownFront.ToJaggedArray(), 1) : double.NaN;
+      ResultsHypervolume = Hypervolume.Calculate(front, problem.ReferencePoint.CloneAsArray(), Problem.Maximization);
+      ResultsBestHypervolume = Math.Max(ResultsHypervolume, ResultsBestHypervolume);
+      ResultsDifferenceBestKnownHypervolume = ResultsBestKnownHypervolume - ResultsBestHypervolume;
+
+      ResultsBestHypervolumeDataLine.Values.Add(ResultsBestHypervolume);
+      ResultsHypervolumeDataLine.Values.Add(ResultsHypervolume);
+      ResultsCrowdingDataLine.Values.Add(ResultsCrowding);
+      ResultsGenerationalDistanceDataLine.Values.Add(ResultsGenerationalDistance);
+      ResultsInvertedGenerationalDistanceDataLine.Values.Add(ResultsInvertedGenerationalDistance);
+      ResultsSpacingDataLine.Values.Add(ResultsSpacing);
+      ResultsHypervolumeDifferenceDataLine.Values.Add(ResultsDifferenceBestKnownHypervolume);
+
+      Problem.Analyze(
+        solutions.Select(x => (Optimization.Individual)new SingleEncodingIndividual(Problem.Encoding, new Scope { Variables = { new Variable(Problem.Encoding.Name, x.Mean) } })).ToArray(),
+        solutions.Select(x => x.Fitness).ToArray(),
+        Results,
+        random);
+    }
+
+    #region FastNonDominatedSort
+    //blatantly stolen form HeuristicLab.Optimization.Operators.FastNonDominatedSort
+    //however: Operators.FastNonDominatedSort does not return ranked fronts => rerank after sorting would not be sensible
+
+    private enum DominationResult { Dominates, IsDominated, IsNonDominated };
+    private List<List<Individual>> NonDominatedSort(IReadOnlyList<Individual> individuals) {
+      const bool dominateOnEqualQualities = false;
+      var maximization = Problem.Maximization;
+      if (individuals == null) throw new InvalidOperationException(Name + ": No qualities found.");
+      var populationSize = individuals.Count;
+
+      var fronts = new List<List<Individual>>();
+      var dominatedScopes = new Dictionary<Individual, List<int>>();
+      var dominationCounter = new int[populationSize];
+
+      for (var pI = 0; pI < populationSize - 1; pI++) {
+        var p = individuals[pI];
+        List<int> dominatedScopesByp;
+        if (!dominatedScopes.TryGetValue(p, out dominatedScopesByp))
+          dominatedScopes[p] = dominatedScopesByp = new List<int>();
+        for (var qI = pI + 1; qI < populationSize; qI++) {
+          var test = Dominates(individuals[pI], individuals[qI], maximization, dominateOnEqualQualities);
+          if (test == DominationResult.Dominates) {
+            dominatedScopesByp.Add(qI);
+            dominationCounter[qI] += 1;
+          } else if (test == DominationResult.IsDominated) {
+            dominationCounter[pI] += 1;
+            if (!dominatedScopes.ContainsKey(individuals[qI]))
+              dominatedScopes.Add(individuals[qI], new List<int>());
+            dominatedScopes[individuals[qI]].Add(pI);
+          }
+          if (pI == populationSize - 2
+            && qI == populationSize - 1
+            && dominationCounter[qI] == 0) {
+            AddToFront(individuals[qI], fronts, 0);
+          }
+        }
+        if (dominationCounter[pI] == 0) {
+          AddToFront(p, fronts, 0);
+        }
+      }
+      var i = 0;
+      while (i < fronts.Count && fronts[i].Count > 0) {
+        var nextFront = new List<Individual>();
+        foreach (var p in fronts[i]) {
+          List<int> dominatedScopesByp;
+          if (!dominatedScopes.TryGetValue(p, out dominatedScopesByp)) continue;
+          foreach (var dominatedScope in dominatedScopesByp) {
+            dominationCounter[dominatedScope] -= 1;
+            if (dominationCounter[dominatedScope] != 0) continue;
+            nextFront.Add(individuals[dominatedScope]);
+          }
+        }
+        i += 1;
+        fronts.Add(nextFront);
+      }
+
+      for (i = 0; i < fronts.Count; i++) {
+        foreach (var p in fronts[i]) {
+          p.Rank = i;
+        }
+      }
+      return fronts;
+    }
+    private static void AddToFront(Individual p, IList<List<Individual>> fronts, int i) {
+      if (i == fronts.Count) fronts.Add(new List<Individual>());
+      fronts[i].Add(p);
+    }
+    private static DominationResult Dominates(Individual left, Individual right, bool[] maximizations, bool dominateOnEqualQualities) {
+      return Dominates(left.PenalizedFitness, right.PenalizedFitness, maximizations, dominateOnEqualQualities);
+    }
+    private static DominationResult Dominates(IReadOnlyList<double> left, IReadOnlyList<double> right, IReadOnlyList<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 (var i = 0; i < left.Count; i++) {
+          if (left[i] != right[i]) {
+            equal = false;
+            break;
+          }
+        }
+        if (equal) return DominationResult.Dominates;
+      }
+
+      bool leftIsBetter = false, rightIsBetter = false;
+      for (var i = 0; i < left.Count; 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;
+    }
+    #endregion
+  }
+}
Index: anches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/MOCMASEvolutionStrategy.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/MOCMASEvolutionStrategy.cs	(revision 15044)
+++ 	(revision )
@@ -1,618 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- * and the BEACON Center for the Study of Evolution in Action.
- * 
- * 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 System.Threading;
-using HeuristicLab.Algorithms.CMAEvolutionStrategy;
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.TestFunctions.MultiObjective;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.Algorithms.MOCMAEvolutionStrategy {
-  [Item("MOCMAS Evolution Strategy (MOCMASES)", "A multi objective evolution strategy based on covariance matrix adaptation. Code is based on 'Covariance Matrix Adaptation for Multi - objective Optimization' by Igel, Hansen and Roth")]
-  [Creatable(CreatableAttribute.Categories.PopulationBasedAlgorithms, Priority = 210)]
-  [StorableClass]
-  public class MOCMASEvolutionStrategy : BasicAlgorithm {
-    public override Type ProblemType {
-      get { return typeof(MultiObjectiveBasicProblem<RealVectorEncoding>); }
-    }
-    public new MultiObjectiveBasicProblem<RealVectorEncoding> Problem {
-      get { return (MultiObjectiveBasicProblem<RealVectorEncoding>)base.Problem; }
-      set { base.Problem = value; }
-    }
-    public override bool SupportsPause {
-      get { return true; }
-    }
-
-    #region internal variables
-    private readonly IRandom random = new MersenneTwister();
-    private NormalDistributedRandom gauss;
-    private MOCMAESIndividual[] solutions;
-    private MOCMAESParameters internals;
-    #endregion
-
-    #region ParameterNames
-    private const string MaximumRuntimeName = "Maximum Runtime";
-    private const string SeedName = "Seed";
-    private const string SetSeedRandomlyName = "SetSeedRandomly";
-    private const string PopulationSizeName = "PopulationSize";
-    private const string MaximumGenerationsName = "MaximumGenerations";
-    private const string MaximumEvaluatedSolutionsName = "MaximumEvaluatedSolutions";
-    private const string InitialSigmaName = "InitialSigma";
-    private const string IndicatorName = "Indicator";
-
-    private const string EvaluationsResultName = "Evaluations";
-    private const string IterationsResultName = "Generations";
-    private const string TimetableResultName = "Timetable";
-    private const string HypervolumeResultName = "Hypervolume";
-    private const string GenerationalDistanceResultName = "Generational Distance";
-    private const string InvertedGenerationalDistanceResultName = "Inverted Generational Distance";
-    private const string CrowdingResultName = "Crowding";
-    private const string SpacingResultName = "Spacing";
-    private const string CurrentFrontResultName = "Pareto Front";
-    private const string BestHypervolumeResultName = "Best Hypervolume";
-    private const string BestKnownHypervolumeResultName = "Best known hypervolume";
-    private const string DifferenceToBestKnownHypervolumeResultName = "Absolute Distance to BestKnownHypervolume";
-    private const string ScatterPlotResultName = "ScatterPlot";
-
-    #endregion
-
-    #region ParameterProperties
-    public IFixedValueParameter<IntValue> MaximumRuntimeParameter {
-      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumRuntimeName]; }
-    }
-    public IFixedValueParameter<IntValue> SeedParameter {
-      get { return (IFixedValueParameter<IntValue>)Parameters[SeedName]; }
-    }
-    public FixedValueParameter<BoolValue> SetSeedRandomlyParameter {
-      get { return (FixedValueParameter<BoolValue>)Parameters[SetSeedRandomlyName]; }
-    }
-    public IFixedValueParameter<IntValue> PopulationSizeParameter {
-      get { return (IFixedValueParameter<IntValue>)Parameters[PopulationSizeName]; }
-    }
-    public IFixedValueParameter<IntValue> MaximumGenerationsParameter {
-      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumGenerationsName]; }
-    }
-    public IFixedValueParameter<IntValue> MaximumEvaluatedSolutionsParameter {
-      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumEvaluatedSolutionsName]; }
-    }
-    public IValueParameter<DoubleArray> InitialSigmaParameter {
-      get { return (IValueParameter<DoubleArray>)Parameters[InitialSigmaName]; }
-    }
-    public IConstrainedValueParameter<IIndicator> IndicatorParameter {
-      get { return (IConstrainedValueParameter<IIndicator>)Parameters[IndicatorName]; }
-    }
-    #endregion
-
-    #region Properties
-    public int MaximumRuntime {
-      get { return MaximumRuntimeParameter.Value.Value; }
-      set { MaximumRuntimeParameter.Value.Value = value; }
-    }
-    public int Seed {
-      get { return SeedParameter.Value.Value; }
-      set { SeedParameter.Value.Value = value; }
-    }
-    public bool SetSeedRandomly {
-      get { return SetSeedRandomlyParameter.Value.Value; }
-      set { SetSeedRandomlyParameter.Value.Value = value; }
-    }
-    public int PopulationSize {
-      get { return PopulationSizeParameter.Value.Value; }
-      set { PopulationSizeParameter.Value.Value = value; }
-    }
-    public int MaximumGenerations {
-      get { return MaximumGenerationsParameter.Value.Value; }
-      set { MaximumGenerationsParameter.Value.Value = value; }
-    }
-    public int MaximumEvaluatedSolutions {
-      get { return MaximumEvaluatedSolutionsParameter.Value.Value; }
-      set { MaximumEvaluatedSolutionsParameter.Value.Value = value; }
-    }
-    public DoubleArray InitialSigma {
-      get { return InitialSigmaParameter.Value; }
-      set { InitialSigmaParameter.Value = value; }
-    }
-    public IIndicator Indicator {
-      get { return IndicatorParameter.Value; }
-      set { IndicatorParameter.Value = value; }
-    }
-
-
-    #endregion
-
-    #region ResultsProperties
-    private int ResultsEvaluations {
-      get { return ((IntValue)Results[EvaluationsResultName].Value).Value; }
-      set { ((IntValue)Results[EvaluationsResultName].Value).Value = value; }
-    }
-    private int ResultsIterations {
-      get { return ((IntValue)Results[IterationsResultName].Value).Value; }
-      set { ((IntValue)Results[IterationsResultName].Value).Value = value; }
-    }
-    #region Datatable
-    private DataTable ResultsQualities {
-      get { return (DataTable)Results[TimetableResultName].Value; }
-    }
-    private DataRow ResultsBestHypervolumeDataLine {
-      get { return ResultsQualities.Rows[BestHypervolumeResultName]; }
-    }
-    private DataRow ResultsHypervolumeDataLine {
-      get { return ResultsQualities.Rows[HypervolumeResultName]; }
-    }
-    private DataRow ResultsGenerationalDistanceDataLine {
-      get { return ResultsQualities.Rows[GenerationalDistanceResultName]; }
-    }
-    private DataRow ResultsInvertedGenerationalDistanceDataLine {
-      get { return ResultsQualities.Rows[InvertedGenerationalDistanceResultName]; }
-    }
-    private DataRow ResultsCrowdingDataLine {
-      get { return ResultsQualities.Rows[CrowdingResultName]; }
-    }
-    private DataRow ResultsSpacingDataLine {
-      get { return ResultsQualities.Rows[SpacingResultName]; }
-    }
-    private DataRow ResultsHypervolumeDifferenceDataLine {
-      get { return ResultsQualities.Rows[DifferenceToBestKnownHypervolumeResultName]; }
-    }
-    #endregion
-    //QualityIndicators
-    private double ResultsHypervolume {
-      get { return ((DoubleValue)Results[HypervolumeResultName].Value).Value; }
-      set { ((DoubleValue)Results[HypervolumeResultName].Value).Value = value; }
-    }
-    private double ResultsGenerationalDistance {
-      get { return ((DoubleValue)Results[GenerationalDistanceResultName].Value).Value; }
-      set { ((DoubleValue)Results[GenerationalDistanceResultName].Value).Value = value; }
-    }
-    private double ResultsInvertedGenerationalDistance {
-      get { return ((DoubleValue)Results[InvertedGenerationalDistanceResultName].Value).Value; }
-      set { ((DoubleValue)Results[InvertedGenerationalDistanceResultName].Value).Value = value; }
-    }
-    private double ResultsCrowding {
-      get { return ((DoubleValue)Results[CrowdingResultName].Value).Value; }
-      set { ((DoubleValue)Results[CrowdingResultName].Value).Value = value; }
-    }
-    private double ResultsSpacing {
-      get { return ((DoubleValue)Results[SpacingResultName].Value).Value; }
-      set { ((DoubleValue)Results[SpacingResultName].Value).Value = value; }
-    }
-    private double ResultsBestHypervolume {
-      get { return ((DoubleValue)Results[BestHypervolumeResultName].Value).Value; }
-      set { ((DoubleValue)Results[BestHypervolumeResultName].Value).Value = value; }
-    }
-    private double ResultsBestKnownHypervolume {
-      get { return ((DoubleValue)Results[BestKnownHypervolumeResultName].Value).Value; }
-      set { ((DoubleValue)Results[BestKnownHypervolumeResultName].Value).Value = value; }
-    }
-    private double ResultsDifferenceBestKnownHypervolume {
-      get { return ((DoubleValue)Results[DifferenceToBestKnownHypervolumeResultName].Value).Value; }
-      set { ((DoubleValue)Results[DifferenceToBestKnownHypervolumeResultName].Value).Value = value; }
-
-    }
-    //Solutions
-    private DoubleMatrix ResultsSolutions {
-      get { return ((DoubleMatrix)Results[CurrentFrontResultName].Value); }
-      set { Results[CurrentFrontResultName].Value = value; }
-    }
-    private ScatterPlotContent ResultsScatterPlot {
-      get { return ((ScatterPlotContent)Results[ScatterPlotResultName].Value); }
-      set { Results[ScatterPlotResultName].Value = value; }
-    }
-    #endregion
-
-    #region Constructors
-    public MOCMASEvolutionStrategy() {
-      Parameters.Add(new FixedValueParameter<IntValue>(MaximumRuntimeName, "The maximum runtime in seconds after which the algorithm stops. Use -1 to specify no limit for the runtime", new IntValue(3600)));
-      Parameters.Add(new FixedValueParameter<IntValue>(SeedName, "The random seed used to initialize the new pseudo random number generator.", new IntValue(0)));
-      Parameters.Add(new FixedValueParameter<BoolValue>(SetSeedRandomlyName, "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true)));
-      Parameters.Add(new FixedValueParameter<IntValue>(PopulationSizeName, "λ (lambda) - the size of the offspring population.", new IntValue(20)));
-      Parameters.Add(new ValueParameter<DoubleArray>(InitialSigmaName, "The initial sigma can be a single value or a value for each dimension. All values need to be > 0.", new DoubleArray(new[] { 0.5 })));
-      Parameters.Add(new FixedValueParameter<IntValue>(MaximumGenerationsName, "The maximum number of generations which should be processed.", new IntValue(1000)));
-      Parameters.Add(new FixedValueParameter<IntValue>(MaximumEvaluatedSolutionsName, "The maximum number of evaluated solutions that should be computed.", new IntValue(int.MaxValue)));
-      var set = new ItemSet<IIndicator> { new HypervolumeIndicator(), new CrowdingIndicator(), new MinimalDistanceIndicator() };
-      Parameters.Add(new ConstrainedValueParameter<IIndicator>(IndicatorName, "The selection mechanism on non-dominated solutions", set, set.First()));
-    }
-
-    [StorableConstructor]
-    protected MOCMASEvolutionStrategy(bool deserializing) : base(deserializing) { }
-    protected MOCMASEvolutionStrategy(MOCMASEvolutionStrategy original, Cloner cloner) : base(original, cloner) { }
-    public override IDeepCloneable Clone(Cloner cloner) { return new MOCMASEvolutionStrategy(this, cloner); }
-    #endregion
-
-    #region Mainloop
-
-    protected override void Initialize(CancellationToken cancellationToken) {
-      if (SetSeedRandomly) Seed = new System.Random().Next();
-      random.Reset(Seed);
-      gauss = new NormalDistributedRandom(random, 0, 1);
-
-      InitResults();
-      InitStrategy();
-      InitSolutions();
-      AnalyzeSolutions();
-
-      ResultsIterations = 1;
-    }
-
-    protected override void Run(CancellationToken cancellationToken) {
-      // Loop until iteration limit reached or canceled.
-      while (ResultsIterations < MaximumGenerations) {
-        try {
-          Iterate();
-          ResultsIterations++;
-          cancellationToken.ThrowIfCancellationRequested();
-        } finally {
-          AnalyzeSolutions();
-        }
-      }
-    }
-    private void Iterate() {
-      var offspring = MutateOffspring();
-      PenalizeEvaluate(offspring);
-      var parents = solutions.Concat(offspring).ToArray();
-      SelectParents(parents, solutions.Length);
-      UpdatePopulation(parents);
-    }
-    protected override void OnExecutionTimeChanged() {
-      base.OnExecutionTimeChanged();
-      if (CancellationTokenSource == null) return;
-      if (MaximumRuntime == -1) return;
-      if (ExecutionTime.TotalSeconds > MaximumRuntime) CancellationTokenSource.Cancel();
-    }
-    #endregion
-
-    #region Initialization
-    private MOCMAESIndividual InitializeIndividual(RealVector x) {
-      var zeros = new RealVector(x.Length);
-      var c = new double[x.Length, x.Length];
-      double sigma = InitialSigma.Max();
-      for (var i = 0; i < x.Length; i++) {
-        double d = InitialSigma[i % InitialSigma.Length] / sigma;
-        c[i, i] = d * d;
-      }
-      return new MOCMAESIndividual(x, internals.TargetSuccessProbability, sigma, zeros, c, internals);
-    }
-    private void InitSolutions() {
-      solutions = new MOCMAESIndividual[PopulationSize];
-      for (var i = 0; i < PopulationSize; i++) {
-        var x = new RealVector(Problem.Encoding.Length); // Uniform distibution in all dimensions assumed.
-                                                         // There is the UniformSolutionCreater associated with the Encoding, but it was considered not usable here
-        var bounds = Problem.Encoding.Bounds;
-        for (var j = 0; j < Problem.Encoding.Length; j++) {
-          var dim = j % bounds.Rows;
-          x[j] = random.NextDouble() * (bounds[dim, 1] - bounds[dim, 0]) + bounds[dim, 0];
-        }
-        solutions[i] = InitializeIndividual(x);
-      }
-      PenalizeEvaluate(solutions);
-    }
-    private void InitStrategy() {
-      const int lambda = 1;
-      double n = Problem.Encoding.Length;
-
-      var targetSuccessProbability = 1.0 / (5.0 + Math.Sqrt(lambda) / 2.0);
-      var stepSizeDampeningFactor = 1.0 + n / (2.0 * lambda);
-      var stepSizeLearningRate = targetSuccessProbability * lambda / (2.0 + targetSuccessProbability * lambda);
-      var evolutionPathLearningRate = 2.0 / (n + 2.0);
-      var covarianceMatrixLearningRate = 2.0 / (n * n + 6.0);
-      var covarianceMatrixUnlearningRate = 0.4 / (Math.Pow(n, 1.6) + 1);
-      var successThreshold = 0.44;
-      internals = new MOCMAESParameters(stepSizeLearningRate, stepSizeDampeningFactor, targetSuccessProbability, evolutionPathLearningRate, covarianceMatrixLearningRate, covarianceMatrixUnlearningRate, successThreshold);
-
-    }
-    private void InitResults() {
-      AddResult(IterationsResultName, "The number of gererations evaluated", new IntValue(0));
-      AddResult(EvaluationsResultName, "The number of function evaltions performed", new IntValue(0));
-      AddResult(HypervolumeResultName, "The hypervolume of the current front considering the Referencepoint defined in the Problem", new DoubleValue(0.0));
-      AddResult(BestHypervolumeResultName, "The best hypervolume of the current run considering the Referencepoint defined in the Problem", new DoubleValue(0.0));
-      AddResult(BestKnownHypervolumeResultName, "The best knwon hypervolume considering the Referencepoint defined in the Problem", new DoubleValue(double.NaN));
-      AddResult(DifferenceToBestKnownHypervolumeResultName, "The difference between the current and the best known hypervolume", new DoubleValue(double.NaN));
-      AddResult(GenerationalDistanceResultName, "The generational distance to an optimal pareto front defined in the Problem", new DoubleValue(double.NaN));
-      AddResult(InvertedGenerationalDistanceResultName, "The inverted generational distance to an optimal pareto front defined in the Problem", new DoubleValue(double.NaN));
-      AddResult(CrowdingResultName, "The average crowding value for the current front (excluding infinities)", new DoubleValue(0.0));
-      AddResult(SpacingResultName, "The spacing for the current front (excluding infinities)", new DoubleValue(0.0));
-
-      var table = new DataTable("QualityIndicators");
-      table.Rows.Add(new DataRow(BestHypervolumeResultName));
-      table.Rows.Add(new DataRow(HypervolumeResultName));
-      table.Rows.Add(new DataRow(CrowdingResultName));
-      table.Rows.Add(new DataRow(GenerationalDistanceResultName));
-      table.Rows.Add(new DataRow(InvertedGenerationalDistanceResultName));
-      table.Rows.Add(new DataRow(DifferenceToBestKnownHypervolumeResultName));
-      table.Rows.Add(new DataRow(SpacingResultName));
-      AddResult(TimetableResultName, "Different quality meassures in a timeseries", table);
-      AddResult(CurrentFrontResultName, "The current front", new DoubleMatrix());
-      AddResult(ScatterPlotResultName, "A scatterplot displaying the evaluated solutions and (if available) the analytically optimal front", new ScatterPlotContent(null, null, null, 2));
-
-      var problem = Problem as MultiObjectiveTestFunctionProblem;
-      if (problem == null) return;
-      if (problem.BestKnownFront != null) {
-        ResultsBestKnownHypervolume = Hypervolume.Calculate(Utilities.ToArray(problem.BestKnownFront), problem.TestFunction.ReferencePoint(problem.Objectives), Problem.Maximization);
-        ResultsDifferenceBestKnownHypervolume = ResultsBestKnownHypervolume;
-      }
-      ResultsScatterPlot = new ScatterPlotContent(new double[0][], new double[0][], Utilities.ToArray(problem.BestKnownFront), problem.Objectives);
-    }
-    #endregion
-
-    private MOCMAESIndividual[] MutateOffspring() {
-      var offspring = new MOCMAESIndividual[PopulationSize];
-      for (var i = 0; i < PopulationSize; i++) {
-        offspring[i] = new MOCMAESIndividual(solutions[i]);
-        offspring[i].Mutate(gauss);
-      }
-      return offspring;
-    }
-
-    #region Evaluation
-    private void PenalizeEvaluate(IEnumerable<MOCMAESIndividual> offspring) {
-      foreach (var child in offspring) {
-        if (IsFeasable(child.Mean)) {
-          child.Fitness = Evaluate(child.Mean);
-          child.PenalizedFitness = child.Fitness;
-        } else {
-          var t = ClosestFeasible(child.Mean);
-          child.Fitness = Evaluate(t);
-          child.PenalizedFitness = Penalize(child.Mean, t, child.Fitness);
-        }
-      }
-    }
-    private double[] Evaluate(RealVector x) {
-      var s = new Scope();
-      s.Variables.Add(new Variable(Problem.Encoding.Name, x));
-      var ind = new SingleEncodingIndividual(Problem.Encoding, s);
-      var res = Problem.Evaluate(ind, random);
-      ResultsEvaluations++;
-      return res;
-    }
-    private double[] Penalize(RealVector x, RealVector t, IEnumerable<double> fitness) {
-      var penalty = x.Zip(t, (a, b) => (a - b) * (a - b)).Sum() * 1E-6;
-      return fitness.Select((v, i) => Problem.Maximization[i] ? v - penalty : v + penalty).ToArray();
-    }
-    private RealVector ClosestFeasible(RealVector x) {
-      var bounds = Problem.Encoding.Bounds;
-      var r = new RealVector(x.Length);
-      for (var i = 0; i < x.Length; i++) {
-        var dim = i % bounds.Rows;
-        r[i] = Math.Min(Math.Max(bounds[dim, 0], x[i]), bounds[dim, 1]);
-      }
-      return r;
-    }
-    private bool IsFeasable(RealVector offspring) {
-      var bounds = Problem.Encoding.Bounds;
-      for (var i = 0; i < offspring.Length; i++) {
-        var dim = i % bounds.Rows;
-        if (bounds[dim, 0] > offspring[i] || offspring[i] > bounds[dim, 1]) return false;
-      }
-      return true;
-    }
-    #endregion
-
-    private void SelectParents(IReadOnlyList<MOCMAESIndividual> parents, int length) {
-      //perform a nondominated sort to assign the rank to every element
-      var fronts = NonDominatedSort(parents);
-
-      //deselect the highest rank fronts until we would end up with less or equal mu elements
-      var rank = fronts.Count - 1;
-      var popSize = parents.Count;
-      while (popSize - fronts[rank].Count >= length) {
-        var front = fronts[rank];
-        foreach (var i in front) i.Selected = false;
-        popSize -= front.Count;
-        rank--;
-      }
-
-
-      //now use the indicator to deselect the approximatingly worst elements of the last selected front
-      var front1 = fronts[rank];
-      front1.Sort(new HelpComparer());
-      for (; popSize > length; popSize--) {
-        var lc = Indicator.LeastContributer(front1.ToArray(), x => x.PenalizedFitness, Problem);
-        front1[lc].Selected = false;
-        front1.Swap(lc, front1.Count - 1);
-        front1.RemoveAt(front1.Count - 1);
-      }
-    }
-
-    private void UpdatePopulation(IReadOnlyList<MOCMAESIndividual> parents) {
-      var offspringSucess = new int[solutions.Length];
-      var offspringLength = parents.Count - solutions.Length;
-      for (var i = 0; i < offspringLength; i++) {
-        if (!parents[i + solutions.Length].Selected) continue;
-        parents[i + solutions.Length].UpdateAsOffspring();
-        offspringSucess[i] += MOCMAESIndividual.Success;
-      }
-      for (var i = 0; i < solutions.Length; i++) if (parents[i].Selected) parents[i].UpdateAsParent(offspringSucess[i]);
-      solutions = new MOCMAESIndividual[solutions.Length];
-      var j = 0;
-      foreach (var ind in parents) if (ind.Selected) solutions[j++] = ind;
-    }
-
-    #region Analysis
-    private void AnalyzeSolutions() {
-      ResultsScatterPlot = new ScatterPlotContent(solutions.Select(x => x.Fitness).ToArray(),
-          solutions.Select(x => x.Mean.ToArray()).ToArray(),
-          ResultsScatterPlot.ParetoFront,
-          ResultsScatterPlot.Objectives);
-      ResultsSolutions = ToMatrix(solutions.Select(x => x.Mean.ToArray()));
-      AnalyzeQualityIndicators();
-    }
-    private void AnalyzeQualityIndicators() {
-      var problem = Problem as MultiObjectiveTestFunctionProblem;
-      if (problem == null) return;
-
-      var front = NonDominatedSelect.GetDominatingVectors(solutions.Select(x => x.Fitness), problem.TestFunction.ReferencePoint(problem.Objectives), Problem.Maximization, true).ToArray();
-      if (front.Length == 0) return;
-      var bounds = problem.Bounds.CloneAsMatrix();
-      ResultsCrowding = Crowding.Calculate(front, bounds);
-      ResultsSpacing = Spacing.Calculate(front);
-      ResultsGenerationalDistance = problem.BestKnownFront != null ? GenerationalDistance.Calculate(front, Utilities.ToArray(problem.BestKnownFront), 1) : double.NaN;
-
-      ResultsInvertedGenerationalDistance = problem.BestKnownFront != null ? InvertedGenerationalDistance.Calculate(front, Utilities.ToArray(problem.BestKnownFront), 1) : double.NaN;
-
-      ResultsHypervolume = Hypervolume.Calculate(front, problem.TestFunction.ReferencePoint(problem.Objectives), Problem.Maximization);
-      ResultsBestHypervolume = Math.Max(ResultsHypervolume, ResultsBestHypervolume);
-      ResultsDifferenceBestKnownHypervolume = ResultsBestKnownHypervolume - ResultsBestHypervolume;
-
-      //Datalines
-      ResultsBestHypervolumeDataLine.Values.Add(ResultsBestHypervolume);
-      ResultsHypervolumeDataLine.Values.Add(ResultsHypervolume);
-      ResultsCrowdingDataLine.Values.Add(ResultsCrowding);
-      ResultsGenerationalDistanceDataLine.Values.Add(ResultsGenerationalDistance);
-      ResultsInvertedGenerationalDistanceDataLine.Values.Add(ResultsInvertedGenerationalDistance);
-      ResultsSpacingDataLine.Values.Add(ResultsSpacing);
-      ResultsHypervolumeDifferenceDataLine.Values.Add(ResultsDifferenceBestKnownHypervolume);
-
-    }
-    #endregion
-
-    private class HelpComparer : IComparer<MOCMAESIndividual> {
-      public int Compare(MOCMAESIndividual x, MOCMAESIndividual y) {
-        return x.PenalizedFitness[0].CompareTo(y.PenalizedFitness[0]);
-      }
-    }
-
-    #region Helpers
-    public DoubleMatrix ToMatrix(IEnumerable<double[]> data) {
-      var d2 = data.ToArray();
-      var mat = new DoubleMatrix(d2.Length, d2[0].Length);
-      for (var i = 0; i < mat.Rows; i++) {
-        for (var j = 0; j < mat.Columns; j++) {
-          mat[i, j] = d2[i][j];
-        }
-      }
-      return mat;
-    }
-    private void AddResult<T>(string name1, string desc, T defaultValue) where T : class, IItem {
-      Results.Add(new Result(name1, desc, defaultValue));
-    }
-    //blatantly stolen form HeuristicLab.Optimization.Operators.FastNonDominatedSort
-    //however: Operators.FastNonDominatedSort does not return ranked fronts => rerank after sorting would not be sensible
-    #region FastNonDominatedSort   
-    private enum DominationResult { Dominates, IsDominated, IsNonDominated };
-    private List<List<MOCMAESIndividual>> NonDominatedSort(IReadOnlyList<MOCMAESIndividual> individuals) {
-      const bool dominateOnEqualQualities = false;
-      var maximization = Problem.Maximization;
-      if (individuals == null) throw new InvalidOperationException(Name + ": No qualities found.");
-      var populationSize = individuals.Count;
-
-      var fronts = new List<List<MOCMAESIndividual>>();
-      var dominatedScopes = new Dictionary<MOCMAESIndividual, List<int>>();
-      var dominationCounter = new int[populationSize];
-
-      for (var pI = 0; pI < populationSize - 1; pI++) {
-        var p = individuals[pI];
-        List<int> dominatedScopesByp;
-        if (!dominatedScopes.TryGetValue(p, out dominatedScopesByp))
-          dominatedScopes[p] = dominatedScopesByp = new List<int>();
-        for (var qI = pI + 1; qI < populationSize; qI++) {
-          var test = Dominates(individuals[pI], individuals[qI], maximization, dominateOnEqualQualities);
-          if (test == DominationResult.Dominates) {
-            dominatedScopesByp.Add(qI);
-            dominationCounter[qI] += 1;
-          } else if (test == DominationResult.IsDominated) {
-            dominationCounter[pI] += 1;
-            if (!dominatedScopes.ContainsKey(individuals[qI]))
-              dominatedScopes.Add(individuals[qI], new List<int>());
-            dominatedScopes[individuals[qI]].Add(pI);
-          }
-          if (pI == populationSize - 2
-            && qI == populationSize - 1
-            && dominationCounter[qI] == 0) {
-            AddToFront(individuals[qI], fronts, 0);
-          }
-        }
-        if (dominationCounter[pI] == 0) {
-          AddToFront(p, fronts, 0);
-        }
-      }
-      var i = 0;
-      while (i < fronts.Count && fronts[i].Count > 0) {
-        var nextFront = new List<MOCMAESIndividual>();
-        foreach (var p in fronts[i]) {
-          List<int> dominatedScopesByp;
-          if (!dominatedScopes.TryGetValue(p, out dominatedScopesByp)) continue;
-          foreach (var dominatedScope in dominatedScopesByp) {
-            dominationCounter[dominatedScope] -= 1;
-            if (dominationCounter[dominatedScope] != 0) continue;
-            nextFront.Add(individuals[dominatedScope]);
-          }
-        }
-        i += 1;
-        fronts.Add(nextFront);
-      }
-
-      for (i = 0; i < fronts.Count; i++) {
-        foreach (var p in fronts[i]) {
-          p.Rank = i;
-        }
-      }
-      return fronts;
-    }
-    private static void AddToFront(MOCMAESIndividual p, IList<List<MOCMAESIndividual>> fronts, int i) {
-      if (i == fronts.Count) fronts.Add(new List<MOCMAESIndividual>());
-      fronts[i].Add(p);
-    }
-    private static DominationResult Dominates(MOCMAESIndividual left, MOCMAESIndividual right, bool[] maximizations, bool dominateOnEqualQualities) {
-      return Dominates(left.PenalizedFitness, right.PenalizedFitness, maximizations, dominateOnEqualQualities);
-    }
-    private static DominationResult Dominates(IReadOnlyList<double> left, IReadOnlyList<double> right, IReadOnlyList<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 (var i = 0; i < left.Count; i++) {
-          if (left[i] != right[i]) {
-            equal = false;
-            break;
-          }
-        }
-        if (equal) return DominationResult.Dominates;
-      }
-
-      bool leftIsBetter = false, rightIsBetter = false;
-      for (var i = 0; i < left.Count; 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;
-    }
-    #endregion
-    #endregion
-  }
-}
Index: anches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/MinimalDistanceIndicator.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/MinimalDistanceIndicator.cs	(revision 15044)
+++ 	(revision )
@@ -1,96 +1,0 @@
-﻿#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 System;
-using System.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Algorithms.MOCMAEvolutionStrategy {
-  [Item("MinimalDistanceIndicator", "Selection of Offspring based on distance to nearest neighbour")]
-  [StorableClass]
-  internal class MinimalDistanceIndicator : Item, IIndicator {
-
-    public int LeastContributer<TR>(IEnumerable<TR> front, Func<TR, double[]> extractor, MultiObjectiveBasicProblem<RealVectorEncoding> problem) {
-      var extracted = front.Select(extractor.Invoke).ToArray();
-      if (extracted.Length <= 2) return 0;
-      var distances = CalcDistances(extracted);
-      var mindexI = 0;
-      var mindexJ = 0;
-      var min = double.MaxValue;
-      for (var i = 0; i < extracted.Length; i++) {
-        var d = double.MaxValue;
-        var minj = 0;
-        for (var j = 0; j < extracted.Length; j++) {
-          if (i == j) continue;
-          var d1 = distances[i, j];
-          if (!(d1 < d)) continue;
-          minj = j;
-          d = d1;
-        }
-        if (!(d < min)) continue;
-        min = d;
-        mindexI = i;
-        mindexJ = minj;
-      }
-
-      //break tie with distance to second nearest
-      var minI = double.MaxValue;
-      var minJ = double.MaxValue;
-
-      for (var i = 0; i < extracted.Length; i++) {
-        double d;
-        if (mindexI != i) {
-          d = distances[mindexI, i];
-          if (!d.IsAlmost(min)) minI = Math.Min(minI, d);
-        }
-        if (mindexJ == i) continue;
-        d = distances[mindexJ, i];
-        if (!d.IsAlmost(min)) minJ = Math.Min(minJ, d);
-      }
-
-      //find min
-      return minI < minJ ? mindexI : mindexJ;
-    }
-
-    private static double[,] CalcDistances(IReadOnlyList<double[]> extracted) {
-      var res = new double[extracted.Count, extracted.Count];
-      for (var i = 0; i < extracted.Count; i++)
-        for (var j = 0; j < i; j++)
-          res[i, j] = res[j, i] = Dist(extracted[i], extracted[j]);
-      return res;
-    }
-
-
-    private static double Dist(IEnumerable<double> a, IEnumerable<double> b) {
-      return Math.Sqrt(a.Zip(b, (x, y) => (x - y) * (x - y)).Sum());
-    }
-    [StorableConstructor]
-    protected MinimalDistanceIndicator(bool deserializing) : base(deserializing) { }
-    protected MinimalDistanceIndicator(MinimalDistanceIndicator original, Cloner cloner) : base(original, cloner) { }
-    public override IDeepCloneable Clone(Cloner cloner) { return new MinimalDistanceIndicator(this, cloner); }
-    public MinimalDistanceIndicator() { }
-  }
-}
Index: anches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/MocmaesIndividual.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/MocmaesIndividual.cs	(revision 15044)
+++ 	(revision )
@@ -1,160 +1,0 @@
-﻿using System;
-using System.Linq;
-using HeuristicLab.Algorithms.MOCMAEvolutionStrategy;
-using HeuristicLab.Common;
-using HeuristicLab.Encodings.RealVectorEncoding;
-using HeuristicLab.Random;
-
-namespace HeuristicLab.Algorithms.CMAEvolutionStrategy {
-  internal class MOCMAESIndividual {
-    public const int Success = 1;
-    public const int NoSuccess = 2;
-    public const int Failure = 3;
-
-    //MOCMAES-Params
-    private readonly MOCMAESParameters strategy;
-
-    //Chromosome
-    public RealVector Mean { get; private set; }
-    private double sigma;//stepsize
-    private RealVector evolutionPath; // pc
-    private RealVector lastStep;
-    private RealVector lastZ;
-    private double[,] lowerCholesky;
-
-
-    //Phenotype
-    public double[] Fitness { get; set; }
-    public double[] PenalizedFitness { get; set; }
-    public bool Selected { get; set; }
-    public double Rank { get; set; }
-    public double SuccessProbability { get; set; }
-
-    /// <summary>
-    /// 
-    /// </summary>
-    /// <param name="mean">has to be 0-vector with correct lenght</param>
-    /// <param name="pSucc">has to be ptargetsucc</param>
-    /// <param name="sigma">initialSigma</param>
-    /// <param name="pc">has to be 0-vector with correct lenght</param>
-    /// <param name="c">has to be a symmetric positive definit Covariance matrix</param>
-    public MOCMAESIndividual(RealVector mean, double pSucc, double sigma, RealVector pc, double[,] c, MOCMAESParameters strategy) {
-      Mean = mean;
-      SuccessProbability = pSucc;
-      this.sigma = sigma;
-      evolutionPath = pc;
-      CholeskyDecomposition(c);
-      Selected = true;
-      this.strategy = strategy;
-    }
-
-    private void CholeskyDecomposition(double[,] c) {
-      if (!alglib.spdmatrixcholesky(ref c, c.GetLength(0), false))
-        throw new ArgumentException("Covariancematrix is not symmetric positiv definit");
-      lowerCholesky = (double[,])c.Clone();
-    }
-
-    public MOCMAESIndividual(MOCMAESIndividual other) {
-      SuccessProbability = other.SuccessProbability;
-      sigma = other.sigma;
-      evolutionPath = (RealVector)other.evolutionPath.Clone();
-      Mean = (RealVector)other.Mean.Clone();
-      lowerCholesky = (double[,])other.lowerCholesky.Clone();
-      Selected = true;
-      strategy = other.strategy;
-    }
-
-    public void UpdateEvolutionPath(double learningRate, double updateWeight) {
-      updateWeight = Math.Sqrt(updateWeight);
-      for (var i = 0; i < evolutionPath.Length; i++) {
-        evolutionPath[i] *= learningRate;
-        evolutionPath[i] += updateWeight * lastStep[i];
-      }
-    }
-
-    public double GetNormSqr() {
-      return lastZ.Sum(d => d * d);
-    }
-
-    private void CholeskyUpdate(RealVector v, double alpha, double beta) {
-      var n = v.Length;
-      var temp = new double[n];
-      for (var i = 0; i < n; i++) temp[i] = v[i];
-      double betaPrime = 1;
-      var a = Math.Sqrt(alpha);
-      for (var j = 0; j < n; j++) {
-        var ljj = a * lowerCholesky[j, j];
-        var dj = ljj * ljj;
-        var wj = temp[j];
-        var swj2 = beta * wj * wj;
-        var gamma = dj * betaPrime + swj2;
-        var x1 = dj + swj2 / betaPrime;
-        if (x1 < 0.0) throw new ArgumentException("Update makes Covariancematrix indefinite");
-        var nLjj = Math.Sqrt(x1);
-        lowerCholesky[j, j] = nLjj;
-        betaPrime += swj2 / dj;
-        if (j + 1 >= n) continue;
-        for (var i = j + 1; i < n; i++) lowerCholesky[i, j] *= a;
-        for (var i = j + 1; i < n; i++) temp[i] = wj / ljj * lowerCholesky[i, j];
-        if (gamma.IsAlmost(0)) continue;
-        for (var i = j + 1; i < n; i++) lowerCholesky[i, j] *= nLjj / ljj;
-        for (var i = j + 1; i < n; i++) lowerCholesky[i, j] += nLjj * beta * wj / gamma * temp[i];
-
-      }
-
-    }
-
-    public void Mutate(NormalDistributedRandom gauss) {
-      //sampling a random z from N(0,I) where I is the Identity matrix;
-      lastZ = new RealVector(Mean.Length);
-      var n = lastZ.Length;
-      for (var i = 0; i < n; i++) lastZ[i] = gauss.NextDouble();
-      //Matrixmultiplication: lastStep = lowerCholesky * lastZ;
-      lastStep = new RealVector(Mean.Length);
-      for (var i = 0; i < n; i++) {
-        double sum = 0;
-        for (var j = 0; j <= i; j++) sum += lowerCholesky[i, j] * lastZ[j];
-        lastStep[i] = sum;
-      }
-      //add the step to x weighted by stepsize;
-      for (var i = 0; i < Mean.Length; i++) Mean[i] += sigma * lastStep[i];
-    }
-
-    public void UpdateAsParent(int v) {
-      SuccessProbability = (1 - strategy.StepSizeLearningRate) * SuccessProbability + strategy.StepSizeLearningRate * (v == Success ? 1 : 0);
-      sigma *= Math.Exp(1 / strategy.StepSizeDampeningFactor * (SuccessProbability - strategy.TargetSuccessProbability) / (1 - strategy.TargetSuccessProbability));
-      if (v != Failure) return;
-      if (SuccessProbability < strategy.SuccessThreshold) {
-        var stepNormSqr = GetNormSqr();
-        var rate = strategy.CovarianceMatrixUnlearningRate;
-        if (stepNormSqr > 1 && 1 < strategy.CovarianceMatrixUnlearningRate * (2 * stepNormSqr - 1)) {
-          rate = 1 / (2 * stepNormSqr - 1);
-        }
-        CholeskyUpdate(lastStep, 1 + rate, -rate);
-      } else {
-        RoundUpdate();
-      }
-
-    }
-
-    public void UpdateAsOffspring() {
-      SuccessProbability = (1 - strategy.StepSizeLearningRate) * SuccessProbability + strategy.StepSizeLearningRate;
-      sigma *= Math.Exp(1 / strategy.StepSizeDampeningFactor * (SuccessProbability - strategy.TargetSuccessProbability) / (1 - strategy.TargetSuccessProbability));
-      var evolutionpathUpdateWeight = strategy.EvolutionPathLearningRate * (2.0 - strategy.EvolutionPathLearningRate);
-      if (SuccessProbability < strategy.SuccessThreshold) {
-        UpdateEvolutionPath(1 - strategy.EvolutionPathLearningRate, evolutionpathUpdateWeight);
-        CholeskyUpdate(evolutionPath, 1 - strategy.CovarianceMatrixLearningRate, strategy.CovarianceMatrixLearningRate);
-      } else {
-        RoundUpdate();
-      }
-    }
-
-    private void RoundUpdate() {
-      var evolutionPathUpdateWeight = strategy.EvolutionPathLearningRate * (2.0 - strategy.EvolutionPathLearningRate);
-      UpdateEvolutionPath(1 - strategy.EvolutionPathLearningRate, 0);
-      CholeskyUpdate(evolutionPath, 1 - strategy.CovarianceMatrixLearningRate + evolutionPathUpdateWeight, strategy.CovarianceMatrixLearningRate);
-    }
-
-  }
-
-}
Index: anches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/MocmaesParameters.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/MocmaesParameters.cs	(revision 15044)
+++ 	(revision )
@@ -1,22 +1,0 @@
-﻿
-namespace HeuristicLab.Algorithms.MOCMAEvolutionStrategy {
-  internal class MOCMAESParameters {
-    public readonly double StepSizeLearningRate; //=cp learning rate in [0,1]
-    public readonly double StepSizeDampeningFactor; //d
-    public readonly double TargetSuccessProbability;// p^target_succ
-    public readonly double EvolutionPathLearningRate;//cc
-    public readonly double CovarianceMatrixLearningRate;//ccov
-    public readonly double CovarianceMatrixUnlearningRate;   //from shark
-    public readonly double SuccessThreshold; //ptresh
-
-    public MOCMAESParameters(double stepSizeLearningRate, double stepSizeDampeningFactor, double targetSuccessProbability, double evolutionPathLearningRate, double covarianceMatrixLearningRate, double covarianceMatrixUnlearningRate, double successThreshold) {
-      StepSizeLearningRate = stepSizeLearningRate;
-      StepSizeDampeningFactor = stepSizeDampeningFactor;
-      TargetSuccessProbability = targetSuccessProbability;
-      EvolutionPathLearningRate = evolutionPathLearningRate;
-      CovarianceMatrixLearningRate = covarianceMatrixLearningRate;
-      CovarianceMatrixUnlearningRate = covarianceMatrixUnlearningRate;
-      SuccessThreshold = successThreshold;
-    }
-  }
-}
Index: anches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Utilities.cs
===================================================================
--- /branches/MOCMAEvolutionStrategy/HeuristicLab.Algorithms.MOCMAEvolutionStrategy/3.3/Utilities.cs	(revision 15044)
+++ 	(revision )
@@ -1,57 +1,0 @@
-﻿using System.Collections.Generic;
-using HeuristicLab.Data;
-
-namespace HeuristicLab.Algorithms.MOCMAEvolutionStrategy {
-  internal static class Utilities {
-    internal static double[][] ToArray(DoubleMatrix m) {
-      if (m == null) return null;
-      var i = m.Rows - 1;
-      var a = new double[i][];
-      for (i--; i >= 0; i--) {
-        var j = m.Columns;
-        a[i] = new double[j];
-        for (j--; j >= 0; j--) a[i][j] = m[i, j];
-      }
-      return a;
-    }
-
-    public static int ArgMin<T>(IEnumerable<T> values, IComparer<T> comparer) {
-      var mindex = -1;
-      var min = default(T);
-      var i = 0;
-      foreach (var v in values) {
-        if (mindex < 0 || comparer.Compare(v, min) < 0) {
-          min = v;
-          mindex = i;
-        }
-        i++;
-      }
-      return mindex;
-
-    }
-    public static int ArgMax<T>(IEnumerable<T> values, IComparer<T> comparer) {
-      var mindex = -1;
-      var min = default(T);
-      var i = 0;
-      foreach (var v in values) {
-        if (mindex < 0 || comparer.Compare(v, min) > 0) {
-          min = v;
-          mindex = i;
-        }
-        i++;
-      }
-      return mindex;
-    }
-    private class DoubleComparer : IComparer<double> {
-      public int Compare(double x, double y) {
-        return x.CompareTo(y);
-      }
-    }
-    public static int ArgMax(this IEnumerable<double> values) {
-      return ArgMax(values, new DoubleComparer());
-    }
-    public static int ArgMin(this IEnumerable<double> values) {
-      return ArgMin(values, new DoubleComparer());
-    }
-  }
-}
