Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/AssemblyInitializer.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/AssemblyInitializer.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/AssemblyInitializer.cs	(revision 16038)
@@ -0,0 +1,21 @@
+﻿using System.IO;
+using System.Linq;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public static class AssemblyInitializer {
+    private static string SamplesDirectory = SamplesUtils.SamplesDirectory;
+    private static string ScriptsDirectory = ScriptingUtils.ScriptsDirectory;
+
+    [AssemblyInitialize]
+    public static void AssemblyInitialize(TestContext testContext) {
+      // load all assemblies
+      PluginLoader.Assemblies.Any();
+
+      // create output directories for samples and scripts
+      if (!Directory.Exists(SamplesDirectory)) Directory.CreateDirectory(SamplesDirectory);
+      if (!Directory.Exists(ScriptsDirectory)) Directory.CreateDirectory(ScriptsDirectory);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/Branches Builder.testsettings
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/Branches Builder.testsettings	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/Branches Builder.testsettings	(revision 16038)
@@ -0,0 +1,29 @@
+﻿<?xml version="1.0" encoding="UTF-8"?>
+<TestSettings name="Builder" id="2a6da91c-43f0-41c6-bcb4-341a1380c277" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
+  <Description>Test settings to run unit tests on the HL build server.</Description>
+  <Deployment>
+    <DeploymentItem filename="trunk\sources\HeuristicLab.Tests\HeuristicLab-3.3\Resources\" />
+    <DeploymentItem filename="trunk\sources\bin\" />
+  </Deployment>
+  <Execution hostProcessPlatform="MSIL">
+    <TestTypeSpecific>
+      <UnitTestRunConfig testTypeId="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b">
+        <AssemblyResolution>
+          <TestDirectory useLoadContext="true" />
+        </AssemblyResolution>
+      </UnitTestRunConfig>
+      <WebTestRunConfiguration testTypeId="4e7599fa-5ecb-43e9-a887-cd63cf72d207">
+        <Browser name="Internet Explorer 7.0">
+          <Headers>
+            <Header name="User-Agent" value="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" />
+            <Header name="Accept" value="*/*" />
+            <Header name="Accept-Language" value="{{$IEAcceptLanguage}}" />
+            <Header name="Accept-Encoding" value="GZIP" />
+          </Headers>
+        </Browser>
+      </WebTestRunConfiguration>
+    </TestTypeSpecific>
+    <AgentRule name="LocalMachineDefaultRole">
+    </AgentRule>
+  </Execution>
+</TestSettings>
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/Builder.testsettings
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/Builder.testsettings	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/Builder.testsettings	(revision 16038)
@@ -0,0 +1,29 @@
+﻿<?xml version="1.0" encoding="UTF-8"?>
+<TestSettings name="Builder" id="2a6da91c-43f0-41c6-bcb4-341a1380c277" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
+  <Description>Test settings to run unit tests on the HL build server.</Description>
+  <Deployment>
+    <DeploymentItem filename="bin\" />
+  </Deployment>
+  <Execution hostProcessPlatform="MSIL">
+    <TestTypeSpecific>
+      <UnitTestRunConfig testTypeId="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b">
+        <AssemblyResolution>
+          <TestDirectory useLoadContext="true" />
+        </AssemblyResolution>
+      </UnitTestRunConfig>
+      <WebTestRunConfiguration testTypeId="4e7599fa-5ecb-43e9-a887-cd63cf72d207">
+        <Browser name="Internet Explorer 7.0">
+          <Headers>
+            <Header name="User-Agent" value="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" />
+            <Header name="Accept" value="*/*" />
+            <Header name="Accept-Language" value="{{$IEAcceptLanguage}}" />
+            <Header name="Accept-Encoding" value="GZIP" />
+          </Headers>
+        </Browser>
+      </WebTestRunConfiguration>
+    </TestTypeSpecific>
+    <AgentRule name="LocalMachineDefaultRole">
+    </AgentRule>
+  </Execution>
+  <Properties />
+</TestSettings>
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/CloningConstructorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/CloningConstructorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/CloningConstructorTest.cs	(revision 16038)
@@ -0,0 +1,68 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Reflection;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.PluginInfrastructure;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class CloningConstructorTest {
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "medium")]
+    public void TestCloningConstructor() {
+      StringBuilder errorMessage = new StringBuilder();
+
+      foreach (Type deepCloneableType in ApplicationManager.Manager.GetTypes(typeof(IDeepCloneable))) {
+        //test only types contained in HL plugin assemblies
+        if (!PluginLoader.Assemblies.Contains(deepCloneableType.Assembly)) continue;
+        if (deepCloneableType.IsSealed) continue;
+
+        bool found = false;
+        foreach (ConstructorInfo constructor in deepCloneableType.GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public)) {
+          ParameterInfo[] parameters = constructor.GetParameters();
+          if (parameters.Length == 2 && parameters[0].ParameterType == deepCloneableType && parameters[1].ParameterType == typeof(Cloner)) {
+            found = true;
+            if (deepCloneableType.IsSealed && !constructor.IsPrivate)
+              errorMessage.Append(Environment.NewLine + deepCloneableType.ToString() + ": Cloning constructor must be private in sealed classes.");
+            else if (!deepCloneableType.IsSealed && !(constructor.IsFamily || constructor.IsPublic))
+              errorMessage.Append(Environment.NewLine + deepCloneableType.ToString() + ": Cloning constructor must be protected.");
+            break;
+          }
+        }
+        if (!found)
+          errorMessage.Append(Environment.NewLine + deepCloneableType.ToString() + ": No cloning constructor is defined.");
+
+        if (!deepCloneableType.IsAbstract) {
+          MethodInfo cloneMethod = deepCloneableType.GetMethod("Clone", new Type[] { typeof(Cloner) });
+          if (cloneMethod == null)
+            errorMessage.Append(Environment.NewLine + deepCloneableType.ToString() + ": No virtual cloning method is defined.");
+        }
+      }
+      Assert.IsTrue(errorMessage.Length == 0, errorMessage.ToString());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/CollectObjectGraphTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/CollectObjectGraphTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/CollectObjectGraphTest.cs	(revision 16038)
@@ -0,0 +1,171 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Common;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.TestFunctions;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class CollectObjectGraphTest {
+
+    private TestContext testContextInstance;
+    public TestContext TestContext {
+      get { return testContextInstance; }
+      set { testContextInstance = value; }
+    }
+
+    [TestMethod]
+    [Description("Verify that the object graph traversal is working by checking the number of objects after traversal.")]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "medium")]
+    public void TestObjectGraphTraversal() {
+      GeneticAlgorithm ga = (GeneticAlgorithm)XmlParser.Deserialize(@"Test Resources\GA_SymbReg.hl");
+      var objects = ga.GetObjectGraphObjects().ToList();
+
+      // Should be 3982, but count may change slightly as members are added or removed
+      Assert.IsTrue(objects.Count > 1, "Number of objects in the object graph seems to small.");
+    }
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "medium")]
+    public void CollectGASample() {
+      GeneticAlgorithm ga = (GeneticAlgorithm)XmlParser.Deserialize(@"Test Resources\GA_SymbReg.hl");
+
+      Stopwatch watch = new Stopwatch();
+      watch.Start();
+      for (int i = 0; i < 1; i++)
+        ga.GetObjectGraphObjects().Count();
+      watch.Stop();
+
+      var objects = ga.GetObjectGraphObjects().ToList();
+
+      TestContext.WriteLine("Time elapsed {0}", watch.Elapsed);
+      TestContext.WriteLine("Objects discovered: {0}", objects.Count());
+      TestContext.WriteLine("HL objects discovered: {0}", objects.Count(o => o.GetType().Namespace.StartsWith("HeuristicLab")));
+      TestContext.WriteLine("");
+
+      Dictionary<Type, List<object>> objs = new Dictionary<Type, List<object>>();
+      foreach (object o in objects) {
+        if (!objs.ContainsKey(o.GetType()))
+          objs.Add(o.GetType(), new List<object>());
+        objs[o.GetType()].Add(o);
+      }
+
+      foreach (string s in objects.Select(o => o.GetType().Namespace).Distinct().OrderBy(s => s)) {
+        TestContext.WriteLine("{0}: {1}", s, objects.Count(o => o.GetType().Namespace == s));
+      }
+      TestContext.WriteLine("");
+
+
+      TestContext.WriteLine("Analysis of contained objects per name");
+      foreach (var pair in objs.OrderBy(x => x.Key.ToString())) {
+        TestContext.WriteLine("{0}: {1}", pair.Key, pair.Value.Count);
+      }
+      TestContext.WriteLine("");
+
+      TestContext.WriteLine("Analysis of contained objects");
+      foreach (var pair in from o in objs orderby o.Value.Count descending select o) {
+        TestContext.WriteLine("{0}: {1}", pair.Key, pair.Value.Count);
+      }
+      TestContext.WriteLine("");
+    }
+
+    /// <summary>
+    /// Tests if performance of multiple executions of a GA stays constant (as discussed in #1424)
+    /// Tests if object collection works after multiple executions of a GA 
+    /// (for example the traversal of `ThreadLocal` objects in CollectObjectGraphObjects 
+    /// causes a StackOverflow occurs after some executions)
+    /// </summary>
+    [TestMethod]
+    [TestCategory("General")]
+    [TestProperty("Time", "long")]
+    public void AlgorithmExecutions() {
+      var algs = new List<IAlgorithm>();
+
+      Stopwatch sw = new Stopwatch();
+      for (int i = 0; i < 100; i++) {
+        GeneticAlgorithm ga = new GeneticAlgorithm();
+        ga.PopulationSize.Value = 5;
+        ga.MaximumGenerations.Value = 5;
+        ga.Engine = new SequentialEngine.SequentialEngine();
+        ga.Problem = new SingleObjectiveTestFunctionProblem();
+
+        sw.Start();
+        algs.Add(ga);
+
+        ga.Start();
+        sw.Stop();
+        TestContext.WriteLine("{0}: {1} ", i, sw.Elapsed);
+        sw.Reset();
+      }
+    }
+
+    /// <summary>
+    /// Test the execution of many algorithms in parallel
+    /// </summary>
+    [TestMethod]
+    [TestCategory("General")]
+    [TestProperty("Time", "medium")]
+    public void ParallelAlgorithmExecutions() {
+      int n = 60;
+      var tasks = new Task[n];
+
+      TestContext.WriteLine("creating tasks...");
+      for (int i = 0; i < n; i++) {
+        tasks[i] = new Task((iobj) => {
+          int locali = (int)iobj;
+          GeneticAlgorithm ga = new GeneticAlgorithm();
+          ga.Name = "Alg " + locali;
+          ga.PopulationSize.Value = 5;
+          ga.MaximumGenerations.Value = 5;
+          ga.Engine = new SequentialEngine.SequentialEngine();
+          ga.Problem = new SingleObjectiveTestFunctionProblem();
+          ga.Prepare(true);
+          Console.WriteLine("{0}; Objects before execution: {1}", ga.Name, ga.GetObjectGraphObjects().Count());
+          var sw = new Stopwatch();
+          sw.Start();
+          ga.Start();
+          sw.Stop();
+          Console.WriteLine("{0}; Objects after execution: {1}", ga.Name, ga.GetObjectGraphObjects().Count());
+          Console.WriteLine("{0}; ExecutionTime: {1} ", ga.Name, sw.Elapsed);
+        }, i);
+      }
+      TestContext.WriteLine("starting tasks...");
+      for (int i = 0; i < n; i++) {
+        tasks[i].Start();
+      }
+      TestContext.WriteLine("waiting for tasks to finish...");
+      Task.WaitAll(tasks);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/ContentViewTests.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/ContentViewTests.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/ContentViewTests.cs	(revision 16038)
@@ -0,0 +1,57 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.PluginInfrastructure;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class ContentViewTests {
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "long")]
+    public void ContentViewAttributeTest() {
+      //get all non-generic and instantiable classes which implement IContentView
+      foreach (Type viewType in ApplicationManager.Manager.GetTypes(typeof(IContentView))) {
+        //get all ContentAttributes on the instantiable view
+        foreach (ContentAttribute attribute in viewType.GetCustomAttributes(typeof(ContentAttribute), false).Cast<ContentAttribute>()) {
+          Assert.IsTrue(attribute.ContentType == typeof(IContent) || attribute.ContentType.GetInterfaces().Contains(typeof(IContent)),
+            "The type specified in the ContentAttribute of {0} must implement IContent.", viewType);
+        }
+        //check if view can handle null as content by calling OnContentChanged
+        IContentView view = (IContentView)Activator.CreateInstance(viewType);
+        var accessor = new PrivateObject(view);
+        try {
+          accessor.Invoke("OnContentChanged");
+        }
+        catch (Exception ex) {
+          Assert.Fail(viewType.ToString() + Environment.NewLine + ex.Message);
+        }
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs	(revision 16038)
@@ -0,0 +1,151 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.PluginInfrastructure;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class DeepCloneableCloningTest {
+    private TestContext testContextInstance;
+    public TestContext TestContext {
+      get { return testContextInstance; }
+      set { testContextInstance = value; }
+    }
+
+    public DeepCloneableCloningTest() {
+      excludedTypes = new HashSet<Type> {
+        typeof (HeuristicLab.Problems.DataAnalysis.Dataset),
+        typeof (HeuristicLab.Problems.TravelingSalesman.DistanceMatrix),
+        typeof (HeuristicLab.Problems.DataAnalysis.ClassificationEnsembleSolution),
+        typeof (HeuristicLab.Problems.DataAnalysis.RegressionEnsembleSolution),
+        typeof (HeuristicLab.Problems.Orienteering.DistanceMatrix),
+        typeof (HeuristicLab.Problems.PTSP.DistanceMatrix)
+      };
+      excludedTypes.Add(typeof(SymbolicExpressionGrammar).Assembly.GetType("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.EmptySymbolicExpressionTreeGrammar"));
+
+      foreach (var symbolType in ApplicationManager.Manager.GetTypes(typeof(HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbol)))
+        excludedTypes.Add(symbolType);
+      // SimpleSymbol is a non-discoverable type and thus needs to be added manually
+      excludedTypes.Add(typeof(HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.SimpleSymbol));
+      foreach (var grammarType in ApplicationManager.Manager.GetTypes(typeof(HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.SymbolicExpressionGrammarBase)))
+        excludedTypes.Add(grammarType);
+    }
+
+    private readonly HashSet<Type> excludedTypes;
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "long")]
+    public void TestCloningFinishedExperiment() {
+      Experiment experiment = (Experiment)XmlParser.Deserialize(@"Test Resources\SamplesExperimentFinished.hl");
+
+      Experiment clone = (Experiment)experiment.Clone(new Cloner());
+      var intersections = CheckTotalInequality(experiment, clone).Where(x => x.GetType().FullName.StartsWith("HeuristicLab"));
+
+      Assert.IsTrue(ProcessEqualObjects(experiment, intersections));
+    }
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "long")]
+    public void TestCloningAllDeepCloneables() {
+      PluginLoader.Assemblies.ToArray();
+      bool success = true;
+      foreach (Type deepCloneableType in ApplicationManager.Manager.GetTypes(typeof(IDeepCloneable))) {
+        // skip types that explicitely choose not to deep-clone every member
+        if (excludedTypes.Contains(deepCloneableType)) continue;
+        // test only types contained in HL plugin assemblies
+        if (!PluginLoader.Assemblies.Contains(deepCloneableType.Assembly)) continue;
+        // test only instantiable types
+        if (deepCloneableType.IsAbstract || !deepCloneableType.IsClass) continue;
+
+        IDeepCloneable item = null;
+        try {
+          item = (IDeepCloneable)Activator.CreateInstance(deepCloneableType, nonPublic: false);
+        } catch { continue; } // no default constructor
+
+        IDeepCloneable clone = null;
+        try {
+          clone = (IDeepCloneable)item.Clone(new Cloner());
+        } catch (Exception e) {
+          TestContext.WriteLine(Environment.NewLine + deepCloneableType.FullName + ":");
+          TestContext.WriteLine("ERROR! " + e.GetType().Name + @" was thrown during cloning.
+All IDeepCloneable items with a default constructor should be cloneable when using that constructor!");
+          success = false;
+          continue;
+        }
+        var intersections = CheckTotalInequality(item, clone).Where(x => x.GetType().FullName.StartsWith("HeuristicLab"));
+        if (!intersections.Any()) continue;
+
+        if (!ProcessEqualObjects(item, intersections))
+          success = false;
+      }
+      Assert.IsTrue(success, "There are potential errors in deep cloning objects.");
+    }
+
+    private IEnumerable<object> CheckTotalInequality(object original, object clone) {
+      var originalObjects = new HashSet<object>(original.GetObjectGraphObjects(excludeStaticMembers: true).Where(x => !x.GetType().IsValueType), new ReferenceEqualityComparer());
+      var clonedObjects = new HashSet<object>(clone.GetObjectGraphObjects(excludeStaticMembers: true).Where(x => !x.GetType().IsValueType), new ReferenceEqualityComparer());
+
+      return originalObjects.Intersect(clonedObjects, new ReferenceEqualityComparer());
+    }
+
+    private bool ProcessEqualObjects(IDeepCloneable item, IEnumerable<object> intersections) {
+      bool success = true;
+      bool headerWritten = false;
+
+      foreach (object o in intersections) {
+        string typeName = o.GetType().FullName;
+        if (excludedTypes.Contains(o.GetType())) {
+          //TestContext.WriteLine("Skipping excluded type " + typeName);
+        } else if (o is IDeepCloneable) {
+          string info = (o is IItem) ? ((IItem)o).ItemName + ((o is INamedItem) ? ", " + ((INamedItem)o).Name : String.Empty) : String.Empty;
+          if (!headerWritten) {
+            TestContext.WriteLine(Environment.NewLine + item.GetType().FullName + ":");
+            headerWritten = true;
+          }
+          TestContext.WriteLine("POTENTIAL ERROR! A DEEPCLONEABLE WAS NOT DEEP CLONED (" + info + "): " + typeName);
+          success = false;
+        } else {
+          Array array = o as Array;
+          if (array != null && array.Length == 0) continue; //arrays of length 0 are used inside empty collections
+          if (!headerWritten) {
+            TestContext.WriteLine(Environment.NewLine + item.GetType().FullName + ":");
+            headerWritten = true;
+          }
+          TestContext.WriteLine("WARNING: An object of type " + typeName + " is referenced in the original and in the clone.");
+        }
+      }
+      return success;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/GeneticAlgorithmTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/GeneticAlgorithmTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/GeneticAlgorithmTest.cs	(revision 16038)
@@ -0,0 +1,79 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Common;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.Xml;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GeneticAlgorithmTest {
+    public GeneticAlgorithmTest() { }
+
+    private TestContext testContextInstance;
+    public TestContext TestContext {
+      get { return testContextInstance; }
+      set { testContextInstance = value; }
+    }
+
+    private Exception ex;
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestProperty("Time", "long")]
+    public void GeneticAlgorithmPerformanceTest() {
+      ex = null;
+      GeneticAlgorithm ga = (GeneticAlgorithm)XmlParser.Deserialize(@"Test Resources\GA_TSP.hl");
+      ga.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(ga_ExceptionOccurred);
+      ga.SetSeedRandomly.Value = false;
+      ga.Seed.Value = 0;
+
+      ga.Prepare();
+      ga.Start();
+      if (ex != null) throw ex;
+
+      TestContext.WriteLine("Runtime: {0}", ga.ExecutionTime.ToString());
+
+      double expectedBestQuality = 12332.0;
+      double expectedAverageQuality = 13123.2;
+      double expectedWorstQuality = 14538.0;
+      double bestQuality = (ga.Results["CurrentBestQuality"].Value as DoubleValue).Value;
+      double averageQuality = (ga.Results["CurrentAverageQuality"].Value as DoubleValue).Value;
+      double worstQuality = (ga.Results["CurrentWorstQuality"].Value as DoubleValue).Value;
+
+      TestContext.WriteLine("");
+      TestContext.WriteLine("CurrentBestQuality: {0} (should be {1})", bestQuality, expectedBestQuality);
+      TestContext.WriteLine("CurrentAverageQuality: {0} (should be {1})", averageQuality, expectedAverageQuality);
+      TestContext.WriteLine("CurrentWorstQuality: {0} (should be {1})", worstQuality, expectedWorstQuality);
+
+      Assert.AreEqual(bestQuality, expectedBestQuality);
+      Assert.AreEqual(averageQuality, expectedAverageQuality);
+      Assert.AreEqual(worstQuality, expectedWorstQuality);
+    }
+
+    private void ga_ExceptionOccurred(object sender, EventArgs<Exception> e) {
+      ex = e.Value;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/InstantiateCreatablesTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/InstantiateCreatablesTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/InstantiateCreatablesTest.cs	(revision 16038)
@@ -0,0 +1,58 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Core;
+using HeuristicLab.PluginInfrastructure;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+
+  [TestClass]
+  public class InstantiateCreatablesTest {
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "medium")]
+    public void InstantiateAllCreatables() {
+      var exceptions = new List<string>();
+
+      var types = from t in ApplicationManager.Manager.GetTypes(typeof(IItem))
+                  where CreatableAttribute.IsCreatable(t)
+                  select t;
+
+      Assert.IsTrue(types.Any(), "No creatables found!");
+
+      foreach (var t in types) {
+        try {
+          var instance = Activator.CreateInstance(t);
+        }
+        catch {
+          exceptions.Add("Error instantiating " + t.FullName);
+        }
+      }
+
+      Assert.IsTrue(!exceptions.Any(), string.Join(Environment.NewLine, exceptions));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/NamedItemTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/NamedItemTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/NamedItemTest.cs	(revision 16038)
@@ -0,0 +1,24 @@
+﻿using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.PluginInfrastructure;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class NamedItemTest {
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "long")]
+    public void NamedItemTestNameNotEmpty() {
+      StringBuilder sb = new StringBuilder();
+      foreach (var namedItem in ApplicationManager.Manager.GetInstances<INamedItem>()) {
+        if (string.IsNullOrEmpty(namedItem.Name)) {
+          sb.AppendLine(string.Format("{0} does not have a name specified when created by the default ctor.", namedItem.GetType().GetPrettyName()));
+        }
+      }
+      Assert.IsTrue(sb.Length == 0, sb.ToString());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/ParameterVisibilityTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/ParameterVisibilityTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/ParameterVisibilityTest.cs	(revision 16038)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using System.Reflection;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.PluginInfrastructure;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class ParameterVisibilityTest {
+    private TestContext testContextInstance;
+    public TestContext TestContext {
+      get { return testContextInstance; }
+      set { testContextInstance = value; }
+    }
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "long")]
+    public void TestParameterVisibility() {
+      StringBuilder errorMessage = new StringBuilder();
+
+      foreach (var parameterizedItem in ApplicationManager.Manager.GetInstances<IParameterizedItem>()) {
+        foreach (var parameter in parameterizedItem.Parameters) {
+          var parameterType = parameter.GetType().GetInterfaces().FirstOrDefault(x => x.IsGenericType && x.GetGenericTypeDefinition() == typeof(IConstrainedValueParameter<>));
+          if (parameterType == null) continue;
+
+          var parameterGenericTypeArgument = parameterType.GetGenericArguments().First();
+          var parameterGenericTypeDefinition = typeof(IConstrainedValueParameter<>);
+
+          var paramProperty = parameterizedItem.GetType().GetProperty(parameter.Name + "Parameter",
+            BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public);
+          var valueProperty = parameterizedItem.GetType().GetProperty(parameter.Name,
+                                                                 BindingFlags.GetProperty | BindingFlags.Instance |
+                                                                 BindingFlags.Public);
+          if (paramProperty == null)
+            errorMessage.Append(Environment.NewLine + parameterizedItem.GetType() +
+              ": public property " + parameter.Name + "Parameter is missing.");
+          else if (paramProperty.PropertyType.GetGenericTypeDefinition() != parameterGenericTypeDefinition)
+            errorMessage.Append(Environment.NewLine + parameterizedItem.GetType() +
+              ": public property " + parameter.Name + "Parameter type must be " + parameterGenericTypeDefinition.Name);
+          else if (paramProperty.PropertyType.GetGenericArguments().First() != parameterGenericTypeArgument)
+            errorMessage.Append(Environment.NewLine + parameterizedItem.GetType() +
+              ": public property " + parameter.Name + "Parameter generic type argument does not match the generic type argument of the parameter.");
+
+          if (valueProperty == null)
+            TestContext.WriteLine(parameterizedItem.GetType() + ": public property " + parameter.Name + " is missing.");
+          else if (valueProperty.PropertyType != parameterGenericTypeArgument) {
+            TestContext.WriteLine(parameterizedItem.GetType() + ": " + parameter.Name + " property type does not match the generic type argument of the parameter.");
+          } else if (!valueProperty.CanRead || !valueProperty.CanWrite)
+            TestContext.WriteLine(parameterizedItem.GetType() + ": public property " + parameter.Name + " must have a getter and a setter.");
+        }
+      }
+      Assert.IsTrue(errorMessage.Length == 0, errorMessage.ToString());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/PluginDependenciesTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/PluginDependenciesTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/PluginDependenciesTest.cs	(revision 16038)
@@ -0,0 +1,136 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class PluginDependenciesTest {
+    private static Dictionary<Assembly, Type> loadedPlugins;
+    private static Dictionary<string, string> pluginNames;
+    private static Dictionary<string, Assembly> pluginFilesToPluginLookup = new Dictionary<string, Assembly>();
+
+    // Use ClassInitialize to run code before running the first test in the class
+    [ClassInitialize]
+    public static void MyClassInitialize(TestContext testContext) {
+      loadedPlugins = PluginLoader.Assemblies.Where(PluginLoader.IsPluginAssembly).ToDictionary(a => a, GetPluginFromAssembly);
+      pluginNames = loadedPlugins.ToDictionary(a => a.Key.GetName().FullName, a => GetPluginName(a.Value));
+
+      foreach (Assembly pluginAssembly in loadedPlugins.Keys) {
+        Type pluginType = GetPluginFromAssembly(pluginAssembly);
+        var pluginFileAttributes = Attribute.GetCustomAttributes(pluginType, false).OfType<PluginFileAttribute>();
+        foreach (var pluginFileAttribute in pluginFileAttributes) {
+          string fillNameWithoutExtension = Path.GetFileNameWithoutExtension(pluginFileAttribute.FileName);
+          pluginFilesToPluginLookup.Add(fillNameWithoutExtension, pluginAssembly);
+        }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "short")]
+    public void CheckReferenceAssembliesForPluginDependencies() {
+      StringBuilder errorMessage = new StringBuilder();
+      foreach (Assembly pluginAssembly in loadedPlugins.Keys) {
+        Type plugin = loadedPlugins[pluginAssembly];
+        var pluginFiles = new HashSet<string>(Attribute.GetCustomAttributes(plugin, false)
+            .OfType<PluginFileAttribute>().Where(pf => pf.FileType == PluginFileType.Assembly).Select(pf => pf.FileName));
+        var pluginAssemblies = PluginLoader.Assemblies.Where(a => pluginFiles.Contains(Path.GetFileName(a.Location))).ToList();
+        var referencedAssemblies = pluginAssemblies.SelectMany(a => a.GetReferencedAssemblies()).ToList();
+
+        Dictionary<string, PluginDependencyAttribute> pluginDependencies = Attribute.GetCustomAttributes(plugin, false).OfType<PluginDependencyAttribute>().ToDictionary(a => a.Dependency);
+
+        foreach (AssemblyName referencedAssemblyName in referencedAssemblies) {
+          if (IsPluginAssemblyName(referencedAssemblyName)) {
+            if (!pluginDependencies.ContainsKey(pluginNames[referencedAssemblyName.FullName]))
+              errorMessage.AppendLine("Missing dependency in plugin " + plugin + " to referenced plugin " + pluginNames[referencedAssemblyName.FullName] + ".");
+          } else { //no plugin assembly => test if the assembly is delivered by another plugin
+            if (pluginFilesToPluginLookup.ContainsKey(referencedAssemblyName.Name)) {
+              string containingPluginFullName = pluginFilesToPluginLookup[referencedAssemblyName.Name].FullName;
+              if (containingPluginFullName != pluginAssembly.FullName && !pluginDependencies.ContainsKey(pluginNames[containingPluginFullName]))
+                errorMessage.AppendLine("Missing dependency in plugin " + plugin + " to plugin " + pluginNames[containingPluginFullName] + " due to a reference to " + referencedAssemblyName.FullName + ".");
+            }
+          }
+        }
+      }
+      Assert.IsTrue(errorMessage.Length == 0, errorMessage.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "short")]
+    public void CheckPluginDependenciesForReferencedAssemblies() {
+      StringBuilder errorMessage = new StringBuilder();
+      foreach (Assembly pluginAssembly in loadedPlugins.Keys) {
+        Type plugin = loadedPlugins[pluginAssembly];
+        Dictionary<PluginDependencyAttribute, string> pluginDependencies = Attribute.GetCustomAttributes(plugin, false).OfType<PluginDependencyAttribute>().ToDictionary(a => a, a => a.Dependency);
+        var pluginFiles = new HashSet<string>(Attribute.GetCustomAttributes(plugin, false)
+          .OfType<PluginFileAttribute>().Where(pf => pf.FileType == PluginFileType.Assembly).Select(pf => pf.FileName));
+        var pluginAssemblies = PluginLoader.Assemblies.Where(a => pluginFiles.Contains(Path.GetFileName(a.Location))).ToList();
+        var referencedAssemblies = pluginAssemblies.SelectMany(a => a.GetReferencedAssemblies()).ToList();
+
+        foreach (PluginDependencyAttribute attribute in pluginDependencies.Keys) {
+          string pluginDependencyName = pluginDependencies[attribute];
+
+          if (pluginDependencyName == "HeuristicLab.MathJax") continue; //is never referenced as this plugin contains HTML files
+          if (pluginDependencyName == "HeuristicLab.MatlabConnector") continue; //the matlab connector is loaded dynamically and hence not referenced by the dll
+          var referencedPluginAssemblies = referencedAssemblies.Where(IsPluginAssemblyName);
+          if (referencedPluginAssemblies.Any(a => pluginNames[a.FullName] == pluginDependencyName)) continue;
+
+          var referencedNonPluginAssemblies = referencedAssemblies.Where(a => !IsPluginAssemblyName(a));
+          bool found = (from referencedNonPluginAssembly in referencedNonPluginAssemblies
+                        select referencedNonPluginAssembly.Name into assemblyName
+                        where pluginFilesToPluginLookup.ContainsKey(assemblyName)
+                        select GetPluginFromAssembly(pluginFilesToPluginLookup[assemblyName]) into pluginType
+                        select GetPluginName(pluginType)).Any(pluginName => pluginName == pluginDependencyName);
+
+          if (!found) errorMessage.AppendLine("Unnecessary plugin dependency in " + GetPluginName(plugin) + " to " + pluginDependencyName + ".");
+        }
+      }
+      Assert.IsTrue(errorMessage.Length == 0, errorMessage.ToString());
+    }
+
+    private static Type GetPluginFromAssembly(Assembly assembly) {
+      return assembly.GetExportedTypes().FirstOrDefault(t => typeof(IPlugin).IsAssignableFrom(t) && !t.IsAbstract && !t.IsInterface);
+    }
+
+    private static string GetPluginName(Type plugin) {
+      string name = string.Empty;
+      PluginAttribute pluginAttribute = (PluginAttribute)Attribute.GetCustomAttribute(plugin, typeof(PluginAttribute));
+      if (pluginAttribute != null)
+        name = pluginAttribute.Name;
+      return name;
+    }
+
+    private static bool IsPluginAssemblyName(AssemblyName assemblyName) {
+      return pluginNames.ContainsKey(assemblyName.FullName);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/PluginLoader.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/PluginLoader.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/PluginLoader.cs	(revision 16038)
@@ -0,0 +1,60 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using System.Reflection;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Tests {
+  public static class PluginLoader {
+    public const string ExecutableExtension = ".exe";
+    public const string AssemblyExtension = ".dll";
+    public const string TestAccessorAssemblyExtension = "_Accessor.dll";
+    public const string TestAssemblyExtension = ".Tests.dll";
+    public static List<Assembly> Assemblies;
+
+    static PluginLoader() {
+      foreach (string path in Directory.EnumerateFiles(AppDomain.CurrentDomain.BaseDirectory).Where(IsRelevantAssemblyPath)) {
+        try {
+          Assembly.LoadFrom(path);
+        } catch (BadImageFormatException) { }
+      }
+      // test relevant path again to exclude previously loaded assemblies
+      Assemblies = AppDomain.CurrentDomain.GetAssemblies()
+        .Where(asm => IsRelevantAssemblyPath(asm.Location))
+        .ToList();
+    }
+
+    private static bool IsRelevantAssemblyPath(string path) {
+      bool valid = true;
+      valid = valid && path.EndsWith(ExecutableExtension, StringComparison.OrdinalIgnoreCase) || path.EndsWith(AssemblyExtension, StringComparison.OrdinalIgnoreCase);
+      valid = valid && !path.EndsWith(TestAccessorAssemblyExtension, StringComparison.OrdinalIgnoreCase) && !path.EndsWith(TestAssemblyExtension, StringComparison.OrdinalIgnoreCase);
+      return valid;
+    }
+
+    public static bool IsPluginAssembly(Assembly assembly) {
+      return assembly.GetExportedTypes().Any(t => typeof(IPlugin).IsAssignableFrom(t) && !t.IsAbstract && !t.IsInterface);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/AlpsSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/AlpsSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/AlpsSampleTest.cs	(revision 16038)
@@ -0,0 +1,149 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.ALPS;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Problems.Instances.TSPLIB;
+using HeuristicLab.Problems.TravelingSalesman;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class AlpsTspSampleTest {
+    private const string TspSampleFileName = "ALPSGA_TSP";
+    private const string SymRegSampleFileName = "ALPSGP_SymReg";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateAlpsGaTspSampleTest() {
+      var alpsGa = CreateAlpsGaTspSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, TspSampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(alpsGa, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateAlpsGaSymRegSampleTest() {
+      var alpsGa = CreateAlpsGaSymRegSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SymRegSampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(alpsGa, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunAlpsGaTspSampleTest() {
+      var alpsGa = CreateAlpsGaTspSample();
+      alpsGa.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(alpsGa);
+      Assert.AreEqual(7967, SamplesUtils.GetDoubleResult(alpsGa, "BestQuality"));
+      Assert.AreEqual(17565.174444444445, SamplesUtils.GetDoubleResult(alpsGa, "CurrentAverageQuality"));
+      Assert.AreEqual(50295, SamplesUtils.GetDoubleResult(alpsGa, "CurrentWorstQuality"));
+      Assert.AreEqual(621900, SamplesUtils.GetIntResult(alpsGa, "EvaluatedSolutions"));
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunAlpsGaSymRegSampleTest() {
+      var alpsGa = CreateAlpsGaSymRegSample();
+      alpsGa.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(alpsGa);
+      Assert.AreEqual(265855, SamplesUtils.GetIntResult(alpsGa, "EvaluatedSolutions"));
+    }
+
+    private AlpsGeneticAlgorithm CreateAlpsGaTspSample() {
+      AlpsGeneticAlgorithm alpsGa = new AlpsGeneticAlgorithm();
+      #region Problem Configuration
+      var provider = new TSPLIBTSPInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name == "ch130");
+      TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem();
+      tspProblem.Load(provider.LoadData(instance));
+      tspProblem.UseDistanceMatrix.Value = true;
+      #endregion
+      #region Algorithm Configuration
+      alpsGa.Name = "ALPS Genetic Algorithm - TSP";
+      alpsGa.Description = "An age-layered population structure genetic algorithm which solves the \"ch130\" traveling salesman problem (imported from TSPLIB)";
+      alpsGa.Problem = tspProblem;
+      SamplesUtils.ConfigureAlpsGeneticAlgorithmParameters<GeneralizedRankSelector, MultiPermutationCrossover, InversionManipulator>(alpsGa,
+        numberOfLayers: 1000,
+        popSize: 100,
+        mutationRate: 0.05,
+        elites: 1,
+        plusSelection: true,
+        agingScheme: AgingScheme.Polynomial,
+        ageGap: 20,
+        ageInheritance: 1.0,
+        maxGens: 1000);
+      var checkedCrossovers = new[] { typeof(EdgeRecombinationCrossover), typeof(MaximalPreservativeCrossover), typeof(OrderCrossover2) };
+      var multiCrossover = (MultiPermutationCrossover)alpsGa.Crossover;
+      var crossovers = multiCrossover.Operators.Where(c => checkedCrossovers.Any(cc => cc.IsInstanceOfType(c))).ToList();
+      foreach (var c in multiCrossover.Operators)
+        multiCrossover.Operators.SetItemCheckedState(c, crossovers.Contains(c));
+      #endregion
+      return alpsGa;
+    }
+
+    private AlpsGeneticAlgorithm CreateAlpsGaSymRegSample() {
+      AlpsGeneticAlgorithm alpsGa = new AlpsGeneticAlgorithm();
+      #region Problem Configuration
+      var provider = new VladislavlevaInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name.StartsWith("Vladislavleva-5 F5"));
+      var symbRegProblem = new SymbolicRegressionSingleObjectiveProblem();
+      symbRegProblem.Load(provider.LoadData(instance));
+
+      symbRegProblem.MaximumSymbolicExpressionTreeDepth.Value = 35;
+      symbRegProblem.MaximumSymbolicExpressionTreeLength.Value = 35;
+
+      var grammar = (TypeCoherentExpressionGrammar)symbRegProblem.SymbolicExpressionTreeGrammar;
+      grammar.Symbols.OfType<Exponential>().Single().Enabled = false;
+      grammar.Symbols.OfType<Logarithm>().Single().Enabled = false;
+
+      #endregion
+      #region Algorithm Configuration
+      alpsGa.Name = "ALPS Genetic Programming - Symbolic Regression";
+      alpsGa.Description = "An ALPS-GP to solve a symbolic regression problem (Vladislavleva-5 dataset)";
+      alpsGa.Problem = symbRegProblem;
+      SamplesUtils.ConfigureAlpsGeneticAlgorithmParameters<GeneralizedRankSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>(alpsGa,
+        numberOfLayers: 1000,
+        popSize: 100,
+        mutationRate: 0.25,
+        elites: 1,
+        plusSelection: false,
+        agingScheme: AgingScheme.Polynomial,
+        ageGap: 15,
+        ageInheritance: 1.0,
+        maxGens: 500);
+      #endregion
+      return alpsGa;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/EsGriewankSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/EsGriewankSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/EsGriewankSampleTest.cs	(revision 16038)
@@ -0,0 +1,99 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using HeuristicLab.Algorithms.EvolutionStrategy;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.TestFunctions;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class EsGriewankSampleTest {
+    private const string SampleFileName = "ES_Griewank";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateEsGriewankSampleTest() {
+      var es = CreateEsGriewankSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(es, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunEsGriewankSampleTest() {
+      var es = CreateEsGriewankSample();
+      es.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(es);
+      Assert.AreEqual(0, SamplesUtils.GetDoubleResult(es, "BestQuality"));
+      Assert.AreEqual(0, SamplesUtils.GetDoubleResult(es, "CurrentAverageQuality"));
+      Assert.AreEqual(0, SamplesUtils.GetDoubleResult(es, "CurrentWorstQuality"));
+      Assert.AreEqual(100020, SamplesUtils.GetIntResult(es, "EvaluatedSolutions"));
+    }
+
+    private EvolutionStrategy CreateEsGriewankSample() {
+      EvolutionStrategy es = new EvolutionStrategy();
+
+      #region Problem Configuration
+
+      SingleObjectiveTestFunctionProblem problem = new SingleObjectiveTestFunctionProblem();
+
+      problem.ProblemSize.Value = 10;
+      problem.EvaluatorParameter.Value = new GriewankEvaluator();
+      problem.SolutionCreatorParameter.Value = new UniformRandomRealVectorCreator();
+      problem.Maximization.Value = false;
+      problem.Bounds = new DoubleMatrix(new double[,] { { -600, 600 } });
+      problem.BestKnownQuality.Value = 0;
+      problem.BestKnownSolutionParameter.Value = new RealVector(10);
+      problem.Name = "Single Objective Test Function";
+      problem.Description = "Test function with real valued inputs and a single objective.";
+
+      #endregion
+
+      #region Algorithm Configuration
+
+      es.Name = "Evolution Strategy - Griewank";
+      es.Description = "An evolution strategy which solves the 10-dimensional Griewank test function";
+      es.Problem = problem;
+      SamplesUtils.ConfigureEvolutionStrategyParameters<AverageCrossover, NormalAllPositionsManipulator,
+        StdDevStrategyVectorCreator, StdDevStrategyVectorCrossover, StdDevStrategyVectorManipulator>(
+          es, 20, 500, 2, 200, false);
+
+      StdDevStrategyVectorCreator strategyCreator = (StdDevStrategyVectorCreator)es.StrategyParameterCreator;
+      strategyCreator.BoundsParameter.Value = new DoubleMatrix(new double[,] { { 1, 20 } });
+
+      StdDevStrategyVectorManipulator strategyManipulator =
+        (StdDevStrategyVectorManipulator)es.StrategyParameterManipulator;
+      strategyManipulator.BoundsParameter.Value = new DoubleMatrix(new double[,] { { 1E-12, 30 } });
+      strategyManipulator.GeneralLearningRateParameter.Value = new DoubleValue(0.22360679774997896);
+      strategyManipulator.LearningRateParameter.Value = new DoubleValue(0.39763536438352531);
+
+      #endregion
+
+      return es;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GABppSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GABppSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GABppSampleTest.cs	(revision 16038)
@@ -0,0 +1,75 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.BinPacking3D;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GABppSampleTest {
+    private const string SampleFileName = "GA_BPP";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGaBppSampleTest() {
+      var ga = CreateGaBppSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ga, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGaBppSampleTest() {
+      var ga = CreateGaBppSample();
+      ga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ga);
+      Assert.AreEqual(0.59369488300408157, SamplesUtils.GetDoubleResult(ga, "BestQuality"), 1E-6);
+      Assert.AreEqual(0.51834350243004124, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"),1E-6);
+      Assert.AreEqual(0.36227753691428577, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"),1E-6);
+      Assert.AreEqual(15250, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
+    }
+
+    private GeneticAlgorithm CreateGaBppSample() {
+      GeneticAlgorithm ga = new GeneticAlgorithm();
+
+      #region Problem Configuration
+      var bpp = new PermutationProblem();
+      #endregion
+      #region Algorithm Configuration
+      ga.Name = "Genetic Algorithm - Bin Packing Problem (3D)";
+      ga.Description = "A genetic algorithm which solves the a 3d bin packing problem instance";
+      ga.Problem = bpp;
+      SamplesUtils.ConfigureGeneticAlgorithmParameters<TournamentSelector, PartiallyMatchedCrossover, Swap2Manipulator>(
+        ga, 300, 1, 50, 0.05, 3);
+      #endregion
+
+      return ga;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAGroupingProblemSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAGroupingProblemSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAGroupingProblemSampleTest.cs	(revision 16038)
@@ -0,0 +1,134 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Encodings.LinearLinkageEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.Programmable;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GAGroupingProblemSampleTest {
+    private const string SampleFileName = "GA_Grouping";
+    #region Code
+    private const string ProblemCode = @"
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.LinearLinkageEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.Programmable;
+
+namespace HeuristicLab.Problems.Programmable {
+  public class CompiledSingleObjectiveProblemDefinition : CompiledProblemDefinition, ISingleObjectiveProblemDefinition {
+    private const int ProblemSize = 100;
+    public bool Maximization { get { return false; } }
+
+    private bool[,] adjacencyMatrix;
+      
+    public override void Initialize() {
+      var encoding = new LinearLinkageEncoding(""lle"", length: ProblemSize);
+      adjacencyMatrix = new bool[encoding.Length, encoding.Length];
+      var random = new System.Random(13);
+      for (var i = 0; i < encoding.Length - 1; i++)
+        for (var j = i + 1; j < encoding.Length; j++)
+          adjacencyMatrix[i, j] = adjacencyMatrix[j, i] = random.Next(2) == 0;
+      
+      Encoding = encoding;
+    }
+
+    public double Evaluate(Individual individual, IRandom random) {
+      var penalty = 0;
+      var groups = individual.LinearLinkage(""lle"").GetGroups().ToList();
+      for (var i = 0; i < groups.Count; i++) {
+        for (var j = 0; j < groups[i].Count; j++)
+          for (var k = j + 1; k < groups[i].Count; k++)
+            if (!adjacencyMatrix[groups[i][j], groups[i][k]]) penalty++;
+      }
+      var result = groups.Count;
+      if (penalty > 0) result += penalty + ProblemSize;
+      return result;
+    }
+
+    public void Analyze(Individual[] individuals, double[] qualities, ResultCollection results, IRandom random) { }
+
+    public IEnumerable<Individual> GetNeighbors(Individual individual, IRandom random) {
+      foreach (var move in ExhaustiveSwap2MoveGenerator.Generate(individual.LinearLinkage(""lle""))) {
+        var neighbor = individual.Copy();
+        var lle = neighbor.LinearLinkage(""lle"");
+        Swap2MoveMaker.Apply(lle, move);
+        yield return neighbor;
+      }
+    }
+  }
+}
+";
+    #endregion
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGaGroupingProblemSampleTest() {
+      var ga = CreateGaGroupingProblemSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ga, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGaGroupingProblemSampleTest() {
+      var ga = CreateGaGroupingProblemSample();
+      ga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ga);
+      Assert.AreEqual(127, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
+      Assert.AreEqual(129,38, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
+      Assert.AreEqual(132, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
+      Assert.AreEqual(99100, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
+    }
+
+    private GeneticAlgorithm CreateGaGroupingProblemSample() {
+      GeneticAlgorithm ga = new GeneticAlgorithm();
+
+      #region Problem Configuration
+      var problem = new SingleObjectiveProgrammableProblem() {
+        ProblemScript = { Code = ProblemCode }
+      };
+      problem.ProblemScript.Compile();
+      #endregion
+      #region Algorithm Configuration
+      ga.Name = "Genetic Algorithm - Graph Coloring";
+      ga.Description = "A genetic algorithm which solves a graph coloring problem using the linear linkage encoding.";
+      ga.Problem = problem;
+      SamplesUtils.ConfigureGeneticAlgorithmParameters<TournamentSelector, MultiLinearLinkageCrossover, MultiLinearLinkageManipulator>(
+        ga, 100, 1, 1000, 0.05, 2);
+      #endregion
+
+      return ga;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GATspSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GATspSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GATspSampleTest.cs	(revision 16038)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.Instances.TSPLIB;
+using HeuristicLab.Problems.TravelingSalesman;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GATspSampleTest {
+    private const string SampleFileName = "GA_TSP";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGaTspSampleTest() {
+      var ga = CreateGaTspSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ga, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGaTspSampleTest() {
+      var ga = CreateGaTspSample();
+      ga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ga);
+      Assert.AreEqual(12332, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
+      Assert.AreEqual(13123.2, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
+      Assert.AreEqual(14538, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
+      Assert.AreEqual(99100, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
+    }
+
+    private GeneticAlgorithm CreateGaTspSample() {
+      GeneticAlgorithm ga = new GeneticAlgorithm();
+
+      #region Problem Configuration
+      var provider = new TSPLIBTSPInstanceProvider();
+      var instance = provider.GetDataDescriptors().Where(x => x.Name == "ch130").Single();
+      TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem();
+      tspProblem.Load(provider.LoadData(instance));
+      tspProblem.UseDistanceMatrix.Value = true;
+      #endregion
+      #region Algorithm Configuration
+      ga.Name = "Genetic Algorithm - TSP";
+      ga.Description = "A genetic algorithm which solves the \"ch130\" traveling salesman problem (imported from TSPLIB)";
+      ga.Problem = tspProblem;
+      SamplesUtils.ConfigureGeneticAlgorithmParameters<ProportionalSelector, OrderCrossover2, InversionManipulator>(
+        ga, 100, 1, 1000, 0.05);
+      #endregion
+
+      return ga;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAVrpSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAVrpSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAVrpSampleTest.cs	(revision 16038)
@@ -0,0 +1,116 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.Instances;
+using HeuristicLab.Problems.Instances.VehicleRouting;
+using HeuristicLab.Problems.VehicleRouting;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Potvin;
+using HeuristicLab.Problems.VehicleRouting.ProblemInstances;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GAVrpSampleTest {
+    private const string SampleFileName = "GA_VRP";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGaVrpSampleTest() {
+      var ga = CreateGaVrpSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ga, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGaVrpSampleTest() {
+      var ga = CreateGaVrpSample();
+      ga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ga);
+      Assert.AreEqual(1828.9368669428338, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
+      Assert.AreEqual(1830.1444308908331, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
+      Assert.AreEqual(1871.7128510304112, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
+      Assert.AreEqual(99100, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
+    }
+
+    private GeneticAlgorithm CreateGaVrpSample() {
+      GeneticAlgorithm ga = new GeneticAlgorithm();
+
+      #region Problem Configuration
+      VehicleRoutingProblem vrpProblem = new VehicleRoutingProblem();
+
+      SolomonFormatInstanceProvider instanceProvider = new SolomonInstanceProvider();
+      CVRPTWData data = instanceProvider.Import(@"Test Resources\C101.txt", @"Test Resources\C101.opt.txt") as CVRPTWData;
+      vrpProblem.Load(data);
+      vrpProblem.Name = "C101 VRP (imported from Solomon)";
+      vrpProblem.Description = "Represents a Vehicle Routing Problem.";
+      CVRPTWProblemInstance instance = vrpProblem.ProblemInstance as CVRPTWProblemInstance;
+      instance.DistanceFactor.Value = 1;
+      instance.FleetUsageFactor.Value = 100;
+      instance.OverloadPenalty.Value = 100;
+      instance.TardinessPenalty.Value = 100;
+      instance.TimeFactor.Value = 0;
+      vrpProblem.MaximizationParameter.Value.Value = false;
+      instance.UseDistanceMatrix.Value = true;
+      instance.Vehicles.Value = 25;
+      #endregion
+      #region Algorithm Configuration
+      ga.Name = "Genetic Algorithm - VRP";
+      ga.Description = "A genetic algorithm which solves the \"C101\" vehicle routing problem (imported from Solomon)";
+      ga.Problem = vrpProblem;
+      SamplesUtils.ConfigureGeneticAlgorithmParameters<TournamentSelector, MultiVRPSolutionCrossover, MultiVRPSolutionManipulator>(
+        ga, 100, 1, 1000, 0.05, 3);
+
+      var xOver = (MultiVRPSolutionCrossover)ga.Crossover;
+      foreach (var op in xOver.Operators) {
+        xOver.Operators.SetItemCheckedState(op, false);
+      }
+      xOver.Operators.SetItemCheckedState(xOver.Operators
+        .OfType<PotvinRouteBasedCrossover>()
+        .Single(), true);
+      xOver.Operators.SetItemCheckedState(xOver.Operators
+        .OfType<PotvinSequenceBasedCrossover>()
+        .Single(), true);
+
+      var manipulator = (MultiVRPSolutionManipulator)ga.Mutator;
+      foreach (var op in manipulator.Operators) {
+        manipulator.Operators.SetItemCheckedState(op, false);
+      }
+      manipulator.Operators.SetItemCheckedState(manipulator.Operators
+        .OfType<PotvinOneLevelExchangeMainpulator>()
+        .Single(), true);
+      manipulator.Operators.SetItemCheckedState(manipulator.Operators
+        .OfType<PotvinTwoLevelExchangeManipulator>()
+        .Single(), true);
+      #endregion
+
+      return ga;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPArtificialAntSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPArtificialAntSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPArtificialAntSampleTest.cs	(revision 16038)
@@ -0,0 +1,94 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.GeneticProgramming.ArtificialAnt;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GPArtificialAntSampleTest {
+    private const string SampleFileName = "SGP_SantaFe";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGpArtificialAntSampleTest() {
+      var ga = CreateGpArtificialAntSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ga, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGpArtificialAntSampleTest() {
+      var ga = CreateGpArtificialAntSample();
+      ga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ga);
+      Assert.AreEqual(81, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
+      Assert.AreEqual(48.19, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
+      Assert.AreEqual(0, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
+      Assert.AreEqual(50950, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
+    }
+
+    public GeneticAlgorithm CreateGpArtificialAntSample() {
+      GeneticAlgorithm ga = new GeneticAlgorithm();
+
+      #region Problem Configuration
+      Problem antProblem = new Problem();
+      antProblem.BestKnownQuality = 89;
+      antProblem.Encoding.TreeDepth = 10;
+      antProblem.Encoding.TreeLength = 100;
+      antProblem.Encoding.FunctionDefinitions = 3;
+      antProblem.Encoding.FunctionArguments = 3;
+      antProblem.MaxTimeSteps.Value = 600;
+      #endregion
+      #region Algorithm Configuration
+      ga.Name = "Genetic Programming - Artificial Ant";
+      ga.Description = "A standard genetic programming algorithm to solve the artificial ant problem (Santa-Fe trail)";
+      ga.Problem = antProblem;
+      SamplesUtils.ConfigureGeneticAlgorithmParameters<TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeArchitectureManipulator>(
+        ga, 1000, 1, 50, 0.15, 5);
+      var mutator = (MultiSymbolicExpressionTreeArchitectureManipulator)ga.Mutator;
+      mutator.Operators.SetItemCheckedState(mutator.Operators
+        .OfType<FullTreeShaker>()
+        .Single(), false);
+      mutator.Operators.SetItemCheckedState(mutator.Operators
+        .OfType<OnePointShaker>()
+        .Single(), false);
+      mutator.Operators.SetItemCheckedState(mutator.Operators
+        .OfType<ArgumentDeleter>()
+        .Single(), false);
+      mutator.Operators.SetItemCheckedState(mutator.Operators
+        .OfType<SubroutineDeleter>()
+        .Single(), false);
+      #endregion
+
+      return ga;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPLawnMowerSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPLawnMowerSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPLawnMowerSampleTest.cs	(revision 16038)
@@ -0,0 +1,71 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GPLawnMowerSampleTest {
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGpLawnMowerSampleTest() {
+      var ga = CreateGpLawnMowerSample();
+      ga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ga);
+      Assert.AreEqual(55, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
+      Assert.AreEqual(49.266, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
+      Assert.AreEqual(1, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
+      Assert.AreEqual(50950, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
+    }
+
+    public GeneticAlgorithm CreateGpLawnMowerSample() {
+      GeneticAlgorithm ga = new GeneticAlgorithm();
+
+      #region Problem Configuration
+
+      var problem = new Problems.GeneticProgramming.LawnMower.Problem();
+
+      #endregion
+      #region Algorithm Configuration
+
+      ga.Name = "Genetic Programming - Lawn Mower";
+      ga.Description = "A standard genetic programming algorithm to solve the lawn mower problem";
+      ga.Problem = problem;
+      SamplesUtils
+        .ConfigureGeneticAlgorithmParameters
+        <TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeArchitectureManipulator>(
+          ga, 1000, 1, 50, 0.25, 5);
+      var mutator = (MultiSymbolicExpressionTreeArchitectureManipulator)ga.Mutator;
+      mutator.Operators.SetItemCheckedState(mutator.Operators
+        .OfType<OnePointShaker>()
+        .Single(), false);
+
+      #endregion
+
+      return ga;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPMultiplexerSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPMultiplexerSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPMultiplexerSampleTest.cs	(revision 16038)
@@ -0,0 +1,73 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GPMultiplexerSampleTest {
+    private const string SampleFileName = "GP_Multiplexer";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGpMultiplexerSampleTest() {
+      var ga = CreateGpMultiplexerSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ga, path);
+    }
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGpMultiplexerSampleTest() {
+      var osga = CreateGpMultiplexerSample();
+      osga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(osga);
+
+      Assert.AreEqual(1856, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8);
+      Assert.AreEqual(1784.76, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8);
+      Assert.AreEqual(1536, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8);
+      Assert.AreEqual(66900, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"));
+    }
+
+    public static OffspringSelectionGeneticAlgorithm CreateGpMultiplexerSample() {
+      var problem = new HeuristicLab.Problems.GeneticProgramming.Boolean.MultiplexerProblem();
+      problem.Name = "11-Multiplexer Problem";
+      problem.Encoding.TreeLength = 50;
+      problem.Encoding.TreeDepth = 50;
+
+      var osga = new OffspringSelectionGeneticAlgorithm();
+      osga.Name = "Genetic Programming - Multiplexer 11 Problem";
+      osga.Description = "A genetic programming algorithm that solves the 11-bit multiplexer problem.";
+      osga.Problem = problem;
+      SamplesUtils.ConfigureOsGeneticAlgorithmParameters<GenderSpecificSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>
+        (osga, popSize: 100, elites: 1, maxGens: 50, mutationRate: 0.25);
+      osga.MaximumSelectionPressure.Value = 200;
+      return osga;
+
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPRobocodeSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPRobocodeSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPRobocodeSampleTest.cs	(revision 16038)
@@ -0,0 +1,69 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.GeneticProgramming.Robocode;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GPRobocodeSampleTest {
+    private const string SampleFileName = "SGP_Robocode";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGpRobocodeSampleTest() {
+      var ga = CreateGpRobocodeSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ga, path);
+    }
+
+    // there is no unit test for running the sample because a JDK installation would be necessary (and this is not the case on our build server)
+
+    public GeneticAlgorithm CreateGpRobocodeSample() {
+      GeneticAlgorithm ga = new GeneticAlgorithm();
+
+      #region Problem Configuration
+      Problem robocodeProblem = new Problem();
+      if (!robocodeProblem.Enemies.CheckedItems.Any())
+        robocodeProblem.Enemies.Add(new StringValue("sample.Crazy"));
+      #endregion
+      #region Algorithm Configuration
+      ga.Name = "Genetic Programming - Robocode Java Source";
+      ga.Description = "A standard genetic programming algorithm to evolve the java source code for a robocode bot (see http://robocode.sourceforge.net/). An installation of Java SE Developmen Kit (JDK) >= 1.6 is necessary to run this sample.";
+      ga.Problem = robocodeProblem;
+      SamplesUtils.ConfigureGeneticAlgorithmParameters<TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeArchitectureManipulator>(
+        ga, 50, 1, 50, 0.15, 2);
+
+      ga.Engine = new SequentialEngine.SequentialEngine();
+      #endregion
+
+      return ga;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicClassificationSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicClassificationSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicClassificationSampleTest.cs	(revision 16038)
@@ -0,0 +1,155 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Classification;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GPSymbolicClassificationSampleTest {
+    private const string SampleFileName = "SGP_SymbClass";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGpSymbolicClassificationSampleTest() {
+      var ga = CreateGpSymbolicClassificationSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ga, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGpSymbolicClassificationSampleTest() {
+      var ga = CreateGpSymbolicClassificationSample();
+      ga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ga);
+      Assert.AreEqual(0.141880203907627, SamplesUtils.GetDoubleResult(ga, "BestQuality"), 1E-8);
+      Assert.AreEqual(4.3246992327753295, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"), 1E-8);
+      Assert.AreEqual(100.62175156249987, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"), 1E-8);
+      Assert.AreEqual(100900, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
+      var bestTrainingSolution = (IClassificationSolution)ga.Results["Best training solution"].Value;
+      Assert.AreEqual(0.80875, bestTrainingSolution.TrainingAccuracy, 1E-8);
+      Assert.AreEqual(0.795031055900621, bestTrainingSolution.TestAccuracy, 1E-8);
+      var bestValidationSolution = (IClassificationSolution)ga.Results["Best validation solution"].Value;
+      Assert.AreEqual(0.81375, bestValidationSolution.TrainingAccuracy, 1E-8);
+      Assert.AreEqual(0.788819875776398, bestValidationSolution.TestAccuracy, 1E-8);
+    }
+
+    private GeneticAlgorithm CreateGpSymbolicClassificationSample() {
+      GeneticAlgorithm ga = new GeneticAlgorithm();
+      #region Problem Configuration
+      SymbolicClassificationSingleObjectiveProblem symbClassProblem = new SymbolicClassificationSingleObjectiveProblem();
+      symbClassProblem.Name = "Mammography Classification Problem";
+      symbClassProblem.Description = "Mammography dataset imported from the UCI machine learning repository (http://archive.ics.uci.edu/ml/datasets/Mammographic+Mass)";
+      UCIInstanceProvider provider = new UCIInstanceProvider();
+      var instance = provider.GetDataDescriptors().Where(x => x.Name.Equals("Mammography, M. Elter, 2007")).Single();
+      var mammoData = (ClassificationProblemData)provider.LoadData(instance);
+      mammoData.TargetVariableParameter.Value = mammoData.TargetVariableParameter.ValidValues
+        .First(v => v.Value == "Severity");
+      mammoData.InputVariables.SetItemCheckedState(
+        mammoData.InputVariables.Single(x => x.Value == "BI-RADS"), false);
+      mammoData.InputVariables.SetItemCheckedState(
+        mammoData.InputVariables.Single(x => x.Value == "Age"), true);
+      mammoData.InputVariables.SetItemCheckedState(
+        mammoData.InputVariables.Single(x => x.Value == "Shape"), true);
+      mammoData.InputVariables.SetItemCheckedState(
+        mammoData.InputVariables.Single(x => x.Value == "Margin"), true);
+      mammoData.InputVariables.SetItemCheckedState(
+        mammoData.InputVariables.Single(x => x.Value == "Density"), true);
+      mammoData.InputVariables.SetItemCheckedState(
+        mammoData.InputVariables.Single(x => x.Value == "Severity"), false);
+      mammoData.TrainingPartition.Start = 0;
+      mammoData.TrainingPartition.End = 800;
+      mammoData.TestPartition.Start = 800;
+      mammoData.TestPartition.End = 961;
+      mammoData.Name = "Data imported from mammographic_masses.csv";
+      mammoData.Description = "Original dataset: http://archive.ics.uci.edu/ml/datasets/Mammographic+Mass, missing values have been replaced with median values.";
+      symbClassProblem.ProblemData = mammoData;
+
+      // configure grammar
+      var grammar = new TypeCoherentExpressionGrammar();
+      grammar.ConfigureAsDefaultClassificationGrammar();
+      grammar.Symbols.OfType<VariableCondition>().Single().Enabled = false;
+      foreach (var varSy in grammar.Symbols.OfType<VariableBase>()) varSy.VariableChangeProbability = 1.0; // for backwards compatibilty
+      var varSymbol = grammar.Symbols.OfType<Variable>().Single();
+      varSymbol.WeightMu = 1.0;
+      varSymbol.WeightSigma = 1.0;
+      varSymbol.WeightManipulatorMu = 0.0;
+      varSymbol.WeightManipulatorSigma = 0.05;
+      varSymbol.MultiplicativeWeightManipulatorSigma = 0.03;
+      var constSymbol = grammar.Symbols.OfType<Constant>().Single();
+      constSymbol.MaxValue = 20;
+      constSymbol.MinValue = -20;
+      constSymbol.ManipulatorMu = 0.0;
+      constSymbol.ManipulatorSigma = 1;
+      constSymbol.MultiplicativeManipulatorSigma = 0.03;
+      symbClassProblem.SymbolicExpressionTreeGrammar = grammar;
+
+      // configure remaining problem parameters
+      symbClassProblem.BestKnownQuality.Value = 0.0;
+      symbClassProblem.FitnessCalculationPartition.Start = 0;
+      symbClassProblem.FitnessCalculationPartition.End = 400;
+      symbClassProblem.ValidationPartition.Start = 400;
+      symbClassProblem.ValidationPartition.End = 800;
+      symbClassProblem.RelativeNumberOfEvaluatedSamples.Value = 1;
+      symbClassProblem.MaximumSymbolicExpressionTreeLength.Value = 100;
+      symbClassProblem.MaximumSymbolicExpressionTreeDepth.Value = 10;
+      symbClassProblem.MaximumFunctionDefinitions.Value = 0;
+      symbClassProblem.MaximumFunctionArguments.Value = 0;
+      symbClassProblem.EvaluatorParameter.Value = new SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator();
+      #endregion
+      #region Algorithm Configuration
+      ga.Problem = symbClassProblem;
+      ga.Name = "Genetic Programming - Symbolic Classification";
+      ga.Description = "A standard genetic programming algorithm to solve a classification problem (Mammographic+Mass dataset)";
+      SamplesUtils.ConfigureGeneticAlgorithmParameters<TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>(
+        ga, 1000, 1, 100, 0.15, 5
+        );
+
+      var mutator = (MultiSymbolicExpressionTreeManipulator)ga.Mutator;
+      mutator.Operators.OfType<FullTreeShaker>().Single().ShakingFactor = 0.1;
+      mutator.Operators.OfType<OnePointShaker>().Single().ShakingFactor = 1.0;
+
+      ga.Analyzer.Operators.SetItemCheckedState(
+        ga.Analyzer.Operators
+        .OfType<SymbolicClassificationSingleObjectiveOverfittingAnalyzer>()
+        .Single(), false);
+      ga.Analyzer.Operators.SetItemCheckedState(
+        ga.Analyzer.Operators
+        .OfType<SymbolicDataAnalysisAlleleFrequencyAnalyzer>()
+        .First(), false);
+      #endregion
+      return ga;
+    }
+
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleTest.cs	(revision 16038)
@@ -0,0 +1,154 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GPSymbolicRegressionSampleTest {
+    private const string SampleFileName = "SGP_SymbReg";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGpSymbolicRegressionSampleTest() {
+      var ga = CreateGpSymbolicRegressionSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ga, path);
+    }
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGpSymbolicRegressionSampleTest() {
+      var ga = CreateGpSymbolicRegressionSample();
+      ga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ga);
+      Assert.AreEqual(0.858344291534625, SamplesUtils.GetDoubleResult(ga, "BestQuality"), 1E-8);
+      Assert.AreEqual(0.56758466520692641, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"), 1E-8);
+      Assert.AreEqual(0, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"), 1E-8);
+      Assert.AreEqual(50950, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
+      var bestTrainingSolution = (IRegressionSolution)ga.Results["Best training solution"].Value;
+      Assert.AreEqual(0.85504801557844745, bestTrainingSolution.TrainingRSquared, 1E-8);
+      Assert.AreEqual(0.86259381948647817, bestTrainingSolution.TestRSquared, 1E-8);
+      var bestValidationSolution = (IRegressionSolution)ga.Results["Best validation solution"].Value;
+      Assert.AreEqual(0.84854338315539746, bestValidationSolution.TrainingRSquared, 1E-8);
+      Assert.AreEqual(0.8662813452656678, bestValidationSolution.TestRSquared, 1E-8);
+    }
+
+    private GeneticAlgorithm CreateGpSymbolicRegressionSample() {
+      GeneticAlgorithm ga = new GeneticAlgorithm();
+      #region Problem Configuration
+      SymbolicRegressionSingleObjectiveProblem symbRegProblem = new SymbolicRegressionSingleObjectiveProblem();
+      symbRegProblem.Name = "Tower Symbolic Regression Problem";
+      symbRegProblem.Description = "Tower Dataset (downloaded from: http://www.symbolicregression.com/?q=towerProblem)";
+      RegressionRealWorldInstanceProvider provider = new RegressionRealWorldInstanceProvider();
+      var instance = provider.GetDataDescriptors().Where(x => x.Name.Equals("Tower")).Single();
+      var towerProblemData = (RegressionProblemData)provider.LoadData(instance);
+      towerProblemData.TargetVariableParameter.Value = towerProblemData.TargetVariableParameter.ValidValues
+        .First(v => v.Value == "towerResponse");
+      towerProblemData.InputVariables.SetItemCheckedState(
+        towerProblemData.InputVariables.Single(x => x.Value == "x1"), true);
+      towerProblemData.InputVariables.SetItemCheckedState(
+        towerProblemData.InputVariables.Single(x => x.Value == "x7"), false);
+      towerProblemData.InputVariables.SetItemCheckedState(
+        towerProblemData.InputVariables.Single(x => x.Value == "x11"), false);
+      towerProblemData.InputVariables.SetItemCheckedState(
+        towerProblemData.InputVariables.Single(x => x.Value == "x16"), false);
+      towerProblemData.InputVariables.SetItemCheckedState(
+        towerProblemData.InputVariables.Single(x => x.Value == "x21"), false);
+      towerProblemData.InputVariables.SetItemCheckedState(
+        towerProblemData.InputVariables.Single(x => x.Value == "x25"), false);
+      towerProblemData.InputVariables.SetItemCheckedState(
+        towerProblemData.InputVariables.Single(x => x.Value == "towerResponse"), false);
+      towerProblemData.TrainingPartition.Start = 0;
+      towerProblemData.TrainingPartition.End = 3136;
+      towerProblemData.TestPartition.Start = 3136;
+      towerProblemData.TestPartition.End = 4999;
+      towerProblemData.Name = "Data imported from towerData.txt";
+      towerProblemData.Description = "Chemical concentration at top of distillation tower, dataset downloaded from: http://vanillamodeling.com/realproblems.html, best R² achieved with nu-SVR = 0.97";
+      symbRegProblem.ProblemData = towerProblemData;
+
+      // configure grammar
+      var grammar = new TypeCoherentExpressionGrammar();
+      grammar.ConfigureAsDefaultRegressionGrammar();
+      grammar.Symbols.OfType<VariableCondition>().Single().InitialFrequency = 0.0;
+      foreach (var varSy in grammar.Symbols.OfType<VariableBase>()) varSy.VariableChangeProbability = 1.0; // for backwards compatibilty
+      var varSymbol = grammar.Symbols.OfType<Variable>().Single();
+      varSymbol.WeightMu = 1.0;
+      varSymbol.WeightSigma = 1.0;
+      varSymbol.WeightManipulatorMu = 0.0;
+      varSymbol.WeightManipulatorSigma = 0.05;
+      varSymbol.MultiplicativeWeightManipulatorSigma = 0.03;
+      var constSymbol = grammar.Symbols.OfType<Constant>().Single();
+      constSymbol.MaxValue = 20;
+      constSymbol.MinValue = -20;
+      constSymbol.ManipulatorMu = 0.0;
+      constSymbol.ManipulatorSigma = 1;
+      constSymbol.MultiplicativeManipulatorSigma = 0.03;
+      symbRegProblem.SymbolicExpressionTreeGrammar = grammar;
+
+      // configure remaining problem parameters
+      symbRegProblem.BestKnownQuality.Value = 0.97;
+      symbRegProblem.FitnessCalculationPartition.Start = 0;
+      symbRegProblem.FitnessCalculationPartition.End = 2300;
+      symbRegProblem.ValidationPartition.Start = 2300;
+      symbRegProblem.ValidationPartition.End = 3136;
+      symbRegProblem.RelativeNumberOfEvaluatedSamples.Value = 1;
+      symbRegProblem.MaximumSymbolicExpressionTreeLength.Value = 150;
+      symbRegProblem.MaximumSymbolicExpressionTreeDepth.Value = 12;
+      symbRegProblem.MaximumFunctionDefinitions.Value = 0;
+      symbRegProblem.MaximumFunctionArguments.Value = 0;
+
+      symbRegProblem.EvaluatorParameter.Value = new SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator();
+      #endregion
+      #region Algorithm Configuration
+      ga.Problem = symbRegProblem;
+      ga.Name = "Genetic Programming - Symbolic Regression";
+      ga.Description = "A standard genetic programming algorithm to solve a symbolic regression problem (tower dataset)";
+      SamplesUtils.ConfigureGeneticAlgorithmParameters<TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>(
+        ga, 1000, 1, 50, 0.15, 5);
+      var mutator = (MultiSymbolicExpressionTreeManipulator)ga.Mutator;
+      mutator.Operators.OfType<FullTreeShaker>().Single().ShakingFactor = 0.1;
+      mutator.Operators.OfType<OnePointShaker>().Single().ShakingFactor = 1.0;
+
+      ga.Analyzer.Operators.SetItemCheckedState(
+        ga.Analyzer.Operators
+        .OfType<SymbolicRegressionSingleObjectiveOverfittingAnalyzer>()
+        .Single(), false);
+      ga.Analyzer.Operators.SetItemCheckedState(
+        ga.Analyzer.Operators
+        .OfType<SymbolicDataAnalysisAlleleFrequencyAnalyzer>()
+        .First(), false);
+      #endregion
+      return ga;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleWithOSTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleWithOSTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleWithOSTest.cs	(revision 16038)
@@ -0,0 +1,217 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GPSymbolicRegressionSampleWithOSTest {
+    private const string SampleFileName = "OSGP_SymReg";
+    private const int seed = 12345;
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGPSymbolicRegressionSampleWithOSTest() {
+      var osga = CreateGpSymbolicRegressionSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(osga, path);
+    }
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGPSymbolicRegressionSampleWithOSTest() {
+      var osga = CreateGpSymbolicRegressionSample();
+      osga.SetSeedRandomly.Value = false;
+      osga.Seed.Value = seed;
+      osga.MaximumGenerations.Value = 10; //reduce unit test runtime
+
+      SamplesUtils.RunAlgorithm(osga);
+      var bestTrainingSolution = (IRegressionSolution)osga.Results["Best training solution"].Value;
+
+      if (Environment.Is64BitProcess) {
+        // the following are the result values as produced on builder.heuristiclab.com
+        // Unfortunately, running the same test on a different machine results in different values
+        // For x86 environments the results below match but on x64 there is a difference
+        // We tracked down the ConstantOptimizationEvaluator as a possible cause but have not
+        // been able to identify the real cause. Presumably, execution on a Xeon and a Core i7 processor 
+        // leads to different results. 
+        Assert.AreEqual(0.90811178793448177, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8, Environment.NewLine + "Best Quality differs.");
+        Assert.AreEqual(0.87264498853305739, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8, Environment.NewLine + "Current Average Quality differs.");
+        Assert.AreEqual(0.75425658608938817, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8, Environment.NewLine + "Current Worst Quality differs.");
+        Assert.AreEqual(8900, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"), Environment.NewLine + "Evaluated Solutions differ.");
+        Assert.AreEqual(0.90811178793448177, bestTrainingSolution.TrainingRSquared, 1E-8, Environment.NewLine + "Best Training Solution Training R² differs.");
+        // Assert.AreEqual(0.896290231994223, bestTrainingSolution.TestRSquared, 1E-8, Environment.NewLine + "Best Training Solution Test R² differs.");
+      } else {
+        Assert.AreEqual(0.9971536312165723, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8, Environment.NewLine + "Best Qualitiy differs.");
+        Assert.AreEqual(0.98382832370544937, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8, Environment.NewLine + "Current Average Quality differs.");
+        Assert.AreEqual(0.960805603777699, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8, Environment.NewLine + "Current Worst Quality differs.");
+        Assert.AreEqual(10500, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"), Environment.NewLine + "Evaluated Solutions differ.");
+        Assert.AreEqual(0.9971536312165723, bestTrainingSolution.TrainingRSquared, 1E-8, Environment.NewLine + "Best Training Solution Training R² differs.");
+        Assert.AreEqual(0.010190137960908724, bestTrainingSolution.TestRSquared, 1E-8, Environment.NewLine + "Best Training Solution Test R² differs.");
+      }
+    }
+
+    private OffspringSelectionGeneticAlgorithm CreateGpSymbolicRegressionSample() {
+      var osga = new OffspringSelectionGeneticAlgorithm();
+      #region Problem Configuration
+      var provider = new VariousInstanceProvider(seed);
+      var instance = provider.GetDataDescriptors().First(x => x.Name.StartsWith("Spatial co-evolution"));
+      var problemData = (RegressionProblemData)provider.LoadData(instance);
+      var problem = new SymbolicRegressionSingleObjectiveProblem();
+      problem.ProblemData = problemData;
+      problem.Load(problemData);
+      problem.BestKnownQuality.Value = 1.0;
+
+      #region configure grammar
+
+      var grammar = (TypeCoherentExpressionGrammar)problem.SymbolicExpressionTreeGrammar;
+      grammar.ConfigureAsDefaultRegressionGrammar();
+
+      //symbols square, power, squareroot, root, log, exp, sine, cosine, tangent, variable
+      var square = grammar.Symbols.OfType<Square>().Single();
+      var power = grammar.Symbols.OfType<Power>().Single();
+      var squareroot = grammar.Symbols.OfType<SquareRoot>().Single();
+      var root = grammar.Symbols.OfType<Root>().Single();
+      var log = grammar.Symbols.OfType<Logarithm>().Single();
+      var exp = grammar.Symbols.OfType<Exponential>().Single();
+      var sine = grammar.Symbols.OfType<Sine>().Single();
+      var cosine = grammar.Symbols.OfType<Cosine>().Single();
+      var tangent = grammar.Symbols.OfType<Tangent>().Single();
+      var variable = grammar.Symbols.OfType<Variable>().Single();
+      var powerSymbols = grammar.Symbols.Single(s => s.Name == "Power Functions");
+      powerSymbols.Enabled = true;
+
+      square.Enabled = true;
+      square.InitialFrequency = 1.0;
+      foreach (var allowed in grammar.GetAllowedChildSymbols(square))
+        grammar.RemoveAllowedChildSymbol(square, allowed);
+      foreach (var allowed in grammar.GetAllowedChildSymbols(square, 0))
+        grammar.RemoveAllowedChildSymbol(square, allowed, 0);
+      grammar.AddAllowedChildSymbol(square, variable);
+
+      power.Enabled = false;
+
+      squareroot.Enabled = false;
+      foreach (var allowed in grammar.GetAllowedChildSymbols(squareroot))
+        grammar.RemoveAllowedChildSymbol(squareroot, allowed);
+      foreach (var allowed in grammar.GetAllowedChildSymbols(squareroot, 0))
+        grammar.RemoveAllowedChildSymbol(squareroot, allowed, 0);
+      grammar.AddAllowedChildSymbol(squareroot, variable);
+
+      root.Enabled = false;
+
+      log.Enabled = true;
+      log.InitialFrequency = 1.0;
+      foreach (var allowed in grammar.GetAllowedChildSymbols(log))
+        grammar.RemoveAllowedChildSymbol(log, allowed);
+      foreach (var allowed in grammar.GetAllowedChildSymbols(log, 0))
+        grammar.RemoveAllowedChildSymbol(log, allowed, 0);
+      grammar.AddAllowedChildSymbol(log, variable);
+
+      exp.Enabled = true;
+      exp.InitialFrequency = 1.0;
+      foreach (var allowed in grammar.GetAllowedChildSymbols(exp))
+        grammar.RemoveAllowedChildSymbol(exp, allowed);
+      foreach (var allowed in grammar.GetAllowedChildSymbols(exp, 0))
+        grammar.RemoveAllowedChildSymbol(exp, allowed, 0);
+      grammar.AddAllowedChildSymbol(exp, variable);
+
+      sine.Enabled = false;
+      foreach (var allowed in grammar.GetAllowedChildSymbols(sine))
+        grammar.RemoveAllowedChildSymbol(sine, allowed);
+      foreach (var allowed in grammar.GetAllowedChildSymbols(sine, 0))
+        grammar.RemoveAllowedChildSymbol(sine, allowed, 0);
+      grammar.AddAllowedChildSymbol(sine, variable);
+
+      cosine.Enabled = false;
+      foreach (var allowed in grammar.GetAllowedChildSymbols(cosine))
+        grammar.RemoveAllowedChildSymbol(cosine, allowed);
+      foreach (var allowed in grammar.GetAllowedChildSymbols(cosine, 0))
+        grammar.RemoveAllowedChildSymbol(cosine, allowed, 0);
+      grammar.AddAllowedChildSymbol(cosine, variable);
+
+      tangent.Enabled = false;
+      foreach (var allowed in grammar.GetAllowedChildSymbols(tangent))
+        grammar.RemoveAllowedChildSymbol(tangent, allowed);
+      foreach (var allowed in grammar.GetAllowedChildSymbols(tangent, 0))
+        grammar.RemoveAllowedChildSymbol(tangent, allowed, 0);
+      grammar.AddAllowedChildSymbol(tangent, variable);
+      #endregion
+
+      problem.SymbolicExpressionTreeGrammar = grammar;
+
+      // configure remaining problem parameters
+      problem.MaximumSymbolicExpressionTreeLength.Value = 50;
+      problem.MaximumSymbolicExpressionTreeDepth.Value = 12;
+      problem.MaximumFunctionDefinitions.Value = 0;
+      problem.MaximumFunctionArguments.Value = 0;
+
+      var evaluator = new SymbolicRegressionConstantOptimizationEvaluator();
+      evaluator.ConstantOptimizationIterations.Value = 5;
+      problem.EvaluatorParameter.Value = evaluator;
+      problem.RelativeNumberOfEvaluatedSamplesParameter.Hidden = true;
+      problem.SolutionCreatorParameter.Hidden = true;
+      #endregion
+
+      #region Algorithm Configuration
+      osga.Problem = problem;
+      osga.Name = "Offspring Selection Genetic Programming - Symbolic Regression";
+      osga.Description = "Genetic programming with strict offspring selection for solving a benchmark regression problem.";
+      SamplesUtils.ConfigureOsGeneticAlgorithmParameters<GenderSpecificSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>(osga, 100, 1, 25, 0.2, 50);
+      var mutator = (MultiSymbolicExpressionTreeManipulator)osga.Mutator;
+      mutator.Operators.OfType<FullTreeShaker>().Single().ShakingFactor = 0.1;
+      mutator.Operators.OfType<OnePointShaker>().Single().ShakingFactor = 1.0;
+
+      osga.Analyzer.Operators.SetItemCheckedState(
+        osga.Analyzer.Operators
+          .OfType<SymbolicRegressionSingleObjectiveOverfittingAnalyzer>()
+          .Single(), false);
+      osga.Analyzer.Operators.SetItemCheckedState(
+        osga.Analyzer.Operators
+          .OfType<SymbolicDataAnalysisAlleleFrequencyAnalyzer>()
+          .First(), false);
+
+      osga.ComparisonFactorModifierParameter.Hidden = true;
+      osga.ComparisonFactorLowerBoundParameter.Hidden = true;
+      osga.ComparisonFactorUpperBoundParameter.Hidden = true;
+      osga.OffspringSelectionBeforeMutationParameter.Hidden = true;
+      osga.SuccessRatioParameter.Hidden = true;
+      osga.SelectedParentsParameter.Hidden = true;
+      osga.ElitesParameter.Hidden = true;
+
+      #endregion
+      return osga;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPTimeSeriesSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPTimeSeriesSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPTimeSeriesSampleTest.cs	(revision 16038)
@@ -0,0 +1,93 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GPTimeSeriesSampleTest {
+    private const string SampleFileName = "OSGP_TimeSeries";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGpTimeSeriesSampleTest() {
+      var ga = CreateGpTimeSeriesSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ga, path);
+    }
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGpTimeSeriesSampleTest() {
+      var osga = CreateGpTimeSeriesSample();
+      osga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(osga);
+
+      Assert.AreEqual(0.015441526903606416, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8);
+      Assert.AreEqual(0.017420834241279298, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8);
+      Assert.AreEqual(0.065195703753298972, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8);
+      Assert.AreEqual(92000, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"));
+    }
+
+    public static OffspringSelectionGeneticAlgorithm CreateGpTimeSeriesSample() {
+      var problem = new SymbolicTimeSeriesPrognosisSingleObjectiveProblem();
+      problem.Name = "Symbolic time series prognosis problem (Mackey Glass t=17)";
+      problem.ProblemData.Name = "Mackey Glass t=17";
+      problem.MaximumSymbolicExpressionTreeLength.Value = 125;
+      problem.MaximumSymbolicExpressionTreeDepth.Value = 12;
+      problem.EvaluatorParameter.Value.HorizonParameter.Value.Value = 10;
+      problem.ApplyLinearScaling.Value = true;
+
+      foreach (var symbol in problem.SymbolicExpressionTreeGrammar.Symbols) {
+        if (symbol is Exponential || symbol is Logarithm) {
+          symbol.Enabled = false;
+        } else if (symbol is AutoregressiveTargetVariable) {
+          symbol.Enabled = true;
+          var autoRegressiveSymbol = symbol as AutoregressiveTargetVariable;
+          autoRegressiveSymbol.MinLag = -30;
+          autoRegressiveSymbol.MaxLag = -1;
+        }
+        if (symbol is VariableBase) {
+          var varSy = symbol as VariableBase;
+          varSy.VariableChangeProbability = 1.0; // backwards compatibility
+        }
+      }
+
+      var osga = new OffspringSelectionGeneticAlgorithm();
+      osga.Name = "Genetic Programming - Time Series Prediction (Mackey-Glass-17)";
+      osga.Description = "A genetic programming algorithm for creating a time-series model for the Mackey-Glass-17 time series.";
+      osga.Problem = problem;
+      SamplesUtils.ConfigureOsGeneticAlgorithmParameters<GenderSpecificSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>
+        (osga, popSize: 100, elites: 1, maxGens: 25, mutationRate: 0.15);
+      osga.MaximumSelectionPressure.Value = 100;
+      return osga;
+
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GaussianProcessRegressionSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GaussianProcessRegressionSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GaussianProcessRegressionSampleTest.cs	(revision 16038)
@@ -0,0 +1,79 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GaussianProcessRegressionSampleTest {
+    private const string SampleFileName = "GPR";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGaussianProcessRegressionSampleTest() {
+      var gpr = CreateGaussianProcessRegressionSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(gpr, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGaussianProcessRegressionSample() {
+      var gpr = CreateGaussianProcessRegressionSample();
+      gpr.SetSeedRandomly = false;
+      gpr.Seed = 1618551877;
+      SamplesUtils.RunAlgorithm(gpr);
+      Assert.AreEqual(-940.60591737780555, SamplesUtils.GetDoubleResult(gpr, "NegativeLogLikelihood"));
+      Assert.AreEqual(0.99560909041069334, SamplesUtils.GetDoubleResult(gpr, "Training R²"));
+    }
+
+    private GaussianProcessRegression CreateGaussianProcessRegressionSample() {
+      var gpr = new GaussianProcessRegression();
+      var provider = new VariousInstanceProvider();
+      var instance = provider.GetDataDescriptors().Where(x => x.Name.Contains("Spatial co-evolution")).Single();
+      var regProblem = new RegressionProblem();
+      regProblem.Load(provider.LoadData(instance));
+
+      #region Algorithm Configuration
+      gpr.Name = "Gaussian Process Regression";
+      gpr.Description = "A Gaussian process regression algorithm which solves the spatial co-evolution benchmark problem";
+      gpr.Problem = regProblem;
+
+      gpr.CovarianceFunction = new CovarianceSquaredExponentialIso();
+      gpr.MeanFunction = new MeanConst();
+      gpr.MinimizationIterations = 20;
+      gpr.Seed = 0;
+      gpr.SetSeedRandomly = true;
+      #endregion
+
+      gpr.Engine = new ParallelEngine.ParallelEngine();
+      return gpr;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GeSymbolicRegressionSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GeSymbolicRegressionSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GeSymbolicRegressionSampleTest.cs	(revision 16038)
@@ -0,0 +1,121 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GeSymbolicRegressionSampleTest {
+    #region artificial ant
+    private const string GeArtificialAntSampleFileName = "GE_ArtificialAnt";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGeArtificialAntSampleTest() {
+      var geaa = CreateGeArtificialAntSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, GeArtificialAntSampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(geaa, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGeArtificalAntSampleTest() {
+      var ga = CreateGeArtificialAntSample();
+      ga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ga);
+    }
+
+    public OffspringSelectionGeneticAlgorithm CreateGeArtificialAntSample() {
+      OffspringSelectionGeneticAlgorithm ga = new OffspringSelectionGeneticAlgorithm();
+
+      #region Problem Configuration
+      var problem = new HeuristicLab.Problems.GrammaticalEvolution.GEArtificialAntProblem();
+      #endregion
+      #region Algorithm Configuration
+      ga.Name = "Grammatical Evolution - Artificial Ant (SantaFe)";
+      ga.Description = "Grammatical evolution algorithm for solving a artificial ant problem";
+      ga.Problem = problem;
+      SamplesUtils.ConfigureOsGeneticAlgorithmParameters<GenderSpecificSelector, Encodings.IntegerVectorEncoding.SinglePointCrossover, Encodings.IntegerVectorEncoding.UniformOnePositionManipulator>(
+        ga, 200, 1, 50, 0.05, 200);
+      #endregion
+
+      return ga;
+    }
+    #endregion
+
+    #region symbolic regression
+    private const string GeSymbolicRegressionSampleFileName = "GE_SymbReg";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGeSymbolicRegressionSampleTest() {
+      var geSymbReg = CreateGeSymbolicRegressionSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, GeSymbolicRegressionSampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(geSymbReg, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGeSymbolicRegressionSampleTest() {
+      var ga = CreateGeSymbolicRegressionSample();
+      ga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ga);
+    }
+
+    public OffspringSelectionGeneticAlgorithm CreateGeSymbolicRegressionSample() {
+      var ga = new OffspringSelectionGeneticAlgorithm();
+
+      #region Problem Configuration
+      var problem = new HeuristicLab.Problems.GrammaticalEvolution.GESymbolicRegressionSingleObjectiveProblem();
+
+      #endregion
+      #region Algorithm Configuration
+      ga.Name = "Grammatical Evolution - Symbolic Regression (Poly-10)";
+      ga.Description = "Grammatical evolution algorithm for solving a symbolic regression problem problem";
+      ga.Problem = problem;
+      problem.Load(new PolyTen().GenerateRegressionData());
+
+      // must occur after loading problem data because the grammar creates symbols for random constants once the data is loaded
+      var consts = problem.SymbolicExpressionTreeGrammar.AllowedSymbols.OfType<Constant>().ToList();
+      foreach (var c in consts) {
+        problem.SymbolicExpressionTreeGrammar.RemoveSymbol(c);
+      }
+
+      SamplesUtils.ConfigureOsGeneticAlgorithmParameters<GenderSpecificSelector, Encodings.IntegerVectorEncoding.SinglePointCrossover, Encodings.IntegerVectorEncoding.UniformOnePositionManipulator>(
+        ga, 1000, 1, 50, 0.05, 200);
+      #endregion
+
+      return ga;
+    }
+    #endregion
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/IslandGaTspSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/IslandGaTspSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/IslandGaTspSampleTest.cs	(revision 16038)
@@ -0,0 +1,79 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.Instances.TSPLIB;
+using HeuristicLab.Problems.TravelingSalesman;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class UnitTest1 {
+    private const string SampleFileName = "IslandGA_TSP";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateIslandGaTspSampleTest() {
+      var ga = CreateIslandGaTspSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ga, path);
+    }
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunIslandGaTspSampleTest() {
+      var ga = CreateIslandGaTspSample();
+      ga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ga);
+      Assert.AreEqual(9918, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
+      Assert.AreEqual(10324.64, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
+      Assert.AreEqual(11823, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
+      Assert.AreEqual(495500, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
+    }
+
+    private IslandGeneticAlgorithm CreateIslandGaTspSample() {
+      IslandGeneticAlgorithm ga = new IslandGeneticAlgorithm();
+      #region Problem Configuration
+      var provider = new TSPLIBTSPInstanceProvider();
+      var instance = provider.GetDataDescriptors().Where(x => x.Name == "ch130").Single();
+      TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem();
+      tspProblem.Load(provider.LoadData(instance));
+      tspProblem.UseDistanceMatrix.Value = true;
+      #endregion
+      #region Algorithm Configuration
+      ga.Name = "Island Genetic Algorithm - TSP";
+      ga.Description = "An island genetic algorithm which solves the \"ch130\" traveling salesman problem (imported from TSPLIB)";
+      ga.Problem = tspProblem;
+      SamplesUtils.ConfigureIslandGeneticAlgorithmParameters<ProportionalSelector, OrderCrossover2, InversionManipulator,
+        UnidirectionalRingMigrator, BestSelector, WorstReplacer>(
+        ga, 100, 1, 1000, 0.05, 5, 50, 0.25);
+      #endregion
+      return ga;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/LocalSearchKnapsackSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/LocalSearchKnapsackSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/LocalSearchKnapsackSampleTest.cs	(revision 16038)
@@ -0,0 +1,98 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.LocalSearch;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.Knapsack;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class LocalSearchKnapsackSampleTest {
+    private const string SampleFileName = "LS_Knapsack";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateLocalSearchKnapsackSampleTest() {
+      var ls = CreateLocalSearchKnapsackSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ls, path);
+    }
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "medium")]
+    public void RunLocalSearchKnapsackSampleTest() {
+      var ls = CreateLocalSearchKnapsackSample();
+      ls.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ls);
+      Assert.AreEqual(345, SamplesUtils.GetDoubleResult(ls, "BestQuality"));
+      Assert.AreEqual(340.70731707317071, SamplesUtils.GetDoubleResult(ls, "CurrentAverageQuality"));
+      Assert.AreEqual(337, SamplesUtils.GetDoubleResult(ls, "CurrentWorstQuality"));
+      Assert.AreEqual(82000, SamplesUtils.GetIntResult(ls, "EvaluatedMoves"));
+    }
+
+    private LocalSearch CreateLocalSearchKnapsackSample() {
+      LocalSearch ls = new LocalSearch();
+      #region Problem Configuration
+      KnapsackProblem problem = new KnapsackProblem();
+      problem.BestKnownQuality = new DoubleValue(362);
+      problem.BestKnownSolution = new HeuristicLab.Encodings.BinaryVectorEncoding.BinaryVector(new bool[] { 
+       true , false, false, true , true , true , true , true , false, true , true , true , true , true , true , false, true , false, true , true , false, true , true , false, true , false, true , true , true , false, true , true , false, true , true , false, true , false, true , true , true , true , true , true , true , true , true , true , true , true , true , false, true , false, false, true , true , false, true , true , true , true , true , true , true , true , false, true , false, true , true , true , true , false, true , true , true , true , true , true , true , true});
+      problem.EvaluatorParameter.Value = new KnapsackEvaluator();
+      problem.SolutionCreatorParameter.Value = new RandomBinaryVectorCreator();
+      problem.KnapsackCapacity.Value = 297;
+      problem.Maximization.Value = true;
+      problem.Penalty.Value = 1;
+      problem.Values = new IntArray(new int[] { 
+  6, 1, 1, 6, 7, 8, 7, 4, 2, 5, 2, 6, 7, 8, 7, 1, 7, 1, 9, 4, 2, 6, 5,  3, 5, 3, 3, 6, 5, 2, 4, 9, 4, 5, 7, 1, 4, 3, 5, 5, 8, 3, 6, 7, 3, 9, 7, 7, 5, 5, 7, 1, 4, 4, 3, 9, 5, 1, 6, 2, 2, 6, 1, 6, 5, 4, 4, 7, 1,  8, 9, 9, 7, 4, 3, 8, 7, 5, 7, 4, 4, 5});
+      problem.Weights = new IntArray(new int[] { 
+ 1, 9, 3, 6, 5, 3, 8, 1, 7, 4, 2, 1, 2, 7, 9, 9, 8, 4, 9, 2, 4, 8, 3, 7, 5, 7, 5, 5, 1, 9, 8, 7, 8, 9, 1, 3, 3, 8, 8, 5, 1, 2, 4, 3, 6, 9, 4, 4, 9, 7, 4, 5, 1, 9, 7, 6, 7, 4, 7, 1, 2, 1, 2, 9, 8, 6, 8, 4, 7, 6, 7, 5, 3, 9, 4, 7, 4, 6, 1, 2, 5, 4});
+      problem.Name = "Knapsack Problem";
+      problem.Description = "Represents a Knapsack problem.";
+      #endregion
+      #region Algorithm Configuration
+      ls.Name = "Local Search - Knapsack";
+      ls.Description = "A local search algorithm that solves a randomly generated Knapsack problem";
+      ls.Problem = problem;
+      ls.MaximumIterations.Value = 1000;
+      ls.MoveEvaluator = ls.MoveEvaluatorParameter.ValidValues
+        .OfType<KnapsackOneBitflipMoveEvaluator>()
+        .Single();
+      ls.MoveGenerator = ls.MoveGeneratorParameter.ValidValues
+        .OfType<ExhaustiveOneBitflipMoveGenerator>()
+        .Single();
+      ls.MoveMaker = ls.MoveMakerParameter.ValidValues
+        .OfType<OneBitflipMoveMaker>()
+        .Single();
+      ls.SampleSize.Value = 100;
+      ls.Seed.Value = 0;
+      ls.SetSeedRandomly.Value = true;
+      #endregion
+      ls.Engine = new ParallelEngine.ParallelEngine();
+      return ls;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/OSESGriewankSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/OSESGriewankSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/OSESGriewankSampleTest.cs	(revision 16038)
@@ -0,0 +1,99 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using HeuristicLab.Algorithms.EvolutionStrategy;
+using HeuristicLab.Algorithms.OffspringSelectionEvolutionStrategy;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.TestFunctions;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class OSESGriewankSampleTest {
+    private const string SampleFileName = "OSES_Griewank";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateOSESGriewankSampleTest() {
+      var es = CreateOSESGriewankSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(es, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunOSESGriewankSampleTest() {
+      var es = CreateOSESGriewankSample();
+      es.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(es);
+      Assert.AreEqual(1.80366417E-07, SamplesUtils.GetDoubleResult(es, "BestQuality"), 1.0E-15);
+      Assert.AreEqual(4.84418627E-07, SamplesUtils.GetDoubleResult(es, "CurrentAverageQuality"), 1.0E-15);
+      Assert.AreEqual(9.20629802E-07, SamplesUtils.GetDoubleResult(es, "CurrentWorstQuality"), 1.0E-15);
+      Assert.AreEqual(39750, SamplesUtils.GetIntResult(es, "EvaluatedSolutions"));
+    }
+
+    private OffspringSelectionEvolutionStrategy CreateOSESGriewankSample() {
+      OffspringSelectionEvolutionStrategy es = new OffspringSelectionEvolutionStrategy();
+
+      #region Problem Configuration
+
+      SingleObjectiveTestFunctionProblem problem = new SingleObjectiveTestFunctionProblem();
+
+      problem.ProblemSize.Value = 10;
+      problem.EvaluatorParameter.Value = new GriewankEvaluator();
+      problem.SolutionCreatorParameter.Value = new UniformRandomRealVectorCreator();
+      problem.Maximization.Value = false;
+      problem.Bounds = new DoubleMatrix(new double[,] { { -600, 600 } });
+      problem.BestKnownQuality.Value = 0;
+      problem.BestKnownSolutionParameter.Value = new RealVector(10);
+      problem.Name = "Single Objective Test Function";
+      problem.Description = "Test function with real valued inputs and a single objective.";
+
+      #endregion
+
+      #region Algorithm Configuration
+
+      es.Name = "Offspring Selection Evolution Strategy - Griewank";
+      es.Description = "An evolution strategy with offspring selection which solves the 10-dimensional Griewank test function";
+      es.Problem = problem;
+      SamplesUtils.ConfigureOffspringSelectionEvolutionStrategyParameters<AverageCrossover, NormalAllPositionsManipulator,
+        StdDevStrategyVectorCreator, StdDevStrategyVectorCrossover, StdDevStrategyVectorManipulator>(es, 50, 1.0, 0.5, 100, 2, 100, false);
+
+      StdDevStrategyVectorCreator strategyCreator = (StdDevStrategyVectorCreator)es.StrategyParameterCreator;
+      strategyCreator.BoundsParameter.Value = new DoubleMatrix(new double[,] { { 1, 20 } });
+
+      StdDevStrategyVectorManipulator strategyManipulator =
+        (StdDevStrategyVectorManipulator)es.StrategyParameterManipulator;
+      strategyManipulator.BoundsParameter.Value = new DoubleMatrix(new double[,] { { 1E-12, 30 } });
+      strategyManipulator.GeneralLearningRateParameter.Value = new DoubleValue(0.22360679774997896);
+      strategyManipulator.LearningRateParameter.Value = new DoubleValue(0.39763536438352531);
+
+      #endregion
+
+      return es;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/PsoRastriginSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/PsoRastriginSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/PsoRastriginSampleTest.cs	(revision 16038)
@@ -0,0 +1,91 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.ParticleSwarmOptimization;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.TestFunctions;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class PsoRastriginSampleTest {
+    private const string SampleFileName = "PSO_Rastrigin";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreatePsoRastriginSampleTest() {
+      var pso = CreatePsoRastriginSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(pso, path);
+    }
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "medium")]
+    public void RunPsoRastriginSampleTest() {
+      var pso = CreatePsoRastriginSample();
+      pso.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(pso);
+      if (Environment.Is64BitProcess) {
+        Assert.AreEqual(0, SamplesUtils.GetDoubleResult(pso, "BestQuality"));
+        Assert.AreEqual(3.9649516110677525, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"), 1e-08);
+        Assert.AreEqual(25.566430359483757, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"), 1e-08);
+        Assert.AreEqual(200, SamplesUtils.GetIntResult(pso, "Iterations"));
+      } else {
+        Assert.AreEqual(0, SamplesUtils.GetDoubleResult(pso, "BestQuality"));
+        Assert.AreEqual(3.3957460831564048, SamplesUtils.GetDoubleResult(pso, "CurrentAverageQuality"), 1e-08);
+        Assert.AreEqual(34.412788077766145, SamplesUtils.GetDoubleResult(pso, "CurrentWorstQuality"), 1e-08);
+        Assert.AreEqual(200, SamplesUtils.GetIntResult(pso, "Iterations"));
+      }
+    }
+
+    private ParticleSwarmOptimization CreatePsoRastriginSample() {
+      ParticleSwarmOptimization pso = new ParticleSwarmOptimization();
+      #region Problem Configuration
+      var problem = new SingleObjectiveTestFunctionProblem();
+      var provider = new SOTFInstanceProvider();
+      problem.Load(provider.LoadData(provider.GetDataDescriptors().Single(x => x.Name == "Rastrigin Function")));
+      problem.SolutionCreatorParameter.Value = new UniformRandomRealVectorCreator();
+      #endregion
+      #region Algorithm Configuration
+      pso.Name = "Particle Swarm Optimization - Rastrigin";
+      pso.Description = "A particle swarm optimization algorithm which solves the 2-dimensional Rastrigin test function.";
+      pso.Problem = problem;
+      pso.Inertia.Value = 0.721;
+      pso.MaxIterations.Value = 200;
+      pso.NeighborBestAttraction.Value = 1.193;
+      pso.PersonalBestAttraction.Value = 1.193;
+      pso.SwarmSize.Value = 40;
+            
+      pso.TopologyInitializer = pso.TopologyInitializerParameter.ValidValues.OfType<SPSORandomTopologyInitializer>().First();
+      pso.TopologyUpdater = pso.TopologyUpdaterParameter.ValidValues.OfType<SPSOAdaptiveRandomTopologyUpdater>().First();
+      pso.Seed.Value = 0;
+      pso.SetSeedRandomly.Value = true;
+      #endregion
+      pso.Engine = new ParallelEngine.ParallelEngine();
+      return pso;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/RAPGASchedulingSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/RAPGASchedulingSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/RAPGASchedulingSampleTest.cs	(revision 16038)
@@ -0,0 +1,74 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.RAPGA;
+using HeuristicLab.Encodings.ScheduleEncoding.JobSequenceMatrix;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.Scheduling;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class RAPGASchedulingSampleTest {
+    private const string SampleFileName = "RAPGA_JSSP";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateRAPGASchedulingSampleTest() {
+      var ss = CreateRAPGASchedulingSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ss, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunRAPGASchedulingSampleTest() {
+      var rapga = CreateRAPGASchedulingSample();
+      rapga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(rapga);
+      Assert.AreEqual(988.00, SamplesUtils.GetDoubleResult(rapga, "BestQuality"));
+      Assert.AreEqual(988.00, SamplesUtils.GetDoubleResult(rapga, "CurrentAverageQuality"));
+      Assert.AreEqual(988.00, SamplesUtils.GetDoubleResult(rapga, "CurrentWorstQuality"));
+      Assert.AreEqual(27100, SamplesUtils.GetIntResult(rapga, "EvaluatedSolutions"));
+    }
+
+    private RAPGA CreateRAPGASchedulingSample() {
+      #region Problem Configuration
+      JobShopSchedulingProblem problem = new JobShopSchedulingProblem();
+      #endregion
+
+      #region Algorithm Configuration
+      RAPGA rapga = new RAPGA();
+      rapga.Engine = new SequentialEngine.SequentialEngine();
+      rapga.Name = "RAPGA - Job Shop Scheduling";
+      rapga.Description = "A relevant alleles preserving genetic algorithm which solves a job shop scheduling problem";
+      rapga.Problem = problem;
+      rapga.Mutator = rapga.MutatorParameter.ValidValues.OfType<JSMSwapManipulator>().First();
+      rapga.Seed.Value = 0;
+      return rapga;
+      #endregion
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SamplesUtils.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SamplesUtils.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SamplesUtils.cs	(revision 16038)
@@ -0,0 +1,235 @@
+using System;
+using System.Linq;
+using HeuristicLab.Algorithms.ALPS;
+using HeuristicLab.Algorithms.EvolutionStrategy;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Algorithms.OffspringSelectionEvolutionStrategy;
+using HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Selection;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  public static class SamplesUtils {
+    public const string SamplesDirectory = @"Samples\";
+    public const string SampleFileExtension = ".hl";
+
+    public static void RunAlgorithm(IAlgorithm a) {
+      Exception ex = null;
+      a.ExceptionOccurred += (sender, e) => { ex = e.Value; };
+      a.Prepare();
+      a.Start();
+      Assert.IsNull(ex);
+    }
+
+    public static double GetDoubleResult(IAlgorithm a, string resultName) {
+      return ((DoubleValue)a.Results[resultName].Value).Value;
+    }
+
+    public static int GetIntResult(IAlgorithm a, string resultName) {
+      return ((IntValue)a.Results[resultName].Value).Value;
+    }
+
+    public static void ConfigureEvolutionStrategyParameters<R, M, SC, SR, SM>(EvolutionStrategy es, int popSize, int children, int parentsPerChild, int maxGens, bool plusSelection)
+      where R : ICrossover
+      where M : IManipulator
+      where SC : IStrategyParameterCreator
+      where SR : IStrategyParameterCrossover
+      where SM : IStrategyParameterManipulator {
+      es.PopulationSize.Value = popSize;
+      es.Children.Value = children;
+      es.ParentsPerChild.Value = parentsPerChild;
+      es.MaximumGenerations.Value = maxGens;
+      es.PlusSelection.Value = false;
+
+      es.Seed.Value = 0;
+      es.SetSeedRandomly.Value = true;
+
+      es.Recombinator = es.RecombinatorParameter.ValidValues
+        .OfType<R>()
+        .Single();
+
+      es.Mutator = es.MutatorParameter.ValidValues
+        .OfType<M>()
+        .Single();
+
+      es.StrategyParameterCreator = es.StrategyParameterCreatorParameter.ValidValues
+        .OfType<SC>()
+        .Single();
+      es.StrategyParameterCrossover = es.StrategyParameterCrossoverParameter.ValidValues
+        .OfType<SR>()
+        .Single();
+      es.StrategyParameterManipulator = es.StrategyParameterManipulatorParameter.ValidValues
+        .OfType<SM>()
+        .Single();
+      es.Engine = new ParallelEngine.ParallelEngine();
+    }
+
+    public static void ConfigureOffspringSelectionEvolutionStrategyParameters<R, M, SC, SR, SM>(OffspringSelectionEvolutionStrategy es, int popSize,
+      double successRatio, double comparisonFactor, double maxSelPres, int parentsPerChild, int maxGens, bool plusSelection)
+      where R : ICrossover
+      where M : IManipulator
+      where SC : IStrategyParameterCreator
+      where SR : IStrategyParameterCrossover
+      where SM : IStrategyParameterManipulator {
+      es.PopulationSize.Value = popSize;
+      es.ComparisonFactor.Value = comparisonFactor;
+      es.SuccessRatio.Value = successRatio;
+      es.MaximumSelectionPressure.Value = maxSelPres;
+      es.ParentsPerChild.Value = parentsPerChild;
+      es.SelectedParents.Value = popSize * parentsPerChild;
+      es.MaximumGenerations.Value = maxGens;
+      es.PlusSelection.Value = false;
+
+      es.Seed.Value = 0;
+      es.SetSeedRandomly.Value = true;
+
+      es.Recombinator = es.RecombinatorParameter.ValidValues
+        .OfType<R>()
+        .Single();
+
+      es.Mutator = es.MutatorParameter.ValidValues
+        .OfType<M>()
+        .Single();
+
+      es.StrategyParameterCreator = es.StrategyParameterCreatorParameter.ValidValues
+        .OfType<SC>()
+        .Single();
+      es.StrategyParameterCrossover = es.StrategyParameterCrossoverParameter.ValidValues
+        .OfType<SR>()
+        .Single();
+      es.StrategyParameterManipulator = es.StrategyParameterManipulatorParameter.ValidValues
+        .OfType<SM>()
+        .Single();
+      es.Engine = new ParallelEngine.ParallelEngine();
+    }
+
+    public static void ConfigureGeneticAlgorithmParameters<S, C, M>(GeneticAlgorithm ga, int popSize, int elites, int maxGens, double mutationRate, int tournGroupSize = 0)
+      where S : ISelector
+      where C : ICrossover
+      where M : IManipulator {
+      ga.Elites.Value = elites;
+      ga.MaximumGenerations.Value = maxGens;
+      ga.MutationProbability.Value = mutationRate;
+      ga.PopulationSize.Value = popSize;
+      ga.Seed.Value = 0;
+      ga.SetSeedRandomly.Value = true;
+      ga.Selector = ga.SelectorParameter.ValidValues
+        .OfType<S>()
+        .First();
+
+      ga.Crossover = ga.CrossoverParameter.ValidValues
+        .OfType<C>()
+        .First();
+
+      ga.Mutator = ga.MutatorParameter.ValidValues
+        .OfType<M>()
+        .First();
+
+      var tSelector = ga.Selector as TournamentSelector;
+      if (tSelector != null) {
+        tSelector.GroupSizeParameter.Value.Value = tournGroupSize;
+      }
+      ga.Engine = new ParallelEngine.ParallelEngine();
+    }
+
+    public static void ConfigureOsGeneticAlgorithmParameters<S, C, M>(OffspringSelectionGeneticAlgorithm ga, int popSize, int elites, int maxGens, double mutationRate = 0.05, double maxSelPres = 100, int tournGroupSize = 0)
+      where S : ISelector
+      where C : ICrossover
+      where M : IManipulator {
+      ga.Elites.Value = elites;
+      ga.MaximumGenerations.Value = maxGens;
+      ga.MutationProbability.Value = mutationRate;
+      ga.PopulationSize.Value = popSize;
+      ga.MaximumSelectionPressure.Value = maxSelPres;
+      ga.Seed.Value = 0;
+      ga.SetSeedRandomly.Value = true;
+      ga.ComparisonFactorLowerBound.Value = 1;
+      ga.ComparisonFactorUpperBound.Value = 1;
+
+      ga.Selector = ga.SelectorParameter.ValidValues
+        .OfType<S>()
+        .First();
+
+      ga.Crossover = ga.CrossoverParameter.ValidValues
+        .OfType<C>()
+        .First();
+
+      ga.Mutator = ga.MutatorParameter.ValidValues
+        .OfType<M>()
+        .First();
+
+      var tSelector = ga.Selector as TournamentSelector;
+      if (tSelector != null) {
+        tSelector.GroupSizeParameter.Value.Value = tournGroupSize;
+      }
+      ga.Engine = new ParallelEngine.ParallelEngine();
+    }
+
+    public static void ConfigureIslandGeneticAlgorithmParameters<S, C, M, Mi, MiS, MiR>(IslandGeneticAlgorithm ga, int popSize, int elites, int maxGens, double mutationRate, int numberOfIslands, int migrationInterval, double migrationRate)
+      where S : ISelector
+      where C : ICrossover
+      where M : IManipulator
+      where Mi : IMigrator
+      where MiS : ISelector
+      where MiR : IReplacer {
+      ga.Elites.Value = elites;
+      ga.MaximumGenerations.Value = maxGens;
+      ga.MutationProbability.Value = mutationRate;
+      ga.PopulationSize.Value = popSize;
+      ga.NumberOfIslands.Value = numberOfIslands;
+      ga.MigrationInterval.Value = migrationInterval;
+      ga.MigrationRate.Value = migrationRate;
+      ga.Seed.Value = 0;
+      ga.SetSeedRandomly.Value = true;
+      ga.Selector = ga.SelectorParameter.ValidValues
+        .OfType<S>()
+        .Single();
+
+      ga.Crossover = ga.CrossoverParameter.ValidValues
+        .OfType<C>()
+        .Single();
+
+      ga.Mutator = ga.MutatorParameter.ValidValues
+        .OfType<M>()
+        .Single();
+      ga.Migrator = ga.MigratorParameter.ValidValues
+        .OfType<Mi>()
+        .Single();
+      ga.EmigrantsSelector = ga.EmigrantsSelectorParameter.ValidValues
+        .OfType<MiS>()
+        .Single();
+      ga.ImmigrationReplacer = ga.ImmigrationReplacerParameter.ValidValues
+        .OfType<MiR>()
+        .Single();
+      ga.Engine = new ParallelEngine.ParallelEngine();
+    }
+
+    public static void ConfigureAlpsGeneticAlgorithmParameters<S, C, M>(AlpsGeneticAlgorithm ga, int numberOfLayers, int popSize, double mutationRate, int elites, bool plusSelection, AgingScheme agingScheme, int ageGap, double ageInheritance, int maxGens)
+      where S : ISelector
+      where C : ICrossover
+      where M : IManipulator {
+      ga.Seed.Value = 0;
+      ga.SetSeedRandomly.Value = true;
+
+      ga.NumberOfLayers.Value = numberOfLayers;
+      ga.PopulationSize.Value = popSize;
+
+      ga.Selector = ga.SelectorParameter.ValidValues.OfType<S>().Single();
+      ga.Crossover = ga.CrossoverParameter.ValidValues.OfType<C>().Single();
+      ga.Mutator = ga.MutatorParameter.ValidValues.OfType<M>().Single();
+      ga.MutationProbability.Value = mutationRate;
+      ga.Elites.Value = elites;
+      ga.PlusSelection = plusSelection;
+
+      ga.AgingScheme = new EnumValue<AgingScheme>(agingScheme);
+      ga.AgeGap.Value = ageGap;
+      ga.AgeInheritance.Value = ageInheritance;
+
+      ga.MaximumGenerations = maxGens;
+
+      ga.Engine = new ParallelEngine.ParallelEngine();
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/ScatterSearchVRPSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/ScatterSearchVRPSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/ScatterSearchVRPSampleTest.cs	(revision 16038)
@@ -0,0 +1,92 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.ScatterSearch;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.Instances.VehicleRouting;
+using HeuristicLab.Problems.VehicleRouting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class ScatterSearchVRPSampleTest {
+    private const string SampleFileName = "SS_VRP";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateScatterSearchVRPSampleTest() {
+      var ss = CreateScatterSearchVRPSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ss, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunScatterSearchVRPSampleTest() {
+      var ss = CreateScatterSearchVRPSample();
+      ss.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ss);
+      Assert.AreEqual(828.93686694283383, SamplesUtils.GetDoubleResult(ss, "BestQuality"));
+      Assert.AreEqual(868.63623986983077, SamplesUtils.GetDoubleResult(ss, "CurrentAverageQuality"));
+      Assert.AreEqual(1048.8333559209832, SamplesUtils.GetDoubleResult(ss, "CurrentWorstQuality"));
+      Assert.AreEqual(262622, SamplesUtils.GetIntResult(ss, "EvaluatedSolutions"));
+    }
+
+    private ScatterSearch CreateScatterSearchVRPSample() {
+      #region Problem Configuration
+      var provider = new SolomonInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name == "C101");
+      VehicleRoutingProblem vrpProblem = new VehicleRoutingProblem();
+      vrpProblem.Load(provider.LoadData(instance));
+      #endregion
+
+      #region Algorithm Configuration
+      ScatterSearch ss = new ScatterSearch();
+      ss.Engine = new SequentialEngine.SequentialEngine();
+      ss.Name = "Scatter Search - VRP";
+      ss.Description = "A scatter search algorithm which solves the \"C101\" vehicle routing problem (imported from Solomon)";
+      ss.Problem = vrpProblem;
+
+      var improver = ss.Problem.Operators.OfType<VRPIntraRouteImprovementOperator>().First();
+      improver.ImprovementAttemptsParameter.Value.Value = 15;
+      improver.SampleSizeParameter.Value.Value = 10;
+      ss.Improver = improver;
+
+      var pathRelinker = ss.Problem.Operators.OfType<VRPPathRelinker>().First();
+      pathRelinker.IterationsParameter.Value.Value = 25;
+      ss.PathRelinker = pathRelinker;
+
+      var similarityCalculator = ss.SimilarityCalculatorParameter.ValidValues.OfType<VRPSimilarityCalculator>().First();
+      ss.SimilarityCalculator = similarityCalculator;
+
+      ss.MaximumIterations.Value = 2;
+      ss.PopulationSize.Value = 20;
+      ss.ReferenceSetSize.Value = 10;
+      ss.Seed.Value = 0;
+      return ss;
+      #endregion
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SimulatedAnnealingRastriginSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SimulatedAnnealingRastriginSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SimulatedAnnealingRastriginSampleTest.cs	(revision 16038)
@@ -0,0 +1,104 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.SimulatedAnnealing;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.TestFunctions;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class SimulatedAnnealingRastriginSampleTest {
+    private const string SampleFileName = "SA_Rastrigin";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateSimulatedAnnealingRastriginSampleTest() {
+      var sa = CreateSimulatedAnnealingRastriginSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(sa, path);
+    }
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "medium")]
+    public void RunSimulatedAnnealingRastriginSampleTest() {
+      var sa = CreateSimulatedAnnealingRastriginSample();
+      sa.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(sa);
+      Assert.AreEqual(0.00014039606034543795, SamplesUtils.GetDoubleResult(sa, "BestQuality"));
+      Assert.AreEqual(5000, SamplesUtils.GetIntResult(sa, "EvaluatedMoves"));
+    }
+    private SimulatedAnnealing CreateSimulatedAnnealingRastriginSample() {
+      SimulatedAnnealing sa = new SimulatedAnnealing();
+      #region Problem Configuration
+      var problem = new SingleObjectiveTestFunctionProblem();
+      problem.BestKnownQuality.Value = 0.0;
+      problem.BestKnownSolutionParameter.Value = new RealVector(new double[] { 0, 0 });
+      problem.Bounds = new DoubleMatrix(new double[,] { { -5.12, 5.12 } });
+      problem.EvaluatorParameter.Value = new RastriginEvaluator();
+      problem.Maximization.Value = false;
+      problem.ProblemSize.Value = 2;
+      problem.SolutionCreatorParameter.Value = new UniformRandomRealVectorCreator();
+      #endregion
+      #region Algorithm Configuration
+      sa.Name = "Simulated Annealing - Rastrigin";
+      sa.Description = "A simulated annealing algorithm that solves the 2-dimensional Rastrigin test function";
+      sa.Problem = problem;
+      var annealingOperator = sa.AnnealingOperatorParameter.ValidValues
+        .OfType<ExponentialDiscreteDoubleValueModifier>()
+        .Single();
+      annealingOperator.StartIndexParameter.Value = new IntValue(0);
+      sa.AnnealingOperator = annealingOperator;
+
+      sa.EndTemperature.Value = 1E-6;
+      sa.InnerIterations.Value = 50;
+      sa.MaximumIterations.Value = 100;
+      var moveEvaluator = sa.MoveEvaluatorParameter.ValidValues
+        .OfType<RastriginAdditiveMoveEvaluator>()
+        .Single();
+      moveEvaluator.A.Value = 10;
+      sa.MoveEvaluator = moveEvaluator;
+
+      var moveGenerator = sa.MoveGeneratorParameter.ValidValues
+        .OfType<StochasticNormalMultiMoveGenerator>()
+        .Single();
+      moveGenerator.SigmaParameter.Value = new DoubleValue(1);
+      sa.MoveGenerator = moveGenerator;
+
+      sa.MoveMaker = sa.MoveMakerParameter.ValidValues
+        .OfType<AdditiveMoveMaker>()
+        .Single();
+
+      sa.Seed.Value = 0;
+      sa.SetSeedRandomly.Value = true;
+      sa.StartTemperature.Value = 1;
+      #endregion
+      sa.Engine = new ParallelEngine.ParallelEngine();
+      return sa;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchTspSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchTspSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchTspSampleTest.cs	(revision 16038)
@@ -0,0 +1,106 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.TabuSearch;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.Instances.TSPLIB;
+using HeuristicLab.Problems.TravelingSalesman;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class TabuSearchTspSampleTest {
+    private const string SampleFileName = "TS_TSP";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateTabuSearchTspSampleTest() {
+      var ts = CreateTabuSearchTspSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(ts, path);
+    }
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunTabuSearchTspSampleTest() {
+      var ts = CreateTabuSearchTspSample();
+      ts.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ts);
+      Assert.AreEqual(6294, SamplesUtils.GetDoubleResult(ts, "BestQuality"));
+      Assert.AreEqual(7380.0386666666664, SamplesUtils.GetDoubleResult(ts, "CurrentAverageQuality"));
+      Assert.AreEqual(8328, SamplesUtils.GetDoubleResult(ts, "CurrentWorstQuality"));
+      Assert.AreEqual(750000, SamplesUtils.GetIntResult(ts, "EvaluatedMoves"));
+    }
+
+    private TabuSearch CreateTabuSearchTspSample() {
+      TabuSearch ts = new TabuSearch();
+      #region Problem Configuration
+      var provider = new TSPLIBTSPInstanceProvider();
+      var instance = provider.GetDataDescriptors().Where(x => x.Name == "ch130").Single();
+      TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem();
+      tspProblem.Load(provider.LoadData(instance));
+      tspProblem.UseDistanceMatrix.Value = true;
+      #endregion
+      #region Algorithm Configuration
+      ts.Name = "Tabu Search - TSP";
+      ts.Description = "A tabu search algorithm that solves the \"ch130\" TSP (imported from TSPLIB)";
+      ts.Problem = tspProblem;
+
+      ts.MaximumIterations.Value = 1000;
+      // move generator has to be set first
+      var moveGenerator = ts.MoveGeneratorParameter.ValidValues
+        .OfType<StochasticInversionMultiMoveGenerator>()
+        .Single();
+      ts.MoveGenerator = moveGenerator;
+      var moveEvaluator = ts.MoveEvaluatorParameter.ValidValues
+        .OfType<TSPInversionMoveRoundedEuclideanPathEvaluator>()
+        .Single();
+      ts.MoveEvaluator = moveEvaluator;
+      var moveMaker = ts.MoveMakerParameter.ValidValues
+        .OfType<InversionMoveMaker>()
+        .Single();
+      ts.MoveMaker = moveMaker;
+      ts.SampleSize.Value = 750;
+      ts.Seed.Value = 0;
+      ts.SetSeedRandomly.Value = true;
+
+      var tabuChecker = ts.TabuCheckerParameter.ValidValues
+        .OfType<InversionMoveSoftTabuCriterion>()
+        .Single();
+      tabuChecker.UseAspirationCriterion.Value = true;
+      ts.TabuChecker = tabuChecker;
+
+      var tabuMaker = ts.TabuMakerParameter.ValidValues
+        .OfType<InversionMoveTabuMaker>()
+        .Single();
+      ts.TabuMaker = tabuMaker;
+      ts.TabuTenure.Value = 60;
+
+      #endregion
+      ts.Engine = new ParallelEngine.ParallelEngine();
+      return ts;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchVRPSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchVRPSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchVRPSampleTest.cs	(revision 16038)
@@ -0,0 +1,105 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.TabuSearch;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.Instances.VehicleRouting;
+using HeuristicLab.Problems.VehicleRouting;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Potvin;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class TabuSearchVRPSampleTest {
+    private const string SampleFileName = "TS_VRP";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateTabuSearchVRPSampleTest() {
+      var vrp = CreateTabuSearchVrpSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(vrp, path);
+    }
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunTabuSearchVRPSampleTest() {
+      var vrp = CreateTabuSearchVrpSample();
+      vrp.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(vrp);
+      Assert.AreEqual(1473, SamplesUtils.GetDoubleResult(vrp, "BestQuality"));
+      Assert.AreEqual(2102.1192622950812, SamplesUtils.GetDoubleResult(vrp, "CurrentAverageQuality"));
+      Assert.AreEqual(4006, SamplesUtils.GetDoubleResult(vrp, "CurrentWorstQuality"));
+      Assert.AreEqual(119072, SamplesUtils.GetIntResult(vrp, "EvaluatedMoves"));
+    }
+
+    private TabuSearch CreateTabuSearchVrpSample() {
+      TabuSearch ts = new TabuSearch();
+      #region Problem Configuration
+      var provider = new AugeratInstanceProvider();
+      var instance = provider.GetDataDescriptors().Where(x => x.Name == "A-n62-k8").Single();
+      VehicleRoutingProblem vrpProblem = new VehicleRoutingProblem();
+      vrpProblem.Load(provider.LoadData(instance));
+      #endregion
+      #region Algorithm Configuration
+      ts.Name = "Tabu Search - VRP";
+      ts.Description = "A tabu search algorithm that solves the \"A-n62-k8\" VRP (imported from Augerat)";
+      ts.Problem = vrpProblem;
+
+      ts.MaximumIterations.Value = 200;
+      // move generator has to be set first
+      var moveGenerator = ts.MoveGeneratorParameter.ValidValues
+        .OfType<PotvinCustomerRelocationExhaustiveMoveGenerator>()
+        .Single();
+      ts.MoveGenerator = moveGenerator;
+      var moveEvaluator = ts.MoveEvaluatorParameter.ValidValues
+        .OfType<PotvinCustomerRelocationMoveEvaluator>()
+        .Single();
+      ts.MoveEvaluator = moveEvaluator;
+      var moveMaker = ts.MoveMakerParameter.ValidValues
+        .OfType<PotvinCustomerRelocationMoveMaker>()
+        .Single();
+      ts.MoveMaker = moveMaker;
+      ts.SampleSize.Value = 1000;
+      ts.Seed.Value = 0;
+      ts.SetSeedRandomly.Value = true;
+
+      var tabuChecker = ts.TabuCheckerParameter.ValidValues
+        .OfType<PotvinCustomerRelocationMoveTabuCriterion>()
+        .Single();
+      tabuChecker.UseAspirationCriterion.Value = false;
+      ts.TabuChecker = tabuChecker;
+
+      var tabuMaker = ts.TabuMakerParameter.ValidValues
+        .OfType<PotvinCustomerRelocationMoveTabuMaker>()
+        .Single();
+      ts.TabuMaker = tabuMaker;
+      ts.TabuTenure.Value = 6;
+
+      #endregion
+      ts.Engine = new ParallelEngine.ParallelEngine();
+      return ts;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsOpSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsOpSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsOpSampleTest.cs	(revision 16038)
@@ -0,0 +1,95 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.VariableNeighborhoodSearch;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.Orienteering;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class VnsOpSampleTest {
+    private const string SampleFileName = "VNS_OP";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateVnsOpSampleTest() {
+      var vns = CreateVnsOpSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(vns, path);
+    }
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunVnsOpSampleTest() {
+      var vns = CreateVnsOpSample();
+      vns.SetSeedRandomly = false;
+      SamplesUtils.RunAlgorithm(vns);
+      Assert.AreEqual(1182, SamplesUtils.GetDoubleResult(vns, "BestQuality"));
+      Assert.AreEqual(1182, SamplesUtils.GetDoubleResult(vns, "CurrentAverageQuality"));
+      Assert.AreEqual(1182, SamplesUtils.GetDoubleResult(vns, "CurrentWorstQuality"));
+      Assert.AreEqual(42651753, SamplesUtils.GetIntResult(vns, "EvaluatedSolutions"));
+    }
+
+    private VariableNeighborhoodSearch CreateVnsOpSample() {
+      VariableNeighborhoodSearch vns = new VariableNeighborhoodSearch();
+      #region Problem Configuration
+      OrienteeringProblem opProblem = new OrienteeringProblem();
+      opProblem.BestKnownQuality = new DoubleValue(1188);
+      opProblem.BestKnownSolution = new IntegerVector(new[] {
+0, 1, 3, 6, 11, 17, 24, 18, 13, 19, 14, 20, 26, 34, 27, 35, 42, 48, 53, 57, 52, 47, 41, 33, 25, 32, 40, 46, 39, 31, 38, 50, 44, 37, 30, 23, 16, 10, 15, 22, 29, 21, 28, 36, 43, 49, 54, 58, 61, 63 
+      });
+      opProblem.Coordinates = new DoubleMatrix(new double[,] {
+{ 7, 0 },{ 6, 1 },{ 8, 1 },{ 5, 2 },{ 7, 2 },{ 9, 2 },{ 4, 3 },{ 6, 3 },{ 8, 3 },{ 10, 3 },{ 3, 4 },{ 5, 4 },{ 7, 4 },{ 9, 4 },{ 11, 4 },{ 2, 5 },{ 4, 5 },{ 6, 5 },{ 8, 5 },{ 10, 5 },{ 12, 5 },{ 1, 6 },{ 3, 6 },{ 5, 6 },{ 7, 6 },{ 9, 6 },{ 11, 6 },{ 13, 6 },{ 0, 7 },{ 2, 7 },{ 4, 7 },{ 6, 7 },{ 8, 7 },{ 10, 7 },{ 12, 7 },{ 14, 7 },{ 1, 8 },{ 3, 8 },{ 5, 8 },{ 7, 8 },{ 9, 8 },{ 11, 8 },{ 13, 8 },{ 2, 9 },{ 4, 9 },{ 6, 9 },{ 8, 9 },{ 10, 9 },{ 12, 9 },{ 3, 10 },{ 5, 10 },{ 7, 10 },{ 9, 10 },{ 11, 10 },{ 4, 11 },{ 6, 11 },{ 8, 11 },{ 10, 11 },{ 5, 12 },{ 7, 12 },{ 9, 12 },{ 6, 13 },{ 8, 13 },{ 7, 14 }
+      });
+      opProblem.MaximumDistance = 70;
+      opProblem.PointVisitingCosts = 0;
+      opProblem.Scores = new DoubleArray(new double[] {
+0, 6, 6, 12, 6, 12, 18, 12, 12, 18, 24, 18, 12, 18, 24, 30, 24, 18, 18, 24, 30, 36, 30, 24, 18, 24, 30, 36, 42, 36, 30, 24, 24, 30, 36, 42, 36, 30, 24, 18, 24, 30, 36, 30, 24, 18, 18, 24, 30, 24, 18, 12, 18, 24, 18, 12, 12, 18, 12, 6, 12, 6, 6, 0
+      });
+      opProblem.StartingPoint = 0;
+      opProblem.TerminalPoint = 63;
+
+      opProblem.Name = "1_p64_t070";
+      opProblem.Description = "Represents an instance of an orienteering problem.";
+      #endregion
+      #region Algorithm Configuration
+      vns.Name = "Variable Neighborhood Search - OP";
+      vns.Description = "A variable neighborhood search algorithm which solves an orienteering problem instance";
+      vns.Problem = opProblem;
+
+      vns.LocalImprovement = vns.LocalImprovementParameter.ValidValues.OfType<OrienteeringLocalImprovementOperator>().Single();
+      vns.LocalImprovementMaximumIterations = 200;
+      vns.MaximumIterations = 25;
+      vns.Seed = 0;
+      vns.SetSeedRandomly = true;
+      vns.ShakingOperator = vns.ShakingOperatorParameter.ValidValues.OfType<OrienteeringShakingOperator>().Single();
+      #endregion
+      vns.Engine = new ParallelEngine.ParallelEngine();
+      return vns;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsTspSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsTspSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsTspSampleTest.cs	(revision 16038)
@@ -0,0 +1,116 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Algorithms.LocalSearch;
+using HeuristicLab.Algorithms.VariableNeighborhoodSearch;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.TravelingSalesman;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class VnsTspSampleTest {
+    private const string SampleFileName = "VNS_TSP";
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateVnsTspSampleTest() {
+      var vns = CreateVnsTspSample();
+      string path = Path.Combine(SamplesUtils.SamplesDirectory, SampleFileName + SamplesUtils.SampleFileExtension);
+      XmlGenerator.Serialize(vns, path);
+    }
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunVnsTspSampleTest() {
+      var vns = CreateVnsTspSample();
+      vns.SetSeedRandomly = false;
+      SamplesUtils.RunAlgorithm(vns);
+      Assert.AreEqual(867, SamplesUtils.GetDoubleResult(vns, "BestQuality"));
+      Assert.AreEqual(867, SamplesUtils.GetDoubleResult(vns, "CurrentAverageQuality"));
+      Assert.AreEqual(867, SamplesUtils.GetDoubleResult(vns, "CurrentWorstQuality"));
+      Assert.AreEqual(12975173, SamplesUtils.GetIntResult(vns, "EvaluatedSolutions"));
+    }
+
+    private VariableNeighborhoodSearch CreateVnsTspSample() {
+      VariableNeighborhoodSearch vns = new VariableNeighborhoodSearch();
+      #region Problem Configuration
+      TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem();
+      tspProblem.BestKnownSolution = new Permutation(PermutationTypes.Absolute, new int[] {
+117, 65, 73, 74, 75, 76, 82, 86, 87, 94, 100, 106, 115, 120, 124, 107, 101, 108, 109, 102, 97, 90, 96, 95, 88, 89, 84, 78, 69, 57, 68, 56, 44, 55, 45, 36, 46, 37, 38, 47, 48, 59, 49, 58, 70, 77, 83, 79, 50, 80, 85, 98, 103, 110, 116, 121, 125, 133, 132, 138, 139, 146, 147, 159, 168, 169, 175, 182, 188, 201, 213, 189, 214, 221, 230, 246, 262, 276, 284, 275, 274, 261, 245, 229, 220, 228, 243, 259, 273, 282, 272, 258, 242, 257, 293, 292, 302, 310, 319, 320, 327, 326, 333, 340, 346, 339, 345, 344, 337, 338, 332, 325, 318, 309, 301, 291, 271, 251, 270, 233, 250, 269, 268, 280, 290, 300, 415, 440, 416, 417, 441, 458, 479, 418, 419, 395, 420, 442, 421, 396, 397, 422, 423, 461, 481, 502, 460, 501, 459, 480, 500, 517, 531, 516, 530, 499, 478, 457, 439, 414, 413, 412, 438, 456, 477, 498, 515, 529, 538, 547, 558, 559, 560, 548, 539, 549, 561, 562, 551, 550, 532, 540, 533, 541, 518, 534, 542, 552, 553, 554, 555, 535, 543, 556, 544, 536, 522, 505, 521, 520, 504, 519, 503, 482, 462, 463, 464, 483, 443, 465, 484, 506, 485, 507, 508, 487, 467, 486, 466, 445, 428, 444, 424, 425, 426, 427, 398, 399, 400, 381, 382, 371, 372, 401, 429, 446, 430, 402, 383, 366, 356, 357, 352, 385, 384, 403, 431, 447, 469, 468, 488, 489, 490, 470, 471, 448, 432, 433, 404, 405, 386, 373, 374, 367, 376, 375, 387, 491, 509, 537, 510, 492, 472, 449, 388, 389, 406, 450, 407, 377, 368, 359, 354, 350, 335, 324, 330, 390, 434, 451, 473, 493, 511, 523, 545, 563, 565, 567, 570, 569, 578, 577, 576, 575, 574, 573, 572, 580, 584, 583, 582, 587, 586, 585, 581, 579, 571, 568, 566, 564, 557, 546, 527, 513, 526, 525, 524, 512, 495, 494, 474, 452, 436, 409, 435, 453, 475, 496, 514, 528, 497, 455, 476, 454, 437, 411, 410, 394, 393, 392, 380, 370, 379, 408, 391, 378, 369, 364, 365, 361, 355, 351, 343, 336, 331, 317, 299, 286, 287, 278, 263, 264, 265, 223, 202, 248, 266, 279, 288, 289, 281, 267, 249, 232, 224, 216, 215, 204, 192, 193, 194, 186, 179, 185, 203, 191, 190, 177, 171, 161, 128, 135, 140, 149, 162, 150, 163, 172, 178, 173, 164, 152, 151, 141, 153, 165, 154, 142, 155, 143, 137, 136, 130, 129, 118, 114, 113, 105, 119, 123, 131, 144, 156, 157, 145, 158, 166, 167, 174, 180, 181, 187, 195, 205, 217, 226, 236, 225, 234, 252, 235, 253, 254, 255, 238, 239, 240, 241, 256, 237, 206, 207, 208, 196, 197, 198, 209, 199, 200, 211, 212, 219, 210, 218, 227, 244, 260, 283, 294, 295, 303, 296, 311, 304, 297, 298, 305, 285, 306, 314, 329, 321, 313, 312, 328, 334, 341, 347, 348, 353, 358, 362, 363, 360, 349, 342, 322, 323, 315, 316, 308, 307, 277, 247, 231, 222, 184, 183, 176, 170, 160, 148, 134, 127, 126, 111, 104, 92, 91, 71, 60, 51, 52, 40, 32, 23, 21, 20, 18, 17, 16, 14, 13, 11, 10, 7, 6, 5, 2, 1, 0, 3, 4, 31, 39, 25, 30, 35, 34, 33, 43, 54, 42, 27, 28, 29, 9, 8, 12, 15, 19, 22, 24, 26, 41, 67, 66, 64, 63, 53, 62, 61, 72, 81, 93, 99, 112, 122, 
+      });
+      tspProblem.Coordinates = new DoubleMatrix(new double[,] {
+{48, 71}, {49, 71}, {50, 71}, {44, 70}, {45, 70}, {52, 70}, {53, 70}, {54, 70}, {41, 69}, {42, 69}, {55, 69}, {56, 69}, {40, 68}, {56, 68}, {57, 68}, {39, 67}, {57, 67}, {58, 67}, {59, 67}, {38, 66}, {59, 66}, {60, 66}, {37, 65}, {60, 65}, {36, 64}, {43, 64}, {35, 63}, {37, 63}, {41, 63}, {42, 63}, {43, 63}, {47, 63}, {61, 63}, {40, 62}, {41, 62}, {42, 62}, {43, 62}, {45, 62}, {46, 62}, {47, 62}, {62, 62}, {34, 61}, {38, 61}, {39, 61}, {42, 61}, {43, 61}, {44, 61}, {45, 61}, {46, 61}, {47, 61}, {52, 61}, {62, 61}, {63, 61}, {26, 60}, {38, 60}, {42, 60}, {43, 60}, {44, 60}, {46, 60}, {47, 60}, {63, 60}, {23, 59}, {24, 59}, {27, 59}, {29, 59}, {30, 59}, {31, 59}, {33, 59}, {42, 59}, {46, 59}, {47, 59}, {63, 59}, {21, 58}, {32, 58}, {33, 58}, {34, 58}, {35, 58}, {46, 58}, {47, 58}, {48, 58}, {53, 58}, {21, 57}, {35, 57}, {47, 57}, {48, 57}, {53, 57}, {36, 56}, {37, 56}, {46, 56}, {47, 56}, {48, 56}, {64, 56}, {65, 56}, {20, 55}, {38, 55}, {46, 55}, {47, 55}, {48, 55}, {52, 55}, {21, 54}, {40, 54}, {47, 54}, {48, 54}, {52, 54}, {65, 54}, {30, 53}, {41, 53}, {46, 53}, {47, 53}, {48, 53}, {52, 53}, {65, 53}, {21, 52}, {32, 52}, {33, 52}, {42, 52}, {51, 52}, {21, 51}, {33, 51}, {34, 51}, {43, 51}, {51, 51}, {21, 50}, {35, 50}, {44, 50}, {50, 50}, {66, 50}, {67, 50}, {21, 49}, {34, 49}, {36, 49}, {37, 49}, {46, 49}, {49, 49}, {67, 49}, {22, 48}, {36, 48}, {37, 48}, {46, 48}, {47, 48}, {22, 47}, {30, 47}, {34, 47}, {37, 47}, {38, 47}, {39, 47}, {47, 47}, {48, 47}, {67, 47}, {23, 46}, {28, 46}, {29, 46}, {30, 46}, {31, 46}, {32, 46}, {35, 46}, {37, 46}, {38, 46}, {39, 46}, {49, 46}, {67, 46}, {23, 45}, {28, 45}, {29, 45}, {31, 45}, {32, 45}, {40, 45}, {41, 45}, {49, 45}, {50, 45}, {68, 45}, {24, 44}, {29, 44}, {32, 44}, {41, 44}, {51, 44}, {68, 44}, {25, 43}, {30, 43}, {32, 43}, {42, 43}, {43, 43}, {51, 43}, {68, 43}, {69, 43}, {31, 42}, {32, 42}, {43, 42}, {52, 42}, {55, 42}, {26, 41}, {27, 41}, {31, 41}, {32, 41}, {33, 41}, {44, 41}, {45, 41}, {46, 41}, {47, 41}, {48, 41}, {49, 41}, {53, 41}, {25, 40}, {27, 40}, {32, 40}, {43, 40}, {44, 40}, {45, 40}, {46, 40}, {48, 40}, {49, 40}, {50, 40}, {51, 40}, {53, 40}, {56, 40}, {32, 39}, {33, 39}, {43, 39}, {50, 39}, {51, 39}, {54, 39}, {56, 39}, {69, 39}, {24, 38}, {32, 38}, {41, 38}, {42, 38}, {51, 38}, {52, 38}, {54, 38}, {57, 38}, {69, 38}, {31, 37}, {32, 37}, {40, 37}, {41, 37}, {42, 37}, {43, 37}, {44, 37}, {45, 37}, {46, 37}, {47, 37}, {48, 37}, {51, 37}, {52, 37}, {55, 37}, {57, 37}, {69, 37}, {24, 36}, {31, 36}, {32, 36}, {39, 36}, {40, 36}, {41, 36}, {42, 36}, {43, 36}, {45, 36}, {48, 36}, {49, 36}, {51, 36}, {53, 36}, {55, 36}, {58, 36}, {22, 35}, {23, 35}, {24, 35}, {25, 35}, {30, 35}, {31, 35}, {32, 35}, {39, 35}, {41, 35}, {49, 35}, {51, 35}, {55, 35}, {56, 35}, {58, 35}, {71, 35}, {20, 34}, {27, 34}, {30, 34}, {31, 34}, {51, 34}, {53, 34}, {57, 34}, {60, 34}, {18, 33}, {19, 33}, {29, 33}, {30, 33}, {31, 33}, {45, 33}, {46, 33}, {47, 33}, {52, 33}, {53, 33}, {55, 33}, {57, 33}, {58, 33}, {17, 32}, {30, 32}, {44, 32}, {47, 32}, {54, 32}, {57, 32}, {59, 32}, {61, 32}, {71, 32}, {72, 32}, {43, 31}, {47, 31}, {56, 31}, {58, 31}, {59, 31}, {61, 31}, {72, 31}, {74, 31}, {16, 30}, {43, 30}, {46, 30}, {47, 30}, {59, 30}, {63, 30}, {71, 30}, {75, 30}, {43, 29}, {46, 29}, {47, 29}, {59, 29}, {60, 29}, {75, 29}, {15, 28}, {43, 28}, {46, 28}, {61, 28}, {76, 28}, {15, 27}, {43, 27}, {44, 27}, {45, 27}, {46, 27}, {60, 27}, {62, 27}, {15, 26}, {43, 26}, {44, 26}, {46, 26}, {59, 26}, {60, 26}, {64, 26}, {77, 26}, {15, 25}, {58, 25}, {61, 25}, {77, 25}, {15, 24}, {53, 24}, {55, 24}, {61, 24}, {77, 24}, {62, 23}, {16, 22}, {61, 22}, {62, 22}, {15, 21}, {16, 21}, {52, 21}, {63, 21}, {77, 21}, {16, 20}, {17, 20}, {46, 20}, {47, 20}, {60, 20}, {62, 20}, {63, 20}, {65, 20}, {76, 20}, {15, 19}, {17, 19}, {18, 19}, {44, 19}, {45, 19}, {48, 19}, {53, 19}, {56, 19}, {60, 19}, {62, 19}, {67, 19}, {68, 19}, {76, 19}, {15, 18}, {18, 18}, {19, 18}, {20, 18}, {32, 18}, {33, 18}, {34, 18}, {41, 18}, {42, 18}, {43, 18}, {46, 18}, {48, 18}, {53, 18}, {59, 18}, {60, 18}, {69, 18}, {75, 18}, {16, 17}, {17, 17}, {20, 17}, {21, 17}, {22, 17}, {23, 17}, {24, 17}, {26, 17}, {28, 17}, {29, 17}, {30, 17}, {31, 17}, {32, 17}, {34, 17}, {35, 17}, {36, 17}, {37, 17}, {38, 17}, {39, 17}, {40, 17}, {44, 17}, {46, 17}, {48, 17}, {53, 17}, {56, 17}, {58, 17}, {75, 17}, {17, 16}, {18, 16}, {20, 16}, {24, 16}, {26, 16}, {27, 16}, {29, 16}, {33, 16}, {41, 16}, {42, 16}, {44, 16}, {47, 16}, {52, 16}, {57, 16}, {70, 16}, {73, 16}, {74, 16}, {17, 15}, {18, 15}, {20, 15}, {22, 15}, {24, 15}, {27, 15}, {29, 15}, {31, 15}, {33, 15}, {35, 15}, {36, 15}, {38, 15}, {39, 15}, {42, 15}, {45, 15}, {47, 15}, {52, 15}, {53, 15}, {55, 15}, {56, 15}, {70, 15}, {73, 15}, {17, 14}, {19, 14}, {21, 14}, {24, 14}, {26, 14}, {29, 14}, {31, 14}, {34, 14}, {37, 14}, {40, 14}, {42, 14}, {44, 14}, {46, 14}, {47, 14}, {53, 14}, {54, 14}, {55, 14}, {62, 14}, {70, 14}, {72, 14}, {17, 13}, {19, 13}, {21, 13}, {23, 13}, {25, 13}, {27, 13}, {30, 13}, {32, 13}, {34, 13}, {36, 13}, {38, 13}, {41, 13}, {43, 13}, {44, 13}, {45, 13}, {60, 13}, {70, 13}, {71, 13}, {18, 12}, {21, 12}, {23, 12}, {26, 12}, {28, 12}, {31, 12}, {34, 12}, {37, 12}, {39, 12}, {41, 12}, {42, 12}, {70, 12}, {18, 11}, {19, 11}, {20, 11}, {21, 11}, {24, 11}, {25, 11}, {27, 11}, {29, 11}, {31, 11}, {33, 11}, {35, 11}, {38, 11}, {41, 11}, {59, 11}, {26, 10}, {29, 10}, {32, 10}, {34, 10}, {36, 10}, {39, 10}, {40, 10}, {69, 10}, {21, 9}, {26, 9}, {28, 9}, {30, 9}, {32, 9}, {33, 9}, {35, 9}, {36, 9}, {37, 9}, {38, 9}, {39, 9}, {22, 8}, {27, 8}, {28, 8}, {29, 8}, {30, 8}, {31, 8}, {68, 8}, {23, 7}, {66, 7}, {24, 6}, {65, 6}, {25, 5}, {62, 5}, {63, 5}, {26, 4}, {55, 4}, {56, 4}, {57, 4}, {58, 4}, {59, 4}, {60, 4}, {61, 4}, {28, 3}, {53, 3}, {29, 2}, {50, 2}, {51, 2}, {52, 2}, {31, 1}, {32, 1}, {48, 1}
+      });
+      tspProblem.BestKnownQuality = new DoubleValue(867);
+
+      tspProblem.EvaluatorParameter.Value = new TSPRoundedEuclideanPathEvaluator();
+      tspProblem.SolutionCreatorParameter.Value = new RandomPermutationCreator();
+      tspProblem.UseDistanceMatrix.Value = true;
+      tspProblem.Name = "Funny TSP";
+      tspProblem.Description = "Represents a symmetric Traveling Salesman Problem.";
+      #endregion
+      #region Algorithm Configuration
+      vns.Name = "Variable Neighborhood Search - TSP";
+      vns.Description = "A variable neighborhood search algorithm which solves a funny TSP instance";
+      vns.Problem = tspProblem;
+
+      var localImprovement = vns.LocalImprovementParameter.ValidValues
+        .OfType<LocalSearchImprovementOperator>()
+        .Single();
+      // move generator has to be set first
+      localImprovement.MoveGenerator = localImprovement.MoveGeneratorParameter.ValidValues
+        .OfType<StochasticInversionMultiMoveGenerator>()
+        .Single();
+      localImprovement.MoveEvaluator = localImprovement.MoveEvaluatorParameter.ValidValues
+        .OfType<TSPInversionMoveRoundedEuclideanPathEvaluator>()
+        .Single();
+      localImprovement.MoveMaker = localImprovement.MoveMakerParameter.ValidValues
+        .OfType<InversionMoveMaker>()
+        .Single();
+      localImprovement.SampleSizeParameter.Value = new IntValue(500);
+      vns.LocalImprovement = localImprovement;
+
+      vns.LocalImprovementMaximumIterations = 150;
+      vns.MaximumIterations = 25;
+      vns.Seed = 0;
+      vns.SetSeedRandomly = true;
+      var shakingOperator = vns.ShakingOperatorParameter.ValidValues
+        .OfType<PermutationShakingOperator>()
+        .Single();
+      shakingOperator.Operators.SetItemCheckedState(shakingOperator.Operators
+        .OfType<Swap2Manipulator>()
+        .Single(), false);
+      shakingOperator.Operators.SetItemCheckedState(shakingOperator.Operators
+        .OfType<Swap3Manipulator>()
+        .Single(), false);
+      vns.ShakingOperator = shakingOperator;
+      #endregion
+      vns.Engine = new ParallelEngine.ParallelEngine();
+      return vns;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/StorableTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/StorableTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/StorableTest.cs	(revision 16038)
@@ -0,0 +1,84 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 System.Reflection;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class StorableTest {
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "short")]
+    public void TestStorableConstructor() {
+      StringBuilder errorMessage = new StringBuilder();
+
+      foreach (Type storableType in ApplicationManager.Manager.GetTypes(typeof(object))
+        .Where(StorableClassAttribute.IsStorableClass)) {
+        //test only types contained in HL plugin assemblies
+        if (storableType.Namespace.Contains(".Tests")) continue;
+        if (!PluginLoader.Assemblies.Contains(storableType.Assembly)) continue;
+
+        IEnumerable<ConstructorInfo> ctors = storableType.GetConstructors(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);
+        ConstructorInfo storableConstructor = ctors.Where(c => c.GetParameters().Count() == 1 && c.GetParameters().First().ParameterType == typeof(bool)).FirstOrDefault();
+        if (storableConstructor == null) errorMessage.Append(Environment.NewLine + storableType.ToString() + ": No storable constructor is defined.");
+        else {
+          if (storableType.IsSealed && !storableConstructor.IsPrivate)
+            errorMessage.Append(Environment.NewLine + storableType.Namespace + "." + storableType.GetPrettyName() + ": Storable constructor must be private in sealed classes.");
+          else if (!storableType.IsSealed && !(storableConstructor.IsFamily || storableConstructor.IsPublic))
+            errorMessage.Append(Environment.NewLine + storableType.Namespace + "." + storableType.GetPrettyName() + ": Storable constructor must be protected (can be public in rare cases).");
+        }
+      }
+      Assert.IsTrue(errorMessage.Length == 0, errorMessage.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "short")]
+    public void TestStorableClass() {
+      var errorMessage = new StringBuilder();
+
+      foreach (var type in ApplicationManager.Manager.GetTypes(typeof(object), onlyInstantiable: false, includeGenericTypeDefinitions: true)
+        .Where(t => t.Namespace != null && !t.Namespace.Contains(".Tests"))
+        .Where(t => !StorableClassAttribute.IsStorableClass(t))) {
+        var members = type.GetMembers(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.DeclaredOnly);
+        var storableConstructor = members.SingleOrDefault(m => Attribute.IsDefined(m, typeof(StorableConstructorAttribute), inherit: false));
+        var storableMembers = members.Where(m => Attribute.IsDefined(m, typeof(StorableAttribute), inherit: false));
+
+        if (storableConstructor != null) {
+          errorMessage.Append(Environment.NewLine + type.Namespace + "." + type.GetPrettyName() + ": Contains a storable constructor but is not a storable class.");
+        } else if (storableMembers.Any()) {
+          errorMessage.Append(Environment.NewLine + type.Namespace + "." + type.GetPrettyName() + ": Contains at least one storable member but is not a storable class.");
+        }
+      }
+      Assert.IsTrue(errorMessage.Length == 0, errorMessage.ToString());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/ThreadSafeLogTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/ThreadSafeLogTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/ThreadSafeLogTest.cs	(revision 16038)
@@ -0,0 +1,61 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using System.Threading.Tasks;
+using HeuristicLab.Core;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class ThreadSafeLogTest {
+    [TestMethod]
+    [TestCategory("General")]
+    [TestProperty("Time", "short")]
+    public void ThreadSafeLogThreadSafetyTest() {
+      int count = 10000;
+      ThreadSafeLog log = new ThreadSafeLog();
+
+      Parallel.For(0, count, (i) => {
+        log.LogMessage("Message " + i); // write something
+        log.Messages.Count(); // iterate over all messages
+      });
+
+      Assert.AreEqual(count, log.Messages.Count());
+    }
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestProperty("Time", "short")]
+    public void ThreadSafeLogCapTest() {
+      int count = 10000;
+      int cap = 500;
+      ThreadSafeLog log = new ThreadSafeLog(cap);
+
+      Parallel.For(0, count, (i) => {
+        log.LogMessage("Message " + i); // write something
+        log.Messages.Count(); // iterate over all messages
+      });
+
+      Assert.AreEqual(cap, log.Messages.Count());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/ToStringTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/ToStringTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab-3.3/ToStringTest.cs	(revision 16038)
@@ -0,0 +1,55 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 HeuristicLab.Core;
+using HeuristicLab.PluginInfrastructure;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class ToStringTest {
+    private TestContext testContextInstance;
+    public TestContext TestContext {
+      get { return testContextInstance; }
+      set { testContextInstance = value; }
+    }
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "long")]
+    public void TestToString() {
+      bool success = true;
+      // just test for all IItems that the ToString method doesn't throw an exception
+      foreach (object item in ApplicationManager.Manager.GetInstances(typeof(IItem))) {
+        try {
+          item.ToString();
+        }
+        catch (Exception e) {
+          TestContext.WriteLine(item.GetType() + " throws a " + e.GetType() + " in the ToString method.");
+          success = false;
+        }
+      }
+      Assert.IsTrue(success, "There are potential errors in the ToString methods of  objects.");
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GaussianProcessFunctionsTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GaussianProcessFunctionsTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GaussianProcessFunctionsTest.cs	(revision 16038)
@@ -0,0 +1,1828 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using HeuristicLab.Algorithms.DataAnalysis;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Algorithms.DataAnalysis.Tests {
+  [TestClass]
+
+  // reference values calculated with Rasmussen's GPML MATLAB package
+  public class GaussianProcessFunctionsTest {
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void MeanConstTest() {
+      TestMeanFunction(new MeanConst(), 0,
+        new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+        new double[][] { new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }
+      );
+      TestMeanFunction(new MeanConst(), 1,
+        new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
+        new double[][] { new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }
+      );
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void MeanZeroTest() {
+      TestMeanFunction(new MeanZero(), 0,
+        new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+        new double[][] { new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
+      );
+      TestMeanFunction(new MeanZero(), 1,
+        new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+        new double[][] { new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
+      );
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void MeanSumTest() {
+      var sum = new MeanSum();
+      sum.Terms.Add(new MeanConst());
+      sum.Terms.Add(new MeanConst());
+      TestMeanFunction(sum, 0,
+        new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+        new double[][]
+          {
+            new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
+            new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
+          }
+      );
+      sum = new MeanSum();
+      sum.Terms.Add(new MeanConst());
+      sum.Terms.Add(new MeanConst());
+      TestMeanFunction(sum, 1,
+        new double[] { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
+        new double[][]
+          {
+            new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
+            new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
+          }
+      );
+    }
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void MeanProdTest() {
+      var prod = new MeanProduct();
+      prod.Factors.Add(new MeanConst());
+      prod.Factors.Add(new MeanConst());
+      TestMeanFunction(prod, 0,
+        new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+        new double[][]
+          {
+            new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+            new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+          }
+      );
+      prod = new MeanProduct();
+      prod.Factors.Add(new MeanConst());
+      prod.Factors.Add(new MeanConst());
+      TestMeanFunction(prod, 1,
+        new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
+        new double[][]
+          {
+            new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
+            new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }
+          }
+      );
+
+      prod = new MeanProduct();
+      prod.Factors.Add(new MeanZero());
+      prod.Factors.Add(new MeanLinear());
+      TestMeanFunction(prod, 0,
+        new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+        new double[][]
+          {
+            new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+            new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+            new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+            new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+            new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+          }
+      );
+      prod = new MeanProduct();
+      prod.Factors.Add(new MeanZero());
+      prod.Factors.Add(new MeanLinear());
+      TestMeanFunction(prod, 1,
+        new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+        new double[][]
+          {
+            new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+            new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+            new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+            new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+            new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+          }
+      );
+
+      prod = new MeanProduct();
+      prod.Factors.Add(new MeanConst());
+      prod.Factors.Add(new MeanLinear());
+      TestMeanFunction(prod, 1,
+  new double[] { 1.843574580675791, 2.127929337522181, 3.116568910281474, 1.688566127130978, 3.250517738447450, 2.961262743634280, 2.326019412613392, 1.729286976436201, 1.769654419215176, 2.398170347588917 },
+  new double[][]
+                {
+                  new double[] { 2.9088,    1.8646,    3.1971,    1.9890,    1.7640,    1.2801,    2.8059,    3.7243,    3.1899    ,1.4978 },
+                  new double[] { 0.4173,    0.0497,    0.9027,    0.9448,    0.4909,    0.4893,    0.3377,    0.9001,    0.3692    ,0.1112 },
+                  new double[] { 0.7803,    0.3897,    0.2417,    0.4039,    0.0965,    0.1320,    0.9421,    0.9561,    0.5752    ,0.0598 },
+                  new double[] { 0.2348,    0.3532,    0.8212,    0.0154,    0.0430,    0.1690,    0.6491,    0.7317,    0.6477    ,0.4509 },
+                  new double[] { 0.5470,    0.2963,    0.7447,    0.1890,    0.6868,    0.1835,    0.3685,    0.6256,    0.7802    ,0.0811 },
+                  new double[] { 0.9294,    0.7757,    0.4868,    0.4359,    0.4468,    0.3063,    0.5085,    0.5108,    0.8176    ,0.7948 }
+                }
+);
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void MeanLinear() {
+      TestMeanFunction(new MeanLinear(), 0,
+        new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+        new double[][]
+          {
+            new double[] { 0.4173, 0.0497, 0.9027, 0.9448, 0.4909, 0.4893, 0.3377, 0.9001, 0.3692, 0.1112 },
+            new double[] { 0.7803, 0.3897, 0.2417, 0.4039, 0.0965, 0.1320, 0.9421, 0.9561, 0.5752, 0.0598 },
+            new double[] { 0.2348, 0.3532, 0.8212, 0.0154, 0.0430, 0.1690, 0.6491, 0.7317, 0.6477, 0.4509 },
+            new double[] { 0.5470, 0.2963, 0.7447, 0.1890, 0.6868, 0.1835, 0.3685, 0.6256, 0.7802, 0.0811 },
+            new double[] { 0.9294, 0.7757, 0.4868, 0.4359, 0.4468, 0.3063, 0.5085, 0.5108, 0.8176, 0.7948 }
+          }
+      );
+      TestMeanFunction(new MeanLinear(), 1,
+        new double[] { 1.8436, 2.1279, 3.1166, 1.6886, 3.2505, 2.9613, 2.3260, 1.7293, 1.7697, 2.3982 },
+        new double[][]
+          {
+            new double[] { 0.4173, 0.0497, 0.9027, 0.9448, 0.4909, 0.4893, 0.3377, 0.9001, 0.3692, 0.1112 },
+            new double[] { 0.7803, 0.3897, 0.2417, 0.4039, 0.0965, 0.1320, 0.9421, 0.9561, 0.5752, 0.0598 },
+            new double[] { 0.2348, 0.3532, 0.8212, 0.0154, 0.0430, 0.1690, 0.6491, 0.7317, 0.6477, 0.4509 },
+            new double[] { 0.5470, 0.2963, 0.7447, 0.1890, 0.6868, 0.1835, 0.3685, 0.6256, 0.7802, 0.0811 },
+            new double[] { 0.9294, 0.7757, 0.4868, 0.4359, 0.4468, 0.3063, 0.5085, 0.5108, 0.8176, 0.7948 }
+          }
+      );
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CovSeIsoTest() {
+      TestCovarianceFunction(new CovarianceSquaredExponentialIso(), 0,
+        new double[,]
+          {
+{    0.5771,    0.5404,    0.8569,    0.5612,    0.7545,    0.4980,    0.6649,    0.7484,    0.6564,    0.8184},
+{    0.6206,    0.7027,    0.7091,    0.6015,    0.7295,    0.5338,    0.6705,    0.8202,    0.7155,    0.8029},
+{    0.7743,    0.7513,    0.8468,    0.6865,    0.5645,    0.7861,    0.8404,    0.6625,    0.7555,    0.8335},
+{    0.7773,    0.5513,    0.7792,    0.7166,    0.4534,    0.5870,    0.8913,    0.8796,    0.8656,    0.8245},
+{    0.8839,    0.5934,    0.7689,    0.8982,    0.4126,    0.4741,    0.7883,    0.9201,    0.9077,    0.8649},
+{    0.8746,    0.7341,    0.7020,    0.8323,    0.4826,    0.5922,    0.8706,    0.9508,    0.9524,    0.8660},
+{    0.6133,    0.7560,    0.7280,    0.5749,    0.8722,    0.5651,    0.6530,    0.6260,    0.6633,    0.8195},
+{    0.6113,    0.6277,    0.8110,    0.5489,    0.7110,    0.6221,    0.6948,    0.5425,    0.6227,    0.7828},
+{    0.6394,    0.6950,    0.8669,    0.6107,    0.7933,    0.5985,    0.6823,    0.6858,    0.6702,    0.8492},
+{    0.5790,    0.7156,    0.6274,    0.5324,    0.6323,    0.6100,    0.6863,    0.8091,    0.6855,    0.7173},
+          },
+        new double[][,]
+          {
+            new double[,] {
+{         0,    0.3197,    0.6358,    0.5518,    0.5207,    0.5909,    0.3361,    0.4897,    0.2447,    0.5720},
+{    0.3197,         0,    0.6697,    0.6190,    0.4635,    0.4047,    0.4190,    0.6899,    0.3650,    0.1552},
+{    0.6358,    0.6697,         0,    0.6031,    0.5367,    0.5927,    0.6008,    0.4084,    0.4103,    0.6843},
+{    0.5518,    0.6190,    0.6031,         0,    0.4173,    0.2740,    0.6339,    0.6114,    0.6702,    0.6455},
+{    0.5207,    0.4635,    0.5367,    0.4173,         0,    0.2510,    0.6610,    0.6935,    0.5180,    0.5362},
+{    0.5909,    0.4047,    0.5927,    0.2740,    0.2510,         0,    0.6019,    0.6955,    0.6232,    0.3756},
+{    0.3361,    0.4190,    0.6008,    0.6339,    0.6610,    0.6019,         0,    0.3205,    0.3279,    0.6165},
+{    0.4897,    0.6899,    0.4084,    0.6114,    0.6935,    0.6955,    0.3205,         0,    0.4189,    0.7344},
+{    0.2447,    0.3650,    0.4103,    0.6702,    0.5180,    0.6232,    0.3279,    0.4189,         0,    0.5595},
+{    0.5720,    0.1552,    0.6843,    0.6455,    0.5362,    0.3756,    0.6165,    0.7344,    0.5595,         0},
+            },
+            new double[,] {
+{    2.0000,    1.6472,    1.1513,    1.3142,    1.3662,    1.2437,    1.6267,    1.4148,    1.7372,    1.2786},
+{    1.6472,    2.0000,    1.0689,    1.1876,    1.4541,    1.5370,    1.5174,    1.0103,    1.5898,    1.8381},
+{    1.1513,    1.0689,    2.0000,    1.2199,    1.3398,    1.2402,    1.2244,    1.5320,    1.5293,    1.0276},
+{    1.3142,    1.1876,    1.2199,    2.0000,    1.5197,    1.7027,    1.1555,    1.2033,    1.0675,    1.1291},
+{    1.3662,    1.4541,    1.3398,    1.5197,    2.0000,    1.7299,    1.0916,    0.9989,    1.3706,    1.3407},
+{    1.2437,    1.5370,    1.2402,    1.7027,    1.7299,    2.0000,    1.2223,    0.9923,    1.1787,    1.5758},
+{    1.6267,    1.5174,    1.2244,    1.1555,    1.0916,    1.2223,    2.0000,    1.6461,    1.6369,    1.1928},
+{    1.4148,    1.0103,    1.5320,    1.2033,    0.9989,    0.9923,    1.6461,    2.0000,    1.5176,    0.7806},
+{    1.7372,    1.5898,    1.5293,    1.0675,    1.3706,    1.1787,    1.6369,    1.5176,    2.0000,    1.3009},
+{    1.2786,    1.8381,    1.0276,    1.1291,    1.3407,    1.5758,    1.1928,    0.7806,    1.3009,    2.0000},
+          }
+          }
+      );
+      TestCovarianceFunction(new CovarianceSquaredExponentialIso(), 1,
+         new double[,]
+           {
+{    6.8592,    6.7985,    7.2362,    6.8334,    7.1127,    6.7239,    6.9920,    7.1048,    6.9798,    7.1914},
+{    6.9271,    7.0445,    7.0531,    6.8979,    7.0803,    6.7872,    7.0000,    7.1935,    7.0617,    7.1727},
+{    7.1376,    7.1086,    7.2246,    7.0223,    6.8388,    7.1522,    7.2172,    6.9886,    7.1139,    7.2091},
+{    7.1414,    6.8169,    7.1438,    7.0632,    6.6389,    6.8750,    7.2749,    7.2619,    7.2462,    7.1986},
+{    7.2667,    6.8852,    7.1309,    7.2824,    6.5548,    6.6792,    7.1550,    7.3063,    7.2929,    7.2454},
+{    7.2563,    7.0864,    7.0436,    7.2078,    6.6953,    6.8834,    7.2517,    7.3388,    7.3405,    7.2466},
+{    6.9160,    7.1146,    7.0783,    6.8557,    7.2536,    6.8398,    6.9750,    6.9351,    6.9897,    7.1926},
+{    6.9130,    6.9378,    7.1825,    6.8129,    7.0557,    6.9294,    7.0338,    6.8021,    6.9302,    7.1482},
+{    6.9551,    7.0340,    7.2476,    6.9120,    7.1611,    6.8932,    7.0166,    7.0213,    6.9995,    7.2274},
+{    6.8624,    7.0619,    6.9373,    6.7848,    6.9446,    6.9109,    7.0221,    7.1802,    7.0209,    7.0642},
+           },
+         new double[][,]
+          {
+            new double[,] {
+{         0,    0.3781,    1.0250,    0.7934,    0.7239,    0.8910,    0.4018,    0.6606,    0.2764,    0.8421},
+{    0.3781,         0,    1.1512,    0.9715,    0.6106,    0.5082,    0.5320,    1.2453,    0.4451,    0.1669},
+{    1.0250,    1.1512,         0,    0.9248,    0.7589,    0.8960,    0.9183,    0.5143,    0.5175,    1.2171},
+{    0.7934,    0.9715,    0.9248,         0,    0.5292,    0.3149,    1.0188,    0.9487,    1.1534,    1.0583},
+{    0.7239,    0.6106,    0.7589,    0.5292,         0,    0.2845,    1.1157,    1.2640,    0.7182,    0.7577},
+{    0.8910,    0.5082,    0.8960,    0.3149,    0.2845,         0,    0.9214,    1.2749,    0.9845,    0.4616},
+{    0.4018,    0.5320,    0.9183,    1.0188,    1.1157,    0.9214,         0,    0.3793,    0.3899,    0.9638},
+{    0.6606,    1.2453,    0.5143,    0.9487,    1.2640,    1.2749,    0.3793,         0,    0.5318,    1.6567},
+{    0.2764,    0.4451,    0.5175,    1.1534,    0.7182,    0.9845,    0.3899,    0.5318,         0,    0.8116},
+{    0.8421,    0.1669,    1.2171,    1.0583,    0.7577,    0.4616,    0.9638,    1.6567,    0.8116,         0},
+            },
+            new double[,] {
+{   14.7781,   14.3950,   13.7138,   13.9618,   14.0352,   13.8578,   14.3707,   14.1018,   14.4990,   13.9100},
+{   14.3950,   14.7781,   13.5767,   13.7715,   14.1542,   14.2607,   14.2360,   13.4735,   14.3260,   14.6102},
+{   13.7138,   13.5767,   14.7781,   13.8217,   13.9982,   13.8525,   13.8286,   14.2545,   14.2511,   13.5045},
+{   13.9618,   13.7715,   13.8217,   14.7781,   14.2390,   14.4598,   13.7206,   13.7960,   13.5743,   13.6778},
+{   14.0352,   14.1542,   13.9982,   14.2390,   14.7781,   14.4908,   13.6154,   13.4528,   14.0413,   13.9995},
+{   13.8578,   14.2607,   13.8525,   14.4598,   14.4908,   14.7781,   13.8254,   13.4407,   13.7576,   14.3090},
+{   14.3707,   14.2360,   13.8286,   13.7206,   13.6154,   13.8254,   14.7781,   14.3938,   14.3828,   13.7798},
+{   14.1018,   13.4735,   14.2545,   13.7960,   13.4528,   13.4407,   14.3938,   14.7781,   14.2363,   13.0113},
+{   14.4990,   14.3260,   14.2511,   13.5743,   14.0413,   13.7576,   14.3828,   14.2363,   14.7781,   13.9425},
+{   13.9100,   14.6102,   13.5045,   13.6778,   13.9995,   14.3090,   13.7798,   13.0113,   13.9425,   14.7781},
+            },
+          }
+       );
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CovNnTest() {
+      TestCovarianceFunction(new CovarianceNeuralNetwork(), 0,
+        new double[,]
+          {
+{    0.5930,    0.5896,    0.7951,    0.5808,    0.7787,    0.6411,    0.6672,    0.6814,    0.6297,    0.7338},
+{    0.5214,    0.5987,    0.6763,    0.5053,    0.7289,    0.6077,    0.5909,    0.6230,    0.5621,    0.6472},
+{    0.7299,    0.7305,    0.8081,    0.6837,    0.7039,    0.7994,    0.7756,    0.6668,    0.7145,    0.7665},
+{    0.6399,    0.5347,    0.7261,    0.6044,    0.5836,    0.6549,    0.7250,    0.6815,    0.6720,    0.6819},
+{    0.6627,    0.5300,    0.7045,    0.6665,    0.5340,    0.5659,    0.6509,    0.6692,    0.6600,    0.6747},
+{    0.6151,    0.5719,    0.6465,    0.5881,    0.5593,    0.6189,    0.6585,    0.6397,    0.6364,    0.6382},
+{    0.5978,    0.6929,    0.7292,    0.5719,    0.8209,    0.6695,    0.6469,    0.5966,    0.6160,    0.7203},
+{    0.6944,    0.7128,    0.8241,    0.6566,    0.8002,    0.7548,    0.7503,    0.6494,    0.6961,    0.7875},
+{    0.6443,    0.6893,    0.8074,    0.6258,    0.8018,    0.7049,    0.6885,    0.6633,    0.6530,    0.7602},
+{    0.4829,    0.5970,    0.6259,    0.4461,    0.6737,    0.6484,    0.5912,    0.6067,    0.5329,    0.5928},
+          },
+        new double[][,]
+          {
+            new double[,] {
+{   -0.5669,   -0.5220,   -0.3879,   -0.4304,   -0.4540,   -0.4460,   -0.4901,   -0.4465,   -0.5095,   -0.4340},
+{   -0.5220,   -0.5969,   -0.3884,   -0.3843,   -0.4499,   -0.4737,   -0.4843,   -0.3961,   -0.5133,   -0.5540},
+{   -0.3879,   -0.3884,   -0.5554,   -0.4160,   -0.4600,   -0.4671,   -0.4056,   -0.4603,   -0.4637,   -0.3810},
+{   -0.4304,   -0.3843,   -0.4160,   -0.5895,   -0.4728,   -0.5384,   -0.3884,   -0.4288,   -0.3748,   -0.3672},
+{   -0.4540,   -0.4499,   -0.4600,   -0.4728,   -0.5977,   -0.5296,   -0.3758,   -0.3954,   -0.4610,   -0.4165},
+{   -0.4460,   -0.4737,   -0.4671,   -0.5384,   -0.5296,   -0.5987,   -0.4280,   -0.4285,   -0.4369,   -0.4802},
+{   -0.4901,   -0.4843,   -0.4056,   -0.3884,   -0.3758,   -0.4280,   -0.5731,   -0.5003,   -0.4920,   -0.4043},
+{   -0.4465,   -0.3961,   -0.4603,   -0.4288,   -0.3954,   -0.4285,   -0.5003,   -0.5362,   -0.4621,   -0.3360},
+{   -0.5095,   -0.5133,   -0.4637,   -0.3748,   -0.4610,   -0.4369,   -0.4920,   -0.4621,   -0.5614,   -0.4463},
+{   -0.4340,   -0.5540,   -0.3810,   -0.3672,   -0.4165,   -0.4802,   -0.4043,   -0.3360,   -0.4463,   -0.5987},
+            },
+            new double[,] {
+{    1.6963,    1.4541,    1.3587,    1.3199,    1.3084,    1.1825,    1.5272,    1.5553,    1.6096,    1.2526},
+{    1.4541,    1.4500,    1.2006,    1.0794,    1.1704,    1.1251,    1.3601,    1.2650,    1.4540,    1.3576},
+{    1.3587,    1.2006,    1.7563,    1.3216,    1.3536,    1.2537,    1.3780,    1.6296,    1.5559,    1.1618},
+{    1.3199,    1.0794,    1.3216,    1.5376,    1.2625,    1.2852,    1.2016,    1.4015,    1.2051,    1.0222},
+{    1.3084,    1.1704,    1.3536,    1.2625,    1.4362,    1.2215,    1.1132,    1.2541,    1.3394,    1.0837},
+{    1.1825,    1.1251,    1.2537,    1.2852,    1.2215,    1.2511,    1.1282,    1.2125,    1.1771,    1.1218},
+{    1.5272,    1.3601,    1.3780,    1.2016,    1.1132,    1.1282,    1.6603,    1.6427,    1.5504,    1.1677},
+{    1.5553,    1.2650,    1.6296,    1.4015,    1.2541,    1.2125,    1.6427,    1.8427,    1.6113,    1.0910},
+{    1.6096,    1.4540,    1.5559,    1.2051,    1.3394,    1.1771,    1.5504,    1.6113,    1.7261,    1.2950},
+{    1.2526,    1.3576,    1.1618,    1.0222,    1.0837,    1.1218,    1.1677,    1.0910,    1.2950,    1.4153},
+          }
+          }
+      );
+      TestCovarianceFunction(new CovarianceNeuralNetwork(), 1,
+         new double[,]
+           {
+{    1.4436,    1.4866,    2.0692,    1.4105,    2.1077,    1.7712,    1.6764,    1.6030,    1.4898,    1.7857},
+{    1.1652,    1.3662,    1.6384,    1.1271,    1.8076,    1.5312,    1.3659,    1.3446,    1.2210,    1.4545},
+{    1.7710,    1.8348,    2.1497,    1.6684,    1.9875,    2.1872,    1.9499,    1.6132,    1.7025,    1.8978},
+{    1.4480,    1.2766,    1.8006,    1.3710,    1.5424,    1.6920,    1.6866,    1.5035,    1.4784,    1.5742},
+{    1.4350,    1.2175,    1.6874,    1.4354,    1.3683,    1.4290,    1.4793,    1.4231,    1.3994,    1.4995},
+{    1.2557,    1.2181,    1.4634,    1.2013,    1.3324,    1.4450,    1.3951,    1.2781,    1.2662,    1.3344},
+{    1.4328,    1.6864,    1.8991,    1.3709,    2.1658,    1.8123,    1.6081,    1.4065,    1.4398,    1.7323},
+{    1.7618,    1.8647,    2.2657,    1.6713,    2.2933,    2.1661,    1.9689,    1.6354,    1.7276,    2.0126},
+{    1.5724,    1.7252,    2.1209,    1.5259,    2.1852,    1.9465,    1.7436,    1.5858,    1.5568,    1.8614},
+{    1.0716,    1.3447,    1.5116,    0.9906,    1.6687,    1.5994,    1.3485,    1.2963,    1.1483,    1.3287},
+           },
+         new double[][,]
+          {
+            new double[,] {
+{   -3.1708,   -2.6488,   -2.6475,   -2.4774,   -2.4067,   -2.1099,   -2.8841,   -3.0223,   -3.0526,   -2.3041},
+{   -2.6488,   -2.5111,   -2.2570,   -1.9637,   -2.0708,   -1.9172,   -2.4814,   -2.3998,   -2.6632,   -2.3537},
+{   -2.6475,   -2.2570,   -3.3336,   -2.5066,   -2.5075,   -2.2490,   -2.6640,   -3.1778,   -2.9977,   -2.1743},
+{   -2.4774,   -1.9637,   -2.5066,   -2.7415,   -2.2591,   -2.2029,   -2.2607,   -2.6778,   -2.2936,   -1.8530},
+{   -2.4067,   -2.0708,   -2.5075,   -2.2591,   -2.4753,   -2.0592,   -2.0638,   -2.3743,   -2.4708,   -1.9151},
+{   -2.1099,   -1.9172,   -2.2490,   -2.2029,   -2.0592,   -2.0176,   -2.0074,   -2.2134,   -2.1126,   -1.8976},
+{   -2.8841,   -2.4814,   -2.6640,   -2.2607,   -2.0638,   -2.0074,   -3.0726,   -3.1450,   -2.9374,   -2.1472},
+{   -3.0223,   -2.3998,   -3.1778,   -2.6778,   -2.3743,   -2.2134,   -3.1450,   -3.5652,   -3.1314,   -2.0795},
+{   -3.0526,   -2.6632,   -2.9977,   -2.2936,   -2.4708,   -2.1126,   -2.9374,   -3.1314,   -3.2519,   -2.3870},
+{   -2.3041,   -2.3537,   -2.1743,   -1.8530,   -1.9151,   -1.8976,   -2.1472,   -2.0795,   -2.3870,   -2.4217},
+            },
+            new double[,] {
+{    4.3303,    3.4649,    3.7030,    3.3026,    3.1505,    2.6912,    3.9244,    4.3025,    4.2082,    3.0090},
+{    3.4649,    3.1323,    3.0110,    2.5036,    2.5893,    2.3340,    3.2266,    3.2706,    3.5078,    2.9242},
+{    3.7030,    3.0110,    4.6774,    3.3899,    3.3261,    2.9053,    3.6926,    4.5813,    4.1997,    2.8855},
+{    3.3026,    2.5036,    3.3899,    3.5200,    2.8645,    2.7165,    2.9968,    3.6979,    3.0870,    2.3508},
+{    3.1505,    2.5893,    3.3261,    2.8645,    3.0745,    2.4980,    2.6901,    3.2286,    3.2548,    2.3841},
+{    2.6912,    2.3340,    2.9053,    2.7165,    2.4980,    2.3825,    2.5425,    2.9255,    2.7134,    2.2974},
+{    3.9244,    3.2266,    3.6926,    2.9968,    2.6901,    2.5425,    4.1329,    4.4278,    4.0227,    2.7860},
+{    4.3025,    3.2706,    4.5813,    3.6979,    3.2286,    2.9255,    4.4278,    5.2237,    4.4826,    2.8275},
+{    4.2082,    3.5078,    4.1997,    3.0870,    3.2548,    2.7134,    4.0227,    4.4826,    4.4998,    3.1361},
+{    3.0090,    2.9242,    2.8855,    2.3508,    2.3841,    2.2974,    2.7860,    2.8275,    3.1361,    2.9891},
+            },
+          }
+       );
+    }
+
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CovRQIsoTest() {
+      TestCovarianceFunction(new CovarianceRationalQuadraticIso(), 0,
+        new double[,]
+          {
+{    0.6452,    0.6190,    0.8662,    0.6338,    0.7802,    0.5893,    0.7102,    0.7753,    0.7037,    0.8331},
+{    0.6771,    0.7392,    0.7442,    0.6630,    0.7603,    0.6144,    0.7145,    0.8346,    0.7492,    0.8200},
+{    0.7963,    0.7777,    0.8574,    0.7266,    0.6362,    0.8060,    0.8519,    0.7084,    0.7810,    0.8459},
+{    0.7988,    0.6268,    0.8004,    0.7500,    0.5583,    0.6524,    0.8968,    0.8864,    0.8739,    0.8382},
+{    0.8902,    0.6571,    0.7919,    0.9030,    0.5304,    0.5727,    0.8079,    0.9232,    0.9117,    0.8733},
+{    0.8819,    0.7639,    0.7387,    0.8449,    0.5785,    0.6563,    0.8783,    0.9519,    0.9535,    0.8742},
+{    0.6716,    0.7814,    0.7590,    0.6437,    0.8797,    0.6366,    0.7012,    0.6810,    0.7090,    0.8339},
+{    0.6702,    0.6823,    0.8268,    0.6250,    0.7456,    0.6782,    0.7331,    0.6205,    0.6786,    0.8033},
+{    0.6910,    0.7332,    0.8750,    0.6697,    0.8119,    0.6608,    0.7235,    0.7261,    0.7142,    0.8595},
+{    0.6467,    0.7493,    0.6821,    0.6133,    0.6857,    0.6692,    0.7265,    0.8252,    0.7259,    0.7506},
+          },
+        new double[][,]
+          {
+            new double[,] {
+{         0,    0.2722,    0.4584,    0.4165,    0.3996,    0.4367,    0.2838,    0.3820,    0.2165,    0.4271},
+{    0.2722,         0,    0.4736,    0.4505,    0.3666,    0.3300,    0.3391,    0.4823,    0.3037,    0.1436},
+{    0.4584,    0.4736,         0,    0.4428,    0.4084,    0.4376,    0.4416,    0.3323,    0.3336,    0.4799},
+{    0.4165,    0.4505,    0.4428,         0,    0.3381,    0.2388,    0.4575,    0.4468,    0.4739,    0.4629},
+{    0.3996,    0.3666,    0.4084,    0.3381,         0,    0.2213,    0.4698,    0.4837,    0.3981,    0.4081},
+{    0.4367,    0.3300,    0.4376,    0.2388,    0.2213,         0,    0.4422,    0.4845,    0.4525,    0.3109},
+{    0.2838,    0.3391,    0.4416,    0.4575,    0.4698,    0.4422,         0,    0.2728,    0.2781,    0.4493},
+{    0.3820,    0.4823,    0.3323,    0.4468,    0.4837,    0.4845,    0.2728,         0,    0.3390,    0.4995},
+{    0.2165,    0.3037,    0.3336,    0.4739,    0.3981,    0.4525,    0.2781,    0.3390,         0,    0.4206},
+{    0.4271,    0.1436,    0.4799,    0.4629,    0.4081,    0.3109,    0.4493,    0.4995,    0.4206,         0},
+            },
+            new double[,] {
+{    2.0000,    1.6749,    1.2884,    1.4086,    1.4481,    1.3558,    1.6576,    1.4857,    1.7530,    1.3818},
+{    1.6749,    2.0000,    1.2296,    1.3147,    1.5166,    1.5831,    1.5672,    1.1884,    1.6266,    1.8443},
+{    1.2884,    1.2296,    2.0000,    1.3383,    1.4280,    1.3533,    1.3417,    1.5791,    1.5769,    1.2005},
+{    1.4086,    1.3147,    1.3383,    2.0000,    1.5691,    1.7228,    1.2914,    1.3262,    1.2286,    1.2725},
+{    1.4481,    1.5166,    1.4280,    1.5691,    2.0000,    1.7466,    1.2457,    1.1805,    1.4515,    1.4286},
+{    1.3558,    1.5831,    1.3533,    1.7228,    1.7466,    2.0000,    1.3401,    1.1758,    1.3083,    1.6150},
+{    1.6576,    1.5672,    1.3417,    1.2914,    1.2457,    1.3401,    2.0000,    1.6740,    1.6662,    1.3186},
+{    1.4857,    1.1884,    1.5791,    1.3262,    1.1805,    1.1758,    1.6740,    2.0000,    1.5674,    1.0305},
+{    1.7530,    1.6266,    1.5769,    1.2286,    1.4515,    1.3083,    1.6662,    1.5674,    2.0000,    1.3985},
+{    1.3818,    1.8443,    1.2005,    1.2725,    1.4286,    1.6150,    1.3186,    1.0305,    1.3985,    2.0000},
+          },
+                      new double[,] {
+{         0,   -0.0124,   -0.0541,   -0.0386,   -0.0340,   -0.0452,   -0.0137,   -0.0298,   -0.0073,   -0.0419},
+{   -0.0124,         0,   -0.0623,   -0.0505,   -0.0265,   -0.0200,   -0.0215,   -0.0682,   -0.0162,   -0.0029},
+{   -0.0541,   -0.0623,         0,   -0.0474,   -0.0363,   -0.0455,   -0.0470,   -0.0204,   -0.0206,   -0.0664},
+{   -0.0386,   -0.0505,   -0.0474,         0,   -0.0213,   -0.0091,   -0.0537,   -0.0490,   -0.0624,   -0.0563},
+{   -0.0340,   -0.0265,   -0.0363,   -0.0213,         0,   -0.0077,   -0.0600,   -0.0693,   -0.0336,   -0.0362},
+{   -0.0452,   -0.0200,   -0.0455,   -0.0091,   -0.0077,         0,   -0.0472,   -0.0700,   -0.0514,   -0.0172},
+{   -0.0137,   -0.0215,   -0.0470,   -0.0537,   -0.0600,   -0.0472,         0,   -0.0125,   -0.0131,   -0.0500},
+{   -0.0298,   -0.0682,   -0.0204,   -0.0490,   -0.0693,   -0.0700,   -0.0125,         0,   -0.0215,   -0.0919},
+{   -0.0073,   -0.0162,   -0.0206,   -0.0624,   -0.0336,   -0.0514,   -0.0131,   -0.0215,         0,   -0.0399},
+{   -0.0419,   -0.0029,   -0.0664,   -0.0563,   -0.0362,   -0.0172,   -0.0500,   -0.0919,   -0.0399,         0},
+          }
+          }
+      );
+      TestCovarianceFunction(new CovarianceRationalQuadraticIso(), 1,
+         new double[,]
+           {
+{    6.8660,    6.8070,    7.2367,    6.8409,    7.1145,    6.7347,    6.9959,    7.1068,    6.9839,    7.1923},
+{    6.9324,    7.0474,    7.0559,    6.9038,    7.0827,    6.7961,    7.0038,    7.1944,    7.0644,    7.1739},
+{    7.1392,    7.1106,    7.2253,    7.0255,    6.8461,    7.1536,    7.2179,    6.9926,    7.1158,    7.2099},
+{    7.1429,    6.8249,    7.1453,    7.0658,    6.6525,    6.8816,    7.2752,    7.2623,    7.2467,    7.1995},
+{    7.2671,    6.8913,    7.1326,    7.2827,    6.5716,    6.6915,    7.1564,    7.3065,    7.2931,    7.2459},
+{    7.2567,    7.0886,    7.0466,    7.2086,    6.7069,    6.8897,    7.2522,    7.3388,    7.3405,    7.2471},
+{    6.9215,    7.1164,    7.0807,    6.8626,    7.2540,    6.8471,    6.9792,    6.9401,    6.9937,    7.1935},
+{    6.9185,    6.9428,    7.1836,    6.8210,    7.0584,    6.9346,    7.0369,    6.8105,    6.9354,    7.1496},
+{    6.9598,    7.0372,    7.2481,    6.9176,    7.1623,    6.8992,    7.0200,    7.0247,    7.0033,    7.2280},
+{    6.8692,    7.0646,    6.9424,    6.7937,    6.9495,    6.9165,    7.0254,    7.1813,    7.0242,    7.0668},
+           },
+         new double[][,]
+          {
+            new double[,] {
+{         0,    0.3746,    0.9986,    0.7776,    0.7108,    0.8711,    0.3978,    0.6497,    0.2745,    0.8243},
+{    0.3746,         0,    1.1178,    0.9478,    0.6013,    0.5017,    0.5249,    1.2062,    0.4401,    0.1662},
+{    0.9986,    1.1178,         0,    0.9033,    0.7445,    0.8758,    0.8972,    0.5076,    0.5108,    1.1798},
+{    0.7776,    0.9478,    0.9033,         0,    0.5222,    0.3124,    0.9927,    0.9261,    1.1199,    1.0301},
+{    0.7108,    0.6013,    0.7445,    0.5222,         0,    0.2825,    1.0844,    1.2237,    0.7052,    0.7433},
+{    0.8711,    0.5017,    0.8758,    0.3124,    0.2825,         0,    0.9000,    1.2339,    0.9601,    0.4563},
+{    0.3978,    0.5249,    0.8972,    0.9927,    1.0844,    0.9000,         0,    0.3757,    0.3861,    0.9404},
+{    0.6497,    1.2062,    0.5076,    0.9261,    1.2237,    1.2339,    0.3757,         0,    0.5247,    1.5872},
+{    0.2745,    0.4401,    0.5108,    1.1199,    0.7052,    0.9601,    0.3861,    0.5247,         0,    0.7950},
+{    0.8243,    0.1662,    1.1798,    1.0301,    0.7433,    0.4563,    0.9404,    1.5872,    0.7950,         0},
+            },
+            new double[,] {
+{   14.7781,   14.3968,   13.7277,   13.9699,   14.0420,   13.8682,   14.3727,   14.1074,   14.5000,   13.9192},
+{   14.3968,   14.7781,   13.5943,   13.7839,   14.1589,   14.2640,   14.2397,   13.4942,   14.3286,   14.6106},
+{   13.7277,   13.5943,   14.7781,   13.8329,   14.0057,   13.8630,   13.8396,   14.2579,   14.2545,   13.5242},
+{   13.9699,   13.7839,   13.8329,   14.7781,   14.2426,   14.4610,   13.7342,   13.8078,   13.5920,   13.6926},
+{   14.0420,   14.1589,   14.0057,   14.2426,   14.7781,   14.4918,   13.6319,   13.4742,   14.0479,   14.0069},
+{   13.8682,   14.2640,   13.8630,   14.4610,   14.4918,   14.7781,   13.8365,   13.4625,   13.7703,   14.3117},
+{   14.3727,   14.2397,   13.8396,   13.7342,   13.6319,   13.8365,   14.7781,   14.3956,   14.3848,   13.7920},
+{   14.1074,   13.4942,   14.2579,   13.8078,   13.4742,   13.4625,   14.3956,   14.7781,   14.2399,   13.0490},
+{   14.5000,   14.3286,   14.2545,   13.5920,   14.0479,   13.7703,   14.3848,   14.2399,   14.7781,   13.9510},
+{   13.9192,   14.6106,   13.5242,   13.6926,   14.0069,   14.3117,   13.7920,   13.0490,   13.9510,   14.7781},
+            },
+            new double[,] {
+{         0,   -0.0009,   -0.0068,   -0.0040,   -0.0034,   -0.0051,   -0.0010,   -0.0028,   -0.0005,   -0.0046},
+{   -0.0009,         0,   -0.0086,   -0.0061,   -0.0024,   -0.0016,   -0.0018,   -0.0101,   -0.0013,   -0.0002},
+{   -0.0068,   -0.0086,         0,   -0.0055,   -0.0037,   -0.0052,   -0.0054,   -0.0017,   -0.0017,   -0.0097},
+{   -0.0040,   -0.0061,   -0.0055,         0,   -0.0018,   -0.0006,   -0.0067,   -0.0058,   -0.0087,   -0.0073},
+{   -0.0034,   -0.0024,   -0.0037,   -0.0018,         0,   -0.0005,   -0.0081,   -0.0105,   -0.0033,   -0.0037},
+{   -0.0051,   -0.0016,   -0.0052,   -0.0006,   -0.0005,         0,   -0.0055,   -0.0106,   -0.0063,   -0.0013},
+{   -0.0010,   -0.0018,   -0.0054,   -0.0067,   -0.0081,   -0.0055,         0,   -0.0009,   -0.0010,   -0.0060},
+{   -0.0028,   -0.0101,   -0.0017,   -0.0058,   -0.0105,   -0.0106,   -0.0009,         0,   -0.0018,   -0.0183},
+{   -0.0005,   -0.0013,   -0.0017,   -0.0087,   -0.0033,   -0.0063,   -0.0010,   -0.0018,         0,   -0.0042},
+{   -0.0046,   -0.0002,   -0.0097,   -0.0073,   -0.0037,   -0.0013,   -0.0060,   -0.0183,   -0.0042,         0},
+                           }
+          }
+       );
+    }
+
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CovRQArdTest() {
+      TestCovarianceFunction(new CovarianceRationalQuadraticArd(), 0,
+        new double[,]
+          {
+{    0.6452,    0.6190,    0.8662,    0.6338,    0.7802,    0.5893,    0.7102,    0.7753,    0.7037,    0.8331},
+{    0.6771,    0.7392,    0.7442,    0.6630,    0.7603,    0.6144,    0.7145,    0.8346,    0.7492,    0.8200},
+{    0.7963,    0.7777,    0.8574,    0.7266,    0.6362,    0.8060,    0.8519,    0.7084,    0.7810,    0.8459},
+{    0.7988,    0.6268,    0.8004,    0.7500,    0.5583,    0.6524,    0.8968,    0.8864,    0.8739,    0.8382},
+{    0.8902,    0.6571,    0.7919,    0.9030,    0.5304,    0.5727,    0.8079,    0.9232,    0.9117,    0.8733},
+{    0.8819,    0.7639,    0.7387,    0.8449,    0.5785,    0.6563,    0.8783,    0.9519,    0.9535,    0.8742},
+{    0.6716,    0.7814,    0.7590,    0.6437,    0.8797,    0.6366,    0.7012,    0.6810,    0.7090,    0.8339},
+{    0.6702,    0.6823,    0.8268,    0.6250,    0.7456,    0.6782,    0.7331,    0.6205,    0.6786,    0.8033},
+{    0.6910,    0.7332,    0.8750,    0.6697,    0.8119,    0.6608,    0.7235,    0.7261,    0.7142,    0.8595},
+{    0.6467,    0.7493,    0.6821,    0.6133,    0.6857,    0.6692,    0.7265,    0.8252,    0.7259,    0.7506},
+          },
+        new double[][,]
+          {            
+        new double[,]
+          {
+{         0,    0.0948,    0.0978,    0.1380,    0.0028,    0.0024,    0.0044,    0.1286,    0.0018,    0.0447},
+{    0.0948,         0,    0.2750,    0.3462,    0.1119,    0.1211,    0.0509,    0.2553,    0.0675,    0.0032},
+{    0.0978,    0.2750,         0,    0.0008,    0.0864,    0.0782,    0.1437,    0.0000,    0.1769,    0.2257},
+{    0.1380,    0.3462,    0.0008,         0,    0.1268,    0.1539,    0.1537,    0.0009,    0.1250,    0.2813},
+{    0.0028,    0.1119,    0.0864,    0.1268,         0,    0.0000,    0.0091,    0.0583,    0.0078,    0.0736},
+{    0.0024,    0.1211,    0.0782,    0.1539,    0.0000,         0,    0.0103,    0.0583,    0.0062,    0.0932},
+{    0.0044,    0.0509,    0.1437,    0.1537,    0.0091,    0.0103,         0,    0.2216,    0.0007,    0.0223},
+{    0.1286,    0.2553,    0.0000,    0.0009,    0.0583,    0.0583,    0.2216,         0,    0.1731,    0.1652},
+{    0.0018,    0.0675,    0.1769,    0.1250,    0.0078,    0.0062,    0.0007,    0.1731,         0,    0.0325},
+{    0.0447,    0.0032,    0.2257,    0.2813,    0.0736,    0.0932,    0.0223,    0.1652,    0.0325,         0},
+          },
+        new double[,]
+          {
+{         0,    0.1070,    0.1204,    0.0703,    0.2451,    0.1932,    0.0180,    0.0171,    0.0323,    0.2478},
+{    0.1070,         0,    0.0083,    0.0001,    0.0494,    0.0416,    0.1874,    0.1133,    0.0228,    0.0925},
+{    0.1204,    0.0083,         0,    0.0118,    0.0107,    0.0055,    0.2208,    0.3181,    0.0691,    0.0119},
+{    0.0703,    0.0001,    0.0118,         0,    0.0582,    0.0549,    0.1208,    0.1341,    0.0111,    0.0479},
+{    0.2451,    0.0494,    0.0107,    0.0582,         0,    0.0010,    0.2774,    0.2574,    0.1207,    0.0007},
+{    0.1932,    0.0416,    0.0055,    0.0549,    0.0010,         0,    0.2946,    0.2347,    0.0840,    0.0034},
+{    0.0180,    0.1874,    0.2208,    0.1208,    0.2774,    0.2946,         0,    0.0001,    0.0934,    0.3384},
+{    0.0171,    0.1133,    0.3181,    0.1341,    0.2574,    0.2347,    0.0001,         0,    0.0891,    0.2133},
+{    0.0323,    0.0228,    0.0691,    0.0111,    0.1207,    0.0840,    0.0934,    0.0891,         0,    0.1299},
+{    0.2478,    0.0925,    0.0119,    0.0479,    0.0007,    0.0034,    0.3384,    0.2133,    0.1299,         0},
+          },
+        new double[,]
+          {
+{         0,    0.0098,    0.1427,    0.0239,    0.0193,    0.0020,    0.1179,    0.1363,    0.1310,    0.0223},
+{    0.0098,         0,    0.0828,    0.0493,    0.0553,    0.0213,    0.0538,    0.0506,    0.0574,    0.0081},
+{    0.1427,    0.0828,         0,    0.2908,    0.3087,    0.1947,    0.0133,    0.0050,    0.0187,    0.0494},
+{    0.0239,    0.0493,    0.2908,         0,    0.0005,    0.0175,    0.1674,    0.2256,    0.1509,    0.0768},
+{    0.0193,    0.0553,    0.3087,    0.0005,         0,    0.0121,    0.1425,    0.1652,    0.1926,    0.0849},
+{    0.0020,    0.0213,    0.1947,    0.0175,    0.0121,         0,    0.1035,    0.1094,    0.0981,    0.0518},
+{    0.1179,    0.0538,    0.0133,    0.1674,    0.1425,    0.1035,         0,    0.0048,    0.0000,    0.0171},
+{    0.1363,    0.0506,    0.0050,    0.2256,    0.1652,    0.1094,    0.0048,         0,    0.0043,    0.0209},
+{    0.1310,    0.0574,    0.0187,    0.1509,    0.1926,    0.0981,    0.0000,    0.0043,         0,    0.0189},
+{    0.0223,    0.0081,    0.0494,    0.0768,    0.0849,    0.0518,    0.0171,    0.0209,    0.0189,         0},
+          },
+        new double[,]
+          {
+{         0,    0.0441,    0.0162,    0.0636,    0.0102,    0.0607,    0.0219,    0.0034,    0.0418,    0.1036},
+{    0.0441,         0,    0.0760,    0.0050,    0.0877,    0.0080,    0.0032,    0.0383,    0.1549,    0.0394},
+{    0.0162,    0.0760,         0,    0.1383,    0.0017,    0.1442,    0.0637,    0.0088,    0.0008,    0.1587},
+{    0.0636,    0.0050,    0.1383,         0,    0.1525,    0.0000,    0.0134,    0.0838,    0.1319,    0.0047},
+{    0.0102,    0.0877,    0.0017,    0.1525,         0,    0.1932,    0.0393,    0.0013,    0.0046,    0.1872},
+{    0.0607,    0.0080,    0.1442,    0.0000,    0.1932,         0,    0.0154,    0.0676,    0.1524,    0.0068},
+{    0.0219,    0.0032,    0.0637,    0.0134,    0.0393,    0.0154,         0,    0.0463,    0.1176,    0.0359},
+{    0.0034,    0.0383,    0.0088,    0.0838,    0.0013,    0.0676,    0.0463,         0,    0.0147,    0.0787},
+{    0.0418,    0.1549,    0.0008,    0.1319,    0.0046,    0.1524,    0.1176,    0.0147,         0,    0.2390},
+{    0.1036,    0.0394,    0.1587,    0.0047,    0.1872,    0.0068,    0.0359,    0.0787,    0.2390,         0},
+          },
+        new double[,]
+          {
+{         0,    0.0166,    0.0813,    0.1208,    0.1221,    0.1784,    0.1217,    0.0967,    0.0096,    0.0086},
+{    0.0166,         0,    0.0315,    0.0499,    0.0622,    0.1381,    0.0438,    0.0248,    0.0012,    0.0003},
+{    0.0813,    0.0315,         0,    0.0012,    0.0008,    0.0149,    0.0002,    0.0004,    0.0680,    0.0342},
+{    0.1208,    0.0499,    0.0012,         0,    0.0001,    0.0125,    0.0022,    0.0025,    0.0550,    0.0521},
+{    0.1221,    0.0622,    0.0008,    0.0001,         0,    0.0151,    0.0015,    0.0014,    0.0724,    0.0618},
+{    0.1784,    0.1381,    0.0149,    0.0125,    0.0151,         0,    0.0184,    0.0145,    0.1119,    0.1556},
+{    0.1217,    0.0438,    0.0002,    0.0022,    0.0015,    0.0184,         0,    0.0000,    0.0663,    0.0356},
+{    0.0967,    0.0248,    0.0004,    0.0025,    0.0014,    0.0145,    0.0000,         0,    0.0578,    0.0214},
+{    0.0096,    0.0012,    0.0680,    0.0550,    0.0724,    0.1119,    0.0663,    0.0578,         0,    0.0003},
+{    0.0086,    0.0003,    0.0342,    0.0521,    0.0618,    0.1556,    0.0356,    0.0214,    0.0003,         0},
+          },
+        new double[,]
+          {
+{    2.0000,    1.6749,    1.2884,    1.4086,    1.4481,    1.3558,    1.6576,    1.4857,    1.7530,    1.3818},
+{    1.6749,    2.0000,    1.2296,    1.3147,    1.5166,    1.5831,    1.5672,    1.1884,    1.6266,    1.8443},
+{    1.2884,    1.2296,    2.0000,    1.3383,    1.4280,    1.3533,    1.3417,    1.5791,    1.5769,    1.2005},
+{    1.4086,    1.3147,    1.3383,    2.0000,    1.5691,    1.7228,    1.2914,    1.3262,    1.2286,    1.2725},
+{    1.4481,    1.5166,    1.4280,    1.5691,    2.0000,    1.7466,    1.2457,    1.1805,    1.4515,    1.4286},
+{    1.3558,    1.5831,    1.3533,    1.7228,    1.7466,    2.0000,    1.3401,    1.1758,    1.3083,    1.6150},
+{    1.6576,    1.5672,    1.3417,    1.2914,    1.2457,    1.3401,    2.0000,    1.6740,    1.6662,    1.3186},
+{    1.4857,    1.1884,    1.5791,    1.3262,    1.1805,    1.1758,    1.6740,    2.0000,    1.5674,    1.0305},
+{    1.7530,    1.6266,    1.5769,    1.2286,    1.4515,    1.3083,    1.6662,    1.5674,    2.0000,    1.3985},
+{    1.3818,    1.8443,    1.2005,    1.2725,    1.4286,    1.6150,    1.3186,    1.0305,    1.3985,    2.0000},
+          },
+        new double[,]
+          {
+{         0,   -0.0124,   -0.0541,   -0.0386,   -0.0340,   -0.0452,   -0.0137,   -0.0298,   -0.0073,   -0.0419},
+{   -0.0124,         0,   -0.0623,   -0.0505,   -0.0265,   -0.0200,   -0.0215,   -0.0682,   -0.0162,   -0.0029},
+{   -0.0541,   -0.0623,         0,   -0.0474,   -0.0363,   -0.0455,   -0.0470,   -0.0204,   -0.0206,   -0.0664},
+{   -0.0386,   -0.0505,   -0.0474,         0,   -0.0213,   -0.0091,   -0.0537,   -0.0490,   -0.0624,   -0.0563},
+{   -0.0340,   -0.0265,   -0.0363,   -0.0213,         0,   -0.0077,   -0.0600,   -0.0693,   -0.0336,   -0.0362},
+{   -0.0452,   -0.0200,   -0.0455,   -0.0091,   -0.0077,         0,   -0.0472,   -0.0700,   -0.0514,   -0.0172},
+{   -0.0137,   -0.0215,   -0.0470,   -0.0537,   -0.0600,   -0.0472,         0,   -0.0125,   -0.0131,   -0.0500},
+{   -0.0298,   -0.0682,   -0.0204,   -0.0490,   -0.0693,   -0.0700,   -0.0125,         0,   -0.0215,   -0.0919},
+{   -0.0073,   -0.0162,   -0.0206,   -0.0624,   -0.0336,   -0.0514,   -0.0131,   -0.0215,         0,   -0.0399},
+{   -0.0419,   -0.0029,   -0.0664,   -0.0563,   -0.0362,   -0.0172,   -0.0500,   -0.0919,   -0.0399,         0},
+          },
+          }
+      );
+
+      TestCovarianceFunction(new CovarianceRationalQuadraticArd(), 1,
+       new double[,]
+          {
+{    6.8660,    6.8070,    7.2367,    6.8409,    7.1145,    6.7347,    6.9959,    7.1068,    6.9839,    7.1923},
+{    6.9324,    7.0474,    7.0559,    6.9038,    7.0827,    6.7961,    7.0038,    7.1944,    7.0644,    7.1739},
+{    7.1392,    7.1106,    7.2253,    7.0255,    6.8461,    7.1536,    7.2179,    6.9926,    7.1158,    7.2099},
+{    7.1429,    6.8249,    7.1453,    7.0658,    6.6525,    6.8816,    7.2752,    7.2623,    7.2467,    7.1995},
+{    7.2671,    6.8913,    7.1326,    7.2827,    6.5716,    6.6915,    7.1564,    7.3065,    7.2931,    7.2459},
+{    7.2567,    7.0886,    7.0466,    7.2086,    6.7069,    6.8897,    7.2522,    7.3388,    7.3405,    7.2471},
+{    6.9215,    7.1164,    7.0807,    6.8626,    7.2540,    6.8471,    6.9792,    6.9401,    6.9937,    7.1935},
+{    6.9185,    6.9428,    7.1836,    6.8210,    7.0584,    6.9346,    7.0369,    6.8105,    6.9354,    7.1496},
+{    6.9598,    7.0372,    7.2481,    6.9176,    7.1623,    6.8992,    7.0200,    7.0247,    7.0033,    7.2280},
+{    6.8692,    7.0646,    6.9424,    6.7937,    6.9495,    6.9165,    7.0254,    7.1813,    7.0242,    7.0668},
+          },
+       new double[][,]
+          {            
+        new double[,]
+          {
+{         0,    0.1304,    0.2130,    0.2577,    0.0051,    0.0048,    0.0061,    0.2187,    0.0023,    0.0863},
+{    0.1304,         0,    0.6491,    0.7284,    0.1836,    0.1841,    0.0788,    0.6386,    0.0979,    0.0037},
+{    0.2130,    0.6491,         0,    0.0016,    0.1576,    0.1566,    0.2918,    0.0000,    0.2709,    0.5549},
+{    0.2577,    0.7284,    0.0016,         0,    0.1959,    0.2014,    0.3334,    0.0018,    0.2955,    0.6260},
+{    0.0051,    0.1836,    0.1576,    0.1959,         0,    0.0000,    0.0210,    0.1476,    0.0138,    0.1340},
+{    0.0048,    0.1841,    0.1566,    0.2014,    0.0000,         0,    0.0210,    0.1485,    0.0131,    0.1368},
+{    0.0061,    0.0788,    0.2918,    0.3334,    0.0210,    0.0210,         0,    0.3051,    0.0010,    0.0467},
+{    0.2187,    0.6386,    0.0000,    0.0018,    0.1476,    0.1485,    0.3051,         0,    0.2679,    0.5250},
+{    0.0023,    0.0979,    0.2709,    0.2955,    0.0138,    0.0131,    0.0010,    0.2679,         0,    0.0615},
+{    0.0863,    0.0037,    0.5549,    0.6260,    0.1340,    0.1368,    0.0467,    0.5250,    0.0615,         0},
+          },
+        new double[,]
+          {
+{         0,    0.1472,    0.2623,    0.1312,    0.4360,    0.3853,    0.0252,    0.0290,    0.0410,    0.4783},
+{    0.1472,         0,    0.0195,    0.0002,    0.0811,    0.0633,    0.2900,    0.2833,    0.0330,    0.1071},
+{    0.2623,    0.0195,         0,    0.0240,    0.0196,    0.0110,    0.4485,    0.4860,    0.1059,    0.0293},
+{    0.1312,    0.0002,    0.0240,         0,    0.0898,    0.0718,    0.2620,    0.2779,    0.0262,    0.1067},
+{    0.4360,    0.0811,    0.0196,    0.0898,         0,    0.0012,    0.6403,    0.6512,    0.2138,    0.0013},
+{    0.3853,    0.0633,    0.0110,    0.0718,    0.0012,         0,    0.5997,    0.5978,    0.1783,    0.0050},
+{    0.0252,    0.2900,    0.4485,    0.2620,    0.6403,    0.5997,         0,    0.0002,    0.1297,    0.7083},
+{    0.0290,    0.2833,    0.4860,    0.2779,    0.6512,    0.5978,    0.0002,         0,    0.1379,    0.6776},
+{    0.0410,    0.0330,    0.1059,    0.0262,    0.2138,    0.1783,    0.1297,    0.1379,         0,    0.2455},
+{    0.4783,    0.1071,    0.0293,    0.1067,    0.0013,    0.0050,    0.7083,    0.6776,    0.2455,         0},
+          },
+        new double[,]
+          {
+{         0,    0.0135,    0.3109,    0.0446,    0.0343,    0.0040,    0.1652,    0.2317,    0.1661,    0.0430},
+{    0.0135,         0,    0.1954,    0.1037,    0.0908,    0.0323,    0.0832,    0.1265,    0.0831,    0.0094},
+{    0.3109,    0.1954,         0,    0.5932,    0.5627,    0.3898,    0.0271,    0.0076,    0.0287,    0.1215},
+{    0.0446,    0.1037,    0.5932,         0,    0.0007,    0.0229,    0.3633,    0.4676,    0.3566,    0.1709},
+{    0.0343,    0.0908,    0.5627,    0.0007,         0,    0.0155,    0.3289,    0.4180,    0.3412,    0.1546},
+{    0.0040,    0.0323,    0.3898,    0.0229,    0.0155,         0,    0.2106,    0.2787,    0.2080,    0.0761},
+{    0.1652,    0.0832,    0.0271,    0.3633,    0.3289,    0.2106,         0,    0.0066,    0.0000,    0.0357},
+{    0.2317,    0.1265,    0.0076,    0.4676,    0.4180,    0.2787,    0.0066,         0,    0.0067,    0.0665},
+{    0.1661,    0.0831,    0.0287,    0.3566,    0.3412,    0.2080,    0.0000,    0.0067,         0,    0.0358},
+{    0.0430,    0.0094,    0.1215,    0.1709,    0.1546,    0.0761,    0.0357,    0.0665,    0.0358,         0},
+          },
+        new double[,]
+          {
+{         0,    0.0606,    0.0353,    0.1187,    0.0182,    0.1211,    0.0307,    0.0058,    0.0530,    0.2000},
+{    0.0606,         0,    0.1794,    0.0105,    0.1438,    0.0121,    0.0050,    0.0958,    0.2245,    0.0456},
+{    0.0353,    0.1794,         0,    0.2821,    0.0031,    0.2886,    0.1294,    0.0135,    0.0012,    0.3901},
+{    0.1187,    0.0105,    0.2821,         0,    0.2356,    0.0000,    0.0291,    0.1737,    0.3117,    0.0105},
+{    0.0182,    0.1438,    0.0031,    0.2356,         0,    0.2466,    0.0907,    0.0033,    0.0081,    0.3409},
+{    0.1211,    0.0121,    0.2886,    0.0000,    0.2466,         0,    0.0313,    0.1720,    0.3233,    0.0100},
+{    0.0307,    0.0050,    0.1294,    0.0291,    0.0907,    0.0313,         0,    0.0638,    0.1634,    0.0752},
+{    0.0058,    0.0958,    0.0135,    0.1737,    0.0033,    0.1720,    0.0638,         0,    0.0227,    0.2501},
+{    0.0530,    0.2245,    0.0012,    0.3117,    0.0081,    0.3233,    0.1634,    0.0227,         0,    0.4517},
+{    0.2000,    0.0456,    0.3901,    0.0105,    0.3409,    0.0100,    0.0752,    0.2501,    0.4517,         0},
+          },
+        new double[,]
+          {
+{         0,    0.0228,    0.1771,    0.2255,    0.2172,    0.3559,    0.1705,    0.1644,    0.0122,    0.0167},
+{    0.0228,         0,    0.0745,    0.1050,    0.1020,    0.2099,    0.0679,    0.0620,    0.0017,    0.0004},
+{    0.1771,    0.0745,         0,    0.0024,    0.0015,    0.0299,    0.0004,    0.0005,    0.1042,    0.0840},
+{    0.2255,    0.1050,    0.0024,         0,    0.0001,    0.0163,    0.0048,    0.0051,    0.1299,    0.1160},
+{    0.2172,    0.1020,    0.0015,    0.0001,         0,    0.0192,    0.0034,    0.0036,    0.1283,    0.1125},
+{    0.3559,    0.2099,    0.0299,    0.0163,    0.0192,         0,    0.0374,    0.0368,    0.2374,    0.2284},
+{    0.1705,    0.0679,    0.0004,    0.0048,    0.0034,    0.0374,         0,    0.0000,    0.0921,    0.0746},
+{    0.1644,    0.0620,    0.0005,    0.0051,    0.0036,    0.0368,    0.0000,         0,    0.0895,    0.0680},
+{    0.0122,    0.0017,    0.1042,    0.1299,    0.1283,    0.2374,    0.0921,    0.0895,         0,    0.0005},
+{    0.0167,    0.0004,    0.0840,    0.1160,    0.1125,    0.2284,    0.0746,    0.0680,    0.0005,         0},
+          },
+        new double[,]
+          {
+{   14.7781,   14.3968,   13.7277,   13.9699,   14.0420,   13.8682,   14.3727,   14.1074,   14.5000,   13.9192},
+{   14.3968,   14.7781,   13.5943,   13.7839,   14.1589,   14.2640,   14.2397,   13.4942,   14.3286,   14.6106},
+{   13.7277,   13.5943,   14.7781,   13.8329,   14.0057,   13.8630,   13.8396,   14.2579,   14.2545,   13.5242},
+{   13.9699,   13.7839,   13.8329,   14.7781,   14.2426,   14.4610,   13.7342,   13.8078,   13.5920,   13.6926},
+{   14.0420,   14.1589,   14.0057,   14.2426,   14.7781,   14.4918,   13.6319,   13.4742,   14.0479,   14.0069},
+{   13.8682,   14.2640,   13.8630,   14.4610,   14.4918,   14.7781,   13.8365,   13.4625,   13.7703,   14.3117},
+{   14.3727,   14.2397,   13.8396,   13.7342,   13.6319,   13.8365,   14.7781,   14.3956,   14.3848,   13.7920},
+{   14.1074,   13.4942,   14.2579,   13.8078,   13.4742,   13.4625,   14.3956,   14.7781,   14.2399,   13.0490},
+{   14.5000,   14.3286,   14.2545,   13.5920,   14.0479,   13.7703,   14.3848,   14.2399,   14.7781,   13.9510},
+{   13.9192,   14.6106,   13.5242,   13.6926,   14.0069,   14.3117,   13.7920,   13.0490,   13.9510,   14.7781},
+          },
+        new double[,]
+          {
+{         0,   -0.0009,   -0.0068,   -0.0040,   -0.0034,   -0.0051,   -0.0010,   -0.0028,   -0.0005,   -0.0046},
+{   -0.0009,         0,   -0.0086,   -0.0061,   -0.0024,   -0.0016,   -0.0018,   -0.0101,   -0.0013,   -0.0002},
+{   -0.0068,   -0.0086,         0,   -0.0055,   -0.0037,   -0.0052,   -0.0054,   -0.0017,   -0.0017,   -0.0097},
+{   -0.0040,   -0.0061,   -0.0055,         0,   -0.0018,   -0.0006,   -0.0067,   -0.0058,   -0.0087,   -0.0073},
+{   -0.0034,   -0.0024,   -0.0037,   -0.0018,         0,   -0.0005,   -0.0081,   -0.0105,   -0.0033,   -0.0037},
+{   -0.0051,   -0.0016,   -0.0052,   -0.0006,   -0.0005,         0,   -0.0055,   -0.0106,   -0.0063,   -0.0013},
+{   -0.0010,   -0.0018,   -0.0054,   -0.0067,   -0.0081,   -0.0055,         0,   -0.0009,   -0.0010,   -0.0060},
+{   -0.0028,   -0.0101,   -0.0017,   -0.0058,   -0.0105,   -0.0106,   -0.0009,         0,   -0.0018,   -0.0183},
+{   -0.0005,   -0.0013,   -0.0017,   -0.0087,   -0.0033,   -0.0063,   -0.0010,   -0.0018,         0,   -0.0042},
+{   -0.0046,   -0.0002,   -0.0097,   -0.0073,   -0.0037,   -0.0013,   -0.0060,   -0.0183,   -0.0042,         0},
+          },
+          }
+     );
+    }
+
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CovMaternIsoTest() {
+      var cov = new CovarianceMaternIso();
+      cov.DParameter.Value = cov.DParameter.ValidValues.Single(x => x.Value == 1);
+      TestCovarianceFunction(cov, 0,
+        new double[,]
+          {
+{    0.3504,    0.3297,    0.5736,    0.3413,    0.4721,    0.3071,    0.4052,    0.4670,    0.3995,    0.5310},
+{    0.3765,    0.4317,    0.4364,    0.3649,    0.4520,    0.3261,    0.4090,    0.5328,    0.4412,    0.5155},
+{    0.4891,    0.4695,    0.5618,    0.4200,    0.3432,    0.4996,    0.5545,    0.4036,    0.4729,    0.5468},
+{    0.4918,    0.3358,    0.4935,    0.4420,    0.2843,    0.3562,    0.6189,    0.6027,    0.5844,    0.5373},
+{    0.6085,    0.3600,    0.4844,    0.6291,    0.2643,    0.2947,    0.5017,    0.6650,    0.6440,    0.5835},
+{    0.5959,    0.4556,    0.4312,    0.5456,    0.2990,    0.3593,    0.5907,    0.7278,    0.7318,    0.5848},
+{    0.3720,    0.4733,    0.4507,    0.3492,    0.5928,    0.3435,    0.3972,    0.3798,    0.4041,    0.5320},
+{    0.3708,    0.3810,    0.5235,    0.3344,    0.4378,    0.3775,    0.4260,    0.3309,    0.3778,    0.4967},
+{    0.3884,    0.4261,    0.5860,    0.3704,    0.5063,    0.3631,    0.4172,    0.4196,    0.4088,    0.5645},
+{    0.3516,    0.4413,    0.3808,    0.3253,    0.3839,    0.3700,    0.4200,    0.5215,    0.4193,    0.4426},
+          },
+        new double[][,]
+          {
+            new double[,] {
+{         0,    0.3341,    0.3674,    0.3665,    0.3647,    0.3678,    0.3380,    0.3621,    0.3122,    0.3673},
+{    0.3341,         0,    0.3655,    0.3678,    0.3593,    0.3512,    0.3535,    0.3632,    0.3441,    0.2724},
+{    0.3674,    0.3655,         0,    0.3679,    0.3657,    0.3678,    0.3679,    0.3518,    0.3521,    0.3639},
+{    0.3665,    0.3678,    0.3679,         0,    0.3532,    0.3217,    0.3675,    0.3679,    0.3654,    0.3670},
+{    0.3647,    0.3593,    0.3657,    0.3532,         0,    0.3143,    0.3661,    0.3627,    0.3645,    0.3657},
+{    0.3678,    0.3512,    0.3678,    0.3217,    0.3143,         0,    0.3679,    0.3624,    0.3677,    0.3462},
+{    0.3380,    0.3535,    0.3679,    0.3675,    0.3661,    0.3679,         0,    0.3343,    0.3361,    0.3678},
+{    0.3621,    0.3632,    0.3518,    0.3679,    0.3627,    0.3624,    0.3343,         0,    0.3534,    0.3480},
+{    0.3122,    0.3441,    0.3521,    0.3654,    0.3645,    0.3677,    0.3361,    0.3534,         0,    0.3669},
+{    0.3673,    0.2724,    0.3639,    0.3670,    0.3657,    0.3462,    0.3678,    0.3480,    0.3669,         0},
+            },
+            new double[,] {
+{    2.0000,    1.0726,    0.6992,    0.7999,    0.8353,    0.7546,    1.0516,    0.8703,    1.1763,    0.7767},
+{    1.0726,    2.0000,    0.6529,    0.7205,    0.9001,    0.9680,    0.9512,    0.6215,    1.0157,    1.3261},
+{    0.6992,    0.6529,    2.0000,    0.7399,    0.8171,    0.7524,    0.7427,    0.9637,    0.9614,    0.6307},
+{    0.7999,    0.7205,    0.7399,    2.0000,    0.9532,    1.1341,    0.7016,    0.7298,    0.6522,    0.6865},
+{    0.8353,    0.9001,    0.8171,    0.9532,    2.0000,    1.1670,    0.6654,    0.6156,    0.8384,    0.8177},
+{    0.7546,    0.9680,    0.7524,    1.1341,    1.1670,    2.0000,    0.7414,    0.6121,    0.7152,    1.0027},
+{    1.0516,    0.9512,    0.7427,    0.7016,    0.6654,    0.7414,    2.0000,    1.0716,    1.0620,    0.7236},
+{    0.8703,    0.6215,    0.9637,    0.7298,    0.6156,    0.6121,    1.0716,    2.0000,    0.9514,    0.5073},
+{    1.1763,    1.0157,    0.9614,    0.6522,    0.8384,    0.7152,    1.0620,    0.9514,    2.0000,    0.7911},
+{    0.7767,    1.3261,    0.6307,    0.6865,    0.8177,    1.0027,    0.7236,    0.5073,    0.7911,    2.0000},
+          },
+          }
+      );
+
+      cov = new CovarianceMaternIso();
+      cov.DParameter.Value = cov.DParameter.ValidValues.Single(x => x.Value == 1);
+      TestCovarianceFunction(cov, 1,
+         new double[,]
+           {
+{    5.0240,    4.9127,    6.0225,    4.9757,    5.6062,    4.7858,    5.2996,    5.5839,    5.2720,    5.8539},
+{    5.1587,    5.4247,    5.4464,    5.0993,    5.5171,    4.8930,    5.3181,    5.8612,    5.4683,    5.7906},
+{    5.6795,    5.5947,    5.9766,    5.3703,    4.9856,    5.7244,    5.9479,    5.2920,    5.6098,    5.9177},
+{    5.6910,    4.9457,    5.6984,    5.4720,    4.6518,    5.0545,    6.1936,    6.1332,    6.0640,    5.8794},
+{    6.1550,    5.0740,    5.6595,    6.2308,    4.5290,    4.7142,    5.7333,    6.3593,    6.2847,    6.0607},
+{    6.1078,    5.5332,    5.4226,    5.9127,    4.7394,    5.0707,    6.0880,    6.5739,    6.5871,    6.0658},
+{    5.1358,    5.6116,    5.5116,    5.0174,    6.0960,    4.9875,    5.2612,    5.1753,    5.2945,    5.8581},
+{    5.1296,    5.1809,    5.8235,    4.9384,    5.4528,    5.1635,    5.3983,    4.9192,    5.1652,    5.7119},
+{    5.2179,    5.3989,    6.0701,    5.1278,    5.7524,    5.0900,    5.3568,    5.3681,    5.3171,    5.9874},
+{    5.0301,    5.4688,    5.1800,    4.8886,    5.1954,    5.1255,    5.3700,    5.8155,    5.3671,    5.4746},
+           },
+         new double[][,]
+          {
+            new double[,] {
+{         0,    1.3467,    1.9408,    1.7781,    1.7213,    1.8512,    1.3793,    1.6654,    1.1869,    1.8156},
+{    1.3467,         0,    2.0157,    1.9064,    1.6180,    1.5105,    1.5369,    2.0667,    1.4355,    0.9602},
+{    1.9408,    2.0157,         0,    1.8749,    1.7505,    1.8547,    1.8704,    1.5173,    1.5209,    2.0519},
+{    1.7781,    1.9064,    1.8749,         0,    1.5338,    1.2516,    1.9369,    1.8912,    2.0170,    1.9613},
+{    1.7213,    1.6180,    1.7505,    1.5338,         0,    1.2011,    1.9955,    2.0764,    1.7164,    1.7495},
+{    1.8512,    1.5105,    1.8547,    1.2516,    1.2011,         0,    1.8725,    2.0820,    1.9149,    1.4559},
+{    1.3793,    1.5369,    1.8704,    1.9369,    1.9955,    1.8725,         0,    1.3483,    1.3632,    1.9013},
+{    1.6654,    2.0667,    1.5173,    1.8912,    2.0764,    2.0820,    1.3483,         0,    1.5366,    2.2512},
+{    1.1869,    1.4355,    1.5209,    2.0170,    1.7164,    1.9149,    1.3632,    1.5366,         0,    1.7923},
+{    1.8156,    0.9602,    2.0519,    1.9613,    1.7495,    1.4559,    1.9013,    2.2512,    1.7923,         0},
+            },
+            new double[,] {
+{   14.7781,   11.7510,   10.0394,   10.5489,   10.7184,   10.3248,   11.6660,   10.8814,   12.1567,   10.4351},
+{   11.7510,   14.7781,    9.7898,   10.1506,   11.0167,   11.3155,   11.2432,    9.6139,   11.5176,   12.7049},
+{   10.0394,    9.7898,   14.7781,   10.2506,   10.6319,   10.3138,   10.2646,   11.2970,   11.2870,    9.6657},
+{   10.5489,   10.1506,   10.2506,   14.7781,   11.2517,   11.9945,   10.0521,   10.1990,    9.7856,    9.9719},
+{   10.7184,   11.0167,   10.6319,   11.2517,   14.7781,   12.1214,    9.8583,    9.5798,   10.7329,   10.6348},
+{   10.3248,   11.3155,   10.3138,   11.9945,   12.1214,   14.7781,   10.2581,    9.5600,   10.1233,   11.4631},
+{   11.6660,   11.2432,   10.2646,   10.0521,    9.8583,   10.2581,   14.7781,   11.7468,   11.7082,   10.1669},
+{   10.8814,    9.6139,   11.2970,   10.1990,    9.5798,    9.5600,   11.7468,   14.7781,   11.2438,    8.9219},
+{   12.1567,   11.5176,   11.2870,    9.7856,   10.7329,   10.1233,   11.7082,   11.2438,   14.7781,   10.5061},
+{   10.4351,   12.7049,    9.6657,    9.9719,   10.6348,   11.4631,   10.1669,    8.9219,   10.5061,   14.7781},
+            },
+          }
+       );
+
+      cov = new CovarianceMaternIso();
+      cov.DParameter.Value = cov.DParameter.ValidValues.Single(x => x.Value == 5);
+      TestCovarianceFunction(cov, 0,
+         new double[,]
+           {
+{    0.4963,    0.4629,    0.7958,    0.4817,    0.6753,    0.4255,    0.5810,    0.6685,    0.5725,    0.7486},
+{    0.5375,    0.6197,    0.6264,    0.5193,    0.6481,    0.4570,    0.5867,    0.7507,    0.6331,    0.7303},
+{    0.6974,    0.6718,    0.7832,    0.6029,    0.4847,    0.7108,    0.7752,    0.5786,    0.6764,    0.7668},
+{    0.7008,    0.4727,    0.7030,    0.6342,    0.3873,    0.5056,    0.8402,    0.8250,    0.8069,    0.7559},
+{    0.8305,    0.5116,    0.6914,    0.8494,    0.3535,    0.4049,    0.7134,    0.8794,    0.8623,    0.8060},
+{    0.8184,    0.6530,    0.6190,    0.7654,    0.4121,    0.5105,    0.8132,    0.9232,    0.9256,    0.8074},
+{    0.5305,    0.6769,    0.6464,    0.4943,    0.8153,    0.4853,    0.5691,    0.5426,    0.5794,    0.7499},
+{    0.5286,    0.5443,    0.7399,    0.4706,    0.6283,    0.5390,    0.6115,    0.4648,    0.5395,    0.7071},
+{    0.5557,    0.6117,    0.8085,    0.5280,    0.7191,    0.5164,    0.5987,    0.6022,    0.5864,    0.7862},
+{    0.4982,    0.6333,    0.5441,    0.4557,    0.5488,    0.5273,    0.6028,    0.7375,    0.6019,    0.6350},
+           },
+         new double[][,]
+          {
+            new double[,] {
+{         0,    0.3844,    0.5881,    0.5499,    0.5324,    0.5694,    0.3987,    0.5135,    0.3134,    0.5603},
+{    0.3844,         0,    0.5987,    0.5817,    0.4964,    0.4543,    0.4650,    0.6029,    0.4230,    0.2154},
+{    0.5881,    0.5987,         0,    0.5749,    0.5416,    0.5703,    0.5739,    0.4571,    0.4586,    0.6019},
+{    0.5499,    0.5817,    0.5749,         0,    0.4638,    0.3422,    0.5874,    0.5785,    0.5988,    0.5915},
+{    0.5324,    0.4964,    0.5416,    0.4638,         0,    0.3197,    0.5963,    0.6034,    0.5308,    0.5413},
+{    0.5694,    0.4543,    0.5703,    0.3422,    0.3197,         0,    0.5744,    0.6036,    0.5833,    0.4316},
+{    0.3987,    0.4650,    0.5739,    0.5874,    0.5963,    0.5744,         0,    0.3852,    0.3917,    0.5806},
+{    0.5135,    0.6029,    0.4571,    0.5785,    0.6034,    0.6036,    0.3852,         0,    0.4649,    0.5937},
+{    0.3134,    0.4230,    0.4586,    0.5988,    0.5308,    0.5833,    0.3917,    0.4649,         0,    0.5539},
+{    0.5603,    0.2154,    0.6019,    0.5915,    0.5413,    0.4316,    0.5806,    0.5937,    0.5539,         0},
+            },
+            new double[,] {
+{    2.0000,    1.5097,    0.9901,    1.1464,    1.1989,    1.0773,    1.4852,    1.2492,    1.6213,    1.1113},
+{    1.5097,    2.0000,    0.9152,    1.0239,    1.2908,    1.3817,    1.3599,    0.8633,    1.4419,    1.7557},
+{    0.9901,    0.9152,    2.0000,    1.0545,    1.1721,    1.0739,    1.0588,    1.3761,    1.3731,    0.8785},
+{    1.1464,    1.0239,    1.0545,    2.0000,    1.3625,    1.5777,    0.9939,    1.0387,    0.9139,    0.9697},
+{    1.1989,    1.2908,    1.1721,    1.3625,    2.0000,    1.6120,    0.9356,    0.8534,    1.2033,    1.1730},
+{    1.0773,    1.3817,    1.0739,    1.5777,    1.6120,    2.0000,    1.0568,    0.8477,    1.0156,    1.4258},
+{    1.4852,    1.3599,    1.0588,    0.9939,    0.9356,    1.0568,    2.0000,    1.5084,    1.4974,    1.0289},
+{    1.2492,    0.8633,    1.3761,    1.0387,    0.8534,    0.8477,    1.5084,    2.0000,    1.3601,    0.6706},
+{    1.6213,    1.4419,    1.3731,    0.9139,    1.2033,    1.0156,    1.4974,    1.3601,    2.0000,    1.1332},
+{    1.1113,    1.7557,    0.8785,    0.9697,    1.1730,    1.4258,    1.0289,    0.6706,    1.1332,    2.0000},
+            },
+          }
+       );
+
+      cov = new CovarianceMaternIso();
+      cov.DParameter.Value = cov.DParameter.ValidValues.Single(x => x.Value == 5);
+      TestCovarianceFunction(cov, 1,
+         new double[,]
+           {
+{    6.5823,    6.4972,    7.1422,    6.5459,    6.9521,    6.3944,    6.7729,    6.9402,    6.7551,    7.0723},
+{    6.6790,    6.8501,    6.8629,    6.6372,    6.9035,    6.4817,    6.7847,    7.0756,    6.8757,    7.0436},
+{    6.9899,    6.9460,    7.1241,    6.8172,    6.5535,    7.0122,    7.1124,    6.7680,    6.9540,    7.0999},
+{    6.9957,    6.5229,    6.9993,    6.8778,    6.2792,    6.6048,    7.2033,    7.1828,    7.1579,    7.0835},
+{    7.1904,    6.6190,    6.9797,    7.2154,    6.1675,    6.3337,    7.0164,    7.2536,    7.2321,    7.1567},
+{    7.1739,    6.9125,    6.8488,    7.0978,    6.3553,    6.6166,    7.1667,    7.3062,    7.3089,    7.1586},
+{    6.6630,    6.9549,    6.9004,    6.5773,    7.1696,    6.5549,    6.7481,    6.6904,    6.7696,    7.0742},
+{    6.6587,    6.6943,    7.0587,    6.5173,    6.8667,    6.6823,    6.8343,    6.5023,    6.6835,    7.0060},
+{    6.7194,    6.8347,    7.1602,    6.6574,    7.0257,    6.6305,    6.8089,    6.8159,    6.7840,    7.1284},
+{    6.5868,    6.8760,    6.6937,    6.4782,    6.7042,    6.6558,    6.8171,    7.0551,    6.8153,    6.8793},
+           },
+         new double[][,]
+          {
+            new double[,] {
+{         0,    0.5862,    1.4459,    1.1551,    1.0644,    1.2798,    0.6204,    0.9803,    0.4359,    1.2178},
+{    0.5862,         0,    1.5974,    1.3802,    0.9128,    0.7716,    0.8048,    1.7072,    0.6825,    0.2685},
+{    1.4459,    1.5974,         0,    1.3222,    1.1103,    1.2860,    1.3141,    0.7801,    0.7846,    1.6746},
+{    1.1551,    1.3802,    1.3222,         0,    0.8009,    0.4933,    1.4383,    1.3520,    1.5999,    1.4863},
+{    1.0644,    0.9128,    1.1103,    0.8009,         0,    0.4481,    1.5552,    1.7288,    1.0568,    1.1088},
+{    1.2798,    0.7716,    1.2860,    0.4933,    0.4481,         0,    1.3179,    1.7414,    1.3962,    0.7060},
+{    0.6204,    0.8048,    1.3141,    1.4383,    1.5552,    1.3179,         0,    0.5878,    0.6033,    1.3707},
+{    0.9803,    1.7072,    0.7801,    1.3520,    1.7288,    1.7414,    0.5878,         0,    0.8045,    2.1597},
+{    0.4359,    0.6825,    0.7846,    1.5999,    1.0568,    1.3962,    0.6033,    0.8045,         0,    1.1785},
+{    1.2178,    0.2685,    1.6746,    1.4863,    1.1088,    0.7060,    1.3707,    2.1597,    1.1785,         0},
+            },
+            new double[,] {
+{   14.7781,   14.1637,   13.1581,   13.5134,   13.6208,   13.3631,   14.1260,   13.7191,   14.3263,   13.4382},
+{   14.1637,   14.7781,   12.9663,   13.2398,   13.7972,   13.9577,   13.9203,   12.8239,   14.0574,   14.5034},
+{   13.1581,   12.9663,   14.7781,   13.3113,   13.5666,   13.3555,   13.3212,   13.9482,   13.9431,   12.8665},
+{   13.5134,   13.2398,   13.3113,   14.7781,   13.9248,   14.2646,   13.1676,   13.2747,   12.9630,   13.1074},
+{   13.6208,   13.7972,   13.5666,   13.9248,   14.7781,   14.3133,   13.0201,   12.7957,   13.6298,   13.5685},
+{   13.3631,   13.9577,   13.3555,   14.2646,   14.3133,   14.7781,   13.3166,   12.7791,   13.2200,   14.0312},
+{   14.1260,   13.9203,   13.3212,   13.1676,   13.0201,   13.3166,   14.7781,   14.1618,   14.1449,   13.2516},
+{   13.7191,   12.8239,   13.9482,   13.2747,   12.7957,   12.7791,   14.1618,   14.7781,   13.9207,   12.2062},
+{   14.3263,   14.0574,   13.9431,   12.9630,   13.6298,   13.2200,   14.1449,   13.9207,   14.7781,   13.4853},
+{   13.4382,   14.5034,   12.8665,   13.1074,   13.5685,   14.0312,   13.2516,   12.2062,   13.4853,   14.7781},
+            },
+          }
+       );
+
+    }
+
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CovLinearTest() {
+      TestCovarianceFunction(new CovarianceLinear(), 0,
+        new double[,]
+          {
+{    0.9089,    0.9972,    1.8813,    0.8618,    2.0021,    1.5168,    1.2612,    1.1009,    0.9505,    1.3851},
+{    0.4654,    0.7436,    1.1758,    0.4150,    1.4523,    1.0699,    0.7535,    0.6763,    0.5205,    0.8497},
+{    1.3720,    1.4959,    2.0386,    1.2323,    1.8810,    2.1422,    1.6645,    1.1482,    1.2602,    1.5724},
+{    0.8471,    0.6576,    1.4266,    0.7465,    1.1331,    1.3214,    1.1946,    0.9028,    0.8676,    1.0329},
+{    0.7965,    0.5520,    1.2342,    0.7932,    0.8598,    0.9288,    0.8927,    0.7687,    0.7359,    0.9016},
+{    0.5306,    0.5096,    0.8879,    0.4618,    0.7612,    0.8960,    0.7367,    0.5462,    0.5287,    0.6475},
+{    0.8779,    1.2411,    1.6264,    0.7940,    2.0552,    1.5512,    1.1513,    0.8304,    0.8692,    1.2945},
+{    1.4220,    1.6026,    2.2818,    1.2951,    2.3982,    2.1948,    1.7607,    1.2346,    1.3533,    1.7961},
+{    1.0930,    1.3304,    1.9745,    1.0278,    2.1338,    1.7821,    1.3686,    1.0951,    1.0529,    1.5035},
+{    0.3406,    0.7064,    0.9980,    0.2373,    1.2538,    1.1479,    0.7212,    0.6072,    0.4222,    0.6815},
+          },
+        new double[][,]
+          {            
+          }
+      );
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CovLinearArdTest() {
+      TestCovarianceFunction(new CovarianceLinearArd(), 0,
+        new double[,]
+          {
+{    0.9089,    0.9972,    1.8813,    0.8618,    2.0022,    1.5168,    1.2612,    1.1009,    0.9506,    1.3851},
+{    0.4654,    0.7437,    1.1757,    0.4150,    1.4523,    1.0699,    0.7535,    0.6763,    0.5206,    0.8497},
+{    1.3719,    1.4959,    2.0386,    1.2323,    1.8810,    2.1422,    1.6645,    1.1482,    1.2603,    1.5724},
+{    0.8471,    0.6576,    1.4267,    0.7465,    1.1331,    1.3215,    1.1946,    0.9029,    0.8677,    1.0329},
+{    0.7965,    0.5520,    1.2342,    0.7932,    0.8598,    0.9288,    0.8927,    0.7688,    0.7360,    0.9016},
+{    0.5306,    0.5096,    0.8879,    0.4618,    0.7612,    0.8960,    0.7367,    0.5462,    0.5288,    0.6475},
+{    0.8779,    1.2411,    1.6264,    0.7940,    2.0553,    1.5512,    1.1513,    0.8304,    0.8693,    1.2945},
+{    1.4220,    1.6025,    2.2818,    1.2950,    2.3982,    2.1948,    1.7607,    1.2347,    1.3535,    1.7961},
+{    1.0929,    1.3303,    1.9743,    1.0277,    2.1337,    1.7820,    1.3686,    1.0950,    1.0529,    1.5034},
+{    0.3405,    0.7064,    0.9979,    0.2372,    1.2538,    1.1478,    0.7212,    0.6071,    0.4222,    0.6815},
+          },
+        new double[][,]
+          {            
+        new double[,]
+          {
+{   -0.3483,   -0.0415,   -0.7534,   -0.7885,   -0.4097,   -0.4084,   -0.2818,   -0.7512,   -0.3081,   -0.0928},
+{   -0.0415,   -0.0049,   -0.0897,   -0.0939,   -0.0488,   -0.0486,   -0.0336,   -0.0895,   -0.0367,   -0.0111},
+{   -0.7534,   -0.0897,   -1.6297,   -1.7057,   -0.8863,   -0.8834,   -0.6097,   -1.6250,   -0.6666,   -0.2008},
+{   -0.7885,   -0.0939,   -1.7057,   -1.7853,   -0.9276,   -0.9246,   -0.6381,   -1.7008,   -0.6976,   -0.2101},
+{   -0.4097,   -0.0488,   -0.8863,   -0.9276,   -0.4820,   -0.4804,   -0.3316,   -0.8837,   -0.3625,   -0.1092},
+{   -0.4084,   -0.0486,   -0.8834,   -0.9246,   -0.4804,   -0.4788,   -0.3305,   -0.8808,   -0.3613,   -0.1088},
+{   -0.2818,   -0.0336,   -0.6097,   -0.6381,   -0.3316,   -0.3305,   -0.2281,   -0.6079,   -0.2494,   -0.0751},
+{   -0.7512,   -0.0895,   -1.6250,   -1.7008,   -0.8837,   -0.8808,   -0.6079,   -1.6204,   -0.6646,   -0.2002},
+{   -0.3081,   -0.0367,   -0.6666,   -0.6976,   -0.3625,   -0.3613,   -0.2494,   -0.6646,   -0.2726,   -0.0821},
+{   -0.0928,   -0.0111,   -0.2008,   -0.2101,   -0.1092,   -0.1088,   -0.0751,   -0.2002,   -0.0821,   -0.0247},
+          },
+        new double[,]
+          {
+{   -1.2177,   -0.6082,   -0.3772,   -0.6303,   -0.1506,   -0.2060,   -1.4702,   -1.4921,   -0.8977,   -0.0933},
+{   -0.6082,   -0.3037,   -0.1884,   -0.3148,   -0.0752,   -0.1029,   -0.7343,   -0.7452,   -0.4483,   -0.0466},
+{   -0.3772,   -0.1884,   -0.1168,   -0.1952,   -0.0466,   -0.0638,   -0.4554,   -0.4622,   -0.2781,   -0.0289},
+{   -0.6303,   -0.3148,   -0.1952,   -0.3263,   -0.0780,   -0.1066,   -0.7610,   -0.7723,   -0.4646,   -0.0483},
+{   -0.1506,   -0.0752,   -0.0466,   -0.0780,   -0.0186,   -0.0255,   -0.1818,   -0.1845,   -0.1110,   -0.0115},
+{   -0.2060,   -0.1029,   -0.0638,   -0.1066,   -0.0255,   -0.0348,   -0.2487,   -0.2524,   -0.1519,   -0.0158},
+{   -1.4702,   -0.7343,   -0.4554,   -0.7610,   -0.1818,   -0.2487,   -1.7751,   -1.8015,   -1.0838,   -0.1127},
+{   -1.4921,   -0.7452,   -0.4622,   -0.7723,   -0.1845,   -0.2524,   -1.8015,   -1.8283,   -1.0999,   -0.1143},
+{   -0.8977,   -0.4483,   -0.2781,   -0.4646,   -0.1110,   -0.1519,   -1.0838,   -1.0999,   -0.6617,   -0.0688},
+{   -0.0933,   -0.0466,   -0.0289,   -0.0483,   -0.0115,   -0.0158,   -0.1127,   -0.1143,   -0.0688,   -0.0072},
+          },
+        new double[,]
+          {
+{   -0.1103,   -0.1659,   -0.3856,   -0.0072,   -0.0202,   -0.0794,   -0.3048,   -0.3436,   -0.3042,   -0.2117},
+{   -0.1659,   -0.2495,   -0.5801,   -0.0109,   -0.0304,   -0.1194,   -0.4585,   -0.5169,   -0.4575,   -0.3185},
+{   -0.3856,   -0.5801,   -1.3487,   -0.0253,   -0.0706,   -0.2776,   -1.0661,   -1.2017,   -1.0638,   -0.7406},
+{   -0.0072,   -0.0109,   -0.0253,   -0.0005,   -0.0013,   -0.0052,   -0.0200,   -0.0225,   -0.0199,   -0.0139},
+{   -0.0202,   -0.0304,   -0.0706,   -0.0013,   -0.0037,   -0.0145,   -0.0558,   -0.0629,   -0.0557,   -0.0388},
+{   -0.0794,   -0.1194,   -0.2776,   -0.0052,   -0.0145,   -0.0571,   -0.2194,   -0.2473,   -0.2189,   -0.1524},
+{   -0.3048,   -0.4585,   -1.0661,   -0.0200,   -0.0558,   -0.2194,   -0.8427,   -0.9499,   -0.8408,   -0.5854},
+{   -0.3436,   -0.5169,   -1.2017,   -0.0225,   -0.0629,   -0.2473,   -0.9499,   -1.0708,   -0.9478,   -0.6598},
+{   -0.3042,   -0.4575,   -1.0638,   -0.0199,   -0.0557,   -0.2189,   -0.8408,   -0.9478,   -0.8390,   -0.5841},
+{   -0.2117,   -0.3185,   -0.7406,   -0.0139,   -0.0388,   -0.1524,   -0.5854,   -0.6598,   -0.5841,   -0.4066},
+          },
+        new double[,]
+          {
+{   -0.5984,   -0.3242,   -0.8147,   -0.2068,   -0.7514,   -0.2007,   -0.4031,   -0.6844,   -0.8535,   -0.0887},
+{   -0.3242,   -0.1756,   -0.4413,   -0.1120,   -0.4070,   -0.1087,   -0.2184,   -0.3707,   -0.4623,   -0.0481},
+{   -0.8147,   -0.4413,   -1.1092,   -0.2815,   -1.0229,   -0.2733,   -0.5488,   -0.9318,   -1.1620,   -0.1208},
+{   -0.2068,   -0.1120,   -0.2815,   -0.0714,   -0.2596,   -0.0694,   -0.1393,   -0.2365,   -0.2949,   -0.0307},
+{   -0.7514,   -0.4070,   -1.0229,   -0.2596,   -0.9434,   -0.2521,   -0.5062,   -0.8593,   -1.0717,   -0.1114},
+{   -0.2007,   -0.1087,   -0.2733,   -0.0694,   -0.2521,   -0.0673,   -0.1352,   -0.2296,   -0.2863,   -0.0298},
+{   -0.4031,   -0.2184,   -0.5488,   -0.1393,   -0.5062,   -0.1352,   -0.2716,   -0.4611,   -0.5750,   -0.0598},
+{   -0.6844,   -0.3707,   -0.9318,   -0.2365,   -0.8593,   -0.2296,   -0.4611,   -0.7828,   -0.9762,   -0.1015},
+{   -0.8535,   -0.4623,   -1.1620,   -0.2949,   -1.0717,   -0.2863,   -0.5750,   -0.9762,   -1.2174,   -0.1265},
+{   -0.0887,   -0.0481,   -0.1208,   -0.0307,   -0.1114,   -0.0298,   -0.0598,   -0.1015,   -0.1265,   -0.0132},
+          },
+        new double[,]
+          {
+{   -1.7276,   -1.4419,   -0.9049,   -0.8103,   -0.8305,   -0.5694,   -0.9452,   -0.9495,   -1.5198,   -1.4774},
+{   -1.4419,   -1.2034,   -0.7552,   -0.6763,   -0.6932,   -0.4752,   -0.7889,   -0.7925,   -1.2684,   -1.2331},
+{   -0.9049,   -0.7552,   -0.4739,   -0.4244,   -0.4350,   -0.2982,   -0.4951,   -0.4973,   -0.7960,   -0.7738},
+{   -0.8103,   -0.6763,   -0.4244,   -0.3800,   -0.3895,   -0.2670,   -0.4433,   -0.4453,   -0.7128,   -0.6929},
+{   -0.8305,   -0.6932,   -0.4350,   -0.3895,   -0.3993,   -0.2737,   -0.4544,   -0.4565,   -0.7306,   -0.7102},
+{   -0.5694,   -0.4752,   -0.2982,   -0.2670,   -0.2737,   -0.1876,   -0.3115,   -0.3129,   -0.5009,   -0.4869},
+{   -0.9452,   -0.7889,   -0.4951,   -0.4433,   -0.4544,   -0.3115,   -0.5171,   -0.5195,   -0.8315,   -0.8083},
+{   -0.9495,   -0.7925,   -0.4973,   -0.4453,   -0.4565,   -0.3129,   -0.5195,   -0.5218,   -0.8353,   -0.8120},
+{   -1.5198,   -1.2684,   -0.7960,   -0.7128,   -0.7306,   -0.5009,   -0.8315,   -0.8353,   -1.3369,   -1.2997},
+{   -1.4774,   -1.2331,   -0.7738,   -0.6929,   -0.7102,   -0.4869,   -0.8083,   -0.8120,   -1.2997,   -1.2634},
+          },
+          }
+      );
+
+      TestCovarianceFunction(new CovarianceLinearArd(), 1,
+       new double[,]
+          {
+{    0.1230,    0.1350,    0.2546,    0.1166,    0.2710,    0.2053,    0.1707,    0.1490,    0.1287,    0.1875},
+{    0.0630,    0.1006,    0.1591,    0.0562,    0.1965,    0.1448,    0.1020,    0.0915,    0.0705,    0.1150},
+{    0.1857,    0.2024,    0.2759,    0.1668,    0.2546,    0.2899,    0.2253,    0.1554,    0.1706,    0.2128},
+{    0.1146,    0.0890,    0.1931,    0.1010,    0.1533,    0.1788,    0.1617,    0.1222,    0.1174,    0.1398},
+{    0.1078,    0.0747,    0.1670,    0.1074,    0.1164,    0.1257,    0.1208,    0.1040,    0.0996,    0.1220},
+{    0.0718,    0.0690,    0.1202,    0.0625,    0.1030,    0.1213,    0.0997,    0.0739,    0.0716,    0.0876},
+{    0.1188,    0.1680,    0.2201,    0.1075,    0.2781,    0.2099,    0.1558,    0.1124,    0.1176,    0.1752},
+{    0.1924,    0.2169,    0.3088,    0.1753,    0.3246,    0.2970,    0.2383,    0.1671,    0.1832,    0.2431},
+{    0.1479,    0.1800,    0.2672,    0.1391,    0.2888,    0.2412,    0.1852,    0.1482,    0.1425,    0.2035},
+{    0.0461,    0.0956,    0.1351,    0.0321,    0.1697,    0.1553,    0.0976,    0.0822,    0.0571,    0.0922},
+          },
+       new double[][,]
+          {            
+        new double[,]
+          {
+{   -0.0471,   -0.0056,   -0.1020,   -0.1067,   -0.0554,   -0.0553,   -0.0381,   -0.1017,   -0.0417,   -0.0126},
+{   -0.0056,   -0.0007,   -0.0121,   -0.0127,   -0.0066,   -0.0066,   -0.0045,   -0.0121,   -0.0050,   -0.0015},
+{   -0.1020,   -0.0121,   -0.2206,   -0.2308,   -0.1199,   -0.1196,   -0.0825,   -0.2199,   -0.0902,   -0.0272},
+{   -0.1067,   -0.0127,   -0.2308,   -0.2416,   -0.1255,   -0.1251,   -0.0864,   -0.2302,   -0.0944,   -0.0284},
+{   -0.0554,   -0.0066,   -0.1199,   -0.1255,   -0.0652,   -0.0650,   -0.0449,   -0.1196,   -0.0491,   -0.0148},
+{   -0.0553,   -0.0066,   -0.1196,   -0.1251,   -0.0650,   -0.0648,   -0.0447,   -0.1192,   -0.0489,   -0.0147},
+{   -0.0381,   -0.0045,   -0.0825,   -0.0864,   -0.0449,   -0.0447,   -0.0309,   -0.0823,   -0.0337,   -0.0102},
+{   -0.1017,   -0.0121,   -0.2199,   -0.2302,   -0.1196,   -0.1192,   -0.0823,   -0.2193,   -0.0899,   -0.0271},
+{   -0.0417,   -0.0050,   -0.0902,   -0.0944,   -0.0491,   -0.0489,   -0.0337,   -0.0899,   -0.0369,   -0.0111},
+{   -0.0126,   -0.0015,   -0.0272,   -0.0284,   -0.0148,   -0.0147,   -0.0102,   -0.0271,   -0.0111,   -0.0033},
+          },
+        new double[,]
+          {
+{   -0.1648,   -0.0823,   -0.0510,   -0.0853,   -0.0204,   -0.0279,   -0.1990,   -0.2019,   -0.1215,   -0.0126},
+{   -0.0823,   -0.0411,   -0.0255,   -0.0426,   -0.0102,   -0.0139,   -0.0994,   -0.1008,   -0.0607,   -0.0063},
+{   -0.0510,   -0.0255,   -0.0158,   -0.0264,   -0.0063,   -0.0086,   -0.0616,   -0.0625,   -0.0376,   -0.0039},
+{   -0.0853,   -0.0426,   -0.0264,   -0.0442,   -0.0105,   -0.0144,   -0.1030,   -0.1045,   -0.0629,   -0.0065},
+{   -0.0204,   -0.0102,   -0.0063,   -0.0105,   -0.0025,   -0.0034,   -0.0246,   -0.0250,   -0.0150,   -0.0016},
+{   -0.0279,   -0.0139,   -0.0086,   -0.0144,   -0.0034,   -0.0047,   -0.0337,   -0.0342,   -0.0206,   -0.0021},
+{   -0.1990,   -0.0994,   -0.0616,   -0.1030,   -0.0246,   -0.0337,   -0.2402,   -0.2438,   -0.1467,   -0.0152},
+{   -0.2019,   -0.1008,   -0.0625,   -0.1045,   -0.0250,   -0.0342,   -0.2438,   -0.2474,   -0.1489,   -0.0155},
+{   -0.1215,   -0.0607,   -0.0376,   -0.0629,   -0.0150,   -0.0206,   -0.1467,   -0.1489,   -0.0896,   -0.0093},
+{   -0.0126,   -0.0063,   -0.0039,   -0.0065,   -0.0016,   -0.0021,   -0.0152,   -0.0155,   -0.0093,   -0.0010},
+          },
+        new double[,]
+          {
+{   -0.0149,   -0.0224,   -0.0522,   -0.0010,   -0.0027,   -0.0107,   -0.0413,   -0.0465,   -0.0412,   -0.0287},
+{   -0.0224,   -0.0338,   -0.0785,   -0.0015,   -0.0041,   -0.0162,   -0.0621,   -0.0700,   -0.0619,   -0.0431},
+{   -0.0522,   -0.0785,   -0.1825,   -0.0034,   -0.0096,   -0.0376,   -0.1443,   -0.1626,   -0.1440,   -0.1002},
+{   -0.0010,   -0.0015,   -0.0034,   -0.0001,   -0.0002,   -0.0007,   -0.0027,   -0.0030,   -0.0027,   -0.0019},
+{   -0.0027,   -0.0041,   -0.0096,   -0.0002,   -0.0005,   -0.0020,   -0.0076,   -0.0085,   -0.0075,   -0.0052},
+{   -0.0107,   -0.0162,   -0.0376,   -0.0007,   -0.0020,   -0.0077,   -0.0297,   -0.0335,   -0.0296,   -0.0206},
+{   -0.0413,   -0.0621,   -0.1443,   -0.0027,   -0.0076,   -0.0297,   -0.1140,   -0.1286,   -0.1138,   -0.0792},
+{   -0.0465,   -0.0700,   -0.1626,   -0.0030,   -0.0085,   -0.0335,   -0.1286,   -0.1449,   -0.1283,   -0.0893},
+{   -0.0412,   -0.0619,   -0.1440,   -0.0027,   -0.0075,   -0.0296,   -0.1138,   -0.1283,   -0.1136,   -0.0790},
+{   -0.0287,   -0.0431,   -0.1002,   -0.0019,   -0.0052,   -0.0206,   -0.0792,   -0.0893,   -0.0790,   -0.0550},
+          },
+        new double[,]
+          {
+{   -0.0810,   -0.0439,   -0.1103,   -0.0280,   -0.1017,   -0.0272,   -0.0546,   -0.0926,   -0.1155,   -0.0120},
+{   -0.0439,   -0.0238,   -0.0597,   -0.0152,   -0.0551,   -0.0147,   -0.0296,   -0.0502,   -0.0626,   -0.0065},
+{   -0.1103,   -0.0597,   -0.1501,   -0.0381,   -0.1384,   -0.0370,   -0.0743,   -0.1261,   -0.1573,   -0.0163},
+{   -0.0280,   -0.0152,   -0.0381,   -0.0097,   -0.0351,   -0.0094,   -0.0189,   -0.0320,   -0.0399,   -0.0041},
+{   -0.1017,   -0.0551,   -0.1384,   -0.0351,   -0.1277,   -0.0341,   -0.0685,   -0.1163,   -0.1450,   -0.0151},
+{   -0.0272,   -0.0147,   -0.0370,   -0.0094,   -0.0341,   -0.0091,   -0.0183,   -0.0311,   -0.0388,   -0.0040},
+{   -0.0546,   -0.0296,   -0.0743,   -0.0189,   -0.0685,   -0.0183,   -0.0368,   -0.0624,   -0.0778,   -0.0081},
+{   -0.0926,   -0.0502,   -0.1261,   -0.0320,   -0.1163,   -0.0311,   -0.0624,   -0.1059,   -0.1321,   -0.0137},
+{   -0.1155,   -0.0626,   -0.1573,   -0.0399,   -0.1450,   -0.0388,   -0.0778,   -0.1321,   -0.1648,   -0.0171},
+{   -0.0120,   -0.0065,   -0.0163,   -0.0041,   -0.0151,   -0.0040,   -0.0081,   -0.0137,   -0.0171,   -0.0018},
+          },
+        new double[,]
+          {
+{   -0.2338,   -0.1951,   -0.1225,   -0.1097,   -0.1124,   -0.0771,   -0.1279,   -0.1285,   -0.2057,   -0.1999},
+{   -0.1951,   -0.1629,   -0.1022,   -0.0915,   -0.0938,   -0.0643,   -0.1068,   -0.1072,   -0.1717,   -0.1669},
+{   -0.1225,   -0.1022,   -0.0641,   -0.0574,   -0.0589,   -0.0404,   -0.0670,   -0.0673,   -0.1077,   -0.1047},
+{   -0.1097,   -0.0915,   -0.0574,   -0.0514,   -0.0527,   -0.0361,   -0.0600,   -0.0603,   -0.0965,   -0.0938},
+{   -0.1124,   -0.0938,   -0.0589,   -0.0527,   -0.0540,   -0.0370,   -0.0615,   -0.0618,   -0.0989,   -0.0961},
+{   -0.0771,   -0.0643,   -0.0404,   -0.0361,   -0.0370,   -0.0254,   -0.0422,   -0.0423,   -0.0678,   -0.0659},
+{   -0.1279,   -0.1068,   -0.0670,   -0.0600,   -0.0615,   -0.0422,   -0.0700,   -0.0703,   -0.1125,   -0.1094},
+{   -0.1285,   -0.1072,   -0.0673,   -0.0603,   -0.0618,   -0.0423,   -0.0703,   -0.0706,   -0.1130,   -0.1099},
+{   -0.2057,   -0.1717,   -0.1077,   -0.0965,   -0.0989,   -0.0678,   -0.1125,   -0.1130,   -0.1809,   -0.1759},
+{   -0.1999,   -0.1669,   -0.1047,   -0.0938,   -0.0961,   -0.0659,   -0.1094,   -0.1099,   -0.1759,   -0.1710},
+          },
+          }
+     );
+    }
+
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CovPeriodicTest() {
+      TestCovarianceFunction(new CovariancePeriodic(), 0,
+        new double[,]
+          {
+{    0.9548,    0.7965,    0.1438,    0.8971,    0.3692,    0.5608,    0.8367,    0.3951,    0.8773,    0.1881},
+{    0.9894,    0.6290,    0.5931,    0.9987,    0.4838,    0.7608,    0.8078,    0.1852,    0.5579,    0.2184},
+{    0.2962,    0.3824,    0.1517,    0.7208,    0.9105,    0.2604,    0.1580,    0.8483,    0.3653,    0.1660},
+{    0.2864,    0.8521,    0.2806,    0.5519,    0.3502,    0.9797,    0.1364,    0.1354,    0.1391,    0.1784},
+{    0.1354,    0.9908,    0.3145,    0.1389,    0.2266,    0.4391,    0.2541,    0.1592,    0.1452,    0.1394},
+{    0.1362,    0.4609,    0.6325,    0.1675,    0.4801,    0.9891,    0.1372,    0.2435,    0.2512,    0.1389},
+{    0.9975,    0.3630,    0.4916,    0.9481,    0.1367,    0.9130,    0.8921,    0.9800,    0.8445,    0.1864},
+{    0.9988,    0.9762,    0.2016,    0.8402,    0.5823,    0.9870,    0.6736,    0.8076,    0.9861,    0.2698},
+{    0.9440,    0.6724,    0.1385,    0.9991,    0.2411,    0.9966,    0.7439,    0.7247,    0.8095,    0.1496},
+{    0.9605,    0.5569,    0.9769,    0.7531,    0.9651,    0.9994,    0.7216,    0.2054,    0.7264,    0.5478},
+          },
+        new double[][,]
+          {      
+            new double[,]
+              {
+{         0,    0.6171,    0.0967,    0.2357,    0.4461,    0.0247,    0.6403,    0.6107,    0.5464,    0.1081},
+{    0.6171,         0,    0.4105,    0.0173,    0.6953,    0.7281,    0.7351,    0.6132,    0.6825,    0.5825},
+{    0.0967,    0.4105,         0,    0.0012,    0.3397,    0.0195,    0.0034,    0.7305,    0.7317,    0.5618},
+{    0.2357,    0.0173,    0.0012,         0,    0.7346,    0.5651,    0.0847,    0.0026,    0.4161,    0.1700},
+{    0.4461,    0.6953,    0.3397,    0.7346,         0,    0.5493,    0.3178,    0.6422,    0.4630,    0.3434},
+{    0.0247,    0.7281,    0.0195,    0.5651,    0.5493,         0,    0.0023,    0.6572,    0.0311,    0.6971},
+{    0.6403,    0.7351,    0.0034,    0.0847,    0.3178,    0.0023,         0,    0.6182,    0.6285,    0.0109},
+{    0.6107,    0.6132,    0.7305,    0.0026,    0.6422,    0.6572,    0.6182,         0,    0.7351,    0.6230},
+{    0.5464,    0.6825,    0.7317,    0.4161,    0.4630,    0.0311,    0.6285,    0.7351,         0,    0.1843},
+{    0.1081,    0.5825,    0.5618,    0.1700,    0.3434,    0.6971,    0.0109,    0.6230,    0.1843,         0},
+              },
+            new double[,]
+              {
+{         0,   -0.4917,    1.9759,   -2.5233,   -2.9038,   -0.9545,   -0.6223,   -2.7396,   -0.0884,   -1.8718},
+{   -0.4917,         0,    3.6663,    0.8377,   -2.3760,   -1.4241,   -1.6437,    3.8424,   -0.9067,    0.2162},
+{    1.9759,    3.6663,         0,   -0.2205,   -2.7933,   -0.8509,   -0.3646,   -1.4789,   -1.5087,    3.8738},
+{   -2.5233,    0.8377,   -0.2205,         0,   -1.6172,   -0.2162,    1.8523,    0.3213,    3.6804,    2.5815},
+{   -2.9038,   -2.3760,   -2.7933,   -1.6172,         0,   -0.1136,    3.3650,    3.7893,   -2.9070,   -2.7998},
+{   -0.9545,   -1.4241,   -0.8509,   -0.2162,   -0.1136,         0,   -0.2974,    3.7478,    1.1265,   -1.0310},
+{   -0.6223,   -1.6437,   -0.3646,    1.8523,    3.3650,   -0.2974,         0,   -0.4977,   -0.5548,    0.6640},
+{   -2.7396,    3.8424,   -1.4789,    0.3213,    3.7893,    3.7478,   -0.4977,         0,   -1.6417,    1.1444},
+{   -0.0884,   -0.9067,   -1.5087,    3.6804,   -2.9070,    1.1265,   -0.5548,   -1.6417,         0,   -2.3160},
+{   -1.8718,    0.2162,    3.8738,    2.5815,   -2.7998,   -1.0310,    0.6640,    1.1444,   -2.3160,         0},
+              },
+            new double[,]
+              {
+{    2.0000,    0.3597,    1.9008,    1.7477,    1.4793,    1.9751,    0.3943,    1.2046,    0.2758,    1.8887},
+{    0.3597,    2.0000,    1.5291,    1.9826,    0.9929,    0.6320,    0.7047,    1.1997,    0.4741,    0.3153},
+{    1.9008,    1.5291,    2.0000,    1.9988,    1.6221,    1.9804,    1.9966,    0.6498,    0.6595,    1.2969},
+{    1.7477,    1.9826,    1.9988,    2.0000,    0.6957,    0.2956,    1.9134,    1.9974,    1.5215,    1.8218},
+{    1.4793,    0.9929,    1.6221,    0.6957,    2.0000,    0.2787,    1.6495,    1.1369,    1.4549,    1.6174},
+{    1.9751,    0.6320,    1.9804,    0.2956,    0.2787,    2.0000,    1.9977,    1.1010,    1.9686,    0.5106},
+{    0.3943,    0.7047,    1.9966,    1.9134,    1.6495,    1.9977,    2.0000,    0.3612,    0.3762,    1.9891},
+{    1.2046,    1.1997,    0.6498,    1.9974,    1.1369,    1.1010,    0.3612,    2.0000,    0.7040,    0.3681},
+{    0.2758,    0.4741,    0.6595,    1.5215,    1.4549,    1.9686,    0.3762,    0.7040,    2.0000,    1.8059},
+{    1.8887,    0.3153,    1.2969,    1.8218,    1.6174,    0.5106,    1.9891,    0.3681,    1.8059,    2.0000},
+              },
+          }
+      , 5e-3);
+      TestCovarianceFunction(new CovariancePeriodic(), 1,
+        new double[,]
+          {
+{    5.8283,    5.7618,    6.7049,    5.7980,    6.3126,    5.7012,    6.0358,    6.2917,    6.0128,    6.5482},
+{    5.9230,    6.1447,    6.1643,    5.8794,    6.2291,    5.7511,    6.0513,    6.5551,    6.1842,    6.4880},
+{    6.3822,    6.3018,    6.6628,    6.0966,    5.8040,    6.4250,    6.6362,    6.0294,    6.3159,    6.6082},
+{    6.3932,    5.7803,    6.4000,    6.1876,    5.6577,    5.8483,    6.8550,    6.8032,    6.7423,    6.5723},
+{    6.8221,    5.8618,    6.3630,    6.8860,    5.6385,    5.6752,    6.4334,    6.9877,    6.9298,    6.7393},
+{    6.7811,    6.2441,    6.1428,    6.6035,    5.6837,    5.8594,    6.7636,    7.1358,    7.1438,    6.7439},
+{    5.9060,    6.3179,    6.2241,    5.8240,    6.7709,    5.8052,    6.0040,    5.9357,    6.0315,    6.5522},
+{    5.9014,    5.9400,    6.5193,    5.7761,    6.1703,    5.9266,    6.1211,    5.7652,    5.9278,    6.4131},
+{    5.9689,    6.1217,    6.7479,    5.9000,    6.4518,    5.8729,    6.0847,    6.0946,    6.0504,    6.6728},
+{    5.8322,    6.1847,    5.9393,    5.7489,    5.9512,    5.8983,    6.0962,    6.5118,    6.0937,    6.1900},
+          },
+        new double[][,]
+          {            
+            new double[,]
+              {
+{         0,    1.5463,    2.7702,    2.4754,    2.3601,    2.6154,    1.6170,    2.2426,    1.2120,    2.5484},
+{    1.5463,         0,    2.8809,    2.7132,    2.1407,    1.9051,    1.9633,    2.9438,    1.7399,    0.7903},
+{    2.7702,    2.8809,         0,    2.6583,    2.4199,    2.6219,    2.6503,    1.9201,    1.9281,    2.9266},
+{    2.4754,    2.7132,    2.6583,         0,    1.9565,    1.3445,    2.7639,    2.6871,    2.8826,    2.8025},
+{    2.3601,    2.1407,    2.4199,    1.9565,         0,    1.2406,    2.8530,    2.9544,    2.3499,    2.4179},
+{    2.6154,    1.9051,    2.6219,    1.3445,    1.2406,         0,    2.6541,    2.9603,    2.7276,    1.7848},
+{    1.6170,    1.9633,    2.6503,    2.7639,    2.8530,    2.6541,         0,    1.5498,    1.5819,    2.7045},
+{    2.2426,    2.9438,    1.9201,    2.6871,    2.9544,    2.9603,    1.5498,         0,    1.9628,    3.0510},
+{    1.2120,    1.7399,    1.9281,    2.8826,    2.3499,    2.7276,    1.5819,    1.9628,         0,    2.5033},
+{    2.5484,    0.7903,    2.9266,    2.8025,    2.4179,    1.7848,    2.7045,    3.0510,    2.5033,         0},
+              },
+            new double[,]
+              {
+{         0,    1.2693,    1.2518,    1.4723,    1.4989,    1.4024,    1.3080,    1.5046,    1.0560,    1.4419},
+{    1.2693,         0,    1.0599,    1.3190,    1.4956,    1.4360,    1.4550,    0.8895,    1.3688,    0.7299},
+{    1.2518,    1.0599,         0,    1.3700,    1.4880,    1.3979,    1.3765,    1.4411,    1.4438,    0.9428},
+{    1.4723,    1.3190,    1.3700,         0,    1.4529,    1.1461,    1.2600,    1.3448,    1.0562,    1.2056},
+{    1.4989,    1.4956,    1.4880,    1.4529,         0,    1.0760,    1.1183,    0.8531,    1.5002,    1.4885},
+{    1.4024,    1.4360,    1.3979,    1.1461,    1.0760,         0,    1.3735,    0.8314,    1.3035,    1.3888},
+{    1.3080,    1.4550,    1.3765,    1.2600,    1.1183,    1.3735,         0,    1.2713,    1.2891,    1.3279},
+{    1.5046,    0.8895,    1.4411,    1.3448,    0.8531,    0.8314,    1.2713,         0,    1.4549,   -0.0705},
+{    1.0560,    1.3688,    1.4438,    1.0562,    1.5002,    1.3035,    1.2891,    1.4549,         0,    1.4621},
+{    1.4419,    0.7299,    0.9428,    1.2056,    1.4885,    1.3888,    1.3279,   -0.0705,    1.4621,         0},
+              },
+            new double[,]
+              {
+{   14.7781,   13.1371,   11.6509,   12.0296,   12.1738,   11.8516,   13.0567,   12.3184,   13.5101,   11.9373},
+{   13.1371,   14.7781,   11.5044,   11.7253,   12.4422,   12.7230,   12.6543,   11.4201,   12.9155,   13.9651},
+{   11.6509,   11.5044,   14.7781,   11.7964,   12.0992,   11.8434,   11.8067,   12.7053,   12.6959,   11.4432},
+{   12.0296,   11.7253,   11.7964,   14.7781,   12.6624,   13.3637,   11.6592,   11.7593,   11.5022,   11.6084},
+{   12.1738,   12.4422,   12.0992,   12.6624,   14.7781,   13.4786,   11.5416,   11.4058,   12.1864,   12.1017},
+{   11.8516,   12.7230,   11.8434,   13.3637,   13.4786,   14.7781,   11.8019,   11.3978,   11.7066,   12.8636},
+{   13.0567,   12.6543,   11.8067,   11.6592,   11.5416,   11.8019,   14.7781,   13.1331,   13.0967,   11.7366},
+{   12.3184,   11.4201,   12.7053,   11.7593,   11.4058,   11.3978,   13.1331,   14.7781,   12.6549,   11.2744},
+{   13.5101,   12.9155,   12.6959,   11.5022,   12.1864,   11.7066,   13.0967,   12.6549,   14.7781,   11.9944},
+{   11.9373,   13.9651,   11.4432,   11.6084,   12.1017,   12.8636,   11.7366,   11.2744,   11.9944,   14.7781},
+              },
+          }
+      , 5e-3);
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CovSEardTest() {
+      TestCovarianceFunction(new CovarianceSquaredExponentialArd(), 0,
+        new double[,]
+          {
+{    0.5771,    0.5404,    0.8569,    0.5612,    0.7545,    0.4980,    0.6649,    0.7484,    0.6564,    0.8184},
+{    0.6206,    0.7027,    0.7091,    0.6015,    0.7295,    0.5338,    0.6705,    0.8202,    0.7155,    0.8029},
+{    0.7743,    0.7513,    0.8468,    0.6865,    0.5645,    0.7861,    0.8404,    0.6625,    0.7555,    0.8335},
+{    0.7773,    0.5513,    0.7792,    0.7166,    0.4534,    0.5870,    0.8913,    0.8796,    0.8656,    0.8245},
+{    0.8839,    0.5934,    0.7689,    0.8982,    0.4126,    0.4741,    0.7883,    0.9201,    0.9077,    0.8649},
+{    0.8746,    0.7341,    0.7020,    0.8323,    0.4826,    0.5922,    0.8706,    0.9508,    0.9524,    0.8660},
+{    0.6133,    0.7560,    0.7280,    0.5749,    0.8722,    0.5651,    0.6530,    0.6260,    0.6633,    0.8195},
+{    0.6113,    0.6277,    0.8110,    0.5489,    0.7110,    0.6221,    0.6948,    0.5425,    0.6227,    0.7828},
+{    0.6394,    0.6950,    0.8669,    0.6107,    0.7933,    0.5985,    0.6823,    0.6858,    0.6702,    0.8492},
+{    0.5790,    0.7156,    0.6274,    0.5324,    0.6323,    0.6100,    0.6863,    0.8091,    0.6855,    0.7173},
+
+          },
+        new double[][,]
+          {      
+            new double[,]
+              {
+{         0,    0.1113,    0.1356,    0.1828,    0.0037,    0.0032,    0.0052,    0.1649,    0.0020,    0.0599},
+{    0.1113,         0,    0.3889,    0.4757,    0.1415,    0.1485,    0.0629,    0.3653,    0.0811,    0.0035},
+{    0.1356,    0.3889,         0,    0.0011,    0.1136,    0.1060,    0.1954,    0.0000,    0.2176,    0.3219},
+{    0.1828,    0.4757,    0.0011,         0,    0.1566,    0.1766,    0.2129,    0.0012,    0.1768,    0.3923},
+{    0.0037,    0.1415,    0.1136,    0.1566,         0,    0.0000,    0.0128,    0.0836,    0.0101,    0.0966},
+{    0.0032,    0.1485,    0.1060,    0.1766,    0.0000,         0,    0.0140,    0.0837,    0.0085,    0.1126},
+{    0.0052,    0.0629,    0.1954,    0.2129,    0.0128,    0.0140,         0,    0.2603,    0.0008,    0.0306},
+{    0.1649,    0.3653,    0.0000,    0.0012,    0.0836,    0.0837,    0.2603,         0,    0.2139,    0.2429},
+{    0.0020,    0.0811,    0.2176,    0.1768,    0.0101,    0.0085,    0.0008,    0.2139,         0,    0.0433},
+{    0.0599,    0.0035,    0.3219,    0.3923,    0.0966,    0.1126,    0.0306,    0.2429,    0.0433,         0},
+              },
+            new double[,]
+              {
+{         0,    0.1257,    0.1670,    0.0931,    0.3194,    0.2613,    0.0213,    0.0219,    0.0365,    0.3319},
+{    0.1257,         0,    0.0117,    0.0001,    0.0625,    0.0510,    0.2315,    0.1621,    0.0274,    0.1000},
+{    0.1670,    0.0117,         0,    0.0160,    0.0141,    0.0075,    0.3003,    0.3909,    0.0850,    0.0170},
+{    0.0931,    0.0001,    0.0160,         0,    0.0718,    0.0629,    0.1673,    0.1835,    0.0157,    0.0668},
+{    0.3194,    0.0625,    0.0141,    0.0718,         0,    0.0011,    0.3903,    0.3690,    0.1570,    0.0009},
+{    0.2613,    0.0510,    0.0075,    0.0629,    0.0011,         0,    0.4011,    0.3369,    0.1158,    0.0041},
+{    0.0213,    0.2315,    0.3003,    0.1673,    0.3903,    0.4011,         0,    0.0002,    0.1102,    0.4643},
+{    0.0219,    0.1621,    0.3909,    0.1835,    0.3690,    0.3369,    0.0002,         0,    0.1101,    0.3135},
+{    0.0365,    0.0274,    0.0850,    0.0157,    0.1570,    0.1158,    0.1102,    0.1101,         0,    0.1728},
+{    0.3319,    0.1000,    0.0170,    0.0668,    0.0009,    0.0041,    0.4643,    0.3135,    0.1728,         0},
+              },
+            new double[,]
+              {
+{         0,    0.0115,    0.1979,    0.0316,    0.0251,    0.0027,    0.1396,    0.1747,    0.1481,    0.0299},
+{    0.0115,         0,    0.1171,    0.0678,    0.0700,    0.0261,    0.0664,    0.0724,    0.0689,    0.0088},
+{    0.1979,    0.1171,         0,    0.3960,    0.4057,    0.2638,    0.0181,    0.0061,    0.0230,    0.0705},
+{    0.0316,    0.0678,    0.3960,         0,    0.0006,    0.0201,    0.2320,    0.3087,    0.2134,    0.1071},
+{    0.0251,    0.0700,    0.4057,    0.0006,         0,    0.0137,    0.2005,    0.2369,    0.2506,    0.1115},
+{    0.0027,    0.0261,    0.2638,    0.0201,    0.0137,         0,    0.1409,    0.1571,    0.1351,    0.0626},
+{    0.1396,    0.0664,    0.0181,    0.2320,    0.2005,    0.1409,         0,    0.0056,    0.0000,    0.0234},
+{    0.1747,    0.0724,    0.0061,    0.3087,    0.2369,    0.1571,    0.0056,         0,    0.0054,    0.0308},
+{    0.1481,    0.0689,    0.0230,    0.2134,    0.2506,    0.1351,    0.0000,    0.0054,         0,    0.0252},
+{    0.0299,    0.0088,    0.0705,    0.1071,    0.1115,    0.0626,    0.0234,    0.0308,    0.0252,         0},
+              },
+            new double[,]
+              {
+{         0,    0.0518,    0.0225,    0.0842,    0.0134,    0.0822,    0.0259,    0.0044,    0.0472,    0.1388},
+{    0.0518,         0,    0.1075,    0.0068,    0.1109,    0.0098,    0.0040,    0.0548,    0.1861,    0.0426},
+{    0.0225,    0.1075,         0,    0.1884,    0.0022,    0.1953,    0.0866,    0.0109,    0.0010,    0.2263},
+{    0.0842,    0.0068,    0.1884,         0,    0.1883,    0.0000,    0.0186,    0.1147,    0.1866,    0.0066},
+{    0.0134,    0.1109,    0.0022,    0.1883,         0,    0.2191,    0.0553,    0.0019,    0.0060,    0.2459},
+{    0.0822,    0.0098,    0.1953,    0.0000,    0.2191,         0,    0.0209,    0.0970,    0.2098,    0.0083},
+{    0.0259,    0.0040,    0.0866,    0.0186,    0.0553,    0.0209,         0,    0.0544,    0.1387,    0.0493},
+{    0.0044,    0.0548,    0.0109,    0.1147,    0.0019,    0.0970,    0.0544,         0,    0.0181,    0.1157},
+{    0.0472,    0.1861,    0.0010,    0.1866,    0.0060,    0.2098,    0.1387,    0.0181,         0,    0.3179},
+{    0.1388,    0.0426,    0.2263,    0.0066,    0.2459,    0.0083,    0.0493,    0.1157,    0.3179,         0},
+              },
+            new double[,]
+              {
+{         0,    0.0195,    0.1128,    0.1600,    0.1591,    0.2414,    0.1441,    0.1240,    0.0109,    0.0116},
+{    0.0195,         0,    0.0446,    0.0686,    0.0786,    0.1693,    0.0542,    0.0354,    0.0014,    0.0003},
+{    0.1128,    0.0446,         0,    0.0016,    0.0011,    0.0202,    0.0003,    0.0004,    0.0837,    0.0487},
+{    0.1600,    0.0686,    0.0016,         0,    0.0001,    0.0143,    0.0030,    0.0034,    0.0778,    0.0727},
+{    0.1591,    0.0786,    0.0011,    0.0001,         0,    0.0171,    0.0021,    0.0020,    0.0942,    0.0812},
+{    0.2414,    0.1693,    0.0202,    0.0143,    0.0171,         0,    0.0250,    0.0207,    0.1541,    0.1880},
+{    0.1441,    0.0542,    0.0003,    0.0030,    0.0021,    0.0250,         0,    0.0000,    0.0782,    0.0489},
+{    0.1240,    0.0354,    0.0004,    0.0034,    0.0020,    0.0207,    0.0000,         0,    0.0714,    0.0315},
+{    0.0109,    0.0014,    0.0837,    0.0778,    0.0942,    0.1541,    0.0782,    0.0714,         0,    0.0003},
+{    0.0116,    0.0003,    0.0487,    0.0727,    0.0812,    0.1880,    0.0489,    0.0315,    0.0003,         0},
+              },
+            new double[,]
+              {
+{    2.0000,    1.6472,    1.1513,    1.3142,    1.3662,    1.2437,    1.6267,    1.4148,    1.7372,    1.2786},
+{    1.6472,    2.0000,    1.0689,    1.1876,    1.4541,    1.5370,    1.5174,    1.0103,    1.5898,    1.8381},
+{    1.1513,    1.0689,    2.0000,    1.2199,    1.3398,    1.2402,    1.2244,    1.5320,    1.5293,    1.0276},
+{    1.3142,    1.1876,    1.2199,    2.0000,    1.5197,    1.7027,    1.1555,    1.2033,    1.0675,    1.1291},
+{    1.3662,    1.4541,    1.3398,    1.5197,    2.0000,    1.7299,    1.0916,    0.9989,    1.3706,    1.3407},
+{    1.2437,    1.5370,    1.2402,    1.7027,    1.7299,    2.0000,    1.2223,    0.9923,    1.1787,    1.5758},
+{    1.6267,    1.5174,    1.2244,    1.1555,    1.0916,    1.2223,    2.0000,    1.6461,    1.6369,    1.1928},
+{    1.4148,    1.0103,    1.5320,    1.2033,    0.9989,    0.9923,    1.6461,    2.0000,    1.5176,    0.7806},
+{    1.7372,    1.5898,    1.5293,    1.0675,    1.3706,    1.1787,    1.6369,    1.5176,    2.0000,    1.3009},
+{    1.2786,    1.8381,    1.0276,    1.1291,    1.3407,    1.5758,    1.1928,    0.7806,    1.3009,    2.0000},
+              },
+          }
+      );
+      TestCovarianceFunction(new CovarianceSquaredExponentialArd(), 1,
+        new double[,]
+          {
+{    6.8592,    6.7985,    7.2362,    6.8334,    7.1127,    6.7239,    6.9920,    7.1048,    6.9798,    7.1914},
+{    6.9271,    7.0445,    7.0531,    6.8979,    7.0803,    6.7872,    7.0000,    7.1935,    7.0617,    7.1727},
+{    7.1376,    7.1086,    7.2246,    7.0223,    6.8388,    7.1522,    7.2172,    6.9886,    7.1139,    7.2091},
+{    7.1414,    6.8169,    7.1438,    7.0632,    6.6389,    6.8750,    7.2749,    7.2619,    7.2462,    7.1986},
+{    7.2667,    6.8852,    7.1309,    7.2824,    6.5548,    6.6792,    7.1550,    7.3063,    7.2929,    7.2454},
+{    7.2563,    7.0864,    7.0436,    7.2078,    6.6953,    6.8834,    7.2517,    7.3388,    7.3405,    7.2466},
+{    6.9160,    7.1146,    7.0783,    6.8557,    7.2536,    6.8398,    6.9750,    6.9351,    6.9897,    7.1926},
+{    6.9130,    6.9378,    7.1825,    6.8129,    7.0557,    6.9294,    7.0338,    6.8021,    6.9302,    7.1482},
+{    6.9551,    7.0340,    7.2476,    6.9120,    7.1611,    6.8932,    7.0166,    7.0213,    6.9995,    7.2274},
+{    6.8624,    7.0619,    6.9373,    6.7848,    6.9446,    6.9109,    7.0221,    7.1802,    7.0209,    7.0642},
+          },
+        new double[][,]
+          {            
+            new double[,]
+              {
+{         0,    0.1316,    0.2186,    0.2629,    0.0051,    0.0049,    0.0062,    0.2224,    0.0023,    0.0882},
+{    0.1316,         0,    0.6685,    0.7466,    0.1864,    0.1865,    0.0799,    0.6593,    0.0990,    0.0037},
+{    0.2186,    0.6685,         0,    0.0017,    0.1606,    0.1602,    0.2987,    0.0000,    0.2745,    0.5725},
+{    0.2629,    0.7466,    0.0017,         0,    0.1985,    0.2030,    0.3422,    0.0019,    0.3043,    0.6432},
+{    0.0051,    0.1864,    0.1606,    0.1985,         0,    0.0000,    0.0216,    0.1524,    0.0141,    0.1366},
+{    0.0049,    0.1865,    0.1602,    0.2030,    0.0000,         0,    0.0215,    0.1535,    0.0134,    0.1384},
+{    0.0062,    0.0799,    0.2987,    0.3422,    0.0216,    0.0215,         0,    0.3081,    0.0010,    0.0478},
+{    0.2224,    0.6593,    0.0000,    0.0019,    0.1524,    0.1535,    0.3081,         0,    0.2715,    0.5480},
+{    0.0023,    0.0990,    0.2745,    0.3043,    0.0141,    0.0134,    0.0010,    0.2715,         0,    0.0628},
+{    0.0882,    0.0037,    0.5725,    0.6432,    0.1366,    0.1384,    0.0478,    0.5480,    0.0628,         0},
+              },
+            new double[,]
+              {
+{         0,    0.1486,    0.2692,    0.1339,    0.4441,    0.3941,    0.0255,    0.0295,    0.0413,    0.4886},
+{    0.1486,         0,    0.0201,    0.0002,    0.0823,    0.0641,    0.2940,    0.2925,    0.0334,    0.1076},
+{    0.2692,    0.0201,         0,    0.0246,    0.0200,    0.0113,    0.4590,    0.4923,    0.1073,    0.0302},
+{    0.1339,    0.0002,    0.0246,         0,    0.0910,    0.0723,    0.2689,    0.2847,    0.0270,    0.1096},
+{    0.4441,    0.0823,    0.0200,    0.0910,         0,    0.0012,    0.6588,    0.6726,    0.2177,    0.0013},
+{    0.3941,    0.0641,    0.0113,    0.0723,    0.0012,         0,    0.6140,    0.6177,    0.1829,    0.0050},
+{    0.0255,    0.2940,    0.4590,    0.2689,    0.6588,    0.6140,         0,    0.0002,    0.1310,    0.7259},
+{    0.0295,    0.2925,    0.4923,    0.2847,    0.6726,    0.6177,    0.0002,         0,    0.1398,    0.7073},
+{    0.0413,    0.0334,    0.1073,    0.0270,    0.2177,    0.1829,    0.1310,    0.1398,         0,    0.2506},
+{    0.4886,    0.1076,    0.0302,    0.1096,    0.0013,    0.0050,    0.7259,    0.7073,    0.2506,         0},
+              },
+            new double[,]
+              {
+{         0,    0.0137,    0.3191,    0.0455,    0.0349,    0.0041,    0.1669,    0.2356,    0.1673,    0.0440},
+{    0.0137,         0,    0.2012,    0.1063,    0.0922,    0.0327,    0.0843,    0.1306,    0.0841,    0.0094},
+{    0.3191,    0.2012,         0,    0.6073,    0.5736,    0.3987,    0.0277,    0.0077,    0.0290,    0.1253},
+{    0.0455,    0.1063,    0.6073,         0,    0.0007,    0.0231,    0.3728,    0.4790,    0.3672,    0.1755},
+{    0.0349,    0.0922,    0.5736,    0.0007,         0,    0.0156,    0.3385,    0.4318,    0.3474,    0.1576},
+{    0.0041,    0.0327,    0.3987,    0.0231,    0.0156,         0,    0.2156,    0.2880,    0.2133,    0.0769},
+{    0.1669,    0.0843,    0.0277,    0.3728,    0.3385,    0.2156,         0,    0.0066,    0.0000,    0.0366},
+{    0.2356,    0.1306,    0.0077,    0.4790,    0.4318,    0.2880,    0.0066,         0,    0.0068,    0.0694},
+{    0.1673,    0.0841,    0.0290,    0.3672,    0.3474,    0.2133,    0.0000,    0.0068,         0,    0.0365},
+{    0.0440,    0.0094,    0.1253,    0.1755,    0.1576,    0.0769,    0.0366,    0.0694,    0.0365,         0},
+              },
+            new double[,]
+              {
+{         0,    0.0612,    0.0363,    0.1211,    0.0186,    0.1239,    0.0310,    0.0059,    0.0534,    0.2043},
+{    0.0612,         0,    0.1847,    0.0107,    0.1461,    0.0123,    0.0050,    0.0989,    0.2270,    0.0458},
+{    0.0363,    0.1847,         0,    0.2888,    0.0032,    0.2952,    0.1324,    0.0137,    0.0012,    0.4024},
+{    0.1211,    0.0107,    0.2888,         0,    0.2388,    0.0000,    0.0299,    0.1780,    0.3210,    0.0108},
+{    0.0186,    0.1461,    0.0032,    0.2388,         0,    0.2484,    0.0933,    0.0034,    0.0083,    0.3475},
+{    0.1239,    0.0123,    0.2952,    0.0000,    0.2484,         0,    0.0320,    0.1778,    0.3315,    0.0102},
+{    0.0310,    0.0050,    0.1324,    0.0299,    0.0933,    0.0320,         0,    0.0644,    0.1650,    0.0770},
+{    0.0059,    0.0989,    0.0137,    0.1780,    0.0034,    0.1778,    0.0644,         0,    0.0230,    0.2610},
+{    0.0534,    0.2270,    0.0012,    0.3210,    0.0083,    0.3315,    0.1650,    0.0230,         0,    0.4611},
+{    0.2043,    0.0458,    0.4024,    0.0108,    0.3475,    0.0102,    0.0770,    0.2610,    0.4611,         0},
+              },
+            new double[,]
+              {
+{         0,    0.0230,    0.1818,    0.2301,    0.2212,    0.3641,    0.1723,    0.1672,    0.0123,    0.0171},
+{    0.0230,         0,    0.0767,    0.1076,    0.1036,    0.2126,    0.0688,    0.0640,    0.0017,    0.0004},
+{    0.1818,    0.0767,         0,    0.0024,    0.0015,    0.0305,    0.0004,    0.0006,    0.1055,    0.0867},
+{    0.2301,    0.1076,    0.0024,         0,    0.0001,    0.0164,    0.0049,    0.0052,    0.1338,    0.1192},
+{    0.2212,    0.1036,    0.0015,    0.0001,         0,    0.0194,    0.0035,    0.0037,    0.1306,    0.1147},
+{    0.3641,    0.2126,    0.0305,    0.0164,    0.0194,         0,    0.0382,    0.0380,    0.2434,    0.2311},
+{    0.1723,    0.0688,    0.0004,    0.0049,    0.0035,    0.0382,         0,    0.0000,    0.0930,    0.0764},
+{    0.1672,    0.0640,    0.0006,    0.0052,    0.0037,    0.0380,    0.0000,         0,    0.0907,    0.0710},
+{    0.0123,    0.0017,    0.1055,    0.1338,    0.1306,    0.2434,    0.0930,    0.0907,         0,    0.0005},
+{    0.0171,    0.0004,    0.0867,    0.1192,    0.1147,    0.2311,    0.0764,    0.0710,    0.0005,         0},
+              },
+            new double[,]
+              {
+{   14.7781,   14.3950,   13.7138,   13.9618,   14.0352,   13.8578,   14.3707,   14.1018,   14.4990,   13.9100},
+{   14.3950,   14.7781,   13.5767,   13.7715,   14.1542,   14.2607,   14.2360,   13.4735,   14.3260,   14.6102},
+{   13.7138,   13.5767,   14.7781,   13.8217,   13.9982,   13.8525,   13.8286,   14.2545,   14.2511,   13.5045},
+{   13.9618,   13.7715,   13.8217,   14.7781,   14.2390,   14.4598,   13.7206,   13.7960,   13.5743,   13.6778},
+{   14.0352,   14.1542,   13.9982,   14.2390,   14.7781,   14.4908,   13.6154,   13.4528,   14.0413,   13.9995},
+{   13.8578,   14.2607,   13.8525,   14.4598,   14.4908,   14.7781,   13.8254,   13.4407,   13.7576,   14.3090},
+{   14.3707,   14.2360,   13.8286,   13.7206,   13.6154,   13.8254,   14.7781,   14.3938,   14.3828,   13.7798},
+{   14.1018,   13.4735,   14.2545,   13.7960,   13.4528,   13.4407,   14.3938,   14.7781,   14.2363,   13.0113},
+{   14.4990,   14.3260,   14.2511,   13.5743,   14.0413,   13.7576,   14.3828,   14.2363,   14.7781,   13.9425},
+{   13.9100,   14.6102,   13.5045,   13.6778,   13.9995,   14.3090,   13.7798,   13.0113,   13.9425,   14.7781},
+              },
+          }
+      );
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CovSumTest() {
+      var cov = new CovarianceSum();
+      cov.Terms.Add(new CovarianceSquaredExponentialIso());
+      cov.Terms.Add(new CovarianceLinear());
+      TestCovarianceFunction(cov, 0,
+        new double[,]
+          {
+{    1.4860,    1.5376,    2.7382,    1.4230,    2.7566,    2.0148,    1.9261,    1.8493,    1.6069,    2.2035},
+{    1.0861,    1.4463,    1.8848,    1.0165,    2.1818,    1.6036,    1.4240,    1.4965,    1.2360,    1.6526},
+{    2.1463,    2.2472,    2.8854,    1.9188,    2.4455,    2.9283,    2.5049,    1.8107,    2.0157,    2.4059},
+{    1.6245,    1.2089,    2.2059,    1.4630,    1.5864,    1.9084,    2.0859,    1.7825,    1.7332,    1.8574},
+{    1.6804,    1.1454,    2.0031,    1.6914,    1.2725,    1.4029,    1.6810,    1.6888,    1.6437,    1.7665},
+{    1.4052,    1.2437,    1.5900,    1.2941,    1.2438,    1.4882,    1.6072,    1.4970,    1.4811,    1.5135},
+{    1.4913,    1.9972,    2.3544,    1.3689,    2.9275,    2.1163,    1.8043,    1.4564,    1.5325,    2.1139},
+{    2.0334,    2.2303,    3.0928,    1.8439,    3.1092,    2.8169,    2.4555,    1.7771,    1.9760,    2.5789},
+{    1.7324,    2.0254,    2.8414,    1.6386,    2.9270,    2.3807,    2.0510,    1.7808,    1.7231,    2.3527},
+{    0.9196,    1.4220,    1.6254,    0.7696,    1.8861,    1.7579,    1.4076,    1.4163,    1.1077,    1.3988},
+          },
+        new double[][,]
+          {      
+            new double[,]
+              {
+{         0,    0.3197,    0.6358,    0.5518,    0.5207,    0.5909,    0.3361,    0.4897,    0.2447,    0.5720},
+{    0.3197,         0,    0.6697,    0.6190,    0.4635,    0.4047,    0.4190,    0.6899,    0.3650,    0.1552},
+{    0.6358,    0.6697,         0,    0.6031,    0.5367,    0.5927,    0.6008,    0.4084,    0.4103,    0.6843},
+{    0.5518,    0.6190,    0.6031,         0,    0.4173,    0.2740,    0.6339,    0.6114,    0.6702,    0.6455},
+{    0.5207,    0.4635,    0.5367,    0.4173,         0,    0.2510,    0.6610,    0.6935,    0.5180,    0.5362},
+{    0.5909,    0.4047,    0.5927,    0.2740,    0.2510,         0,    0.6019,    0.6955,    0.6232,    0.3756},
+{    0.3361,    0.4190,    0.6008,    0.6339,    0.6610,    0.6019,         0,    0.3205,    0.3279,    0.6165},
+{    0.4897,    0.6899,    0.4084,    0.6114,    0.6935,    0.6955,    0.3205,         0,    0.4189,    0.7344},
+{    0.2447,    0.3650,    0.4103,    0.6702,    0.5180,    0.6232,    0.3279,    0.4189,         0,    0.5595},
+{    0.5720,    0.1552,    0.6843,    0.6455,    0.5362,    0.3756,    0.6165,    0.7344,    0.5595,         0},
+              },
+            new double[,]
+              {
+{    2.0000,    1.6472,    1.1513,    1.3142,    1.3662,    1.2437,    1.6267,    1.4148,    1.7372,    1.2786},
+{    1.6472,    2.0000,    1.0689,    1.1876,    1.4541,    1.5370,    1.5174,    1.0103,    1.5898,    1.8381},
+{    1.1513,    1.0689,    2.0000,    1.2199,    1.3398,    1.2402,    1.2244,    1.5320,    1.5293,    1.0276},
+{    1.3142,    1.1876,    1.2199,    2.0000,    1.5197,    1.7027,    1.1555,    1.2033,    1.0675,    1.1291},
+{    1.3662,    1.4541,    1.3398,    1.5197,    2.0000,    1.7299,    1.0916,    0.9989,    1.3706,    1.3407},
+{    1.2437,    1.5370,    1.2402,    1.7027,    1.7299,    2.0000,    1.2223,    0.9923,    1.1787,    1.5758},
+{    1.6267,    1.5174,    1.2244,    1.1555,    1.0916,    1.2223,    2.0000,    1.6461,    1.6369,    1.1928},
+{    1.4148,    1.0103,    1.5320,    1.2033,    0.9989,    0.9923,    1.6461,    2.0000,    1.5176,    0.7806},
+{    1.7372,    1.5898,    1.5293,    1.0675,    1.3706,    1.1787,    1.6369,    1.5176,    2.0000,    1.3009},
+{    1.2786,    1.8381,    1.0276,    1.1291,    1.3407,    1.5758,    1.1928,    0.7806,    1.3009,    2.0000},
+              },
+          }
+      );
+      cov = new CovarianceSum();
+      cov.Terms.Add(new CovarianceSquaredExponentialIso());
+      cov.Terms.Add(new CovarianceLinear());
+      TestCovarianceFunction(cov, 1,
+        new double[,]
+          {
+{    7.7681,    7.7957,    9.1175,    7.6951,    9.1148,    8.2406,    8.2532,    8.2057,    7.9303,    8.5765},
+{    7.3926,    7.7881,    8.2289,    7.3128,    8.5326,    7.8570,    7.7535,    7.8698,    7.5822,    8.0224},
+{    8.5096,    8.6045,    9.2632,    8.2546,    8.7198,    9.2945,    8.8817,    8.1368,    8.3741,    8.7816},
+{    7.9886,    7.4745,    8.5704,    7.8096,    7.7719,    8.1964,    8.4695,    8.1648,    8.1138,    8.2315},
+{    8.0632,    7.4371,    8.3651,    8.0757,    7.4147,    7.6080,    8.0477,    8.0750,    8.0288,    8.1469},
+{    7.7869,    7.5959,    7.9316,    7.6696,    7.4564,    7.7793,    7.9884,    7.8850,    7.8692,    7.8941},
+{    7.7940,    8.3557,    8.7048,    7.6497,    9.3089,    8.3910,    8.1263,    7.7655,    7.8589,    8.4871},
+{    8.3350,    8.5404,    9.4643,    8.1079,    9.4540,    9.1241,    8.7945,    8.0367,    8.2835,    8.9443},
+{    8.0481,    8.3644,    9.2221,    7.9399,    9.2948,    8.6753,    8.3852,    8.1164,    8.0524,    8.7309},
+{    7.2030,    7.7683,    7.9353,    7.0220,    8.1984,    8.0588,    7.7433,    7.7874,    7.4431,    7.7457},
+          },
+        new double[][,]
+          {            
+            new double[,]
+              {
+{         0,    0.3781,    1.0250,    0.7934,    0.7239,    0.8910,    0.4018,    0.6606,    0.2764,    0.8421},
+{    0.3781,         0,    1.1512,    0.9715,    0.6106,    0.5082,    0.5320,    1.2453,    0.4451,    0.1669},
+{    1.0250,    1.1512,         0,    0.9248,    0.7589,    0.8960,    0.9183,    0.5143,    0.5175,    1.2171},
+{    0.7934,    0.9715,    0.9248,         0,    0.5292,    0.3149,    1.0188,    0.9487,    1.1534,    1.0583},
+{    0.7239,    0.6106,    0.7589,    0.5292,         0,    0.2845,    1.1157,    1.2640,    0.7182,    0.7577},
+{    0.8910,    0.5082,    0.8960,    0.3149,    0.2845,         0,    0.9214,    1.2749,    0.9845,    0.4616},
+{    0.4018,    0.5320,    0.9183,    1.0188,    1.1157,    0.9214,         0,    0.3793,    0.3899,    0.9638},
+{    0.6606,    1.2453,    0.5143,    0.9487,    1.2640,    1.2749,    0.3793,         0,    0.5318,    1.6567},
+{    0.2764,    0.4451,    0.5175,    1.1534,    0.7182,    0.9845,    0.3899,    0.5318,         0,    0.8116},
+{    0.8421,    0.1669,    1.2171,    1.0583,    0.7577,    0.4616,    0.9638,    1.6567,    0.8116,         0},
+              },
+            new double[,]
+              {
+{   14.7781,   14.3950,   13.7138,   13.9618,   14.0352,   13.8578,   14.3707,   14.1018,   14.4990,   13.9100},
+{   14.3950,   14.7781,   13.5767,   13.7715,   14.1542,   14.2607,   14.2360,   13.4735,   14.3260,   14.6102},
+{   13.7138,   13.5767,   14.7781,   13.8217,   13.9982,   13.8525,   13.8286,   14.2545,   14.2511,   13.5045},
+{   13.9618,   13.7715,   13.8217,   14.7781,   14.2390,   14.4598,   13.7206,   13.7960,   13.5743,   13.6778},
+{   14.0352,   14.1542,   13.9982,   14.2390,   14.7781,   14.4908,   13.6154,   13.4528,   14.0413,   13.9995},
+{   13.8578,   14.2607,   13.8525,   14.4598,   14.4908,   14.7781,   13.8254,   13.4407,   13.7576,   14.3090},
+{   14.3707,   14.2360,   13.8286,   13.7206,   13.6154,   13.8254,   14.7781,   14.3938,   14.3828,   13.7798},
+{   14.1018,   13.4735,   14.2545,   13.7960,   13.4528,   13.4407,   14.3938,   14.7781,   14.2363,   13.0113},
+{   14.4990,   14.3260,   14.2511,   13.5743,   14.0413,   13.7576,   14.3828,   14.2363,   14.7781,   13.9425},
+{   13.9100,   14.6102,   13.5045,   13.6778,   13.9995,   14.3090,   13.7798,   13.0113,   13.9425,   14.7781},
+              },
+          }
+      );
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CovScaleTest() {
+      var cov = new CovarianceScale();
+      cov.CovarianceFunctionParameter.Value = new CovarianceSquaredExponentialIso();
+      TestCovarianceFunction(cov, 0,
+        new double[,]
+          {
+{    0.5770,    0.5404,    0.8569,    0.5612,    0.7545,    0.4981,    0.6649,    0.7483,    0.6564,    0.8184},
+{    0.6206,    0.7027,    0.7091,    0.6015,    0.7295,    0.5338,    0.6706,    0.8202,    0.7155,    0.8029},
+{    0.7743,    0.7513,    0.8468,    0.6864,    0.5644,    0.7861,    0.8404,    0.6625,    0.7555,    0.8335},
+{    0.7773,    0.5513,    0.7793,    0.7166,    0.4533,    0.5870,    0.8913,    0.8797,    0.8656,    0.8245},
+{    0.8839,    0.5934,    0.7689,    0.8982,    0.4126,    0.4742,    0.7883,    0.9202,    0.9077,    0.8649},
+{    0.8746,    0.7341,    0.7021,    0.8323,    0.4826,    0.5923,    0.8706,    0.9508,    0.9524,    0.8660},
+{    0.6133,    0.7560,    0.7280,    0.5749,    0.8722,    0.5651,    0.6530,    0.6259,    0.6633,    0.8194},
+{    0.6113,    0.6277,    0.8110,    0.5489,    0.7110,    0.6222,    0.6948,    0.5425,    0.6227,    0.7828},
+{    0.6394,    0.6950,    0.8669,    0.6107,    0.7933,    0.5985,    0.6824,    0.6858,    0.6703,    0.8492},
+{    0.5791,    0.7156,    0.6274,    0.5324,    0.6323,    0.6100,    0.6863,    0.8091,    0.6855,    0.7173},
+          },
+        new double[][,]
+          {      
+            new double[,]
+              {
+{    2.0000,    1.6472,    1.1513,    1.3142,    1.3662,    1.2437,    1.6267,    1.4148,    1.7372,    1.2786},
+{    1.6472,    2.0000,    1.0689,    1.1876,    1.4541,    1.5370,    1.5174,    1.0103,    1.5898,    1.8381},
+{    1.1513,    1.0689,    2.0000,    1.2199,    1.3398,    1.2402,    1.2244,    1.5320,    1.5293,    1.0276},
+{    1.3142,    1.1876,    1.2199,    2.0000,    1.5197,    1.7027,    1.1555,    1.2033,    1.0675,    1.1291},
+{    1.3662,    1.4541,    1.3398,    1.5197,    2.0000,    1.7299,    1.0916,    0.9989,    1.3706,    1.3407},
+{    1.2437,    1.5370,    1.2402,    1.7027,    1.7299,    2.0000,    1.2223,    0.9923,    1.1787,    1.5758},
+{    1.6267,    1.5174,    1.2244,    1.1555,    1.0916,    1.2223,    2.0000,    1.6461,    1.6369,    1.1928},
+{    1.4148,    1.0103,    1.5320,    1.2033,    0.9989,    0.9923,    1.6461,    2.0000,    1.5176,    0.7806},
+{    1.7372,    1.5898,    1.5293,    1.0675,    1.3706,    1.1787,    1.6369,    1.5176,    2.0000,    1.3009},
+{    1.2786,    1.8381,    1.0276,    1.1291,    1.3407,    1.5758,    1.1928,    0.7806,    1.3009,    2.0000},
+              },
+            new double[,]
+              {
+{         0,    0.3197,    0.6358,    0.5518,    0.5207,    0.5909,    0.3361,    0.4897,    0.2447,    0.5720},
+{    0.3197,         0,    0.6697,    0.6190,    0.4635,    0.4047,    0.4190,    0.6899,    0.3650,    0.1552},
+{    0.6358,    0.6697,         0,    0.6031,    0.5367,    0.5927,    0.6008,    0.4084,    0.4103,    0.6843},
+{    0.5518,    0.6190,    0.6031,         0,    0.4173,    0.2740,    0.6339,    0.6114,    0.6702,    0.6455},
+{    0.5207,    0.4635,    0.5367,    0.4173,         0,    0.2510,    0.6610,    0.6935,    0.5180,    0.5362},
+{    0.5909,    0.4047,    0.5927,    0.2740,    0.2510,         0,    0.6019,    0.6955,    0.6232,    0.3756},
+{    0.3361,    0.4190,    0.6008,    0.6339,    0.6610,    0.6019,         0,    0.3205,    0.3279,    0.6165},
+{    0.4897,    0.6899,    0.4084,    0.6114,    0.6935,    0.6955,    0.3205,         0,    0.4189,    0.7344},
+{    0.2447,    0.3650,    0.4103,    0.6702,    0.5180,    0.6232,    0.3279,    0.4189,         0,    0.5595},
+{    0.5720,    0.1552,    0.6843,    0.6455,    0.5362,    0.3756,    0.6165,    0.7344,    0.5595,         0},
+              },
+            new double[,]
+              {
+{    2.0000,    1.6472,    1.1513,    1.3142,    1.3662,    1.2437,    1.6267,    1.4148,    1.7372,    1.2786},
+{    1.6472,    2.0000,    1.0689,    1.1876,    1.4541,    1.5370,    1.5174,    1.0103,    1.5898,    1.8381},
+{    1.1513,    1.0689,    2.0000,    1.2199,    1.3398,    1.2402,    1.2244,    1.5320,    1.5293,    1.0276},
+{    1.3142,    1.1876,    1.2199,    2.0000,    1.5197,    1.7027,    1.1555,    1.2033,    1.0675,    1.1291},
+{    1.3662,    1.4541,    1.3398,    1.5197,    2.0000,    1.7299,    1.0916,    0.9989,    1.3706,    1.3407},
+{    1.2437,    1.5370,    1.2402,    1.7027,    1.7299,    2.0000,    1.2223,    0.9923,    1.1787,    1.5758},
+{    1.6267,    1.5174,    1.2244,    1.1555,    1.0916,    1.2223,    2.0000,    1.6461,    1.6369,    1.1928},
+{    1.4148,    1.0103,    1.5320,    1.2033,    0.9989,    0.9923,    1.6461,    2.0000,    1.5176,    0.7806},
+{    1.7372,    1.5898,    1.5293,    1.0675,    1.3706,    1.1787,    1.6369,    1.5176,    2.0000,    1.3009},
+{    1.2786,    1.8381,    1.0276,    1.1291,    1.3407,    1.5758,    1.1928,    0.7806,    1.3009,    2.0000},
+              },
+          }
+      );
+      cov = new CovarianceScale();
+      cov.CovarianceFunctionParameter.Value = new CovarianceSquaredExponentialIso();
+      TestCovarianceFunction(cov, 1,
+        new double[,]
+          {
+{   50.6828,   50.2342,   53.4685,   50.4920,   52.5559,   49.6832,   51.6641,   52.4976,   51.5740,   53.1373},
+{   51.1850,   52.0523,   52.1160,   50.9689,   52.3171,   50.1516,   51.7239,   53.1529,   52.1794,   52.9998},
+{   52.7403,   52.5260,   53.3832,   51.8877,   50.5317,   52.8481,   53.3281,   51.6395,   52.5652,   53.2686},
+{   52.7683,   50.3705,   52.7860,   52.1901,   49.0546,   50.8004,   53.7544,   53.6589,   53.5423,   53.1907},
+{   53.6941,   50.8746,   52.6909,   53.8103,   48.4337,   49.3535,   52.8689,   53.9867,   53.8874,   53.5365},
+{   53.6171,   52.3616,   52.0459,   53.2586,   49.4713,   50.8619,   53.5837,   54.2264,   54.2390,   53.5454},
+{   51.1026,   52.5698,   52.3019,   50.6571,   53.5972,   50.5394,   51.5383,   51.2437,   51.6476,   53.1463},
+{   51.0802,   51.2635,   53.0723,   50.3407,   52.1347,   51.2021,   51.9731,   50.2612,   51.2082,   52.8185},
+{   51.3920,   51.9750,   53.5529,   51.0735,   52.9133,   50.9343,   51.8460,   51.8810,   51.7204,   53.4037},
+{   50.7067,   52.1810,   51.2605,   50.1330,   51.3144,   51.0653,   51.8868,   53.0548,   51.8777,   52.1974},
+          },
+        new double[][,]
+          {            
+            new double[,]
+              {
+{  109.1963,  106.3653,  101.3323,  103.1642,  103.7069,  102.3962,  106.1856,  104.1987,  107.1342,  102.7815},
+{  106.3653,  109.1963,  100.3190,  101.7587,  104.5858,  105.3734,  105.1910,   99.5562,  105.8559,  107.9559},
+{  101.3323,  100.3190,  109.1963,  102.1292,  103.4337,  102.3572,  102.1802,  105.3271,  105.3022,   99.7852},
+{  103.1642,  101.7587,  102.1292,  109.1963,  105.2127,  106.8440,  101.3820,  101.9396,  100.3013,  101.0662},
+{  103.7069,  104.5858,  103.4337,  105.2127,  109.1963,  107.0730,  100.6050,   99.4038,  103.7518,  103.4431},
+{  102.3962,  105.3734,  102.3572,  106.8440,  107.0730,  109.1963,  102.1564,   99.3144,  101.6555,  105.7297},
+{  106.1856,  105.1910,  102.1802,  101.3820,  100.6050,  102.1564,  109.1963,  106.3564,  106.2756,  101.8199},
+{  104.1987,   99.5562,  105.3271,  101.9396,   99.4038,   99.3144,  106.3564,  109.1963,  105.1926,   96.1411},
+{  107.1342,  105.8559,  105.3022,  100.3013,  103.7518,  101.6555,  106.2756,  105.1926,  109.1963,  103.0217},
+{  102.7815,  107.9559,   99.7852,  101.0662,  103.4431,  105.7297,  101.8199,   96.1411,  103.0217,  109.1963},
+              },
+            new double[,]
+              {
+{         0,    2.7940,    7.5738,    5.8624,    5.3491,    6.5838,    2.9688,    4.8814,    2.0425,    6.2226},
+{    2.7940,         0,    8.5062,    7.1784,    4.5117,    3.7552,    3.9310,    9.2014,    3.2888,    1.2334},
+{    7.5738,    8.5062,         0,    6.8334,    5.6078,    6.6203,    6.7857,    3.7999,    3.8238,    8.9934},
+{    5.8624,    7.1784,    6.8334,         0,    3.9101,    2.3268,    7.5278,    7.0100,    8.5225,    7.8196},
+{    5.3491,    4.5117,    5.6078,    3.9101,         0,    2.1025,    8.2441,    9.3397,    5.3065,    5.5989},
+{    6.5838,    3.7552,    6.6203,    2.3268,    2.1025,         0,    6.8080,    9.4206,    7.2742,    3.4110},
+{    2.9688,    3.9310,    6.7857,    7.5278,    8.2441,    6.8080,         0,    2.8026,    2.8812,    7.1214},
+{    4.8814,    9.2014,    3.7999,    7.0100,    9.3397,    9.4206,    2.8026,         0,    3.9294,   12.2417},
+{    2.0425,    3.2888,    3.8238,    8.5225,    5.3065,    7.2742,    2.8812,    3.9294,         0,    5.9966},
+{    6.2226,    1.2334,    8.9934,    7.8196,    5.5989,    3.4110,    7.1214,   12.2417,    5.9966,         0},
+              },
+            new double[,]
+              {
+{  109.1963,  106.3653,  101.3323,  103.1642,  103.7069,  102.3962,  106.1856,  104.1987,  107.1342,  102.7815},
+{  106.3653,  109.1963,  100.3190,  101.7587,  104.5858,  105.3734,  105.1910,   99.5562,  105.8559,  107.9559},
+{  101.3323,  100.3190,  109.1963,  102.1292,  103.4337,  102.3572,  102.1802,  105.3271,  105.3022,   99.7852},
+{  103.1642,  101.7587,  102.1292,  109.1963,  105.2127,  106.8440,  101.3820,  101.9396,  100.3013,  101.0662},
+{  103.7069,  104.5858,  103.4337,  105.2127,  109.1963,  107.0730,  100.6050,   99.4038,  103.7518,  103.4431},
+{  102.3962,  105.3734,  102.3572,  106.8440,  107.0730,  109.1963,  102.1564,   99.3144,  101.6555,  105.7297},
+{  106.1856,  105.1910,  102.1802,  101.3820,  100.6050,  102.1564,  109.1963,  106.3564,  106.2756,  101.8199},
+{  104.1987,   99.5562,  105.3271,  101.9396,   99.4038,   99.3144,  106.3564,  109.1963,  105.1926,   96.1411},
+{  107.1342,  105.8559,  105.3022,  100.3013,  103.7518,  101.6555,  106.2756,  105.1926,  109.1963,  103.0217},
+{  102.7815,  107.9559,   99.7852,  101.0662,  103.4431,  105.7297,  101.8199,   96.1411,  103.0217,  109.1963},
+              },
+          }
+      );
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CovProdTest() {
+      var cov = new CovarianceProduct();
+      cov.Factors.Add(new CovarianceSquaredExponentialIso());
+      cov.Factors.Add(new CovarianceLinear());
+      TestCovarianceFunction(cov, 0,
+        new double[,]
+          {
+{    0.5245,    0.5389,    1.6120,    0.4836,    1.5106,    0.7554,    0.8386,    0.8239,    0.6239,    1.1336},
+{    0.2889,    0.5225,    0.8337,    0.2496,    1.0595,    0.5710,    0.5052,    0.5547,    0.3724,    0.6822},
+{    1.0623,    1.1239,    1.7263,    0.8459,    1.0618,    1.6839,    1.3988,    0.7607,    0.9521,    1.3106},
+{    0.6585,    0.3625,    1.1117,    0.5349,    0.5137,    0.7756,    1.0648,    0.7942,    0.7510,    0.8516},
+{    0.7040,    0.3275,    0.9490,    0.7125,    0.3548,    0.4404,    0.7037,    0.7073,    0.6680,    0.7798},
+{    0.4641,    0.3741,    0.6234,    0.3844,    0.3673,    0.5306,    0.6413,    0.5193,    0.5036,    0.5608},
+{    0.5385,    0.9383,    1.1840,    0.4565,    1.7927,    0.8766,    0.7518,    0.5198,    0.5765,    1.0608},
+{    0.8694,    1.0060,    1.8506,    0.7108,    1.7052,    1.3654,    1.2234,    0.6698,    0.8427,    1.4060},
+{    0.6989,    0.9246,    1.7118,    0.6277,    1.6927,    1.0667,    0.9339,    0.7510,    0.7057,    1.2768},
+{    0.1972,    0.5055,    0.6262,    0.1263,    0.7928,    0.7002,    0.4950,    0.4913,    0.2894,    0.4889},
+
+          },
+        new double[][,]
+          {      
+            new double[,]
+              {
+{         0,    0.4127,    1.0287,    0.6741,    0.5630,    0.4325,    0.5722,    1.0336,    0.4752,    0.5617},
+{    0.4127,         0,    0.6880,    0.3738,    0.2907,    0.1730,    0.4679,    0.8675,    0.4878,    0.1286},
+{    1.0287,    0.6880,         0,    0.7937,    0.6606,    0.5323,    0.9538,    0.9634,    0.8138,    0.6381},
+{    0.6741,    0.3738,    0.7937,         0,    0.3455,    0.1881,    0.6345,    0.9714,    0.7339,    0.3214},
+{    0.5630,    0.2907,    0.6606,    0.3455,         0,    0.1313,    0.5056,    0.8485,    0.6038,    0.2630},
+{    0.4325,    0.1730,    0.5323,    0.1881,    0.1313,         0,    0.3748,    0.6687,    0.4734,    0.1491},
+{    0.5722,    0.4679,    0.9538,    0.6345,    0.5056,    0.3748,         0,    0.6955,    0.5871,    0.5059},
+{    1.0336,    0.8675,    0.9634,    0.9714,    0.8485,    0.6687,    0.6955,         0,    0.9475,    0.6932},
+{    0.4752,    0.4878,    0.8138,    0.7339,    0.6038,    0.4734,    0.5871,    0.9475,         0,    0.6046},
+{    0.5617,    0.1286,    0.6381,    0.3214,    0.2630,    0.1491,    0.5059,    0.6932,    0.6046,         0},
+              },
+            new double[,]
+              {
+{    4.0023,    2.1261,    1.8626,    1.6054,    1.4771,    0.9102,    2.7697,    2.9858,    3.3730,    1.2556},
+{    2.1261,    1.9372,    1.0981,    0.7172,    0.9121,    0.6569,    1.6947,    1.2703,    2.1250,    1.5231},
+{    1.8626,    1.0981,    4.6784,    1.6055,    1.6490,    1.1138,    1.9438,    3.6140,    3.0330,    0.9581},
+{    1.6054,    0.7172,    1.6055,    2.5635,    1.2584,    1.1688,    1.1565,    1.9117,    1.1689,    0.5622},
+{    1.4771,    0.9121,    1.6490,    1.2584,    1.8469,    0.9049,    0.8350,    1.2221,    1.5977,    0.6577},
+{    0.9102,    0.6569,    1.1138,    1.1688,    0.9049,    0.8258,    0.7611,    0.9541,    0.8954,    0.6253},
+{    2.7697,    1.6947,    1.9438,    1.1565,    0.8350,    0.7611,    3.6346,    3.5720,    2.9305,    0.9789},
+{    2.9858,    1.2703,    3.6140,    1.9117,    1.2221,    0.9541,    3.5720,    5.8240,    3.4327,    0.7368},
+{    3.3730,    2.1250,    3.0330,    1.1689,    1.5977,    0.8954,    2.9305,    3.4327,    4.3277,    1.4057},
+{    1.2556,    1.5231,    0.9581,    0.5622,    0.6577,    0.6253,    0.9789,    0.7368,    1.4057,    1.7151},
+              },
+          }
+      );
+      cov = new CovarianceProduct();
+      cov.Factors.Add(new CovarianceSquaredExponentialIso());
+      cov.Factors.Add(new CovarianceLinear());
+      TestCovarianceFunction(cov, 1,
+        new double[,]
+          {
+{    6.2342,    6.7795,   13.6134,    5.8887,   14.2405,   10.1987,    8.8183,    7.8217,    6.6344,    9.9609},
+{    3.2242,    5.2384,    8.2928,    2.8624,   10.2826,    7.2613,    5.2743,    4.8651,    3.6758,    6.0948},
+{    9.7926,   10.6338,   14.7280,    8.6537,   12.8640,   15.3218,   12.0130,    8.0240,    8.9653,   11.3359},
+{    6.0497,    4.4825,   10.1916,    5.2725,    7.5223,    9.0848,    8.6907,    6.5563,    6.2868,    7.4352},
+{    5.7877,    3.8005,    8.8010,    5.7766,    5.6360,    6.2037,    6.3872,    5.6164,    5.3671,    6.5321},
+{    3.8501,    3.6110,    6.2543,    3.3286,    5.0963,    6.1672,    5.3421,    4.0085,    3.8812,    4.6925},
+{    6.0719,    8.8301,   11.5124,    5.4433,   14.9080,   10.6099,    8.0304,    5.7589,    6.0753,    9.3107},
+{    9.8306,   11.1183,   16.3892,    8.8231,   16.9213,   15.2084,   12.3844,    8.3980,    9.3789,   12.8390},
+{    7.6019,    9.3580,   14.3105,    7.1044,   15.2800,   12.2846,    9.6031,    7.6887,    7.3699,   10.8667},
+{    2.3372,    4.9884,    6.9233,    1.6100,    8.7070,    7.9328,    5.0646,    4.3597,    2.9643,    4.8145},
+          },
+        new double[][,]
+          {            
+            new double[,]
+              {
+{         0,    0.4881,    1.6583,    0.9692,    0.7827,    0.6522,    0.6841,    1.3942,    0.5367,    0.8270},
+{    0.4881,         0,    1.1827,    0.5867,    0.3830,    0.2172,    0.5941,    1.5658,    0.5949,    0.1383},
+{    1.6583,    1.1827,         0,    1.2171,    0.9340,    0.8047,    1.4579,    1.2131,    1.0263,    1.1349},
+{    0.9692,    0.5867,    1.2171,         0,    0.4382,    0.2161,    1.0197,    1.5073,    1.2629,    0.5270},
+{    0.7827,    0.3830,    0.9340,    0.4382,         0,    0.1488,    0.8534,    1.5465,    0.8372,    0.3717},
+{    0.6522,    0.2172,    0.8047,    0.2161,    0.1488,         0,    0.5737,    1.2259,    0.7478,    0.1832},
+{    0.6841,    0.5941,    1.4579,    1.0197,    0.8534,    0.5737,         0,    0.8230,    0.6981,    0.7909},
+{    1.3942,    1.5658,    1.2131,    1.5073,    1.5465,    1.2259,    0.8230,         0,    1.2028,    1.5638},
+{    0.5367,    0.5949,    1.0263,    1.2629,    0.8372,    0.7478,    0.6981,    1.2028,         0,    0.8770},
+{    0.8270,    0.1383,    1.1349,    0.5270,    0.3717,    0.1832,    0.7909,    1.5638,    0.8770,         0},
+              },
+            new double[,]
+              {
+{   29.5729,   18.5805,   22.1876,   17.0550,   15.1746,   10.1428,   24.4678,   29.7604,   28.1516,   13.6594},
+{   18.5805,   14.3139,   13.9483,    8.3170,    8.8785,    6.0953,   15.8990,   16.9410,   19.1490,   12.1067},
+{   22.1876,   13.9483,   34.5691,   18.1905,   17.2281,   12.4415,   21.9535,   33.6266,   28.2630,   12.5918},
+{   17.0550,    8.3170,   18.1905,   18.9418,   11.7900,    9.9253,   13.7325,   21.9184,   14.8634,    6.8107},
+{   15.1746,    8.8785,   17.2281,   11.7900,   13.6471,    7.5799,   10.4142,   16.4592,   16.3685,    6.8676},
+{   10.1428,    6.0953,   12.4415,    9.9253,    7.5799,    6.1018,    8.6086,   12.9238,   10.4507,    5.6783},
+{   24.4678,   15.8990,   21.9535,   13.7325,   10.4142,    8.6086,   26.8561,   31.2335,   25.7489,   11.3079},
+{   29.7604,   16.9410,   33.6266,   21.9184,   16.4592,   12.9238,   31.2335,   43.0336,   32.2012,   12.2815},
+{   28.1516,   19.1490,   28.2630,   14.8634,   16.3685,   10.4507,   25.7489,   32.2012,   31.9778,   15.0663},
+{   13.6594,   12.1067,   12.5918,    6.8107,    6.8676,    5.6783,   11.3079,   12.2815,   15.0663,   12.6728},
+              },
+          }
+      , 5e-3);
+    }
+
+
+    private void TestCovarianceFunction(ICovarianceFunction cf, double hypValue, double[,] expectedCov, double[][,] expectedGradients, double delta = 1E-3) {
+      var x = GetData();
+      var xt = GetDataTest();
+
+      int nHyp = cf.GetNumberOfParameters(x.GetLength(1));
+      var hyp = Enumerable.Repeat(hypValue, nHyp).ToArray();
+
+      int rows0 = x.GetLength(0);
+      int rows1 = xt.GetLength(0);
+      var actualCov = new double[rows0, rows1];
+      var covFunction = cf.GetParameterizedCovarianceFunction(hyp, Enumerable.Range(0, x.GetLength(1)).ToArray());
+      for (int i = 0; i < rows0; i++)
+        for (int j = 0; j < rows1; j++)
+          actualCov[i, j] = covFunction.CrossCovariance(x, xt, i, j);
+
+      AssertEqual(expectedCov, actualCov, delta);
+
+      for (int i = 0; i < rows0; i++)
+        for (int j = 0; j < rows1; j++) {
+          var g = covFunction.CovarianceGradient(x, i, j).ToArray();
+          for (int k = 0; k < nHyp; k++)
+            Assert.AreEqual(expectedGradients[k][i, j], g[k], delta);
+        }
+    }
+
+
+    private void TestMeanFunction(IMeanFunction mf, double hypValue, double[] expectedMean, double[][] expectedGradients) {
+      var x = GetData();
+      var xt = GetDataTest();
+
+      int nHyp = mf.GetNumberOfParameters(x.GetLength(1));
+      var hyp = Enumerable.Repeat(hypValue, nHyp).ToArray();
+      var meanFunction = mf.GetParameterizedMeanFunction(hyp, Enumerable.Range(0, x.GetLength(1)).ToArray());
+
+      var m = Enumerable.Range(0, xt.GetLength(0)).Select(i => meanFunction.Mean(xt, i)).ToArray();
+
+      AssertEqual(expectedMean, m);
+
+      for (int k = 0; k < nHyp; k++) {
+        var g = Enumerable.Range(0, xt.GetLength(0)).Select(i => meanFunction.Gradient(x, i, k)).ToArray();
+        AssertEqual(expectedGradients[k], g);
+      }
+    }
+
+
+    private void AssertEqual(double[] expected, double[] actual) {
+      Assert.AreEqual(expected.Length, actual.Length);
+      for (int i = 0; i < expected.Length; i++)
+        Assert.AreEqual(expected[i], actual[i], 1E-3);
+    }
+    private void AssertEqual(double[,] expected, double[,] actual, double delta = 5e-3) {
+      Assert.AreEqual(expected.Length, actual.Length);
+      for (int i = 0; i < expected.GetLength(0); i++)
+        for (int j = 0; j < expected.GetLength(1); j++)
+          Assert.AreEqual(expected[i, j], actual[i, j], delta);
+    }
+
+    private double[,] GetData() {
+      return new double[,]
+               {
+                 {0.4173, 0.7803, 0.2348, 0.5470, 0.9294},
+                 {0.0497, 0.3897, 0.3532, 0.2963, 0.7757},
+                 {0.9027, 0.2417, 0.8212, 0.7447, 0.4868},
+                 {0.9448, 0.4039, 0.0154, 0.1890, 0.4359},
+                 {0.4909, 0.0965, 0.0430, 0.6868, 0.4468},
+                 {0.4893, 0.1320, 0.1690, 0.1835, 0.3063},
+                 {0.3377, 0.9421, 0.6491, 0.3685, 0.5085},
+                 {0.9001, 0.9561, 0.7317, 0.6256, 0.5108},
+                 {0.3692, 0.5752, 0.6477, 0.7802, 0.8176},
+                 {0.1112, 0.0598, 0.4509, 0.0811, 0.7948}
+               };
+    }
+
+    private double[,] GetDataTest() {
+      return new double[,]
+               {
+                 {0.6443, 0.2077, 0.3111, 0.5949, 0.0855},
+                 {0.3786, 0.3012, 0.9234, 0.2622, 0.2625},
+                 {0.8116, 0.4709, 0.4302, 0.6028, 0.8010},
+                 {0.5328, 0.2305, 0.1848, 0.7112, 0.0292},
+                 {0.3507, 0.8443, 0.9049, 0.2217, 0.9289},
+                 {0.9390, 0.1948, 0.9797, 0.1174, 0.7303},
+                 {0.8759, 0.2259, 0.4389, 0.2967, 0.4886},
+                 {0.5502, 0.1707, 0.1111, 0.3188, 0.5785},
+                 {0.6225, 0.2277, 0.2581, 0.4242, 0.2373},
+                 {0.5870, 0.4357, 0.4087, 0.5079, 0.4588}
+               };
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GaussianProcessModelTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GaussianProcessModelTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GaussianProcessModelTest.cs	(revision 16038)
@@ -0,0 +1,97 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Algorithms.DataAnalysis.Tests {
+  [TestClass]
+
+  // reference values calculated with Rasmussen's GPML MATLAB package
+  public class GaussianProcessModelTest {
+    [TestMethod]
+    [TestCategory("General")]
+    [TestProperty("Time", "medium")]
+    public void GaussianProcessModelOutputTest() {
+      var provider = new RegressionCSVInstanceProvider();
+      var problemData = provider.ImportData(@"Test Resources\co2.txt");
+
+      var targetVariable = "interpolated";
+      var allowedInputVariables = new string[] { "decimal date" };
+      var rows = Enumerable.Range(0, 401);
+
+      var meanFunction = new MeanConst();
+      var covarianceFunction = new CovarianceSum();
+      covarianceFunction.Terms.Add(new CovarianceSquaredExponentialIso());
+      var prod = new CovarianceProduct();
+      prod.Factors.Add(new CovarianceSquaredExponentialIso());
+      prod.Factors.Add(new CovariancePeriodic());
+      covarianceFunction.Terms.Add(prod);
+
+      {
+        var hyp = new double[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+        var model = new GaussianProcessModel(problemData.Dataset, targetVariable, allowedInputVariables, rows, hyp,
+                                             meanFunction,
+                                             covarianceFunction);
+        Assert.AreEqual(4.3170e+004, model.NegativeLogLikelihood, 1);
+
+        var dHyp = model.HyperparameterGradients;
+        Assert.AreEqual(-248.7932, dHyp[0], 1E-2);
+        var dHypCovExpected = new double[] { -0.5550e4, -5.5533e4, -0.2511e4, -2.7625e4, -1.3033e4, 0.0289e4, -2.7625e4 };
+        AssertEqual(dHypCovExpected, dHyp.Skip(1).Take(7).ToArray(), 1);
+        Assert.AreEqual(-2.0171e+003, dHyp.Last(), 1);
+
+
+        var predTrain = model.GetEstimatedValues(problemData.Dataset, new int[] { 0, 400 }).ToArray();
+        Assert.AreEqual(310.5930, predTrain[0], 1e-3);
+        Assert.AreEqual(347.9993, predTrain[1], 1e-3);
+
+        var predTrainVar = model.GetEstimatedVariances(problemData.Dataset, problemData.TrainingIndices).ToArray();
+      }
+
+      {
+        var hyp = new double[] { 0.029973094285941, 0.455535210579926, 3.438647883940457, 1.464114485889487, 3.001788584487478, 3.815289323309630, 4.374914122810222, 3.001788584487478, 0.716427415979145 };
+        var model = new GaussianProcessModel(problemData.Dataset, targetVariable, allowedInputVariables, rows, hyp,
+                                             meanFunction,
+                                             covarianceFunction);
+        Assert.AreEqual(872.8448, model.NegativeLogLikelihood, 1e-3);
+
+        var dHyp = model.HyperparameterGradients;
+        Assert.AreEqual(-0.0046, dHyp[0], 1e-3);
+        var dHypCovExpected = new double[] { 0.2652, -0.2386, 0.1706, -0.1744, 0.0000, 0.0000, -0.1744 };
+        AssertEqual(dHypCovExpected, dHyp.Skip(1).Take(7).ToArray(), 1e-3);
+        Assert.AreEqual(0.8621, dHyp.Last(), 1e-3);
+
+        var predTrain = model.GetEstimatedValues(problemData.Dataset, new int[] { 0, 400 }).ToArray();
+        Assert.AreEqual(315.3692, predTrain[0], 1e-3);
+        Assert.AreEqual(356.6076, predTrain[1], 1e-3);
+      }
+    }
+
+
+    private void AssertEqual(double[] expected, double[] actual, double delta = 1E-3) {
+      Assert.AreEqual(expected.Length, actual.Length);
+      for (int i = 0; i < expected.Length; i++)
+        Assert.AreEqual(expected[i], actual[i], delta);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GaussianProcessRegressionTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GaussianProcessRegressionTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GaussianProcessRegressionTest.cs	(revision 16038)
@@ -0,0 +1,78 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Algorithms.DataAnalysis.Tests {
+  [TestClass]
+  public class GaussianProcessRegressionTest {
+    public GaussianProcessRegressionTest() { }
+
+    private TestContext testContextInstance;
+    public TestContext TestContext {
+      get { return testContextInstance; }
+      set { testContextInstance = value; }
+    }
+
+    private Exception ex;
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "long")]
+    public void GaussianProcessRegressionPerformanceTest() {
+      ex = null;
+
+      var alg = new GaussianProcessRegression();
+      alg.Engine = new HeuristicLab.SequentialEngine.SequentialEngine();
+      alg.SetSeedRandomly = false;
+
+      alg.Problem = new RegressionProblem();
+      var provider = new RegressionCSVInstanceProvider();
+      var problemData = (RegressionProblemData)provider.ImportData(@"Test Resources\co2.txt");
+      problemData.TargetVariableParameter.ActualValue = problemData.TargetVariableParameter.ValidValues.First(x => x.Value == "interpolated");
+      problemData.InputVariables.SetItemCheckedState(problemData.InputVariables.First(x => x.Value == "year"), false);
+      problemData.InputVariables.SetItemCheckedState(problemData.InputVariables.First(x => x.Value == "month"), false);
+      problemData.InputVariables.SetItemCheckedState(problemData.InputVariables.First(x => x.Value == "average"), false);
+      problemData.InputVariables.SetItemCheckedState(problemData.InputVariables.First(x => x.Value == "interpolated"), false);
+      problemData.InputVariables.SetItemCheckedState(problemData.InputVariables.First(x => x.Value == "trend"), false);
+      problemData.InputVariables.SetItemCheckedState(problemData.InputVariables.First(x => x.Value == "#days"), false);
+
+      alg.Problem.ProblemDataParameter.Value = problemData;
+
+      alg.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(cv_ExceptionOccurred);
+
+      alg.Prepare();
+      alg.Start();
+      if (ex != null) throw ex;
+
+      TestContext.WriteLine("Runtime: {0}", alg.ExecutionTime.ToString());
+    }
+
+    private void cv_ExceptionOccurred(object sender, EventArgs<Exception> e) {
+      ex = e.Value;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GradientBoostingTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GradientBoostingTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/GradientBoostingTest.cs	(revision 16038)
@@ -0,0 +1,324 @@
+﻿using System;
+using System.Collections;
+using System.IO;
+using System.Linq;
+using HeuristicLab.Data;
+using HeuristicLab.Problems.DataAnalysis;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Algorithms.DataAnalysis {
+  [TestClass()]
+  public class GradientBoostingTest {
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void DecisionTreeTest() {
+      {
+        var xy = new double[,]
+        {
+          {-1, 20, 0},
+          {-1, 20, 0},
+          { 1, 10, 0},
+          { 1, 10, 0},
+        };
+        var allVariables = new string[] { "y", "x1", "x2" };
+
+        // x1 <= 15 -> 1 
+        // x1 >  15 -> -1
+        BuildTree(xy, allVariables, 10);
+      }
+
+
+      {
+        var xy = new double[,]
+        {
+          {-1, 20,  1},
+          {-1, 20, -1},
+          { 1, 10, -1},
+          { 1, 10, 1},
+        };
+        var allVariables = new string[] { "y", "x1", "x2" };
+
+        // ignore irrelevant variables
+        // x1 <= 15 -> 1 
+        // x1 >  15 -> -1
+        BuildTree(xy, allVariables, 10);
+      }
+
+      {
+        // split must be by x1 first 
+        var xy = new double[,]
+        {
+          {-2, 20,  1},
+          {-1, 20, -1},
+          { 1, 10, -1},
+          { 2, 10, 1},
+        };
+
+        var allVariables = new string[] { "y", "x1", "x2" };
+
+        // x1 <= 15 AND x2 <= 0 -> 1 
+        // x1 <= 15 AND x2 >  0 -> 2 
+        // x1 >  15 AND x2 <= 0 -> -1
+        // x1 >  15 AND x2 >  0 -> -2
+        BuildTree(xy, allVariables, 10);
+      }
+
+      {
+        // averaging ys
+        var xy = new double[,]
+        {
+          {-2.5, 20,  1},
+          {-1.5, 20,  1},
+          {-1.5, 20, -1},
+          {-0.5, 20, -1},
+          {0.5, 10, -1},
+          {1.5, 10, -1},
+          {1.5, 10, 1},
+          {2.5, 10, 1},
+        };
+
+        var allVariables = new string[] { "y", "x1", "x2" };
+
+        // x1 <= 15 AND x2 <= 0 -> 1 
+        // x1 <= 15 AND x2 >  0 -> 2 
+        // x1 >  15 AND x2 <= 0 -> -1
+        // x1 >  15 AND x2 >  0 -> -2
+        BuildTree(xy, allVariables, 10);
+      }
+
+
+      {
+        // diagonal split (no split possible)
+        var xy = new double[,]
+        {
+          { 1, 1, 1},
+          {-1, 1, 2},
+          {-1, 2, 1},
+          { 1, 2, 2},
+        };
+
+        var allVariables = new string[] { "y", "x1", "x2" };
+
+        // split cannot be found
+        // -> 0.0
+        BuildTree(xy, allVariables, 3);
+      }
+      {
+        // almost diagonal split 
+        var xy = new double[,]
+        {
+          { 1, 1, 1},
+          {-1, 1, 2},
+          {-1, 2, 1},
+          { 1.0001, 2, 2},
+        };
+
+        var allVariables = new string[] { "y", "x1", "x2" };
+        // (two possible solutions)
+        // x2 <= 1.5 -> 0
+        // x2 >  1.5 -> 0 (not quite)
+        BuildTree(xy, allVariables, 3);
+
+        // x1 <= 1.5 AND x2 <= 1.5 -> 1 
+        // x1 <= 1.5 AND x2 >  1.5 -> -1 
+        // x1 >  1.5 AND x2 <= 1.5 -> -1
+        // x1 >  1.5 AND x2 >  1.5 -> 1 (not quite)
+        BuildTree(xy, allVariables, 7);
+      }
+      {
+        // unbalanced split
+        var xy = new double[,]
+        {
+          {-1, 1, 1},
+          {-1, 1, 2},
+          {0.9, 2, 1},
+          {1.1, 2, 2},
+        };
+
+        var allVariables = new string[] { "y", "x1", "x2" };
+        // x1 <= 1.5 -> -1.0 
+        // x1 >  1.5 AND x2 <= 1.5 -> 0.9
+        // x1 >  1.5 AND x2 >  1.5 -> 1.1
+        BuildTree(xy, allVariables, 10);
+      }
+
+      {
+        // unbalanced split
+        var xy = new double[,]
+        {
+          {-1, 1, 1},
+          {-1, 1, 2},
+          {-1, 2, 1},
+          { 3, 2, 2},
+        };
+
+        var allVariables = new string[] { "y", "x1", "x2" };
+        // (two possible solutions)
+        // x2 <= 1.5 -> -1.0 
+        // x2 >  1.5 AND x1 <= 1.5 -> -1.0
+        // x2 >  1.5 AND x1 >  1.5 ->  3.0
+        BuildTree(xy, allVariables, 10);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void TestDecisionTreePartialDependence() {
+      var provider = new HeuristicLab.Problems.Instances.DataAnalysis.RegressionRealWorldInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name.Contains("Tower"));
+      var regProblem = new RegressionProblem();
+      regProblem.Load(provider.LoadData(instance));
+      var problemData = regProblem.ProblemData;
+      var state = GradientBoostedTreesAlgorithmStatic.CreateGbmState(problemData, new SquaredErrorLoss(), randSeed: 31415, maxSize: 10, r: 0.5, m: 1, nu: 0.02);
+      for (int i = 0; i < 1000; i++)
+        GradientBoostedTreesAlgorithmStatic.MakeStep(state);
+
+
+      var mostImportantVar = state.GetVariableRelevance().OrderByDescending(kvp => kvp.Value).First();
+      Console.WriteLine("var: {0} relevance: {1}", mostImportantVar.Key, mostImportantVar.Value);
+      var model = ((IGradientBoostedTreesModel)state.GetModel());
+      var treeM = model.Models.Skip(1).First();
+      Console.WriteLine(treeM.ToString());
+      Console.WriteLine();
+
+      var mostImportantVarValues = problemData.Dataset.GetDoubleValues(mostImportantVar.Key).OrderBy(x => x).ToArray();
+      var ds = new ModifiableDataset(new string[] { mostImportantVar.Key },
+        new IList[] { mostImportantVarValues.ToList<double>() });
+
+      var estValues = model.GetEstimatedValues(ds, Enumerable.Range(0, mostImportantVarValues.Length)).ToArray();
+
+      for (int i = 0; i < mostImportantVarValues.Length; i += 10) {
+        Console.WriteLine("{0,-5:N3} {1,-5:N3}", mostImportantVarValues[i], estValues[i]);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void TestDecisionTreePersistence() {
+      var provider = new HeuristicLab.Problems.Instances.DataAnalysis.RegressionRealWorldInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name.Contains("Tower"));
+      var regProblem = new RegressionProblem();
+      regProblem.Load(provider.LoadData(instance));
+      var problemData = regProblem.ProblemData;
+      var state = GradientBoostedTreesAlgorithmStatic.CreateGbmState(problemData, new SquaredErrorLoss(), randSeed: 31415, maxSize: 100, r: 0.5, m: 1, nu: 1);
+      GradientBoostedTreesAlgorithmStatic.MakeStep(state);
+
+      var model = ((IGradientBoostedTreesModel)state.GetModel());
+      var treeM = model.Models.Skip(1).First();
+      var origStr = treeM.ToString();
+      using (var memStream = new MemoryStream()) {
+        Persistence.Default.Xml.XmlGenerator.Serialize(treeM, memStream);
+        var buf = memStream.GetBuffer();
+        using (var restoreStream = new MemoryStream(buf)) {
+          var restoredTree = Persistence.Default.Xml.XmlParser.Deserialize(restoreStream);
+          var restoredStr = restoredTree.ToString();
+          Assert.AreEqual(origStr, restoredStr);
+        }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "long")]
+    public void GradientBoostingTestTowerSquaredError() {
+      var gbt = new GradientBoostedTreesAlgorithm();
+      var provider = new HeuristicLab.Problems.Instances.DataAnalysis.RegressionRealWorldInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name.Contains("Tower"));
+      var regProblem = new RegressionProblem();
+      regProblem.Load(provider.LoadData(instance));
+
+      #region Algorithm Configuration
+      gbt.Problem = regProblem;
+      gbt.Seed = 0;
+      gbt.SetSeedRandomly = false;
+      gbt.Iterations = 5000;
+      gbt.MaxSize = 20;
+      gbt.CreateSolution = false;
+      #endregion
+
+      gbt.Start();
+
+      Console.WriteLine(gbt.ExecutionTime);
+      Assert.AreEqual(267.68704241153921, ((DoubleValue)gbt.Results["Loss (train)"].Value).Value, 1E-6);
+      Assert.AreEqual(393.84704062205469, ((DoubleValue)gbt.Results["Loss (test)"].Value).Value, 1E-6);
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "long")]
+    public void GradientBoostingTestTowerAbsoluteError() {
+      var gbt = new GradientBoostedTreesAlgorithm();
+      var provider = new HeuristicLab.Problems.Instances.DataAnalysis.RegressionRealWorldInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name.Contains("Tower"));
+      var regProblem = new RegressionProblem();
+      regProblem.Load(provider.LoadData(instance));
+
+      #region Algorithm Configuration
+      gbt.Problem = regProblem;
+      gbt.Seed = 0;
+      gbt.SetSeedRandomly = false;
+      gbt.Iterations = 1000;
+      gbt.MaxSize = 20;
+      gbt.Nu = 0.02;
+      gbt.LossFunctionParameter.Value = gbt.LossFunctionParameter.ValidValues.First(l => l.ToString().Contains("Absolute"));
+      gbt.CreateSolution = false;
+      #endregion
+
+      gbt.Start();
+
+      Console.WriteLine(gbt.ExecutionTime);
+      Assert.AreEqual(10.551385044666661, ((DoubleValue)gbt.Results["Loss (train)"].Value).Value, 1E-6);
+      Assert.AreEqual(12.918001745581172, ((DoubleValue)gbt.Results["Loss (test)"].Value).Value, 1E-6);
+    }
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "long")]
+    public void GradientBoostingTestTowerRelativeError() {
+      var gbt = new GradientBoostedTreesAlgorithm();
+      var provider = new HeuristicLab.Problems.Instances.DataAnalysis.RegressionRealWorldInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name.Contains("Tower"));
+      var regProblem = new RegressionProblem();
+      regProblem.Load(provider.LoadData(instance));
+
+      #region Algorithm Configuration
+      gbt.Problem = regProblem;
+      gbt.Seed = 0;
+      gbt.SetSeedRandomly = false;
+      gbt.Iterations = 3000;
+      gbt.MaxSize = 20;
+      gbt.Nu = 0.005;
+      gbt.LossFunctionParameter.Value = gbt.LossFunctionParameter.ValidValues.First(l => l.ToString().Contains("Relative"));
+      gbt.CreateSolution = false;
+      #endregion
+
+      gbt.Start();
+
+      Console.WriteLine(gbt.ExecutionTime);
+      Assert.AreEqual(0.061954221604374943, ((DoubleValue)gbt.Results["Loss (train)"].Value).Value, 1E-6);
+      Assert.AreEqual(0.06316303473499961, ((DoubleValue)gbt.Results["Loss (test)"].Value).Value, 1E-6);
+    }
+
+    #region helper
+    private void BuildTree(double[,] xy, string[] allVariables, int maxSize) {
+      int nRows = xy.GetLength(0);
+      var allowedInputs = allVariables.Skip(1);
+      var dataset = new Dataset(allVariables, xy);
+      var problemData = new RegressionProblemData(dataset, allowedInputs, allVariables.First());
+      problemData.TrainingPartition.Start = 0;
+      problemData.TrainingPartition.End = nRows;
+      problemData.TestPartition.Start = nRows;
+      problemData.TestPartition.End = nRows;
+      var solution = GradientBoostedTreesAlgorithmStatic.TrainGbm(problemData, new SquaredErrorLoss(), maxSize, nu: 1, r: 1, m: 1, maxIterations: 1, randSeed: 31415);
+      var model = solution.Model;
+      var treeM = model.Models.Skip(1).First() as RegressionTreeModel;
+
+      Console.WriteLine(treeM.ToString());
+      Console.WriteLine();
+    }
+    #endregion
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/NcaAlgorithmTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/NcaAlgorithmTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/NcaAlgorithmTest.cs	(revision 16038)
@@ -0,0 +1,53 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Algorithms.DataAnalysis.Tests {
+  [TestClass]
+  public class NcaAlgorithmTest {
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "medium")]
+    public void RunNcaAlgorithmTest() {
+      var uci = new UCIInstanceProvider();
+      var nca = new NcaAlgorithm() {
+        Iterations = 15,
+        SetSeedRandomly = false,
+        Seed = 620668657
+      };
+      var iris = uci.LoadData(uci.GetDataDescriptors().Single(x => x.Name.StartsWith("Iris")));
+      ((ClassificationProblem)nca.Problem).Load(iris);
+      nca.Start();
+      Assert.AreEqual(Core.ExecutionState.Stopped, nca.ExecutionState);
+      IResult qualityResult;
+      Assert.IsTrue(nca.Results.TryGetValue("Quality", out qualityResult));
+      var quality = qualityResult.Value as DoubleValue;
+      Assert.IsNotNull(quality);
+      Assert.IsTrue(quality.Value < -98);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/SupportVectorMachineTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/SupportVectorMachineTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.DataAnalysis-3.4/SupportVectorMachineTest.cs	(revision 16038)
@@ -0,0 +1,101 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Algorithms.DataAnalysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Problems.DataAnalysis;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class SupportVectorMachineTest {
+    public SupportVectorMachineTest() { }
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    private Exception ex;
+
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "medium")]
+    public void SupportVectorMachinePerformanceTest() {
+      ex = null;
+
+      var cv = new CrossValidation();
+      cv.Algorithm = new SupportVectorRegression();
+      var rand = new HeuristicLab.Random.MersenneTwister();
+      double[,] data = GenerateData(1000, rand);
+      List<string> variables = new List<string>() { "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "y" };
+      Dataset ds = new Dataset(variables, data);
+      cv.Problem.ProblemDataParameter.ActualValue = new RegressionProblemData(ds, variables.Take(10), variables.Last());
+      cv.Folds.Value = 5;
+      cv.SamplesStart.Value = 0;
+      cv.SamplesEnd.Value = 999;
+
+      cv.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(cv_ExceptionOccurred);
+
+      cv.Prepare();
+      cv.Start();
+      if (ex != null) throw ex;
+
+      TestContext.WriteLine("Runtime: {0}", cv.ExecutionTime.ToString());
+
+    }
+
+    // poly-10: y = x1 x2 + x3 x4 + x5 x6 + x1 x7 x9 + x3 x6 x10
+    private double[,] GenerateData(int n, IRandom random) {
+      double[,] data = new double[n, 11];
+      for (int i = 0; i < n; i++) {
+        for (int c = 0; c < 10; c++) {
+          data[i, c] = random.NextDouble() * 2.0 - 1.0;
+        }
+        data[i, 10] =
+          data[i, 0] * data[i, 1] +
+          data[i, 2] * data[i, 3] +
+          data[i, 4] * data[i, 5] +
+          data[i, 0] * data[i, 6] * data[i, 8] +
+          data[i, 2] * data[i, 5] * data[i, 9];
+      }
+      return data;
+    }
+
+    private void cv_ExceptionOccurred(object sender, EventArgs<Exception> e) {
+      ex = e.Value;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/EnumerableBoolEqualityComparerTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/EnumerableBoolEqualityComparerTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/EnumerableBoolEqualityComparerTest.cs	(revision 16038)
@@ -0,0 +1,141 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Algorithms.ParameterlessPopulationPyramid;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace ParameterlessPopulationPyramid.Test {
+  [TestClass]
+  public class EnumerableBoolEqualityComparerTest {
+    private static EnumerableBoolEqualityComparer compare = new EnumerableBoolEqualityComparer();
+    MersenneTwister rand = new MersenneTwister();
+
+    private void randFill(IList<bool> data, MersenneTwister rand) {
+      for (int i = 0; i < data.Count; i++) {
+        data[i] = rand.Next(2) == 1;
+      }
+    }
+    [TestMethod]
+    [TestProperty("Time", "short")]
+    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
+    public void EnumerableBoolEqualsTest() {
+      bool[] array = new bool[10];
+      // Referencially equal
+      randFill(array, rand);
+      Assert.IsTrue(compare.Equals(array, array));
+
+      // Clones equal
+      var another = (bool[])array.Clone();
+      Assert.IsTrue(compare.Equals(array, another));
+
+      // Flipping a bit makes unequal
+      int flip = rand.Next(array.Length - 1);
+      another[flip] = !another[flip];
+      Assert.IsFalse(compare.Equals(array, another));
+
+      // Equality doesn't depend on container
+      List<bool> list = new List<bool>(array);
+      Assert.IsTrue(compare.Equals(list, array));
+      Assert.IsFalse(compare.Equals(list, another));
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "short")]
+    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
+    public void EnumerableBoolHashCollisionTest() {
+      int collisions = 0;
+
+      bool[] array = new bool[100];
+      randFill(array, rand);
+      int original = compare.GetHashCode(array);
+
+      bool[] another = (bool[])array.Clone();
+      // Perform random walk around string checking for hash collisions
+      for (int i = 0; i < array.Length * array.Length; i++) {
+        int flip = rand.Next(array.Length - 1);
+        another[flip] = !another[flip];
+        int hash = compare.GetHashCode(another);
+        if (hash == original) {
+          // unequal sequences with same hash value
+          if (!array.SequenceEqual(another)) collisions++;
+        } else {
+          // unequal hash should mean unequal sequence
+          Assert.IsFalse(array.SequenceEqual(another));
+        }
+        // Keep the walk from getting too far afield
+        if (i % array.Length == 0) {
+          another = (bool[])array.Clone();
+        }
+      }
+      // A very lose upper bound, this only fails if you get more than sqrt(N) collisions per attempt 
+      Assert.IsTrue(collisions < array.Length);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "short")]
+    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
+    public void EnumerableBoolHashSetTest() {
+      HashSet<bool[]> set = new HashSet<bool[]>(compare);
+      bool[] array = new bool[40];
+      randFill(array, rand);
+      set.Add(array);
+
+      // Same object not added
+      set.Add(array);
+      Assert.AreEqual(1, set.Count);
+
+      // Copy of object not allowed
+      var another = (bool[])array.Clone();
+      set.Add(another);
+      Assert.AreEqual(1, set.Count);
+
+      // Flipping a bit makes unequal
+      int flip = rand.Next(array.Length - 1);
+      another[flip] = !another[flip];
+      set.Add(another);
+      Assert.AreEqual(2, set.Count);
+
+      // Add random solutions which are 1 bit different from array to the set
+      set.Clear();
+      List<bool[]> added = new List<bool[]>();
+      for (int i = 0; i < array.Length * 10; i++) {
+        // flip a bit at random
+        another = (bool[])array.Clone();
+        flip = rand.Next(array.Length - 1);
+        another[flip] = !another[flip];
+        bool unique = set.Add(another);
+        bool actuallyUnique = true;
+        foreach (var previous in added) {
+          if (previous.SequenceEqual(another)) {
+            actuallyUnique = false;
+          }
+        }
+        Assert.AreEqual(actuallyUnique, unique);
+        if (actuallyUnique) {
+          added.Add(another);
+        }
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/LinkageTreeTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/LinkageTreeTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/LinkageTreeTest.cs	(revision 16038)
@@ -0,0 +1,110 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using HeuristicLab.Algorithms.ParameterlessPopulationPyramid;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace ParameterlessPopulationPyramid.Test {
+  [TestClass]
+  public class LinkageTreeTest {
+    private static int Length = 9;
+    private static BinaryVector[] solutions = {
+    new BinaryVector(new [] { true, true, false, false, false, false, false, false, false }), // 110000000
+    new BinaryVector(new [] { false, false, true, true, false, false, false, false, false }), // 001100000
+    new BinaryVector(new [] { false, false, false, false, true, true, false, false, false }), // 000011000
+    new BinaryVector(new [] { false, false, false, false, false, false, true, true, true }),  // 000000111
+    new BinaryVector(new [] { true, true, true, true, false, false, false, false, false }),   // 111100000
+    new BinaryVector(new [] { true, true, true, true, true, true, true, true, true }),        // 111111111
+    };
+
+    // These are the clusters that should be built using "solutions" and the seed 123
+    private static int[][] correctClusters = {
+      new int[] { 4, 5 },
+      new int[] { 2, 3 },
+      new int[] { 0, 1 },
+      new int[] { 6, 7, 8 },
+      new int[] { 0, 1, 2, 3},
+      new int[] { 4, 5, 6, 7, 8},
+    };
+
+    [TestMethod]
+    [TestProperty("Time", "short")]
+    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
+    public void LinkageTreeTestAdd() {
+      MersenneTwister rand = new MersenneTwister();
+      LinkageTree tree = new LinkageTree(Length, rand);
+      tree.Add(solutions[0]);
+      tree.Add(solutions[1]);
+      PrivateObject hidden = new PrivateObject(tree);
+      int[][][] result = (int[][][])hidden.GetField("occurances");
+      Assert.AreEqual(1, result[1][0][0]); // Positions 0 and 1 had value 00 exactly once
+      Assert.AreEqual(2, result[Length - 1][Length - 2][0]); // Positions 0 and 1 had value 00 exactly once
+      Assert.AreEqual(0, result[Length - 1][Length - 2][1]); // Positions 7 and 8 never had value 10
+      Assert.AreEqual(1, result[1][0][3]); // Positions 0 and 1 had value 11 exactly once
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "short")]
+    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
+    public void LinkageTreeTestEntropyDistance() {
+      MersenneTwister rand = new MersenneTwister();
+      LinkageTree tree = new LinkageTree(Length, rand);
+      PrivateObject hidden = new PrivateObject(tree);
+      // No information should result in a distance of 0
+      Assert.AreEqual((double)0, hidden.Invoke("EntropyDistance", new object[] { 0, 1 }));
+      foreach (var solution in solutions) {
+        tree.Add(solution);
+      }
+      // Check that 0 and 1 are closer than 0 and 2
+      var linked = (double)hidden.Invoke("EntropyDistance", new object[] { 0, 1 });
+      var unlinked = (double)hidden.Invoke("EntropyDistance", new object[] { 0, 2 });
+      Assert.IsTrue(linked < unlinked);
+
+      // Reversing the arguments should not change the result
+      var forward = hidden.Invoke("EntropyDistance", new object[] { Length - 1, Length - 2 });
+      var backward = hidden.Invoke("EntropyDistance", new object[] { Length - 2, Length - 1 });
+      Assert.AreEqual(forward, backward);
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "short")]
+    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
+    public void LinkageTreeTestRebuild() {
+      // The seed matters as equal sized clusters can appear in any order
+      MersenneTwister rand = new MersenneTwister(123);
+      LinkageTree tree = new LinkageTree(Length, rand);
+      foreach (var solution in solutions) {
+        tree.Add(solution);
+      }
+
+      // Check if the clusters created contain the expected variables.
+      var found = tree.Clusters.ToArray();
+      Assert.AreEqual(correctClusters.Length, found.Length);
+      for (int i = 0; i < found.Length; i++) {
+        found[i].Sort();
+        Assert.IsTrue(found[i].SequenceEqual(correctClusters[i]), string.Format("Failed On Cluster {0}", i));
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/ParameterlessPopulationPyramidTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/ParameterlessPopulationPyramidTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/ParameterlessPopulationPyramidTest.cs	(revision 16038)
@@ -0,0 +1,100 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Threading;
+using HeuristicLab.Common;
+using HeuristicLab.Problems.Binary;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace ParameterlessPopulationPyramid.Test {
+  [TestClass]
+  public class ParameterlessPopulationPyramidTest {
+
+    // Utility function that sets up and executes the run, then asserts the results
+    private PrivateObject DoRun(BinaryProblem problem, int maximumEvaluations, int seed, double bestQuality, int foundOn) {
+      var solver = new HeuristicLab.Algorithms.ParameterlessPopulationPyramid.ParameterlessPopulationPyramid();
+      solver.Problem = problem;
+      solver.MaximumEvaluations = maximumEvaluations;
+      solver.Seed = seed;
+      solver.SetSeedRandomly = false;
+      PrivateObject hidden = new PrivateObject(solver);
+      try {
+        var ct = new CancellationToken();
+        hidden.Invoke("Initialize", ct);
+        hidden.Invoke("Run", ct);
+      } catch (OperationCanceledException) {
+        // Ignore
+      }
+
+      Assert.AreEqual(maximumEvaluations, hidden.GetProperty("ResultsEvaluations"), "Total Evaluations");
+      double foundQuality = (double)hidden.GetProperty("ResultsBestQuality");
+      Assert.IsTrue(foundQuality.IsAlmost(bestQuality), string.Format("Expected <{0}> Actual <{1}>", bestQuality, foundQuality));
+      Assert.AreEqual(foundOn, hidden.GetProperty("ResultsBestFoundOnEvaluation"), "Found On");
+
+      return hidden;
+    }
+
+    [TestMethod]
+    [TestProperty("Time", "medium")]
+    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
+    public void P3DeceptiveTrap() {
+      var problem = new DeceptiveTrapProblem();
+      problem.Length = 49;
+      problem.TrapSize = 7;
+      DoRun(problem, 100, 123, 0.857142857142857, 50);
+      DoRun(problem, 9876, 123, 0.918367346938776, 981);
+      DoRun(problem, 20000, 987, 1, 19977);
+      problem.Length = 700;
+      DoRun(problem, 100000, 987, 0.941428571428571, 96901);
+    }
+
+    // Unlike DeceptiveTrap, DeceptiveStepTrap likely contains neutral (fitness equal) modifications.
+    [TestMethod]
+    [TestProperty("Time", "medium")]
+    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
+    public void P3DeceptiveStepTrap() {
+      var problem = new DeceptiveStepTrapProblem();
+      problem.Length = 49;
+      problem.TrapSize = 7;
+      problem.StepSize = 2;
+      DoRun(problem, 100, 123, 0.5, 6);
+      DoRun(problem, 9876, 123, 0.785714285714286, 3489);
+      DoRun(problem, 70000, 987, 1, 68292);
+      problem.Length = 700;
+      DoRun(problem, 100000, 987, 0.76, 58711);
+    }
+
+    // Unlike the Trap tests, HIFF uses higher order linkage learning.
+    [TestMethod]
+    [TestProperty("Time", "medium")]
+    [TestCategory("Algorithms.ParameterlessPopulationPyramid")]
+    public void P3HIFF() {
+      var problem = new HIFFProblem();
+      problem.Length = 32;
+      DoRun(problem, 50, 12345, 0.375, 26);
+      DoRun(problem, 1000, 12345, 1, 976);
+      problem.Length = 512;
+      DoRun(problem, 1000, 54321, 0.17361111111111, 440);
+      DoRun(problem, 130000, 54321, 1, 89214);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/BonferroniHolmUnitTests.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/BonferroniHolmUnitTests.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/BonferroniHolmUnitTests.cs	(revision 16038)
@@ -0,0 +1,132 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 HeuristicLab.Analysis.Statistics;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Analysis.Tests {
+  [TestClass]
+  public class BonferroniHolmUnitTest {
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void BonferroniHolmUnitTest1() {
+      /* example taken from 
+       * http://www.mathworks.com/matlabcentral/fileexchange/28303-bonferroni-holm-correction-for-multiple-comparisons
+       * 
+       * p = 0.56, 0.22, 0.001, 0.04, 0.01
+       * a = 0.05
+       * cor_p = 0.560, 0.440, 0.005, 0.120, 0.040
+       * h = 0, 0, 1, 0, 1
+       * 
+       */
+
+      double[] correctedPValues = new double[] { 0.56, 0.44, 0.005, 0.12, 0.04 };
+      double[] pVals = new[] { 0.56, 0.22, 0.001, 0.04, 0.01 };
+      bool[] h = new bool[] { false, false, true, false, true };
+      bool[] decision;
+
+      var result = BonferroniHolm.Calculate(0.05, pVals, out decision);
+
+      for (int i = 0; i < pVals.Length; i++) {
+        Assert.AreEqual(correctedPValues[i], result[i]);
+        Assert.AreEqual(h[i], decision[i]);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void BonferroniHolmUnitTest2() {
+      /* example taken from 
+       * http://en.wikipedia.org/wiki/Holm-Bonferroni_method#Example
+       * 
+       * p = 0.01, 0.04, 0.03,  0.005
+       * a = 0.05
+       * cor_p = 0.03, 0.06, 0.06, 0.02
+       * h = 1, 0, 0, 1
+       * 
+       */
+
+      double[] correctedPValues = new double[] { 0.03, 0.06, 0.06, 0.02 };
+      double[] pVals = new[] { 0.01, 0.04, 0.03, 0.005 };
+      bool[] h = new bool[] { true, false, false, true };
+      bool[] decision;
+
+      var result = BonferroniHolm.Calculate(0.05, pVals, out decision);
+
+      for (int i = 0; i < pVals.Length; i++) {
+        Assert.AreEqual(correctedPValues[i], result[i]);
+        Assert.AreEqual(h[i], decision[i]);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void BonferroniHolmUnitTest3() {
+      // comparison with R's p.adjust(p, "holm") method
+      double[] correctedPValues = new double[] { 0.23262159, 0.05204139 };
+      double[] pVals = new[] { 0.232621592948806, 0.0260206949805373 };
+      bool[] decision;
+
+      var result = BonferroniHolm.Calculate(0.05, pVals, out decision);
+
+      for (int i = 0; i < pVals.Length; i++) {
+        Assert.AreEqual(correctedPValues[i], Math.Round(result[i], 8));
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void BonferroniHolmUnitTest4() {
+      // comparison with R's p.adjust(p, "holm") method
+      double[] correctedPValues = new double[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
+      double[] pVals = new[] { 0.1108139, 0.1241641, 0.2805913, 0.3715633, 0.3967397, 0.6165547, 0.7272018, 0.8774432, 0.9495787, 0.9755199 };
+      bool[] decision;
+
+      var result = BonferroniHolm.Calculate(0.05, pVals, out decision);
+
+      for (int i = 0; i < pVals.Length; i++) {
+        Assert.AreEqual(correctedPValues[i], Math.Round(result[i], 8));
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void BonferroniHolmUnitTest5() {
+      // comparison with R's p.adjust(p, "holm") method
+      double[] correctedPValues = new double[] { 1.389563e-05, 7.293675e-05, 2.330999e-04, 2.330999e-04, 4.370736e-04, 5.539326e-04 };
+      double[] pVals = new[] { 2.315938e-06, 1.458735e-05, 5.827497e-05, 7.166659e-05, 2.185368e-04, 5.539326e-04 };
+      bool[] decision;
+
+      var result = BonferroniHolm.Calculate(0.05, pVals, out decision);
+
+      for (int i = 0; i < pVals.Length; i++) {
+        Assert.AreEqual(Math.Round(correctedPValues[i], 10), Math.Round(result[i], 10));
+      }
+    }
+  }
+}
+
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/ConfidenceIntervalsTests.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/ConfidenceIntervalsTests.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/ConfidenceIntervalsTests.cs	(revision 16038)
@@ -0,0 +1,74 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 HeuristicLab.Analysis.Statistics;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Analysis.Tests {
+  [TestClass]
+  public class ConfidenceIntervalsTests {
+    private readonly double[] x = new double[] { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 1.5, 0.3 };
+    private readonly double[] y = new double[] { -0.4071000,  1.3207543,  0.8364860, -0.6574363,  0.6215807,  
+      1.1562429, -0.7299977, -0.1013315, -1.5221018, -0.9375169, -0.6257027,  1.1698417, -0.9868505,  0.6890087, 
+      -0.1643505, -0.4920212, -0.6958091,  1.8849663,  0.8117723,  0.9806149};
+    private readonly double[] z = new double[] { 45, 55, 67, 45, 68, 79, 98, 87, 84, 82 };
+
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void ConfidenceIntervalsTest1() {
+      var result = z.ConfidenceIntervals(0.98);
+      Assert.AreEqual(54.8, Math.Round(result.Item1, 1));
+      Assert.AreEqual(87.2, Math.Round(result.Item2, 1));
+    }
+
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void ConfidenceIntervalsTest2() {
+      //comparison with R's t.test(..)
+      var result = x.ConfidenceIntervals(0.95);
+      Assert.AreEqual(1.880506, Math.Round(result.Item1, 6));
+      Assert.AreEqual(5.679494, Math.Round(result.Item2, 6));
+    }
+
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void ConfidenceIntervalsTest3() {
+      //comparison with R's t.test(..)
+      var result = y.ConfidenceIntervals(0.1);
+      Assert.AreEqual(0.0802945, Math.Round(result.Item1, 7));
+      Assert.AreEqual(0.1348105, Math.Round(result.Item2, 7));
+    }
+
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void ConfidenceIntervalsTest4() {
+      //comparison with R's t.test(..)
+      var result = y.ConfidenceIntervals(0.99);
+      Assert.AreEqual(-0.5047921, Math.Round(result.Item1, 7));
+      Assert.AreEqual(0.7198970, Math.Round(result.Item2, 7));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/EffectSizeUnitTests.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/EffectSizeUnitTests.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/EffectSizeUnitTests.cs	(revision 16038)
@@ -0,0 +1,69 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 HeuristicLab.Analysis.Statistics;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Analysis.Tests {
+  [TestClass]
+  public class EffectSizeUnitTests {
+    private readonly double[] x = new double[] { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 1.5, 0.3 };
+    private readonly double[] y = new double[] { 1.0, 3.0, 10.0, 4.0, 2.5, 6.0, 7.5, 8.0, 1.5, 0.5 };
+    private readonly double[] z = new double[] { 45.0, 0.3, 12.0, 45.0, 68.0, 79.0, 10.0, 87.0, 84.0, 1.0 };
+
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void CohensdTest1() {
+      //compared to R lsr package/cohenD(..)
+      var result = SampleSizeDetermination.CalculateCohensD(x, y);
+      Assert.AreEqual(0.2074003, Math.Round(result, 7));
+    }
+
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void CohensdTest2() {
+      //compared to R lsr package/cohenD(..)
+      var result = SampleSizeDetermination.CalculateCohensD(x, z);
+      Assert.AreEqual(1.57424, Math.Round(result, 5));
+    }
+
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void HedgesGTest1() {
+      //compared to R effsize package/cohen.d(..,hedges.correction=TRUE)
+      var result = SampleSizeDetermination.CalculateHedgesG(x, y);
+      Assert.AreEqual(0.1986369, Math.Round(result, 7));
+    }
+
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void HedgesGTest2() {
+      //compared to R effsize package/cohen.d(..,hedges.correction=TRUE)
+      var result = SampleSizeDetermination.CalculateHedgesG(x, z);
+      Assert.AreEqual(1.507722, Math.Round(result, 6));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/KruskalWallisUnitTests.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/KruskalWallisUnitTests.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/KruskalWallisUnitTests.cs	(revision 16038)
@@ -0,0 +1,182 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 HeuristicLab.Analysis.Statistics;
+using HeuristicLab.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Analysis.Tests {
+  [TestClass]
+  public class KruskalWallisUnitTests {
+    //tests the sample data from R's Kruskal.Test() help page
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void KruskalWallisTest1() {
+      double[][] data = new double[3][];
+      data[0] = new double[] { 2.9, 3.0, 2.5, 2.6, 3.2 };
+      data[1] = new double[] { 3.8, 2.7, 4.0, 2.4 };
+      data[2] = new double[] { 2.8, 3.4, 3.7, 2.2, 2.0 };
+
+      Assert.AreEqual(0.68, Math.Round(KruskalWallisTest.Test(data), 2));
+    }
+
+    //compares groups of uniformly distributed random variables
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void KruskalWallisTest2() {
+      double[][] data = new double[3][];
+      data[0] = new double[] { 977,3848,2803,4097,3155,2745,25,3384,2587,1332,1407,2842,4089,4083,608,3246,1634
+                              ,3182,2856,1614,2627,1116,2659,1166,3299,2322,3681,2184,2470,4682,3305,2553,239,2847
+                              ,2733,8,2773,3215,1345,1037,1760,2729,984,648,1875,4852,1002,4106,3934,4542,3718
+                              ,67,4539,1862,1886,1299,4544,3463,4052,1934,728,2492,799,730,1896,468,4724,1329
+                              ,510,3952,2392,2812,330,94,1726,2542,926,1472,4014,812,1243,2274,2394,3120,1745
+                              ,2597,4331,2562,4814,239,1194,4843,4577,3277,3482,1381,4697,3878,500,2182};
+      data[1] = new double[] { 4106,3279,4464,1460,1023,4459,4723,2934,1818,26,2539,1816,2246,1185,1266,1137,1921
+                              ,1340,4655,4636,578,2970,4208,2658,110,1063,2081,1735,3308,3900,1483,929,2214,2810
+                              ,4568,327,3046,1085,4585,535,3303,1511,213,491,492,167,1520,1469,122,2514,2206
+                              ,2218,974,1480,3959,1158,2753,1273,3870,2356,4707,492,3606,562,445,866,3714,1603
+                              ,3139,4941,3824,1124,2130,3701,3437,1771,2837,1,3800,3465,3407,4281,444,363,2926
+                              ,2353,4429,3357,4834,1039,4238,139,3050,4099,2003,4253,2004,3849,4321,380 };
+      data[2] = new double[] { 233,1577,198,2311,2281,1957,737,3508,1974,1819,3778,1237,3497,616,1286,1901,3114
+                              ,3982,1756,1058,2874,2401,1921,3146,1313,1604,621,2365,46,3108,2714,81,4367,853
+                              ,1387,73,4132,2052,3440,2814,520,4434,4183,4055,1655,4417,3845,2389,1500,3029,3733
+                              ,3834,3681,1283,2875,1752,1258,279,1302,4301,4402,229,2256,3490,977,3615,1293,4345
+                              ,2005,298,2962,2118,3379,3121,4237,4646,1186,568,2181,2843,4721,1609,224,391,1893
+                              ,3605,4162,493,330,4595,2699,4457,3981,3499,1773,653,3176,134,3205,4537 };
+
+      Assert.AreEqual(0.95, Math.Round(KruskalWallisTest.Test(data), 2));
+    }
+
+    //compares groups of normally distributed random variables
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void KruskalWallisTest3() {
+      double[][] data = new double[3][];
+      data[0] = new double[] { 0.264589812,0.161585300,0.890091755,0.342488339,-1.596719857,0.120133657
+                              ,2.241639009,0.085758340,-0.857294600,1.677233367,1.256788739,-1.094681878
+                              ,1.243547091,-0.420561525,-0.762303565,0.108380241,-1.583143952,-0.327616045
+                              ,1.848906992,2.265051780,-0.101968019,0.958290323,0.531773709,0.923724862
+                              ,-0.345119203,1.502269741,-0.441750726,-0.041689146,-0.794916891,-1.407491978
+                              ,0.260857731,-0.583565945,-0.246297801,0.289167991,1.475766373,0.089479435
+                              ,-0.419836298,0.929193796,1.321124907,0.984626214,-1.106529215,1.893772460
+                              ,-0.116651087,-0.855576968,-0.235878058,0.122260772,0.505024585,0.557638701
+                              ,1.042759510,-0.301076354,0.786736923,0.768976235,-0.004049338,0.577436400
+                              ,1.281303178,0.081638643,0.323528409,-0.037552073,0.700950894,0.051583445
+                              ,-0.002369374,1.025067100,-0.829806908,0.759951587,-0.126659012,0.139548228
+                              ,1.776592281,-1.047810226,0.002268369,1.706443821,0.491150412,0.785840754
+                              ,-0.108426124,-0.364622100,-1.863405685,0.475659013,1.410155770,1.619192440
+                              ,0.145232489,0.390564220,0.078523202,1.246437519,-1.851728231,-0.702955879 };
+      data[1] = new double[] { 0.88684045,-1.64580307,1.35554664,0.99774740,-0.28673422,0.07218712,-0.57748503
+                              ,0.46563867,0.18205386,0.37696309,-0.67810720,-0.22694641,0.04085999,-0.01930002
+                              ,-1.14389989,-0.04909415,-0.05459455,-0.17639915,-0.16265625,0.07556000,-0.44700873
+                              ,-0.91181687,0.68196982,1.24826347,0.43507746,-0.09482412,0.78624477,0.34046540
+                              ,-0.62211625,-1.12255940,-0.63737143,0.68804212,-0.71520904,-1.53110842,-1.05479994
+                              ,-1.24221848,-0.45931126,-0.45559477,1.76679857,-0.77232782,1.13517674,-1.39495738
+                              ,-0.34197961,0.30465514,-0.53298790,0.50683810,-0.58359581,-0.25960696,-1.22998083
+                              ,0.65792853,1.26266806,1.74247915,0.58659782,0.30592475,-0.18126620,1.34782875
+                              ,0.15637320,0.37607185,-0.68933176,-1.24838659,0.65059380,-0.81253053,-1.69024871
+                              ,0.07260499,-1.63974258,0.16926860,1.57151501,-1.59405343,-0.07934909,-0.02262132
+                              ,-0.77291344,0.59094265,-0.27438763,-0.95374866,-0.22790924,-0.21198915,0.68324522
+                              ,-0.23775701,-1.16306273,-1.33217708,-0.11785916,0.85999469,0.01001755,-0.01307264 };
+      data[2] = new double[] { 1.211025191,0.958893913,-0.195330882,-2.169217166,0.001336114,1.216295531
+                              ,-0.973521915,0.365480774,-0.489803183,-1.673553315,2.003532021,1.423367551
+                              ,0.092679901,-1.491714972,-1.565832859,0.689337215,-1.204939599,0.598992068
+                              ,-1.261605940,0.890733253,3.334496751,0.817455786,0.441394621,-2.374263091
+                              ,-0.635907080,-1.283172539,-0.130218566,-0.169552228,0.177057474,-0.398655531
+                              ,1.151068075,1.700511574,-0.193563851,-0.970337200,-1.299506394,0.571352533
+                              ,0.304304277,-0.962776922,-0.160333430,0.727834694,-0.175105398,-2.029508526
+                              ,1.491111387,-1.584083346,0.662427657,1.500680474,0.820281659,-0.707746044
+                              ,-0.180426669,-1.259842785,0.050592502,0.476649763,0.368184886,1.482703173
+                              ,1.863034189,-0.833241981,1.602468694,0.155115911,-2.463551102,2.045183510
+                              ,-0.078774687,0.463642193,1.263807207,-0.635996999,-0.563708248,0.475730571
+                              ,-0.162671474,-0.682790861,-0.573510544,0.077701772,0.751698338,0.408727821
+                              ,-0.374242494,-0.002329019,-0.330893667,-0.488596854,-0.697768835,-1.356949810
+                              ,-0.947125493,2.087444922,0.271276104,-1.027604792,-0.364097727,-0.741089219};
+
+      Assert.AreEqual(0.0253, Math.Round(KruskalWallisTest.Test(data), 4));
+    }
+
+    //compares groups of normally and uniformly distributed random variables
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void KruskalWallisTest4() {
+      double[][] data = new double[3][];
+      data[0] = new double[] { 977,3848,2803,4097,3155,2745,25,3384,2587,1332,1407,2842,4089,4083,608,3246,1634
+                              ,3182,2856,1614,2627,1116,2659,1166,3299,2322,3681,2184,2470,4682,3305,2553,239,2847
+                              ,2733,8,2773,3215,1345,1037,1760,2729,984,648,1875,4852,1002,4106,3934,4542,3718
+                              ,67,4539,1862,1886,1299,4544,3463,4052,1934,728,2492,799,730,1896,468,4724,1329
+                              ,510,3952,2392,2812,330,94,1726,2542,926,1472,4014,812,1243,2274,2394,3120,1745
+                              ,2597,4331,2562,4814,239,1194,4843,4577,3277,3482,1381,4697,3878,500,2182};
+      data[1] = new double[] { 0.88684045,-1.64580307,1.35554664,0.99774740,-0.28673422,0.07218712,-0.57748503
+                              ,0.46563867,0.18205386,0.37696309,-0.67810720,-0.22694641,0.04085999,-0.01930002
+                              ,-1.14389989,-0.04909415,-0.05459455,-0.17639915,-0.16265625,0.07556000,-0.44700873
+                              ,-0.91181687,0.68196982,1.24826347,0.43507746,-0.09482412,0.78624477,0.34046540
+                              ,-0.62211625,-1.12255940,-0.63737143,0.68804212,-0.71520904,-1.53110842,-1.05479994
+                              ,-1.24221848,-0.45931126,-0.45559477,1.76679857,-0.77232782,1.13517674,-1.39495738
+                              ,-0.34197961,0.30465514,-0.53298790,0.50683810,-0.58359581,-0.25960696,-1.22998083
+                              ,0.65792853,1.26266806,1.74247915,0.58659782,0.30592475,-0.18126620,1.34782875
+                              ,0.15637320,0.37607185,-0.68933176,-1.24838659,0.65059380,-0.81253053,-1.69024871
+                              ,0.07260499,-1.63974258,0.16926860,1.57151501,-1.59405343,-0.07934909,-0.02262132
+                              ,-0.77291344,0.59094265,-0.27438763,-0.95374866,-0.22790924,-0.21198915,0.68324522
+                              ,-0.23775701,-1.16306273,-1.33217708,-0.11785916,0.85999469,0.01001755,-0.01307264 };
+      data[2] = new double[] { 1.211025191,0.958893913,-0.195330882,-2.169217166,0.001336114,1.216295531
+                              ,-0.973521915,0.365480774,-0.489803183,-1.673553315,2.003532021,1.423367551
+                              ,0.092679901,-1.491714972,-1.565832859,0.689337215,-1.204939599,0.598992068
+                              ,-1.261605940,0.890733253,3.334496751,0.817455786,0.441394621,-2.374263091
+                              ,-0.635907080,-1.283172539,-0.130218566,-0.169552228,0.177057474,-0.398655531
+                              ,1.151068075,1.700511574,-0.193563851,-0.970337200,-1.299506394,0.571352533
+                              ,0.304304277,-0.962776922,-0.160333430,0.727834694,-0.175105398,-2.029508526
+                              ,1.491111387,-1.584083346,0.662427657,1.500680474,0.820281659,-0.707746044
+                              ,-0.180426669,-1.259842785,0.050592502,0.476649763,0.368184886,1.482703173
+                              ,1.863034189,-0.833241981,1.602468694,0.155115911,-2.463551102,2.045183510
+                              ,-0.078774687,0.463642193,1.263807207,-0.635996999,-0.563708248,0.475730571
+                              ,-0.162671474,-0.682790861,-0.573510544,0.077701772,0.751698338,0.408727821
+                              ,-0.374242494,-0.002329019,-0.330893667,-0.488596854,-0.697768835,-1.356949810
+                              ,-0.947125493,2.087444922,0.271276104,-1.027604792,-0.364097727,-0.741089219};
+
+      var result = KruskalWallisTest.Test(data);
+      Assert.IsTrue(result.IsAlmost(2.2E-16));
+    }
+
+    //compares groups containing the same random variables
+    [TestMethod]
+    [TestCategory("Analysis.Statistics")]
+    [TestProperty("Time", "short")]
+    public void KruskalWallisTest5() {
+      double[][] data = new double[4][];
+      data[0] = new double[] { 1477,764,4731,1048,822,974,3302,2258,1946,3067,974,206,2439,3022,2714,2559,28
+                              ,2654,4588,3363,4750,1440,1892,3629,816,4317,34,2119,3290,1758};
+      data[1] = new double[] { 1477,764,4731,1048,822,974,3302,2258,1946,3067,974,206,2439,3022,2714,2559,28
+                              ,2654,4588,3363,4750,1440,1892,3629,816,4317,34,2119,3290,1758};
+      data[2] = new double[] {1477,764,4731,1048,822,974,3302,2258,1946,3067,974,206,2439,3022,2714,2559,28
+                              ,2654,4588,3363,4750,1440,1892,3629,816,4317,34,2119,3290,1758 };
+      data[3] = new double[] {1477,764,4731,1048,822,974,3302,2258,1946,3067,974,206,2439,3022,2714,2559,28
+                              ,2654,4588,3363,4750,1440,1892,3629,816,4317,34,2119,3290,1758 };
+
+      Assert.AreEqual(1, Math.Round(KruskalWallisTest.Test(data), 2));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/MultidimensionalScalingTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/MultidimensionalScalingTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Analysis-3.3/MultidimensionalScalingTest.cs	(revision 16038)
@@ -0,0 +1,118 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Globalization;
+using HeuristicLab.Data;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Analysis.Tests {
+  [TestClass]
+  public class MultidimensionalScalingTest {
+    [TestMethod]
+    [TestCategory("Algorithms.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void TestGoodnessOfFit() {
+      double stress;
+      DoubleMatrix distances3 = new DoubleMatrix(3, 3);
+      // Example 1: A right triangle
+      distances3[0, 1] = distances3[1, 0] = 3;
+      distances3[0, 2] = distances3[2, 0] = 4;
+      distances3[1, 2] = distances3[2, 1] = 5;
+      stress = MultidimensionalScaling.CalculateNormalizedStress(distances3,
+        MultidimensionalScaling.KruskalShepard(distances3));
+      Assert.IsTrue(stress < 0.1);
+      // Example 2: An arbitrary triangle
+      distances3[0, 1] = distances3[1, 0] = 8;
+      distances3[0, 2] = distances3[2, 0] = 6.4;
+      distances3[1, 2] = distances3[2, 1] = 5;
+      DoubleMatrix coords3 = MultidimensionalScaling.KruskalShepard(distances3);
+      Console.WriteLine("Coordinates: ");
+      Console.WriteLine("A = ({0}, {1}), B = ({2}, {3}), C = ({4}, {5})", coords3[0, 0], coords3[0, 1], coords3[1, 0], coords3[1, 1], coords3[2, 0], coords3[2, 1]);
+      stress = MultidimensionalScaling.CalculateNormalizedStress(distances3, coords3);
+      Console.WriteLine("Stress = " + stress.ToString(CultureInfo.InvariantCulture.NumberFormat));
+      Assert.IsTrue(stress < 0.1);
+      DoubleMatrix distances4 = new DoubleMatrix(4, 4);
+      // Example 3: A small square
+      distances4[0, 1] = distances4[1, 0] = 1;
+      distances4[0, 2] = distances4[2, 0] = Math.Sqrt(2);
+      distances4[0, 3] = distances4[3, 0] = 1;
+      distances4[1, 2] = distances4[2, 1] = 1;
+      distances4[1, 3] = distances4[3, 1] = Math.Sqrt(2);
+      distances4[2, 3] = distances4[3, 2] = 1;
+      stress = MultidimensionalScaling.CalculateNormalizedStress(distances4,
+        MultidimensionalScaling.KruskalShepard(distances4));
+      Assert.IsTrue(stress < 0.1);
+      // Example 4: A large square
+      distances4[0, 1] = distances4[1, 0] = 1000;
+      distances4[0, 2] = distances4[2, 0] = Math.Sqrt(2000000);
+      distances4[0, 3] = distances4[3, 0] = 1000;
+      distances4[1, 2] = distances4[2, 1] = 1000;
+      distances4[1, 3] = distances4[3, 1] = Math.Sqrt(2000000);
+      distances4[2, 3] = distances4[3, 2] = 1000;
+      stress = MultidimensionalScaling.CalculateNormalizedStress(distances4,
+        MultidimensionalScaling.KruskalShepard(distances4));
+      Assert.IsTrue(stress < 0.1);
+      // Example 5: An arbitrary cloud of 8 points in a plane
+      DoubleMatrix distancesK = GetDistances(new double[,] { { 2, 1 }, { 5, 2 }, { 7, 1 }, { 4, 0 }, { 3, 3 }, { 4, 2 }, { 1, 8 }, { 6, 3 } });
+      stress = MultidimensionalScaling.CalculateNormalizedStress(distancesK,
+        MultidimensionalScaling.KruskalShepard(distancesK));
+      Assert.IsTrue(stress < 0.1);
+      // Example 6: A tetrahedron
+      distancesK = GetDistances(new double[,] { { 0, 0, 0 }, { 4, 0, 0 }, { 2, 3.4641, 0 }, { 2, 1.1547, 3.2660 } });
+      stress = MultidimensionalScaling.CalculateNormalizedStress(distancesK,
+        MultidimensionalScaling.KruskalShepard(distancesK));
+      Assert.IsTrue(stress < 0.1);
+      // Example 7: A matrix of perceived dissimilarities between 14 colors, published in the literature
+      distancesK = new DoubleMatrix(new double[,] {
+{ 0.00, 0.14, 0.58, 0.58, 0.82, 0.94, 0.93, 0.96, 0.98, 0.93, 0.91, 0.88, 0.87, 0.84 },
+{ 0.14, 0.00, 0.50, 0.56, 0.78, 0.91, 0.93, 0.93, 0.98, 0.96, 0.93, 0.89, 0.87, 0.86 },
+{ 0.58, 0.50, 0.00, 0.19, 0.53, 0.83, 0.90, 0.92, 0.98, 0.99, 0.98, 0.99, 0.95, 0.97 },
+{ 0.58, 0.56, 0.19, 0.00, 0.46, 0.75, 0.90, 0.91, 0.98, 0.99, 1.00, 0.99, 0.98, 0.96 },
+{ 0.82, 0.78, 0.53, 0.46, 0.00, 0.39, 0.69, 0.74, 0.93, 0.98, 0.98, 0.99, 0.98, 1.00 },
+{ 0.94, 0.91, 0.83, 0.75, 0.39, 0.00, 0.38, 0.55, 0.86, 0.92, 0.98, 0.98, 0.98, 0.99 },
+{ 0.93, 0.93, 0.90, 0.90, 0.69, 0.38, 0.00, 0.27, 0.78, 0.86, 0.95, 0.98, 0.98, 1.00 },
+{ 0.96, 0.93, 0.92, 0.91, 0.74, 0.55, 0.27, 0.00, 0.67, 0.81, 0.96, 0.97, 0.98, 0.98 },
+{ 0.98, 0.98, 0.98, 0.98, 0.93, 0.86, 0.78, 0.67, 0.00, 0.42, 0.63, 0.73, 0.80, 0.77 },
+{ 0.93, 0.96, 0.99, 0.99, 0.98, 0.92, 0.86, 0.81, 0.42, 0.00, 0.26, 0.50, 0.59, 0.72 },
+{ 0.91, 0.93, 0.98, 1.00, 0.98, 0.98, 0.95, 0.96, 0.63, 0.26, 0.00, 0.24, 0.38, 0.45 },
+{ 0.88, 0.89, 0.99, 0.99, 0.99, 0.98, 0.98, 0.97, 0.73, 0.50, 0.24, 0.00, 0.15, 0.32 },
+{ 0.87, 0.87, 0.95, 0.98, 0.98, 0.98, 0.98, 0.98, 0.80, 0.59, 0.38, 0.15, 0.00, 0.24 },
+{ 0.84, 0.86, 0.97, 0.96, 1.00, 0.99, 1.00, 0.98, 0.77, 0.72, 0.45, 0.32, 0.24, 0.00 }});
+      stress = MultidimensionalScaling.CalculateNormalizedStress(distancesK,
+        MultidimensionalScaling.KruskalShepard(distancesK));
+      Assert.IsTrue(stress < 0.1);
+    }
+
+    internal DoubleMatrix GetDistances(double[,] coordinates) {
+      int dimension = coordinates.GetLength(0);
+      DoubleMatrix distances = new DoubleMatrix(dimension, dimension);
+      for (int i = 0; i < dimension - 1; i++)
+        for (int j = i + 1; j < dimension; j++) {
+          double sum = 0;
+          for (int k = 0; k < coordinates.GetLength(1); k++)
+            sum += (coordinates[i, k] - coordinates[j, k]) * (coordinates[i, k] - coordinates[j, k]);
+          distances[i, j] = distances[j, i] = Math.Sqrt(sum);
+        }
+      return distances;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Collections-3.3/BidirectionalDictionaryTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Collections-3.3/BidirectionalDictionaryTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Collections-3.3/BidirectionalDictionaryTest.cs	(revision 16038)
@@ -0,0 +1,91 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Collections.Tests {
+  [TestClass]
+  public class BidirectionalDictionaryTest {
+    private class ComplexType {
+      public readonly int Field;
+      public ComplexType(int field) {
+        Field = field;
+      }
+    }
+
+    private class ComplexTypeEqualityComparer : EqualityComparer<ComplexType> {
+      public override bool Equals(ComplexType x, ComplexType y) {
+        return x.Field == y.Field;
+      }
+      public override int GetHashCode(ComplexType obj) {
+        return obj.Field.GetHashCode();
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestProperty("Time", "short")]
+    public void TestBidirectionalDictionary() {
+      var dict1 = new BidirectionalDictionary<int, double>();
+      dict1.Add(4, 2.0);
+      Assert.IsTrue(dict1.ContainsFirst(4) && dict1.ContainsSecond(2));
+      bool exceptionOnDuplicate = false;
+      try {
+        dict1.Add(4, 3.0);
+      }
+      catch (ArgumentException) { exceptionOnDuplicate = true; }
+      Assert.IsTrue(exceptionOnDuplicate);
+      Assert.IsTrue(dict1.GetByFirst(4) == 2);
+      Assert.IsTrue(dict1.GetBySecond(2) == 4);
+      Assert.IsTrue(dict1.Count == 1);
+      dict1.Clear();
+      Assert.IsTrue(dict1.Count == 0);
+
+      var dict2 = new BidirectionalDictionary<ComplexType, int>(new ComplexTypeEqualityComparer());
+      Assert.IsTrue(!dict2.Any());
+      dict2.Add(new ComplexType(1), 2);
+      Assert.IsTrue(dict2.Any());
+      dict2.Add(new ComplexType(2), 1);
+      Assert.IsTrue(dict2.ContainsFirst(new ComplexType(2)));
+      Assert.IsTrue(dict2.ContainsSecond(2));
+      exceptionOnDuplicate = false;
+      try {
+        dict2.Add(new ComplexType(2), 3);
+      }
+      catch (ArgumentException) { exceptionOnDuplicate = true; }
+      Assert.IsTrue(exceptionOnDuplicate);
+      exceptionOnDuplicate = false;
+      try {
+        dict2.Add(new ComplexType(3), 1);
+      }
+      catch (ArgumentException) { exceptionOnDuplicate = true; }
+      Assert.IsTrue(exceptionOnDuplicate);
+      Assert.IsTrue(dict2.Count == 2);
+      Assert.IsTrue(dict2.GetBySecond(1).Field == 2);
+      Assert.IsTrue(dict2.GetByFirst(new ComplexType(1)) == 2);
+      dict2.Clear();
+      Assert.IsTrue(!dict2.Any());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Collections-3.3/BidirectionalLookupTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Collections-3.3/BidirectionalLookupTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Collections-3.3/BidirectionalLookupTest.cs	(revision 16038)
@@ -0,0 +1,111 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Collections.Generic;
+using System.Linq;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Collections.Tests {
+  [TestClass]
+  public class BidirectionalLookupTest {
+    private class ComplexType {
+      public readonly int Field;
+      public ComplexType(int field) {
+        Field = field;
+      }
+    }
+
+    private class ComplexTypeEqualityComparer : EqualityComparer<ComplexType> {
+      public override bool Equals(ComplexType x, ComplexType y) {
+        return x.Field == y.Field;
+      }
+      public override int GetHashCode(ComplexType obj) {
+        return obj.Field.GetHashCode();
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestProperty("Time", "short")]
+    public void TestBidirectionalLookup() {
+      var lookup1 = new BidirectionalLookup<int, double>();
+      lookup1.Add(4, 2);
+      Assert.IsTrue(lookup1.ContainsFirst(4) && lookup1.ContainsSecond(2));
+      lookup1.Add(4, 3);
+      Assert.IsTrue(lookup1.GetByFirst(4).Count() == 2);
+      Assert.IsTrue(lookup1.GetBySecond(2).Contains(4));
+      Assert.IsTrue(lookup1.CountFirst == 1);
+      Assert.IsTrue(lookup1.CountSecond == 2);
+      lookup1.Add(3, 2);
+      lookup1.Add(2, 2);
+      lookup1.Add(1, 2);
+      Assert.IsTrue(lookup1.GetByFirst(1).Single() == 2);
+      Assert.IsTrue(lookup1.GetBySecond(2).Count() == 4);
+      lookup1.RemovePair(2, 2);
+      Assert.IsTrue(!lookup1.ContainsFirst(2));
+      Assert.IsTrue(lookup1.GetBySecond(2).Count() == 3);
+      lookup1.RemoveByFirst(4);
+      Assert.IsTrue(lookup1.CountFirst == 2);
+      Assert.IsTrue(lookup1.CountSecond == 1);
+      lookup1.RemoveBySecond(2);
+      Assert.IsTrue(lookup1.CountFirst == 0);
+      Assert.IsTrue(lookup1.CountSecond == 0);
+      lookup1.Clear();
+      Assert.IsTrue(lookup1.CountFirst == 0);
+      Assert.IsTrue(lookup1.CountSecond == 0);
+
+      var dict2 = new BidirectionalLookup<ComplexType, int>(new ComplexTypeEqualityComparer());
+      Assert.IsTrue(!dict2.FirstEnumerable.Any());
+      dict2.Add(new ComplexType(1), 2);
+      Assert.IsTrue(dict2.SecondEnumerable.Any());
+      dict2.Add(new ComplexType(2), 1);
+      Assert.IsTrue(dict2.ContainsFirst(new ComplexType(2)));
+      Assert.IsTrue(dict2.ContainsSecond(2));
+      dict2.Add(new ComplexType(2), 3);
+      Assert.IsTrue(dict2.GetByFirst(new ComplexType(2)).Count() == 2);
+      Assert.IsTrue(dict2.GetByFirst(new ComplexType(2)).Contains(1));
+      Assert.IsTrue(dict2.GetByFirst(new ComplexType(2)).Contains(3));
+      dict2.Add(new ComplexType(3), 1);
+      Assert.IsTrue(dict2.GetBySecond(1).Count() == 2);
+      Assert.IsTrue(dict2.GetBySecond(1).Any(x => x.Field == 2));
+      Assert.IsTrue(dict2.GetBySecond(1).Any(x => x.Field == 3));
+      Assert.IsTrue(dict2.CountFirst == 3);
+      Assert.IsTrue(dict2.CountSecond == 3);
+      dict2.Add(new ComplexType(2), 2);
+      Assert.IsTrue(dict2.CountFirst == 3);
+      Assert.IsTrue(dict2.CountSecond == 3);
+      dict2.Add(new ComplexType(2), 4);
+      Assert.IsTrue(dict2.CountFirst == 3);
+      Assert.IsTrue(dict2.CountSecond == 4);
+      dict2.RemoveByFirst(new ComplexType(2));
+      Assert.IsTrue(dict2.CountFirst == 2);
+      Assert.IsTrue(dict2.CountSecond == 2);
+      dict2.RemovePair(new ComplexType(1), 1);
+      Assert.IsTrue(dict2.CountFirst == 2);
+      Assert.IsTrue(dict2.CountSecond == 2);
+      dict2.RemovePair(new ComplexType(1), 2);
+      Assert.IsTrue(dict2.CountFirst == 1);
+      Assert.IsTrue(dict2.CountSecond == 1);
+      dict2.Clear();
+      Assert.IsTrue(!dict2.SecondEnumerable.Any());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Collections-3.3/ObservableKeyedListTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Collections-3.3/ObservableKeyedListTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Collections-3.3/ObservableKeyedListTest.cs	(revision 16038)
@@ -0,0 +1,70 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Collections.Tests {
+  [TestClass]
+  public class ObservableKeyedListTest {
+    private class IntKeyedList : ObservableKeyedList<int, int> {
+      protected override int GetKeyForItem(int item) {
+        return item;
+      }
+
+      public new Dictionary<int, int> Dictionary {
+        get { return base.Dictionary; }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestProperty("Time", "short")]
+    public void KeyedListAddDuplicateItemTest() {
+      var list = new IntKeyedList();
+      var numbers = new List<int>() { 1, 2, 3 };
+      list.AddRange(numbers);
+
+      Assert.IsTrue(list.SequenceEqual(numbers));
+      Assert.AreEqual(list.Count, 3);
+
+      try {
+        list.Add(1);
+      }
+      catch (ArgumentException e) {
+        Assert.AreEqual(e.Message, "An element with the same key already exists.");
+        Assert.IsTrue(list.SequenceEqual(numbers));
+        Assert.IsTrue(numbers.All(list.ContainsKey));
+      }
+
+      try {
+        list.AddRange(numbers);
+      }
+      catch (ArgumentException e) {
+        Assert.AreEqual(e.Message, "An element with the same key already exists.");
+        Assert.IsTrue(list.SequenceEqual(numbers));
+        Assert.IsTrue(numbers.All(list.ContainsKey));
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Common-3.3/EnumerableStatisticExtensions.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Common-3.3/EnumerableStatisticExtensions.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Common-3.3/EnumerableStatisticExtensions.cs	(revision 16038)
@@ -0,0 +1,172 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Diagnostics;
+using System.Diagnostics.Contracts;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class EnumerableStatisticExtensionsTest {
+    [TestMethod]
+    [TestCategory("General")]
+    [TestProperty("Time", "short")]
+    public void QuantileTest() {
+      {
+        Assert.AreEqual(2.0, new double[] { 2.0 }.Quantile(0.5));
+        Assert.AreEqual(2.0, new double[] { 2.0 }.Quantile(0.01));
+        Assert.AreEqual(2.0, new double[] { 2.0 }.Quantile(0.99));
+      }
+
+      {
+        Assert.AreEqual(1.5, new double[] { 1.0, 2.0 }.Median());
+        Assert.AreEqual(2.0, new double[] { 1.0, 2.0 }.Quantile(0.99));
+        Assert.AreEqual(1.0, new double[] { 1.0, 2.0 }.Quantile(0.01));
+      }
+      {
+        Assert.AreEqual(2.0, new double[] { 3.0, 1.0, 2.0 }.Median());
+        Assert.AreEqual(3.0, new double[] { 3.0, 1.0, 2.0 }.Quantile(0.99));
+        Assert.AreEqual(1.0, new double[] { 3.0, 1.0, 2.0 }.Quantile(0.01));
+      }
+
+
+      var xs = new double[] { 1, 1, 1, 3, 4, 7, 9, 11, 13, 13 };
+      {
+        var q0 = Quantile(xs, 0.3); // naive implementation using sorting
+        Assert.AreEqual(q0, 2.0, 1E-6);
+
+        var q1 = xs.Quantile(0.3); // using select
+        Assert.AreEqual(q1, 2.0, 1E-6);
+      }
+      {
+        var q0 = Quantile(xs, 0.75); // naive implementation using sorting
+        Assert.AreEqual(q0, 11.0, 1E-6);
+
+        var q1 = xs.Quantile(0.75); // using select
+        Assert.AreEqual(q1, 11.0, 1E-6);
+      }
+      // quantile = 0.5 is equivalent to median
+      {
+        // even number of elements
+        var expected = Median(xs);
+        Assert.AreEqual(expected, Quantile(xs, 0.5), 1E-6); // using sorting
+        Assert.AreEqual(expected, xs.Quantile(0.5), 1E-6); // using select
+      }
+      {
+        // odd number of elements
+        var expected = Median(xs.Take(9));
+        Assert.AreEqual(expected, Quantile(xs.Take(9), 0.5), 1E-6); // using sorting
+        Assert.AreEqual(expected, xs.Take(9).Quantile(0.5), 1E-6); // using select
+      }
+
+      // edge cases
+      {
+        try {
+          new double[] { }.Quantile(0.5); // empty
+          Assert.Fail("expected exception");
+        }
+        catch (Exception) {
+        }
+      }
+      {
+        try {
+          Enumerable.Repeat(0.0, 10).Quantile(1.0); // alpha < 1 
+          Assert.Fail("expected exception");
+        }
+        catch (Exception) {
+        }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestProperty("Time", "medium")]
+    public void QuantilePerformanceTest() {
+      int n = 10;
+      var sw0 = new Stopwatch();
+      var sw1 = new Stopwatch();
+      const int reps = 1000;
+      while (n <= 1000000) {
+        for (int i = 0; i < reps; i++) {
+          var xs = RandomEnumerable.SampleRandomNumbers(0, 10000, n + 1).Select(x => (double)x).ToArray();
+          sw0.Start();
+          var q0 = Median(xs); // sorting
+          sw0.Stop();
+
+
+          sw1.Start();
+          var q1 = xs.Median(); // selection
+          sw1.Stop();
+          Assert.AreEqual(q0, q1, 1E-9);
+        }
+        Console.WriteLine("{0,-10} {1,-10} {2,-10}", n, sw0.ElapsedMilliseconds, sw1.ElapsedMilliseconds);
+
+        n = n * 10;
+      }
+    }
+
+
+    // straight forward implementation of median function (using sorting)
+    private static double Median(IEnumerable<double> values) {
+      // iterate only once 
+      double[] valuesArr = values.ToArray();
+      int n = valuesArr.Length;
+      if (n == 0) throw new InvalidOperationException("Enumeration contains no elements.");
+
+      Array.Sort(valuesArr);
+
+      // return the middle element (if n is uneven) or the average of the two middle elements if n is even.
+      if (n % 2 == 1) {
+        return valuesArr[n / 2];
+      } else {
+        return (valuesArr[(n / 2) - 1] + valuesArr[n / 2]) / 2.0;
+      }
+    }
+
+    // straight forward implementation of quantile function (using sorting)
+    private static double Quantile(IEnumerable<double> values, double alpha) {
+      Contract.Assert(alpha > 0 && alpha < 1);
+      // iterate only once 
+      double[] valuesArr = values.ToArray();
+      int n = valuesArr.Length;
+      if (n == 0) throw new InvalidOperationException("Enumeration contains no elements.");
+
+      Array.Sort(valuesArr);
+      //  starts at 0
+
+      // return the element at Math.Ceiling (if n*alpha is fractional) or the average of two elements if n*alpha is integer.
+      var pos = n * alpha;
+      Contract.Assert(pos >= 0);
+      Contract.Assert(pos < n);
+      bool isInteger = Math.Round(pos).IsAlmost(pos);
+      if (isInteger) {
+        return 0.5 * (valuesArr[(int)pos - 1] + valuesArr[(int)pos]);
+      } else {
+        return valuesArr[(int)Math.Ceiling(pos) - 1];
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/Auxiliary.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/Auxiliary.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/Auxiliary.cs	(revision 16038)
@@ -0,0 +1,37 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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
+
+namespace HeuristicLab.Encodings.BinaryVectorEncoding.Tests {
+  public static class Auxiliary {
+    public static bool BinaryVectorIsEqualByPosition(BinaryVector p1, BinaryVector p2) {
+      bool equal = (p1.Length == p2.Length);
+      if (equal) {
+        for (int i = 0; i < p1.Length; i++) {
+          if (!p1[i].Equals(p2[i])) {
+            equal = false;
+            break;
+          }
+        }
+      }
+      return equal;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/NPointCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/NPointCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/NPointCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,89 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Data;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.BinaryVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for SinglePointCrossoverTest and is intended
+  ///to contain all SinglePointCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class NPointCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.BinaryVector")]
+    [TestProperty("Time", "short")]
+    public void NPointCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      BinaryVector parent1, parent2, expected, actual;
+      IntValue n;
+      bool exceptionFired;
+      // The following test is based on Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, p. 48
+      random.Reset();
+      n = new IntValue(1);
+      random.IntNumbers = new int[] { 4 };
+      parent1 = new BinaryVector(new bool[] { false, false, false, false, true, false, false, false, false });
+      parent2 = new BinaryVector(new bool[] { true, true, false, true, false, false, false, false, true });
+      expected = new BinaryVector(new bool[] { false, false, false, false, false, false, false, false, true });
+      actual = NPointCrossover.Apply(random, parent1, parent2, n);
+      Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(actual, expected));
+
+      // The following test is based on Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, p. 48
+      random.Reset();
+      n = new IntValue(2);
+      random.IntNumbers = new int[] { 4, 5 };
+      parent1 = new BinaryVector(new bool[] { false, false, false, false, true, false, false, false, false });
+      parent2 = new BinaryVector(new bool[] { true, true, false, true, false, false, false, false, true });
+      expected = new BinaryVector(new bool[] { false, false, false, false, false, false, false, false, false });
+      actual = NPointCrossover.Apply(random, parent1, parent2, n);
+      Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(actual, expected));
+
+      // The following test is based on Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, p. 48
+      random.Reset();
+      n = new IntValue(2);
+      random.IntNumbers = new int[] { 4, 5 };
+      parent2 = new BinaryVector(new bool[] { false, false, false, false, true, false, false, false, false });
+      parent1 = new BinaryVector(new bool[] { true, true, false, true, false, false, false, false, true });
+      expected = new BinaryVector(new bool[] { true, true, false, true, true, false, false, false, true });
+      actual = NPointCrossover.Apply(random, parent1, parent2, n);
+      Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(actual, expected));
+
+      // The following test is not based on any published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 2 };
+      parent1 = new BinaryVector(new bool[] { false, true, true, false, false }); // this parent is longer
+      parent2 = new BinaryVector(new bool[] { false, true, true, false });
+      exceptionFired = false;
+      try {
+        actual = NPointCrossover.Apply(random, parent1, parent2, n);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/SinglePositionBitflipManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/SinglePositionBitflipManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/SinglePositionBitflipManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,52 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.BinaryVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for SinglePositionBitflipManipulator and is intended
+  ///to contain all SinglePositionBitflipManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class SinglePositionBitflipManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.BinaryVector")]
+    [TestProperty("Time", "short")]
+    public void SinglePositionBitflipManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      BinaryVector parent, expected;
+      // The following test is based on Michalewicz, Z. 1999. Genetic Algorithms + Data Structures = Evolution Programs. Third, Revised and Extended Edition, Spring-Verlag Berlin Heidelberg, p. 21.
+      random.Reset();
+      random.IntNumbers = new int[] { 4 };
+      parent = new BinaryVector(new bool[] { true, true, true, false, false, false, false, false, false, 
+        false, true, true, true, true, true, true, false, false, false, true, false, true});
+      expected = new BinaryVector(new bool[] { true, true, true, false, true, false, false, false, false, 
+        false, true, true, true, true, true, true, false, false, false, true, false, true});
+      SinglePositionBitflipManipulator.Apply(random, parent);
+      Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/SomePositionsBitflipManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/SomePositionsBitflipManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/SomePositionsBitflipManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,53 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Data;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.BinaryVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for SomePositionsBitflipManipulator and is intended
+  ///to contain all SomePositionsBitflipManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class SomePositionsBitflipManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.BinaryVector")]
+    [TestProperty("Time", "short")]
+    public void SomePositionsBitflipManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      BinaryVector parent, expected;
+      DoubleValue pm;
+      // The following test is based on Michalewicz, Z. 1999. Genetic Algorithms + Data Structures = Evolution Programs. Third, Revised and Extended Edition, Spring-Verlag Berlin Heidelberg, p. 21.
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.3, 0.3, 0.1, 0.1, 0.3, 0.3, 0.3, 0.1, 0.3 };
+      pm = new DoubleValue(0.2);
+      parent = new BinaryVector(new bool[] { true, false, true, false, false, false, false, true, false });
+      expected = new BinaryVector(new bool[] { true, false, false, true, false, false, false, false, false });
+      SomePositionsBitflipManipulator.Apply(random, parent, pm);
+      Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/UniformCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/UniformCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.BinaryVectorEncoding-3.3/UniformCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,75 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.BinaryVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for SinglePointCrossoverTest and is intended
+  ///to contain all SinglePointCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class UniformCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.BinaryVector")]
+    [TestProperty("Time", "short")]
+    public void SinglePointCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      BinaryVector parent1, parent2, expected, actual;
+      bool exceptionFired;
+      // The following test is based on Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, p. 49
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.35, 0.62, 0.18, 0.42, 0.83, 0.76, 0.39, 0.51, 0.36 };
+      parent1 = new BinaryVector(new bool[] { false, false, false, false, true, false, false, false, false });
+      parent2 = new BinaryVector(new bool[] { true, true, false, true, false, false, false, false, true });
+      expected = new BinaryVector(new bool[] { false, true, false, false, false, false, false, false, false });
+      actual = UniformCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(actual, expected));
+
+      // The following test is based on Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, p. 49
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.35, 0.62, 0.18, 0.42, 0.83, 0.76, 0.39, 0.51, 0.36 };
+      parent2 = new BinaryVector(new bool[] { false, false, false, false, true, false, false, false, false });
+      parent1 = new BinaryVector(new bool[] { true, true, false, true, false, false, false, false, true });
+      expected = new BinaryVector(new bool[] { true, false, false, true, true, false, false, false, true });
+      actual = UniformCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(Auxiliary.BinaryVectorIsEqualByPosition(actual, expected));
+
+      // The following test is not based on any published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.35, 0.62, 0.18, 0.42, 0.83, 0.76, 0.39, 0.51, 0.36 };
+      parent1 = new BinaryVector(new bool[] { false, true, true, false, false }); // this parent is longer
+      parent2 = new BinaryVector(new bool[] { false, true, true, false });
+      exceptionFired = false;
+      try {
+        actual = UniformCrossover.Apply(random, parent1, parent2);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/Auxiliary.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/Auxiliary.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/Auxiliary.cs	(revision 16038)
@@ -0,0 +1,37 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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
+
+namespace HeuristicLab.Encodings.IntegerVectorEncoding.Tests {
+  public static class Auxiliary {
+    public static bool IntegerVectorIsEqualByPosition(IntegerVector p1, IntegerVector p2) {
+      bool equal = (p1.Length == p2.Length);
+      if (equal) {
+        for (int i = 0; i < p1.Length; i++) {
+          if (!p1[i].Equals(p2[i])) {
+            equal = false;
+            break;
+          }
+        }
+      }
+      return equal;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/DiscreteCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/DiscreteCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/DiscreteCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,67 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.IntegerVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for DiscreteCrossoverTest and is intended
+  ///to contain all DiscreteCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class DiscreteCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.IntegerVector")]
+    [TestProperty("Time", "short")]
+    public void DiscreteCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      IntegerVector parent1, parent2, expected, actual;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 0, 0, 1, 0, 1 };
+      parent1 = new IntegerVector(new int[] { 2, 2, 3, 5, 1 });
+      parent2 = new IntegerVector(new int[] { 4, 1, 3, 2, 8 });
+      expected = new IntegerVector(new int[] { 2, 2, 3, 5, 8 });
+      actual = DiscreteCrossover.Apply(random, new ItemArray<IntegerVector>(new IntegerVector[] { parent1, parent2 }));
+      Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(actual, expected));
+
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 0, 0, 1, 0, 1 };
+      parent1 = new IntegerVector(new int[] { 2, 2, 3, 5, 1, 9 }); // this parent is longer
+      parent2 = new IntegerVector(new int[] { 4, 1, 3, 2, 8 });
+      exceptionFired = false;
+      try {
+        actual = DiscreteCrossover.Apply(random, new ItemArray<IntegerVector>(new IntegerVector[] { parent1, parent2 }));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/SinglePointCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/SinglePointCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/SinglePointCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,103 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.IntegerVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for SinglePointCrossoverTest and is intended
+  ///to contain all SinglePointCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class SinglePointCrossoverTest {
+    /// <summary>
+    ///A test for Cross
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.IntegerVector")]
+    [TestProperty("Time", "short")]
+    public void SinglePointCrossoverCrossTest() {
+      var target = new PrivateObject(typeof(SinglePointCrossover));
+      ItemArray<IntegerVector> parents;
+      TestRandom random = new TestRandom();
+      bool exceptionFired;
+      // The following test checks if there is an exception when there are more than 2 parents
+      random.Reset();
+      parents = new ItemArray<IntegerVector>(new IntegerVector[] { new IntegerVector(5), new IntegerVector(6), new IntegerVector(4) });
+      exceptionFired = false;
+      try {
+        IntegerVector actual;
+        actual = (IntegerVector)target.Invoke("Cross", random, parents);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+      // The following test checks if there is an exception when there are less than 2 parents
+      random.Reset();
+      parents = new ItemArray<IntegerVector>(new IntegerVector[] { new IntegerVector(4) });
+      exceptionFired = false;
+      try {
+        IntegerVector actual;
+        actual = (IntegerVector)target.Invoke("Cross", random, parents);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.IntegerVector")]
+    [TestProperty("Time", "short")]
+    public void SinglePointCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      IntegerVector parent1, parent2, expected, actual;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 3 };
+      parent1 = new IntegerVector(new int[] { 2, 2, 3, 5, 1 });
+      parent2 = new IntegerVector(new int[] { 4, 1, 3, 2, 8 });
+      expected = new IntegerVector(new int[] { 2, 2, 3, 2, 8 });
+      actual = SinglePointCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(actual, expected));
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 2 };
+      parent1 = new IntegerVector(new int[] { 2, 2, 3, 5, 1, 9 }); // this parent is longer
+      parent2 = new IntegerVector(new int[] { 4, 1, 3, 2, 8 });
+      exceptionFired = false;
+      try {
+        actual = SinglePointCrossover.Apply(random, parent1, parent2);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/UniformOnePositionManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/UniformOnePositionManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.IntegerVectorEncoding-3.3/UniformOnePositionManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Data;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.IntegerVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for UniformOnePositionManipulator and is intended
+  ///to contain all UniformOnePositionManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class UniformOnePositionManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.IntegerVector")]
+    [TestProperty("Time", "short")]
+    public void UniformOnePositionManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      IntegerVector parent, expected;
+      IntMatrix bounds = new IntMatrix(1, 2);
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 3 };
+      parent = new IntegerVector(new int[] { 2, 2, 3, 5, 1 });
+      expected = new IntegerVector(new int[] { 2, 2, 3, 3, 1 });
+      bounds[0, 0] = 2;
+      bounds[0, 1] = 7;
+      UniformOnePositionManipulator.Apply(random, parent, bounds);
+      Assert.IsTrue(Auxiliary.IntegerVectorIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/Auxiliary.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/Auxiliary.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/Auxiliary.cs	(revision 16038)
@@ -0,0 +1,37 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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
+
+namespace HeuristicLab.Encodings.LinearLinkageEncoding.Tests {
+  public static class Auxiliary {
+    public static bool LinearLinkageIsEqualByPosition(LinearLinkage p1, LinearLinkage p2) {
+      bool equal = (p1.Length == p2.Length);
+      if (equal) {
+        for (int i = 0; i < p1.Length; i++) {
+          if (!p1[i].Equals(p2[i])) {
+            equal = false;
+            break;
+          }
+        }
+      }
+      return equal;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/ConversionsTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/ConversionsTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/ConversionsTest.cs	(revision 16038)
@@ -0,0 +1,139 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.LinearLinkageEncoding.Tests {
+  [TestClass()]
+  public class ConversionsTest {
+    private readonly int[][] validForwardEncoding = new[]{
+      new int[0], new[] {0},
+      new[] {0, 1}, new[] {1, 1},
+      new[] {0, 1, 2}, new[] {1, 1, 2}, new[] {2, 1, 2},
+      new[] {0, 2, 2}, new[] {1, 2, 2},
+      new[] {0, 1, 2, 3}, new[] {1, 1, 2, 3}, new[] {2, 1, 2, 3}, new[] {3, 1, 2, 3},
+      new[] {0, 1, 3, 3}, new[] {1, 2, 2, 3}, new[] {2, 1, 3, 3}, new[] {3, 2, 2, 3},
+      new[] {0, 2, 2, 3}, new[] {1, 3, 2, 3},
+      new[] {0, 2, 3, 3}
+    };
+    private readonly int[][] invalidForwardEncoding = new[]{
+      new [] {-1}, new [] {1}, new [] {1, 0},
+      new [] {0, 0, 0}, new [] {0, 0, 1}, new [] {0, 0, 2},
+      new [] {0, 1, 0},
+      new [] {0, 2, 0}, new [] {0, 2, 1},
+      new [] {1, 0, 0}, new [] {1, 0, 1}, new [] {1, 0, 2},
+      new [] {1, 1, 0}, new [] {1, 1, 1},
+      new [] {1, 2, 0}, new [] {1, 2, 1},
+      new [] {2, 0, 0}, new [] {2, 0, 1}, new [] {2, 0, 2},
+      new [] {2, 1, 0}, new [] {2, 1, 1},
+      new [] {2, 2, 0}, new [] {2, 2, 1}, new [] {2, 2, 2},
+    };
+    private readonly int[][] invalidEndEncoding = new[]{
+      new [] {-1}, new [] {1}, new [] {1, 0},
+      new [] {0, 0, 1}, new [] {0, 0, 2},
+      new [] {0, 1, 0},
+      new [] {0, 2, 0}, new [] {0, 2, 1},
+      new [] {1, 0, 0}, new [] {1, 0, 1}, new [] {1, 0, 2},
+      new [] {1, 1, 0}, new [] {1, 1, 1},
+      new [] {1, 2, 0}, new [] {1, 2, 1},
+      new [] {2, 0, 0}, new [] {2, 0, 1}, new [] {2, 0, 2},
+      new [] {2, 1, 0}, new [] {2, 1, 1},
+      new [] {2, 2, 0}, new [] {2, 2, 1},
+    };
+
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void EndLinksRoundtripTest() {
+      foreach (var values in validForwardEncoding) {
+        var expected = LinearLinkage.FromForwardLinks(values);
+        var llee = expected.ToEndLinks();
+        var actual = LinearLinkage.FromEndLinks(llee);
+        Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(expected, actual),
+          "[{0}] did not roundtrip successfully!", string.Join(", ", values));
+      }
+    }
+
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void GroupsRoundtripTest() {
+      foreach (var values in validForwardEncoding) {
+        var expected = LinearLinkage.FromForwardLinks(values);
+        var groups = expected.GetGroups();
+        var actual = LinearLinkage.FromGroups(expected.Length, groups);
+        Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(expected, actual),
+          "[{0}] did not roundtrip successfully!", string.Join(", ", values));
+      }
+    }
+
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void InvalidForwardLinksTest() {
+      foreach (var values in invalidForwardEncoding) {
+        var isValid = true;
+        try {
+          var lle = LinearLinkage.FromForwardLinks(values);
+        } catch (ArgumentException e) {
+          isValid = false;
+        }
+        Assert.IsFalse(isValid, "[{0}] is invalid and should throw ArgumentException!", string.Join(", ", values));
+      }
+    }
+
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void InvalidEndLinksTest() {
+      foreach (var values in invalidEndEncoding) {
+        var isValid = true;
+        try {
+          var lle = LinearLinkage.FromEndLinks(values);
+        } catch (ArgumentException e) {
+          isValid = false;
+        }
+        Assert.IsFalse(isValid, "{0} should be invalid", string.Join(", ", values));
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void ConvertFromLLEtoLLEe() {
+      var random = new MersenneTwister(42);
+      var lle = MaxGroupsLinearLinkageCreator.Apply(random, 32, 8);
+      Assert.IsTrue(lle.SequenceEqual(LinearLinkage.FromEndLinks(lle.ToEndLinks())));
+    }
+
+    [TestMethod]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void ConvertFromLLEtoLLEb() {
+      var random = new MersenneTwister(42);
+      var lle = MaxGroupsLinearLinkageCreator.Apply(random, 32, 8);
+      Assert.IsTrue(lle.SequenceEqual(LinearLinkage.FromBackLinks(lle.ToBackLinks())));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/GroupCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/GroupCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/GroupCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,73 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Random;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.LinearLinkageEncoding.Tests {
+  [TestClass()]
+  public class GroupCrossoverTest {
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void EqualParentsTest() {
+      var random = new FastRandom(0);
+      var parent = LinearLinkage.SingleElementGroups(10);
+      var child = GroupCrossover.Apply(random, parent, parent);
+      Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(parent, child));
+
+      parent = RandomLinearLinkageCreator.Apply(random, 10);
+      child = GroupCrossover.Apply(random, parent, parent);
+      Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(parent, child));
+    }
+
+    // Example from paper:
+    // Multi-objective Genetic Algorithms for grouping problems. Korkmaz, E.E. Applied Intelligence (2010) 33: 179. 
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void ExampleFromPaperTest() {
+      var parent1 = LinearLinkage.FromEndLinks(new[] { 3, 4, 3, 3, 4 });
+
+      var parent2 = LinearLinkage.FromEndLinks(new[] { 2, 2, 2, 4, 4 });
+
+      CheckGroupCrossover(parent1, parent2, new[] { 3, 4, 2, 3, 4 }, new[] { 0.0, 0.0, 0.0, 0.0 }); // (i)
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 4, 2, 3, 4 }, new[] { 0.0, 0.0, 0.0, 0.9 }); // (iv)
+      CheckGroupCrossover(parent1, parent2, new[] { 3, 2, 2, 3, 4 }, new[] { 0.0, 0.0, 0.9, 0.0 }); // (iii)
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 2, 2, 3, 4 }, new[] { 0.0, 0.0, 0.9, 0.9 }); // (ii)
+      CheckGroupCrossover(parent1, parent2, new[] { 3, 4, 3, 3, 4 }, new[] { 0.0, 0.9 });
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 4, 2, 4, 4 }, new[] { 0.9, 0.0, 0.0 });
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 2, 2, 4, 4 }, new[] { 0.9, 0.0, 0.9 });
+      CheckGroupCrossover(parent1, parent2, new[] { 4, 4, 4, 4, 4 }, new[] { 0.9, 0.9, 0.0, 0.0 });
+      CheckGroupCrossover(parent1, parent2, new[] { 4, 4, 4, 4, 4 }, new[] { 0.9, 0.9, 0.0, 0.9 });
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 4, 2, 4, 4 }, new[] { 0.9, 0.9, 0.9, 0.0 });
+      CheckGroupCrossover(parent1, parent2, new[] { 4, 4, 2, 4, 4 }, new[] { 0.9, 0.9, 0.9, 0.9 });
+    }
+
+    private void CheckGroupCrossover(LinearLinkage parent1, LinearLinkage parent2, int[] expectedllee, double[] randomNumbers) {
+      var expected = LinearLinkage.FromEndLinks(expectedllee);
+      var random = new TestRandom() { DoubleNumbers = randomNumbers };
+      var child = GroupCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(expected, child), "Expected [{0}] but was [{1}]!", string.Join(", ", expected), string.Join(", ", child));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/MoveTests.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/MoveTests.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/MoveTests.cs	(revision 16038)
@@ -0,0 +1,84 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.LinearLinkageEncoding.Tests {
+  [TestClass]
+  public class LinearLinkageMoveTests {
+    [TestMethod]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void TestLinearLinkageMoveApplyUndo() {
+      var random = new MersenneTwister(42);
+      for (var p = 0; p < 7; p++) {
+        var lle = ExactGroupsLinearLinkageCreator.Apply(random, 64, (int)Math.Pow(2, p));
+        var before = (LinearLinkage)lle.Clone();
+        var beforeb = before.ToBackLinks();
+        var moves = 0;
+        foreach (var move in ExhaustiveEMSSMoveGenerator.Generate(lle)) {
+          var lleb = lle.ToBackLinks();
+          move.Apply(lle);
+          move.ApplyToLLEb(lleb);
+          Assert.IsFalse(before.SequenceEqual(lle));
+          Assert.IsFalse(lleb.SequenceEqual(beforeb));
+          Assert.IsTrue(lleb.SequenceEqual(lle.ToBackLinks()));
+          Assert.IsTrue(lle.SequenceEqual(LinearLinkage.FromBackLinks(lleb)));
+          move.Undo(lle);
+          Assert.IsTrue(before.SequenceEqual(lle));
+          moves++;
+        }
+        Assert.IsTrue(moves > 0);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void TestLinearLinkageMoveApply() {
+      var random = new MersenneTwister(42);
+      for (var p = 0; p < 7; p++) {
+        var lle = ExactGroupsLinearLinkageCreator.Apply(random, 64, (int)Math.Pow(2, p));
+        var lleb = lle.ToBackLinks();
+        var groupItems = new List<int>() { 0 };
+        var moves = 0;
+        for (var i = 1; i < lle.Length; i++) {
+          var move = ExhaustiveEMSSMoveGenerator.GenerateForItem(i, groupItems, lle, lleb).SampleRandom(random);
+          move.Apply(lle);
+          move.ApplyToLLEb(lleb);
+          Assert.IsTrue(lleb.SequenceEqual(lle.ToBackLinks()));
+          Assert.IsTrue(lle.SequenceEqual(LinearLinkage.FromBackLinks(lleb)));
+
+          if (lleb[i] != i)
+            groupItems.Remove(lleb[i]);
+          groupItems.Add(i);
+
+          moves++;
+        }
+        Assert.IsTrue(moves == lle.Length - 1);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/Auxiliary.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/Auxiliary.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/Auxiliary.cs	(revision 16038)
@@ -0,0 +1,37 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  public static class Auxiliary {
+    public static bool PermutationIsEqualByPosition(Permutation p1, Permutation p2) {
+      bool equal = (p1.Length == p2.Length);
+      if (equal) {
+        for (int i = 0; i < p1.Length; i++) {
+          if (p1[i] != p2[i]) {
+            equal = false;
+            break;
+          }
+        }
+      }
+      return equal;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/CosaCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/CosaCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/CosaCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,90 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for CosaCrossoverTest and is intended
+  ///to contain all CosaCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class CosaCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void CosaCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Wendt, O. 1994. COSA: COoperative Simulated Annealing - Integration von Genetischen Algorithmen und Simulated Annealing am Beispiel der Tourenplanung. Dissertation Thesis. IWI Frankfurt.
+      random.Reset();
+      random.IntNumbers = new int[] { 1 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 5, 2, 4, 3 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 3, 0, 2, 1, 4, 5 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 4, 2, 5, 3 });
+      Assert.IsTrue(expected.Validate());
+      actual = CosaCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 4 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 7, 6, 5, 3, 4, 2, 1, 0 });
+      Assert.IsTrue(expected.Validate());
+      actual = CosaCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 5 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 4, 3, 5, 1, 0, 9, 7, 2, 8, 6 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 7, 6, 2, 3, 4, 5, 1, 0, 9, 8 });
+      Assert.IsTrue(expected.Validate());
+      actual = CosaCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        CosaCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/CyclicCrossover2Test.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/CyclicCrossover2Test.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/CyclicCrossover2Test.cs	(revision 16038)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for CyclicCrossover2Test and is intended
+  ///to contain all CyclicCrossover2Test Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class CyclicCrossover2Test {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void CyclicCrossover2ApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications. CRC Press. pp. 134.
+      random.Reset();
+      random.IntNumbers = new int[] { 0 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 5, 6, 0, 7, 1, 3, 8, 4, 9 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 5, 2, 3, 7, 1, 6, 8, 4, 9 });
+      Assert.IsTrue(expected.Validate());
+      actual = CyclicCrossover2.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        CyclicCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/CyclicCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/CyclicCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/CyclicCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for CyclicCrossover and is intended
+  ///to contain all CyclicCrossover Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class CyclicCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void CyclicCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.9 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 5, 3, 6, 4, 2, 7 });
+      Assert.IsTrue(expected.Validate());
+      actual = CyclicCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        CyclicCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/EdgeRecombinationCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/EdgeRecombinationCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/EdgeRecombinationCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,67 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for EdgeRecombinationCrossover and is intended
+  ///to contain all EdgeRecombinationCrossover Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class EdgeRecombinationCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void EdgeRecombinationCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, pp. 54-55
+      random.Reset();
+      random.IntNumbers = new int[] { 0 };
+      random.DoubleNumbers = new double[] { 0.5, 0, 0, 0 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 8, 2, 6, 7, 1, 5, 4, 0, 3 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 4, 5, 1, 7, 6, 2, 8, 3 });
+      Assert.IsTrue(expected.Validate());
+      actual = EdgeRecombinationCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        EdgeRecombinationCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/InsertionManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/InsertionManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/InsertionManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for InsertionManipulator and is intended
+  ///to contain all InsertionManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class InsertionManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void InsertionManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent, expected;
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 6 };
+      parent = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent.Validate());
+
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 4, 5, 6, 3, 7 });
+      Assert.IsTrue(expected.Validate());
+      InsertionManipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/InversionManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/InversionManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/InversionManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for InversionManipulator and is intended
+  ///to contain all InversionManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class InversionManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void InversionManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent, expected;
+      // The following test is based on an example from Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, pp. 46-47
+      random.Reset();
+      random.IntNumbers = new int[] { 1, 4 };
+      parent = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 });
+      Assert.IsTrue(parent.Validate());
+
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 4, 3, 2, 1, 5, 6, 7, 8 });
+      Assert.IsTrue(expected.Validate());
+      InversionManipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/MaximalPreservativeCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/MaximalPreservativeCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/MaximalPreservativeCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for MaximalPreservativeCrossover and is intended
+  ///to contain all MaximalPreservativeCrossover Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class MaximalPreservativeCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void MaximalPreservativeCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Larranaga, 1999. Genetic Algorithms for the Traveling Salesman Problem.
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 2 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 1, 0, 2, 3, 4, 5, 7, 6 });
+      Assert.IsTrue(expected.Validate());
+      actual = MaximalPreservativeCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        MaximalPreservativeCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderBasedCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderBasedCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderBasedCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for OrderBasedCrossoverTest and is intended
+  ///to contain all OrderBasedCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class OrderBasedCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void OrderBasedCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 5, 2, 1 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 1, 3, 2, 7, 6, 4, 5, 0 });
+      actual = OrderBasedCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        OrderBasedCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderCrossover2Test.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderCrossover2Test.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderCrossover2Test.cs	(revision 16038)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for OrderCrossover2Test and is intended
+  ///to contain all OrderCrossover2Test Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class OrderCrossover2Test {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void OrderCrossover2ApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications. CRC Press. p. 135.
+      random.Reset();
+      random.IntNumbers = new int[] { 5, 7 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 5, 6, 0, 9, 1, 3, 8, 4, 7 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 0, 9, 1, 3, 5, 6, 7, 8, 4 });
+      Assert.IsTrue(expected.Validate());
+      actual = OrderCrossover2.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        OrderCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/OrderCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,117 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for OrderCrossoverTest and is intended
+  ///to contain all OrderCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class OrderCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void OrderCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, pp. 55-56
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 6 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 8, 2, 6, 7, 1, 5, 4, 0, 3 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 7, 1, 3, 4, 5, 6, 0, 8 });
+      Assert.IsTrue(expected.Validate());
+      actual = OrderCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13, pp. 129-170.
+      random.Reset();
+      random.IntNumbers = new int[] { 2, 4 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 7, 6, 2, 3, 4, 0, 1, 5 });
+      actual = OrderCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // The following test is based on an example from Talbi, E.G. 2009. Metaheuristics - From Design to Implementation. Wiley, p. 218.
+      random.Reset();
+      random.IntNumbers = new int[] { 2, 5 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 7, 3, 0, 4, 8, 2, 5, 1, 6 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 8, 2, 3, 4, 5, 1, 6, 7 });
+      Assert.IsTrue(expected.Validate());
+      actual = OrderCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 0, 5 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 1, 4, 3, 7, 8, 6, 0, 5, 9 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 5, 3, 4, 0, 9, 8, 2, 7, 1, 6 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 1, 4, 3, 7, 8, 6, 5, 0, 9 });
+      Assert.IsTrue(expected.Validate());
+      actual = OrderCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // based on the previous with changed breakpoints
+      random.Reset();
+      random.IntNumbers = new int[] { 6, 9 };
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 3, 4, 8, 2, 7, 1, 6, 0, 5, 9 });
+      Assert.IsTrue(expected.Validate());
+      actual = OrderCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // another one based on the previous with changed breakpoints
+      random.Reset();
+      random.IntNumbers = new int[] { 0, 9 };
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 1, 4, 3, 7, 8, 6, 0, 5, 9 });
+      Assert.IsTrue(expected.Validate());
+      actual = OrderCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        OrderCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PartiallyMatchedCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PartiallyMatchedCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PartiallyMatchedCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,78 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for PartiallyMatchedCrossover and is intended
+  ///to contain all PartiallyMatchedCrossover Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class PartiallyMatchedCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void PartiallyMatchedCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Larranaga, 1999. Genetic Algorithms for the Traveling Salesman Problem.
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 5 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 6, 4, 0, 5, 7, 1, 3 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 6, 7, 3, 4, 5, 1, 0 });
+      Assert.IsTrue(expected.Validate());
+      actual = PartiallyMatchedCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // The following test is based on an example from Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications. CRC Press. p. 134.
+      random.Reset();
+      random.IntNumbers = new int[] { 5, 7 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 5, 6, 0, 9, 1, 3, 8, 4, 7 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 2, 1, 3, 0, 9, 5, 6, 7, 4, 8 });
+      Assert.IsTrue(expected.Validate());
+      actual = PartiallyMatchedCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        PartiallyMatchedCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PermutationEqualityComparerTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PermutationEqualityComparerTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PermutationEqualityComparerTest.cs	(revision 16038)
@@ -0,0 +1,57 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  [TestClass]
+  public class PermutationEqualityComparerTest {
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void TestPermutationEqualityComparer() {
+      PermutationEqualityComparer comparer = new PermutationEqualityComparer();
+      Permutation p = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 3, 2, 0, 1, 4 });
+      Permutation q = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 1, 0, 2, 3, 4 });
+      Assert.IsTrue(comparer.Equals(p, q));
+      Assert.IsTrue(comparer.GetHashCode(p) == comparer.GetHashCode(q));
+      Permutation p2 = new Permutation(PermutationTypes.RelativeDirected, new int[] { 2, 3, 4, 1, 0 });
+      Permutation q2 = new Permutation(PermutationTypes.RelativeDirected, new int[] { 1, 0, 2, 3, 4 });
+      Assert.IsTrue(comparer.Equals(p2, q2));
+      Assert.IsTrue(comparer.GetHashCode(p2) == comparer.GetHashCode(q2));
+
+      Assert.IsFalse(comparer.Equals(p, q2));
+      Assert.IsFalse(comparer.Equals(p2, q));
+
+      Permutation p3 = new Permutation(PermutationTypes.Absolute, new int[] { 2, 3, 0, 4, 1 });
+      Permutation q3 = new Permutation(PermutationTypes.Absolute, new int[] { 2, 3, 0, 4, 1 });
+      Assert.IsTrue(comparer.Equals(p3, q3));
+      Assert.IsTrue(comparer.GetHashCode(p3) == comparer.GetHashCode(q3));
+
+      Assert.IsFalse(comparer.Equals(p3, q));
+      Assert.IsFalse(comparer.Equals(p2, q3));
+
+      Permutation p4 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 3, 2, 0, 1, 4, 5 });
+      Assert.IsFalse(comparer.Equals(p, p4));
+      Assert.IsFalse(comparer.Equals(p4, q));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PermutationManipulationTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PermutationManipulationTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PermutationManipulationTest.cs	(revision 16038)
@@ -0,0 +1,181 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  [TestClass]
+  public class PermutationManipulationTest {
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void TestPermutationSwap() {
+      var permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Swap(0, 0);
+      Assert.IsTrue(permutation.Validate());
+      var expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Swap(0, 9);
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 9, 1, 2, 3, 4, 5, 6, 7, 8, 0 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Swap(1, 3);
+      permutation.Swap(3, 5);
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 3, 2, 5, 4, 1, 6, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+    }
+
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void TestPermutationReverse() {
+      var permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Reverse(0, 0);
+      Assert.IsTrue(permutation.Validate());
+      var expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Reverse(9, 1);
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Reverse(0, 10);
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Reverse(1, 4);
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 4, 3, 2, 1, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+    }
+
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void TestPermutationMove() {
+      var permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Move(0, 0, 0);
+      Assert.IsTrue(permutation.Validate());
+      var expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Move(0, 0, 1);
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 1, 0, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Move(0, 2, 3);
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 3, 4, 5, 0, 1, 2, 6, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Move(3, 5, 0);
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 3, 4, 5, 0, 1, 2, 6, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Move(3, 5, 2);
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 3, 4, 5, 2, 6, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Move(5, 6, 8);
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 7, 8, 9, 5, 6 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Move(5, 7, 7);
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 8, 9, 5, 6, 7 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Move(2, 6, 5);
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 7, 8, 9, 2, 3, 4, 5, 6 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Move(3, 5, 4);
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 6, 3, 4, 5, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      var exception = false;
+      try {
+        permutation.Move(0, 5, 7);
+      } catch { exception = true; }
+      Assert.IsTrue(exception);
+    }
+
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void TestPermutationReplace() {
+      var permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Replace(0, new int[0]);
+      Assert.IsTrue(permutation.Validate());
+      var expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Replace(3, new [] { 3 });
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Replace(5, new [] { 8, 6, 5, 7 });
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 8, 6, 5, 7, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Replace(0, new [] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 });
+      Assert.IsTrue(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+
+      permutation = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      permutation.Replace(3, new[] { 5, 6, 7 });
+      Assert.IsFalse(permutation.Validate());
+      expected = new Permutation(PermutationTypes.Absolute, new[] { 0, 1, 2, 5, 6, 7, 6, 7, 8, 9 });
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, permutation));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PositionBasedCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PositionBasedCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/PositionBasedCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,68 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for PositionBasedCrossover and is intended
+  ///to contain all PositionBasedCrossover Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class PositionBasedCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void PositionBasedCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent1, parent2, expected, actual;
+
+      // The following test is based on an example from Larranaga, 1999. Genetic Algorithms for the Traveling Salesman Problem.
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 1, 2, 5 };
+      parent1 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });
+      Assert.IsTrue(parent2.Validate());
+
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 3, 5, 1, 2, 4, 6, 7 });
+      Assert.IsTrue(expected.Validate());
+      actual = PositionBasedCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        PositionBasedCrossover.Apply(random, new Permutation(PermutationTypes.RelativeUndirected, 8), new Permutation(PermutationTypes.RelativeUndirected, 6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/ScrambleManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/ScrambleManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/ScrambleManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for ScrambleManipulator and is intended
+  ///to contain all ScrambleManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class ScrambleManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void ScrambleManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent, expected;
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 6, 1, 1, 1, 0 };
+      parent = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent.Validate());
+
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 4, 5, 6, 3, 7 });
+      Assert.IsTrue(expected.Validate());
+      ScrambleManipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/Swap2ManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/Swap2ManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/Swap2ManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for Swap2Manipulator and is intended
+  ///to contain all Swap2Manipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class Swap2ManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void Swap2ManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent, expected;
+      // The following test is based on an example from Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, p. 45
+      random.Reset();
+      random.IntNumbers = new int[] { 1, 4 };
+      parent = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 });
+      Assert.IsTrue(parent.Validate());
+
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 4, 2, 3, 1, 5, 6, 7, 8 });
+      Assert.IsTrue(expected.Validate());
+      Swap2Manipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/Swap3ManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/Swap3ManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/Swap3ManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,55 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for Swap3Manipulator and is intended
+  ///to contain all Swap3Manipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class Swap3ManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void Swap3ManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent, expected;
+      // Test manipulator
+      random.Reset();
+      random.IntNumbers = new int[] { 1, 3, 6 };
+      random.DoubleNumbers = new double[] { 0 };
+      parent = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 });
+      Assert.IsTrue(parent.Validate());
+
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 3, 2, 6, 4, 5, 1, 7, 8 });
+      Assert.IsTrue(expected.Validate());
+      Swap3Manipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/TranslocationInversionManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/TranslocationInversionManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/TranslocationInversionManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for TranslocationInversionManipulator and is intended
+  ///to contain all TranslocationInversionManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class TranslocationInversionManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void TranslocationInversionManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent, expected;
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13
+      random.Reset();
+      random.IntNumbers = new int[] { 2, 4, 4 };
+      parent = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent.Validate());
+
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 5, 6, 4, 3, 2, 7 });
+      Assert.IsTrue(expected.Validate());
+      TranslocationInversionManipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/TranslocationManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/TranslocationManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/TranslocationManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for TranslocationManipulator and is intended
+  ///to contain all TranslocationManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class TranslocationManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void TranslocationManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation parent, expected;
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13, p. 24
+      random.Reset();
+      random.IntNumbers = new int[] { 2, 4, 4 };
+      parent = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent.Validate());
+
+      expected = new Permutation(PermutationTypes.RelativeUndirected, new int[] { 0, 1, 5, 6, 2, 3, 4, 7 });
+      Assert.IsTrue(expected.Validate());
+      TranslocationManipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/UniformLikeCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/UniformLikeCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.PermutationEncoding-3.3/UniformLikeCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,57 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.PermutationEncoding.Tests {
+  /// <summary>
+  ///This is a test class for UniformLikeCrossoverTest and is intended
+  ///to contain all UniformLikeCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class UniformLikeCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Permutation")]
+    [TestProperty("Time", "short")]
+    public void UniformLikeCrossoverApplyTest() {
+      // test from the paper
+      IRandom random = new TestRandom(new int[] { 0 }, new double[] { 0.2, 0.7, 0.2, 0.2 }); // TODO: Initialize to an appropriate value
+      Permutation parent1 = new Permutation(PermutationTypes.Absolute,
+        new int[] { 3, 2, 0, 7, 5, 4, 1, 6 });
+      Assert.IsTrue(parent1.Validate());
+      Permutation parent2 = new Permutation(PermutationTypes.Absolute,
+        new int[] { 5, 0, 4, 7, 1, 3, 2, 6 });
+      Assert.IsTrue(parent2.Validate());
+      Permutation expected = new Permutation(PermutationTypes.Absolute,
+        new int[] { 3, 0, 4, 7, 5, 2, 1, 6 });
+      Assert.IsTrue(expected.Validate());
+      Permutation actual;
+      actual = UniformLikeCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/Auxiliary.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/Auxiliary.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/Auxiliary.cs	(revision 16038)
@@ -0,0 +1,39 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  public static class Auxiliary {
+    public static bool RealVectorIsAlmostEqualByPosition(RealVector p1, RealVector p2) {
+      bool equal = (p1.Length == p2.Length);
+      if (equal) {
+        for (int i = 0; i < p1.Length; i++) {
+          if (!p1[i].IsAlmost(p2[i])) {
+            equal = false;
+            break;
+          }
+        }
+      }
+      return equal;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/BlendAlphaBetaCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/BlendAlphaBetaCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/BlendAlphaBetaCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,85 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Data;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for BlendAlphaBetaCrossoverTest and is intended
+  ///to contain all BlendAlphaBetaCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class BlendAlphaBetaCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.RealVector")]
+    [TestProperty("Time", "short")]
+    public void BlendAlphaBetaCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      RealVector parent1, parent2, expected, actual;
+      DoubleValue alpha;
+      DoubleValue beta;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.5, 0.5, 0.5, 0.5, 0.5 };
+      alpha = new DoubleValue(0.5);
+      beta = new DoubleValue(0.5);
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      expected = new RealVector(new double[] { 0.3, 0.15, 0.3, 0.35, 0.45 });
+      actual = BlendAlphaBetaCrossover.Apply(random, parent1, parent2, alpha, beta);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.25, 0.75, 0.25, 0.75, 0.25 };
+      alpha = new DoubleValue(-0.25); // negative values for alpha are not allowed
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      exceptionFired = false;
+      try {
+        actual = BlendAlphaBetaCrossover.Apply(random, parent1, parent2, alpha, beta);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.25, 0.75, 0.25, 0.75, 0.25, .75 };
+      alpha = new DoubleValue(0.25);
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      exceptionFired = false;
+      try {
+        actual = BlendAlphaBetaCrossover.Apply(random, parent1, parent2, alpha, beta);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/BlendAlphaCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/BlendAlphaCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/BlendAlphaCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,94 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Data;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for BlendAlphaCrossoverTest and is intended
+  ///to contain all BlendAlphaCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class BlendAlphaCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.RealVector")]
+    [TestProperty("Time", "short")]
+    public void BlendAlphaCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      RealVector parent1, parent2, expected, actual;
+      DoubleValue alpha;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.5, 0.5, 0.5, 0.5, 0.5 };
+      alpha = new DoubleValue(0.5);
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      expected = new RealVector(new double[] { 0.3, 0.15, 0.3, 0.35, 0.45 });
+      actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.25, 0.75, 0.25, 0.75, 0.25 };
+      alpha = new DoubleValue(0.25);
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      expected = new RealVector(new double[] { 0.225, 0.1875, 0.3, 0.4625, 0.1875 });
+      actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.25, 0.75, 0.25, 0.75, 0.25 };
+      alpha = new DoubleValue(-0.25); // negative values for alpha are not allowed
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      expected = new RealVector(new double[] { 0.225, 0.1875, 0.3, 0.4625, 0.1875 });
+      exceptionFired = false;
+      try {
+        actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.25, 0.75, 0.25, 0.75, 0.25, .75 };
+      alpha = new DoubleValue(0.25);
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      expected = new RealVector(new double[] { 0.225, 0.1875, 0.3, 0.4625, 0.1875 });
+      exceptionFired = false;
+      try {
+        actual = BlendAlphaCrossover.Apply(random, parent1, parent2, alpha);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/DiscreteCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/DiscreteCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/DiscreteCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,69 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for DiscreteCrossoverTest and is intended
+  ///to contain all DiscreteCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class DiscreteCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.RealVector")]
+    [TestProperty("Time", "short")]
+    public void DiscreteCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      RealVector parent1, parent2, expected, actual;
+      ItemArray<RealVector> parents;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 0, 0, 1, 0, 1 };
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      parents = new ItemArray<RealVector>(new RealVector[] { parent1, parent2 });
+      expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.8 });
+      actual = DiscreteCrossover.Apply(random, parents);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 0, 0, 1, 0, 1, 0 };
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      parents = new ItemArray<RealVector>(new RealVector[] { parent1, parent2 });
+      exceptionFired = false;
+      try {
+        actual = DiscreteCrossover.Apply(random, parents);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/HeuristicCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/HeuristicCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/HeuristicCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,65 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for HeuristicCrossoverTest and is intended
+  ///to contain all HeuristicCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class HeuristicCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.RealVector")]
+    [TestProperty("Time", "short")]
+    public void HeuristicCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      RealVector parent1, parent2, expected, actual;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.3 };
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      expected = new RealVector(new double[] { 0.14, 0.23, 0.3, 0.59, -0.11 });
+      actual = HeuristicCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.3 };
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      exceptionFired = false;
+      try {
+        actual = HeuristicCrossover.Apply(random, parent1, parent2);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/LocalCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/LocalCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/LocalCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,65 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for LocalCrossoverTest and is intended
+  ///to contain all LocalCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class LocalCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.RealVector")]
+    [TestProperty("Time", "short")]
+    public void LocalCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      RealVector parent1, parent2, expected, actual;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.3, 0.1, 0.2, 0.4, 0.23 };
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      expected = new RealVector(new double[] { 0.34, 0.11, 0.3, 0.32, 0.639 });
+      actual = LocalCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.3, 0.1, 0.2, 0.4, 0.23, 0.5 };
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      exceptionFired = false;
+      try {
+        actual = LocalCrossover.Apply(random, parent1, parent2);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/MichalewiczNonUniformAllPositionsManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/MichalewiczNonUniformAllPositionsManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/MichalewiczNonUniformAllPositionsManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,74 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Data;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for MichalewiczNonUniformAllPositionsManipulator and is intended
+  ///to contain all MichalewiczNonUniformAllPositionsManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class MichalewiczNonUniformAllPositionsManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.RealVector")]
+    [TestProperty("Time", "short")]
+    public void MichalewiczNonUniformAllPositionsManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      RealVector parent, expected;
+      DoubleValue generationsDependency;
+      DoubleMatrix bounds;
+      IntValue currentGeneration, maximumGenerations;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.2, 0.5, 0.7, 0.8, 0.9, 0.5, 0.2, 0.5, 0.7, 0.8 };
+      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      expected = new RealVector(new double[] { 0.45, 0.22, 0.3, 0.6, 0.14 });
+      bounds = new DoubleMatrix(new double[,] { { 0.3, 0.7 } });
+      generationsDependency = new DoubleValue(0.1);
+      currentGeneration = new IntValue(1);
+      maximumGenerations = new IntValue(4);
+      MichalewiczNonUniformAllPositionsManipulator.Apply(random, parent, bounds, currentGeneration, maximumGenerations, generationsDependency);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
+      // The following test is not based on published examples
+      exceptionFired = false;
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.2, 0.5, 0.7, 0.8, 0.9, 0.5, 0.2, 0.5, 0.7, 0.8 };
+      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      bounds = new DoubleMatrix(new double[,] { { 0.3, 0.7 } });
+      generationsDependency = new DoubleValue(0.1);
+      currentGeneration = new IntValue(5); //current generation > max generation
+      maximumGenerations = new IntValue(4);
+      try {
+        MichalewiczNonUniformAllPositionsManipulator.Apply(random, parent, bounds, currentGeneration, maximumGenerations, generationsDependency);
+      } catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/MichalewiczNonUniformOnePositionManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/MichalewiczNonUniformOnePositionManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/MichalewiczNonUniformOnePositionManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,76 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Data;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for MichalewiczNonUniformOnePositionManipulator and is intended
+  ///to contain all MichalewiczNonUniformOnePositionManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class MichalewiczNonUniformOnePositionManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.RealVector")]
+    [TestProperty("Time", "short")]
+    public void MichalewiczNonUniformOnePositionManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      RealVector parent, expected;
+      DoubleValue generationsDependency;
+      DoubleMatrix bounds;
+      IntValue currentGeneration, maximumGenerations;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 3 };
+      random.DoubleNumbers = new double[] { 0.2, 0.7 };
+      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.34, 0.1 });
+      bounds = new DoubleMatrix(new double[,] { { 0.3, 0.7 } });
+      generationsDependency = new DoubleValue(0.1);
+      currentGeneration = new IntValue(1);
+      maximumGenerations = new IntValue(4);
+      MichalewiczNonUniformOnePositionManipulator.Apply(random, parent, bounds, currentGeneration, maximumGenerations, generationsDependency);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
+      // The following test is not based on published examples
+      exceptionFired = false;
+      random.Reset();
+      random.IntNumbers = new int[] { 3 };
+      random.DoubleNumbers = new double[] { 0.2, 0.7 };
+      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      bounds = new DoubleMatrix(new double[,] { { 0.3, 0.7 } });
+      generationsDependency = new DoubleValue(0.1);
+      currentGeneration = new IntValue(5); //current generation > max generation
+      maximumGenerations = new IntValue(4);
+      try {
+        MichalewiczNonUniformOnePositionManipulator.Apply(random, parent, bounds, currentGeneration, maximumGenerations, generationsDependency);
+      } catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/PolynomialAllPositionManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/PolynomialAllPositionManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/PolynomialAllPositionManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,68 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Data;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for PolynomialAllPositionManipulator and is intended
+  ///to contain all PolynomialAllPositionManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class PolynomialAllPositionManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.RealVector")]
+    [TestProperty("Time", "short")]
+    public void PolynomialAllPositionManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      RealVector parent, expected;
+      DoubleValue contiguity, maxManipulation;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.2, 0.7, 0.8, 0.01, 0.1 };
+      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      expected = new RealVector(new double[] { 0.120213215256006, 0.249415354697564, 0.379786784743994, 0.322759240811056, -0.0182075293954083 });
+      contiguity = new DoubleValue(0.8);
+      maxManipulation = new DoubleValue(0.2);
+      PolynomialAllPositionManipulator.Apply(random, parent, contiguity, maxManipulation);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
+      // The following test is not based on published examples
+      exceptionFired = false;
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.2, 0.7, 0.8, 0.01, 0.1 };
+      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      contiguity = new DoubleValue(-1); //Contiguity value < 0
+      maxManipulation = new DoubleValue(0.2);
+      try {
+        PolynomialAllPositionManipulator.Apply(random, parent, contiguity, maxManipulation);
+      } catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/PolynomialOnePositionManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/PolynomialOnePositionManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/PolynomialOnePositionManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,70 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Data;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for PolynomialOnePositionManipulator and is intended
+  ///to contain all PolynomialOnePositionManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class PolynomialOnePositionManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.RealVector")]
+    [TestProperty("Time", "short")]
+    public void PolynomialOnePositionManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      RealVector parent, expected;
+      DoubleValue contiguity, maxManipulation;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 3 };
+      random.DoubleNumbers = new double[] { 0.2 };
+      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.1261980542102, 0.1 });
+      contiguity = new DoubleValue(0.2);
+      maxManipulation = new DoubleValue(0.7);
+      PolynomialOnePositionManipulator.Apply(random, parent, contiguity, maxManipulation);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
+      // The following test is not based on published examples
+      exceptionFired = false;
+      random.Reset();
+      random.IntNumbers = new int[] { 3 };
+      random.DoubleNumbers = new double[] { 0.2 };
+      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      contiguity = new DoubleValue(-1); //Contiguity value < 0
+      maxManipulation = new DoubleValue(0.2);
+      try {
+        PolynomialOnePositionManipulator.Apply(random, parent, contiguity, maxManipulation);
+      } catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/RandomConvexCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/RandomConvexCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/RandomConvexCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,65 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for RandomConvexCrossoverTest and is intended
+  ///to contain all RandomConvexCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class RandomConvexCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.RealVector")]
+    [TestProperty("Time", "short")]
+    public void RandomConvexCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      RealVector parent1, parent2, expected, actual;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.3 };
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      expected = new RealVector(new double[] { 0.34, 0.13, 0.3, 0.29, 0.59 });
+      actual = RandomConvexCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.3 };
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      exceptionFired = false;
+      try {
+        actual = RandomConvexCrossover.Apply(random, parent1, parent2);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/SimulatedBinaryCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/SimulatedBinaryCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/SimulatedBinaryCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,83 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Data;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for SimulatedBinaryCrossoverTest and is intended
+  ///to contain all SimulatedBinaryCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class SimulatedBinaryCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.RealVector")]
+    [TestProperty("Time", "short")]
+    public void SimulatedBinaryCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      RealVector parent1, parent2, expected, actual;
+      DoubleValue contiguity;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.3, 0.9, 0.7, 0.2, 0.8, 0.1, 0.2, 0.3, 0.4, 0.8, 0.7 };
+      contiguity = new DoubleValue(0.3);
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      expected = new RealVector(new double[] { 0.644880972204315, 0.0488239539275703, 0.3, 0.5, 0.1 });
+      actual = SimulatedBinaryCrossover.Apply(random, parent1, parent2, contiguity);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.3, 0.9, 0.7, 0.2, 0.8, 0.1, 0.2, 0.3, 0.4, 0.8, 0.7 };
+      contiguity = new DoubleValue(0.3);
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      exceptionFired = false;
+      try {
+        actual = SimulatedBinaryCrossover.Apply(random, parent1, parent2, contiguity);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+      // The following test is not based on published examples
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.3, 0.9, 0.7, 0.2, 0.8, 0.1, 0.2, 0.3, 0.4, 0.8, 0.7 };
+      contiguity = new DoubleValue(-0.3);  //  contiguity < 0
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      exceptionFired = false;
+      try {
+        actual = SimulatedBinaryCrossover.Apply(random, parent1, parent2, contiguity);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/SinglePointCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/SinglePointCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/SinglePointCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,74 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for SinglePointCrossoverTest and is intended
+  ///to contain all SinglePointCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class SinglePointCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.RealVector")]
+    [TestProperty("Time", "short")]
+    public void SinglePointCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      RealVector parent1, parent2, expected, actual;
+      bool exceptionFired;
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 3 };
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.2, 0.8 });
+      actual = SinglePointCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 2 };
+      parent1 = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1, 0.9 }); // this parent is longer
+      parent2 = new RealVector(new double[] { 0.4, 0.1, 0.3, 0.2, 0.8 });
+      exceptionFired = false;
+      try {
+        actual = SinglePointCrossover.Apply(random, parent1, parent2);
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 5 }; // should not have an effect
+      parent1 = new RealVector(new double[] { 0.2, 0.4 });
+      parent2 = new RealVector(new double[] { 0.6, 0.1 });
+      expected = new RealVector(new double[] { 0.2, 0.1 });
+      actual = SinglePointCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(actual, expected));
+      // The following test is not based on published examples
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/UniformOnePositionManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/UniformOnePositionManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.RealVectorEncoding-3.3/UniformOnePositionManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Data;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding.Tests {
+  /// <summary>
+  ///This is a test class for UniformOnePositionManipulator and is intended
+  ///to contain all UniformOnePositionManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class UniformOnePositionManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [TestCategory("Encodings.RealVector")]
+    [TestProperty("Time", "short")]
+    public void UniformOnePositionManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      RealVector parent, expected;
+      DoubleMatrix bounds;
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 3 };
+      random.DoubleNumbers = new double[] { 0.2 };
+      parent = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.5, 0.1 });
+      expected = new RealVector(new double[] { 0.2, 0.2, 0.3, 0.3, 0.1 });
+      bounds = new DoubleMatrix(new double[,] { { 0.2, 0.7 } });
+      UniformOnePositionManipulator.Apply(random, parent, bounds);
+      Assert.IsTrue(Auxiliary.RealVectorIsAlmostEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/DirectScheduleGTCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/DirectScheduleGTCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/DirectScheduleGTCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,55 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.ScheduleEncoding.PermutationWithRepetition;
+using HeuristicLab.Encodings.ScheduleEncoding.ScheduleEncoding;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding.Tests {
+  /// <summary>
+  ///This is a test class for DirectScheduleGTCrossoverTest and is intended
+  ///to contain all DirectScheduleGTCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class DirectScheduleGTCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Schedule")]
+    [TestProperty("Time", "short")]
+    public void ApplyTest() {
+      IRandom random = new TestRandom(new int[] { 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1 }, new double[] { 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9, 0.9 });
+      Schedule parent1 = TestUtils.CreateTestSchedule1();
+      Schedule parent2 = TestUtils.CreateTestSchedule2();
+      ItemList<Job> jobData = TestUtils.CreateJobData();
+      double mutProp = 0.05;
+      Schedule actual;
+      actual = DirectScheduleGTCrossover.Apply(random, parent1, parent2, jobData, mutProp);
+      Schedule expected = DirectScheduleRandomCreator.Apply(3, 3, new PWREncoding(3, 3, new TestRandom(new int[] { 0, 2, 1, 1, 0, 2, 1, 2, 0 }, null)), TestUtils.CreateJobData());
+      Assert.IsTrue(TestUtils.ScheduleEquals(actual, expected));
+    }
+
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/JSMJOXCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/JSMJOXCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/JSMJOXCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,58 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Encodings.ScheduleEncoding.JobSequenceMatrix;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding.Tests {
+  /// <summary>
+  ///This is a test class for JSMJOXCrossoverTest and is intended
+  ///to contain all JSMJOXCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class JSMJOXCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Schedule")]
+    [TestProperty("Time", "short")]
+    public void ApplyTest() {
+      IRandom random = new TestRandom(new int[] { 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1 }, null);
+      JSMEncoding p1 = TestUtils.CreateTestJSM1();
+      JSMEncoding p2 = TestUtils.CreateTestJSM2();
+      JSMEncoding expected = new JSMEncoding();
+      ItemList<Permutation> jsm = new ItemList<Permutation>();
+      for (int i = 0; i < 6; i++) {
+        jsm.Add(new Permutation(PermutationTypes.Absolute, new int[] { 5, 4, 3, 0, 1, 2 }));
+      }
+      expected.JobSequenceMatrix = jsm;
+
+      JSMEncoding actual;
+      actual = JSMJOXCrossover.Apply(random, p1, p2);
+
+      Assert.IsTrue(TestUtils.JSMEncodingEquals(expected, actual));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/JSMSXXCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/JSMSXXCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/JSMSXXCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,58 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Encodings.ScheduleEncoding.JobSequenceMatrix;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding.Tests {
+  /// <summary>
+  ///This is a test class for JSMSXXCrossoverTest and is intended
+  ///to contain all JSMSXXCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class JSMSXXCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Schedule")]
+    [TestProperty("Time", "short")]
+    public void ApplyTest() {
+      IRandom random = new TestRandom(new int[] { 3 }, null);
+      JSMEncoding p1 = TestUtils.CreateTestJSM1();
+      JSMEncoding p2 = TestUtils.CreateTestJSM2();
+      JSMEncoding expected = new JSMEncoding();
+      ItemList<Permutation> jsm = new ItemList<Permutation>();
+      for (int i = 0; i < 6; i++) {
+        jsm.Add(new Permutation(PermutationTypes.Absolute, new int[] { 2, 1, 0, 3, 4, 5 }));
+      }
+      expected.JobSequenceMatrix = jsm;
+
+      JSMEncoding actual;
+      actual = JSMSXXCrossover.Apply(random, p1, p2);
+
+      Assert.IsTrue(TestUtils.JSMEncodingEquals(expected, actual));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/JSMShiftChangeManipulatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/JSMShiftChangeManipulatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/JSMShiftChangeManipulatorTest.cs	(revision 16038)
@@ -0,0 +1,56 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Encodings.ScheduleEncoding.JobSequenceMatrix;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding.Tests {
+  /// <summary>
+  ///This is a test class for JSMShiftChangeManipulatorTest and is intended
+  ///to contain all JSMShiftChangeManipulatorTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class JSMShiftChangeManipulatorTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Schedule")]
+    [TestProperty("Time", "short")]
+    public void ApplyTest() {
+      IRandom random = new TestRandom(new int[] { 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2 }, null);
+      JSMEncoding individual = TestUtils.CreateTestJSM1();
+      JSMShiftChangeManipulator.Apply(random, individual);
+      JSMEncoding expected = new JSMEncoding();
+      ItemList<Permutation> jsm = new ItemList<Permutation>();
+      for (int i = 0; i < 3; i++) {
+        jsm.Add(new Permutation(PermutationTypes.Absolute, new int[] { 0, 1, 3, 2, 4, 5 }));
+        jsm.Add(new Permutation(PermutationTypes.Absolute, new int[] { 0, 1, 3, 4, 2, 5 }));
+      }
+      expected.JobSequenceMatrix = jsm;
+
+      Assert.IsTrue(TestUtils.JSMEncodingEquals(expected, individual));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/PWRGOXCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/PWRGOXCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/PWRGOXCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,52 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.ScheduleEncoding.PermutationWithRepetition;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding.Tests {
+  /// <summary>
+  ///This is a test class for PWRGOXCrossoverTest and is intended
+  ///to contain all PWRGOXCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class PWRGOXCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Schedule")]
+    [TestProperty("Time", "short")]
+    public void ApplyTest() {
+      IRandom random = new TestRandom(new int[] { 3 }, null);
+      PWREncoding parent1 = TestUtils.CreateTestPWR1();
+      PWREncoding parent2 = TestUtils.CreateTestPWR2();
+      PWREncoding expected = new PWREncoding();
+      expected.PermutationWithRepetition = new IntegerVector(new int[] { 1, 0, 1, 0, 2, 0, 1, 2, 2 });
+      PWREncoding actual;
+      actual = PWRGOXCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(TestUtils.PRWEncodingEquals(expected, actual));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/PWRPPXCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/PWRPPXCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/PWRPPXCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,52 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.ScheduleEncoding.PermutationWithRepetition;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding.Tests {
+  /// <summary>
+  ///This is a test class for PWRPPXCrossoverTest and is intended
+  ///to contain all PWRPPXCrossoverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class PWRPPXCrossoverTest {
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Encodings.Schedule")]
+    [TestProperty("Time", "short")]
+    public void ApplyTest() {
+      IRandom random = new TestRandom(new int[] { 1, 1, 0, 0, 1, 1, 0, 0, 1 }, null);
+      PWREncoding parent1 = TestUtils.CreateTestPWR1();
+      PWREncoding parent2 = TestUtils.CreateTestPWR2();
+      PWREncoding expected = new PWREncoding();
+      expected.PermutationWithRepetition = new IntegerVector(new int[] { 1, 0, 1, 0, 1, 2, 0, 2, 2 });
+      PWREncoding actual;
+      actual = PWRPPXCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(TestUtils.PRWEncodingEquals(expected, actual));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/TestUtils.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/TestUtils.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/TestUtils.cs	(revision 16038)
@@ -0,0 +1,151 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Encodings.ScheduleEncoding.JobSequenceMatrix;
+using HeuristicLab.Encodings.ScheduleEncoding.PermutationWithRepetition;
+using HeuristicLab.Tests;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding.Tests {
+  public class TestUtils {
+    public static JSMEncoding CreateTestJSM1() {
+      JSMEncoding result = new JSMEncoding();
+      ItemList<Permutation> jsm = new ItemList<Permutation>();
+      for (int i = 0; i < 6; i++)
+        jsm.Add(new Permutation(PermutationTypes.Absolute, new int[] { 0, 1, 2, 3, 4, 5 }));
+      result.JobSequenceMatrix = jsm;
+      return result;
+    }
+
+    public static JSMEncoding CreateTestJSM2() {
+      JSMEncoding result = new JSMEncoding();
+      ItemList<Permutation> jsm = new ItemList<Permutation>();
+      for (int i = 0; i < 6; i++)
+        jsm.Add(new Permutation(PermutationTypes.Absolute, new int[] { 5, 4, 3, 2, 1, 0 }));
+      result.JobSequenceMatrix = jsm;
+      return result;
+    }
+
+
+    public static PWREncoding CreateTestPWR1() {
+      PWREncoding result = new PWREncoding();
+      IntegerVector pwr = new IntegerVector(new int[] { 1, 0, 1, 1, 2, 0, 2, 2, 0 });
+      result.PermutationWithRepetition = pwr;
+      return result;
+    }
+
+    public static PWREncoding CreateTestPWR2() {
+      PWREncoding result = new PWREncoding();
+      IntegerVector pwr = new IntegerVector(new int[] { 0, 1, 1, 0, 2, 0, 1, 2, 2 });
+      result.PermutationWithRepetition = pwr;
+      return result;
+    }
+
+
+    public static ItemList<Job> CreateJobData() {
+      Job j1 = new Job(0, 0);
+      j1.Tasks = new ItemList<Task> { 
+        new Task (0, 0, j1.Index, 1),
+        new Task (1, 1, j1.Index, 2),
+        new Task (2, 2, j1.Index, 1)
+      };
+
+      Job j2 = new Job(1, 0);
+      j2.Tasks = new ItemList<Task> { 
+        new Task (3, 2, j2.Index, 2),
+        new Task (4, 1, j2.Index, 1),
+        new Task (5, 0, j2.Index, 2)
+      };
+
+      Job j3 = new Job(2, 0);
+      j3.Tasks = new ItemList<Task> { 
+        new Task (6, 0, j3.Index, 1),
+        new Task (7, 2, j3.Index, 2),
+        new Task (8, 1, j3.Index, 1)
+      };
+
+      return new ItemList<Job> { j1, j2, j3 };
+    }
+
+    public static Schedule CreateTestSchedule1() {
+      Schedule result = DirectScheduleRandomCreator.Apply(3, 3, new PWREncoding(3, 3, new TestRandom(new int[] { 1, 0, 1, 1, 2, 0, 2, 2, 0 }, null)), CreateJobData());
+      return result;
+    }
+
+    public static Schedule CreateTestSchedule2() {
+      Schedule result = DirectScheduleRandomCreator.Apply(3, 3, new PWREncoding(3, 3, new TestRandom(new int[] { 0, 1, 1, 0, 2, 0, 1, 2, 2 }, null)), CreateJobData());
+      return result;
+    }
+    public static bool ScheduleEquals(Schedule actual, Schedule expected) {
+      return actual.Resources.Count == expected.Resources.Count &&
+             actual.Resources.Zip(expected.Resources, (a, e) => ResourceEquals(a, e)).All(_ => _);
+    }
+
+    public static bool ResourceEquals(Resource actual, Resource expected) {
+      return actual.Index == expected.Index &&
+             actual.TotalDuration == expected.TotalDuration &&
+             actual.Tasks.Count == expected.Tasks.Count &&
+             actual.Tasks.Zip(expected.Tasks, (a, e) => TaskEquals(a, e)).All(_ => _);
+    }
+
+    public static bool TaskEquals(ScheduledTask actual, ScheduledTask expected) {
+      return
+        actual.StartTime == expected.StartTime &&
+        actual.EndTime == expected.EndTime &&
+        actual.Duration == expected.Duration &&
+        actual.ResourceNr == expected.ResourceNr &&
+        actual.JobNr == expected.JobNr &&
+        actual.TaskNr == expected.TaskNr;
+    }
+
+    public static bool JSMEncodingEquals(JSMEncoding expected, JSMEncoding actual) {
+      if (expected.JobSequenceMatrix.Count != actual.JobSequenceMatrix.Count)
+        return false;
+      for (int i = 0; i < expected.JobSequenceMatrix.Count; i++) {
+        if (!PermutationEquals(expected.JobSequenceMatrix[i], actual.JobSequenceMatrix[i]))
+          return false;
+      }
+      return true;
+    }
+    private static bool PermutationEquals(Permutation p1, Permutation p2) {
+      if (p1.Length != p2.Length)
+        return false;
+      for (int i = 0; i < p1.Length; i++) {
+        if (p1[i] != p2[i])
+          return false;
+      }
+      return true;
+    }
+
+    public static bool PRWEncodingEquals(PWREncoding expected, PWREncoding actual) {
+      if (expected.PermutationWithRepetition.Length != actual.PermutationWithRepetition.Length)
+        return false;
+      for (int i = 0; i < expected.PermutationWithRepetition.Length; i++) {
+        if (expected.PermutationWithRepetition[i] != actual.PermutationWithRepetition[i])
+          return false;
+      }
+      return true;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/AllArchitectureAlteringOperatorsTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/AllArchitectureAlteringOperatorsTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/AllArchitectureAlteringOperatorsTest.cs	(revision 16038)
@@ -0,0 +1,112 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Diagnostics;
+using HeuristicLab.Data;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class AllArchitectureAlteringOperatorsTest {
+    private const int POPULATION_SIZE = 1000;
+    private const int N_ITERATIONS = 200;
+    private const int MAX_TREE_LENGTH = 100;
+    private const int MAX_TREE_DEPTH = 10;
+
+    [TestMethod]
+    [Timeout(3600000)]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "long")]
+    public void AllArchitectureAlteringOperatorsDistributionTest() {
+      var trees = new List<ISymbolicExpressionTree>();
+      var newTrees = new List<ISymbolicExpressionTree>();
+      var grammar = Grammars.CreateArithmeticAndAdfGrammar();
+      var random = new MersenneTwister(31415);
+      SymbolicExpressionTreeStringFormatter formatter = new SymbolicExpressionTreeStringFormatter();
+      IntValue maxTreeSize = new IntValue(MAX_TREE_LENGTH);
+      IntValue maxTreeHeigth = new IntValue(MAX_TREE_DEPTH);
+      IntValue maxDefuns = new IntValue(3);
+      IntValue maxArgs = new IntValue(3);
+      for (int i = 0; i < POPULATION_SIZE; i++) {
+        var tree = ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH);
+        Util.IsValid(tree);
+        trees.Add(tree);
+      }
+      Stopwatch stopwatch = new Stopwatch();
+      int failedEvents = 0;
+      for (int g = 0; g < N_ITERATIONS; g++) {
+        for (int i = 0; i < POPULATION_SIZE; i++) {
+          if (random.NextDouble() < 0.5) {
+            // manipulate
+            stopwatch.Start();
+            var selectedTree = (ISymbolicExpressionTree)trees.SampleRandom(random).Clone();
+            var oldTree = (ISymbolicExpressionTree)selectedTree.Clone();
+            bool success = false;
+            int sw = random.Next(6);
+            switch (sw) {
+              case 0: success = ArgumentCreater.CreateNewArgument(random, selectedTree, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3); break;
+              case 1: success = ArgumentDeleter.DeleteArgument(random, selectedTree, 3, 3); break;
+              case 2: success = ArgumentDuplicater.DuplicateArgument(random, selectedTree, 3, 3); break;
+              case 3: success = SubroutineCreater.CreateSubroutine(random, selectedTree, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3); break;
+              case 4: success = SubroutineDuplicater.DuplicateSubroutine(random, selectedTree, 3, 3); break;
+              case 5: success = SubroutineDeleter.DeleteSubroutine(random, selectedTree, 3, 3); break;
+            }
+            stopwatch.Stop();
+            if (!success) failedEvents++;
+            Util.IsValid(selectedTree);
+            newTrees.Add(selectedTree);
+          } else {
+            stopwatch.Start();
+            // crossover
+            SymbolicExpressionTree par0 = null;
+            SymbolicExpressionTree par1 = null;
+            do {
+              par0 = (SymbolicExpressionTree)trees.SampleRandom(random).Clone();
+              par1 = (SymbolicExpressionTree)trees.SampleRandom(random).Clone();
+            } while (par0.Length > MAX_TREE_LENGTH || par1.Length > MAX_TREE_LENGTH);
+            var newTree = SubtreeCrossover.Cross(random, par0, par1, 0.9, MAX_TREE_LENGTH, MAX_TREE_DEPTH);
+            stopwatch.Stop();
+            Util.IsValid(newTree);
+            newTrees.Add(newTree);
+          }
+        }
+        trees = new List<ISymbolicExpressionTree>(newTrees);
+        newTrees.Clear();
+      }
+      var msPerOperation = stopwatch.ElapsedMilliseconds / ((double)POPULATION_SIZE * (double)N_ITERATIONS);
+      Console.WriteLine("AllArchitectureAlteringOperators: " + Environment.NewLine +
+        "Operations / s: ~" + Math.Round(1000.0 / (msPerOperation)) + "operations / s)" + Environment.NewLine +
+        "Failed events: " + failedEvents * 100.0 / (double)(POPULATION_SIZE * N_ITERATIONS / 2.0) + "%" + Environment.NewLine +
+        Util.GetSizeDistributionString(trees, 200, 5) + Environment.NewLine +
+        Util.GetFunctionDistributionString(trees) + Environment.NewLine +
+        Util.GetNumberOfSubtreesDistributionString(trees) + Environment.NewLine +
+        Util.GetTerminalDistributionString(trees) + Environment.NewLine
+        );
+
+      Assert.IsTrue(failedEvents * 100.0 / (POPULATION_SIZE * N_ITERATIONS / 2.0) < 75.0); // 25% of architecture operations must succeed
+      //mkommend: commented due to performance issues on the builder
+      // Assert.IsTrue(Math.Round(1000.0 / (msPerOperation)) > 800); // must achieve more than 800 ops per second
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ArgumentCreaterTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ArgumentCreaterTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ArgumentCreaterTest.cs	(revision 16038)
@@ -0,0 +1,73 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class ArgumentCreaterTest {
+    private const int POPULATION_SIZE = 1000;
+    private const int MAX_TREE_LENGTH = 100;
+    private const int MAX_TREE_DEPTH = 10;
+
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "long")]
+    public void ArgumentCreaterDistributionsTest() {
+      var trees = new List<ISymbolicExpressionTree>();
+      var grammar = Grammars.CreateArithmeticAndAdfGrammar();
+      var random = new MersenneTwister(31415);
+      int failedOps = 0;
+      for (int i = 0; i < POPULATION_SIZE; i++) {
+        ISymbolicExpressionTree tree;
+        do {
+          tree = ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH);
+          SubroutineCreater.CreateSubroutine(random, tree, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3);
+        } while (!TreeHasAdfWithParameter(tree, 3));
+        var success = ArgumentCreater.CreateNewArgument(random, tree, 60000, 100, 3, 3);
+        if (!success) failedOps++;
+        Util.IsValid(tree);
+        trees.Add(tree);
+      }
+      // difficult to make sure that create argument operations succeed because trees are macro-expanded can potentially become very big 
+      // => just test if only a small proportion fails
+      Assert.IsTrue(failedOps < POPULATION_SIZE * 0.05); // only 5% may fail
+      Console.WriteLine("ArgumentCreator: " + Environment.NewLine +
+        "Failed operations: " + failedOps * 100.0 / POPULATION_SIZE + " %" + Environment.NewLine +
+        Util.GetSizeDistributionString(trees, 200, 20) + Environment.NewLine +
+        Util.GetFunctionDistributionString(trees) + Environment.NewLine +
+        Util.GetNumberOfSubtreesDistributionString(trees) + Environment.NewLine +
+        Util.GetTerminalDistributionString(trees) + Environment.NewLine
+        );
+    }
+
+    private bool TreeHasAdfWithParameter(ISymbolicExpressionTree tree, int maxParameters) {
+      if (tree.Root.Subtrees.Count() != 2) return false;
+      var firstAdf = tree.Root.GetSubtree(1);
+      return firstAdf.Grammar.GetAllowedChildSymbols(firstAdf.Symbol, 0).Where(x => x is Argument).Count() < maxParameters;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ArgumentDeleterTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ArgumentDeleterTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ArgumentDeleterTest.cs	(revision 16038)
@@ -0,0 +1,67 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class ArgumentDeleterTest {
+    private const int POPULATION_SIZE = 1000;
+    private const int MAX_TREE_LENGTH = 100;
+    private const int MAX_TREE_DEPTH = 10;
+
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "long")]
+    public void ArgumentDeleterDistributionsTest() {
+      var trees = new List<ISymbolicExpressionTree>();
+      var grammar = Grammars.CreateArithmeticAndAdfGrammar();
+      var random = new MersenneTwister(31415);
+      for (int i = 0; i < POPULATION_SIZE; i++) {
+        ISymbolicExpressionTree tree = null;
+        do {
+          tree = ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH);
+          SubroutineCreater.CreateSubroutine(random, tree, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3);
+        } while (!TreeHasAdfWithArguments(tree));
+        var success = ArgumentDeleter.DeleteArgument(random, tree, 3, 3);
+        Assert.IsTrue(success);
+        Util.IsValid(tree);
+        trees.Add(tree);
+      }
+      Console.WriteLine("ArgumentDeleter: " + Environment.NewLine +
+        Util.GetSizeDistributionString(trees, 105, 5) + Environment.NewLine +
+        Util.GetFunctionDistributionString(trees) + Environment.NewLine +
+        Util.GetNumberOfSubtreesDistributionString(trees) + Environment.NewLine +
+        Util.GetTerminalDistributionString(trees) + Environment.NewLine
+        );
+    }
+    private bool TreeHasAdfWithArguments(ISymbolicExpressionTree tree) {
+      if (tree.Root.Subtrees.Count() != 2) return false;
+      var firstAdf = tree.Root.GetSubtree(1);
+      return firstAdf.Grammar.GetAllowedChildSymbols(firstAdf.Symbol, 0).Where(x => x is Argument).Count() >= 2;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ArgumentDuplicaterTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ArgumentDuplicaterTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ArgumentDuplicaterTest.cs	(revision 16038)
@@ -0,0 +1,68 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class ArgumentDuplicaterTest {
+    private const int POPULATION_SIZE = 1000;
+    private const int MAX_TREE_LENGTH = 100;
+    private const int MAX_TREE_DEPTH = 10;
+
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "long")]
+    public void ArgumentDuplicaterDistributionsTest() {
+      var trees = new List<ISymbolicExpressionTree>();
+      var grammar = Grammars.CreateArithmeticAndAdfGrammar();
+      var random = new MersenneTwister(31415);
+      for (int i = 0; i < POPULATION_SIZE; i++) {
+        ISymbolicExpressionTree tree = null;
+        do {
+          tree = ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH);
+          SubroutineCreater.CreateSubroutine(random, tree, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3);
+        } while (!HasAdfWithArguments(tree));
+        var success = ArgumentDuplicater.DuplicateArgument(random, tree, 3, 3);
+        Assert.IsTrue(success);
+        Util.IsValid(tree);
+        trees.Add(tree);
+      }
+      Console.WriteLine("ArgumentDuplicater: " + Environment.NewLine +
+        Util.GetSizeDistributionString(trees, 200, 5) + Environment.NewLine +
+        Util.GetFunctionDistributionString(trees) + Environment.NewLine +
+        Util.GetNumberOfSubtreesDistributionString(trees) + Environment.NewLine +
+        Util.GetTerminalDistributionString(trees) + Environment.NewLine
+        );
+    }
+
+    private bool HasAdfWithArguments(ISymbolicExpressionTree tree) {
+      if (tree.Root.Subtrees.Count() != 2) return false;
+      var firstAdf = tree.Root.GetSubtree(1);
+      return firstAdf.Grammar.GetAllowedChildSymbols(firstAdf.Symbol, 0).Where(x => x is Argument).Count() == 1;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ChangeNodeTypeManipulationTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ChangeNodeTypeManipulationTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ChangeNodeTypeManipulationTest.cs	(revision 16038)
@@ -0,0 +1,63 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class ChangeNodeTypeManipulationTest {
+    private const int POPULATION_SIZE = 1000;
+    private const int MAX_TREE_LENGTH = 100;
+    private const int MAX_TREE_DEPTH = 10;
+
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "medium")]
+    public void ChangeNodeTypeManipulationDistributionsTest() {
+      SymbolicExpressionTreeStringFormatter formatter = new SymbolicExpressionTreeStringFormatter();
+      var trees = new List<ISymbolicExpressionTree>();
+      var grammar = Grammars.CreateArithmeticAndAdfGrammar();
+      var random = new MersenneTwister(31415);
+      int failedEvents = 0;
+      for (int i = 0; i < POPULATION_SIZE; i++) {
+        var tree = ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH);
+        string originalTree = formatter.Format(tree);
+        ChangeNodeTypeManipulation.ChangeNodeType(random, tree);
+        string manipulatedTree = formatter.Format(tree);
+        if (originalTree == manipulatedTree) failedEvents++;
+        Util.IsValid(tree);
+        trees.Add(tree);
+      }
+      Console.WriteLine("ChangeNodeTypeManipulation: " + Environment.NewLine +
+        "Failed events: " + failedEvents * 100.0 / POPULATION_SIZE + " %" + Environment.NewLine +
+        Util.GetSizeDistributionString(trees, 105, 5) + Environment.NewLine +
+        Util.GetFunctionDistributionString(trees) + Environment.NewLine +
+        Util.GetNumberOfSubtreesDistributionString(trees) + Environment.NewLine +
+        Util.GetTerminalDistributionString(trees) + Environment.NewLine
+        );
+      Assert.IsTrue(failedEvents * 100.0 / POPULATION_SIZE < 5.0); // only max 5% failed mutations are allowed
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/FullTreeCreatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/FullTreeCreatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/FullTreeCreatorTest.cs	(revision 16038)
@@ -0,0 +1,78 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Diagnostics;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class FullTreeCreatorTest {
+    private const int POPULATION_SIZE = 10000;
+    private const int MAX_TREE_DEPTH = 9;
+    private const int MAX_TREE_LENGTH = 256;
+
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "long")]
+    public void FullTreeCreatorDistributionsTest() {
+      var randomTrees = new List<ISymbolicExpressionTree>();
+      var grammar = Grammars.CreateSimpleArithmeticGrammar();
+      var random = new MersenneTwister(31415);
+      var stopwatch = new Stopwatch();
+      stopwatch.Start();
+      for (int i = 0; i != POPULATION_SIZE; i++) {
+        randomTrees.Add(FullTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH));
+      }
+      stopwatch.Stop();
+      double msPerRandomTreeCreation = stopwatch.ElapsedMilliseconds / (double)POPULATION_SIZE;
+      int count = 0;
+      int depth = 0;
+      int maxLength = 0;
+      foreach (var tree in randomTrees) {
+        Util.IsValid(tree);
+        Assert.IsTrue(tree.Depth-1 == MAX_TREE_DEPTH);
+        if (maxLength < tree.Length)
+          maxLength = tree.Length;
+        count += tree.Length;
+        depth += tree.Depth;
+      }
+
+      Console.WriteLine("FullTreeCreator: " + Environment.NewLine +
+        msPerRandomTreeCreation + " ms per random tree (~" +
+        Math.Round(1000.0 / (msPerRandomTreeCreation)) + "random trees / s)" + Environment.NewLine +
+        Util.GetSizeDistributionString(randomTrees, maxLength, 5) + Environment.NewLine +
+        Util.GetFunctionDistributionString(randomTrees) + Environment.NewLine +
+        Util.GetNumberOfSubtreesDistributionString(randomTrees) + Environment.NewLine +
+        Util.GetTerminalDistributionString(randomTrees) + Environment.NewLine +
+        "Average tree depth: " + depth / POPULATION_SIZE + Environment.NewLine +
+        "Average tree length: " + count / POPULATION_SIZE + Environment.NewLine +
+        "Maximum tree length: " + maxLength + Environment.NewLine +
+        "Total nodes created: " + count + Environment.NewLine
+        );
+      //mkommend: commented due to performance issues on the builder
+      //Assert.IsTrue(Math.Round(1000.0 / (msPerRandomTreeCreation)) > 300); // must achieve more than 300 random trees / s
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/Grammars.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/Grammars.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/Grammars.cs	(revision 16038)
@@ -0,0 +1,51 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  public static class Grammars {
+    public static ISymbolicExpressionGrammar CreateSimpleArithmeticGrammar() {
+      var g = new TypeCoherentExpressionGrammar();
+      g.ConfigureAsDefaultRegressionGrammar();
+      g.Symbols.OfType<Variable>().First().Enabled = false;
+      //var g = new SimpleArithmeticGrammar();
+      g.MaximumFunctionArguments = 0;
+      g.MinimumFunctionArguments = 0;
+      g.MaximumFunctionDefinitions = 0;
+      g.MinimumFunctionDefinitions = 0;
+      return g;
+    }
+
+    public static ISymbolicExpressionGrammar CreateArithmeticAndAdfGrammar() {
+      var g = new TypeCoherentExpressionGrammar();
+      g.ConfigureAsDefaultRegressionGrammar();
+      g.Symbols.OfType<Variable>().First().Enabled = false;
+      g.MaximumFunctionArguments = 3;
+      g.MinimumFunctionArguments = 0;
+      g.MaximumFunctionDefinitions = 3;
+      g.MinimumFunctionDefinitions = 0;
+      return g;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/GrammarsTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/GrammarsTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/GrammarsTest.cs	(revision 16038)
@@ -0,0 +1,366 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class GrammarsTest {
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "short")]
+    public void MinimumExpressionLengthTest() {
+      {
+        var grammar = CreateTestGrammar1();
+
+        var prs = grammar.ProgramRootSymbol;
+        var ss = grammar.StartSymbol;
+        var x = grammar.Symbols.First(s => s.Name == "<x>");
+
+        Assert.AreEqual(8, grammar.GetMinimumExpressionLength(prs));
+        Assert.AreEqual(7, grammar.GetMinimumExpressionLength(ss));
+        Assert.AreEqual(6, grammar.GetMinimumExpressionLength(x));
+      }
+
+      {
+        var grammar = CreateTestGrammar2();
+
+        var prs = grammar.ProgramRootSymbol;
+        var ss = grammar.StartSymbol;
+        var x = grammar.Symbols.First(s => s.Name == "<x>");
+
+        Assert.AreEqual(13, grammar.GetMinimumExpressionLength(prs));
+        Assert.AreEqual(12, grammar.GetMinimumExpressionLength(ss));
+        Assert.AreEqual(11, grammar.GetMinimumExpressionLength(x));
+      }
+
+      {
+        var grammar = CreateTestGrammar3();
+        var prs = grammar.ProgramRootSymbol;
+        var ss = grammar.StartSymbol;
+        var x = grammar.Symbols.First(s => s.Name == "<x>");
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionLength(prs));
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionLength(ss));
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionLength(x));
+      }
+
+      {
+        var grammar = CreateTestGrammar4();
+        var prs = grammar.ProgramRootSymbol;
+        var ss = grammar.StartSymbol;
+        var x = grammar.Symbols.First(s => s.Name == "<x>");
+        var y = grammar.Symbols.First(s => s.Name == "<y>");
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionLength(prs));
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionLength(ss));
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionLength(x));
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionLength(y));
+      }
+
+      {
+        var grammar = CreateTestGrammar5();
+        var prs = grammar.ProgramRootSymbol;
+        var ss = grammar.StartSymbol;
+        var x = grammar.Symbols.First(s => s.Name == "<x>");
+        var y = grammar.Symbols.First(s => s.Name == "<y>");
+        Assert.AreEqual(5, grammar.GetMinimumExpressionLength(prs));
+        Assert.AreEqual(4, grammar.GetMinimumExpressionLength(ss));
+        Assert.AreEqual(3, grammar.GetMinimumExpressionLength(x));
+        Assert.AreEqual(2, grammar.GetMinimumExpressionLength(y));
+      }
+
+      {
+        var grammar = CreateTestGrammar6();
+        var prs = grammar.ProgramRootSymbol;
+        var ss = grammar.StartSymbol;
+        var x = grammar.Symbols.First(s => s.Name == "<x>");
+        var s_ = grammar.Symbols.First(s => s.Name == "<s>");
+        var a = grammar.Symbols.First(s => s.Name == "<a>");
+        var b = grammar.Symbols.First(s => s.Name == "<b>");
+        var c = grammar.Symbols.First(s => s.Name == "<c>");
+        var d = grammar.Symbols.First(s => s.Name == "<d>");
+        Assert.AreEqual(4, grammar.GetMinimumExpressionLength(prs));
+        Assert.AreEqual(3, grammar.GetMinimumExpressionLength(ss));
+        Assert.AreEqual(2, grammar.GetMinimumExpressionLength(x));
+        Assert.AreEqual(5, grammar.GetMinimumExpressionLength(s_));
+        Assert.AreEqual(4, grammar.GetMinimumExpressionLength(a));
+        Assert.AreEqual(3, grammar.GetMinimumExpressionLength(b));
+        Assert.AreEqual(4, grammar.GetMinimumExpressionLength(c));
+        Assert.AreEqual(3, grammar.GetMinimumExpressionLength(d));
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "short")]
+    public void MinimumExpressionDepthTest() {
+      {
+        var grammar = CreateTestGrammar1();
+
+        var prs = grammar.ProgramRootSymbol;
+        var ss = grammar.StartSymbol;
+        var a = grammar.Symbols.First(s => s.Name == "<a>");
+        var b = grammar.Symbols.First(s => s.Name == "<b>");
+        var c = grammar.Symbols.First(s => s.Name == "<c>");
+        var d = grammar.Symbols.First(s => s.Name == "<d>");
+        var x = grammar.Symbols.First(s => s.Name == "x");
+        var y = grammar.Symbols.First(s => s.Name == "y");
+
+        Assert.AreEqual(5, grammar.GetMinimumExpressionDepth(prs));
+        Assert.AreEqual(4, grammar.GetMinimumExpressionDepth(ss));
+        Assert.AreEqual(5, grammar.GetMinimumExpressionDepth(a));
+        Assert.AreEqual(4, grammar.GetMinimumExpressionDepth(b));
+        Assert.AreEqual(3, grammar.GetMinimumExpressionDepth(c));
+        Assert.AreEqual(2, grammar.GetMinimumExpressionDepth(d));
+        Assert.AreEqual(1, grammar.GetMinimumExpressionDepth(x));
+        Assert.AreEqual(1, grammar.GetMinimumExpressionDepth(y));
+      }
+
+      {
+        var grammar = CreateTestGrammar2();
+
+        var prs = grammar.ProgramRootSymbol;
+        var ss = grammar.StartSymbol;
+        var a = grammar.Symbols.First(s => s.Name == "<a>");
+        var b = grammar.Symbols.First(s => s.Name == "<b>");
+        var c = grammar.Symbols.First(s => s.Name == "<c>");
+        var d = grammar.Symbols.First(s => s.Name == "<d>");
+        var x = grammar.Symbols.First(s => s.Name == "x");
+        var y = grammar.Symbols.First(s => s.Name == "y");
+
+        Assert.AreEqual(5, grammar.GetMinimumExpressionDepth(prs));
+        Assert.AreEqual(4, grammar.GetMinimumExpressionDepth(ss));
+        Assert.AreEqual(5, grammar.GetMinimumExpressionDepth(a));
+        Assert.AreEqual(4, grammar.GetMinimumExpressionDepth(b));
+        Assert.AreEqual(3, grammar.GetMinimumExpressionDepth(c));
+        Assert.AreEqual(2, grammar.GetMinimumExpressionDepth(d));
+        Assert.AreEqual(1, grammar.GetMinimumExpressionDepth(x));
+        Assert.AreEqual(1, grammar.GetMinimumExpressionDepth(y));
+      }
+
+      {
+        var grammar = CreateTestGrammar3();
+        var prs = grammar.ProgramRootSymbol;
+        var ss = grammar.StartSymbol;
+        var x = grammar.Symbols.First(s => s.Name == "<x>");
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionDepth(prs));
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionDepth(ss));
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionDepth(x));
+      }
+
+      {
+        var grammar = CreateTestGrammar4();
+        var prs = grammar.ProgramRootSymbol;
+        var ss = grammar.StartSymbol;
+        var x = grammar.Symbols.First(s => s.Name == "<x>");
+        var y = grammar.Symbols.First(s => s.Name == "<y>");
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionDepth(prs));
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionDepth(ss));
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionDepth(x));
+        Assert.AreEqual(int.MaxValue, grammar.GetMinimumExpressionDepth(y));
+      }
+
+      {
+        var grammar = CreateTestGrammar5();
+        var prs = grammar.ProgramRootSymbol;
+        var ss = grammar.StartSymbol;
+        var x = grammar.Symbols.First(s => s.Name == "<x>");
+        var y = grammar.Symbols.First(s => s.Name == "<y>");
+        Assert.AreEqual(5, grammar.GetMinimumExpressionDepth(prs));
+        Assert.AreEqual(4, grammar.GetMinimumExpressionDepth(ss));
+        Assert.AreEqual(3, grammar.GetMinimumExpressionDepth(x));
+        Assert.AreEqual(2, grammar.GetMinimumExpressionDepth(y));
+      }
+
+      {
+        var grammar = CreateTestGrammar6();
+        var prs = grammar.ProgramRootSymbol;
+        var ss = grammar.StartSymbol;
+        var x = grammar.Symbols.First(s => s.Name == "<x>");
+        var s_ = grammar.Symbols.First(s => s.Name == "<s>");
+        var a = grammar.Symbols.First(s => s.Name == "<a>");
+        var b = grammar.Symbols.First(s => s.Name == "<b>");
+        var c = grammar.Symbols.First(s => s.Name == "<c>");
+        var d = grammar.Symbols.First(s => s.Name == "<d>");
+        Assert.AreEqual(4, grammar.GetMinimumExpressionDepth(prs));
+        Assert.AreEqual(3, grammar.GetMinimumExpressionDepth(ss));
+        Assert.AreEqual(2, grammar.GetMinimumExpressionDepth(x));
+        Assert.AreEqual(5, grammar.GetMinimumExpressionDepth(s_));
+        Assert.AreEqual(4, grammar.GetMinimumExpressionDepth(a));
+        Assert.AreEqual(3, grammar.GetMinimumExpressionDepth(b));
+        Assert.AreEqual(4, grammar.GetMinimumExpressionDepth(c));
+        Assert.AreEqual(3, grammar.GetMinimumExpressionDepth(d));
+      }
+    }
+
+    private static ISymbolicExpressionGrammar CreateTestGrammar1() {
+      var grammar = new SimpleSymbolicExpressionGrammar();
+      var x = new SimpleSymbol("<x>", 1);
+      var z = new SimpleSymbol("<z>", 6);
+      var a = new SimpleSymbol("<a>", 1);
+      var b = new SimpleSymbol("<b>", 1);
+      var c = new SimpleSymbol("<c>", 1);
+      var d = new SimpleSymbol("<d>", 1);
+
+      var _x = new SimpleSymbol("x", 0);
+      var _y = new SimpleSymbol("y", 0);
+
+      grammar.AddSymbol(x);
+      grammar.AddSymbol(z);
+      grammar.AddSymbol(a);
+      grammar.AddSymbol(b);
+      grammar.AddSymbol(c);
+      grammar.AddSymbol(d);
+      grammar.AddSymbol(_x);
+      grammar.AddSymbol(_y);
+
+      grammar.AddAllowedChildSymbol(grammar.StartSymbol, x);
+      //uncommenting the line below changes the minimum expression length for the symbol <x>
+      grammar.AddAllowedChildSymbol(x, z);
+      grammar.AddAllowedChildSymbol(z, _x);
+      grammar.AddAllowedChildSymbol(x, a);
+      grammar.AddAllowedChildSymbol(a, b);
+      grammar.AddAllowedChildSymbol(b, c);
+      grammar.AddAllowedChildSymbol(c, d);
+      grammar.AddAllowedChildSymbol(d, _y);
+
+      return grammar;
+    }
+
+    private static ISymbolicExpressionGrammar CreateTestGrammar2() {
+      var grammar = new SimpleSymbolicExpressionGrammar();
+      var x = new SimpleSymbol("<x>", 2);
+      var z = new SimpleSymbol("<z>", 6);
+      var a = new SimpleSymbol("<a>", 1);
+      var b = new SimpleSymbol("<b>", 1);
+      var c = new SimpleSymbol("<c>", 1);
+      var d = new SimpleSymbol("<d>", 1);
+
+      var _x = new SimpleSymbol("x", 0);
+      var _y = new SimpleSymbol("y", 0);
+
+      grammar.AddSymbol(x);
+      grammar.AddSymbol(z);
+      grammar.AddSymbol(a);
+      grammar.AddSymbol(b);
+      grammar.AddSymbol(c);
+      grammar.AddSymbol(d);
+      grammar.AddSymbol(_x);
+      grammar.AddSymbol(_y);
+
+      grammar.AddAllowedChildSymbol(grammar.StartSymbol, x);
+      //uncommenting the line below changes the minimum expression length for the symbol <x>
+      grammar.AddAllowedChildSymbol(x, z);
+      grammar.AddAllowedChildSymbol(z, _x);
+      grammar.AddAllowedChildSymbol(x, a);
+      grammar.AddAllowedChildSymbol(a, b);
+      grammar.AddAllowedChildSymbol(b, c);
+      grammar.AddAllowedChildSymbol(c, d);
+      grammar.AddAllowedChildSymbol(d, _y);
+
+      return grammar;
+    }
+
+    private static ISymbolicExpressionGrammar CreateTestGrammar3() {
+      var grammar = new SimpleSymbolicExpressionGrammar();
+      var x = new SimpleSymbol("<x>", 1);
+
+      grammar.AddSymbol(x);
+
+      grammar.AddAllowedChildSymbol(grammar.StartSymbol, x);
+      grammar.AddAllowedChildSymbol(x, x);
+      return grammar;
+    }
+
+
+    private static ISymbolicExpressionGrammar CreateTestGrammar4() {
+      var grammar = new SimpleSymbolicExpressionGrammar();
+      var x = new SimpleSymbol("<x>", 1);
+      var y = new SimpleSymbol("<y>", 1);
+
+      grammar.AddSymbol(x);
+      grammar.AddSymbol(y);
+
+      grammar.AddAllowedChildSymbol(grammar.StartSymbol, x);
+      grammar.AddAllowedChildSymbol(x, x);
+      grammar.AddAllowedChildSymbol(x, y);
+      grammar.AddAllowedChildSymbol(y, x);
+      grammar.AddAllowedChildSymbol(y, y);
+      return grammar;
+    }
+
+    private static ISymbolicExpressionGrammar CreateTestGrammar5() {
+      var grammar = new SimpleSymbolicExpressionGrammar();
+      var x = new SimpleSymbol("<x>", 1);
+      var y = new SimpleSymbol("<y>", 1);
+      var _x = new SimpleSymbol("x", 0);
+
+      grammar.AddSymbol(x);
+      grammar.AddSymbol(y);
+      grammar.AddSymbol(_x);
+
+      grammar.AddAllowedChildSymbol(grammar.StartSymbol, x);
+      grammar.AddAllowedChildSymbol(x, x);
+      grammar.AddAllowedChildSymbol(x, y);
+      grammar.AddAllowedChildSymbol(y, x);
+      grammar.AddAllowedChildSymbol(y, y);
+      grammar.AddAllowedChildSymbol(y, _x);
+      return grammar;
+    }
+
+    private static ISymbolicExpressionGrammar CreateTestGrammar6() {
+      var grammar = new SimpleSymbolicExpressionGrammar();
+      var x = new SimpleSymbol("<x>", 1);
+      var s = new SimpleSymbol("<s>", 1);
+      var a = new SimpleSymbol("<a>", 1);
+      var b = new SimpleSymbol("<b>", 1);
+      var c = new SimpleSymbol("<c>", 1);
+      var d = new SimpleSymbol("<d>", 1);
+      var e = new SimpleSymbol("<e>", 1);
+
+      var _x = new SimpleSymbol("x", 0);
+      var _y = new SimpleSymbol("y", 0);
+
+      grammar.AddSymbol(x);
+      grammar.AddSymbol(s);
+      grammar.AddSymbol(a);
+      grammar.AddSymbol(b);
+      grammar.AddSymbol(c);
+      grammar.AddSymbol(d);
+      grammar.AddSymbol(e);
+      grammar.AddSymbol(_x);
+      grammar.AddSymbol(_y);
+
+      grammar.AddAllowedChildSymbol(grammar.StartSymbol, x);
+      grammar.AddAllowedChildSymbol(x, s);
+      grammar.AddAllowedChildSymbol(x, _x);
+      grammar.AddAllowedChildSymbol(s, a);
+      grammar.AddAllowedChildSymbol(a, b);
+      grammar.AddAllowedChildSymbol(a, c);
+      grammar.AddAllowedChildSymbol(b, x);
+      grammar.AddAllowedChildSymbol(c, d);
+      grammar.AddAllowedChildSymbol(d, e);
+      grammar.AddAllowedChildSymbol(e, _y);
+
+      return grammar;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/GrowTreeCreatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/GrowTreeCreatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/GrowTreeCreatorTest.cs	(revision 16038)
@@ -0,0 +1,77 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Diagnostics;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class GrowTreeCreatorTest {
+    private const int POPULATION_SIZE = 10000;
+    private const int MAX_TREE_DEPTH = 10;
+    private const int MAX_TREE_LENGTH = 50;
+
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "long")]
+    public void GrowTreeCreatorDistributionsTest() {
+      var randomTrees = new List<ISymbolicExpressionTree>();
+      var grammar = Grammars.CreateSimpleArithmeticGrammar();
+      var random = new MersenneTwister(31415);
+      var stopwatch = new Stopwatch();
+      stopwatch.Start();
+      for (int i = 0; i != POPULATION_SIZE; i++) {
+        randomTrees.Add(GrowTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH));
+      }
+      stopwatch.Stop();
+
+      int count = 0;
+      int depth = 0;
+      int maxLength = 0;
+      foreach (var tree in randomTrees) {
+        Util.IsValid(tree);
+        if (maxLength < tree.Length)
+          maxLength = tree.Length;
+        count += tree.Length;
+        depth += tree.Depth;
+      }
+
+      double msPerRandomTreeCreation = stopwatch.ElapsedMilliseconds / (double)POPULATION_SIZE;
+
+      Console.WriteLine("GrowTreeCreator: " + Environment.NewLine +
+        msPerRandomTreeCreation + " ms per random tree (~" + Math.Round(1000.0 / (msPerRandomTreeCreation)) + "random trees / s)" + Environment.NewLine +
+        Util.GetSizeDistributionString(randomTrees, maxLength, 5) + Environment.NewLine +
+        Util.GetFunctionDistributionString(randomTrees) + Environment.NewLine +
+        Util.GetNumberOfSubtreesDistributionString(randomTrees) + Environment.NewLine +
+        Util.GetTerminalDistributionString(randomTrees) + Environment.NewLine +
+        "Average tree depth: " + depth / POPULATION_SIZE + Environment.NewLine +
+        "Average tree length: " + count / POPULATION_SIZE + Environment.NewLine +
+        "Total nodes created: " + count + Environment.NewLine
+        );
+      //mkommend: commented due to performance issues on the builder
+      //Assert.IsTrue(Math.Round(1000.0 / (msPerRandomTreeCreation)) > 300); // must achieve more than 300 random trees / s
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ProbabilisticTreeCreatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ProbabilisticTreeCreatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ProbabilisticTreeCreatorTest.cs	(revision 16038)
@@ -0,0 +1,85 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Diagnostics;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class ProbabilisticTreeCreatorTest {
+    private const int POPULATION_SIZE = 10000;
+    private const int MAX_TREE_LENGTH = 100;
+    private const int MAX_TREE_DEPTH = 10;
+
+    [TestMethod()]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "long")]
+    public void ProbabilisticTreeCreaterDistributionsTest() {
+      var randomTrees = new List<ISymbolicExpressionTree>();
+      var grammar = Grammars.CreateSimpleArithmeticGrammar();
+      var random = new MersenneTwister(31415);
+      var stopwatch = new Stopwatch();
+      stopwatch.Start();
+      for (int i = 0; i < POPULATION_SIZE; i++) {
+        randomTrees.Add(ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH));
+      }
+      stopwatch.Stop();
+
+      int count = 0;
+      int depth = 0;
+      foreach (var tree in randomTrees) {
+        Util.IsValid(tree);
+        count += tree.Length;
+        depth += tree.Depth;
+      }
+      double msPerRandomTreeCreation = stopwatch.ElapsedMilliseconds / (double)POPULATION_SIZE;
+
+      Console.WriteLine("ProbabilisticTreeCreator: " + Environment.NewLine +
+        msPerRandomTreeCreation + " ms per random tree (~" + Math.Round(1000.0 / (msPerRandomTreeCreation)) + "random trees / s)" + Environment.NewLine +
+        Util.GetSizeDistributionString(randomTrees, 105, 5) + Environment.NewLine +
+        Util.GetFunctionDistributionString(randomTrees) + Environment.NewLine +
+        Util.GetNumberOfSubtreesDistributionString(randomTrees) + Environment.NewLine +
+        Util.GetTerminalDistributionString(randomTrees) + Environment.NewLine +
+        "Average tree depth: " + depth / POPULATION_SIZE + Environment.NewLine +
+        "Average tree length: " + count / POPULATION_SIZE + Environment.NewLine +
+        "Total nodes created: " + count + Environment.NewLine
+        );
+      //mkommend: commented due to performance issues on the builder
+      // Assert.IsTrue(Math.Round(1000.0 / (msPerRandomTreeCreation)) > 250); // must achieve more than 250 random trees / s
+    }
+
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "short")]
+    public void ProbabilisticTreeCreatorSpecificTreeSizesTest() {
+      var grammar = Grammars.CreateSimpleArithmeticGrammar();
+      var random = new MersenneTwister(31415);
+
+      for (int targetTreeSize = 3; targetTreeSize <= 100; targetTreeSize++) {
+        var tree = ProbabilisticTreeCreator.CreateExpressionTree(random, grammar, targetTreeSize, ((int)Math.Log(targetTreeSize, 2)) + 2);
+        Assert.AreEqual(targetTreeSize, tree.Length);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ReplaceBranchManipulationTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ReplaceBranchManipulationTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/ReplaceBranchManipulationTest.cs	(revision 16038)
@@ -0,0 +1,61 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class ReplaceBranchManipulationTest {
+    private const int POPULATION_SIZE = 1000;
+    private const int MAX_TREE_LENGTH = 100;
+    private const int MAX_TREE_DEPTH = 10;
+
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "long")]
+    public void ReplaceBranchManipulationDistributionsTest() {
+      SymbolicExpressionTreeStringFormatter formatter = new SymbolicExpressionTreeStringFormatter();
+      var trees = new List<ISymbolicExpressionTree>();
+      var grammar = Grammars.CreateArithmeticAndAdfGrammar();
+      var random = new MersenneTwister(31415);
+      for (int i = 0; i < POPULATION_SIZE; i++) {
+        var tree = ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH);
+        SubroutineCreater.CreateSubroutine(random, tree, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3);
+        string originalTree = formatter.Format(tree);
+        ReplaceBranchManipulation.ReplaceRandomBranch(random, tree, MAX_TREE_LENGTH, MAX_TREE_DEPTH);
+        string manipulatedTree = formatter.Format(tree);
+        Assert.IsFalse(originalTree == manipulatedTree);
+        Util.IsValid(tree);
+        trees.Add(tree);
+      }
+      Console.WriteLine("ReplaceBranchManipulation: " + Environment.NewLine +
+        Util.GetSizeDistributionString(trees, 105, 5) + Environment.NewLine +
+        Util.GetFunctionDistributionString(trees) + Environment.NewLine +
+        Util.GetNumberOfSubtreesDistributionString(trees) + Environment.NewLine +
+        Util.GetTerminalDistributionString(trees) + Environment.NewLine
+        );
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubroutineCreaterTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubroutineCreaterTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubroutineCreaterTest.cs	(revision 16038)
@@ -0,0 +1,57 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class SubroutineCreaterTest {
+    private const int POPULATION_SIZE = 1000;
+    private const int MAX_TREE_LENGTH = 100;
+    private const int MAX_TREE_DEPTH = 10;
+
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "long")]
+    public void SubroutineCreaterDistributionsTest() {
+      var trees = new List<ISymbolicExpressionTree>();
+      var grammar = Grammars.CreateArithmeticAndAdfGrammar();
+      var random = new MersenneTwister(31415);
+      for (int i = 0; i < POPULATION_SIZE; i++) {
+        ISymbolicExpressionTree tree = null;
+        tree = ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH - 10, MAX_TREE_DEPTH);
+        var success = SubroutineCreater.CreateSubroutine(random, tree, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3);
+        Assert.IsTrue(success);
+        Util.IsValid(tree);
+        trees.Add(tree);
+      }
+      Console.WriteLine("SubroutineCreator: " + Environment.NewLine +
+        Util.GetSizeDistributionString(trees, 105, 5) + Environment.NewLine +
+        Util.GetFunctionDistributionString(trees) + Environment.NewLine +
+        Util.GetNumberOfSubtreesDistributionString(trees) + Environment.NewLine +
+        Util.GetTerminalDistributionString(trees) + Environment.NewLine
+        );
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubroutineDeleterTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubroutineDeleterTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubroutineDeleterTest.cs	(revision 16038)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class SubroutineDeleterTest {
+    private const int POPULATION_SIZE = 1000;
+    private const int MAX_TREE_LENGTH = 100;
+    private const int MAX_TREE_DEPTH = 10;
+
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "long")]
+    public void SubroutineDeleterDistributionsTest() {
+      var trees = new List<ISymbolicExpressionTree>();
+      var grammar = Grammars.CreateArithmeticAndAdfGrammar();
+      var random = new MersenneTwister(31415);
+      for (int i = 0; i < POPULATION_SIZE; i++) {
+        ISymbolicExpressionTree tree = null;
+        do {
+          tree = ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH);
+          SubroutineCreater.CreateSubroutine(random, tree, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3);
+          SubroutineCreater.CreateSubroutine(random, tree, MAX_TREE_LENGTH, MAX_TREE_DEPTH, 3, 3);
+        } while (!HasAtLeastOneAdf(tree));
+        var success = SubroutineDeleter.DeleteSubroutine(random, tree, 3, 3);
+        Assert.IsTrue(success);
+        Util.IsValid(tree);
+        trees.Add(tree);
+      }
+      Console.WriteLine("SubroutineDeleter: " + Environment.NewLine +
+        Util.GetSizeDistributionString(trees, 105, 5) + Environment.NewLine +
+        Util.GetFunctionDistributionString(trees) + Environment.NewLine +
+        Util.GetNumberOfSubtreesDistributionString(trees) + Environment.NewLine +
+        Util.GetTerminalDistributionString(trees) + Environment.NewLine
+        );
+    }
+
+    private bool HasAtLeastOneAdf(ISymbolicExpressionTree tree) {
+      return tree.Root.Subtrees.Count() > 1;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubroutineDuplicaterTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubroutineDuplicaterTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubroutineDuplicaterTest.cs	(revision 16038)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class SubroutineDuplicaterTest {
+    private const int POPULATION_SIZE = 1000;
+    private const int MAX_TREE_LENGTH = 100;
+    private const int MAX_TREE_DEPTH = 10;
+
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "long")]
+    public void SubroutineDuplicaterDistributionsTest() {
+      var trees = new List<ISymbolicExpressionTree>();
+      var grammar = Grammars.CreateArithmeticAndAdfGrammar();
+      var random = new MersenneTwister();
+      for (int i = 0; i < POPULATION_SIZE; i++) {
+        ISymbolicExpressionTree tree = null;
+        do {
+          tree = ProbabilisticTreeCreator.Create(random, grammar, MAX_TREE_LENGTH, MAX_TREE_DEPTH);
+          for (int j = random.Next(3); j < 3; j++)
+            SubroutineCreater.CreateSubroutine(random, tree, 100, 10, 3, 3);
+        } while (!HasOneAdf(tree));
+        var success = SubroutineDuplicater.DuplicateSubroutine(random, tree, 3, 3);
+        Assert.IsTrue(success);
+        Util.IsValid(tree);
+        trees.Add(tree);
+      }
+      Console.WriteLine("SubroutineDuplicater: " + Environment.NewLine +
+        Util.GetSizeDistributionString(trees, 105, 5) + Environment.NewLine +
+        Util.GetFunctionDistributionString(trees) + Environment.NewLine +
+        Util.GetNumberOfSubtreesDistributionString(trees) + Environment.NewLine +
+        Util.GetTerminalDistributionString(trees) + Environment.NewLine
+        );
+    }
+
+    private bool HasOneAdf(ISymbolicExpressionTree tree) {
+      return tree.Root.Subtrees.Count() == 2;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubtreeCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubtreeCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubtreeCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,75 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Diagnostics;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  [TestClass]
+  public class SubtreeCrossoverTest {
+    private const int POPULATION_SIZE = 1000;
+
+    [TestMethod]
+    [TestCategory("Encodings.SymbolicExpressionTree")]
+    [TestProperty("Time", "long")]
+    public void SubtreeCrossoverDistributionsTest() {
+      int generations = 5;
+      var trees = new List<ISymbolicExpressionTree>();
+      var grammar = Grammars.CreateArithmeticAndAdfGrammar();
+      var random = new MersenneTwister(31415);
+      double msPerCrossoverEvent;
+
+      for (int i = 0; i < POPULATION_SIZE; i++) {
+        trees.Add(ProbabilisticTreeCreator.Create(random, grammar, 100, 10));
+        for (int j = random.Next(3); j < 3; j++)
+          SubroutineCreater.CreateSubroutine(random, trees[i], 100, 10, 3, 3);
+      }
+      Stopwatch stopwatch = new Stopwatch();
+      stopwatch.Start();
+      for (int gCount = 0; gCount < generations; gCount++) {
+        for (int i = 0; i < POPULATION_SIZE; i++) {
+          var par0 = (ISymbolicExpressionTree)trees.SampleRandom(random).Clone();
+          var par1 = (ISymbolicExpressionTree)trees.SampleRandom(random).Clone();
+          SubtreeCrossover.Cross(random, par0, par1, 0.9, 100, 10);
+        }
+      }
+      stopwatch.Stop();
+      foreach (var tree in trees)
+        Util.IsValid(tree);
+
+      msPerCrossoverEvent = stopwatch.ElapsedMilliseconds / (double)POPULATION_SIZE / (double)generations;
+
+      Console.WriteLine("SubtreeCrossover: " + Environment.NewLine +
+        msPerCrossoverEvent + " ms per crossover event (~" + Math.Round(1000.0 / (msPerCrossoverEvent)) + "crossovers / s)" + Environment.NewLine +
+        Util.GetSizeDistributionString(trees, 105, 5) + Environment.NewLine +
+        Util.GetFunctionDistributionString(trees) + Environment.NewLine +
+        Util.GetNumberOfSubtreesDistributionString(trees) + Environment.NewLine +
+        Util.GetTerminalDistributionString(trees) + Environment.NewLine
+        );
+
+      //mkommend: commented due to performance issues on the builder
+      //Assert.IsTrue(Math.Round(1000.0 / (msPerCrossoverEvent)) > 2000); // must achieve more than 2000 x-overs/s
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/Util.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/Util.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/Util.cs	(revision 16038)
@@ -0,0 +1,187 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 System.Text;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests {
+  public static class Util {
+    public static string GetSizeDistributionString(IList<ISymbolicExpressionTree> trees, int maxTreeLength, int binSize) {
+      int[] histogram = new int[maxTreeLength / binSize];
+      for (int i = 0; i < trees.Count; i++) {
+        int binIndex = Math.Min(histogram.Length - 1, trees[i].Length / binSize);
+        histogram[binIndex]++;
+      }
+      StringBuilder strBuilder = new StringBuilder();
+      for (int i = 0; i < histogram.Length - 1; i++) {
+        strBuilder.Append(Environment.NewLine);
+        strBuilder.Append("< "); strBuilder.Append((i + 1) * binSize);
+        strBuilder.Append(": "); strBuilder.AppendFormat("{0:#0.00%}", histogram[i] / (double)trees.Count);
+      }
+      strBuilder.Append(Environment.NewLine);
+      strBuilder.Append(">= "); strBuilder.Append(histogram.Length * binSize);
+      strBuilder.Append(": "); strBuilder.AppendFormat("{0:#0.00%}", histogram[histogram.Length - 1] / (double)trees.Count);
+
+      return "Size distribution: " + strBuilder;
+    }
+
+    public static string GetFunctionDistributionString(IList<ISymbolicExpressionTree> trees) {
+      Dictionary<string, int> occurances = new Dictionary<string, int>();
+      double n = 0.0;
+      for (int i = 0; i < trees.Count; i++) {
+        foreach (var node in trees[i].IterateNodesPrefix()) {
+          if (node.Subtrees.Count() > 0) {
+            if (!occurances.ContainsKey(node.Symbol.Name))
+              occurances[node.Symbol.Name] = 0;
+            occurances[node.Symbol.Name]++;
+            n++;
+          }
+        }
+      }
+      StringBuilder strBuilder = new StringBuilder();
+      foreach (var function in occurances.Keys) {
+        strBuilder.Append(Environment.NewLine);
+        strBuilder.Append(function); strBuilder.Append(": ");
+        strBuilder.AppendFormat("{0:#0.00%}", occurances[function] / n);
+      }
+      return "Function distribution: " + strBuilder;
+    }
+
+    public static string GetNumberOfSubtreesDistributionString(IList<ISymbolicExpressionTree> trees) {
+      Dictionary<int, int> occurances = new Dictionary<int, int>();
+      double n = 0.0;
+      for (int i = 0; i < trees.Count; i++) {
+        foreach (var node in trees[i].IterateNodesPrefix()) {
+          if (!occurances.ContainsKey(node.Subtrees.Count()))
+            occurances[node.Subtrees.Count()] = 0;
+          occurances[node.Subtrees.Count()]++;
+          n++;
+        }
+      }
+      StringBuilder strBuilder = new StringBuilder();
+      foreach (var arity in occurances.Keys) {
+        strBuilder.Append(Environment.NewLine);
+        strBuilder.Append(arity); strBuilder.Append(": ");
+        strBuilder.AppendFormat("{0:#0.00%}", occurances[arity] / n);
+      }
+      return "Distribution of function arities: " + strBuilder;
+    }
+
+
+    public static string GetTerminalDistributionString(IList<ISymbolicExpressionTree> trees) {
+      Dictionary<string, int> occurances = new Dictionary<string, int>();
+      double n = 0.0;
+      for (int i = 0; i < trees.Count; i++) {
+        foreach (var node in trees[i].IterateNodesPrefix()) {
+          if (node.Subtrees.Count() == 0) {
+            if (!occurances.ContainsKey(node.Symbol.Name))
+              occurances[node.Symbol.Name] = 0;
+            occurances[node.Symbol.Name]++;
+            n++;
+          }
+        }
+      }
+      StringBuilder strBuilder = new StringBuilder();
+      foreach (var function in occurances.Keys) {
+        strBuilder.Append(Environment.NewLine);
+        strBuilder.Append(function); strBuilder.Append(": ");
+        strBuilder.AppendFormat("{0:#0.00%}", occurances[function] / n);
+      }
+      return "Terminal distribution: " + strBuilder;
+    }
+
+    public static void IsValid(ISymbolicExpressionTree tree) {
+      int reportedSize = tree.Length;
+      int actualSize = tree.IterateNodesPostfix().Count();
+      Assert.AreEqual(actualSize, reportedSize);
+
+      foreach (var defunTreeNode in tree.Root.Subtrees.OfType<DefunTreeNode>()) {
+        int arity = defunTreeNode.NumberOfArguments;
+
+        foreach (var argTreenode in defunTreeNode.IterateNodesPrefix().OfType<ArgumentTreeNode>()) {
+          Assert.IsTrue(argTreenode.SubtreeCount == 0);
+          Assert.IsTrue(((Argument)argTreenode.Symbol).ArgumentIndex < arity);
+        }
+
+        foreach (var argSymbol in Enumerable.Range(0, defunTreeNode.NumberOfArguments).Select(x => new Argument(x))) {
+          Assert.IsTrue(defunTreeNode.Grammar.ContainsSymbol(argSymbol));
+          Assert.IsTrue(defunTreeNode.Grammar.GetMaximumSubtreeCount(argSymbol) == 0);
+          Assert.IsTrue(defunTreeNode.Grammar.GetMinimumSubtreeCount(argSymbol) == 0);
+        }
+
+        var invoke = new InvokeFunction(defunTreeNode.FunctionName);
+        foreach (var otherRootNode in tree.Root.Subtrees) {
+          if (otherRootNode.Grammar.ContainsSymbol(invoke)) {
+            Assert.IsTrue(otherRootNode.Grammar.GetMinimumSubtreeCount(invoke) == arity);
+            Assert.IsTrue(otherRootNode.Grammar.GetMaximumSubtreeCount(invoke) == arity);
+            Assert.IsFalse(otherRootNode.Grammar.IsAllowedChildSymbol(invoke, invoke));
+            for (int i = 0; i < arity; i++) {
+              Assert.IsFalse(otherRootNode.Grammar.IsAllowedChildSymbol(invoke, invoke, i));
+            }
+          }
+        }
+
+      }
+
+      foreach (var subtree in tree.Root.Subtrees) {
+        if (tree.Root.Grammar.GetType().Name != "EmptySymbolicExpressionTreeGrammar")
+          Assert.AreNotSame(subtree.Grammar, tree.Root.Grammar);
+        IsValid(subtree.Grammar);
+      }
+
+      IsValid(tree.Root.Grammar);
+      IsValid(tree.Root);
+    }
+
+    public static void IsValid(ISymbolicExpressionTreeGrammar grammar) {
+      Assert.IsTrue(grammar.Symbols.Count() == grammar.Symbols.Distinct().Count());
+      foreach (ISymbol symbol in grammar.AllowedSymbols) {
+        Assert.IsTrue(grammar.GetAllowedChildSymbols(symbol).Count() == grammar.GetAllowedChildSymbols(symbol).Distinct().Count());
+        for (int i = 0; i < grammar.GetMaximumSubtreeCount(symbol); i++) {
+          Assert.IsTrue(grammar.GetAllowedChildSymbols(symbol, i).Count() == grammar.GetAllowedChildSymbols(symbol, i).Distinct().Count());
+        }
+      }
+
+      foreach (var symbol in grammar.ModifyableSymbols) {
+        //check if every symbol has at least one allowed child
+        for (int i = 0; i < grammar.GetMaximumSubtreeCount(symbol); i++)
+          Assert.IsTrue(grammar.GetAllowedChildSymbols(symbol, i).Any());
+      }
+    }
+
+    public static void IsValid(ISymbolicExpressionTreeNode treeNode) {
+      var matchingSymbol = (from symb in treeNode.Grammar.Symbols
+                            where symb.Name == treeNode.Symbol.Name
+                            select symb).SingleOrDefault();
+      Assert.IsTrue(treeNode.Subtrees.Count() >= treeNode.Grammar.GetMinimumSubtreeCount(matchingSymbol));
+      Assert.IsTrue(treeNode.Subtrees.Count() <= treeNode.Grammar.GetMaximumSubtreeCount(matchingSymbol));
+      Assert.AreNotEqual(0.0, matchingSymbol.InitialFrequency); // check that no deactivated symbols occur in the tree
+      for (int i = 0; i < treeNode.Subtrees.Count(); i++) {
+        Assert.IsTrue(treeNode.Grammar.GetAllowedChildSymbols(treeNode.Symbol, i).Select(x => x.Name).Contains(treeNode.GetSubtree(i).Symbol.Name));
+        IsValid(treeNode.GetSubtree(i));
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphLayoutTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphLayoutTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphLayoutTest.cs	(revision 16038)
@@ -0,0 +1,86 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 HeuristicLab.Common;
+using HeuristicLab.IGraph.Wrappers;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class IGraphLayoutTest {
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersLayoutFruchtermanReingoldTest() {
+      using (var graph = new Graph(5, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 3),
+        Tuple.Create(2, 4),
+        Tuple.Create(3, 4),
+      })) {
+        Assert.AreEqual(5, graph.Vertices);
+        try {
+          using (var matrix = graph.LayoutWithFruchtermanReingold()) {
+            Assert.AreEqual(5, matrix.Rows);
+            Assert.AreEqual(2, matrix.Columns);
+          }
+        } catch { Assert.Fail("Layouting with fruchterman-reingold using default parameters failed."); }
+
+        try {
+          using (var matrix = new Matrix(1, 1)) {
+            graph.LayoutWithFruchtermanReingold(50, 2, matrix);
+          }
+          Assert.Fail("Layouting with fruchterman-reingold using too little pre-initialized coordinates failed.");
+        } catch (ArgumentException) { }
+
+        try {
+          using (var matrix = new Matrix(7, 3)) {
+            graph.LayoutWithFruchtermanReingold(50, 2, matrix);
+            Assert.Fail("Layouting with fruchterman-reingold using too many pre-initialized coordinates failed.");
+          }
+        } catch (ArgumentException) { }
+
+        try {
+          using (var matrix = new Matrix(5, 2)) {
+            matrix[0, 0] = matrix[0, 1] = 1;
+            matrix[1, 0] = matrix[1, 1] = 2;
+            matrix[2, 0] = matrix[2, 1] = 3;
+            matrix[3, 0] = matrix[3, 1] = 4;
+            matrix[4, 0] = matrix[4, 1] = 5;
+            graph.LayoutWithFruchtermanReingold(50, 2, matrix);
+            Assert.AreEqual(5, matrix.Rows);
+            Assert.AreEqual(2, matrix.Columns);
+            Assert.IsFalse(
+                 matrix[0, 0].IsAlmost(1) && matrix[0, 1].IsAlmost(1)
+              && matrix[1, 0].IsAlmost(2) && matrix[1, 1].IsAlmost(2)
+              && matrix[2, 0].IsAlmost(2) && matrix[2, 1].IsAlmost(2)
+              && matrix[3, 0].IsAlmost(2) && matrix[3, 1].IsAlmost(2)
+              && matrix[4, 0].IsAlmost(2) && matrix[4, 1].IsAlmost(2));
+          }
+        } catch { Assert.Fail("Layouting with fruchterman-reingold using pre-initialized coordinates failed."); }
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersGraphTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersGraphTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersGraphTest.cs	(revision 16038)
@@ -0,0 +1,195 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.IGraph.Wrappers;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  [DeploymentItem("igraph-0.8.0-pre-x86.dll")]
+  [DeploymentItem("igraph-0.8.0-pre-x64.dll")]
+  public class IGraphWrappersGraphTest {
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersGraphConstructionAndFinalizationTest() {
+      using (var graph = new Graph(5, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 3),
+        Tuple.Create(2, 4),
+        Tuple.Create(3, 4),
+      })) {
+        Assert.AreEqual(5, graph.Vertices);
+        Assert.IsFalse(graph.IsDirected);
+      }
+
+      using (var graph = new Graph(3, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+      }, directed: true)) {
+        Assert.AreEqual(3, graph.Vertices);
+        Assert.IsTrue(graph.IsDirected);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersGraphDensityTest() {
+      using (var graph = new Graph(5, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 3),
+        Tuple.Create(2, 4),
+        Tuple.Create(3, 4),
+      })) {
+
+        var density = graph.Density();
+        // in un-directed graphs edges count twice
+        Assert.IsTrue(density.IsAlmost(12 / 20.0));
+      }
+
+      using (var graph = new Graph(5, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 3),
+        Tuple.Create(2, 4),
+        Tuple.Create(3, 4),
+      }, directed: true)) {
+
+        var density = graph.Density();
+        // in directed graphs edges count twice
+        Assert.IsTrue(density.IsAlmost(6 / 20.0));
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersGraphPageRankTest() {
+      using (var graph = new Graph(4, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 0),
+        Tuple.Create(3, 2),
+      }, directed: true)) {
+        var ranks = graph.PageRank();
+        Assert.AreEqual(4, ranks.Length);
+        Assert.AreEqual(0.372, ranks[0], 0.01);
+        Assert.AreEqual(0.195, ranks[1], 0.01);
+        Assert.AreEqual(0.394, ranks[2], 0.01);
+        Assert.AreEqual(0.037, ranks[3], 0.01);
+      }
+      using (var graph = new Graph(4, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 3),
+        Tuple.Create(3, 0),
+      }, directed: true)) {
+        var ranks = graph.PageRank();
+        Assert.AreEqual(4, ranks.Length);
+        Assert.AreEqual(0.250, ranks[0], 0.01);
+        Assert.AreEqual(0.250, ranks[1], 0.01);
+        Assert.AreEqual(0.250, ranks[2], 0.01);
+        Assert.AreEqual(0.250, ranks[3], 0.01);
+      }
+      using (var graph = new Graph(4, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(0, 3),
+        Tuple.Create(1, 0),
+        Tuple.Create(2, 0),
+        Tuple.Create(3, 0),
+      }, directed: true)) {
+        var ranks = graph.PageRank();
+        Assert.AreEqual(4, ranks.Length);
+        Assert.AreEqual(0.480, ranks[0], 0.01);
+        Assert.AreEqual(0.173, ranks[1], 0.01);
+        Assert.AreEqual(0.173, ranks[2], 0.01);
+        Assert.AreEqual(0.173, ranks[3], 0.01);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersGraphBreadthFirstWalkTest() {
+      using (var graph = new Graph(4, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 0),
+        Tuple.Create(3, 2),
+      }, directed: true)) {
+        var visited = new HashSet<int>();
+        BreadthFirstHandler handler = (graph1, currentVertexId, previousVertexId, nextVertexId, rank, distance, tag) => {
+          visited.Add(currentVertexId);
+          return false;
+        };
+        graph.BreadthFirstWalk(handler, 0, DirectedWalkMode.All, true, null);
+        Assert.AreEqual(4, visited.Count);
+        Assert.IsTrue(visited.Contains(0));
+        Assert.IsTrue(visited.Contains(1));
+        Assert.IsTrue(visited.Contains(2));
+        Assert.IsTrue(visited.Contains(3));
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersGraphDepthFirstWalkTest() {
+      using (var graph = new Graph(4, new[] {
+        Tuple.Create(0, 1),
+        Tuple.Create(0, 2),
+        Tuple.Create(1, 2),
+        Tuple.Create(2, 0),
+        Tuple.Create(3, 2),
+      }, directed: true)) {
+        var visited = new HashSet<int>();
+        DepthFirstHandler handler = (graph1, vertexId, distance, tag) => {
+          visited.Add(vertexId);
+          return false;
+        };
+        graph.DepthFirstWalk(handler, handler, 0, DirectedWalkMode.All, true, null);
+        Assert.AreEqual(4, visited.Count);
+        Assert.IsTrue(visited.Contains(0));
+        Assert.IsTrue(visited.Contains(1));
+        Assert.IsTrue(visited.Contains(2));
+        Assert.IsTrue(visited.Contains(3));
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersMatrixTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersMatrixTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersMatrixTest.cs	(revision 16038)
@@ -0,0 +1,135 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.IGraph.Wrappers;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class IGraphWrappersMatrixTest {
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersMatrixConstructionAndFinalizationTest() {
+      using (var matrix = new Matrix(3, 2)) {
+        Assert.AreEqual(3, matrix.Rows);
+        Assert.AreEqual(2, matrix.Columns);
+        Assert.AreEqual(0, matrix[0, 0]);
+        matrix[0, 0] = 4;
+        var other = new Matrix(matrix);
+        Assert.AreEqual(3, other.Rows);
+        Assert.AreEqual(2, other.Columns);
+        Assert.AreEqual(4, other[0, 0]);
+      }
+      var mat = new double[,] {
+        { 1, 2, 3 },
+        { 4, 5, 6}
+      };
+      using (var matrix = new Matrix(mat)) {
+        Assert.AreEqual(2, matrix.Rows);
+        Assert.AreEqual(3, matrix.Columns);
+        var test = matrix.ToMatrix();
+        for (var i = 0; i < matrix.Rows; i++)
+          for (var j = 0; j < matrix.Columns; j++) {
+            Assert.AreEqual(mat[i, j], matrix[i, j]);
+            Assert.AreEqual(mat[i, j], test[i, j]);
+          }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersMatrixGetSetTest() {
+      using (var matrix = new Matrix(3, 2)) {
+        matrix[0, 0] = matrix[0, 1] = 4;
+        matrix[1, 0] = 3;
+        matrix[1, 1] = 2;
+        matrix[2, 0] = 1.5;
+        matrix[2, 1] = -0.5;
+        Assert.AreEqual(4, matrix[0, 0]);
+        Assert.AreEqual(4, matrix[0, 1]);
+        Assert.AreEqual(3, matrix[1, 0]);
+        Assert.AreEqual(2, matrix[1, 1]);
+        Assert.AreEqual(1.5, matrix[2, 0]);
+        Assert.AreEqual(-0.5, matrix[2, 1]);
+
+        var netmat = matrix.ToMatrix();
+        Assert.AreEqual(3, netmat.GetLength(0));
+        Assert.AreEqual(2, netmat.GetLength(1));
+        for (var i = 0; i < netmat.GetLength(0); i++)
+          for (var j = 0; j < netmat.GetLength(1); j++)
+            Assert.AreEqual(matrix[i, j], netmat[i, j]);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersMatrixFillTest() {
+      using (var matrix = new Matrix(3, 2)) {
+        matrix.Fill(2.6);
+        Assert.AreEqual(2.6, matrix[0, 0]);
+        Assert.AreEqual(2.6, matrix[0, 1]);
+        Assert.AreEqual(2.6, matrix[1, 0]);
+        Assert.AreEqual(2.6, matrix[1, 1]);
+        Assert.AreEqual(2.6, matrix[2, 0]);
+        Assert.AreEqual(2.6, matrix[2, 1]);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersMatrixTransposeTest() {
+      using (var matrix = new Matrix(3, 2)) {
+        matrix.Transpose();
+        Assert.AreEqual(2, matrix.Rows);
+        Assert.AreEqual(3, matrix.Columns);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersMatrixScaleTest() {
+      using (var matrix = new Matrix(3, 2)) {
+        matrix[0, 0] = matrix[0, 1] = 4;
+        matrix[1, 0] = 3;
+        matrix[1, 1] = 2;
+        matrix[2, 0] = 1.5;
+        matrix[2, 1] = -0.5;
+        matrix.Scale(2);
+        Assert.AreEqual(8, matrix[0, 0]);
+        Assert.AreEqual(8, matrix[0, 1]);
+        Assert.AreEqual(6, matrix[1, 0]);
+        Assert.AreEqual(4, matrix[1, 1]);
+        Assert.AreEqual(3, matrix[2, 0]);
+        Assert.AreEqual(-1, matrix[2, 1]);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersVectorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersVectorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.IGraph/IGraphWrappersVectorTest.cs	(revision 16038)
@@ -0,0 +1,146 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Encodings.RealVectorEncoding;
+using HeuristicLab.IGraph.Wrappers;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class IGraphWrappersVectorTest {
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersVectorConstructionAndFinalizationTest() {
+      using (var vector = new Vector(7)) {
+        Assert.AreEqual(7, vector.Length);
+        Assert.AreEqual(0, vector[0]);
+        vector[0] = 4;
+        using (var other = new Vector(vector)) {
+          Assert.AreEqual(7, other.Length);
+          Assert.AreEqual(4, other[0]);
+        }
+      }
+      var myvec = new double[] { 1, 2, 3 };
+      using (var vector = new Vector(myvec)) {
+        Assert.AreEqual(3, vector.Length);
+        Assert.AreEqual(myvec[0], vector[0]);
+        Assert.AreEqual(myvec[1], vector[1]);
+        Assert.AreEqual(myvec[2], vector[2]);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersVectorGetSetTest() {
+      using (var vector = new Vector(5)) {
+        vector[0] = vector[1] = 4;
+        vector[2] = 3;
+        vector[3] = 1.5;
+        vector[4] = -0.5;
+        Assert.AreEqual(4, vector[0]);
+        Assert.AreEqual(4, vector[1]);
+        Assert.AreEqual(3, vector[2]);
+        Assert.AreEqual(1.5, vector[3]);
+        Assert.AreEqual(-0.5, vector[4]);
+
+        var netmat = vector.ToArray();
+        Assert.AreEqual(5, netmat.Length);
+        for (var i = 0; i < netmat.Length; i++)
+          Assert.AreEqual(vector[i], netmat[i]);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersVectorFillTest() {
+      using (var vector = new Vector(5)) {
+        vector.Fill(2.3);
+        Assert.IsTrue(new[] { 2.3, 2.3, 2.3, 2.3, 2.3 }.SequenceEqual(vector.ToArray()));
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersVectorReverseTest() {
+      using (var vector = new Vector(5)) {
+        vector[0] = vector[1] = 4;
+        vector[2] = 3;
+        vector[3] = 1.5;
+        vector[4] = -0.5;
+        vector.Reverse();
+        Assert.IsTrue(new[] { -0.5, 1.5, 3, 4, 4 }.SequenceEqual(vector.ToArray()));
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersVectorShuffleTest() {
+      var different = new HashSet<RealVector>(new RealVectorEqualityComparer());
+      for (var i = 0; i < 100; i++) {
+        using (var vector = new Vector(5)) {
+          vector[0] = vector[1] = 4;
+          vector[2] = 3;
+          vector[3] = 1.5;
+          vector[4] = -0.5;
+          vector.Shuffle();
+          var result = vector.ToArray();
+          different.Add(new RealVector(result));
+          Assert.AreEqual(2, result.Count(x => x == 4));
+          Assert.AreEqual(1, result.Count(x => x == 3));
+          Assert.AreEqual(1, result.Count(x => x == 1.5));
+          Assert.AreEqual(1, result.Count(x => x == -0.5));
+        }
+      }
+      // There should be reasonable low probability that all 100 shuffles result in exactly the same vector
+      Assert.IsTrue(different.Count > 1);
+      Assert.IsTrue(different.Count <= 60); // there are a total of 60 different shuffles 5! / 2!
+      Console.WriteLine("Shuffle produced " + different.Count + " unique vectors");
+    }
+
+    [TestMethod]
+    [TestCategory("ExtLibs")]
+    [TestCategory("ExtLibs.igraph")]
+    [TestProperty("Time", "short")]
+    public void IGraphWrappersVectorScaleTest() {
+      using (var vector = new Vector(5)) {
+        vector[0] = vector[1] = 4;
+        vector[2] = 3;
+        vector[3] = 1.5;
+        vector[4] = -0.5;
+        vector.Scale(2);
+        Assert.IsTrue(new double[] { 8, 8, 6, 3, -1 }.SequenceEqual(vector.ToArray()));
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/StorableAttributeTests.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/StorableAttributeTests.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/StorableAttributeTests.cs	(revision 16038)
@@ -0,0 +1,70 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Persistence.Tests {
+
+  [StorableClass]
+  class DemoClass {
+
+    [Storable(Name = "TestProperty", DefaultValue = 12)]
+    public object o = null;
+
+    [Storable]
+    public int x = 2;
+
+    public int y = 0;
+  }
+
+  [StorableClass]
+  class Base {
+    public string baseName;
+    [Storable]
+    public virtual string Name {
+      get { return "Base"; }
+      set { baseName = value; }
+    }
+  }
+
+  [StorableClass]
+  class Override : Base {
+    [Storable]
+    public override string Name {
+      get { return "Override"; }
+      set { base.Name = value; }
+    }
+  }
+
+  [StorableClass]
+  class Intermediate : Override {
+  }
+
+  [StorableClass]
+  class New : Intermediate {
+    public string newName;
+    [Storable]
+    public new string Name {
+      get { return "New"; }
+      set { newName = value; }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCases.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCases.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCases.cs	(revision 16038)
@@ -0,0 +1,1535 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading.Tasks;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Persistence.Auxiliary;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Core.Tokens;
+using HeuristicLab.Persistence.Default.CompositeSerializers;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Persistence.Default.DebugString;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Persistence.Default.Xml.Primitive;
+using HeuristicLab.Persistence.Interfaces;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Persistence.Tests {
+
+  [StorableClass]
+  public class NumberTest {
+    [Storable]
+    private bool _bool = true;
+    [Storable]
+    private byte _byte = 0xFF;
+    [Storable]
+    private sbyte _sbyte = 0xF;
+    [Storable]
+    private short _short = -123;
+    [Storable]
+    private ushort _ushort = 123;
+    [Storable]
+    private int _int = -123;
+    [Storable]
+    private uint _uint = 123;
+    [Storable]
+    private long _long = 123456;
+    [Storable]
+    private ulong _ulong = 123456;
+    public override bool Equals(object obj) {
+      NumberTest nt = obj as NumberTest;
+      if (nt == null)
+        throw new NotSupportedException();
+      return
+        nt._bool == _bool &&
+        nt._byte == _byte &&
+        nt._sbyte == _sbyte &&
+        nt._short == _short &&
+        nt._ushort == _ushort &&
+        nt._int == _int &&
+        nt._uint == _uint &&
+        nt._long == _long &&
+        nt._ulong == _ulong;
+    }
+    public override int GetHashCode() {
+      return
+        _bool.GetHashCode() ^
+        _byte.GetHashCode() ^
+        _sbyte.GetHashCode() ^
+        _short.GetHashCode() ^
+        _short.GetHashCode() ^
+        _int.GetHashCode() ^
+        _uint.GetHashCode() ^
+        _long.GetHashCode() ^
+        _ulong.GetHashCode();
+    }
+  }
+
+  [StorableClass]
+  public class NonDefaultConstructorClass {
+    [Storable]
+    int value;
+    public NonDefaultConstructorClass(int value) {
+      this.value = value;
+    }
+  }
+
+  [StorableClass]
+  public class IntWrapper {
+
+    [Storable]
+    public int Value;
+
+    private IntWrapper() { }
+
+    public IntWrapper(int value) {
+      this.Value = value;
+    }
+
+    public override bool Equals(object obj) {
+      if (obj as IntWrapper == null)
+        return false;
+      return Value.Equals(((IntWrapper)obj).Value);
+    }
+    public override int GetHashCode() {
+      return Value.GetHashCode();
+    }
+
+  }
+
+  [StorableClass]
+  public class PrimitivesTest : NumberTest {
+    [Storable]
+    private char c = 'e';
+    [Storable]
+    private long[,] _long_array =
+      new long[,] { { 123, 456, }, { 789, 123 } };
+    [Storable]
+    public List<int> list = new List<int> { 1, 2, 3, 4, 5 };
+    [Storable]
+    private object o = new object();
+    public override bool Equals(object obj) {
+      PrimitivesTest pt = obj as PrimitivesTest;
+      if (pt == null)
+        throw new NotSupportedException();
+      return base.Equals(obj) &&
+        c == pt.c &&
+        _long_array == pt._long_array &&
+        list == pt.list &&
+        o == pt.o;
+    }
+    public override int GetHashCode() {
+      return base.GetHashCode() ^
+        c.GetHashCode() ^
+        _long_array.GetHashCode() ^
+        list.GetHashCode() ^
+        o.GetHashCode();
+    }
+  }
+
+  public enum TestEnum { va1, va2, va3, va8 } ;
+
+  [StorableClass]
+  public class RootBase {
+    [Storable]
+    private string baseString = "   Serial  ";
+    [Storable]
+    public TestEnum myEnum = TestEnum.va3;
+    public override bool Equals(object obj) {
+      RootBase rb = obj as RootBase;
+      if (rb == null)
+        throw new NotSupportedException();
+      return baseString == rb.baseString &&
+        myEnum == rb.myEnum;
+    }
+    public override int GetHashCode() {
+      return baseString.GetHashCode() ^
+        myEnum.GetHashCode();
+    }
+  }
+
+  [StorableClass]
+  public class Root : RootBase {
+    [Storable]
+    public Stack<int> intStack = new Stack<int>();
+    [Storable]
+    public int[] i = new[] { 3, 4, 5, 6 };
+    [Storable(Name = "Test String")]
+    public string s;
+    [Storable]
+    public ArrayList intArray = new ArrayList(new[] { 1, 2, 3 });
+    [Storable]
+    public List<int> intList = new List<int>(new[] { 321, 312, 321 });
+    [Storable]
+    public Custom c;
+    [Storable]
+    public List<Root> selfReferences;
+    [Storable]
+    public double[,] multiDimArray = new double[,] { { 1, 2, 3 }, { 3, 4, 5 } };
+    [Storable]
+    public bool boolean = true;
+    [Storable]
+    public DateTime dateTime;
+    [Storable]
+    public KeyValuePair<string, int> kvp = new KeyValuePair<string, int>("Serial", 123);
+    [Storable]
+    public Dictionary<string, int> dict = new Dictionary<string, int>();
+    [Storable(DefaultValue = "default")]
+    public string uninitialized;
+  }
+
+  public enum SimpleEnum { one, two, three }
+  public enum ComplexEnum { one = 1, two = 2, three = 3 }
+  [FlagsAttribute]
+  public enum TrickyEnum { zero = 0, one = 1, two = 2 }
+
+  [StorableClass]
+  public class EnumTest {
+    [Storable]
+    public SimpleEnum simpleEnum = SimpleEnum.one;
+    [Storable]
+    public ComplexEnum complexEnum = (ComplexEnum)2;
+    [Storable]
+    public TrickyEnum trickyEnum = (TrickyEnum)15;
+  }
+
+  [StorableClass]
+  public class Custom {
+    [Storable]
+    public int i;
+    [Storable]
+    public Root r;
+    [Storable]
+    public string name = "<![CDATA[<![CDATA[Serial]]>]]>";
+  }
+
+  [StorableClass]
+  public class Manager {
+
+    public DateTime lastLoadTime;
+    [Storable]
+    private DateTime lastLoadTimePersistence {
+      get { return lastLoadTime; }
+      set { lastLoadTime = DateTime.Now; }
+    }
+    [Storable]
+    public double? dbl;
+  }
+
+  [StorableClass]
+  public class C {
+    [Storable]
+    public C[][] allCs;
+    [Storable]
+    public KeyValuePair<List<C>, C> kvpList;
+  }
+
+  public class NonSerializable {
+    int x = 0;
+    public override bool Equals(object obj) {
+      NonSerializable ns = obj as NonSerializable;
+      if (ns == null)
+        throw new NotSupportedException();
+      return ns.x == x;
+    }
+    public override int GetHashCode() {
+      return x.GetHashCode();
+    }
+  }
+
+
+  [TestClass]
+  public class UseCases {
+
+    private string tempFile;
+
+    [TestInitialize()]
+    public void CreateTempFile() {
+      tempFile = Path.GetTempFileName();
+    }
+
+    [TestCleanup()]
+    public void ClearTempFile() {
+      StreamReader reader = new StreamReader(tempFile);
+      string s = reader.ReadToEnd();
+      reader.Close();
+      File.Delete(tempFile);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void ComplexStorable() {
+      Root r = InitializeComplexStorable();
+      XmlGenerator.Serialize(r, tempFile);
+      Root newR = (Root)XmlParser.Deserialize(tempFile);
+      CompareComplexStorables(r, newR);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void ComplexEasyStorable() {
+      Root r = InitializeComplexStorable();
+      ReadableXmlGenerator.Serialize(r, tempFile);
+      using (var reader = new StreamReader(tempFile)) {
+        string text = reader.ReadToEnd();
+        Assert.IsTrue(text.StartsWith("<Root"));
+      }
+    }
+
+    private static void CompareComplexStorables(Root r, Root newR) {
+      Assert.AreEqual(
+        DebugStringGenerator.Serialize(r),
+        DebugStringGenerator.Serialize(newR));
+      Assert.AreSame(newR, newR.selfReferences[0]);
+      Assert.AreNotSame(r, newR);
+      Assert.AreEqual(r.myEnum, TestEnum.va1);
+      Assert.AreEqual(r.i[0], 7);
+      Assert.AreEqual(r.i[1], 5);
+      Assert.AreEqual(r.i[2], 6);
+      Assert.AreEqual(r.s, "new value");
+      Assert.AreEqual(r.intArray[0], 3);
+      Assert.AreEqual(r.intArray[1], 2);
+      Assert.AreEqual(r.intArray[2], 1);
+      Assert.AreEqual(r.intList[0], 9);
+      Assert.AreEqual(r.intList[1], 8);
+      Assert.AreEqual(r.intList[2], 7);
+      Assert.AreEqual(r.multiDimArray[0, 0], 5);
+      Assert.AreEqual(r.multiDimArray[0, 1], 4);
+      Assert.AreEqual(r.multiDimArray[0, 2], 3);
+      Assert.AreEqual(r.multiDimArray[1, 0], 1);
+      Assert.AreEqual(r.multiDimArray[1, 1], 4);
+      Assert.AreEqual(r.multiDimArray[1, 2], 6);
+      Assert.IsFalse(r.boolean);
+      Assert.IsTrue((DateTime.Now - r.dateTime).TotalSeconds < 10);
+      Assert.AreEqual(r.kvp.Key, "string key");
+      Assert.AreEqual(r.kvp.Value, 321);
+      Assert.IsNull(r.uninitialized);
+      Assert.AreEqual(newR.myEnum, TestEnum.va1);
+      Assert.AreEqual(newR.i[0], 7);
+      Assert.AreEqual(newR.i[1], 5);
+      Assert.AreEqual(newR.i[2], 6);
+      Assert.AreEqual(newR.s, "new value");
+      Assert.AreEqual(newR.intArray[0], 3);
+      Assert.AreEqual(newR.intArray[1], 2);
+      Assert.AreEqual(newR.intArray[2], 1);
+      Assert.AreEqual(newR.intList[0], 9);
+      Assert.AreEqual(newR.intList[1], 8);
+      Assert.AreEqual(newR.intList[2], 7);
+      Assert.AreEqual(newR.multiDimArray[0, 0], 5);
+      Assert.AreEqual(newR.multiDimArray[0, 1], 4);
+      Assert.AreEqual(newR.multiDimArray[0, 2], 3);
+      Assert.AreEqual(newR.multiDimArray[1, 0], 1);
+      Assert.AreEqual(newR.multiDimArray[1, 1], 4);
+      Assert.AreEqual(newR.multiDimArray[1, 2], 6);
+      Assert.AreEqual(newR.intStack.Pop(), 3);
+      Assert.AreEqual(newR.intStack.Pop(), 2);
+      Assert.AreEqual(newR.intStack.Pop(), 1);
+      Assert.IsFalse(newR.boolean);
+      Assert.IsTrue((DateTime.Now - newR.dateTime).TotalSeconds < 10);
+      Assert.AreEqual(newR.kvp.Key, "string key");
+      Assert.AreEqual(newR.kvp.Value, 321);
+      Assert.IsNull(newR.uninitialized);
+    }
+
+    private static Root InitializeComplexStorable() {
+      Root r = new Root();
+      r.intStack.Push(1);
+      r.intStack.Push(2);
+      r.intStack.Push(3);
+      r.selfReferences = new List<Root> { r, r };
+      r.c = new Custom { r = r };
+      r.dict.Add("one", 1);
+      r.dict.Add("two", 2);
+      r.dict.Add("three", 3);
+      r.myEnum = TestEnum.va1;
+      r.i = new[] { 7, 5, 6 };
+      r.s = "new value";
+      r.intArray = new ArrayList { 3, 2, 1 };
+      r.intList = new List<int> { 9, 8, 7 };
+      r.multiDimArray = new double[,] { { 5, 4, 3 }, { 1, 4, 6 } };
+      r.boolean = false;
+      r.dateTime = DateTime.Now;
+      r.kvp = new KeyValuePair<string, int>("string key", 321);
+      r.uninitialized = null;
+
+      return r;
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void SelfReferences() {
+      C c = new C();
+      C[][] cs = new C[2][];
+      cs[0] = new C[] { c };
+      cs[1] = new C[] { c };
+      c.allCs = cs;
+      c.kvpList = new KeyValuePair<List<C>, C>(new List<C> { c }, c);
+      XmlGenerator.Serialize(cs, tempFile);
+      object o = XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(
+        DebugStringGenerator.Serialize(cs),
+        DebugStringGenerator.Serialize(o));
+      Assert.AreSame(c, c.allCs[0][0]);
+      Assert.AreSame(c, c.allCs[1][0]);
+      Assert.AreSame(c, c.kvpList.Key[0]);
+      Assert.AreSame(c, c.kvpList.Value);
+      C[][] newCs = (C[][])o;
+      C newC = newCs[0][0];
+      Assert.AreSame(newC, newC.allCs[0][0]);
+      Assert.AreSame(newC, newC.allCs[1][0]);
+      Assert.AreSame(newC, newC.kvpList.Key[0]);
+      Assert.AreSame(newC, newC.kvpList.Value);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void ArrayCreation() {
+      ArrayList[] arrayListArray = new ArrayList[4];
+      arrayListArray[0] = new ArrayList();
+      arrayListArray[0].Add(arrayListArray);
+      arrayListArray[0].Add(arrayListArray);
+      arrayListArray[1] = new ArrayList();
+      arrayListArray[1].Add(arrayListArray);
+      arrayListArray[2] = new ArrayList();
+      arrayListArray[2].Add(arrayListArray);
+      arrayListArray[2].Add(arrayListArray);
+      Array a = Array.CreateInstance(
+                              typeof(object),
+                              new[] { 1, 2 }, new[] { 3, 4 });
+      arrayListArray[2].Add(a);
+      XmlGenerator.Serialize(arrayListArray, tempFile);
+      object o = XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(
+        DebugStringGenerator.Serialize(arrayListArray),
+        DebugStringGenerator.Serialize(o));
+      ArrayList[] newArray = (ArrayList[])o;
+      Assert.AreSame(arrayListArray, arrayListArray[0][0]);
+      Assert.AreSame(arrayListArray, arrayListArray[2][1]);
+      Assert.AreSame(newArray, newArray[0][0]);
+      Assert.AreSame(newArray, newArray[2][1]);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void CustomSerializationProperty() {
+      Manager m = new Manager();
+      XmlGenerator.Serialize(m, tempFile);
+      Manager newM = (Manager)XmlParser.Deserialize(tempFile);
+      Assert.AreNotEqual(
+        DebugStringGenerator.Serialize(m),
+        DebugStringGenerator.Serialize(newM));
+      Assert.AreEqual(m.dbl, newM.dbl);
+      Assert.AreEqual(m.lastLoadTime, new DateTime());
+      Assert.AreNotEqual(newM.lastLoadTime, new DateTime());
+      Assert.IsTrue((DateTime.Now - newM.lastLoadTime).TotalSeconds < 10);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void Primitives() {
+      PrimitivesTest sdt = new PrimitivesTest();
+      XmlGenerator.Serialize(sdt, tempFile);
+      object o = XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(
+        DebugStringGenerator.Serialize(sdt),
+        DebugStringGenerator.Serialize(o));
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void MultiDimensionalArray() {
+      string[,] mDimString = new string[,] {
+        {"ora", "et", "labora"},
+        {"Beten", "und", "Arbeiten"}
+      };
+      XmlGenerator.Serialize(mDimString, tempFile);
+      object o = XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(
+        DebugStringGenerator.Serialize(mDimString),
+        DebugStringGenerator.Serialize(o));
+    }
+
+    [StorableClass]
+    public class NestedType {
+      [Storable]
+      private string value = "value";
+      public override bool Equals(object obj) {
+        NestedType nt = obj as NestedType;
+        if (nt == null)
+          throw new NotSupportedException();
+        return nt.value == value;
+      }
+      public override int GetHashCode() {
+        return value.GetHashCode();
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void NestedTypeTest() {
+      NestedType t = new NestedType();
+      XmlGenerator.Serialize(t, tempFile);
+      object o = XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(
+        DebugStringGenerator.Serialize(t),
+        DebugStringGenerator.Serialize(o));
+      Assert.IsTrue(t.Equals(o));
+    }
+
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void SimpleArray() {
+      string[] strings = { "ora", "et", "labora" };
+      XmlGenerator.Serialize(strings, tempFile);
+      object o = XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(
+        DebugStringGenerator.Serialize(strings),
+        DebugStringGenerator.Serialize(o));
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void PrimitiveRoot() {
+      XmlGenerator.Serialize(12.3f, tempFile);
+      object o = XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(
+        DebugStringGenerator.Serialize(12.3f),
+        DebugStringGenerator.Serialize(o));
+    }
+
+    private string formatFullMemberName(MemberInfo mi) {
+      return new StringBuilder()
+        .Append(mi.DeclaringType.Assembly.GetName().Name)
+        .Append(": ")
+        .Append(mi.DeclaringType.Namespace)
+        .Append('.')
+        .Append(mi.DeclaringType.Name)
+        .Append('.')
+        .Append(mi.Name).ToString();
+    }
+
+    public void CodingConventions() {
+      List<string> lowerCaseMethodNames = new List<string>();
+      List<string> lowerCaseProperties = new List<string>();
+      List<string> lowerCaseFields = new List<string>();
+      foreach (Assembly a in PluginLoader.Assemblies) {
+        if (!a.GetName().Name.StartsWith("HeuristicLab"))
+          continue;
+        foreach (Type t in a.GetTypes()) {
+          foreach (MemberInfo mi in t.GetMembers(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static)) {
+            if (mi.DeclaringType.Name.StartsWith("<>"))
+              continue;
+            if (char.IsLower(mi.Name[0])) {
+              if (mi.MemberType == MemberTypes.Field)
+                lowerCaseFields.Add(formatFullMemberName(mi));
+              if (mi.MemberType == MemberTypes.Property)
+                lowerCaseProperties.Add(formatFullMemberName(mi));
+              if (mi.MemberType == MemberTypes.Method &&
+                !mi.Name.StartsWith("get_") &&
+                !mi.Name.StartsWith("set_") &&
+                !mi.Name.StartsWith("add_") &&
+                !mi.Name.StartsWith("remove_") &&
+                !mi.Name.StartsWith("op_"))
+                lowerCaseMethodNames.Add(formatFullMemberName(mi));
+            }
+          }
+        }
+      }
+      //Assert.AreEqual("", lowerCaseFields.Aggregate("", (a, b) => a + "\r\n" + b));
+      Assert.AreEqual("", lowerCaseMethodNames.Aggregate("", (a, b) => a + "\r\n" + b));
+      Assert.AreEqual("", lowerCaseProperties.Aggregate("", (a, b) => a + "\r\n" + b));
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void Number2StringDecomposer() {
+      NumberTest sdt = new NumberTest();
+      XmlGenerator.Serialize(sdt, tempFile,
+        new Configuration(new XmlFormat(),
+          new List<IPrimitiveSerializer> { new String2XmlSerializer() },
+          new List<ICompositeSerializer> { 
+            new StorableSerializer(),
+            new Number2StringSerializer() }));
+      object o = XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(
+        DebugStringGenerator.Serialize(sdt),
+        DebugStringGenerator.Serialize(o));
+      Assert.IsTrue(sdt.Equals(o));
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void Enums() {
+      EnumTest et = new EnumTest();
+      et.simpleEnum = SimpleEnum.two;
+      et.complexEnum = ComplexEnum.three;
+      et.trickyEnum = TrickyEnum.two | TrickyEnum.one;
+      XmlGenerator.Serialize(et, tempFile);
+      EnumTest newEt = (EnumTest)XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(et.simpleEnum, SimpleEnum.two);
+      Assert.AreEqual(et.complexEnum, ComplexEnum.three);
+      Assert.AreEqual(et.trickyEnum, (TrickyEnum)3);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestAliasingWithOverriddenEquals() {
+      List<IntWrapper> ints = new List<IntWrapper>();
+      ints.Add(new IntWrapper(1));
+      ints.Add(new IntWrapper(1));
+      Assert.AreEqual(ints[0], ints[1]);
+      Assert.AreNotSame(ints[0], ints[1]);
+      XmlGenerator.Serialize(ints, tempFile);
+      List<IntWrapper> newInts = (List<IntWrapper>)XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(newInts[0].Value, 1);
+      Assert.AreEqual(newInts[1].Value, 1);
+      Assert.AreEqual(newInts[0], newInts[1]);
+      Assert.AreNotSame(newInts[0], newInts[1]);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void NonDefaultConstructorTest() {
+      NonDefaultConstructorClass c = new NonDefaultConstructorClass(1);
+      try {
+        XmlGenerator.Serialize(c, tempFile);
+        Assert.Fail("Exception not thrown");
+      } catch (PersistenceException) {
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestSavingException() {
+      List<int> list = new List<int> { 1, 2, 3 };
+      XmlGenerator.Serialize(list, tempFile);
+      NonSerializable s = new NonSerializable();
+      try {
+        XmlGenerator.Serialize(s, tempFile);
+        Assert.Fail("Exception expected");
+      } catch (PersistenceException) { }
+      List<int> newList = (List<int>)XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(list[0], newList[0]);
+      Assert.AreEqual(list[1], newList[1]);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestTypeStringConversion() {
+      string name = typeof(List<int>[]).AssemblyQualifiedName;
+      string shortName =
+        "System.Collections.Generic.List`1[[System.Int32, mscorlib]][], mscorlib";
+      Assert.AreEqual(name, TypeNameParser.Parse(name).ToString());
+      Assert.AreEqual(shortName, TypeNameParser.Parse(name).ToString(false));
+      Assert.AreEqual(shortName, typeof(List<int>[]).VersionInvariantName());
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestHexadecimalPublicKeyToken() {
+      string name = "TestClass, TestAssembly, Version=1.2.3.4, PublicKey=1234abc";
+      string shortName = "TestClass, TestAssembly";
+      Assert.AreEqual(name, TypeNameParser.Parse(name).ToString());
+      Assert.AreEqual(shortName, TypeNameParser.Parse(name).ToString(false));
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestMultipleFailure() {
+      List<NonSerializable> l = new List<NonSerializable>();
+      l.Add(new NonSerializable());
+      l.Add(new NonSerializable());
+      l.Add(new NonSerializable());
+      try {
+        Serializer s = new Serializer(l,
+          ConfigurationService.Instance.GetConfiguration(new XmlFormat()),
+          "ROOT", true);
+        StringBuilder tokens = new StringBuilder();
+        foreach (var token in s) {
+          tokens.Append(token.ToString());
+        }
+        Assert.Fail("Exception expected");
+      } catch (PersistenceException px) {
+        Assert.AreEqual(3, px.Data.Count);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestAssemblyVersionCheck() {
+      IntWrapper i = new IntWrapper(1);
+      Serializer s = new Serializer(i, ConfigurationService.Instance.GetDefaultConfig(new XmlFormat()));
+      XmlGenerator g = new XmlGenerator();
+      StringBuilder dataString = new StringBuilder();
+      foreach (var token in s) {
+        dataString.Append(g.Format(token));
+      }
+      StringBuilder typeString = new StringBuilder();
+      foreach (var line in g.Format(s.TypeCache))
+        typeString.Append(line);
+      Deserializer d = new Deserializer(XmlParser.ParseTypeCache(new StringReader(typeString.ToString())));
+      XmlParser p = new XmlParser(new StringReader(dataString.ToString()));
+      IntWrapper newI = (IntWrapper)d.Deserialize(p);
+      Assert.AreEqual(i.Value, newI.Value);
+
+      string newTypeString = Regex.Replace(typeString.ToString(),
+        "Version=\\d+\\.\\d+\\.\\d+\\.\\d+",
+        "Version=0.0.9999.9999");
+      try {
+        d = new Deserializer(XmlParser.ParseTypeCache(new StringReader(newTypeString)));
+        Assert.Fail("Exception expected");
+      } catch (PersistenceException x) {
+        Assert.IsTrue(x.Message.Contains("incompatible"));
+      }
+      newTypeString = Regex.Replace(typeString.ToString(),
+        "Version=(\\d+\\.\\d+)\\.\\d+\\.\\d+",
+        "Version=$1.9999.9999");
+      try {
+        d = new Deserializer(XmlParser.ParseTypeCache(new StringReader(newTypeString)));
+        Assert.Fail("Exception expected");
+      } catch (PersistenceException x) {
+        Assert.IsTrue(x.Message.Contains("newer"));
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void InheritanceTest() {
+      New n = new New();
+      XmlGenerator.Serialize(n, tempFile);
+      New nn = (New)XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(n.Name, nn.Name);
+      Assert.AreEqual(((Override)n).Name, ((Override)nn).Name);
+    }
+
+    [StorableClass]
+    class Child {
+      [Storable]
+      public GrandParent grandParent;
+    }
+
+    [StorableClass]
+    class Parent {
+      [Storable]
+      public Child child;
+    }
+
+    [StorableClass]
+    class GrandParent {
+      [Storable]
+      public Parent parent;
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void InstantiateParentChainReference() {
+      GrandParent gp = new GrandParent();
+      gp.parent = new Parent();
+      gp.parent.child = new Child();
+      gp.parent.child.grandParent = gp;
+      Assert.AreSame(gp, gp.parent.child.grandParent);
+      XmlGenerator.Serialize(gp, tempFile);
+      GrandParent newGp = (GrandParent)XmlParser.Deserialize(tempFile);
+      Assert.AreSame(newGp, newGp.parent.child.grandParent);
+    }
+
+    struct TestStruct {
+      int value;
+      int PropertyValue { get; set; }
+      public TestStruct(int value)
+        : this() {
+        this.value = value;
+        PropertyValue = value;
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void StructTest() {
+      TestStruct s = new TestStruct(10);
+      XmlGenerator.Serialize(s, tempFile);
+      TestStruct newS = (TestStruct)XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(s, newS);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void PointTest() {
+      Point p = new Point(12, 34);
+      XmlGenerator.Serialize(p, tempFile);
+      Point newP = (Point)XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(p, newP);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void NullableValueTypes() {
+      double?[] d = new double?[] { null, 1, 2, 3 };
+      XmlGenerator.Serialize(d, tempFile);
+      double?[] newD = (double?[])XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(d[0], newD[0]);
+      Assert.AreEqual(d[1], newD[1]);
+      Assert.AreEqual(d[2], newD[2]);
+      Assert.AreEqual(d[3], newD[3]);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void BitmapTest() {
+      Icon icon = System.Drawing.SystemIcons.Hand;
+      Bitmap bitmap = icon.ToBitmap();
+      XmlGenerator.Serialize(bitmap, tempFile);
+      Bitmap newBitmap = (Bitmap)XmlParser.Deserialize(tempFile);
+
+      Assert.AreEqual(bitmap.Size, newBitmap.Size);
+      for (int i = 0; i < bitmap.Size.Width; i++)
+        for (int j = 0; j < bitmap.Size.Height; j++)
+          Assert.AreEqual(bitmap.GetPixel(i, j), newBitmap.GetPixel(i, j));
+    }
+
+    [StorableClass]
+    private class PersistenceHooks {
+      [Storable]
+      public int a;
+      [Storable]
+      public int b;
+      public int sum;
+      public bool WasSerialized { get; private set; }
+      [StorableHook(HookType.BeforeSerialization)]
+      void PreSerializationHook() {
+        WasSerialized = true;
+      }
+      [StorableHook(HookType.AfterDeserialization)]
+      void PostDeserializationHook() {
+        sum = a + b;
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void HookTest() {
+      PersistenceHooks hookTest = new PersistenceHooks();
+      hookTest.a = 2;
+      hookTest.b = 5;
+      Assert.IsFalse(hookTest.WasSerialized);
+      Assert.AreEqual(hookTest.sum, 0);
+      XmlGenerator.Serialize(hookTest, tempFile);
+      Assert.IsTrue(hookTest.WasSerialized);
+      Assert.AreEqual(hookTest.sum, 0);
+      PersistenceHooks newHookTest = (PersistenceHooks)XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(newHookTest.a, hookTest.a);
+      Assert.AreEqual(newHookTest.b, hookTest.b);
+      Assert.AreEqual(newHookTest.sum, newHookTest.a + newHookTest.b);
+      Assert.IsFalse(newHookTest.WasSerialized);
+    }
+
+    [StorableClass]
+    private class CustomConstructor {
+      public string Value = "none";
+      public CustomConstructor() {
+        Value = "default";
+      }
+      [StorableConstructor]
+      private CustomConstructor(bool deserializing) {
+        Assert.IsTrue(deserializing);
+        Value = "persistence";
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestCustomConstructor() {
+      CustomConstructor cc = new CustomConstructor();
+      Assert.AreEqual(cc.Value, "default");
+      XmlGenerator.Serialize(cc, tempFile);
+      CustomConstructor newCC = (CustomConstructor)XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(newCC.Value, "persistence");
+    }
+
+    [StorableClass]
+    public class ExplodingDefaultConstructor {
+      public ExplodingDefaultConstructor() {
+        throw new Exception("this constructor will always fail");
+      }
+      public ExplodingDefaultConstructor(string password) {
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestConstructorExceptionUnwrapping() {
+      ExplodingDefaultConstructor x = new ExplodingDefaultConstructor("password");
+      XmlGenerator.Serialize(x, tempFile);
+      try {
+        ExplodingDefaultConstructor newX = (ExplodingDefaultConstructor)XmlParser.Deserialize(tempFile);
+        Assert.Fail("Exception expected");
+      } catch (PersistenceException pe) {
+        Assert.AreEqual(pe.InnerException.Message, "this constructor will always fail");
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestRejectionJustifications() {
+      NonSerializable ns = new NonSerializable();
+      try {
+        XmlGenerator.Serialize(ns, tempFile);
+        Assert.Fail("PersistenceException expected");
+      } catch (PersistenceException x) {
+        Assert.IsTrue(x.Message.Contains(new StorableSerializer().JustifyRejection(typeof(NonSerializable))));
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestStreaming() {
+      using (MemoryStream stream = new MemoryStream()) {
+        Root r = InitializeComplexStorable();
+        XmlGenerator.Serialize(r, stream);
+        using (MemoryStream stream2 = new MemoryStream(stream.ToArray())) {
+          Root newR = (Root)XmlParser.Deserialize(stream2);
+          CompareComplexStorables(r, newR);
+        }
+      }
+    }
+
+    [StorableClass]
+    public class HookInheritanceTestBase {
+      [Storable]
+      public object a;
+      public object link;
+      [StorableHook(HookType.AfterDeserialization)]
+      private void relink() {
+        link = a;
+      }
+    }
+
+    [StorableClass]
+    public class HookInheritanceTestDerivedClass : HookInheritanceTestBase {
+      [Storable]
+      public object b;
+      [StorableHook(HookType.AfterDeserialization)]
+      private void relink() {
+        Assert.AreSame(a, link);
+        link = b;
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestLinkInheritance() {
+      HookInheritanceTestDerivedClass c = new HookInheritanceTestDerivedClass();
+      c.a = new object();
+      XmlGenerator.Serialize(c, tempFile);
+      HookInheritanceTestDerivedClass newC = (HookInheritanceTestDerivedClass)XmlParser.Deserialize(tempFile);
+      Assert.AreSame(c.b, c.link);
+    }
+
+    [StorableClass(StorableClassType.AllFields)]
+    public class AllFieldsStorable {
+      public int Value1 = 1;
+      [Storable]
+      public int Value2 = 2;
+      public int Value3 { get; private set; }
+      public int Value4 { get; private set; }
+      [StorableConstructor]
+      public AllFieldsStorable(bool isDeserializing) {
+        if (!isDeserializing) {
+          Value1 = 12;
+          Value2 = 23;
+          Value3 = 34;
+          Value4 = 56;
+        }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestStorableClassDiscoveryAllFields() {
+      AllFieldsStorable afs = new AllFieldsStorable(false);
+      XmlGenerator.Serialize(afs, tempFile);
+      AllFieldsStorable newAfs = (AllFieldsStorable)XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(afs.Value1, newAfs.Value1);
+      Assert.AreEqual(afs.Value2, newAfs.Value2);
+      Assert.AreEqual(0, newAfs.Value3);
+      Assert.AreEqual(0, newAfs.Value4);
+    }
+
+    [StorableClass(StorableClassType.AllProperties)]
+    public class AllPropertiesStorable {
+      public int Value1 = 1;
+      [Storable]
+      public int Value2 = 2;
+      public int Value3 { get; private set; }
+      public int Value4 { get; private set; }
+      [StorableConstructor]
+      public AllPropertiesStorable(bool isDeserializing) {
+        if (!isDeserializing) {
+          Value1 = 12;
+          Value2 = 23;
+          Value3 = 34;
+          Value4 = 56;
+        }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestStorableClassDiscoveryAllProperties() {
+      AllPropertiesStorable afs = new AllPropertiesStorable(false);
+      XmlGenerator.Serialize(afs, tempFile);
+      AllPropertiesStorable newAfs = (AllPropertiesStorable)XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(1, newAfs.Value1);
+      Assert.AreEqual(2, newAfs.Value2);
+      Assert.AreEqual(afs.Value3, newAfs.Value3);
+      Assert.AreEqual(afs.Value4, newAfs.Value4);
+
+    }
+
+    [StorableClass(StorableClassType.AllFieldsAndAllProperties)]
+    public class AllFieldsAndAllPropertiesStorable {
+      public int Value1 = 1;
+      [Storable]
+      public int Value2 = 2;
+      public int Value3 { get; private set; }
+      public int Value4 { get; private set; }
+      [StorableConstructor]
+      public AllFieldsAndAllPropertiesStorable(bool isDeserializing) {
+        if (!isDeserializing) {
+          Value1 = 12;
+          Value2 = 23;
+          Value3 = 34;
+          Value4 = 56;
+        }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestStorableClassDiscoveryAllFieldsAndAllProperties() {
+      AllFieldsAndAllPropertiesStorable afs = new AllFieldsAndAllPropertiesStorable(false);
+      XmlGenerator.Serialize(afs, tempFile);
+      AllFieldsAndAllPropertiesStorable newAfs = (AllFieldsAndAllPropertiesStorable)XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(afs.Value1, newAfs.Value1);
+      Assert.AreEqual(afs.Value2, newAfs.Value2);
+      Assert.AreEqual(afs.Value3, newAfs.Value3);
+      Assert.AreEqual(afs.Value4, newAfs.Value4);
+    }
+
+    [StorableClass(StorableClassType.MarkedOnly)]
+    public class MarkedOnlyStorable {
+      public int Value1 = 1;
+      [Storable]
+      public int Value2 = 2;
+      public int Value3 { get; private set; }
+      public int Value4 { get; private set; }
+      [StorableConstructor]
+      public MarkedOnlyStorable(bool isDeserializing) {
+        if (!isDeserializing) {
+          Value1 = 12;
+          Value2 = 23;
+          Value3 = 34;
+          Value4 = 56;
+        }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestStorableClassDiscoveryMarkedOnly() {
+      MarkedOnlyStorable afs = new MarkedOnlyStorable(false);
+      XmlGenerator.Serialize(afs, tempFile);
+      MarkedOnlyStorable newAfs = (MarkedOnlyStorable)XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(1, newAfs.Value1);
+      Assert.AreEqual(afs.Value2, newAfs.Value2);
+      Assert.AreEqual(0, newAfs.Value3);
+      Assert.AreEqual(0, newAfs.Value4);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestLineEndings() {
+      List<string> lineBreaks = new List<string> { "\r\n", "\n", "\r", "\n\r", Environment.NewLine };
+      List<string> lines = new List<string>();
+      foreach (var br in lineBreaks)
+        lines.Add("line1" + br + "line2");
+      XmlGenerator.Serialize(lines, tempFile);
+      List<string> newLines = XmlParser.Deserialize<List<string>>(tempFile);
+      Assert.AreEqual(lines.Count, newLines.Count);
+      for (int i = 0; i < lineBreaks.Count; i++) {
+        Assert.AreEqual(lines[i], newLines[i]);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestSpecialNumbers() {
+      List<double> specials = new List<double>() { 1.0 / 0, -1.0 / 0, 0.0 / 0 };
+      Assert.IsTrue(double.IsPositiveInfinity(specials[0]));
+      Assert.IsTrue(double.IsNegativeInfinity(specials[1]));
+      Assert.IsTrue(double.IsNaN(specials[2]));
+      XmlGenerator.Serialize(specials, tempFile);
+      List<double> newSpecials = XmlParser.Deserialize<List<double>>(tempFile);
+      Assert.IsTrue(double.IsPositiveInfinity(newSpecials[0]));
+      Assert.IsTrue(double.IsNegativeInfinity(newSpecials[1]));
+      Assert.IsTrue(double.IsNaN(newSpecials[2]));
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestStringSplit() {
+      string s = "1.2;2.3;3.4;;;4.9";
+      var l = s.EnumerateSplit(';').ToList();
+      Assert.AreEqual("1.2", l[0]);
+      Assert.AreEqual("2.3", l[1]);
+      Assert.AreEqual("3.4", l[2]);
+      Assert.AreEqual("4.9", l[3]);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "medium")]
+    public void TestCompactNumberArraySerializer() {
+      System.Random r = new System.Random();
+      double[] a = new double[CompactNumberArray2StringSerializer.SPLIT_THRESHOLD * 2 + 1];
+      for (int i = 0; i < a.Length; i++)
+        a[i] = r.Next(10);
+      var config = ConfigurationService.Instance.GetDefaultConfig(new XmlFormat());
+      config = new Configuration(config.Format,
+        config.PrimitiveSerializers.Where(s => s.SourceType != typeof(double[])),
+        config.CompositeSerializers);
+      XmlGenerator.Serialize(a, tempFile, config);
+      double[] newA = XmlParser.Deserialize<double[]>(tempFile);
+      Assert.AreEqual(a.Length, newA.Length);
+      for (int i = 0; i < a.Rank; i++) {
+        Assert.AreEqual(a.GetLength(i), newA.GetLength(i));
+        Assert.AreEqual(a.GetLowerBound(i), newA.GetLowerBound(i));
+      }
+      for (int i = 0; i < a.Length; i++) {
+        Assert.AreEqual(a[i], newA[i]);
+      }
+    }
+    private class IdentityComparer<T> : IEqualityComparer<T> {
+
+      public bool Equals(T x, T y) {
+        return x.Equals(y);
+      }
+
+      public int GetHashCode(T obj) {
+        return obj.GetHashCode();
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestHashSetSerializer() {
+      var hashSets = new List<HashSet<int>>() {
+        new HashSet<int>(new[] { 1, 2, 3 }),
+        new HashSet<int>(new[] { 4, 5, 6 }, new IdentityComparer<int>()),
+      };
+      XmlGenerator.Serialize(hashSets, tempFile);
+      var newHashSets = XmlParser.Deserialize<List<HashSet<int>>>(tempFile);
+      Assert.IsTrue(newHashSets[0].Contains(1));
+      Assert.IsTrue(newHashSets[0].Contains(2));
+      Assert.IsTrue(newHashSets[0].Contains(3));
+      Assert.IsTrue(newHashSets[1].Contains(4));
+      Assert.IsTrue(newHashSets[1].Contains(5));
+      Assert.IsTrue(newHashSets[1].Contains(6));
+      Assert.AreEqual(newHashSets[0].Comparer.GetType(), new HashSet<int>().Comparer.GetType());
+      Assert.AreEqual(newHashSets[1].Comparer.GetType(), typeof(IdentityComparer<int>));
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestConcreteDictionarySerializer() {
+      var dictionaries = new List<Dictionary<int, int>>() {
+        new Dictionary<int, int>(),
+        new Dictionary<int, int>(new IdentityComparer<int>()),
+      };
+      dictionaries[0].Add(1, 1);
+      dictionaries[0].Add(2, 2);
+      dictionaries[0].Add(3, 3);
+      dictionaries[1].Add(4, 4);
+      dictionaries[1].Add(5, 5);
+      dictionaries[1].Add(6, 6);
+      XmlGenerator.Serialize(dictionaries, tempFile, ConfigurationService.Instance.GetDefaultConfig(new XmlFormat()));
+      var newDictionaries = XmlParser.Deserialize<List<Dictionary<int, int>>>(tempFile);
+      Assert.IsTrue(newDictionaries[0].ContainsKey(1));
+      Assert.IsTrue(newDictionaries[0].ContainsKey(2));
+      Assert.IsTrue(newDictionaries[0].ContainsKey(3));
+      Assert.IsTrue(newDictionaries[1].ContainsKey(4));
+      Assert.IsTrue(newDictionaries[1].ContainsKey(5));
+      Assert.IsTrue(newDictionaries[1].ContainsKey(6));
+      Assert.IsTrue(newDictionaries[0].ContainsValue(1));
+      Assert.IsTrue(newDictionaries[0].ContainsValue(2));
+      Assert.IsTrue(newDictionaries[0].ContainsValue(3));
+      Assert.IsTrue(newDictionaries[1].ContainsValue(4));
+      Assert.IsTrue(newDictionaries[1].ContainsValue(5));
+      Assert.IsTrue(newDictionaries[1].ContainsValue(6));
+      Assert.AreEqual(new Dictionary<int, int>().Comparer.GetType(), newDictionaries[0].Comparer.GetType());
+      Assert.AreEqual(typeof(IdentityComparer<int>), newDictionaries[1].Comparer.GetType());
+    }
+
+    [StorableClass]
+    public class ReadOnlyFail {
+      [Storable]
+      public string ReadOnly {
+        get { return "fail"; }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestReadOnlyFail() {
+      try {
+        XmlGenerator.Serialize(new ReadOnlyFail(), tempFile);
+        Assert.Fail("Exception expected");
+      } catch (PersistenceException) {
+      } catch {
+        Assert.Fail("PersistenceException expected");
+      }
+    }
+
+
+    [StorableClass]
+    public class WriteOnlyFail {
+      [Storable]
+      public string WriteOnly {
+        set { throw new InvalidOperationException("this property should never be set."); }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestWriteOnlyFail() {
+      try {
+        XmlGenerator.Serialize(new WriteOnlyFail(), tempFile);
+        Assert.Fail("Exception expected");
+      } catch (PersistenceException) {
+      } catch {
+        Assert.Fail("PersistenceException expected.");
+      }
+    }
+
+    [StorableClass]
+    public class OneWayTest {
+      public OneWayTest() { this.value = "default"; }
+      public string value;
+      [Storable(AllowOneWay = true)]
+      public string ReadOnly {
+        get { return "ReadOnly"; }
+      }
+      [Storable(AllowOneWay = true)]
+      public string WriteOnly {
+        set { this.value = value; }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestOneWaySerialization() {
+      var test = new OneWayTest();
+      var serializer = new Serializer(test, ConfigurationService.Instance.GetDefaultConfig(new XmlFormat()));
+      var it = serializer.GetEnumerator();
+      it.MoveNext();
+      Assert.AreEqual("ROOT", ((BeginToken)it.Current).Name); it.MoveNext();
+      Assert.AreEqual("ReadOnly", ((PrimitiveToken)it.Current).Name); it.MoveNext();
+      Assert.AreEqual("ROOT", ((EndToken)it.Current).Name); it.MoveNext();
+      var deserializer = new Deserializer(new[] { 
+        new TypeMapping(0, typeof(OneWayTest).AssemblyQualifiedName, typeof(StorableSerializer).AssemblyQualifiedName),
+        new TypeMapping(1, typeof(string).AssemblyQualifiedName, typeof(String2XmlSerializer).AssemblyQualifiedName) });
+      var newTest = (OneWayTest)deserializer.Deserialize(new ISerializationToken[] {
+        new BeginToken("ROOT", 0, 0),
+        new PrimitiveToken("WriteOnly", 1, 1, new XmlString("<![CDATA[serial data]]>")),
+        new EndToken("ROOT", 0, 0)
+      });
+      Assert.AreEqual("serial data", newTest.value);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestTypeCacheExport() {
+      var test = new List<List<int>>();
+      test.Add(new List<int>() { 1, 2, 3 });
+      IEnumerable<Type> types;
+      using (var stream = new MemoryStream()) {
+        XmlGenerator.Serialize(test, stream, ConfigurationService.Instance.GetConfiguration(new XmlFormat()), false, out types);
+      }
+      List<Type> t = new List<Type>(types);
+      // Assert.IsTrue(t.Contains(typeof(int))); not serialized as an int list is directly transformed into a string
+      Assert.IsTrue(t.Contains(typeof(List<int>)));
+      Assert.IsTrue(t.Contains(typeof(List<List<int>>)));
+      Assert.AreEqual(t.Count, 2);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TupleTest() {
+      var t1 = Tuple.Create(1);
+      var t2 = Tuple.Create('1', "2");
+      var t3 = Tuple.Create(3.0, 3f, 5);
+      var t4 = Tuple.Create(Tuple.Create(1, 2, 3), Tuple.Create(4, 5, 6), Tuple.Create(8, 9, 10));
+      var tuple = Tuple.Create(t1, t2, t3, t4);
+      XmlGenerator.Serialize(tuple, tempFile);
+      var newTuple = XmlParser.Deserialize<Tuple<Tuple<int>, Tuple<char, string>, Tuple<double, float, int>, Tuple<Tuple<int, int, int>, Tuple<int, int, int>, Tuple<int, int, int>>>>(tempFile);
+      Assert.AreEqual(tuple, newTuple);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void FontTest() {
+      List<Font> fonts = new List<Font>() {
+        new Font(FontFamily.GenericSansSerif, 12),
+        new Font("Times New Roman", 21, FontStyle.Bold, GraphicsUnit.Pixel),
+        new Font("Courier New", 10, FontStyle.Underline, GraphicsUnit.Document),
+        new Font("Helvetica", 21, FontStyle.Strikeout, GraphicsUnit.Inch, 0, true),
+      };
+      XmlGenerator.Serialize(fonts, tempFile);
+      var newFonts = XmlParser.Deserialize<List<Font>>(tempFile);
+      Assert.AreEqual(fonts[0], newFonts[0]);
+      Assert.AreEqual(fonts[1], newFonts[1]);
+      Assert.AreEqual(fonts[2], newFonts[2]);
+      Assert.AreEqual(fonts[3], newFonts[3]);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "medium")]
+    public void ConcurrencyTest() {
+      int n = 20;
+      Task[] tasks = new Task[n];
+      for (int i = 0; i < n; i++) {
+        tasks[i] = Task.Factory.StartNew((idx) => {
+          byte[] data;
+          using (var stream = new MemoryStream()) {
+            XmlGenerator.Serialize(new GeneticAlgorithm(), stream);
+            data = stream.ToArray();
+          }
+        }, i);
+      }
+      Task.WaitAll(tasks);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "medium")]
+    public void ConcurrentBitmapTest() {
+      Bitmap b = new Bitmap(300, 300);
+      System.Random r = new System.Random();
+      for (int x = 0; x < b.Height; x++) {
+        for (int y = 0; y < b.Width; y++) {
+          b.SetPixel(x, y, Color.FromArgb(r.Next()));
+        }
+      }
+      Task[] tasks = new Task[20];
+      byte[][] datas = new byte[tasks.Length][];
+      for (int i = 0; i < tasks.Length; i++) {
+        tasks[i] = Task.Factory.StartNew((idx) => {
+          using (var stream = new MemoryStream()) {
+            XmlGenerator.Serialize(b, stream);
+            datas[(int)idx] = stream.ToArray();
+          }
+        }, i);
+      }
+      Task.WaitAll(tasks);
+    }
+
+    public class G<T, T2> {
+      public class S { }
+      public class S2<T3, T4> { }
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestInternalClassOfGeneric() {
+      var s = new G<int, char>.S();
+      var typeName = s.GetType().AssemblyQualifiedName;
+      Assert.AreEqual(
+        "UseCases.G<Int32,Char>.S",
+        TypeNameParser.Parse(typeName).GetTypeNameInCode(false));
+      XmlGenerator.Serialize(s, tempFile);
+      var s1 = XmlParser.Deserialize(tempFile);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestInternalClassOfGeneric2() {
+      var s = new G<int, float>.S2<int, char>();
+      var typeName = s.GetType().AssemblyQualifiedName;
+      Assert.AreEqual(
+        "UseCases.G<Int32,Single>.S2<Int32,Char>",
+        TypeNameParser.Parse(typeName).GetTypeNameInCode(false));
+      XmlGenerator.Serialize(s, tempFile);
+      var s1 = XmlParser.Deserialize(tempFile);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestSpecialCharacters() {
+      var s = "abc" + "\x15" + "def";
+      XmlGenerator.Serialize(s, tempFile);
+      var newS = XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(s, newS);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestByteArray() {
+      var b = new byte[3];
+      b[0] = 0;
+      b[1] = 200;
+      b[2] = byte.MaxValue;
+      XmlGenerator.Serialize(b, tempFile);
+      var newB = (byte[]) XmlParser.Deserialize(tempFile);
+      CollectionAssert.AreEqual(b, newB);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestOptionalNumberEnumerable() {
+      var values = new List<double?> {0, null, double.NaN, double.PositiveInfinity, double.MaxValue, 1};
+      XmlGenerator.Serialize(values, tempFile);
+      var newValues = (List<double?>) XmlParser.Deserialize(tempFile);
+      CollectionAssert.AreEqual(values, newValues);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestOptionalDateTimeEnumerable() {
+      var values = new List<DateTime?> { DateTime.MinValue, null, DateTime.Now, DateTime.Now.Add(TimeSpan.FromDays(1)),
+        DateTime.ParseExact("10.09.2014 12:21", "dd.MM.yyyy hh:mm", CultureInfo.InvariantCulture), DateTime.MaxValue};
+      XmlGenerator.Serialize(values, tempFile);
+      var newValues = (List<DateTime?>) XmlParser.Deserialize(tempFile);
+      CollectionAssert.AreEqual(values, newValues);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestStringEnumerable() {
+      var values = new List<string> {"", null, "s", "string", string.Empty, "123", "<![CDATA[nice]]>", "<![CDATA[nasty unterminated"};
+      XmlGenerator.Serialize(values, tempFile);
+      var newValues = (List<String>) XmlParser.Deserialize(tempFile);
+      CollectionAssert.AreEqual(values, newValues);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestUnicodeCharArray() {
+      var s = Encoding.UTF8.GetChars(new byte[] {0, 1, 2, 03, 04, 05, 06, 07, 08, 09, 0xa, 0xb});
+      XmlGenerator.Serialize(s, tempFile);
+      var newS = (char[])XmlParser.Deserialize(tempFile);
+      CollectionAssert.AreEqual(s, newS);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestUnicode() {
+      var s = Encoding.UTF8.GetString(new byte[] {0, 1, 2, 03, 04, 05, 06, 07, 08, 09, 0xa, 0xb});
+      XmlGenerator.Serialize(s, tempFile);
+      var newS = XmlParser.Deserialize(tempFile);
+      Assert.AreEqual(s, newS);
+    }
+
+    [TestMethod]
+    [TestCategory("Persistence")]
+    [TestProperty("Time", "short")]
+    public void TestQueue() {
+      var q = new Queue<int>(new[] {1, 2, 3, 4, 0});
+      XmlGenerator.Serialize(q, tempFile);
+      var newQ = (Queue<int>)XmlParser.Deserialize(tempFile);
+      CollectionAssert.AreEqual(q, newQ);
+    }
+
+
+
+    [ClassInitialize]
+    public static void Initialize(TestContext testContext) {
+      ConfigurationService.Instance.Reset();
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.PluginInfraStructure-3.3/TypeExtensionsTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.PluginInfraStructure-3.3/TypeExtensionsTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.PluginInfraStructure-3.3/TypeExtensionsTest.cs	(revision 16038)
@@ -0,0 +1,83 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Collections;
+using System.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Problems.DataAnalysis;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.PluginInfrastructure.Tests {
+  [TestClass]
+  public class TypeExtensionsTest {
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "short")]
+    public void IsSubTypeOfTest() {
+      Assert.IsTrue(typeof(int).IsSubTypeOf(typeof(object)));
+      Assert.IsTrue(typeof(IntValue).IsSubTypeOf(typeof(IItem)));
+      Assert.IsTrue(typeof(List<int>).IsSubTypeOf(typeof(object)));
+
+      Assert.IsTrue(typeof(List<int>).IsSubTypeOf(typeof(IList)));
+      Assert.IsTrue(typeof(List<>).IsSubTypeOf(typeof(IList)));
+      Assert.IsFalse(typeof(NamedItemCollection<>).IsSubTypeOf(typeof(ICollection<IItem>)));
+      Assert.IsFalse(typeof(NamedItemCollection<>).IsSubTypeOf(typeof(ICollection<NamedItem>)));
+
+
+      Assert.IsTrue(typeof(List<IItem>).IsSubTypeOf(typeof(IList<IItem>)));
+      Assert.IsFalse(typeof(IList<IntValue>).IsSubTypeOf(typeof(IList<IItem>)));
+      Assert.IsTrue(typeof(List<IItem>).IsSubTypeOf(typeof(IList<IItem>)));
+      Assert.IsFalse(typeof(ItemList<>).IsSubTypeOf(typeof(IList<IItem>)));
+      Assert.IsFalse(typeof(ItemList<>).IsSubTypeOf(typeof(List<IItem>)));
+
+      Assert.IsFalse(typeof(List<int>).IsSubTypeOf(typeof(List<>)));
+      Assert.IsTrue(typeof(List<>).IsSubTypeOf(typeof(IList<>)));
+      Assert.IsTrue(typeof(ItemList<>).IsSubTypeOf(typeof(IList<>)));
+      Assert.IsTrue(typeof(NamedItemCollection<>).IsSubTypeOf(typeof(IItemCollection<>)));
+      Assert.IsFalse(typeof(List<IntValue>).IsSubTypeOf(typeof(IList<>)));
+    }
+
+    [TestMethod]
+    [TestCategory("General")]
+    [TestCategory("Essential")]
+    [TestProperty("Time", "short")]
+    public void BuildTypeTest() {
+      Assert.AreEqual(typeof(List<>).BuildType(typeof(List<>)), typeof(List<>));
+      Assert.AreEqual(typeof(List<int>).BuildType(typeof(List<>)), typeof(List<int>));
+      Assert.AreEqual(typeof(List<>).BuildType(typeof(List<int>)), typeof(List<int>));
+
+      Assert.AreEqual(typeof(ICollection<>).BuildType(typeof(List<>)), typeof(ICollection<>));
+      Assert.AreEqual(typeof(ICollection<int>).BuildType(typeof(List<>)), typeof(ICollection<int>));
+      Assert.AreEqual(typeof(ICollection<>).BuildType(typeof(List<int>)), typeof(ICollection<int>));
+
+      Assert.AreEqual(typeof(ItemCollection<>).BuildType(typeof(ICollection<int>)), null);
+      Assert.AreEqual(typeof(ItemCollection<>).BuildType(typeof(Dictionary<IItem, IItem>)), null);
+      Assert.AreEqual(typeof(ItemCollection<>).BuildType(typeof(ICollection<IItem>)), typeof(ItemCollection<IItem>));
+
+      Assert.AreEqual(typeof(FixedValueParameter<>).BuildType(typeof(ItemCollection<DataAnalysisProblemData>)), null);
+      Assert.AreEqual(typeof(IFixedValueParameter<>).BuildType(typeof(ItemCollection<DoubleValue>)), typeof(IFixedValueParameter<DoubleValue>));
+      Assert.AreEqual(typeof(IFixedValueParameter<>).BuildType(typeof(ItemCollection<IItem>)), typeof(IFixedValueParameter<IItem>));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/OnlineCalculatorPerformanceTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/OnlineCalculatorPerformanceTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/OnlineCalculatorPerformanceTest.cs	(revision 16038)
@@ -0,0 +1,114 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.DataAnalysis.Tests {
+  [TestClass]
+  public class OnlineCalculatorPerformanceTest {
+    private const int Rows = 5000;
+    private const int Columns = 2;
+    private const int Repetitions = 10000;
+
+    private TestContext testContextInstance;
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get { return testContextInstance; }
+      set { testContextInstance = value; }
+    }
+
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "medium")]
+    public void OnlineAccuracyCalculatorPerformanceTest() {
+      TestCalculatorPerfomance(OnlineAccuracyCalculator.Calculate);
+    }
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "medium")]
+    public void OnlineCovarianceCalculatorPerformanceTest() {
+      TestCalculatorPerfomance(OnlineCovarianceCalculator.Calculate);
+    }
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "medium")]
+    public void OnlineMeanAbsolutePercentageErrorCalculatorPerformanceTest() {
+      TestCalculatorPerfomance(OnlineMeanAbsolutePercentageErrorCalculator.Calculate);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "medium")]
+    public void OnlineMeanSquaredErrorCalculatorPerformanceTest() {
+      TestCalculatorPerfomance(OnlineMeanSquaredErrorCalculator.Calculate);
+    }
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "medium")]
+    public void OnlineNormalizedMeanSquaredErrorCalculatorPerformanceTest() {
+      TestCalculatorPerfomance(OnlineNormalizedMeanSquaredErrorCalculator.Calculate);
+    }
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "medium")]
+    public void OnlinePearsonsRSquaredCalculatorPerformanceTest() {
+      TestCalculatorPerfomance(OnlinePearsonsRCalculator.Calculate);
+    }
+
+    private delegate double CalcateFunc(IEnumerable<double> estimated, IEnumerable<double> original, out OnlineCalculatorError errorState);
+    private void TestCalculatorPerfomance(CalcateFunc calculateFunc) {
+      var twister = new MersenneTwister(31415);
+      var dataset = CreateRandomDataset(twister, Rows, Columns);
+      OnlineCalculatorError errorState = OnlineCalculatorError.None; ;
+
+      Stopwatch watch = new Stopwatch();
+      watch.Start();
+      for (int i = 0; i < Repetitions; i++) {
+        double value = calculateFunc(dataset.GetDoubleValues("y"), dataset.GetDoubleValues("x0"), out errorState);
+      }
+      Assert.AreEqual(errorState, OnlineCalculatorError.None);
+      watch.Stop();
+
+      TestContext.WriteLine("");
+      TestContext.WriteLine("Calculated Rows per milisecond: {0}.", Rows * Repetitions * 1.0 / watch.ElapsedMilliseconds);
+    }
+
+    public static Dataset CreateRandomDataset(MersenneTwister twister, int rows, int columns) {
+      double[,] data = new double[rows, columns];
+      for (int i = 0; i < rows; i++) {
+        for (int j = 0; j < columns; j++) {
+          data[i, j] = twister.NextDouble() * 2.0 - 1.0;
+        }
+      }
+      IEnumerable<string> variableNames = new string[] { "y" }.Concat(Enumerable.Range(0, columns - 1).Select(x => "x" + x.ToString()));
+      Dataset ds = new Dataset(variableNames, data);
+      return ds;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/StatisticCalculatorsTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/StatisticCalculatorsTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/StatisticCalculatorsTest.cs	(revision 16038)
@@ -0,0 +1,213 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+namespace HeuristicLab.Problems.DataAnalysis.Tests {
+
+  [TestClass()]
+  public class StatisticCalculatorsTest {
+    private double[,] testData = new double[,] {
+     {5,1,1,1,2,1,3,1,1,2},
+     {5,4,4,5,7,10,3,2,1,2},
+     {3,1,1,1,2,2,3,1,1,2},
+     {6,8,8,1,3,4,3,7,1,2},
+     {4,1,1,3,2,1,3,1,1,2},
+     {8,10,10,8,7,10,9,7,1,4},            
+     {1,1,1,1,2,10,3,1,1,2},              
+     {2,1,2,1,2,1,3,1,1,2},                 
+     {2,1,1,1,2,1,1,1,5,2},                 
+     {4,2,1,1,2,1,2,1,1,2},                   
+     {1,1,1,1,1,1,3,1,1,2},    
+     {2,1,1,1,2,1,2,1,1,2},                   
+     {5,3,3,3,2,3,4,4,1,4},                          
+     {8,7,5,10,7,9,5,5,4,4},          
+     {7,4,6,4,6,1,4,3,1,4},                          
+     {4,1,1,1,2,1,2,1,1,2},     
+     {4,1,1,1,2,1,3,1,1,2},      
+     {10,7,7,6,4,10,4,1,2,4},  
+     {6,1,1,1,2,1,3,1,1,2},     
+     {7,3,2,10,5,10,5,4,4,4},   
+     {10,5,5,3,6,7,7,10,1,4} 
+      };
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CalculateMeanAndVarianceTest() {
+      System.Random random = new System.Random(31415);
+
+      int n = testData.GetLength(0);
+      int cols = testData.GetLength(1);
+      {
+        for (int col = 0; col < cols; col++) {
+          double scale = random.NextDouble();
+          IEnumerable<double> x = from rows in Enumerable.Range(0, n)
+                                  select testData[rows, col] * scale;
+          double[] xs = x.ToArray();
+          double mean_alglib, variance_alglib;
+          mean_alglib = variance_alglib = 0.0;
+          double tmp = 0;
+
+          alglib.samplemoments(xs, n, out  mean_alglib, out variance_alglib, out tmp, out tmp);
+
+          var calculator = new OnlineMeanAndVarianceCalculator();
+          for (int i = 0; i < n; i++) {
+            calculator.Add(xs[i]);
+          }
+          double mean = calculator.Mean;
+          double variance = calculator.Variance;
+
+          Assert.IsTrue(mean_alglib.IsAlmost(mean));
+          Assert.IsTrue(variance_alglib.IsAlmost(variance));
+        }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CalculatePearsonsRSquaredTest() {
+      System.Random random = new System.Random(31415);
+      int n = testData.GetLength(0);
+      int cols = testData.GetLength(1);
+      for (int c1 = 0; c1 < cols; c1++) {
+        for (int c2 = c1 + 1; c2 < cols; c2++) {
+          {
+            double c1Scale = random.NextDouble() * 1E7;
+            double c2Scale = random.NextDouble() * 1E7;
+            IEnumerable<double> x = from rows in Enumerable.Range(0, n)
+                                    select testData[rows, c1] * c1Scale;
+            IEnumerable<double> y = from rows in Enumerable.Range(0, n)
+                                    select testData[rows, c2] * c2Scale;
+            double[] xs = x.ToArray();
+            double[] ys = y.ToArray();
+            double r2_alglib = alglib.pearsoncorrelation(xs, ys, n);
+            r2_alglib *= r2_alglib;
+
+            var r2Calculator = new OnlinePearsonsRSquaredCalculator();
+            for (int i = 0; i < n; i++) {
+              r2Calculator.Add(xs[i], ys[i]);
+            }
+            double r2 = r2Calculator.RSquared;
+
+            Assert.IsTrue(r2_alglib.IsAlmost(r2));
+          }
+        }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CalculatePearsonsRSquaredOfConstantTest() {
+      System.Random random = new System.Random(31415);
+      int n = 12;
+      int cols = testData.GetLength(1);
+      for (int c1 = 0; c1 < cols; c1++) {
+        double c1Scale = random.NextDouble() * 1E7;
+        IEnumerable<double> x = from rows in Enumerable.Range(0, n)
+                                select testData[rows, c1] * c1Scale;
+        IEnumerable<double> y = (new List<double>() { 150494407424305.47 })
+          .Concat(Enumerable.Repeat(150494407424305.47, n - 1));
+        double[] xs = x.ToArray();
+        double[] ys = y.ToArray();
+        double r2_alglib = alglib.pearsoncorrelation(xs, ys, n);
+        r2_alglib *= r2_alglib;
+
+        var r2Calculator = new OnlinePearsonsRSquaredCalculator();
+        for (int i = 0; i < n; i++) {
+          r2Calculator.Add(xs[i], ys[i]);
+        }
+        double r2 = r2Calculator.RSquared;
+
+        Assert.AreEqual(r2_alglib.ToString(), r2.ToString());
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void CalculateHoeffdingsDTest() {
+      OnlineCalculatorError error;
+      // direct perfect dependency
+      var xs = new double[] { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };
+      var ys = new double[] { 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 };
+      var d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
+      Assert.AreEqual(error, OnlineCalculatorError.None);
+      Assert.AreEqual(d, 1.0, 1E-5);
+
+      // perfect negative dependency
+      ys = xs.Select(x => -x).ToArray();
+      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
+      Assert.AreEqual(error, OnlineCalculatorError.None);
+      Assert.AreEqual(d, 1.0, 1E-5);
+
+      // ties
+      xs = new double[] { 1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 5.0 };
+      ys = new double[] { 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 6.0, 6.0, 6.0 };
+      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
+      Assert.AreEqual(error, OnlineCalculatorError.None);
+      Assert.AreEqual(d, 0.6783, 1E-5);
+
+      // ties
+      xs = new double[] { 1.0, 1.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 6.0, 6.0 };
+      ys = xs.Select(x => x * x).ToArray();
+      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
+      Assert.AreEqual(error, OnlineCalculatorError.None);
+      Assert.AreEqual(d, 0.75, 1E-5);
+
+      // degenerate
+      xs = new double[] { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
+      ys = new double[] { 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0 };
+      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
+      Assert.AreEqual(error, OnlineCalculatorError.None);
+      Assert.AreEqual(d, -0.3516, 1E-4);
+
+
+      var normal = new HeuristicLab.Random.NormalDistributedRandom(new HeuristicLab.Random.MersenneTwister(31415), 0, 1);
+
+      xs = Enumerable.Range(0, 1000).Select(i => normal.NextDouble()).ToArray();
+      ys = Enumerable.Range(0, 1000).Select(i => normal.NextDouble()).ToArray();
+
+      // independent
+      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
+      Assert.AreEqual(error, OnlineCalculatorError.None);
+      Assert.AreEqual(d, -0.00023, 1E-5);
+
+
+      xs = Enumerable.Range(0, 1000).Select(i => normal.NextDouble()).ToArray();
+      ys = xs.Select(x => x * x).ToArray();
+
+      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(xs, ys, out error);
+      Assert.AreEqual(error, OnlineCalculatorError.None);
+      Assert.AreEqual(d, 0.25071, 1E-5);
+
+      // symmetric?
+      d = HoeffdingsDependenceCalculator.CalculateHoeffdings(ys, xs, out error);
+      Assert.AreEqual(error, OnlineCalculatorError.None);
+      Assert.AreEqual(d, 0.25071, 1E-5);
+
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/ThresholdCalculatorsTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/ThresholdCalculatorsTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/ThresholdCalculatorsTest.cs	(revision 16038)
@@ -0,0 +1,199 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.DataAnalysis.Tests {
+
+  [TestClass()]
+  public class ThresholdCalculatorsTest {
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void NormalDistributionCutPointsThresholdCalculatorTest() {
+
+      {
+        // simple two-class case
+        double[] estimatedValues = new double[] { 1.0, 0.99, 1.01, 2.0, 1.99, 2.01 };
+        double[] targetClassValues = new double[] { 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 };
+        double[] classValues;
+        double[] thresholds;
+        NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(null, estimatedValues, targetClassValues,
+                                                                           out classValues, out thresholds);
+
+        var expectedClassValues = new double[] { 0.0, 1.0 };
+        var expectedTresholds = new double[] { double.NegativeInfinity, 1.5 };
+
+        AssertEqual(expectedClassValues, classValues);
+        AssertEqual(expectedTresholds, thresholds);
+      }
+
+      {
+        // switched classes two-class case
+        double[] estimatedValues = new double[] { 1.0, 0.99, 1.01, 2.0, 1.99, 2.01 };
+        double[] targetClassValues = new double[] { 1.0, 1.0, 1.0, 0.0, 0.0, 0.0 };
+        double[] classValues;
+        double[] thresholds;
+        NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(null, estimatedValues, targetClassValues,
+                                                                           out classValues, out thresholds);
+
+        var expectedClassValues = new double[] { 1.0, 0.0 };
+        var expectedTresholds = new double[] { double.NegativeInfinity, 1.5 };
+
+        AssertEqual(expectedClassValues, classValues);
+        AssertEqual(expectedTresholds, thresholds);
+      }
+
+      {
+        // three-class case with permutated estimated values
+        double[] estimatedValues = new double[] { 1.0, 0.99, 1.01, 2.0, 1.99, 2.01, -1.0, -0.99, -1.01 };
+        double[] targetClassValues = new double[] { 2.0, 2.0, 2.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 };
+        double[] classValues;
+        double[] thresholds;
+        NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(null, estimatedValues, targetClassValues,
+                                                                           out classValues, out thresholds);
+
+        var expectedClassValues = new double[] { 1.0, 2.0, 0.0 };
+        var expectedTresholds = new double[] { double.NegativeInfinity, 0.0, 1.5 };
+
+        AssertEqual(expectedClassValues, classValues);
+        AssertEqual(expectedTresholds, thresholds);
+      }
+
+      {
+        // constant output values for all classes
+        // most frequent class is 0
+        double[] estimatedValues = new double[] { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
+        double[] targetClassValues = new double[] { 2.0, 2.0, 2.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 };
+        double[] classValues;
+        double[] thresholds;
+        NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(null, estimatedValues, targetClassValues,
+                                                                           out classValues, out thresholds);
+
+        var expectedClassValues = new double[] { 0.0 };
+        var expectedTresholds = new double[] { double.NegativeInfinity };
+
+        AssertEqual(expectedClassValues, classValues);
+        AssertEqual(expectedTresholds, thresholds);
+      }
+
+      {
+        // constant output values for two of three classes
+        double[] estimatedValues = new double[] { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -0.99, -1.01 };
+        double[] targetClassValues = new double[] { 2.0, 2.0, 2.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 };
+        double[] classValues;
+        double[] thresholds;
+        NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(null, estimatedValues, targetClassValues,
+                                                                           out classValues, out thresholds);
+
+
+        var expectedClassValues = new double[] { 1.0, 0.0, 1.0 };
+        double range = 1.0 + 1.01;
+        var expectedTresholds = new double[] { double.NegativeInfinity, 1.0 - 0.001 * range, 1.0 + 0.001 * range };
+
+        AssertEqual(expectedClassValues, classValues);
+        AssertEqual(expectedTresholds, thresholds);
+      }
+
+
+      {
+        // normal operation
+        double[] estimatedValues = new double[]
+                                     {
+                                       2.9937,
+                                       2.9861,
+                                       1.0202,
+                                       0.9844,
+                                       1.9912,
+                                       1.9970,
+                                       0.9776,
+                                       0.9611,
+                                       1.9882,
+                                       1.9953,
+                                       2.0147,
+                                       2.0106,
+                                       2.9949,
+                                       0.9925,
+                                       3.0050,
+                                       1.9987,
+                                       2.9973,
+                                       1.0110,
+                                       2.0160,
+                                       2.9559,
+                                       1.9943,
+                                       2.9477,
+                                       2.0158,
+                                       2.0026,
+                                       1.9837,
+                                       3.0185,
+                                     };
+        double[] targetClassValues = new double[]
+                                       {
+                                          3,
+                                          3,
+                                          1,
+                                          1,
+                                          2,
+                                          2,
+                                          1,
+                                          1,
+                                          2,
+                                          2,
+                                          2,
+                                          2,
+                                          3,
+                                          1,
+                                          3,
+                                          2,
+                                          3,
+                                          1,
+                                          2,
+                                          3,
+                                          2,
+                                          3,
+                                          2,
+                                          2,
+                                          2,
+                                          3,
+                                       };
+
+        double[] classValues;
+        double[] thresholds;
+        NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(null, estimatedValues, targetClassValues,
+                                                                           out classValues, out thresholds);
+
+
+        var expectedClassValues = new double[] { 3.0, 1.0, 2.0, 3.0 };
+        var expectedTresholds = new double[] { double.NegativeInfinity, -18.36483129043598, 1.6574168546810319, 2.3148463106026012 };
+
+        AssertEqual(expectedClassValues, classValues);
+        AssertEqual(expectedTresholds, thresholds);
+      }
+    }
+
+
+    private static void AssertEqual(double[] expected, double[] actual) {
+      Assert.AreEqual(expected.Length, actual.Length);
+      for (int i = 0; i < expected.Length; i++)
+        Assert.AreEqual(expected[i], actual[i]);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/VariableImpactCalculationTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/VariableImpactCalculationTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/VariableImpactCalculationTest.cs	(revision 16038)
@@ -0,0 +1,238 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Algorithms.ALPS;
+using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Selection;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.DataAnalysis.Tests {
+
+  [TestClass()]
+  public class VariableImpactCalculationTest {
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "medium")]
+    public void RunAlpsSymRegFactoryVariableMibaC1Test() {
+      var alpsGA = CreateAlpsGaSymRegMibaC1Sample();
+      alpsGA.Start();
+      var ers = alpsGA.Results.FirstOrDefault(v => v.Name == "Variable impacts").Value as DoubleMatrix;
+      Assert.IsNotNull(ers);
+      Assert.IsTrue(ers.Rows == 22);
+      List<string> expectedVariableOrder = new List<string> { "Oil", "Grooving", "Material_Cat", "x20", "Material", "x14", "x12", "x3", "x7", "x2", "x16", "x15", "x8", "x10", "x11", "x22", "x4", "x5", "x6", "x9", "x17", "x13" };
+      List<double> expectedVariableImpacts = new List<double> { 0.206, 0.179, 0.136, 0.099, 0.092, 0.07, 0.048, 0.033, 0.029, 0.026, 0.017, 0.01, 0.007, 0.007, 0.007, 0.006, 0.005, 0.005, 0.005, 0.005, 0.005, 0.003 };
+      Assert.IsTrue(ers.RowNames.SequenceEqual(expectedVariableOrder));
+      Assert.IsTrue(ers.SequenceEqual(expectedVariableImpacts));
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "medium")]
+    public void RunAlpsSymRegFactoryVariableMibaWear1Test() {
+      var alpsGA = CreateAlpsGaSymRegMibaWear1Sample();
+      alpsGA.Start();
+      var ers = alpsGA.Results.FirstOrDefault(v => v.Name == "Variable impacts").Value as DoubleMatrix;
+      Assert.IsNotNull(ers);
+      Assert.IsTrue(ers.Rows == 27);
+      List<string> expectedVariableOrder = new List<string> { "Oil", "Material_Cat", "Material", "Grooving", "x8", "x1", "x14", "x11", "x19", "x10", "x5", "x9", "x17", "x6", "x18", "x7", "Source1", "x2", "x3", "x4", "x16", "x20", "x12", "x13", "x15", "x22", "x21" };
+      List<double> expectedVariableImpacts = new List<double> { 0.194, 0.184, 0.163, 0.155, 0.022, 0.019, 0.019, 0.018, 0.017, 0.016, 0.015, 0.015, 0.015, 0.014, 0.014, 0.013, 0.012, 0.011, 0.011, 0.011, 0.011, 0.011, 0.01, 0.009, 0.009, 0.008, 0.006 };
+      Assert.IsTrue(ers.RowNames.SequenceEqual(expectedVariableOrder));
+      Assert.IsTrue(ers.SequenceEqual(expectedVariableImpacts));
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "medium")]
+    public void RunAlpsSymRegFactoryVariableRealworldTowerTest() {
+      var alpsGA = CreateAlpsGaSymReRealworldTowerSample();
+      alpsGA.Start();
+      var ers = alpsGA.Results.FirstOrDefault(v => v.Name == "Variable impacts").Value as DoubleMatrix;
+      Assert.IsNotNull(ers);
+      Assert.IsTrue(ers.Rows == 25);
+      List<string> expectedVariableOrder = new List<string> { "x5", "x4", "x21", "x22", "x13", "x3", "x9", "x19", "x1", "x12", "x8", "x10", "x25", "x11", "x23", "x7", "x24", "x6", "x14", "x15", "x20", "x2", "x16", "x18", "x17" };
+      List<double> expectedVariableImpacts = new List<double> { 0.057, 0.051, 0.047, 0.047, 0.046, 0.045, 0.044, 0.044, 0.043, 0.043, 0.041, 0.04, 0.04, 0.038, 0.038, 0.037, 0.037, 0.036, 0.036, 0.034, 0.033, 0.031, 0.031, 0.031, 0.03 };
+      Assert.IsTrue(ers.RowNames.SequenceEqual(expectedVariableOrder));
+      Assert.IsTrue(ers.SequenceEqual(expectedVariableImpacts));
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void RunRandomForestPolyTenTest() {
+      var randomForestRegression = new RandomForestRegression() {
+        M = 0.4,
+        R = 0.3,
+        NumberOfTrees = 50,
+        SetSeedRandomly = false,
+        Seed = 42
+      };
+
+      var symbRegProblem = new SymbolicRegressionSingleObjectiveProblem();
+      symbRegProblem.ProblemData = new PolyTen(555000).GenerateRegressionData();
+      randomForestRegression.Problem = symbRegProblem;
+      randomForestRegression.Start();
+
+      var rfs = randomForestRegression.Results.FirstOrDefault(v => v.Name == "Random forest regression solution").Value as RandomForestRegressionSolution;
+      Assert.IsNotNull(rfs);
+      var result = new RegressionSolutionVariableImpactsCalculator().Calculate(rfs);
+
+      //Set expected impacts
+      List<Tuple<string, double>> aux = new List<Tuple<string, double>>();
+      aux.Add(new Tuple<string, double>("X6", 0.14984398650032071));
+      aux.Add(new Tuple<string, double>("X5", 0.14361275357221248));
+      aux.Add(new Tuple<string, double>("X1", 0.10607502238071009));
+      aux.Add(new Tuple<string, double>("X3", 0.1056849194554953));
+      aux.Add(new Tuple<string, double>("X4", 0.0906750779077492));
+      aux.Add(new Tuple<string, double>("X2", 0.089817766590950532));
+      aux.Add(new Tuple<string, double>("X8", 0.042797597332305481));
+      aux.Add(new Tuple<string, double>("X9", 0.038609311722408446));
+      aux.Add(new Tuple<string, double>("X10", 0.036202503161574362));
+      aux.Add(new Tuple<string, double>("X7", 0.033539038256832465));
+      Assert.IsTrue(result.SequenceEqual(aux));
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void RunLinearRegressionBreimanITest() {
+      LinearRegression lr = new LinearRegression();
+      var symbRegProblem = new SymbolicRegressionSingleObjectiveProblem();
+      symbRegProblem.ProblemData = new BreimanOne(1234).GenerateRegressionData();
+
+      lr.Problem = symbRegProblem;
+      lr.Start();
+
+      var lrs = lr.Results.FirstOrDefault(v => v.Name == "Linear regression solution").Value as SymbolicRegressionSolution;
+      Assert.IsNotNull(lrs);
+      var result = new RegressionSolutionVariableImpactsCalculator().Calculate(lrs);
+
+      //Set expected impacts
+      List<Tuple<string, double>> aux = new List<Tuple<string, double>>();
+      aux.Add(new Tuple<string, double>("X1", 0.43328518823918716));
+      aux.Add(new Tuple<string, double>("X2", 0.073284548674773631));
+      aux.Add(new Tuple<string, double>("X5", 0.070306657566311159));
+      aux.Add(new Tuple<string, double>("X3", 0.035352205426012917));
+      aux.Add(new Tuple<string, double>("X6", 0.031710492680145475));
+      aux.Add(new Tuple<string, double>("X4", 0.0081659530036176653));
+      aux.Add(new Tuple<string, double>("X7", 0.0070869550705255913));
+      aux.Add(new Tuple<string, double>("X9", 8.0546619615096127E-05));
+      aux.Add(new Tuple<string, double>("X8", 6.2072921147349192E-05));
+      aux.Add(new Tuple<string, double>("X10", 1.9113559758254794E-06));
+
+      Assert.IsTrue(result.SequenceEqual(aux));
+    }
+
+    private AlpsGeneticAlgorithm CreateAlpsGaSymRegMibaC1Sample() {
+      AlpsGeneticAlgorithm alpsGa = new AlpsGeneticAlgorithm();
+      #region Problem Configuration
+      var provider = new MibaFrictionRegressionInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name.StartsWith("CF1"));
+      var symbRegProblem = new SymbolicRegressionSingleObjectiveProblem();
+      symbRegProblem.Load(provider.LoadData(instance));
+
+      symbRegProblem.MaximumSymbolicExpressionTreeDepth.Value = 35;
+      symbRegProblem.MaximumSymbolicExpressionTreeLength.Value = 35;
+
+      var grammar = (TypeCoherentExpressionGrammar)symbRegProblem.SymbolicExpressionTreeGrammar;
+      grammar.Symbols.OfType<Exponential>().Single().Enabled = false;
+      grammar.Symbols.OfType<Logarithm>().Single().Enabled = false;
+
+      #endregion
+      #region Algorithm Configuration
+      alpsGa.Name = "ALPS Genetic Programming - Symbolic Regression";
+      alpsGa.Description = "An ALPS-GP to solve a symbolic regression problem";
+      alpsGa.Problem = symbRegProblem;
+      SamplesUtils.ConfigureAlpsGeneticAlgorithmParameters<GeneralizedRankSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>(alpsGa,
+        numberOfLayers: 1000,
+        popSize: 100,
+        mutationRate: 0.25,
+        elites: 1,
+        plusSelection: false,
+        agingScheme: AgingScheme.Polynomial,
+        ageGap: 15,
+        ageInheritance: 1.0,
+        maxGens: 10);
+
+      alpsGa.SetSeedRandomly.Value = false;
+      alpsGa.Seed.Value = 1234;
+      #endregion
+      return alpsGa;
+    }
+    private AlpsGeneticAlgorithm CreateAlpsGaSymRegMibaWear1Sample() {
+      AlpsGeneticAlgorithm alpsGa = new AlpsGeneticAlgorithm();
+      #region Problem Configuration
+      var provider = new MibaFrictionRegressionInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name.StartsWith("Wear1"));
+      var symbRegProblem = new SymbolicRegressionSingleObjectiveProblem();
+      symbRegProblem.Load(provider.LoadData(instance));
+
+      symbRegProblem.MaximumSymbolicExpressionTreeDepth.Value = 77;
+      symbRegProblem.MaximumSymbolicExpressionTreeLength.Value = 77;
+
+      var grammar = (TypeCoherentExpressionGrammar)symbRegProblem.SymbolicExpressionTreeGrammar;
+
+      #endregion
+      #region Algorithm Configuration
+      alpsGa.Name = "ALPS Genetic Programming - Symbolic Regression";
+      alpsGa.Description = "An ALPS-GP to solve a symbolic regression problem";
+      alpsGa.Problem = symbRegProblem;
+      SamplesUtils.ConfigureAlpsGeneticAlgorithmParameters<RandomSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>(alpsGa,
+        numberOfLayers: 1000,
+        popSize: 200,
+        mutationRate: 0.25,
+        elites: 1,
+        plusSelection: false,
+        agingScheme: AgingScheme.Polynomial,
+        ageGap: 15,
+        ageInheritance: 1.0,
+        maxGens: 10);
+
+      alpsGa.SetSeedRandomly.Value = false;
+      alpsGa.Seed.Value = 11121314;
+      #endregion
+      return alpsGa;
+    }
+    private AlpsGeneticAlgorithm CreateAlpsGaSymReRealworldTowerSample() {
+      AlpsGeneticAlgorithm alpsGa = new AlpsGeneticAlgorithm();
+      #region Problem Configuration
+      var provider = new RegressionRealWorldInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name.StartsWith("Tower"));
+      var symbRegProblem = new SymbolicRegressionSingleObjectiveProblem();
+      symbRegProblem.Load(provider.LoadData(instance));
+
+      symbRegProblem.MaximumSymbolicExpressionTreeDepth.Value = 77;
+      symbRegProblem.MaximumSymbolicExpressionTreeLength.Value = 77;
+
+      var grammar = (TypeCoherentExpressionGrammar)symbRegProblem.SymbolicExpressionTreeGrammar;
+
+      #endregion
+      #region Algorithm Configuration
+      alpsGa.Name = "ALPS Genetic Programming - Symbolic Regression";
+      alpsGa.Description = "An ALPS-GP to solve a symbolic regression problem";
+      alpsGa.Problem = symbRegProblem;
+      SamplesUtils.ConfigureAlpsGeneticAlgorithmParameters<RandomSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>(alpsGa,
+        numberOfLayers: 1000,
+        popSize: 200,
+        mutationRate: 0.25,
+        elites: 1,
+        plusSelection: false,
+        agingScheme: AgingScheme.Polynomial,
+        ageGap: 15,
+        ageInheritance: 1.0,
+        maxGens: 10);
+
+      alpsGa.SetSeedRandomly.Value = false;
+      alpsGa.Seed.Value = 1111;
+      #endregion
+      return alpsGa;
+    }
+
+    //TODO: Add Function-Tests once the Branch of #2904 is done
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/InfixExpressionParserTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/InfixExpressionParserTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/InfixExpressionParserTest.cs	(revision 16038)
@@ -0,0 +1,125 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Tests {
+
+
+  [TestClass]
+  public class InfixExpressionParserTest {
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "short")]
+    public void InfixExpressionParserTestFormatting() {
+      var formatter = new InfixExpressionFormatter();
+      var parser = new InfixExpressionParser();
+      Console.WriteLine(formatter.Format(parser.Parse("3")));
+      Console.WriteLine(formatter.Format(parser.Parse("3*3")));
+      Console.WriteLine(formatter.Format(parser.Parse("3 * 4")));
+      Console.WriteLine(formatter.Format(parser.Parse("123E-03")));
+      Console.WriteLine(formatter.Format(parser.Parse("123e-03")));
+      Console.WriteLine(formatter.Format(parser.Parse("123e+03")));
+      Console.WriteLine(formatter.Format(parser.Parse("123E+03")));
+      Console.WriteLine(formatter.Format(parser.Parse("123.0E-03")));
+      Console.WriteLine(formatter.Format(parser.Parse("123.0e-03")));
+      Console.WriteLine(formatter.Format(parser.Parse("123.0e+03")));
+      Console.WriteLine(formatter.Format(parser.Parse("123.0E+03")));
+      Console.WriteLine(formatter.Format(parser.Parse("123.0E-3")));
+      Console.WriteLine(formatter.Format(parser.Parse("123.0e-3")));
+      Console.WriteLine(formatter.Format(parser.Parse("123.0e+3")));
+      Console.WriteLine(formatter.Format(parser.Parse("123.0E+3")));
+
+      Console.WriteLine(formatter.Format(parser.Parse("3.1415+2.0")));
+      Console.WriteLine(formatter.Format(parser.Parse("3.1415/2.0")));
+      Console.WriteLine(formatter.Format(parser.Parse("3.1415*2.0")));
+      Console.WriteLine(formatter.Format(parser.Parse("3.1415-2.0")));
+      // round-trip
+      Console.WriteLine(formatter.Format(parser.Parse(formatter.Format(parser.Parse("3.1415-2.0")))));
+      Console.WriteLine(formatter.Format(parser.Parse("3.1415+(2.0)")));
+      Console.WriteLine(formatter.Format(parser.Parse("(3.1415+(2.0))")));
+
+
+      Console.WriteLine(formatter.Format(parser.Parse("log(3)")));
+      Console.WriteLine(formatter.Format(parser.Parse("log(-3)")));
+      Console.WriteLine(formatter.Format(parser.Parse("exp(3)")));
+      Console.WriteLine(formatter.Format(parser.Parse("exp(-3)")));
+      Console.WriteLine(formatter.Format(parser.Parse("sqrt(3)")));
+
+      Console.WriteLine(formatter.Format(parser.Parse("sqr((-3))")));
+
+      Console.WriteLine(formatter.Format(parser.Parse("3/3+2/2+1/1")));
+      Console.WriteLine(formatter.Format(parser.Parse("-3+30-2+20-1+10")));
+      // round trip
+      Console.WriteLine(formatter.Format(parser.Parse(formatter.Format(parser.Parse("-3+30-2+20-1+10")))));
+
+      Console.WriteLine(formatter.Format(parser.Parse("\"x1\"")));
+      Console.WriteLine(formatter.Format(parser.Parse("\'var name\'")));
+      Console.WriteLine(formatter.Format(parser.Parse("\"var name\"")));
+      Console.WriteLine(formatter.Format(parser.Parse("\"1\"")));
+
+      Console.WriteLine(formatter.Format(parser.Parse("'var \" name\'")));
+      Console.WriteLine(formatter.Format(parser.Parse("\"var \' name\"")));
+
+
+      Console.WriteLine(formatter.Format(parser.Parse("\"x1\"*\"x2\"")));
+      Console.WriteLine(formatter.Format(parser.Parse("\"x1\"*\"x2\"+\"x3\"*\"x4\"")));
+      Console.WriteLine(formatter.Format(parser.Parse("x1*x2+x3*x4")));
+
+
+      Console.WriteLine(formatter.Format(parser.Parse("POW(3, 2)")));
+      Console.WriteLine(formatter.Format(parser.Parse("POW(3.1, 2.1)")));
+      Console.WriteLine(formatter.Format(parser.Parse("POW(3.1 , 2.1)")));
+      Console.WriteLine(formatter.Format(parser.Parse("POW(3.1 ,2.1)")));
+      Console.WriteLine(formatter.Format(parser.Parse("POW(-3.1 , - 2.1)")));
+      Console.WriteLine(formatter.Format(parser.Parse("ROOT(3, 2)")));
+      Console.WriteLine(formatter.Format(parser.Parse("ROOT(3.1, 2.1)")));
+      Console.WriteLine(formatter.Format(parser.Parse("ROOT(3.1 , 2.1)")));
+      Console.WriteLine(formatter.Format(parser.Parse("ROOT(3.1 ,2.1)")));
+      Console.WriteLine(formatter.Format(parser.Parse("ROOT(-3.1 , - 2.1)")));
+
+      Console.WriteLine(formatter.Format(parser.Parse("IF(GT( 0, 1), 1, 0)")));
+      Console.WriteLine(formatter.Format(parser.Parse("IF(LT(0,1), 1 , 0)")));
+
+      Console.WriteLine(formatter.Format(parser.Parse("LAG(x, 1)")));
+      Console.WriteLine(formatter.Format(parser.Parse("LAG(x, -1)")));
+      Console.WriteLine(formatter.Format(parser.Parse("LAG(x, +1)")));
+      Console.WriteLine(formatter.Format(parser.Parse("x * LAG('x', +1)")));
+
+      Console.WriteLine(formatter.Format(parser.Parse("x [1.0] * y")));
+      Console.WriteLine(formatter.Format(parser.Parse("x [1.0, 2.0] * y [1.0, 2.0]")));
+      Console.WriteLine(formatter.Format(parser.Parse("x[1] * y")));
+      Console.WriteLine(formatter.Format(parser.Parse("x[1, 2] * y [1, 2]")));
+
+      Console.WriteLine(formatter.Format(parser.Parse("x [+1.0] * y")));
+      Console.WriteLine(formatter.Format(parser.Parse("x [-1.0] * y")));
+      Console.WriteLine(formatter.Format(parser.Parse("x [-1.0, -2.0] * y [+1.0, +2.0]")));
+
+      Console.WriteLine(formatter.Format(parser.Parse("x='bla' * y")));
+      Console.WriteLine(formatter.Format(parser.Parse("x = 'bla'")));
+      Console.WriteLine(formatter.Format(parser.Parse("x = \"bla\"")));
+      Console.WriteLine(formatter.Format(parser.Parse("1.0 * x = bla")));
+      Console.WriteLine(formatter.Format(parser.Parse("-1.0 * x = bla")));
+      Console.WriteLine(formatter.Format(parser.Parse("+1.0 * \"x\" = bla + y = \"bla2\"")));
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionCrossoverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionCrossoverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionCrossoverTest.cs	(revision 16038)
@@ -0,0 +1,151 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Diagnostics;
+using System.Linq;
+using System.Threading;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using ExecutionContext = HeuristicLab.Core.ExecutionContext;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Tests {
+  [TestClass()]
+  public class SymbolicDataAnalysisExpressionCrossoverTest {
+    private const int PopulationSize = 10000;
+    private const int MaxTreeDepth = 10;
+    private const int MaxTreeLength = 100;
+    private const int Rows = 1000;
+    private const int Columns = 50;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext { get; set; }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "long")]
+    public void SymbolicDataAnalysisExpressionSemanticSimilarityCrossoverPerformanceTest() {
+      var problem = new SymbolicRegressionSingleObjectiveProblem();
+      var crossover = problem.OperatorsParameter.Value.OfType<SymbolicDataAnalysisExpressionSemanticSimilarityCrossover<IRegressionProblemData>>().First();
+      SymbolicDataAnalysisCrossoverPerformanceTest(crossover);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "long")]
+    public void SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossoverPerformanceTest() {
+      var problem = new SymbolicRegressionSingleObjectiveProblem();
+      var crossover = problem.OperatorsParameter.Value.OfType<SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover<IRegressionProblemData>>().First();
+      SymbolicDataAnalysisCrossoverPerformanceTest(crossover);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "long")]
+    public void SymbolicDataAnalysisExpressionDeterministicBestCrossoverPerformanceTest() {
+      var problem = new SymbolicRegressionSingleObjectiveProblem();
+      var crossover = problem.OperatorsParameter.Value.OfType<SymbolicDataAnalysisExpressionDeterministicBestCrossover<IRegressionProblemData>>().First();
+      SymbolicDataAnalysisCrossoverPerformanceTest(crossover);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "long")]
+    public void SymbolicDataAnalysisExpressionContextAwareCrossoverPerformanceTest() {
+      var problem = new SymbolicRegressionSingleObjectiveProblem();
+      var crossover = problem.OperatorsParameter.Value.OfType<SymbolicDataAnalysisExpressionContextAwareCrossover<IRegressionProblemData>>().First();
+      SymbolicDataAnalysisCrossoverPerformanceTest(crossover);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "long")]
+    public void SymbolicDataAnalysisExpressionDepthConstrainedCrossoverPerformanceTest() {
+      var problem = new SymbolicRegressionSingleObjectiveProblem();
+      var crossover = problem.OperatorsParameter.Value.OfType<SymbolicDataAnalysisExpressionDepthConstrainedCrossover<IRegressionProblemData>>().First();
+
+      crossover.DepthRangeParameter.Value = crossover.DepthRangeParameter.ValidValues.First(s => s.Value == "HighLevel");
+      SymbolicDataAnalysisCrossoverPerformanceTest(crossover);
+      crossover.DepthRangeParameter.Value = crossover.DepthRangeParameter.ValidValues.First(s => s.Value == "Standard");
+      SymbolicDataAnalysisCrossoverPerformanceTest(crossover);
+      crossover.DepthRangeParameter.Value = crossover.DepthRangeParameter.ValidValues.First(s => s.Value == "LowLevel");
+      SymbolicDataAnalysisCrossoverPerformanceTest(crossover);
+    }
+
+
+    private static void SymbolicDataAnalysisCrossoverPerformanceTest(ISymbolicDataAnalysisExpressionCrossover<IRegressionProblemData> crossover) {
+      var twister = new MersenneTwister(31415);
+      var dataset = Util.CreateRandomDataset(twister, Rows, Columns);
+      var grammar = new FullFunctionalExpressionGrammar();
+      var stopwatch = new Stopwatch();
+
+      grammar.MaximumFunctionArguments = 0;
+      grammar.MaximumFunctionDefinitions = 0;
+      grammar.MinimumFunctionArguments = 0;
+      grammar.MinimumFunctionDefinitions = 0;
+
+      var trees = Util.CreateRandomTrees(twister, dataset, grammar, PopulationSize, 1, MaxTreeLength, 0, 0);
+      foreach (ISymbolicExpressionTree tree in trees) {
+        Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
+      }
+      var problemData = new RegressionProblemData(dataset, dataset.VariableNames, dataset.VariableNames.Last());
+      var problem = new SymbolicRegressionSingleObjectiveProblem();
+      problem.ProblemData = problemData;
+
+      var globalScope = new Scope("Global Scope");
+      globalScope.Variables.Add(new Core.Variable("Random", twister));
+      var context = new ExecutionContext(null, problem, globalScope);
+      context = new ExecutionContext(context, crossover, globalScope);
+
+      stopwatch.Start();
+      for (int i = 0; i != PopulationSize; ++i) {
+        var parent0 = (ISymbolicExpressionTree)trees.SampleRandom(twister).Clone();
+        var scopeParent0 = new Scope();
+        scopeParent0.Variables.Add(new Core.Variable(crossover.ParentsParameter.ActualName, parent0));
+        context.Scope.SubScopes.Add(scopeParent0);
+
+        var parent1 = (ISymbolicExpressionTree)trees.SampleRandom(twister).Clone();
+        var scopeParent1 = new Scope();
+        scopeParent1.Variables.Add(new Core.Variable(crossover.ParentsParameter.ActualName, parent1));
+        context.Scope.SubScopes.Add(scopeParent1);
+
+        crossover.Execute(context, new CancellationToken());
+
+        context.Scope.SubScopes.Remove(scopeParent0); // clean the scope in preparation for the next iteration
+        context.Scope.SubScopes.Remove(scopeParent1); // clean the scope in preparation for the next iteration
+      }
+      stopwatch.Stop();
+      double msPerCrossover = 2 * stopwatch.ElapsedMilliseconds / (double)PopulationSize;
+      Console.WriteLine(crossover.Name + ": " + Environment.NewLine +
+                        msPerCrossover + " ms per crossover (~" + Math.Round(1000.0 / (msPerCrossover)) + " crossover operations / s)");
+
+      foreach (var tree in trees)
+        HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Tests.Util.IsValid(tree);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs	(revision 16038)
@@ -0,0 +1,618 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Globalization;
+using System.Linq;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Tests {
+
+
+  [TestClass]
+  public class SymbolicDataAnalysisExpressionTreeInterpreterTest {
+    private const int N = 1000;
+    private const int Rows = 1000;
+    private const int Columns = 50;
+
+    private static Dataset ds = new Dataset(new string[] { "Y", "A", "B" }, new double[,] {
+        { 1.0, 1.0, 1.0 },
+        { 2.0, 2.0, 2.0 },
+        { 3.0, 1.0, 2.0 },
+        { 4.0, 1.0, 1.0 },
+        { 5.0, 2.0, 2.0 },
+        { 6.0, 1.0, 2.0 },
+        { 7.0, 1.0, 1.0 },
+        { 8.0, 2.0, 2.0 },
+        { 9.0, 1.0, 2.0 },
+        { 10.0, 1.0, 1.0 },
+        { 11.0, 2.0, 2.0 },
+        { 12.0, 1.0, 2.0 }
+      });
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void StandardInterpreterTestTypeCoherentGrammarPerformance() {
+      TestTypeCoherentGrammarPerformance(new SymbolicDataAnalysisExpressionTreeInterpreter(), 12.5e6);
+    }
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void StandardInterpreterTestFullGrammarPerformance() {
+      TestFullGrammarPerformance(new SymbolicDataAnalysisExpressionTreeInterpreter(), 12.5e6);
+    }
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void StandardInterpreterTestArithmeticGrammarPerformance() {
+      TestArithmeticGrammarPerformance(new SymbolicDataAnalysisExpressionTreeInterpreter(), 12.5e6);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void CompiledInterpreterTestTypeCoherentGrammarPerformance() {
+      TestTypeCoherentGrammarPerformance(new SymbolicDataAnalysisExpressionCompiledTreeInterpreter(), 12.5e6);
+    }
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void CompiledInterpreterTestFullGrammarPerformance() {
+      TestFullGrammarPerformance(new SymbolicDataAnalysisExpressionCompiledTreeInterpreter(), 12.5e6);
+    }
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void CompiledInterpreterTestArithmeticGrammarPerformance() {
+      TestArithmeticGrammarPerformance(new SymbolicDataAnalysisExpressionCompiledTreeInterpreter(), 12.5e6);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void ILEmittingInterpreterTestTypeCoherentGrammarPerformance() {
+      TestTypeCoherentGrammarPerformance(new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(), 7.5e6);
+    }
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void ILEmittingInterpreterTestArithmeticGrammarPerformance() {
+      TestArithmeticGrammarPerformance(new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(), 7.5e6);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void LinearInterpreterTestTypeCoherentGrammarPerformance() {
+      TestTypeCoherentGrammarPerformance(new SymbolicDataAnalysisExpressionTreeLinearInterpreter(), 12.5e6);
+    }
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void LinearInterpreterTestFullGrammarPerformance() {
+      TestFullGrammarPerformance(new SymbolicDataAnalysisExpressionTreeLinearInterpreter(), 12.5e6);
+    }
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void LinearInterpreterTestArithmeticGrammarPerformance() {
+      TestArithmeticGrammarPerformance(new SymbolicDataAnalysisExpressionTreeLinearInterpreter(), 12.5e6);
+    }
+
+    private void TestTypeCoherentGrammarPerformance(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, double nodesPerSecThreshold) {
+      var twister = new MersenneTwister(31415);
+      var dataset = Util.CreateRandomDataset(twister, Rows, Columns);
+
+      var grammar = new TypeCoherentExpressionGrammar();
+      grammar.ConfigureAsDefaultRegressionGrammar();
+
+      var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 100, 0, 0);
+      foreach (ISymbolicExpressionTree tree in randomTrees) {
+        Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
+      }
+      double nodesPerSec = Util.CalculateEvaluatedNodesPerSec(randomTrees, interpreter, dataset, 3);
+      //mkommend: commented due to performance issues on the builder
+      // Assert.IsTrue(nodesPerSec > nodesPerSecThreshold); // evaluated nodes per seconds must be larger than 15mNodes/sec
+    }
+
+    private void TestFullGrammarPerformance(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, double nodesPerSecThreshold) {
+      var twister = new MersenneTwister(31415);
+      var dataset = Util.CreateRandomDataset(twister, Rows, Columns);
+
+      var grammar = new FullFunctionalExpressionGrammar();
+      var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 100, 0, 0);
+      foreach (ISymbolicExpressionTree tree in randomTrees) {
+        Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
+      }
+      double nodesPerSec = Util.CalculateEvaluatedNodesPerSec(randomTrees, interpreter, dataset, 3);
+      //mkommend: commented due to performance issues on the builder
+      //Assert.IsTrue(nodesPerSec > nodesPerSecThreshold); // evaluated nodes per seconds must be larger than 15mNodes/sec
+    }
+
+    private void TestArithmeticGrammarPerformance(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, double nodesPerSecThreshold) {
+      var twister = new MersenneTwister(31415);
+      var dataset = Util.CreateRandomDataset(twister, Rows, Columns);
+
+      var grammar = new ArithmeticExpressionGrammar();
+      var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 100, 0, 0);
+      foreach (SymbolicExpressionTree tree in randomTrees) {
+        Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
+      }
+
+      double nodesPerSec = Util.CalculateEvaluatedNodesPerSec(randomTrees, interpreter, dataset, 3);
+      //mkommend: commented due to performance issues on the builder
+      //Assert.IsTrue(nodesPerSec > nodesPerSecThreshold); // evaluated nodes per seconds must be larger than 15mNodes/sec
+    }
+
+
+    /// <summary>
+    ///A test for Evaluate
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "short")]
+    public void StandardInterpreterTestEvaluation() {
+      var interpreter = new SymbolicDataAnalysisExpressionTreeInterpreter();
+      EvaluateTerminals(interpreter, ds);
+      EvaluateOperations(interpreter, ds);
+      EvaluateLaggedOperations(interpreter, ds);
+      EvaluateSpecialFunctions(interpreter, ds);
+      EvaluateAdf(interpreter, ds);
+    }
+
+    /// <summary>
+    ///A test for Evaluate
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "short")]
+    public void ILEmittingInterpreterTestEvaluation() {
+      var interpreter = new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter();
+      EvaluateTerminals(interpreter, ds);
+      EvaluateOperations(interpreter, ds);
+      EvaluateLaggedOperations(interpreter, ds);
+      EvaluateSpecialFunctions(interpreter, ds);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "short")]
+    public void CompiledInterpreterTestEvaluation() {
+      var interpreter = new SymbolicDataAnalysisExpressionCompiledTreeInterpreter();
+      EvaluateTerminals(interpreter, ds);
+      EvaluateOperations(interpreter, ds);
+      EvaluateSpecialFunctions(interpreter, ds);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "short")]
+    public void LinearInterpreterTestEvaluation() {
+      var interpreter = new SymbolicDataAnalysisExpressionTreeLinearInterpreter();
+      //ADFs are not supported by the linear interpreter
+      EvaluateTerminals(interpreter, ds);
+      EvaluateOperations(interpreter, ds);
+      EvaluateLaggedOperations(interpreter, ds);
+      EvaluateSpecialFunctions(interpreter, ds);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void TestInterpretersEstimatedValuesConsistency() {
+      var twister = new MersenneTwister();
+      int seed = twister.Next(0, int.MaxValue);
+      twister.Seed((uint)seed);
+      const int numRows = 100;
+      var dataset = Util.CreateRandomDataset(twister, numRows, Columns);
+
+      var grammar = new TypeCoherentExpressionGrammar();
+
+      var interpreters = new ISymbolicDataAnalysisExpressionTreeInterpreter[] {
+        new SymbolicDataAnalysisExpressionTreeLinearInterpreter(),
+        new SymbolicDataAnalysisExpressionTreeInterpreter(),
+      };
+
+      var rows = Enumerable.Range(0, numRows).ToList();
+      var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 10, 0, 0);
+      foreach (ISymbolicExpressionTree tree in randomTrees) {
+        Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
+      }
+
+      for (int i = 0; i < randomTrees.Length; ++i) {
+        var tree = randomTrees[i];
+        var valuesMatrix = interpreters.Select(x => x.GetSymbolicExpressionTreeValues(tree, dataset, rows)).ToList();
+        for (int m = 0; m < interpreters.Length - 1; ++m) {
+          var sum = valuesMatrix[m].Sum();
+          for (int n = m + 1; n < interpreters.Length; ++n) {
+            var s = valuesMatrix[n].Sum();
+            if (double.IsNaN(sum) && double.IsNaN(s)) continue;
+
+            string errorMessage = string.Format("Interpreters {0} and {1} do not agree on tree {2} (seed = {3}).", interpreters[m].Name, interpreters[n].Name, i, seed);
+            Assert.AreEqual(sum, s, 1e-12, errorMessage);
+          }
+        }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void TestCompiledInterpreterEstimatedValuesConsistency() {
+      const double delta = 1e-12;
+
+      var twister = new MersenneTwister();
+      int seed = twister.Next(0, int.MaxValue);
+      twister.Seed((uint)seed);
+
+      Console.WriteLine(seed);
+
+      const int numRows = 100;
+      var dataset = Util.CreateRandomDataset(twister, numRows, Columns);
+
+      var grammar = new TypeCoherentExpressionGrammar();
+      grammar.ConfigureAsDefaultRegressionGrammar();
+      grammar.Symbols.First(x => x.Name == "Power Functions").Enabled = true;
+
+      var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 10, 0, 0);
+      foreach (ISymbolicExpressionTree tree in randomTrees) {
+        Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
+      }
+
+      var interpreters = new ISymbolicDataAnalysisExpressionTreeInterpreter[] {
+        new SymbolicDataAnalysisExpressionCompiledTreeInterpreter(),
+        new SymbolicDataAnalysisExpressionTreeInterpreter(),
+        new SymbolicDataAnalysisExpressionTreeLinearInterpreter(),
+      };
+      var rows = Enumerable.Range(0, numRows).ToList();
+      var formatter = new SymbolicExpressionTreeHierarchicalFormatter();
+
+      for (int i = 0; i < randomTrees.Length; ++i) {
+        var tree = randomTrees[i];
+        var valuesMatrix = interpreters.Select(x => x.GetSymbolicExpressionTreeValues(tree, dataset, rows).ToList()).ToList();
+        for (int m = 0; m < interpreters.Length - 1; ++m) {
+          for (int n = m + 1; n < interpreters.Length; ++n) {
+            for (int row = 0; row < numRows; ++row) {
+              var v1 = valuesMatrix[m][row];
+              var v2 = valuesMatrix[n][row];
+              if (double.IsNaN(v1) && double.IsNaN(v2)) continue;
+              if (Math.Abs(v1 - v2) > delta) {
+                Console.WriteLine(formatter.Format(tree));
+                foreach (var node in tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPrefix().ToList()) {
+                  var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
+                  if (rootNode.HasLocalParameters) rootNode.ResetLocalParameters(twister);
+                  rootNode.SetGrammar(grammar.CreateExpressionTreeGrammar());
+
+                  var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
+                  if (startNode.HasLocalParameters) startNode.ResetLocalParameters(twister);
+                  startNode.SetGrammar(grammar.CreateExpressionTreeGrammar());
+
+                  rootNode.AddSubtree(startNode);
+                  var t = new SymbolicExpressionTree(rootNode);
+                  var start = t.Root.GetSubtree(0);
+                  var p = node.Parent;
+                  start.AddSubtree(node);
+                  Console.WriteLine(node);
+
+                  var y1 = interpreters[m].GetSymbolicExpressionTreeValues(t, dataset, new[] { row }).First();
+                  var y2 = interpreters[n].GetSymbolicExpressionTreeValues(t, dataset, new[] { row }).First();
+
+                  if (double.IsNaN(y1) && double.IsNaN(y2)) continue;
+                  string prefix = Math.Abs(y1 - y2) > delta ? "++" : "==";
+                  Console.WriteLine("\t{0} Row {1}: {2} {3}, Deviation = {4}", prefix, row, y1, y2, Math.Abs(y1 - y2));
+                  node.Parent = p;
+                }
+              }
+              string errorMessage = string.Format("Interpreters {0} and {1} do not agree on tree {2} and row {3} (seed = {4}).", interpreters[m].Name, interpreters[n].Name, i, row, seed);
+              Assert.AreEqual(v1, v2, delta, errorMessage);
+            }
+          }
+        }
+      }
+    }
+
+    private void EvaluateTerminals(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, IDataset ds) {
+      // constants
+      Evaluate(interpreter, ds, "(+ 1.5 3.5)", 0, 5.0);
+
+      // variables
+      Evaluate(interpreter, ds, "(variable 2.0 a)", 0, 2.0);
+      Evaluate(interpreter, ds, "(variable 2.0 a)", 1, 4.0);
+    }
+
+    private void EvaluateAdf(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, IDataset ds) {
+
+      // ADF      
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN 
+                                      (CALL ADF0)) 
+                                    (defun ADF0 1.0))", 1, 1.0);
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN 
+                                      (* (CALL ADF0) (CALL ADF0)))
+                                    (defun ADF0 2.0))", 1, 4.0);
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN 
+                                      (CALL ADF0 2.0 3.0))
+                                    (defun ADF0 
+                                      (+ (ARG 0) (ARG 1))))", 1, 5.0);
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN (CALL ADF1 2.0 3.0))
+                                    (defun ADF0 
+                                      (- (ARG 1) (ARG 0)))
+                                    (defun ADF1
+                                      (+ (CALL ADF0 (ARG 1) (ARG 0))
+                                         (CALL ADF0 (ARG 0) (ARG 1)))))", 1, 0.0);
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN (CALL ADF1 (variable 2.0 a) 3.0))
+                                    (defun ADF0 
+                                      (- (ARG 1) (ARG 0)))
+                                    (defun ADF1                                                                              
+                                      (CALL ADF0 (ARG 1) (ARG 0))))", 1, 1.0);
+      Evaluate(interpreter, ds,
+               @"(PROG 
+                                    (MAIN (CALL ADF1 (variable 2.0 a) 3.0))
+                                    (defun ADF0 
+                                      (- (ARG 1) (ARG 0)))
+                                    (defun ADF1                                                                              
+                                      (+ (CALL ADF0 (ARG 1) (ARG 0))
+                                         (CALL ADF0 (ARG 0) (ARG 1)))))", 1, 0.0);
+    }
+
+    private void EvaluateSpecialFunctions(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, IDataset ds) {
+      // special functions
+      Action<double> checkAiry = (x) => {
+        double ai, aip, bi, bip;
+        alglib.airy(x, out ai, out aip, out bi, out bip);
+        Evaluate(interpreter, ds, "(airya " + x + ")", 0, ai);
+        Evaluate(interpreter, ds, "(airyb " + x + ")", 0, bi);
+      };
+
+      Action<double> checkBessel = (x) => {
+        Evaluate(interpreter, ds, "(bessel " + x + ")", 0, alglib.besseli0(x));
+      };
+
+      Action<double> checkSinCosIntegrals = (x) => {
+        double si, ci;
+        alglib.sinecosineintegrals(x, out si, out ci);
+        Evaluate(interpreter, ds, "(cosint " + x + ")", 0, ci);
+        Evaluate(interpreter, ds, "(sinint " + x + ")", 0, si);
+      };
+      Action<double> checkHypSinCosIntegrals = (x) => {
+        double shi, chi;
+        alglib.hyperbolicsinecosineintegrals(x, out shi, out chi);
+        Evaluate(interpreter, ds, "(hypcosint " + x + ")", 0, chi);
+        Evaluate(interpreter, ds, "(hypsinint " + x + ")", 0, shi);
+      };
+      Action<double> checkFresnelSinCosIntegrals = (x) => {
+        double c = 0, s = 0;
+        alglib.fresnelintegral(x, ref c, ref s);
+        Evaluate(interpreter, ds, "(fresnelcosint " + x + ")", 0, c);
+        Evaluate(interpreter, ds, "(fresnelsinint " + x + ")", 0, s);
+      };
+      Action<double> checkNormErf = (x) => {
+        Evaluate(interpreter, ds, "(norm " + x + ")", 0, alglib.normaldistribution(x));
+        Evaluate(interpreter, ds, "(erf " + x + ")", 0, alglib.errorfunction(x));
+      };
+
+      Action<double> checkGamma = (x) => {
+        Evaluate(interpreter, ds, "(gamma " + x + ")", 0, alglib.gammafunction(x));
+      };
+      Action<double> checkPsi = (x) => {
+        try {
+          Evaluate(interpreter, ds, "(psi " + x + ")", 0, alglib.psi(x));
+        } catch (alglib.alglibexception) { // ignore cases where alglib throws an exception
+        }
+      };
+      Action<double> checkDawson = (x) => {
+        Evaluate(interpreter, ds, "(dawson " + x + ")", 0, alglib.dawsonintegral(x));
+      };
+      Action<double> checkExpInt = (x) => {
+        Evaluate(interpreter, ds, "(expint " + x + ")", 0, alglib.exponentialintegralei(x));
+      };
+
+      foreach (var e in new[] { -2.0, -1.0, 0.0, 1.0, 2.0 }) {
+        checkAiry(e);
+        checkBessel(e);
+        checkSinCosIntegrals(e);
+        checkGamma(e);
+        checkExpInt(e);
+        checkDawson(e);
+        checkPsi(e);
+        checkNormErf(e);
+        checkFresnelSinCosIntegrals(e);
+        checkHypSinCosIntegrals(e);
+      }
+    }
+
+    private void EvaluateLaggedOperations(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, IDataset ds) {
+      // lag
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a -1) ", 1, ds.GetDoubleValue("A", 0));
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a -1) ", 2, ds.GetDoubleValue("A", 1));
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a 0) ", 2, ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a 1) ", 0, ds.GetDoubleValue("A", 1));
+
+      // integral
+      Evaluate(interpreter, ds, "(integral -1.0 (variable 1.0 a)) ", 1, ds.GetDoubleValue("A", 0) + ds.GetDoubleValue("A", 1));
+      Evaluate(interpreter, ds, "(integral -1.0 (lagVariable 1.0 a 1)) ", 1, ds.GetDoubleValue("A", 1) + ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(integral -2.0 (variable 1.0 a)) ", 2, ds.GetDoubleValue("A", 0) + ds.GetDoubleValue("A", 1) + ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(integral -1.0 (* (variable 1.0 a) (variable 1.0 b)))", 1, ds.GetDoubleValue("A", 0) * ds.GetDoubleValue("B", 0) + ds.GetDoubleValue("A", 1) * ds.GetDoubleValue("B", 1));
+      Evaluate(interpreter, ds, "(integral -2.0 3.0)", 1, 9.0);
+
+      // derivative
+      // (f_0 + 2 * f_1 - 2 * f_3 - f_4) / 8; // h = 1
+      Evaluate(interpreter, ds, "(diff (variable 1.0 a)) ", 5, (ds.GetDoubleValue("A", 5) + 2 * ds.GetDoubleValue("A", 4) - 2 * ds.GetDoubleValue("A", 2) - ds.GetDoubleValue("A", 1)) / 8.0);
+      Evaluate(interpreter, ds, "(diff (variable 1.0 b)) ", 5, (ds.GetDoubleValue("B", 5) + 2 * ds.GetDoubleValue("B", 4) - 2 * ds.GetDoubleValue("B", 2) - ds.GetDoubleValue("B", 1)) / 8.0);
+      Evaluate(interpreter, ds, "(diff (* (variable 1.0 a) (variable 1.0 b)))", 5, +
+        (ds.GetDoubleValue("A", 5) * ds.GetDoubleValue("B", 5) +
+        2 * ds.GetDoubleValue("A", 4) * ds.GetDoubleValue("B", 4) -
+        2 * ds.GetDoubleValue("A", 2) * ds.GetDoubleValue("B", 2) -
+        ds.GetDoubleValue("A", 1) * ds.GetDoubleValue("B", 1)) / 8.0);
+      Evaluate(interpreter, ds, "(diff -2.0 3.0)", 5, 0.0);
+
+      // timelag
+      Evaluate(interpreter, ds, "(lag -1.0 (lagVariable 1.0 a 2)) ", 1, ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(lag -2.0 (lagVariable 1.0 a 2)) ", 2, ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(lag -1.0 (* (lagVariable 1.0 a 1) (lagVariable 1.0 b 2)))", 1, ds.GetDoubleValue("A", 1) * ds.GetDoubleValue("B", 2));
+      Evaluate(interpreter, ds, "(lag -2.0 3.0)", 1, 3.0);
+    }
+
+    private void EvaluateOperations(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, IDataset ds) {
+      // addition
+      Evaluate(interpreter, ds, "(+ (variable 2.0 a ))", 1, 4.0);
+      Evaluate(interpreter, ds, "(+ (variable 2.0 a ) (variable 3.0 b ))", 0, 5.0);
+      Evaluate(interpreter, ds, "(+ (variable 2.0 a ) (variable 3.0 b ))", 1, 10.0);
+      Evaluate(interpreter, ds, "(+ (variable 2.0 a) (variable 3.0 b ))", 2, 8.0);
+      Evaluate(interpreter, ds, "(+ 8.0 2.0 2.0)", 0, 12.0);
+
+      // subtraction
+      Evaluate(interpreter, ds, "(- (variable 2.0 a ))", 1, -4.0);
+      Evaluate(interpreter, ds, "(- (variable 2.0 a ) (variable 3.0 b))", 0, -1.0);
+      Evaluate(interpreter, ds, "(- (variable 2.0 a ) (variable 3.0 b ))", 1, -2.0);
+      Evaluate(interpreter, ds, "(- (variable 2.0 a ) (variable 3.0 b ))", 2, -4.0);
+      Evaluate(interpreter, ds, "(- 8.0 2.0 2.0)", 0, 4.0);
+
+      // multiplication
+      Evaluate(interpreter, ds, "(* (variable 2.0 a ))", 0, 2.0);
+      Evaluate(interpreter, ds, "(* (variable 2.0 a ) (variable 3.0 b ))", 0, 6.0);
+      Evaluate(interpreter, ds, "(* (variable 2.0 a ) (variable 3.0 b ))", 1, 24.0);
+      Evaluate(interpreter, ds, "(* (variable 2.0 a ) (variable 3.0 b ))", 2, 12.0);
+      Evaluate(interpreter, ds, "(* 8.0 2.0 2.0)", 0, 32.0);
+
+      // division
+      Evaluate(interpreter, ds, "(/ (variable 2.0 a ))", 1, 1.0 / 4.0);
+      Evaluate(interpreter, ds, "(/ (variable 2.0 a ) 2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(/ (variable 2.0 a ) 2.0)", 1, 2.0);
+      Evaluate(interpreter, ds, "(/ (variable 3.0 b ) 2.0)", 2, 3.0);
+      Evaluate(interpreter, ds, "(/ 8.0 2.0 2.0)", 0, 2.0);
+
+      // gt
+      Evaluate(interpreter, ds, "(> (variable 2.0 a) 2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(> 2.0 (variable 2.0 a))", 0, -1.0);
+      Evaluate(interpreter, ds, "(> (variable 2.0 a) 1.9)", 0, 1.0);
+      Evaluate(interpreter, ds, "(> 1.9 (variable 2.0 a))", 0, -1.0);
+      Evaluate(interpreter, ds, "(> (log -1.0) (log -1.0))", 0, -1.0); // (> nan nan) should be false
+
+      // lt
+      Evaluate(interpreter, ds, "(< (variable 2.0 a) 2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(< 2.0 (variable 2.0 a))", 0, -1.0);
+      Evaluate(interpreter, ds, "(< (variable 2.0 a) 1.9)", 0, -1.0);
+      Evaluate(interpreter, ds, "(< 1.9 (variable 2.0 a))", 0, 1.0);
+      Evaluate(interpreter, ds, "(< (log -1.0) (log -1.0))", 0, -1.0); // (< nan nan) should be false
+
+      // If
+      Evaluate(interpreter, ds, "(if -10.0 2.0 3.0)", 0, 3.0);
+      Evaluate(interpreter, ds, "(if -1.0 2.0 3.0)", 0, 3.0);
+      Evaluate(interpreter, ds, "(if 0.0 2.0 3.0)", 0, 3.0);
+      Evaluate(interpreter, ds, "(if 1.0 2.0 3.0)", 0, 2.0);
+      Evaluate(interpreter, ds, "(if 10.0 2.0 3.0)", 0, 2.0);
+      Evaluate(interpreter, ds, "(if (log -1.0) 2.0 3.0)", 0, 3.0); // if(nan) should return the else branch
+
+      // NOT
+      Evaluate(interpreter, ds, "(not -1.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(not -2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(not 1.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(not 2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(not 0.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(not (log -1.0))", 0, 1.0);
+
+      // AND
+      Evaluate(interpreter, ds, "(and -1.0 -2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(and -1.0 2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(and 1.0 -2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(and 1.0 0.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(and 0.0 0.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(and 1.0 2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(and 1.0 2.0 3.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(and 1.0 -2.0 3.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(and (log -1.0))", 0, -1.0); // (and NaN)
+      Evaluate(interpreter, ds, "(and (log -1.0)  1.0)", 0, -1.0); // (and NaN 1.0)
+
+      // OR
+      Evaluate(interpreter, ds, "(or -1.0 -2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(or -1.0 2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(or 1.0 -2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(or 1.0 2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(or 0.0 0.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(or -1.0 -2.0 -3.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(or -1.0 -2.0 3.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(or (log -1.0))", 0, -1.0); // (or NaN)
+      Evaluate(interpreter, ds, "(or (log -1.0)  1.0)", 0, -1.0); // (or NaN 1.0)
+
+      // XOR
+      Evaluate(interpreter, ds, "(xor -1.0 -2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(xor -1.0 2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(xor 1.0 -2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(xor 1.0 2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(xor 0.0 0.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(xor -1.0 -2.0 -3.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(xor -1.0 -2.0 3.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(xor -1.0 2.0 3.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(xor 1.0 2.0 3.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(xor (log -1.0))", 0, -1.0);
+      Evaluate(interpreter, ds, "(xor (log -1.0)  1.0)", 0, 1.0);
+
+      // sin, cos, tan
+      Evaluate(interpreter, ds, "(sin " + Math.PI.ToString(NumberFormatInfo.InvariantInfo) + ")", 0, 0.0);
+      Evaluate(interpreter, ds, "(sin 0.0)", 0, 0.0);
+      Evaluate(interpreter, ds, "(cos " + Math.PI.ToString(NumberFormatInfo.InvariantInfo) + ")", 0, -1.0);
+      Evaluate(interpreter, ds, "(cos 0.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(tan " + Math.PI.ToString(NumberFormatInfo.InvariantInfo) + ")", 0, Math.Tan(Math.PI));
+      Evaluate(interpreter, ds, "(tan 0.0)", 0, Math.Tan(Math.PI));
+
+      // exp, log
+      Evaluate(interpreter, ds, "(log (exp 7.0))", 0, Math.Log(Math.Exp(7)));
+      Evaluate(interpreter, ds, "(exp (log 7.0))", 0, Math.Exp(Math.Log(7)));
+      Evaluate(interpreter, ds, "(log -3.0)", 0, Math.Log(-3));
+
+      // power
+      Evaluate(interpreter, ds, "(pow 2.0 3.0)", 0, 8.0);
+      Evaluate(interpreter, ds, "(pow 4.0 0.5)", 0, 1.0); // interpreter should round to the nearest integer value value (.5 is rounded to the even number)
+      Evaluate(interpreter, ds, "(pow 4.0 2.5)", 0, 16.0); // interpreter should round to the nearest integer value value (.5 is rounded to the even number)
+      Evaluate(interpreter, ds, "(pow -2.0 3.0)", 0, -8.0);
+      Evaluate(interpreter, ds, "(pow 2.0 -3.0)", 0, 1.0 / 8.0);
+      Evaluate(interpreter, ds, "(pow -2.0 -3.0)", 0, -1.0 / 8.0);
+
+      // root
+      Evaluate(interpreter, ds, "(root 9.0 2.0)", 0, 3.0);
+      Evaluate(interpreter, ds, "(root 27.0 3.0)", 0, 3.0);
+      Evaluate(interpreter, ds, "(root 2.0 -3.0)", 0, Math.Pow(2.0, -1.0 / 3.0));
+
+      // mean
+      Evaluate(interpreter, ds, "(mean -1.0 1.0 -1.0)", 0, -1.0 / 3.0);
+    }
+
+    private void Evaluate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, IDataset ds, string expr, int index, double expected) {
+      var importer = new SymbolicExpressionImporter();
+      ISymbolicExpressionTree tree = importer.Import(expr);
+
+      double actual = interpreter.GetSymbolicExpressionTreeValues(tree, ds, Enumerable.Range(index, 1)).First();
+
+      Assert.IsFalse(double.IsNaN(actual) && !double.IsNaN(expected));
+      Assert.IsFalse(!double.IsNaN(actual) && double.IsNaN(expected));
+      if (!double.IsNaN(actual) && !double.IsNaN(expected))
+        Assert.AreEqual(expected, actual, 1.0E-12, expr);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeSimplifierTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeSimplifierTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeSimplifierTest.cs	(revision 16038)
@@ -0,0 +1,243 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Globalization;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Tests {
+
+  [TestClass()]
+  public class SymbolicDataAnalysisExpressionTreeSimplifierTest {
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis")]
+    [TestProperty("Time", "short")]
+    public void SimplifierAxiomsTest() {
+      SymbolicExpressionImporter importer = new SymbolicExpressionImporter();
+      SymbolicExpressionTreeStringFormatter formatter = new SymbolicExpressionTreeStringFormatter();
+      #region single argument arithmetics
+
+      AssertEqualAfterSimplification("(+ 1.0)", "1.0");
+      AssertEqualAfterSimplification("(- 1.0)", "-1.0");
+      AssertEqualAfterSimplification("(- (variable 2.0 a))", "(variable -2.0 a)");
+      AssertEqualAfterSimplification("(* 2.0)", "2.0");
+      AssertEqualAfterSimplification("(* (variable 2.0 a))", "(variable 2.0 a)");
+      AssertEqualAfterSimplification("(/ 2.0)", "0.5");
+      AssertEqualAfterSimplification("(/ (variable 2.0 a))", "(/ 1.0 (variable 2.0 a))");
+      #endregion
+
+      #region aggregation of constants into factors
+      AssertEqualAfterSimplification("(* 2.0 (variable 2.0 a))", "(variable 4.0 a)");
+      AssertEqualAfterSimplification("(/ (variable 2.0 a) 2.0)", "(variable 1.0 a)");
+      AssertEqualAfterSimplification("(/ (variable 2.0 a) (* 2.0 2.0))", "(variable 0.5 a)");
+      #endregion
+
+      #region constant and variable folding
+      AssertEqualAfterSimplification("(+ 1.0 2.0)", "3.0");
+      AssertEqualAfterSimplification("(+ (variable 2.0 a) (variable 2.0 a))", "(variable 4.0 a)");
+      AssertEqualAfterSimplification("(- (variable 2.0 a) (variable 1.0 a))", "(variable 1.0 a)");
+      AssertEqualAfterSimplification("(* (variable 2.0 a) (variable 2.0 a))", "(* (* (variable 1.0 a) (variable 1.0 a)) 4.0)");
+      AssertEqualAfterSimplification("(/ (variable 1.0 a) (variable 2.0 a))", "0.5");
+      #endregion
+
+      #region logarithm rules
+
+      // cancellation
+      AssertEqualAfterSimplification("(log (exp (variable 2.0 a)))", "(variable 2.0 a)");
+      // must not transform logs in this way as we do not know wether both variables are positive
+      AssertEqualAfterSimplification("(log (* (variable 1.0 a) (variable 1.0 b)))", "(log (* (variable 1.0 a) (variable 1.0 b)))");
+      // must not transform logs in this way as we do not know wether both variables are positive
+      AssertEqualAfterSimplification("(log (/ (variable 1.0 a) (variable 1.0 b)))", "(log (/ (variable 1.0 a) (variable 1.0 b)))");
+      #endregion
+
+      #region exponentiation rules
+      // cancellation
+      AssertEqualAfterSimplification("(exp (log (variable 2.0 a)))", "(variable 2.0 a)");
+      // exp transformation
+      AssertEqualAfterSimplification("(exp (+ (variable 2.0 a) (variable 3.0 b)))", "(* (exp (variable 2.0 a)) (exp (variable 3.0 b)))");
+      // exp transformation
+      AssertEqualAfterSimplification("(exp (- (variable 2.0 a) (variable 3.0 b)))", "(* (exp (variable 2.0 a)) (exp (variable -3.0 b)))");
+      // exp transformation
+      AssertEqualAfterSimplification("(exp (- (variable 2.0 a) (* (variable 3.0 b) (variable 4.0 c))))", "(* (exp (variable 2.0 a)) (exp (* (variable 1.0 b) (variable 1.0 c) -12.0)))");
+      // exp transformation
+      AssertEqualAfterSimplification("(exp (- (variable 2.0 a) (* (variable 3.0 b) (cos (variable 4.0 c)))))", "(* (exp (variable 2.0 a)) (exp (* (variable 1.0 b) (cos (variable 4.0 c)) -3.0)))");
+      #endregion
+
+      #region power rules
+
+      // cancellation
+      AssertEqualAfterSimplification("(pow (variable 2.0 a) 0.0)", "1.0");
+      // fixed point
+      AssertEqualAfterSimplification("(pow (variable 2.0 a) 1.0)", "(variable 2.0 a)");
+      // inversion fixed point
+      AssertEqualAfterSimplification("(pow (variable 2.0 a) -1.0)", "(/ 1.0 (variable 2.0 a))");
+      // inversion 
+      AssertEqualAfterSimplification("(pow (variable 2.0 a) -2.0)", "(/ 1.0 (pow (variable 2.0 a) 2.0))");
+      // constant folding
+      AssertEqualAfterSimplification("(pow 3.0 2.0)", "9.0");
+      #endregion
+
+      #region root rules
+      // cancellation
+      AssertEqualAfterSimplification("(root (variable 2.0 a) 0.0)", "1.0");
+      // fixed point
+      AssertEqualAfterSimplification("(root (variable 2.0 a) 1.0)", "(variable 2.0 a)");
+      // inversion fixed point
+      AssertEqualAfterSimplification("(root (variable 2.0 a) -1.0)", "(/ 1.0 (variable 2.0 a))");
+      // inversion
+      AssertEqualAfterSimplification("(root (variable 2.0 a) -2.0)", "(/ 1.0 (root (variable 2.0 a) 2.0))");
+      // constant folding
+      AssertEqualAfterSimplification("(root 9.0 2.0)", "3.0");
+      #endregion
+
+      #region boolean operations
+      // always true and
+      AssertEqualAfterSimplification("(and 1.0 2.0)", "1.0");
+      // always false and
+      AssertEqualAfterSimplification("(and 1.0 -2.0)", "-1.0");
+      // always true or
+      AssertEqualAfterSimplification("(or -1.0 2.0)", "1.0");
+      // always false or
+      AssertEqualAfterSimplification("(or -1.0 -2.0)", "-1.0");
+      // constant not 
+      AssertEqualAfterSimplification("(not -2.0)", "1.0");
+      // constant not 
+      AssertEqualAfterSimplification("(not 2.0)", "-1.0");
+      // constant not 
+      AssertEqualAfterSimplification("(not 0.0)", "1.0");
+      // nested nots
+      AssertEqualAfterSimplification("(not (not 1.0))", "1.0");
+      // not of non-Boolean argument
+      AssertEqualAfterSimplification("(not (variable 1.0 a))", "(not (> (variable 1.0 a) 0.0))");
+      // not Boolean argument
+      AssertEqualAfterSimplification("(not (and (> (variable 1.0 a) 0.0) (> (variable 1.0 a) 0.0)))", "(not (and (> (variable 1.0 a) 0.0) (> (variable 1.0 a) 0.0)))");
+      #endregion
+
+      #region conditionals
+      // always false
+      AssertEqualAfterSimplification("(if -1.0 (variable 2.0 a) (variable 3.0 a))", "(variable 3.0 a)");
+      // always true
+      AssertEqualAfterSimplification("(if 1.0 (variable 2.0 a) (variable 3.0 a))", "(variable 2.0 a)");
+      // always false (0.0)
+      AssertEqualAfterSimplification("(if 0.0 (variable 2.0 a) (variable 3.0 a))", "(variable 3.0 a)");
+      // complex constant condition (always false)
+      AssertEqualAfterSimplification("(if (* 1.0 -2.0) (variable 2.0 a) (variable 3.0 a))", "(variable 3.0 a)");
+      // complex constant condition (always false)
+      AssertEqualAfterSimplification("(if (/ (variable 1.0 a) (variable -2.0 a)) (variable 2.0 a) (variable 3.0 a))", "(variable 3.0 a)");
+      // insertion of relational operator
+      AssertEqualAfterSimplification("(if (variable 1.0 a) (variable 2.0 a) (variable 3.0 a))", "(if (> (variable 1.0 a) 0.0) (variable 2.0 a) (variable 3.0 a))");
+      #endregion
+
+      #region factor variables
+      AssertEqualAfterSimplification("(factor a 1.0)", "(factor a 1.0)");
+      // factor folding
+      AssertEqualAfterSimplification("(+ (factor a 1.0 1.0) (factor a 2.0 3.0))", "(factor a 3.0 4.0)");
+      AssertEqualAfterSimplification("(- (factor a 1.0 1.0) (factor a 2.0 3.0))", "(factor a -1.0 -2.0)");
+      AssertEqualAfterSimplification("(* (factor a 2.0 2.0) (factor a 2.0 3.0))", "(factor a 4.0 6.0)");
+      AssertEqualAfterSimplification("(/ (factor a 2.0 5.0))", "(factor a 0.5 0.2)");
+      AssertEqualAfterSimplification("(/ (factor a 4.0 6.0) (factor a 2.0 3.0))", "(factor a 2.0 2.0)");
+      AssertEqualAfterSimplification("(+ 3.0 (factor a 4.0 6.0))", "(factor a 7.0 9.0)");
+      AssertEqualAfterSimplification("(+ (factor a 4.0 6.0) 3.0)", "(factor a 7.0 9.0)");
+      AssertEqualAfterSimplification("(- 3.0 (factor a 4.0 6.0))", "(factor a -1.0 -3.0)");
+      AssertEqualAfterSimplification("(- (factor a 4.0 6.0) 3.0)", "(factor a 1.0 3.0)");
+      AssertEqualAfterSimplification("(* 2.0 (factor a 4.0 6.0))", "(factor a 8.0 12.0)");
+      AssertEqualAfterSimplification("(* (factor a 4.0 6.0) 2.0)", "(factor a 8.0 12.0)");
+      AssertEqualAfterSimplification("(* (factor a 4.0 6.0) (variable 2.0 a))", "(* (factor a 8.0 12.0) (variable 1.0 a))"); // not possible (a is used as factor and double variable) interpreter will fail
+      AssertEqualAfterSimplification(
+        "(log (factor a 10.0 100.0))",
+        string.Format(CultureInfo.InvariantCulture, "(factor a {0} {1})", Math.Log(10.0), Math.Log(100.0)));
+      AssertEqualAfterSimplification(
+        "(exp (factor a 2.0 3.0))",
+        string.Format(CultureInfo.InvariantCulture, "(factor a {0} {1})", Math.Exp(2.0), Math.Exp(3.0)));
+      AssertEqualAfterSimplification("(sqrt (factor a 9.0 16.0))", "(factor a 3.0 4.0))");
+      AssertEqualAfterSimplification("(sqr (factor a 2.0 3.0))", "(factor a 4.0 9.0))");
+      AssertEqualAfterSimplification("(root (factor a 8.0 27.0) 3)", "(factor a 2.0 3.0))");
+      AssertEqualAfterSimplification("(pow (factor a 2.0 3.0) 3)", "(factor a 8.0 27.0))");
+
+      AssertEqualAfterSimplification("(sin (factor a 1.0 2.0) )",
+        string.Format(CultureInfo.InvariantCulture, "(factor a {0} {1}))", Math.Sin(1.0), Math.Sin(2.0)));
+      AssertEqualAfterSimplification("(cos (factor a 1.0 2.0) )",
+        string.Format(CultureInfo.InvariantCulture, "(factor a {0} {1}))", Math.Cos(1.0), Math.Cos(2.0)));
+      AssertEqualAfterSimplification("(tan (factor a 1.0 2.0) )",
+        string.Format(CultureInfo.InvariantCulture, "(factor a {0} {1}))", Math.Tan(1.0), Math.Tan(2.0)));
+
+
+      AssertEqualAfterSimplification("(binfactor a val 1.0)", "(binfactor a val 1.0)");
+      // binfactor folding
+      AssertEqualAfterSimplification("(+ (binfactor a val 1.0) (binfactor a val 2.0))", "(binfactor a val 3.0)");
+      AssertEqualAfterSimplification("(+ (binfactor a val0 1.0) (binfactor a val1 2.0))", "(+ (binfactor a val0 1.0) (binfactor a val1 2.0))"); // cannot be simplified (different vals)
+      AssertEqualAfterSimplification("(+ (binfactor a val 1.0) (binfactor b val 2.0))", "(+ (binfactor a val 1.0) (binfactor b val 2.0))"); // cannot be simplified (different vars)
+      AssertEqualAfterSimplification("(- (binfactor a val 1.0) (binfactor a val 2.0))", "(binfactor a val -1.0)");
+      AssertEqualAfterSimplification("(* (binfactor a val 2.0) (binfactor a val 3.0))", "(binfactor a val 6.0)");
+      AssertEqualAfterSimplification("(/ (binfactor a val 6.0) (binfactor a val 3.0))", "(/ (binfactor a val 6.0) (binfactor a val 3.0))"); // not allowed! 0/0 for other values than 'val'
+      AssertEqualAfterSimplification("(/ (binfactor a val 4.0))", "(/ 1.0 (binfactor a val 4.0))"); // not allowed!
+
+      AssertEqualAfterSimplification("(+ 3.0 (binfactor a val 4.0 ))", "(+ (binfactor a val 4.0 ) 3.0))"); // not allowed
+      AssertEqualAfterSimplification("(- 3.0 (binfactor a val 4.0 ))", "(+ (binfactor a val -4.0 ) 3.0)"); 
+      AssertEqualAfterSimplification("(+ (binfactor a val 4.0 ) 3.0)", "(+ (binfactor a val 4.0 ) 3.0)");  // not allowed
+      AssertEqualAfterSimplification("(- (binfactor a val 4.0 ) 3.0)", "(+ (binfactor a val 4.0 ) -3.0)"); 
+      AssertEqualAfterSimplification("(* 2.0 (binfactor a val 4.0))", "(binfactor a val 8.0 )");
+      AssertEqualAfterSimplification("(* (binfactor a val 4.0) 2.0)", "(binfactor a val 8.0 )");
+      AssertEqualAfterSimplification("(* (binfactor a val 4.0) (variable 2.0 a))", "(* (binfactor a val 1.0) (variable 1.0 a) 8.0)");   // not possible (a is used as factor and double variable) interpreter will fail
+      AssertEqualAfterSimplification("(log (binfactor a val 10.0))", "(log (binfactor a val 10.0))"); // not allowed (log(0))
+
+      // exp( binfactor w val=a) = if(val=a) exp(w) else exp(0) = binfactor( (exp(w) - 1) val a) + 1
+      AssertEqualAfterSimplification("(exp (binfactor a val 3.0))", 
+        string.Format(CultureInfo.InvariantCulture, "(+ (binfactor a val {0}) 1.0)", Math.Exp(3.0) - 1)
+        ); 
+      AssertEqualAfterSimplification("(sqrt (binfactor a val 16.0))", "(binfactor a val 4.0))"); // sqrt(0) = 0
+      AssertEqualAfterSimplification("(sqr (binfactor a val 3.0))", "(binfactor a val 9.0))"); // 0*0 = 0
+      AssertEqualAfterSimplification("(root (binfactor a val 27.0) 3)", "(binfactor a val 3.0))");
+      AssertEqualAfterSimplification("(pow (binfactor a val 3.0) 3)", "(binfactor a val 27.0))");
+
+      AssertEqualAfterSimplification("(sin (binfactor a val 2.0) )",
+        string.Format(CultureInfo.InvariantCulture, "(binfactor a val {0}))", Math.Sin(2.0))); // sin(0) = 0
+      AssertEqualAfterSimplification("(cos (binfactor a val 2.0) )", 
+        string.Format(CultureInfo.InvariantCulture, "(+ (binfactor a val {0}) 1.0)", Math.Cos(2.0) - 1)); // cos(0) = 1
+      AssertEqualAfterSimplification("(tan (binfactor a val 2.0) )",
+        string.Format(CultureInfo.InvariantCulture, "(binfactor a val {0}))", Math.Tan(2.0))); // tan(0) = 0
+
+      // combination of factor and binfactor
+      AssertEqualAfterSimplification("(+ (binfactor a x0 2.0) (factor a 2.0 3.0))", "(factor a 4.0 3.0)");
+      AssertEqualAfterSimplification("(+ (factor a 2.0 3.0) (binfactor a x0 2.0))", "(factor a 4.0 3.0)");
+      AssertEqualAfterSimplification("(* (binfactor a x1 2.0) (factor a 2.0 3.0))", "(binfactor a x1 6.0)"); // all other values have weight zero in binfactor
+      AssertEqualAfterSimplification("(* (factor a 2.0 3.0) (binfactor a x1 2.0))", "(binfactor a x1 6.0)"); // all other values have weight zero in binfactor
+      AssertEqualAfterSimplification("(/ (binfactor a x0 2.0) (factor a 2.0 3.0))", "(binfactor a x0 1.0)");
+      AssertEqualAfterSimplification("(/ (factor a 2.0 3.0) (binfactor a x0 2.0))",
+        string.Format(CultureInfo.InvariantCulture, "(factor a 1.0 {0})", 3.0 / 0.0));
+      AssertEqualAfterSimplification("(- (binfactor a x0 2.0) (factor a 2.0 3.0))", "(factor a 0.0 -3.0)");
+      AssertEqualAfterSimplification("(- (factor a 2.0 3.0) (binfactor a x0 2.0))", "(factor a 0.0 3.0)");
+      #endregion
+    }
+
+
+    private void AssertEqualAfterSimplification(string original, string expected) {
+      var formatter = new SymbolicExpressionTreeStringFormatter();
+      var importer = new SymbolicExpressionImporter();
+      var actualTree = TreeSimplifier.Simplify(importer.Import(original));
+      var expectedTree = importer.Import(expected);
+      Assert.AreEqual(formatter.Format(expectedTree), formatter.Format(actualTree));
+
+    }
+  }
+}
+
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicExpressionTreeBottomUpSimilarityCalculatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicExpressionTreeBottomUpSimilarityCalculatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicExpressionTreeBottomUpSimilarityCalculatorTest.cs	(revision 16038)
@@ -0,0 +1,88 @@
+﻿using System;
+using System.Diagnostics;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Tests {
+  [TestClass]
+  public class BottomUpSimilarityCalculatorTest {
+    private readonly SymbolicExpressionTreeBottomUpSimilarityCalculator busCalculator;
+    private readonly SymbolicExpressionImporter importer;
+
+    private const int N = 150;
+    private const int Rows = 1;
+    private const int Columns = 10;
+
+    public BottomUpSimilarityCalculatorTest() {
+      busCalculator = new SymbolicExpressionTreeBottomUpSimilarityCalculator();
+      importer = new SymbolicExpressionImporter();
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "short")]
+    public void BottomUpTreeSimilarityCalculatorTestMapping() {
+      TestMatchedNodes("(+ 1 2)", "(+ 2 1)", 5);
+      TestMatchedNodes("(- 2 1)", "(- 1 2)", 2);
+      TestMatchedNodes("(* (variable 1 X1) (variable 1 X2))", "(* (+ (variable 1 X1) 1) (+ (variable 1 X2) 1))", 2);
+
+      TestMatchedNodes("(* (variable 1 X1) (variable 1 X2))", "(* (+ (variable 1 X1) 1) (variable 1 X2))", 2);
+
+      TestMatchedNodes("(+ (variable 1 a) (variable 1 b))", "(+ (variable 1 a) (variable 1 a))", 1);
+      TestMatchedNodes("(+ (+ (variable 1 a) (variable 1 b)) (variable 1 b))", "(+ (* (+ (variable 1 a) (variable 1 b)) (variable 1 b)) (+ (+ (variable 1 a) (variable 1 b)) (variable 1 b)))", 5);
+
+      TestMatchedNodes(
+        "(* (+ 2.84 (exp (+ (log (/ (variable 2.0539 X5) (variable -9.2452e-1 X6))) (/ (variable 2.0539 X5) (variable -9.2452e-1 X6))))) 2.9081)",
+        "(* (- (variable 9.581e-1 X6) (+ (- (variable 5.1491e-1 X5) 1.614e+1) (+ (/ (variable 2.0539 X5) (variable -9.2452e-1 X6)) (log (/ (variable 2.0539 X5) (variable -9.2452e-1 X6)))))) 2.9081)",
+        9);
+
+      TestMatchedNodes("(* (* (* (variable 1.68 x) (* (variable 1.68 x) (variable 2.55 x))) (variable 1.68 x)) (* (* (variable 1.68 x) (* (variable 1.68 x) (* (variable 1.68 x) (variable 2.55 x)))) (variable 2.55 x)))", "(* (variable 2.55 x) (* (variable 1.68 x) (* (variable 1.68 x) (* (variable 1.68 x) (variable 2.55 x)))))", 9);
+
+      TestMatchedNodes("(+ (exp 2.1033) (/ -4.3072 (variable 2.4691 X7)))", "(/ 1 (+ (/ -4.3072 (variable 2.4691 X7)) (exp 2.1033)))", 6);
+      TestMatchedNodes("(+ (exp 2.1033) (/ -4.3072 (variable 2.4691 X7)))", "(/ 1 (+ (/ (variable 2.4691 X7) -4.3072) (exp 2.1033)))", 4);
+
+      const string expr1 = "(* (- 1.2175e+1 (+ (/ (exp -1.4134e+1) (exp 9.2013)) (exp (log (exp (/ (exp (- (* -4.2461 (variable 2.2634 X5)) (- -9.6267e-1 3.3243))) (- (/ (/ (variable 1.0883 X1) (variable 6.9620e-1 X2)) (log 1.3011e+1)) (variable -4.3098e-1 X7)))))))) (log 1.3011e+1))";
+      const string expr2 = "(* (- 1.2175e+1 (+ (/ (/ (+ (variable 3.0140 X9) (variable 1.3430 X8)) -1.0864e+1) (exp 9.2013)) (exp (log (exp (/ (exp (- (* -4.2461 (variable 2.2634 X5)) (- -9.6267e-1 3.3243))) (- (/ (/ (variable 1.0883 X1) (variable 6.9620e-1 X2)) (log 1.3011e+1)) (variable -4.3098e-1 X7)))))))) (exp (variable 4.0899e-1 X7)))";
+
+      TestMatchedNodes(expr1, expr2, 23);
+
+    }
+
+    private void TestMatchedNodes(string expr1, string expr2, int expected) {
+      var t1 = importer.Import(expr1);
+      var t2 = importer.Import(expr2);
+
+      var mapping = busCalculator.ComputeBottomUpMapping(t1.Root, t2.Root);
+      var c = mapping.Count;
+
+      if (c != expected) {
+        throw new Exception("Match count " + c + " is different than expected value " + expected);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void BottomUpTreeSimilarityCalculatorTestPerformance() {
+      var grammar = new TypeCoherentExpressionGrammar();
+      grammar.ConfigureAsDefaultRegressionGrammar();
+      var twister = new MersenneTwister(31415);
+      var ds = Util.CreateRandomDataset(twister, Rows, Columns);
+      var trees = Util.CreateRandomTrees(twister, ds, grammar, N, 1, 100, 0, 0);
+
+      double s = 0;
+      var sw = new Stopwatch();
+
+      sw.Start();
+      for (int i = 0; i < trees.Length - 1; ++i) {
+        for (int j = i + 1; j < trees.Length; ++j) {
+          s += busCalculator.CalculateSimilarity(trees[i], trees[j]);
+        }
+      }
+
+      sw.Stop();
+      Console.WriteLine("Elapsed time: " + sw.ElapsedMilliseconds / 1000.0 + ", Avg. similarity: " + s / (N * (N - 1) / 2));
+      Console.WriteLine(N * (N + 1) / (2 * sw.ElapsedMilliseconds / 1000.0) + " similarity calculations per second.");
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculatorTest.cs	(revision 16038)
@@ -0,0 +1,71 @@
+﻿using System;
+using System.Diagnostics;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Tests;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  /// <summary>
+  /// Summary description for MaxCommonSubtreeSimilarityCalculatorTest
+  /// </summary>
+  [TestClass]
+  public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculatorTest {
+    private readonly ISymbolicExpressionTreeNodeSimilarityComparer comparer;
+
+    private const int N = 100;
+    private const int Rows = 1;
+    private const int Columns = 10;
+
+    public SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculatorTest() {
+      comparer = new SymbolicExpressionTreeNodeEqualityComparer();
+    }
+
+    #region Additional test attributes
+    //
+    // You can use the following additional attributes as you write your tests:
+    //
+    // Use ClassInitialize to run code before running the first test in the class
+    // [ClassInitialize()]
+    // public static void MyClassInitialize(TestContext testContext) { }
+    //
+    // Use ClassCleanup to run code after all tests in a class have run
+    // [ClassCleanup()]
+    // public static void MyClassCleanup() { }
+    //
+    // Use TestInitialize to run code before running each test 
+    // [TestInitialize()]
+    // public void MyTestInitialize() { }
+    //
+    // Use TestCleanup to run code after each test has run
+    // [TestCleanup()]
+    // public void MyTestCleanup() { }
+    //
+    #endregion
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void MaxCommonSubtreeSimilarityCalculatorTestPerformance() {
+      var grammar = new TypeCoherentExpressionGrammar();
+      grammar.ConfigureAsDefaultRegressionGrammar();
+      var twister = new MersenneTwister(31415);
+      var ds = Util.CreateRandomDataset(twister, Rows, Columns);
+      var trees = Util.CreateRandomTrees(twister, ds, grammar, N, 1, 100, 0, 0);
+
+      double s = 0;
+      var sw = new Stopwatch();
+
+      sw.Start();
+      for (int i = 0; i < trees.Length - 1; ++i) {
+        for (int j = i + 1; j < trees.Length; ++j) {
+          s += SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.MaxCommonSubtreeSimilarity(trees[i], trees[j], comparer);
+        }
+      }
+      sw.Stop();
+      Console.WriteLine("Elapsed time: " + sw.ElapsedMilliseconds / 1000.0 + ", Avg. similarity: " + s / (N * (N - 1) / 2));
+      Console.WriteLine(N * (N + 1) / (2 * sw.ElapsedMilliseconds / 1000.0) + " similarity calculations per second.");
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/Util.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/Util.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/Util.cs	(revision 16038)
@@ -0,0 +1,104 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Diagnostics;
+using System.Linq;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Random;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Tests {
+  internal class Util {
+
+    public static void InitTree(ISymbolicExpressionTree tree, MersenneTwister twister, List<string> varNames) {
+      foreach (var node in tree.IterateNodesPostfix()) {
+        if (node is VariableTreeNode) {
+          var varNode = node as VariableTreeNode;
+          varNode.Weight = twister.NextDouble() * 20.0 - 10.0;
+          varNode.VariableName = varNames[twister.Next(varNames.Count)];
+        } else if (node is ConstantTreeNode) {
+          var constantNode = node as ConstantTreeNode;
+          constantNode.Value = twister.NextDouble() * 20.0 - 10.0;
+        }
+      }
+    }
+
+
+    public static ISymbolicExpressionTree[] CreateRandomTrees(MersenneTwister twister, Dataset dataset, ISymbolicExpressionGrammar grammar, int popSize) {
+      return CreateRandomTrees(twister, dataset, grammar, popSize, 1, 200, 3, 3);
+    }
+
+    public static ISymbolicExpressionTree[] CreateRandomTrees(MersenneTwister twister, Dataset dataset, ISymbolicExpressionGrammar grammar,
+      int popSize, int minSize, int maxSize,
+      int maxFunctionDefinitions, int maxFunctionArguments) {
+      foreach (Variable variableSymbol in grammar.Symbols.OfType<Variable>()) {
+        variableSymbol.VariableNames = dataset.VariableNames.Skip(1);
+      }
+      ISymbolicExpressionTree[] randomTrees = new ISymbolicExpressionTree[popSize];
+      for (int i = 0; i < randomTrees.Length; i++) {
+        randomTrees[i] = ProbabilisticTreeCreator.Create(twister, grammar, maxSize, 10);
+      }
+      return randomTrees;
+    }
+
+
+    public static Dataset CreateRandomDataset(MersenneTwister twister, int rows, int columns) {
+      double[,] data = new double[rows, columns];
+      for (int i = 0; i < rows; i++) {
+        for (int j = 0; j < columns; j++) {
+          data[i, j] = twister.NextDouble() * 2.0 - 1.0;
+        }
+      }
+      IEnumerable<string> variableNames = new string[] { "y" }.Concat(Enumerable.Range(0, columns - 1).Select(x => "x" + x.ToString()));
+      Dataset ds = new Dataset(variableNames, data);
+      return ds;
+    }
+
+    public static double NodesPerSecond(long nNodes, Stopwatch watch) {
+      return nNodes / (watch.ElapsedMilliseconds / 1000.0);
+    }
+
+    public static double CalculateEvaluatedNodesPerSec(ISymbolicExpressionTree[] trees, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset dataset, int repetitions) {
+      // warm up
+      IEnumerable<int> rows = Enumerable.Range(0, dataset.Rows).ToList();
+      long nNodes = 0;
+      double c = 0;
+      for (int i = 0; i < trees.Length; i++) {
+        nNodes += trees[i].Length * (dataset.Rows - 1);
+        c = interpreter.GetSymbolicExpressionTreeValues(trees[i], dataset, rows).Count(); // count needs to evaluate all rows
+      }
+
+      Stopwatch watch = new Stopwatch();
+      for (int rep = 0; rep < repetitions; rep++) {
+        watch.Start();
+        c = 0;
+        for (int i = 0; i < trees.Length; i++) {
+          interpreter.GetSymbolicExpressionTreeValues(trees[i], dataset, rows).Count(); // count needs to evaluate all rows
+        }
+        watch.Stop();
+      }
+      Console.WriteLine("Random tree evaluation performance of " + interpreter.GetType() + ": " +
+        watch.ElapsedMilliseconds + "ms " +
+        Util.NodesPerSecond(nNodes * repetitions, watch) + " nodes/sec");
+      return Util.NodesPerSecond(nNodes * repetitions, watch);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs	(revision 16038)
@@ -0,0 +1,344 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Globalization;
+using System.Linq;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Tests;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Tests {
+
+  [TestClass()]
+  public class SymbolicTimeSeriesPrognosisInterpreterTest {
+    private const int N = 1000;
+    private const int Rows = 100;
+    private const int Columns = 50;
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void TimeSeriesPrognosisInterpreterTestTypeCoherentGrammarPerformance() {
+      TestTypeCoherentGrammarPerformance(new SymbolicTimeSeriesPrognosisExpressionTreeInterpreter("y"), 12.5e6);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void TimeSeriesPrognosisInterpreterTestFullGrammarPerformance() {
+      TestFullGrammarPerformance(new SymbolicTimeSeriesPrognosisExpressionTreeInterpreter("y"), 12.5e6);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "long")]
+    public void TimeSeriesPrognosisInterpreterTestArithmeticGrammarPerformance() {
+      TestArithmeticGrammarPerformance(new SymbolicTimeSeriesPrognosisExpressionTreeInterpreter("y"), 12.5e6);
+    }
+
+    private void TestTypeCoherentGrammarPerformance(ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter interpreter, double nodesPerSecThreshold) {
+      var twister = new MersenneTwister(31415);
+      var dataset = Util.CreateRandomDataset(twister, Rows, Columns);
+      var grammar = new TypeCoherentExpressionGrammar();
+      grammar.ConfigureAsDefaultRegressionGrammar();
+      grammar.MaximumFunctionArguments = 0;
+      grammar.MaximumFunctionDefinitions = 0;
+      grammar.MinimumFunctionArguments = 0;
+      grammar.MinimumFunctionDefinitions = 0;
+      var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 100, 0, 0);
+      foreach (ISymbolicExpressionTree tree in randomTrees) {
+        Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
+      }
+      double nodesPerSec = Util.CalculateEvaluatedNodesPerSec(randomTrees, interpreter, dataset, 3);
+      //mkommend: commented due to performance issues on the builder
+      //Assert.IsTrue(nodesPerSec > nodesPerSecThreshold); // evaluated nodes per seconds must be larger than 15mNodes/sec
+    }
+
+    private void TestFullGrammarPerformance(ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter interpreter, double nodesPerSecThreshold) {
+      var twister = new MersenneTwister(31415);
+      var dataset = Util.CreateRandomDataset(twister, Rows, Columns);
+      var grammar = new FullFunctionalExpressionGrammar();
+      grammar.MaximumFunctionArguments = 0;
+      grammar.MaximumFunctionDefinitions = 0;
+      grammar.MinimumFunctionArguments = 0;
+      grammar.MinimumFunctionDefinitions = 0;
+      var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 100, 0, 0);
+      foreach (ISymbolicExpressionTree tree in randomTrees) {
+        Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
+      }
+      double nodesPerSec = Util.CalculateEvaluatedNodesPerSec(randomTrees, interpreter, dataset, 3);
+      //mkommend: commented due to performance issues on the builder
+      //Assert.IsTrue(nodesPerSec > nodesPerSecThreshold); // evaluated nodes per seconds must be larger than 15mNodes/sec
+    }
+
+    private void TestArithmeticGrammarPerformance(ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter interpreter, double nodesPerSecThreshold) {
+      var twister = new MersenneTwister(31415);
+      var dataset = Util.CreateRandomDataset(twister, Rows, Columns);
+      var grammar = new ArithmeticExpressionGrammar();
+      grammar.MaximumFunctionArguments = 0;
+      grammar.MaximumFunctionDefinitions = 0;
+      grammar.MinimumFunctionArguments = 0;
+      grammar.MinimumFunctionDefinitions = 0;
+      var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 100, 0, 0);
+      foreach (SymbolicExpressionTree tree in randomTrees) {
+        Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
+      }
+
+      double nodesPerSec = Util.CalculateEvaluatedNodesPerSec(randomTrees, interpreter, dataset, 3);
+      //mkommend: commented due to performance issues on the builder
+      //Assert.IsTrue(nodesPerSec > nodesPerSecThreshold); // evaluated nodes per seconds must be larger than 15mNodes/sec
+    }
+
+
+    /// <summary>
+    ///A test for Evaluate
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.DataAnalysis.Symbolic")]
+    [TestProperty("Time", "short")]
+    public void TimeSeriesPrognosisInterpreterTestEvaluation() {
+      Dataset ds = new Dataset(new string[] { "Y", "A", "B" }, new double[,] {
+        { 1.0, 1.0, 1.0 },
+        { 2.0, 2.0, 2.0 },
+        { 3.0, 1.0, 2.0 },
+        { 4.0, 1.0, 1.0 },
+        { 5.0, 2.0, 2.0 },
+        { 6.0, 1.0, 2.0 },
+        { 7.0, 1.0, 1.0 },
+        { 8.0, 2.0, 2.0 },
+        { 9.0, 1.0, 2.0 },
+        { 10.0, 1.0, 1.0 },
+        { 11.0, 2.0, 2.0 },
+        { 12.0, 1.0, 2.0 }
+      });
+
+      var interpreter = new SymbolicDataAnalysisExpressionTreeInterpreter();
+      EvaluateTerminals(interpreter, ds);
+      EvaluateOperations(interpreter, ds);
+      EvaluateAdf(interpreter, ds);
+    }
+
+    private void EvaluateTerminals(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds) {
+      // constants
+      Evaluate(interpreter, ds, "(+ 1.5 3.5)", 0, 5.0);
+
+      // variables
+      Evaluate(interpreter, ds, "(variable 2.0 a)", 0, 2.0);
+      Evaluate(interpreter, ds, "(variable 2.0 a)", 1, 4.0);
+    }
+
+    private void EvaluateAdf(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds) {
+
+      // ADF      
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN 
+                                      (CALL ADF0)) 
+                                    (defun ADF0 1.0))", 1, 1.0);
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN 
+                                      (* (CALL ADF0) (CALL ADF0)))
+                                    (defun ADF0 2.0))", 1, 4.0);
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN 
+                                      (CALL ADF0 2.0 3.0))
+                                    (defun ADF0 
+                                      (+ (ARG 0) (ARG 1))))", 1, 5.0);
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN (CALL ADF1 2.0 3.0))
+                                    (defun ADF0 
+                                      (- (ARG 1) (ARG 0)))
+                                    (defun ADF1
+                                      (+ (CALL ADF0 (ARG 1) (ARG 0))
+                                         (CALL ADF0 (ARG 0) (ARG 1)))))", 1, 0.0);
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN (CALL ADF1 (variable 2.0 a) 3.0))
+                                    (defun ADF0 
+                                      (- (ARG 1) (ARG 0)))
+                                    (defun ADF1                                                                              
+                                      (CALL ADF0 (ARG 1) (ARG 0))))", 1, 1.0);
+      Evaluate(interpreter, ds,
+               @"(PROG 
+                                    (MAIN (CALL ADF1 (variable 2.0 a) 3.0))
+                                    (defun ADF0 
+                                      (- (ARG 1) (ARG 0)))
+                                    (defun ADF1                                                                              
+                                      (+ (CALL ADF0 (ARG 1) (ARG 0))
+                                         (CALL ADF0 (ARG 0) (ARG 1)))))", 1, 0.0);
+    }
+
+    private void EvaluateOperations(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds) {
+      // addition
+      Evaluate(interpreter, ds, "(+ (variable 2.0 a ))", 1, 4.0);
+      Evaluate(interpreter, ds, "(+ (variable 2.0 a ) (variable 3.0 b ))", 0, 5.0);
+      Evaluate(interpreter, ds, "(+ (variable 2.0 a ) (variable 3.0 b ))", 1, 10.0);
+      Evaluate(interpreter, ds, "(+ (variable 2.0 a) (variable 3.0 b ))", 2, 8.0);
+      Evaluate(interpreter, ds, "(+ 8.0 2.0 2.0)", 0, 12.0);
+
+      // subtraction
+      Evaluate(interpreter, ds, "(- (variable 2.0 a ))", 1, -4.0);
+      Evaluate(interpreter, ds, "(- (variable 2.0 a ) (variable 3.0 b))", 0, -1.0);
+      Evaluate(interpreter, ds, "(- (variable 2.0 a ) (variable 3.0 b ))", 1, -2.0);
+      Evaluate(interpreter, ds, "(- (variable 2.0 a ) (variable 3.0 b ))", 2, -4.0);
+      Evaluate(interpreter, ds, "(- 8.0 2.0 2.0)", 0, 4.0);
+
+      // multiplication
+      Evaluate(interpreter, ds, "(* (variable 2.0 a ))", 0, 2.0);
+      Evaluate(interpreter, ds, "(* (variable 2.0 a ) (variable 3.0 b ))", 0, 6.0);
+      Evaluate(interpreter, ds, "(* (variable 2.0 a ) (variable 3.0 b ))", 1, 24.0);
+      Evaluate(interpreter, ds, "(* (variable 2.0 a ) (variable 3.0 b ))", 2, 12.0);
+      Evaluate(interpreter, ds, "(* 8.0 2.0 2.0)", 0, 32.0);
+
+      // division
+      Evaluate(interpreter, ds, "(/ (variable 2.0 a ))", 1, 1.0 / 4.0);
+      Evaluate(interpreter, ds, "(/ (variable 2.0 a ) 2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(/ (variable 2.0 a ) 2.0)", 1, 2.0);
+      Evaluate(interpreter, ds, "(/ (variable 3.0 b ) 2.0)", 2, 3.0);
+      Evaluate(interpreter, ds, "(/ 8.0 2.0 2.0)", 0, 2.0);
+
+      // gt
+      Evaluate(interpreter, ds, "(> (variable 2.0 a) 2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(> 2.0 (variable 2.0 a))", 0, -1.0);
+      Evaluate(interpreter, ds, "(> (variable 2.0 a) 1.9)", 0, 1.0);
+      Evaluate(interpreter, ds, "(> 1.9 (variable 2.0 a))", 0, -1.0);
+      Evaluate(interpreter, ds, "(> (log -1.0) (log -1.0))", 0, -1.0); // (> nan nan) should be false
+
+      // lt
+      Evaluate(interpreter, ds, "(< (variable 2.0 a) 2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(< 2.0 (variable 2.0 a))", 0, -1.0);
+      Evaluate(interpreter, ds, "(< (variable 2.0 a) 1.9)", 0, -1.0);
+      Evaluate(interpreter, ds, "(< 1.9 (variable 2.0 a))", 0, 1.0);
+      Evaluate(interpreter, ds, "(< (log -1.0) (log -1.0))", 0, -1.0); // (< nan nan) should be false
+
+      // If
+      Evaluate(interpreter, ds, "(if -10.0 2.0 3.0)", 0, 3.0);
+      Evaluate(interpreter, ds, "(if -1.0 2.0 3.0)", 0, 3.0);
+      Evaluate(interpreter, ds, "(if 0.0 2.0 3.0)", 0, 3.0);
+      Evaluate(interpreter, ds, "(if 1.0 2.0 3.0)", 0, 2.0);
+      Evaluate(interpreter, ds, "(if 10.0 2.0 3.0)", 0, 2.0);
+      Evaluate(interpreter, ds, "(if (log -1.0) 2.0 3.0)", 0, 3.0); // if(nan) should return the else branch
+
+      // NOT
+      Evaluate(interpreter, ds, "(not -1.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(not -2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(not 1.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(not 2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(not 0.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(not (log -1.0))", 0, 1.0);
+
+      // AND
+      Evaluate(interpreter, ds, "(and -1.0 -2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(and -1.0 2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(and 1.0 -2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(and 1.0 0.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(and 0.0 0.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(and 1.0 2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(and 1.0 2.0 3.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(and 1.0 -2.0 3.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(and (log -1.0))", 0, -1.0); // (and NaN)
+      Evaluate(interpreter, ds, "(and (log -1.0)  1.0)", 0, -1.0); // (and NaN 1.0)
+
+
+      // OR
+      Evaluate(interpreter, ds, "(or -1.0 -2.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(or -1.0 2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(or 1.0 -2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(or 1.0 2.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(or 0.0 0.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(or -1.0 -2.0 -3.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(or -1.0 -2.0 3.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(or (log -1.0))", 0, -1.0); // (or NaN)
+      Evaluate(interpreter, ds, "(or (log -1.0)  1.0)", 0, -1.0); // (or NaN 1.0)
+
+      // sin, cos, tan
+      Evaluate(interpreter, ds, "(sin " + Math.PI.ToString(NumberFormatInfo.InvariantInfo) + ")", 0, 0.0);
+      Evaluate(interpreter, ds, "(sin 0.0)", 0, 0.0);
+      Evaluate(interpreter, ds, "(cos " + Math.PI.ToString(NumberFormatInfo.InvariantInfo) + ")", 0, -1.0);
+      Evaluate(interpreter, ds, "(cos 0.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(tan " + Math.PI.ToString(NumberFormatInfo.InvariantInfo) + ")", 0, Math.Tan(Math.PI));
+      Evaluate(interpreter, ds, "(tan 0.0)", 0, Math.Tan(Math.PI));
+
+      // exp, log
+      Evaluate(interpreter, ds, "(log (exp 7.0))", 0, Math.Log(Math.Exp(7)));
+      Evaluate(interpreter, ds, "(exp (log 7.0))", 0, Math.Exp(Math.Log(7)));
+      Evaluate(interpreter, ds, "(log -3.0)", 0, Math.Log(-3));
+
+      // power
+      Evaluate(interpreter, ds, "(pow 2.0 3.0)", 0, 8.0);
+      Evaluate(interpreter, ds, "(pow 4.0 0.5)", 0, 1.0); // interpreter should round to the nearest integer value value (.5 is rounded to the even number)
+      Evaluate(interpreter, ds, "(pow 4.0 2.5)", 0, 16.0); // interpreter should round to the nearest integer value value (.5 is rounded to the even number)
+      Evaluate(interpreter, ds, "(pow -2.0 3.0)", 0, -8.0);
+      Evaluate(interpreter, ds, "(pow 2.0 -3.0)", 0, 1.0 / 8.0);
+      Evaluate(interpreter, ds, "(pow -2.0 -3.0)", 0, -1.0 / 8.0);
+
+      // root
+      Evaluate(interpreter, ds, "(root 9.0 2.0)", 0, 3.0);
+      Evaluate(interpreter, ds, "(root 27.0 3.0)", 0, 3.0);
+      Evaluate(interpreter, ds, "(root 2.0 -3.0)", 0, Math.Pow(2.0, -1.0 / 3.0));
+
+      // mean
+      Evaluate(interpreter, ds, "(mean -1.0 1.0 -1.0)", 0, -1.0 / 3.0);
+
+      // lag
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a -1) ", 1, ds.GetDoubleValue("A", 0));
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a -1) ", 2, ds.GetDoubleValue("A", 1));
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a 0) ", 2, ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a 1) ", 0, ds.GetDoubleValue("A", 1));
+
+      // integral
+      Evaluate(interpreter, ds, "(integral -1.0 (variable 1.0 a)) ", 1, ds.GetDoubleValue("A", 0) + ds.GetDoubleValue("A", 1));
+      Evaluate(interpreter, ds, "(integral -1.0 (lagVariable 1.0 a 1)) ", 1, ds.GetDoubleValue("A", 1) + ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(integral -2.0 (variable 1.0 a)) ", 2, ds.GetDoubleValue("A", 0) + ds.GetDoubleValue("A", 1) + ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(integral -1.0 (* (variable 1.0 a) (variable 1.0 b)))", 1, ds.GetDoubleValue("A", 0) * ds.GetDoubleValue("B", 0) + ds.GetDoubleValue("A", 1) * ds.GetDoubleValue("B", 1));
+      Evaluate(interpreter, ds, "(integral -2.0 3.0)", 1, 9.0);
+
+      // derivative
+      // (f_0 + 2 * f_1 - 2 * f_3 - f_4) / 8; // h = 1
+      Evaluate(interpreter, ds, "(diff (variable 1.0 a)) ", 5, (ds.GetDoubleValue("A", 5) + 2 * ds.GetDoubleValue("A", 4) - 2 * ds.GetDoubleValue("A", 2) - ds.GetDoubleValue("A", 1)) / 8.0);
+      Evaluate(interpreter, ds, "(diff (variable 1.0 b)) ", 5, (ds.GetDoubleValue("B", 5) + 2 * ds.GetDoubleValue("B", 4) - 2 * ds.GetDoubleValue("B", 2) - ds.GetDoubleValue("B", 1)) / 8.0);
+      Evaluate(interpreter, ds, "(diff (* (variable 1.0 a) (variable 1.0 b)))", 5, +
+        (ds.GetDoubleValue("A", 5) * ds.GetDoubleValue("B", 5) +
+        2 * ds.GetDoubleValue("A", 4) * ds.GetDoubleValue("B", 4) -
+        2 * ds.GetDoubleValue("A", 2) * ds.GetDoubleValue("B", 2) -
+        ds.GetDoubleValue("A", 1) * ds.GetDoubleValue("B", 1)) / 8.0);
+      Evaluate(interpreter, ds, "(diff -2.0 3.0)", 5, 0.0);
+
+      // timelag
+      Evaluate(interpreter, ds, "(lag -1.0 (lagVariable 1.0 a 2)) ", 1, ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(lag -2.0 (lagVariable 1.0 a 2)) ", 2, ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(lag -1.0 (* (lagVariable 1.0 a 1) (lagVariable 1.0 b 2)))", 1, ds.GetDoubleValue("A", 1) * ds.GetDoubleValue("B", 2));
+      Evaluate(interpreter, ds, "(lag -2.0 3.0)", 1, 3.0);
+    }
+
+    private void Evaluate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds, string expr, int index, double expected) {
+      var importer = new SymbolicExpressionImporter();
+      ISymbolicExpressionTree tree = importer.Import(expr);
+
+      double actual = interpreter.GetSymbolicExpressionTreeValues(tree, ds, Enumerable.Range(index, 1)).First();
+
+      Assert.IsFalse(double.IsNaN(actual) && !double.IsNaN(expected));
+      Assert.IsFalse(!double.IsNaN(actual) && double.IsNaN(expected));
+      if (!double.IsNaN(actual) && !double.IsNaN(expected))
+        Assert.AreEqual(expected, actual, 1.0E-12, expr);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4/Util.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4/Util.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4/Util.cs	(revision 16038)
@@ -0,0 +1,103 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Diagnostics;
+using System.Linq;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Tests {
+  internal class Util {
+    public static void InitTree(ISymbolicExpressionTree tree, MersenneTwister twister, List<string> varNames) {
+      foreach (var node in tree.IterateNodesPostfix()) {
+        if (node is VariableTreeNode) {
+          var varNode = node as VariableTreeNode;
+          varNode.Weight = twister.NextDouble() * 20.0 - 10.0;
+          varNode.VariableName = varNames[twister.Next(varNames.Count)];
+        } else if (node is ConstantTreeNode) {
+          var constantNode = node as ConstantTreeNode;
+          constantNode.Value = twister.NextDouble() * 20.0 - 10.0;
+        }
+      }
+    }
+
+
+    public static ISymbolicExpressionTree[] CreateRandomTrees(MersenneTwister twister, Dataset dataset, ISymbolicExpressionGrammar grammar, int popSize) {
+      return CreateRandomTrees(twister, dataset, grammar, popSize, 1, 200, 3, 3);
+    }
+
+    public static ISymbolicExpressionTree[] CreateRandomTrees(MersenneTwister twister, Dataset dataset, ISymbolicExpressionGrammar grammar,
+      int popSize, int minSize, int maxSize,
+      int maxFunctionDefinitions, int maxFunctionArguments) {
+      foreach (Variable variableSymbol in grammar.Symbols.OfType<Variable>()) {
+        variableSymbol.VariableNames = dataset.VariableNames.Skip(1);
+      }
+      ISymbolicExpressionTree[] randomTrees = new ISymbolicExpressionTree[popSize];
+      for (int i = 0; i < randomTrees.Length; i++) {
+        randomTrees[i] = ProbabilisticTreeCreator.Create(twister, grammar, maxSize, 10);
+      }
+      return randomTrees;
+    }
+
+    public static Dataset CreateRandomDataset(MersenneTwister twister, int rows, int columns) {
+      double[,] data = new double[rows, columns];
+      for (int i = 0; i < rows; i++) {
+        for (int j = 0; j < columns; j++) {
+          data[i, j] = twister.NextDouble() * 2.0 - 1.0;
+        }
+      }
+      IEnumerable<string> variableNames = new string[] { "y" }.Concat(Enumerable.Range(0, columns - 1).Select(x => "x" + x.ToString()));
+      Dataset ds = new Dataset(variableNames, data);
+      return ds;
+    }
+
+    public static double NodesPerSecond(long nNodes, Stopwatch watch) {
+      return nNodes / (watch.ElapsedMilliseconds / 1000.0);
+    }
+
+    private const int horizon = 10;
+    public static double CalculateEvaluatedNodesPerSec(ISymbolicExpressionTree[] trees, ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter interpreter, Dataset dataset, int repetitions) {
+      interpreter.TargetVariable = dataset.VariableNames.First();
+      // warm up
+      IEnumerable<int> rows = Enumerable.Range(0, dataset.Rows - horizon);
+      long nNodes = 0;
+      for (int i = 0; i < trees.Length; i++) {
+        nNodes += trees[i].Length * (dataset.Rows - horizon) * horizon;
+        interpreter.GetSymbolicExpressionTreeValues(trees[i], dataset, rows, horizon).Count(); // count needs to evaluate all rows
+      }
+
+      Stopwatch watch = new Stopwatch();
+      for (int rep = 0; rep < repetitions; rep++) {
+        watch.Start();
+        for (int i = 0; i < trees.Length; i++) {
+          interpreter.GetSymbolicExpressionTreeValues(trees[i], dataset, rows, horizon).Count(); // count needs to evaluate all rows
+        }
+        watch.Stop();
+      }
+      Console.WriteLine("Random tree evaluation performance of " + interpreter.GetType() + ": " +
+        watch.ElapsedMilliseconds + "ms " +
+        Util.NodesPerSecond(nNodes * repetitions, watch) + " nodes/sec");
+      return Util.NodesPerSecond(nNodes * repetitions, watch);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/CordeauGQAPInstanceProviderTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/CordeauGQAPInstanceProviderTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/CordeauGQAPInstanceProviderTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Text;
+using HeuristicLab.Problems.Instances.CordeauGQAP;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.Instances.Tests {
+  [TestClass()]
+  public class CordeauGQAPInstanceProviderTest {
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void GetCordeauGQAPInstanceTest() {
+      var target = new CordeauGQAPInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/DIMACSGcolInstanceProviderTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/DIMACSGcolInstanceProviderTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/DIMACSGcolInstanceProviderTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Text;
+using HeuristicLab.Problems.Instances.DIMACS;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.Instances.Tests {
+  [TestClass()]
+  public class DIMACSGcolInstanceProviderTest {
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "medium")]
+    public void GetDIMACSGcolInstancesTest() {
+      var target = new GcolInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/ElloumiCTAPInstanceProviderTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/ElloumiCTAPInstanceProviderTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/ElloumiCTAPInstanceProviderTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Text;
+using HeuristicLab.Problems.Instances.ElloumiCTAP;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.Instances.Tests {
+  [TestClass()]
+  public class ElloumiCTAPInstanceProviderTest {
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void GetElloumiCTAPInstanceTest() {
+      var target = new ElloumiCTAPInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/QAPLIBInstanceProviderTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/QAPLIBInstanceProviderTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/QAPLIBInstanceProviderTest.cs	(revision 16038)
@@ -0,0 +1,107 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Text;
+using HeuristicLab.Problems.Instances.QAPLIB;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.Instances.Tests {
+  [TestClass()]
+  public class QAPLIBInstanceProviderTest {
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "medium")]
+    public void GetQAPLIBInstanceTest() {
+      var target = new QAPLIBInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void GetMicroarrayQAPInstanceTest() {
+      var target = new MicroarrayQAPInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void GetDreznerQAPInstanceTest() {
+      var target = new DreznerQAPInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "long")]
+    public void GetTaillardQAPInstanceTest() {
+      var target = new TaillardQAPInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/TSPLIBInstanceProviderTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/TSPLIBInstanceProviderTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances-3.3/TSPLIBInstanceProviderTest.cs	(revision 16038)
@@ -0,0 +1,88 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Text;
+using HeuristicLab.Problems.Instances.TSPLIB;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.Instances.Tests {
+  [TestClass()]
+  public class TSPLIBInstanceProviderTest {
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "medium")]
+    public void GetTSPLIBTSPInstanceTest() {
+      var target = new TSPLIBTSPInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void GetTSPLIBATSPInstanceTest() {
+      var target = new TSPLIBATSPInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void GetTSPLIBCVRPInstanceTest() {
+      var target = new TSPLIBCVRPInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/ClassificationInstanceProviderTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/ClassificationInstanceProviderTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/ClassificationInstanceProviderTest.cs	(revision 16038)
@@ -0,0 +1,49 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Text;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.Instances.DataAnalysis.Tests {
+  [TestClass()]
+  public class ClassificationInstanceProviderTest {
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void UCIInstanceTest() {
+      var target = new UCIInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/RegressionInstanceProviderTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/RegressionInstanceProviderTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/RegressionInstanceProviderTest.cs	(revision 16038)
@@ -0,0 +1,144 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Text;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.Instances.DataAnalysis.Tests {
+  [TestClass()]
+  public class RegressionInstanceProviderTest {
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "medium")]
+    public void GetKeijzerInstanceTest() {
+      var target = new KeijzerInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void GetKornInstanceTest() {
+      var target = new KornsInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void GetNguyenInstanceTest() {
+      var target = new NguyenInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void GetRealWorldInstanceTest() {
+      var target = new RegressionRealWorldInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void GetVariousInstanceTest() {
+      var target = new VariousInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void GetVladislavlevaInstanceTest() {
+      var target = new VladislavlevaInstanceProvider();
+      StringBuilder erroneousInstances = new StringBuilder();
+      int count = 0;
+      foreach (var id in target.GetDataDescriptors()) {
+        try {
+          target.LoadData(id);
+        } catch (Exception ex) {
+          erroneousInstances.AppendLine(id.Name + ": " + ex.Message);
+        }
+        count++;
+      }
+      Assert.IsTrue(count > 0, "No problem instances were found.");
+      Assert.IsTrue(erroneousInstances.Length == 0, "Some instances could not be parsed: " + Environment.NewLine + erroneousInstances.ToString());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/TableFileParserTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/TableFileParserTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/TableFileParserTest.cs	(revision 16038)
@@ -0,0 +1,938 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Globalization;
+using System.IO;
+using System.Text;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.Instances.DataAnalysis.Tests {
+  [TestClass()]
+  public class TableFileParserTest {
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseCSV() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"0.00, 0.00, 0.00, 3.14
+0.00, 0.00, 0.00, 0.00
+0.00, 0.00, 0.00, 0.00
+0.00, 0.00, 0.00, 0.00
+0.00, 0.00, 0.00, 0.00
+0.00, 0.00, 0.00, 0.00");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual(parser.Values[3][0], 3.14);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseCSVWithNames() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"x01, x02, x03, x04
+0.00, 0.00, 0.00, 3.14
+0.00, 0.00, 0.00, 0.00
+0.00, 0.00, 0.00, 0.00
+0.00, 0.00, 0.00, 0.00
+0.00, 0.00, 0.00, 0.00
+0.00, 0.00, 0.00, 0.00");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual(parser.Values[3][0], 3.14);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseGermanCSV() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"0,00; 0,00; 0,00; 3,14
+0,00; 0,00; 0,00; 0,00
+0,00; 0,00; 0,00; 0,00
+0,00; 0,00; 0,00; 0,00
+0,00; 0,00; 0,00; 0,00
+0,00; 0,00; 0,00; 0,00");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual(parser.Values[3][0], 3.14);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseGermanCSVWithNames() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"x01; x02; x03; x04
+0,00; 0,00; 0,00; 3,14
+0,00; 0,00; 0,00; 0,00
+0,00; 0,00; 0,00; 0,00
+0,00; 0,00; 0,00; 0,00
+0,00; 0,00; 0,00; 0,00
+0,00; 0,00; 0,00; 0,00");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual(parser.Values[3][0], 3.14);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseGermanCSVWithoutCommas() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"0; 0; 0; 3
+0; 0; 0; 0
+0; 0; 0; 0
+0; 0; 0; 0
+0; 0; 0; 0
+0; 0; 0; 0");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseGermanCSVWithoutCommasWithNames() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"x01; x02; x03; x04
+0; 0; 0; 3
+0; 0; 0; 0
+0; 0; 0; 0
+0; 0; 0; 0
+0; 0; 0; 0
+0; 0; 0; 0");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseEnglishCSVWithoutCommas() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"0, 0, 0, 3
+0, 0, 0, 0
+0, 0, 0, 0
+0, 0, 0, 0
+0, 0, 0, 0
+0, 0, 0, 0");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseEnglishCSVWithoutCommasWithoutSpace() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"0,0,0,3
+0,0,0,0
+0,0,0,0
+0,0,0,0
+0,0,0,0
+0,0,0,0");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseEnglishCSVWithoutCommasWithNames() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"x01, x02, x03, x04
+0, 0, 0, 3
+0, 0, 0, 0
+0, 0, 0, 0
+0, 0, 0, 0
+0, 0, 0, 0
+0, 0, 0, 0");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseEnglishCSVWithoutCommasWithoutSpacesWithNames() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"x01,x02,x03,x04
+0,0,0,3
+0,0,0,0
+0,0,0,0
+0,0,0,0
+0,0,0,0
+0,0,0,0");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseGermanTabSeparated() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      "0,00\t 0,00\t 0,00\t 3,14" + Environment.NewLine +
+      "0,00\t 0,00\t 0,00\t 0,00" + Environment.NewLine +
+      "0,00\t 0,00\t 0,00\t 0,00" + Environment.NewLine +
+      "0,00\t 0,00\t 0,00\t 0,00" + Environment.NewLine +
+      "0,00\t 0,00\t 0,00\t 0,00" + Environment.NewLine +
+      "0,00\t 0,00\t 0,00\t 0,00");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseGermanTabSeparatedWithNames() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      "x01\t x02\t x03\t x04" + Environment.NewLine +
+      "0,00\t 0,00\t 0,00\t 3,14" + Environment.NewLine +
+      "0,00\t 0,00\t 0,00\t 0,00" + Environment.NewLine +
+      "0,00\t 0,00\t 0,00\t 0,00" + Environment.NewLine +
+      "0,00\t 0,00\t 0,00\t 0,00" + Environment.NewLine +
+      "0,00\t 0,00\t 0,00\t 0,00" + Environment.NewLine +
+      "0,00\t 0,00\t 0,00\t 0,00");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseEnglishTabSeparated() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      "0.00\t 0.00\t 0.00\t 3.14" + Environment.NewLine +
+      "0.00\t 0.00\t 0.00\t 0.00" + Environment.NewLine +
+      "0.00\t 0.00\t 0.00\t 0.00" + Environment.NewLine +
+      "0.00\t 0.00\t 0.00\t 0.00" + Environment.NewLine +
+      "0.00\t 0.00\t 0.00\t 0.00" + Environment.NewLine +
+      "0.00\t 0.00\t 0.00\t 0.00");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseEnglishTabSeparatedWithNames() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      "x01\t x02\t x03\t x04" + Environment.NewLine +
+      "0.00\t 0.00\t 0.00\t 3.14" + Environment.NewLine +
+      "0.00\t 0.00\t 0.00\t 0.00" + Environment.NewLine +
+      "0.00\t 0.00\t 0.00\t 0.00" + Environment.NewLine +
+      "0.00\t 0.00\t 0.00\t 0.00" + Environment.NewLine +
+      "0.00\t 0.00\t 0.00\t 0.00" + Environment.NewLine +
+      "0.00\t 0.00\t 0.00\t 0.00");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseTabSeparatedWithoutCommas() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      "0\t 0\t 0\t 3" + Environment.NewLine +
+      "0\t 0\t 0\t 0" + Environment.NewLine +
+      "0\t 0\t 0\t 0" + Environment.NewLine +
+      "0\t 0\t 0\t 0" + Environment.NewLine +
+      "0\t 0\t 0\t 0" + Environment.NewLine +
+      "0\t 0\t 0\t 0");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseTabSeparatedWithoutCommasWithNames() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      "x01\t x02\t x03\t x04" + Environment.NewLine +
+      "0\t 0\t 0\t 3" + Environment.NewLine +
+      "0\t 0\t 0\t 0" + Environment.NewLine +
+      "0\t 0\t 0\t 0" + Environment.NewLine +
+      "0\t 0\t 0\t 0" + Environment.NewLine +
+      "0\t 0\t 0\t 0" + Environment.NewLine +
+      "0\t 0\t 0\t 0");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseWithEmtpyLines() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      "x01\t x02\t x03\t x04" + Environment.NewLine +
+      "0\t 0\t 0\t 3" + Environment.NewLine +
+      Environment.NewLine +
+      "0\t 0\t 0\t 0" + Environment.NewLine +
+      " " + Environment.NewLine +
+      "0\t 0\t 0\t 0" + Environment.NewLine +
+      "0\t 0\t 0\t 0" + Environment.NewLine + Environment.NewLine);
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(4, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseGermanSpaceSeparated() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"0,00 0,00 0,00 3,14
+0,00 0,00 0,00 0,00
+0,00 0,00 0,00 0,00
+0,00 0,00 0,00 0,00
+0,00 0,00 0,00 0,00
+0,00 0,00 0,00 0,00");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseGermanSpaceSeparatedWithNames() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"x01 x02 x03 x04
+0,00 0,00 0,00 3,14
+0,00 0,00 0,00 0,00
+0,00 0,00 0,00 0,00
+0,00 0,00 0,00 0,00
+0,00 0,00 0,00 0,00
+0,00 0,00 0,00 0,00");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseEnglishSpaceSeparated() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"0.00 0.00 0.00 3.14
+0.00 0.00 0.00 0.00
+0.00 0.00 0.00 0.00
+0.00 0.00 0.00 0.00
+0.00 0.00 0.00 0.00
+0.00 0.00 0.00 0.00");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseEnglishSpaceSeparatedWithNames() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"x01 x02 x03 x04
+0.00 0.00 0.00 3.14
+0.00 0.00 0.00 0.00
+0.00 0.00 0.00 0.00
+0.00 0.00 0.00 0.00
+0.00 0.00 0.00 0.00
+0.00 0.00 0.00 0.00");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseEnglishSpaceSeparatedWithNamesManyColumns() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"id,y,x00001,x00002,x00003,x00004,x00005,x00006,x00007,x00008,x00009,x00010,x00011,x00012,x00013,x00014,x00015,x00016,x00017,x00018,x00019,x00020,x00021,x00022,x00023,x00024,x00025,x00026,x00027,x00028,x00029,x00030,x00031,x00032,x00033,x00034,x00035,x00036,x00037,x00038,x00039,x00040,x00041,x00042,x00043,x00044,x00045,x00046,x00047,x00048,x00049,x00050,x00051,x00052,x00053,x00054,x00055,x00056,x00057,x00058,x00059,x00060,x00061,x00062,x00063,x00064,x00065,x00066,x00067,x00068,x00069,x00070,x00071,x00072,x00073,x00074,x00075,x00076,x00077,x00078,x00079,x00080,x00081,x00082,x00083,x00084,x00085,x00086,x00087,x00088,x00089,x00090,x00091,x00092,x00093,x00094,x00095,x00096,x00097,x00098,x00099,x00100,x00101,x00102,x00103,x00104,x00105,x00106,x00107,x00108,x00109,x00110,x00111,x00112,x00113,x00114,x00115,x00116,x00117,x00118,x00119,x00120,x00121,x00122,x00123,x00124,x00125,x00126,x00127,x00128,x00129,x00130,x00131,x00132,x00133,x00134,x00135,x00136,x00137,x00138,x00139,x00140,x00141,x00142,x00143,x00144,x00145,x00146,x00147,x00148,x00149,x00150,x00151,x00152,x00153,x00154,x00155,x00156,x00157,x00158,x00159,x00160,x00161,x00162,x00163,x00164,x00165,x00166,x00167,x00168,x00169,x00170,x00171,x00172,x00173,x00174,x00175,x00176,x00177,x00178,x00179,x00180,x00181,x00182,x00183,x00184,x00185,x00186,x00187,x00188,x00189,x00190,x00191,x00192,x00193,x00194,x00195,x00196,x00197,x00198,x00199,x00200,x00201,x00202,x00203,x00204,x00205,x00206,x00207,x00208,x00209,x00210,x00211,x00212,x00213,x00214,x00215,x00216,x00217,x00218,x00219,x00220,x00221,x00222,x00223,x00224,x00225,x00226,x00227,x00228,x00229,x00230,x00231,x00232,x00233,x00234,x00235,x00236,x00237,x00238,x00239,x00240,x00241,x00242,x00243,x00244,x00245,x00246,x00247,x00248,x00249,x00250,x00251,x00252,x00253,x00254,x00255,x00256,x00257,x00258,x00259,x00260,x00261,x00262,x00263,x00264,x00265,x00266,x00267,x00268,x00269,x00270,x00271,x00272,x00273,x00274,x00275,x00276,x00277,x00278,x00279,x00280,x00281,x00282,x00283,x00284,x00285,x00286,x00287,x00288,x00289,x00290,x00291,x00292,x00293,x00294,x00295,x00296,x00297,x00298,x00299,x00300,x00301,x00302,x00303,x00304,x00305,x00306,x00307,x00308,x00309,x00310,x00311,x00312,x00313,x00314,x00315,x00316,x00317,x00318,x00319,x00320,x00321,x00322,x00323,x00324,x00325,x00326,x00327,x00328,x00329,x00330,x00331,x00332,x00333,x00334,x00335,x00336,x00337,x00338,x00339,x00340,x00341,x00342,x00343,x00344,x00345,x00346,x00347,x00348,x00349,x00350,x00351,x00352,x00353,x00354,x00355,x00356,x00357,x00358,x00359,x00360,x00361,x00362,x00363,x00364,x00365,x00366,x00367,x00368,x00369,x00370,x00371,x00372,x00373,x00374,x00375,x00376,x00377,x00378,x00379,x00380,x00381,x00382,x00383,x00384,x00385,x00386,x00387,x00388,x00389,x00390,x00391,x00392,x00393,x00394,x00395,x00396,x00397,x00398,x00399,x00400,x00401,x00402,x00403,x00404,x00405,x00406,x00407,x00408,x00409,x00410,x00411,x00412,x00413,x00414,x00415,x00416,x00417,x00418,x00419,x00420,x00421,x00422,x00423,x00424,x00425,x00426,x00427,x00428,x00429,x00430,x00431,x00432,x00433,x00434,x00435,x00436,x00437,x00438,x00439,x00440,x00441,x00442,x00443,x00444,x00445,x00446,x00447,x00448,x00449,x00450,x00451,x00452,x00453,x00454,x00455,x00456,x00457,x00458,x00459,x00460,x00461,x00462,x00463,x00464,x00465,x00466,x00467,x00468,x00469,x00470,x00471,x00472,x00473,x00474,x00475,x00476,x00477,x00478,x00479,x00480,x00481,x00482,x00483,x00484,x00485,x00486,x00487,x00488,x00489,x00490,x00491,x00492,x00493,x00494,x00495,x00496,x00497,x00498,x00499,x00500,x00501,x00502,x00503,x00504,x00505,x00506,x00507,x00508,x00509,x00510,x00511,x00512,x00513,x00514,x00515,x00516,x00517,x00518,x00519,x00520,x00521,x00522,x00523,x00524,x00525,x00526,x00527,x00528,x00529,x00530,x00531,x00532,x00533,x00534,x00535,x00536,x00537,x00538,x00539,x00540,x00541,x00542,x00543,x00544,x00545,x00546,x00547,x00548,x00549,x00550,x00551,x00552,x00553,x00554,x00555,x00556,x00557,x00558,x00559,x00560,x00561,x00562,x00563,x00564,x00565,x00566,x00567,x00568,x00569,x00570,x00571,x00572,x00573,x00574,x00575,x00576,x00577,x00578,x00579,x00580,x00581,x00582,x00583,x00584,x00585,x00586,x00587,x00588,x00589,x00590,x00591,x00592,x00593,x00594,x00595,x00596,x00597,x00598,x00599,x00600,x00601,x00602,x00603,x00604,x00605,x00606,x00607,x00608,x00609,x00610,x00611,x00612,x00613,x00614,x00615,x00616,x00617,x00618,x00619,x00620,x00621,x00622,x00623,x00624,x00625,x00626,x00627,x00628,x00629,x00630,x00631,x00632,x00633,x00634,x00635,x00636,x00637,x00638,x00639,x00640,x00641,x00642,x00643,x00644,x00645,x00646,x00647,x00648,x00649,x00650,x00651,x00652,x00653,x00654,x00655,x00656,x00657,x00658,x00659,x00660,x00661,x00662,x00663,x00664,x00665,x00666,x00667,x00668,x00669,x00670,x00671,x00672,x00673,x00674,x00675,x00676,x00677,x00678,x00679,x00680,x00681,x00682,x00683,x00684,x00685,x00686,x00687,x00688,x00689,x00690,x00691,x00692,x00693,x00694,x00695,x00696,x00697,x00698,x00699,x00700,x00701,x00702,x00703,x00704,x00705,x00706,x00707,x00708,x00709,x00710,x00711,x00712,x00713,x00714,x00715,x00716,x00717,x00718,x00719,x00720,x00721,x00722,x00723,x00724,x00725,x00726,x00727,x00728,x00729,x00730,x00731,x00732,x00733,x00734,x00735,x00736,x00737,x00738,x00739,x00740,x00741,x00742,x00743,x00744,x00745,x00746,x00747,x00748,x00749,x00750,x00751,x00752,x00753,x00754,x00755,x00756,x00757,x00758,x00759,x00760,x00761,x00762,x00763,x00764,x00765,x00766,x00767,x00768,x00769,x00770,x00771,x00772,x00773,x00774,x00775,x00776,x00777,x00778,x00779,x00780,x00781,x00782,x00783,x00784,x00785,x00786,x00787,x00788,x00789,x00790,x00791,x00792,x00793,x00794,x00795,x00796,x00797,x00798,x00799,x00800,x00801,x00802,x00803,x00804,x00805,x00806,x00807,x00808,x00809,x00810,x00811,x00812,x00813,x00814,x00815,x00816,x00817,x00818,x00819,x00820,x00821,x00822,x00823,x00824,x00825,x00826,x00827,x00828,x00829,x00830,x00831,x00832,x00833,x00834,x00835,x00836,x00837,x00838,x00839,x00840,x00841,x00842,x00843,x00844,x00845,x00846,x00847,x00848,x00849,x00850,x00851,x00852,x00853,x00854,x00855,x00856,x00857,x00858,x00859,x00860,x00861,x00862,x00863,x00864,x00865,x00866,x00867,x00868,x00869,x00870,x00871,x00872,x00873,x00874,x00875,x00876,x00877,x00878,x00879,x00880,x00881,x00882,x00883,x00884,x00885,x00886,x00887,x00888,x00889,x00890,x00891,x00892,x00893,x00894,x00895,x00896,x00897,x00898,x00899,x00900,x00901,x00902,x00903,x00904,x00905,x00906,x00907,x00908,x00909,x00910,x00911,x00912,x00913,x00914,x00915,x00916,x00917,x00918,x00919,x00920,x00921,x00922,x00923,x00924,x00925,x00926,x00927,x00928,x00929,x00930,x00931,x00932,x00933,x00934,x00935,x00936,x00937,x00938,x00939,x00940,x00941,x00942,x00943,x00944,x00945,x00946,x00947,x00948,x00949,x00950,x00951,x00952,x00953,x00954,x00955,x00956,x00957,x00958,x00959,x00960,x00961,x00962,x00963,x00964,x00965,x00966,x00967,x00968,x00969,x00970,x00971,x00972,x00973,x00974,x00975,x00976,x00977,x00978,x00979,x00980,x00981,x00982,x00983,x00984,x00985,x00986,x00987,x00988,x00989,x00990,x00991,x00992,x00993,x00994,x00995,x00996,x00997,x00998,x00999,x01000,x01001,x01002,x01003,x01004,x01005,x01006,x01007,x01008,x01009,x01010,x01011,x01012,x01013,x01014,x01015,x01016,x01017,x01018,x01019,x01020,x01021,x01022,x01023,x01024,x01025,x01026,x01027,x01028,x01029,x01030,x01031,x01032,x01033,x01034,x01035,x01036,x01037,x01038,x01039,x01040,x01041,x01042,x01043,x01044,x01045,x01046,x01047,x01048,x01049,x01050,x01051,x01052,x01053,x01054,x01055,x01056,x01057,x01058,x01059,x01060,x01061,x01062,x01063,x01064,x01065,x01066,x01067,x01068,x01069,x01070,x01071,x01072,x01073,x01074,x01075,x01076,x01077,x01078,x01079,x01080,x01081,x01082,x01083,x01084,x01085,x01086,x01087,x01088,x01089,x01090,x01091,x01092,x01093,x01094,x01095,x01096,x01097,x01098,x01099,x01100,x01101,x01102,x01103,x01104,x01105,x01106,x01107,x01108,x01109,x01110,x01111,x01112,x01113,x01114,x01115,x01116,x01117,x01118,x01119,x01120,x01121,x01122,x01123,x01124,x01125,x01126,x01127,x01128,x01129,x01130,x01131,x01132,x01133,x01134,x01135,x01136,x01137,x01138,x01139,x01140,x01141,x01142,x01143,x01144,x01145,x01146,x01147,x01148,x01149,x01150,x01151,x01152,x01153,x01154,x01155,x01156,x01157,x01158,x01159,x01160,x01161,x01162,x01163,x01164,x01165,x01166,x01167,x01168,x01169,x01170,x01171,x01172,x01173,x01174,x01175,x01176,x01177,x01178,x01179,x01180,x01181,x01182,x01183,x01184,x01185,x01186,x01187,x01188,x01189,x01190,x01191,x01192,x01193,x01194,x01195,x01196,x01197,x01198,x01199,x01200,x01201,x01202,x01203,x01204,x01205,x01206,x01207,x01208,x01209,x01210,x01211,x01212,x01213,x01214,x01215,x01216,x01217,x01218,x01219,x01220,x01221,x01222,x01223,x01224,x01225,x01226,x01227,x01228,x01229,x01230,x01231,x01232,x01233,x01234,x01235,x01236,x01237,x01238,x01239,x01240,x01241,x01242,x01243,x01244,x01245,x01246,x01247,x01248,x01249,x01250,x01251,x01252,x01253,x01254,x01255,x01256,x01257,x01258,x01259,x01260,x01261,x01262,x01263,x01264,x01265,x01266,x01267,x01268,x01269,x01270,x01271,x01272,x01273,x01274,x01275,x01276,x01277,x01278,x01279,x01280,x01281,x01282,x01283,x01284,x01285,x01286,x01287,x01288,x01289,x01290,x01291,x01292,x01293,x01294,x01295,x01296,x01297,x01298,x01299,x01300,x01301,x01302,x01303,x01304,x01305,x01306,x01307,x01308,x01309,x01310,x01311,x01312,x01313,x01314,x01315,x01316,x01317,x01318,x01319,x01320,x01321,x01322,x01323,x01324,x01325,x01326,x01327,x01328,x01329,x01330,x01331,x01332,x01333,x01334,x01335,x01336,x01337,x01338,x01339,x01340,x01341,x01342,x01343,x01344,x01345,x01346,x01347,x01348,x01349,x01350,x01351,x01352,x01353,x01354,x01355,x01356,x01357,x01358,x01359,x01360,x01361,x01362,x01363,x01364,x01365,x01366,x01367,x01368,x01369,x01370,x01371,x01372,x01373,x01374,x01375,x01376,x01377,x01378,x01379,x01380,x01381,x01382,x01383,x01384,x01385,x01386,x01387,x01388,x01389,x01390,x01391,x01392,x01393,x01394,x01395,x01396,x01397,x01398,x01399,x01400,x01401,x01402,x01403,x01404,x01405,x01406,x01407,x01408,x01409,x01410,x01411,x01412,x01413,x01414,x01415,x01416,x01417,x01418,x01419,x01420,x01421,x01422,x01423,x01424,x01425,x01426,x01427,x01428,x01429,x01430,x01431,x01432,x01433,x01434,x01435,x01436,x01437,x01438,x01439,x01440,x01441,x01442,x01443,x01444,x01445,x01446,x01447,x01448,x01449,x01450,x01451,x01452,x01453,x01454,x01455,x01456,x01457,x01458,x01459,x01460,x01461,x01462,x01463,x01464,x01465,x01466,x01467,x01468,x01469,x01470,x01471,x01472,x01473,x01474,x01475,x01476,x01477,x01478,x01479,x01480,x01481,x01482,x01483,x01484,x01485,x01486,x01487,x01488,x01489,x01490,x01491,x01492,x01493,x01494,x01495,x01496,x01497,x01498,x01499,x01500,x01501,x01502,x01503,x01504,x01505,x01506,x01507,x01508,x01509,x01510,x01511,x01512,x01513,x01514,x01515,x01516,x01517,x01518,x01519,x01520,x01521,x01522,x01523,x01524,x01525,x01526,x01527,x01528,x01529,x01530,x01531,x01532,x01533,x01534,x01535,x01536,x01537,x01538,x01539,x01540,x01541,x01542,x01543,x01544,x01545,x01546,x01547,x01548,x01549,x01550,x01551,x01552,x01553,x01554,x01555,x01556,x01557,x01558,x01559,x01560,x01561,x01562,x01563,x01564,x01565,x01566,x01567,x01568,x01569,x01570,x01571,x01572,x01573,x01574,x01575,x01576,x01577,x01578,x01579,x01580,x01581,x01582,x01583,x01584,x01585,x01586,x01587,x01588,x01589,x01590,x01591,x01592,x01593,x01594,x01595,x01596,x01597,x01598,x01599,x01600,x01601,x01602,x01603,x01604,x01605,x01606,x01607,x01608,x01609,x01610,x01611,x01612,x01613,x01614,x01615,x01616,x01617,x01618,x01619,x01620,x01621,x01622,x01623,x01624,x01625,x01626,x01627,x01628,x01629,x01630,x01631,x01632,x01633,x01634,x01635,x01636,x01637,x01638,x01639,x01640,x01641,x01642,x01643,x01644,x01645,x01646,x01647,x01648,x01649,x01650,x01651,x01652,x01653,x01654,x01655,x01656,x01657,x01658,x01659,x01660,x01661,x01662,x01663,x01664,x01665,x01666,x01667,x01668,x01669,x01670,x01671,x01672,x01673,x01674,x01675,x01676,x01677,x01678,x01679,x01680,x01681,x01682,x01683,x01684,x01685,x01686,x01687,x01688,x01689,x01690,x01691,x01692,x01693,x01694,x01695,x01696,x01697,x01698,x01699,x01700,x01701,x01702,x01703,x01704,x01705,x01706,x01707,x01708,x01709,x01710,x01711,x01712,x01713,x01714,x01715,x01716,x01717,x01718,x01719,x01720,x01721,x01722,x01723,x01724,x01725,x01726,x01727,x01728,x01729,x01730,x01731,x01732,x01733,x01734,x01735,x01736,x01737,x01738,x01739,x01740,x01741,x01742,x01743,x01744,x01745,x01746,x01747,x01748,x01749,x01750,x01751,x01752,x01753,x01754,x01755,x01756,x01757,x01758,x01759,x01760,x01761,x01762,x01763,x01764,x01765,x01766,x01767,x01768,x01769,x01770,x01771,x01772,x01773,x01774,x01775,x01776,x01777,x01778,x01779,x01780,x01781,x01782,x01783,x01784,x01785,x01786,x01787,x01788,x01789,x01790,x01791,x01792,x01793,x01794,x01795,x01796,x01797,x01798,x01799,x01800,x01801,x01802,x01803,x01804,x01805,x01806,x01807,x01808,x01809,x01810,x01811,x01812,x01813,x01814,x01815,x01816,x01817,x01818,x01819,x01820,x01821,x01822,x01823,x01824,x01825,x01826,x01827,x01828,x01829,x01830,x01831,x01832,x01833,x01834,x01835,x01836,x01837,x01838,x01839,x01840,x01841,x01842,x01843,x01844,x01845,x01846,x01847,x01848,x01849,x01850,x01851,x01852,x01853,x01854,x01855,x01856,x01857,x01858,x01859,x01860,x01861,x01862,x01863,x01864,x01865,x01866,x01867,x01868,x01869,x01870,x01871,x01872,x01873,x01874,x01875,x01876,x01877,x01878,x01879,x01880,x01881,x01882,x01883,x01884,x01885,x01886,x01887,x01888,x01889,x01890,x01891,x01892,x01893,x01894,x01895,x01896,x01897,x01898,x01899,x01900,x01901,x01902,x01903,x01904,x01905,x01906,x01907,x01908,x01909,x01910,x01911,x01912,x01913,x01914,x01915,x01916,x01917,x01918,x01919,x01920,x01921,x01922,x01923,x01924,x01925,x01926,x01927,x01928,x01929,x01930,x01931,x01932,x01933,x01934,x01935,x01936,x01937,x01938,x01939,x01940,x01941,x01942,x01943,x01944,x01945,x01946,x01947,x01948,x01949,x01950,x01951,x01952,x01953,x01954,x01955,x01956,x01957,x01958,x01959,x01960,x01961,x01962,x01963,x01964,x01965,x01966,x01967,x01968,x01969,x01970,x01971,x01972,x01973,x01974,x01975,x01976,x01977,x01978,x01979,x01980,x01981,x01982,x01983,x01984,x01985,x01986,x01987,x01988,x01989,x01990,x01991,x01992,x01993,x01994,x01995,x01996,x01997,x01998,x01999,x02000,x02001,x02002,x02003,x02004,x02005,x02006,x02007,x02008,x02009,x02010,x02011,x02012,x02013,x02014,x02015,x02016,x02017,x02018,x02019,x02020,x02021,x02022,x02023,x02024,x02025,x02026,x02027,x02028,x02029,x02030,x02031,x02032,x02033,x02034,x02035,x02036,x02037,x02038,x02039,x02040,x02041,x02042,x02043,x02044,x02045,x02046,x02047,x02048,x02049,x02050,x02051,x02052,x02053,x02054,x02055,x02056,x02057,x02058,x02059,x02060,x02061,x02062,x02063,x02064,x02065,x02066,x02067,x02068,x02069,x02070,x02071,x02072,x02073,x02074,x02075,x02076,x02077,x02078,x02079,x02080,x02081,x02082,x02083,x02084,x02085,x02086,x02087,x02088,x02089,x02090,x02091,x02092,x02093,x02094,x02095,x02096,x02097,x02098,x02099,x02100,x02101,x02102,x02103,x02104,x02105,x02106,x02107,x02108,x02109,x02110,x02111,x02112,x02113,x02114,x02115,x02116,x02117,x02118,x02119,x02120,x02121,x02122,x02123,x02124,x02125,x02126,x02127,x02128,x02129,x02130,x02131,x02132,x02133,x02134,x02135,x02136,x02137,x02138,x02139,x02140,x02141,x02142,x02143,x02144,x02145,x02146,x02147,x02148,x02149,x02150,x02151,x02152,x02153,x02154,x02155,x02156,x02157,x02158,x02159,x02160,x02161,x02162,x02163,x02164,x02165,x02166,x02167,x02168,x02169,x02170,x02171,x02172,x02173,x02174,x02175,x02176,x02177,x02178,x02179,x02180,x02181,x02182,x02183,x02184,x02185,x02186,x02187,x02188,x02189,x02190,x02191,x02192,x02193,x02194,x02195,x02196,x02197,x02198,x02199,x02200,x02201,x02202,x02203,x02204,x02205,x02206,x02207,x02208,x02209,x02210,x02211,x02212,x02213,x02214,x02215,x02216,x02217,x02218,x02219,x02220,x02221,x02222,x02223,x02224,x02225,x02226,x02227,x02228,x02229,x02230,x02231,x02232,x02233,x02234,x02235,x02236,x02237,x02238,x02239,x02240,x02241,x02242,x02243,x02244,x02245,x02246,x02247,x02248,x02249,x02250,x02251,x02252,x02253,x02254,x02255,x02256,x02257,x02258,x02259,x02260,x02261,x02262,x02263,x02264,x02265,x02266,x02267,x02268,x02269,x02270,x02271,x02272,x02273,x02274,x02275,x02276,x02277,x02278,x02279,x02280,x02281,x02282,x02283,x02284,x02285,x02286,x02287,x02288,x02289,x02290,x02291,x02292,x02293,x02294,x02295,x02296,x02297,x02298,x02299,x02300,x02301,x02302,x02303,x02304,x02305,x02306,x02307,x02308,x02309,x02310,x02311,x02312,x02313,x02314,x02315,x02316,x02317,x02318,x02319,x02320,x02321,x02322,x02323,x02324,x02325,x02326,x02327,x02328,x02329,x02330,x02331,x02332,x02333,x02334,x02335,x02336,x02337,x02338,x02339,x02340,x02341,x02342,x02343,x02344,x02345,x02346,x02347,x02348,x02349,x02350,x02351,x02352,x02353,x02354,x02355,x02356,x02357,x02358,x02359,x02360,x02361,x02362,x02363,x02364,x02365,x02366,x02367,x02368,x02369,x02370,x02371,x02372,x02373,x02374,x02375,x02376,x02377,x02378,x02379,x02380,x02381,x02382,x02383,x02384,x02385,x02386,x02387,x02388,x02389,x02390,x02391,x02392,x02393,x02394,x02395,x02396,x02397,x02398,x02399,x02400,x02401,x02402,x02403,x02404,x02405,x02406,x02407,x02408,x02409,x02410,x02411,x02412,x02413,x02414,x02415,x02416,x02417,x02418,x02419,x02420,x02421,x02422,x02423,x02424,x02425,x02426,x02427,x02428,x02429,x02430,x02431,x02432,x02433,x02434,x02435,x02436,x02437,x02438,x02439,x02440,x02441,x02442,x02443,x02444,x02445,x02446,x02447,x02448,x02449,x02450,x02451,x02452,x02453,x02454,x02455,x02456,x02457,x02458,x02459,x02460,x02461,x02462,x02463,x02464,x02465,x02466,x02467,x02468,x02469,x02470,x02471,x02472,x02473,x02474,x02475,x02476,x02477,x02478,x02479,x02480,x02481,x02482,x02483,x02484,x02485,x02486,x02487,x02488,x02489,x02490,x02491,x02492,x02493,x02494,x02495,x02496,x02497,x02498,x02499,x02500,x02501,x02502,x02503,x02504,x02505,x02506,x02507,x02508,x02509,x02510,x02511,x02512,x02513,x02514,x02515,x02516,x02517,x02518,x02519,x02520,x02521,x02522,x02523,x02524,x02525,x02526,x02527,x02528,x02529,x02530,x02531,x02532,x02533,x02534,x02535,x02536,x02537,x02538,x02539,x02540,x02541,x02542,x02543,x02544,x02545,x02546,x02547,x02548,x02549,x02550,x02551,x02552,x02553,x02554,x02555,x02556,x02557,x02558,x02559,x02560,x02561,x02562,x02563,x02564,x02565,x02566,x02567,x02568,x02569,x02570,x02571,x02572,x02573,x02574,x02575,x02576,x02577,x02578,x02579,x02580,x02581,x02582,x02583,x02584,x02585,x02586,x02587,x02588,x02589,x02590,x02591,x02592,x02593,x02594,x02595,x02596,x02597,x02598,x02599,x02600,x02601,x02602,x02603,x02604,x02605,x02606,x02607,x02608,x02609,x02610,x02611,x02612,x02613,x02614,x02615,x02616,x02617,x02618,x02619,x02620,x02621,x02622,x02623,x02624,x02625,x02626,x02627,x02628,x02629,x02630,x02631,x02632,x02633,x02634,x02635,x02636,x02637,x02638,x02639,x02640,x02641,x02642,x02643,x02644,x02645,x02646,x02647,x02648,x02649,x02650,x02651,x02652,x02653,x02654,x02655,x02656,x02657,x02658,x02659,x02660,x02661,x02662,x02663,x02664,x02665,x02666,x02667,x02668,x02669,x02670,x02671,x02672,x02673,x02674,x02675,x02676,x02677,x02678,x02679,x02680,x02681,x02682,x02683,x02684,x02685,x02686,x02687,x02688,x02689,x02690,x02691,x02692,x02693,x02694,x02695,x02696,x02697,x02698,x02699,x02700,x02701,x02702,x02703,x02704,x02705,x02706,x02707,x02708,x02709,x02710,x02711,x02712,x02713,x02714,x02715,x02716,x02717,x02718,x02719,x02720,x02721,x02722,x02723,x02724,x02725,x02726,x02727,x02728,x02729,x02730,x02731,x02732,x02733,x02734,x02735,x02736,x02737,x02738,x02739,x02740,x02741,x02742,x02743,x02744,x02745,x02746,x02747,x02748,x02749,x02750,x02751,x02752,x02753,x02754,x02755,x02756,x02757,x02758,x02759,x02760,x02761,x02762,x02763,x02764,x02765,x02766,x02767,x02768,x02769,x02770,x02771,x02772,x02773,x02774,x02775,x02776,x02777,x02778,x02779,x02780,x02781,x02782,x02783,x02784,x02785,x02786,x02787,x02788,x02789,x02790,x02791,x02792,x02793,x02794,x02795,x02796,x02797,x02798,x02799,x02800,x02801,x02802,x02803,x02804,x02805,x02806,x02807,x02808,x02809,x02810,x02811,x02812,x02813,x02814,x02815,x02816,x02817,x02818,x02819,x02820,x02821,x02822,x02823,x02824,x02825,x02826,x02827,x02828,x02829,x02830,x02831,x02832,x02833,x02834,x02835,x02836,x02837,x02838,x02839,x02840,x02841,x02842,x02843,x02844,x02845,x02846,x02847,x02848,x02849,x02850,x02851,x02852,x02853,x02854,x02855,x02856,x02857,x02858,x02859,x02860,x02861,x02862,x02863,x02864,x02865,x02866,x02867,x02868,x02869,x02870,x02871,x02872,x02873,x02874,x02875,x02876,x02877,x02878,x02879,x02880,x02881,x02882,x02883,x02884,x02885,x02886,x02887,x02888,x02889,x02890,x02891,x02892,x02893,x02894,x02895,x02896,x02897,x02898,x02899,x02900,x02901,x02902,x02903,x02904,x02905,x02906,x02907,x02908,x02909,x02910,x02911,x02912,x02913,x02914,x02915,x02916,x02917,x02918,x02919,x02920,x02921,x02922,x02923,x02924,x02925,x02926,x02927,x02928,x02929,x02930,x02931,x02932,x02933,x02934,x02935,x02936,x02937,x02938,x02939,x02940,x02941,x02942,x02943,x02944,x02945,x02946,x02947,x02948,x02949,x02950,x02951,x02952,x02953,x02954,x02955,x02956,x02957,x02958,x02959,x02960,x02961,x02962,x02963,x02964,x02965,x02966,x02967,x02968,x02969,x02970,x02971,x02972,x02973,x02974,x02975,x02976,x02977,x02978,x02979,x02980,x02981,x02982,x02983,x02984,x02985,x02986,x02987,x02988,x02989,x02990,x02991,x02992,x02993,x02994,x02995,x02996,x02997,x02998,x02999,x03000,x03001,x03002,x03003,x03004,x03005,x03006,x03007,x03008,x03009,x03010,x03011,x03012,x03013,x03014,x03015,x03016,x03017,x03018,x03019,x03020,x03021,x03022,x03023,x03024,x03025,x03026,x03027,x03028,x03029,x03030,x03031,x03032,x03033,x03034,x03035,x03036,x03037,x03038,x03039,x03040,x03041,x03042,x03043,x03044,x03045,x03046,x03047,x03048,x03049,x03050,x03051,x03052,x03053,x03054,x03055,x03056,x03057,x03058,x03059,x03060,x03061,x03062,x03063,x03064,x03065,x03066,x03067,x03068,x03069,x03070,x03071,x03072,x03073,x03074,x03075,x03076,x03077,x03078,x03079,x03080,x03081,x03082,x03083,x03084,x03085,x03086,x03087,x03088,x03089,x03090,x03091,x03092,x03093,x03094,x03095,x03096,x03097,x03098,x03099,x03100,x03101,x03102,x03103,x03104,x03105,x03106,x03107,x03108,x03109,x03110,x03111,x03112,x03113,x03114,x03115,x03116,x03117,x03118,x03119,x03120,x03121,x03122,x03123,x03124,x03125,x03126,x03127,x03128,x03129,x03130,x03131,x03132,x03133,x03134,x03135,x03136,x03137,x03138,x03139,x03140,x03141,x03142,x03143,x03144,x03145,x03146,x03147,x03148,x03149,x03150,x03151,x03152,x03153,x03154,x03155,x03156,x03157,x03158,x03159,x03160,x03161,x03162,x03163,x03164,x03165,x03166,x03167,x03168,x03169,x03170,x03171,x03172,x03173,x03174,x03175,x03176,x03177,x03178,x03179,x03180,x03181,x03182,x03183,x03184,x03185,x03186,x03187,x03188,x03189,x03190,x03191,x03192,x03193,x03194,x03195,x03196,x03197,x03198,x03199,x03200,x03201,x03202,x03203,x03204,x03205,x03206,x03207,x03208,x03209,x03210,x03211,x03212,x03213,x03214,x03215,x03216,x03217,x03218,x03219,x03220,x03221,x03222,x03223,x03224,x03225,x03226,x03227,x03228,x03229,x03230,x03231,x03232,x03233,x03234,x03235,x03236,x03237,x03238,x03239,x03240,x03241,x03242,x03243,x03244,x03245,x03246,x03247,x03248,x03249,x03250,x03251,x03252,x03253,x03254,x03255,x03256,x03257,x03258,x03259,x03260,x03261,x03262,x03263,x03264,x03265,x03266,x03267,x03268,x03269,x03270,x03271,x03272,x03273,x03274,x03275,x03276,x03277,x03278,x03279,x03280,x03281,x03282,x03283,x03284,x03285,x03286,x03287,x03288,x03289,x03290,x03291,x03292,x03293,x03294,x03295,x03296,x03297,x03298,x03299,x03300,x03301,x03302,x03303,x03304,x03305,x03306,x03307,x03308,x03309,x03310,x03311,x03312,x03313,x03314,x03315,x03316,x03317,x03318,x03319,x03320,x03321,x03322,x03323,x03324,x03325,x03326,x03327,x03328,x03329,x03330,x03331,x03332,x03333,x03334,x03335,x03336,x03337,x03338,x03339,x03340,x03341,x03342,x03343,x03344,x03345,x03346,x03347,x03348,x03349,x03350,x03351,x03352,x03353,x03354,x03355,x03356,x03357,x03358,x03359,x03360,x03361,x03362,x03363,x03364,x03365,x03366,x03367,x03368,x03369,x03370,x03371,x03372,x03373,x03374,x03375,x03376,x03377,x03378,x03379,x03380,x03381,x03382,x03383,x03384,x03385,x03386,x03387,x03388,x03389,x03390,x03391,x03392,x03393,x03394,x03395,x03396,x03397,x03398,x03399,x03400,x03401,x03402,x03403,x03404,x03405,x03406,x03407,x03408,x03409,x03410,x03411,x03412,x03413,x03414,x03415,x03416,x03417,x03418,x03419,x03420,x03421,x03422,x03423,x03424,x03425,x03426,x03427,x03428,x03429,x03430,x03431,x03432,x03433,x03434,x03435,x03436,x03437,x03438,x03439,x03440,x03441,x03442,x03443,x03444,x03445,x03446,x03447,x03448,x03449,x03450,x03451,x03452,x03453,x03454,x03455,x03456,x03457,x03458,x03459,x03460,x03461,x03462,x03463,x03464,x03465,x03466,x03467,x03468,x03469,x03470,x03471,x03472,x03473,x03474,x03475,x03476,x03477,x03478,x03479,x03480,x03481,x03482,x03483,x03484,x03485,x03486,x03487,x03488,x03489,x03490,x03491,x03492,x03493,x03494,x03495,x03496,x03497,x03498,x03499,x03500,x03501,x03502,x03503,x03504,x03505,x03506,x03507,x03508,x03509,x03510,x03511,x03512,x03513,x03514,x03515,x03516,x03517,x03518,x03519,x03520,x03521,x03522,x03523,x03524,x03525,x03526,x03527,x03528,x03529,x03530,x03531,x03532,x03533,x03534,x03535,x03536,x03537,x03538,x03539,x03540,x03541,x03542,x03543,x03544,x03545,x03546,x03547,x03548,x03549,x03550,x03551,x03552,x03553,x03554,x03555,x03556,x03557,x03558,x03559,x03560,x03561,x03562,x03563,x03564,x03565,x03566,x03567,x03568,x03569,x03570,x03571,x03572,x03573,x03574,x03575,x03576,x03577,x03578,x03579,x03580,x03581,x03582,x03583,x03584,x03585,x03586,x03587,x03588,x03589,x03590,x03591,x03592,x03593,x03594,x03595,x03596,x03597,x03598,x03599,x03600,x03601,x03602,x03603,x03604,x03605,x03606,x03607,x03608,x03609,x03610,x03611,x03612,x03613,x03614,x03615,x03616,x03617,x03618,x03619,x03620,x03621,x03622,x03623,x03624,x03625,x03626,x03627,x03628,x03629,x03630,x03631,x03632,x03633,x03634,x03635,x03636,x03637,x03638,x03639,x03640,x03641,x03642,x03643,x03644,x03645,x03646,x03647,x03648,x03649,x03650,x03651,x03652,x03653,x03654,x03655,x03656,x03657,x03658,x03659,x03660,x03661,x03662,x03663,x03664,x03665,x03666,x03667,x03668,x03669,x03670,x03671,x03672,x03673,x03674,x03675,x03676,x03677,x03678,x03679,x03680,x03681,x03682,x03683,x03684,x03685,x03686,x03687,x03688,x03689,x03690,x03691,x03692,x03693,x03694,x03695,x03696,x03697,x03698,x03699,x03700,x03701,x03702,x03703,x03704,x03705,x03706,x03707,x03708,x03709,x03710,x03711,x03712,x03713,x03714,x03715,x03716,x03717,x03718,x03719,x03720,x03721,x03722,x03723,x03724,x03725,x03726,x03727,x03728,x03729,x03730,x03731,x03732,x03733,x03734,x03735,x03736,x03737,x03738,x03739,x03740,x03741,x03742,x03743,x03744,x03745,x03746,x03747,x03748,x03749,x03750,x03751,x03752,x03753,x03754,x03755,x03756,x03757,x03758,x03759,x03760,x03761,x03762,x03763,x03764,x03765,x03766,x03767,x03768,x03769,x03770,x03771,x03772,x03773,x03774,x03775,x03776,x03777,x03778,x03779,x03780,x03781,x03782,x03783,x03784,x03785,x03786,x03787,x03788,x03789,x03790,x03791,x03792,x03793,x03794,x03795,x03796,x03797,x03798,x03799,x03800,x03801,x03802,x03803,x03804,x03805,x03806,x03807,x03808,x03809,x03810,x03811,x03812,x03813,x03814,x03815,x03816,x03817,x03818,x03819,x03820,x03821,x03822,x03823,x03824,x03825,x03826,x03827,x03828,x03829,x03830,x03831,x03832,x03833,x03834,x03835,x03836,x03837,x03838,x03839,x03840,x03841,x03842,x03843,x03844,x03845,x03846,x03847,x03848,x03849,x03850,x03851,x03852,x03853,x03854,x03855,x03856,x03857,x03858,x03859,x03860,x03861,x03862,x03863,x03864,x03865,x03866,x03867,x03868,x03869,x03870,x03871,x03872,x03873,x03874,x03875,x03876,x03877,x03878,x03879,x03880,x03881,x03882,x03883,x03884,x03885,x03886,x03887,x03888,x03889,x03890,x03891,x03892,x03893,x03894,x03895,x03896,x03897,x03898,x03899,x03900,x03901,x03902,x03903,x03904,x03905,x03906,x03907,x03908,x03909,x03910,x03911,x03912,x03913,x03914,x03915,x03916,x03917,x03918,x03919,x03920,x03921,x03922,x03923,x03924,x03925,x03926,x03927,x03928,x03929,x03930,x03931,x03932,x03933,x03934,x03935,x03936,x03937,x03938,x03939,x03940,x03941,x03942,x03943,x03944,x03945,x03946,x03947,x03948,x03949,x03950,x03951,x03952,x03953,x03954,x03955,x03956,x03957,x03958,x03959,x03960,x03961,x03962,x03963,x03964,x03965,x03966,x03967,x03968,x03969,x03970,x03971,x03972,x03973,x03974,x03975,x03976,x03977,x03978,x03979,x03980,x03981,x03982,x03983,x03984,x03985,x03986,x03987,x03988,x03989,x03990,x03991,x03992,x03993,x03994,x03995,x03996,x03997,x03998,x03999,x04000,x04001,x04002,x04003,x04004,x04005,x04006,x04007,x04008,x04009,x04010,x04011,x04012,x04013,x04014,x04015,x04016,x04017,x04018,x04019,x04020,x04021,x04022,x04023,x04024,x04025,x04026,x04027,x04028,x04029,x04030,x04031,x04032,x04033,x04034,x04035,x04036,x04037,x04038,x04039,x04040,x04041,x04042,x04043,x04044,x04045,x04046,x04047,x04048,x04049,x04050,x04051,x04052,x04053,x04054,x04055,x04056,x04057,x04058,x04059,x04060,x04061,x04062,x04063,x04064,x04065,x04066,x04067,x04068,x04069,x04070,x04071,x04072,x04073,x04074,x04075,x04076,x04077,x04078,x04079,x04080,x04081,x04082,x04083,x04084,x04085,x04086,x04087,x04088,x04089,x04090,x04091,x04092,x04093,x04094,x04095,x04096,x04097,x04098,x04099,x04100,x04101,x04102,x04103,x04104,x04105,x04106,x04107,x04108,x04109,x04110,x04111,x04112,x04113,x04114,x04115,x04116,x04117,x04118,x04119,x04120,x04121,x04122,x04123,x04124,x04125,x04126,x04127,x04128,x04129,x04130,x04131,x04132,x04133,x04134,x04135,x04136,x04137,x04138,x04139,x04140,x04141,x04142,x04143,x04144,x04145,x04146,x04147,x04148,x04149,x04150,x04151,x04152,x04153,x04154,x04155,x04156,x04157,x04158,x04159,x04160,x04161,x04162,x04163,x04164,x04165,x04166,x04167,x04168,x04169,x04170,x04171,x04172,x04173,x04174,x04175,x04176,x04177,x04178,x04179,x04180,x04181,x04182,x04183,x04184,x04185,x04186,x04187,x04188,x04189,x04190,x04191,x04192,x04193,x04194,x04195,x04196,x04197,x04198,x04199,x04200,x04201,x04202,x04203,x04204,x04205,x04206,x04207,x04208,x04209,x04210,x04211,x04212,x04213,x04214,x04215,x04216,x04217,x04218,x04219,x04220,x04221,x04222,x04223,x04224,x04225,x04226,x04227,x04228,x04229,x04230,x04231,x04232,x04233,x04234,x04235,x04236,x04237,x04238,x04239,x04240,x04241,x04242,x04243,x04244,x04245,x04246,x04247,x04248,x04249,x04250,x04251,x04252,x04253,x04254,x04255,x04256,x04257,x04258,x04259,x04260,x04261,x04262,x04263,x04264,x04265,x04266,x04267,x04268,x04269,x04270,x04271,x04272,x04273,x04274,x04275,x04276,x04277,x04278,x04279,x04280,x04281,x04282,x04283,x04284,x04285,x04286,x04287,x04288,x04289,x04290,x04291,x04292,x04293,x04294,x04295,x04296,x04297,x04298,x04299,x04300,x04301,x04302,x04303,x04304,x04305,x04306,x04307,x04308,x04309,x04310,x04311,x04312,x04313,x04314,x04315,x04316,x04317,x04318,x04319,x04320,x04321,x04322,x04323,x04324,x04325,x04326,x04327,x04328,x04329,x04330,x04331,x04332,x04333,x04334,x04335,x04336,x04337,x04338,x04339,x04340,x04341,x04342,x04343,x04344,x04345,x04346,x04347,x04348,x04349,x04350,x04351,x04352,x04353,x04354,x04355,x04356,x04357,x04358,x04359,x04360,x04361,x04362,x04363,x04364,x04365,x04366,x04367,x04368,x04369,x04370,x04371,x04372,x04373,x04374,x04375,x04376,x04377,x04378,x04379,x04380,x04381,x04382,x04383,x04384,x04385,x04386,x04387,x04388,x04389,x04390,x04391,x04392,x04393,x04394,x04395,x04396,x04397,x04398,x04399,x04400,x04401,x04402,x04403,x04404,x04405,x04406,x04407,x04408,x04409,x04410,x04411,x04412,x04413,x04414,x04415,x04416,x04417,x04418,x04419,x04420,x04421,x04422,x04423,x04424,x04425,x04426,x04427,x04428,x04429,x04430,x04431,x04432,x04433,x04434,x04435,x04436,x04437,x04438,x04439,x04440,x04441,x04442,x04443,x04444,x04445,x04446,x04447,x04448,x04449,x04450,x04451,x04452,x04453,x04454,x04455,x04456,x04457,x04458,x04459,x04460,x04461,x04462,x04463,x04464,x04465,x04466,x04467,x04468,x04469,x04470,x04471,x04472,x04473,x04474,x04475,x04476,x04477,x04478,x04479,x04480,x04481,x04482,x04483,x04484,x04485,x04486,x04487,x04488,x04489,x04490,x04491,x04492,x04493,x04494,x04495,x04496,x04497,x04498,x04499,x04500,x04501,x04502,x04503,x04504,x04505
+a,1.0000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+b,2.0000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+c,3.0000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(3, parser.Rows);
+        Assert.AreEqual(4507, parser.Columns);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseSpaceSeparatedWithoutCommas() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"0 0 0 3
+0 0 0 0
+0 0 0 0
+0 0 0 0
+0 0 0 0
+0 0 0 0");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseSpaceSeparatedWithoutCommasWithNames() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"x01 x02 x03 x04
+0 0 0 3
+0 0 0 0
+0 0 0 0
+0 0 0 0
+0 0 0 0
+0 0 0 0");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName, parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseWithColumnTypeConversionDE() {
+      // If first entry of a column can be parsed as a double we assume all values are doubles.
+      // However, if any of the following entries cannot be parsed as a double we convert the whole column to a string column.
+      // Special care needs to be taken with missing values, NaN (n.def.) and infinity values.
+      // We only support DE-DE and InvariantCulture number formats
+      string tempFileName = Path.GetTempFileName();
+      var deCultureInfo = CultureInfo.GetCultureInfo("DE-DE");
+      WriteToFile(tempFileName,
+      "str\tdbl\tdbl\tdbl" + Environment.NewLine +
+      "1,3\t1,3\t0\t3" + Environment.NewLine +
+      "1,3\t\t0\t0" + Environment.NewLine +
+      "s\t" + double.NaN.ToString(deCultureInfo) + "\t0\t0" + Environment.NewLine + // double.NaN might have a different string representation on different systems (even when using the same CultureInfo)
+      "s\t" + double.PositiveInfinity.ToString(deCultureInfo) + "\t0\t0" + Environment.NewLine +
+      "s\t" + double.NegativeInfinity.ToString(deCultureInfo) + "\t0\t0" + Environment.NewLine +
+      "s\t0\t0\t0");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName,
+          deCultureInfo.NumberFormat,
+          deCultureInfo.DateTimeFormat,
+          '\t',
+          true);
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.IsTrue(parser.Values[0] is List<string>);
+        Assert.IsTrue(parser.Values[1] is List<double>);
+        Assert.IsTrue(parser.Values[2] is List<double>);
+        Assert.IsTrue(parser.Values[3] is List<double>);
+        Assert.IsTrue(double.IsNaN((double)parser.Values[1][1])); // missing value
+        Assert.IsTrue(double.IsNaN((double)parser.Values[1][2]));
+        Assert.IsTrue(double.IsPositiveInfinity((double)parser.Values[1][3])); // NOTE: in DE-DE NumberFormat just "unendlich" is not allowed (compare with InvariantCulture)
+        Assert.IsTrue(double.IsNegativeInfinity((double)parser.Values[1][4]));
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseWithColumnTypeConversionInvariant() {
+      // see ParseWithColumnTypeConversionDE above
+      // same routine only using invariant culture
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+      @"str,dbl,dbl,dbl
+1.3,1.3,0,3
+1.3,,0,0
+s,NaN,0,0
+s,Infinity,0,0
+s,-Infinity,0,0
+s,0,0,0");
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName,
+          CultureInfo.InvariantCulture.NumberFormat,
+          CultureInfo.InvariantCulture.DateTimeFormat,
+          ',',
+          parser.AreColumnNamesInFirstLine(tempFileName));
+        Assert.AreEqual(6, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
+        Assert.IsTrue(parser.Values[0] is List<string>);
+        Assert.IsTrue(parser.Values[1] is List<double>);
+        Assert.IsTrue(parser.Values[2] is List<double>);
+        Assert.IsTrue(parser.Values[3] is List<double>);
+        Assert.IsTrue(double.IsNaN((double)parser.Values[1][1])); // missing value
+        Assert.IsTrue(double.IsNaN((double)parser.Values[1][2]));
+        Assert.IsTrue(double.IsPositiveInfinity((double)parser.Values[1][3])); // NOTE: in InvariantCulture +Infinity is not allowed (compare with DE-DE)
+        Assert.IsTrue(double.IsNegativeInfinity((double)parser.Values[1][4]));
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseWithTypeConversion() {
+      // the parser tries to determine the column type (double, datetime, string) by looking at the values in the first few rows
+      // if the values are of a different type then the type of the column is converted
+      {
+        // case 1 
+        // default for values is double and therefore a column with all missing values should be List<double> and contain NaN
+        var tmpFileName = Path.GetTempFileName();
+        WriteToFile(tmpFileName,
+          @"stringCol,note
+,missing val
+3.14,double
+");
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<double>);
+          Assert.AreEqual(double.NaN, parser.Values[0][0]);
+          Assert.AreEqual(3.14, parser.Values[0][1]);
+        }
+        finally {
+          File.Delete(tmpFileName);
+        }
+
+      }
+
+      {
+        // case 2
+        // 'The first missing values are replaced with double.NaN while the last ones with string.Empty.'
+
+        var tmpFileName = Path.GetTempFileName();
+        WriteToFile(tmpFileName,
+          @"stringCol,note
+,missing val
+3.14,
+,missing val
+str,a string --> column is converted to List<string>
+,missing val
+");
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<string>);
+          Assert.AreEqual(string.Empty, parser.Values[0][0]);
+          Assert.AreEqual("3.14", parser.Values[0][1]);
+          Assert.AreEqual(string.Empty, parser.Values[0][2]);
+          Assert.AreEqual("str", parser.Values[0][3]);
+          Assert.AreEqual(string.Empty, parser.Values[0][4]);
+        }
+        finally {
+          File.Delete(tmpFileName);
+        }
+      }
+
+      {
+        // case 3
+        // DateTime conversion to strings
+        var tmpFileName = Path.GetTempFileName();
+        WriteToFile(tmpFileName,
+          @"stringCol,note
+,missing val
+3.1.2016,
+,missing val
+str,a string --> column is converted to List<string>
+,missing val
+");
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<string>);
+          Assert.AreEqual(string.Empty, parser.Values[0][0]);
+          Assert.AreEqual("3.1.2016", parser.Values[0][1]);
+          Assert.AreEqual(string.Empty, parser.Values[0][2]);
+          Assert.AreEqual("str", parser.Values[0][3]);
+          Assert.AreEqual(string.Empty, parser.Values[0][4]);
+        }
+        finally {
+          File.Delete(tmpFileName);
+        }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseDateTime() {
+      {
+        // case 1 dates and datetimes should be parsed as datetime column
+        var tmpFileName = Path.GetTempFileName();
+        WriteToFile(tmpFileName,
+          @"stringCol,note
+19.6.2016,date
+19.6.2016 8:15,datetime 
+");
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.GetCultureInfo("de-de").NumberFormat,
+            CultureInfo.GetCultureInfo("de-de").DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<DateTime>);
+          Assert.AreEqual(new DateTime(2016, 6, 19), parser.Values[0][0]);
+          Assert.AreEqual(new DateTime(2016, 6, 19, 8, 15, 0), parser.Values[0][1]);
+
+          WriteToFile(tmpFileName,
+            @"stringCol,note
+2016/6/19,date
+2016/6/19 8:15,datetime 
+");
+
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<DateTime>);
+          Assert.AreEqual(new DateTime(2016, 6, 19), parser.Values[0][0]);
+          Assert.AreEqual(new DateTime(2016, 6, 19, 8, 15, 0), parser.Values[0][1]);
+        }
+
+        finally {
+          File.Delete(tmpFileName);
+        }
+      }
+
+      {
+        // case 2 never parse time values as datetimes
+        var tmpFileName = Path.GetTempFileName();
+        WriteToFile(tmpFileName,
+          @"stringCol,note
+8:15,time value
+9:40,time value
+");
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<string>); // time values should be parsed as strings
+          Assert.AreEqual("8:15", parser.Values[0][0]);
+          Assert.AreEqual("9:40", parser.Values[0][1]);
+        }
+        finally {
+          File.Delete(tmpFileName);
+        }
+      }
+    }
+
+
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void CheckTypeConversionAndLongFiles() {
+      {
+        // case 1 incorrect input after 500 rows should lead to exceptions
+        var tmpFileName = Path.GetTempFileName();
+        // create input data
+        var sb = new StringBuilder();
+        sb.AppendLine("col1,col2");
+        for (int r = 0; r < 2000; r++) {
+          sb.AppendLine("3.15, 3.15");
+        }
+        // add a row with only one input value
+        sb.AppendLine("3.15");
+
+        WriteToFile(tmpFileName, sb.ToString());
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          // Parse should fail with an exception
+          Assert.Fail("expected exception TableFileParser.DataFormatException");
+        }
+        catch (IOException) {
+          // ignore the expected exception
+        }
+
+        finally {
+          File.Delete(tmpFileName);
+        }
+      }
+      {
+        // case 2
+        var tmpFileName = Path.GetTempFileName();
+        // create input data
+        var sb = new StringBuilder();
+        sb.AppendLine("doubleCol,stringCol");
+        for (int r = 0; r < 2000; r++) {
+          sb.AppendLine("3.15, 3.15");
+        }
+        // add a row with a string value --> the column should be converted to string
+        sb.AppendLine("3.15,str");
+
+        WriteToFile(tmpFileName, sb.ToString());
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<double>);
+          Assert.IsTrue(parser.Values[1] is List<string>);
+          Assert.AreEqual(parser.Values[1][0], "3.15");
+          Assert.AreEqual(parser.Values[1][2000], "str");
+        }
+
+        finally {
+          File.Delete(tmpFileName);
+        }
+      }
+    }
+
+    private void WriteToFile(string fileName, string content) {
+      using (StreamWriter writer = new StreamWriter(fileName)) {
+        writer.Write(content);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.LinearAssignment-3.3/LinearAssignmentProblemSolverTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.LinearAssignment-3.3/LinearAssignmentProblemSolverTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.LinearAssignment-3.3/LinearAssignmentProblemSolverTest.cs	(revision 16038)
@@ -0,0 +1,73 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.LinearAssignment.Tests {
+  /// <summary>
+  ///This is a test class for LinearAssignmentProblemSolverTest and is intended
+  ///to contain all LinearAssignmentProblemSolverTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class LinearAssignmentProblemSolverTest {
+    /// <summary>
+    ///A test for Solve
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.Assignment")]
+    [TestProperty("Time", "short")]
+    public void SolveTest() {
+      double[,] costs = new double[,] {
+        {  5,  9,  3,  6 },
+        {  8,  7,  8,  2 },
+        {  6, 10, 12,  7 },
+        {  3, 10,  8,  6 }};
+      double quality;
+      Permutation p;
+      p = new Permutation(PermutationTypes.Absolute, LinearAssignmentProblemSolver.Solve(new DoubleMatrix(costs), out quality));
+      Assert.AreEqual(18, quality);
+      Assert.IsTrue(p.Validate());
+
+      costs = new double[,] {
+        { 11,  7, 10, 17, 10 },
+        { 13, 21,  7, 11, 13 },
+        { 13, 13, 15, 13, 14 },
+        { 18, 10, 13, 16, 14 },
+        { 12,  8, 16, 19, 10 }};
+
+      p = new Permutation(PermutationTypes.Absolute, LinearAssignmentProblemSolver.Solve(new DoubleMatrix(costs), out quality));
+      Assert.AreEqual(51, quality);
+      Assert.IsTrue(p.Validate());
+
+      costs = new double[,] {
+        {  3,  1,  1,  4 },
+        {  4,  2,  2,  5 },
+        {  5,  3,  4,  8 },
+        {  4,  2,  5,  9 }};
+
+      p = new Permutation(PermutationTypes.Absolute, LinearAssignmentProblemSolver.Solve(new DoubleMatrix(costs), out quality));
+      Assert.AreEqual(13, quality);
+      Assert.IsTrue(p.Validate());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.PTSP-3.3/PTSPMoveEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.PTSP-3.3/PTSPMoveEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.PTSP-3.3/PTSPMoveEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,128 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.PTSP.Tests {
+  /// <summary>
+  ///This is a test class for PTSP move evaluators
+  ///</summary>
+  [TestClass()]
+  public class PTSPMoveEvaluatorTest {
+    private const int ProblemSize = 10;
+    private const int RealizationsSize = 100;
+    private static DoubleMatrix coordinates;
+    private static DistanceMatrix distances;
+    private static Permutation tour;
+    private static MersenneTwister random;
+    private static ItemList<BoolArray> realizations;
+    private static DoubleArray probabilities;
+
+    [ClassInitialize]
+    public static void MyClassInitialize(TestContext testContext) {
+      random = new MersenneTwister();
+      coordinates = new DoubleMatrix(ProblemSize, 2);
+      distances = new DistanceMatrix(ProblemSize, ProblemSize);
+      for (var i = 0; i < ProblemSize; i++) {
+        coordinates[i, 0] = random.Next(ProblemSize * 10);
+        coordinates[i, 1] = random.Next(ProblemSize * 10);
+      }
+      for (var i = 0; i < ProblemSize - 1; i++) {
+        for (var j = i + 1; j < ProblemSize; j++) {
+          distances[i, j] = Math.Round(Math.Sqrt(Math.Pow(coordinates[i, 0] - coordinates[j, 0], 2) + Math.Pow(coordinates[i, 1] - coordinates[j, 1], 2)));
+          distances[j, i] = distances[i, j];
+        }
+      }
+
+      probabilities = new DoubleArray(ProblemSize);
+      for (var i = 0; i < ProblemSize; i++) {
+        probabilities[i] = random.NextDouble();
+      }
+
+      realizations = new ItemList<BoolArray>(RealizationsSize);
+      for (var i = 0; i < RealizationsSize; i++) {
+        var countOnes = 0;
+        var newRealization = new BoolArray(ProblemSize);
+        while (countOnes < 4) { //only generate realizations with at least 4 cities visited
+          countOnes = 0;
+          for (var j = 0; j < ProblemSize; j++) {
+            newRealization[j] = random.NextDouble() < probabilities[j];
+            if (newRealization[j]) countOnes++;
+          }
+        }
+        realizations.Add(newRealization);
+      }
+
+      tour = new Permutation(PermutationTypes.RelativeUndirected, ProblemSize, random);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.ProbabilisticTravelingSalesman")]
+    [TestProperty("Time", "short")]
+    public void InversionMoveEvaluatorTest() {
+      Func<int, int, double> distance = (a, b) => distances[a, b];
+      double variance;
+      var beforeMatrix = EstimatedProbabilisticTravelingSalesmanProblem.Evaluate(tour, distance, realizations, out variance);
+
+      for (var i = 0; i < 500; i++) {
+        var move = StochasticInversionSingleMoveGenerator.Apply(tour, random);
+        var moveMatrix = PTSPEstimatedInversionMoveEvaluator.EvaluateMove(tour, move, distance, realizations);
+        InversionManipulator.Apply(tour, move.Index1, move.Index2);
+        var afterMatrix = EstimatedProbabilisticTravelingSalesmanProblem.Evaluate(tour, distance, realizations, out variance);
+
+        Assert.IsTrue(Math.Abs(moveMatrix).IsAlmost(Math.Abs(afterMatrix - beforeMatrix)),
+          string.Format(@"Inversion move is calculated with quality {0}, but actual difference is {4}.
+The move would invert the tour {1} between values {2} and {3}.",
+          moveMatrix, tour, tour[move.Index1], tour[move.Index2], Math.Abs(afterMatrix - beforeMatrix)));
+
+        beforeMatrix = afterMatrix;
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.ProbabilisticTravelingSalesman")]
+    [TestProperty("Time", "short")]
+    public void InsertionMoveEvaluatorTest() {
+      Func<int, int, double> distance = (a, b) => distances[a, b];
+      double variance;
+      var beforeMatrix = EstimatedProbabilisticTravelingSalesmanProblem.Evaluate(tour, distance, realizations, out variance);
+      for (var i = 0; i < 500; i++) {
+        var move = StochasticTranslocationSingleMoveGenerator.Apply(tour, random);
+        var moveMatrix = PTSPEstimatedInsertionMoveEvaluator.EvaluateMove(tour, move, distance, realizations);
+        TranslocationManipulator.Apply(tour, move.Index1, move.Index1, move.Index3);
+        var afterMatrix = EstimatedProbabilisticTravelingSalesmanProblem.Evaluate(tour, distance, realizations, out variance);
+
+        Assert.IsTrue(Math.Abs(moveMatrix).IsAlmost(Math.Abs(afterMatrix - beforeMatrix)),
+          string.Format(@"Insertion move is calculated with quality {0}, but actual difference is {4}.
+The move would invert the tour {1} between values {2} and {3}.",
+          moveMatrix, tour, tour[move.Index1], tour[move.Index2], Math.Abs(afterMatrix - beforeMatrix)));
+
+        beforeMatrix = afterMatrix;
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.QuadraticAssignment-3.3/QAPLIBInstancesTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.QuadraticAssignment-3.3/QAPLIBInstancesTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.QuadraticAssignment-3.3/QAPLIBInstancesTest.cs	(revision 16038)
@@ -0,0 +1,252 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 System.Text;
+using HeuristicLab.Problems.Instances.QAPLIB;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.QuadraticAssignment.Tests {
+  [TestClass]
+  public class QAPLIBInstancesTest {
+    #region instances
+    private static Dictionary<string, double> qaplibInstances = new Dictionary<string, double>() {
+      { "bur26a", 5426670 },
+      { "bur26b", 3817852 },
+      { "bur26c", 5426795 },
+      { "bur26d", 3821225 },
+      { "bur26e", 5386879 },
+      { "bur26f", 3782044 },
+      { "bur26g", 10117172 },
+      { "bur26h", 7098658 },
+      { "chr12a", 9552 },
+      { "chr12b", 9742 },
+      { "chr12c", 11156 },
+      { "chr15a", 9896 },
+      { "chr15b", 7990 },
+      { "chr15c", 9504 },
+      { "chr18a", 11098 },
+      { "chr18b", 1534 },
+      { "chr20a", 2192 },
+      { "chr20b", 2298 },
+      { "chr20c", 14142 },
+      { "chr22a", 6156 },
+      { "chr22b", 6194 },
+      { "chr25a", 3796 },
+      { "els19", 17212548 },
+      { "esc16a", 68 },
+      { "esc16b", 292 },
+      { "esc16c", 160 },
+      { "esc16d", 16 },
+      { "esc16e", 28 },
+      { "esc16f", 0 },
+      { "esc16g", 26 },
+      { "esc16h", 996 },
+      { "esc16i", 14 },
+      { "esc16j", 8 },
+      { "esc32a", 130 },
+      { "esc32b", 168 },
+      { "esc32c", 642 },
+      { "esc32d", 200 },
+      { "esc32e", 2 },
+      { "esc32f", 2 },
+      { "esc32g", 6 },
+      { "esc32h", 438 },
+      { "esc64", 116 },
+      { "esc128", 64 },
+      { "had12", 1652 },
+      { "had14", 2724 },
+      { "had16", 3720 },
+      { "had18", 5358 },
+      { "had20", 6922 },
+      { "kra30a", 88900 },
+      { "kra30b", 91420 },
+      { "kra32", 88700 },
+      { "lipa20a", 3683 },
+      { "lipa20b", 27076 },
+      { "lipa30a", 13178 },
+      { "lipa30b", 151426 },
+      { "lipa40a", 31538 },
+      { "lipa40b", 476581 },
+      { "lipa50a", 62093 },
+      { "lipa50b", 1210244 },
+      { "lipa60a", 107218 },
+      { "lipa60b", 2520135 },
+      { "lipa70a", 169755 },
+      { "lipa70b", 4603200 },
+      { "lipa80a", 253195 },
+      { "lipa80b", 7763962 },
+      { "lipa90a", 360630 },
+      { "lipa90b", 12490441 },
+      { "nug12", 578 },
+      { "nug14", 1014 },
+      { "nug15", 1150 },
+      { "nug16a", 1610 },
+      { "nug16b", 1240 },
+      { "nug17", 1732 },
+      { "nug18", 1930 },
+      { "nug20", 2570 },
+      { "nug21", 2438 },
+      { "nug22", 3596 },
+      { "nug24", 3488 },
+      { "nug25", 3744 },
+      { "nug27", 5234 },
+      { "nug28", 5166 },
+      { "nug30", 6124 },
+      { "rou12", 235528 },
+      { "rou15", 354210 },
+      { "rou20", 725522 },
+      { "scr12", 31410 },
+      { "scr15", 51140 },
+      { "scr20", 110030 },
+      { "sko42", 15812 },
+      { "sko49", 23386 },
+      { "sko56", 34458 },
+      { "sko64", 48498 },
+      { "sko72", 66256 },
+      { "sko81", 90998 },
+      { "sko90", 115534 },
+      { "sko100a", 152002 },
+      { "sko100b", 153890 },
+      { "sko100c", 147862 },
+      { "sko100d", 149576 },
+      { "sko100e", 149150 },
+      { "sko100f", 149036 },
+      { "ste36a", 9526 },
+      { "ste36b", 15852 },
+      { "ste36c", 8239110 },
+      { "tai12a", 224416 },
+      { "tai12b", 39464925 },
+      { "tai15a", 388214 },
+      { "tai15b", 51765268 },
+      { "tai17a", 491812 },
+      { "tai20a", 703482 },
+      { "tai20b", 122455319 },
+      { "tai25a", 1167256 },
+      { "tai25b", 344355646 },
+      { "tai30a", 1818146 },
+      { "tai30b", 637117113 },
+      { "tai35a", 2422002 },
+      { "tai35b", 283315445 },
+      { "tai40a", 3139370 },
+      { "tai40b", 637250948 },
+      { "tai50a", 4938796 },
+      { "tai50b", 458821517 },
+      { "tai60a", 7208572  },
+      { "tai60b", 608215054 },
+      { "tai64c", 1855928 },
+      { "tai80a", 13557864 },
+      { "tai80b", 818415043 },
+      { "tai100a", 21052466 },
+      { "tai100b", 1185996137 },
+      { "tai150b", 498896643 },
+      { "tai256c", 44759294 },
+      { "tho30", 149936 },
+      { "tho40", 240516 },
+      { "tho150", 8133398 },
+      { "wil50", 48816 },
+      { "wil100", 273038 }
+    };
+    private static Dictionary<string, double> lowerBounds = new Dictionary<string, double>() {
+      { "bur26a", 5315200 },
+      { "bur26f", 3706888 },
+      { "chr25a", 2765 },
+      { "els19", 11971949 },
+      { "esc32a", 35 },
+      { "esc32e", 0 },
+      { "had20", 6166 },
+      { "kra32", 67390 },
+      { "lipa50a", 62020 },
+      { "lipa50b", 1210244 },
+      { "nug30", 4539 },
+      { "scr20", 86766 },
+      { "sko42", 11311 },
+      { "tai35a", 1951207 },
+      { "tai35b", 30866283 },
+      { "tai100a", 15824355 }
+    };
+    #endregion
+
+    [TestMethod]
+    [TestCategory("Problems.Assignment")]
+    [TestProperty("Time", "long")]
+    public void TestQAPLIBInstances() {
+      var provider = new QAPLIBInstanceProvider();
+      var qap = new QuadraticAssignmentProblem();
+      var failedInstances = new StringBuilder();
+
+      var instances = provider.GetDataDescriptors();
+      Assert.IsTrue(instances.Any(), "No instances could be found.");
+
+      foreach (var instance in instances) {
+        try {
+          qap.Load(provider.LoadData(instance));
+        } catch (Exception ex) {
+          failedInstances.AppendLine(instance + ": " + ex.Message);
+        }
+      }
+      Assert.IsTrue(failedInstances.Length == 0, "Following instances failed: " + Environment.NewLine + failedInstances.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Assignment")]
+    [TestProperty("Time", "long")]
+    public void TestQAPLIBSolutions() {
+      var provider = new QAPLIBInstanceProvider();
+      var qap = new QuadraticAssignmentProblem();
+      var failedInstances = new StringBuilder();
+
+      var instances = provider.GetDataDescriptors();
+      Assert.IsTrue(instances.Any(), "No instances could be found.");
+
+      foreach (var instance in instances) {
+        qap.Load(provider.LoadData(instance));
+        if (qaplibInstances.ContainsKey(instance.Name)
+          && qap.BestKnownQuality != null && qap.BestKnownQuality.Value != qaplibInstances[instance.Name])
+          failedInstances.AppendLine(instance.Name + ": " + qap.BestKnownQuality.Value.ToString() + " vs " + qaplibInstances[instance.Name]);
+      }
+      Assert.IsTrue(failedInstances.Length == 0, "Following instances/solutions have suspicious best quality: " + Environment.NewLine + failedInstances.ToString());
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Assignment")]
+    [TestProperty("Time", "short")]
+    public void TestQAPLIBLowerBounds() {
+      var provider = new QAPLIBInstanceProvider();
+      var qap = new QuadraticAssignmentProblem();
+      var failedInstances = new StringBuilder();
+
+      var instances = provider.GetDataDescriptors();
+      Assert.IsTrue(instances.Any(), "No instances could be found.");
+
+      foreach (var instance in instances) {
+        if (lowerBounds.ContainsKey(instance.Name)) {
+          qap.Load(provider.LoadData(instance));
+          if (qap.LowerBound.Value != lowerBounds[instance.Name])
+            failedInstances.AppendLine(instance.Name + ": The Gilmore-Lawler lower bound is not valid.");
+        }
+      }
+      Assert.IsTrue(failedInstances.Length == 0, "Following instances failed for the GLB calculation: " + Environment.NewLine + failedInstances.ToString());
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.QuadraticAssignment-3.3/QAPMoveEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.QuadraticAssignment-3.3/QAPMoveEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.QuadraticAssignment-3.3/QAPMoveEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,266 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 HeuristicLab.Common;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.QuadraticAssignment.Tests {
+  /// <summary>
+  ///This is a test class for the QAP move evaluators
+  ///</summary>
+  [TestClass()]
+  public class QAPSwapMoveEvaluatorTest {
+    private const int ProblemSize = 10;
+    private static DoubleMatrix symmetricDistances, symmetricWeights, asymmetricDistances, asymmetricWeights, nonZeroDiagonalWeights, nonZeroDiagonalDistances;
+    private static Permutation assignment;
+    private static MersenneTwister random;
+
+    private TestContext testContextInstance;
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get { return testContextInstance; }
+      set { testContextInstance = value; }
+    }
+
+    [ClassInitialize]
+    public static void MyClassInitialize(TestContext testContext) {
+      random = new MersenneTwister();
+      symmetricDistances = new DoubleMatrix(ProblemSize, ProblemSize);
+      symmetricWeights = new DoubleMatrix(ProblemSize, ProblemSize);
+      asymmetricDistances = new DoubleMatrix(ProblemSize, ProblemSize);
+      asymmetricWeights = new DoubleMatrix(ProblemSize, ProblemSize);
+      nonZeroDiagonalDistances = new DoubleMatrix(ProblemSize, ProblemSize);
+      nonZeroDiagonalWeights = new DoubleMatrix(ProblemSize, ProblemSize);
+      for (int i = 0; i < ProblemSize - 1; i++) {
+        for (int j = i + 1; j < ProblemSize; j++) {
+          symmetricDistances[i, j] = random.Next(ProblemSize * 100);
+          symmetricDistances[j, i] = symmetricDistances[i, j];
+          symmetricWeights[i, j] = random.Next(ProblemSize * 100);
+          symmetricWeights[j, i] = symmetricWeights[i, j];
+          asymmetricDistances[i, j] = random.Next(ProblemSize * 100);
+          asymmetricDistances[j, i] = random.Next(ProblemSize * 100);
+          asymmetricWeights[i, j] = random.Next(ProblemSize * 100);
+          asymmetricWeights[j, i] = random.Next(ProblemSize * 100);
+          nonZeroDiagonalDistances[i, j] = random.Next(ProblemSize * 100);
+          nonZeroDiagonalDistances[j, i] = random.Next(ProblemSize * 100);
+          nonZeroDiagonalWeights[i, j] = random.Next(ProblemSize * 100);
+          nonZeroDiagonalWeights[j, i] = random.Next(ProblemSize * 100);
+        }
+        nonZeroDiagonalDistances[i, i] = random.Next(ProblemSize * 100);
+        nonZeroDiagonalWeights[i, i] = random.Next(ProblemSize * 100);
+      }
+      int index = random.Next(ProblemSize);
+      if (nonZeroDiagonalDistances[index, index] == 0)
+        nonZeroDiagonalDistances[index, index] = random.Next(1, ProblemSize * 100);
+      index = random.Next(ProblemSize);
+      if (nonZeroDiagonalWeights[index, index] == 0)
+        nonZeroDiagonalWeights[index, index] = random.Next(1, ProblemSize * 100);
+      assignment = new Permutation(PermutationTypes.Absolute, ProblemSize, random);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Assignment")]
+    [TestProperty("Time", "short")]
+    public void Swap2MoveEvaluatorFastEvaluationTest() {
+
+      for (int i = 0; i < 500; i++) {
+        Swap2Move lastMove = new Swap2Move(random.Next(ProblemSize), random.Next(ProblemSize));
+        Permutation prevAssignment = (Permutation)assignment.Clone();
+        Swap2Manipulator.Apply(assignment, lastMove.Index1, lastMove.Index2);
+        Permutation nextAssignment = (Permutation)assignment.Clone();
+        Swap2Move currentMove = new Swap2Move(random.Next(ProblemSize), random.Next(ProblemSize));
+        Swap2Manipulator.Apply(nextAssignment, currentMove.Index1, currentMove.Index2);
+
+        double moveBefore = QAPSwap2MoveEvaluator.Apply(prevAssignment, currentMove, symmetricWeights, symmetricDistances);
+        double moveAfter = QAPSwap2MoveEvaluator.Apply(assignment, currentMove,
+                moveBefore, symmetricWeights, symmetricDistances, lastMove);
+        double before = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
+        double after = QAPEvaluator.Apply(nextAssignment, symmetricWeights, symmetricDistances);
+
+        Assert.IsTrue(moveAfter.IsAlmost(after - before), "Failed on symmetric matrices: " + Environment.NewLine
+          + "Quality changed from " + before + " to " + after + " (" + (after - before).ToString() + "), but move quality change was " + moveAfter + ".");
+
+        moveBefore = QAPSwap2MoveEvaluator.Apply(prevAssignment, currentMove, asymmetricWeights, asymmetricDistances);
+        moveAfter = QAPSwap2MoveEvaluator.Apply(assignment, currentMove,
+                moveBefore, asymmetricWeights, asymmetricDistances, lastMove);
+        before = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        after = QAPEvaluator.Apply(nextAssignment, asymmetricWeights, asymmetricDistances);
+
+        Assert.IsTrue(moveAfter.IsAlmost(after - before), "Failed on asymmetric matrices: " + Environment.NewLine
+          + "Quality changed from " + before + " to " + after + " (" + (after - before).ToString() + "), but move quality change was " + moveAfter + ".");
+
+        moveBefore = QAPSwap2MoveEvaluator.Apply(prevAssignment, currentMove, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        moveAfter = QAPSwap2MoveEvaluator.Apply(assignment, currentMove,
+                moveBefore, nonZeroDiagonalWeights, nonZeroDiagonalDistances, lastMove);
+        before = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        after = QAPEvaluator.Apply(nextAssignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+
+        Assert.IsTrue(moveAfter.IsAlmost(after - before), "Failed on non-zero diagonal matrices: " + Environment.NewLine
+          + "Quality changed from " + before + " to " + after + " (" + (after - before).ToString() + "), but move quality change was " + moveAfter + ".");
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Assignment")]
+    [TestProperty("Time", "short")]
+    public void Swap2MoveEvaluatorTest() {
+      for (int i = 0; i < 500; i++) {
+        int index1 = random.Next(ProblemSize);
+        int index2 = random.Next(ProblemSize);
+
+        // SYMMETRIC MATRICES
+        double before = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
+        Swap2Manipulator.Apply(assignment, index1, index2);
+        double after = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
+        double move = QAPSwap2MoveEvaluator.Apply(assignment, new Swap2Move(index1, index2, assignment), symmetricWeights, symmetricDistances);
+        Assert.IsTrue(move.IsAlmost(before - after), "Failed on symmetric matrices");
+
+        // ASYMMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        Permutation clone = (Permutation)assignment.Clone();
+        Swap2Manipulator.Apply(assignment, index1, index2);
+        after = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        move = QAPSwap2MoveEvaluator.Apply(clone, new Swap2Move(index1, index2), asymmetricWeights, asymmetricDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on asymmetric matrices");
+
+        // NON-ZERO DIAGONAL ASSYMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        clone = (Permutation)assignment.Clone();
+        Swap2Manipulator.Apply(assignment, index1, index2);
+        after = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        move = QAPSwap2MoveEvaluator.Apply(clone, new Swap2Move(index1, index2), nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on non-zero diagonal matrices");
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Assignment")]
+    [TestProperty("Time", "short")]
+    public void InversionMoveEvaluatorTest() {
+      for (int i = 0; i < 500; i++) {
+        int index1 = random.Next(ProblemSize);
+        int index2 = random.Next(ProblemSize);
+        if (index1 > index2) { int h = index1; index1 = index2; index2 = h; }
+
+        // SYMMETRIC MATRICES
+        double before = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
+        InversionManipulator.Apply(assignment, Math.Min(index1, index2), Math.Max(index1, index2));
+        double after = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
+        double move = QAPInversionMoveEvaluator.Apply(assignment, new InversionMove(index1, index2, assignment), symmetricWeights, symmetricDistances);
+        Assert.IsTrue(move.IsAlmost(before - after), "Failed on symmetric matrices");
+
+        // ASYMMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        Permutation clone = (Permutation)assignment.Clone();
+        InversionManipulator.Apply(assignment, index1, index2);
+        after = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        move = QAPInversionMoveEvaluator.Apply(clone, new InversionMove(index1, index2), asymmetricWeights, asymmetricDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on asymmetric matrices");
+
+        // NON-ZERO DIAGONAL ASYMMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        clone = (Permutation)assignment.Clone();
+        InversionManipulator.Apply(assignment, index1, index2);
+        after = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        move = QAPInversionMoveEvaluator.Apply(clone, new InversionMove(index1, index2), nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on non-zero diagonal matrices");
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Assignment")]
+    [TestProperty("Time", "short")]
+    public void TranslocationMoveEvaluatorTest() {
+      for (int i = 0; i < 500; i++) {
+        int index1 = random.Next(assignment.Length - 1);
+        int index2 = random.Next(index1 + 1, assignment.Length);
+        int insertPointLimit = assignment.Length - index2 + index1 - 1;  // get insertion point in remaining part
+        int insertPoint;
+        if (insertPointLimit > 0)
+          insertPoint = random.Next(insertPointLimit);
+        else
+          insertPoint = 0;
+
+        // SYMMETRIC MATRICES
+        double before = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
+        Permutation clone = new Cloner().Clone(assignment);
+        TranslocationManipulator.Apply(assignment, index1, index2, insertPoint);
+        double after = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
+        double move = QAPTranslocationMoveEvaluator.Apply(clone, new TranslocationMove(index1, index2, insertPoint, assignment), symmetricWeights, symmetricDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on symmetric matrices");
+
+        // ASYMMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        clone = new Cloner().Clone(assignment);
+        TranslocationManipulator.Apply(assignment, index1, index2, insertPoint);
+        after = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        move = QAPTranslocationMoveEvaluator.Apply(clone, new TranslocationMove(index1, index2, insertPoint, assignment), asymmetricWeights, asymmetricDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on asymmetric matrices");
+
+        // NON-ZERO DIAGONAL ASYMMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        clone = new Cloner().Clone(assignment);
+        TranslocationManipulator.Apply(assignment, index1, index2, insertPoint);
+        after = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        move = QAPTranslocationMoveEvaluator.Apply(clone, new TranslocationMove(index1, index2, insertPoint, assignment), nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on non-zero diagonal matrices");
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Assignment")]
+    [TestProperty("Time", "short")]
+    public void ScrambleMoveEvaluatorTest() {
+      for (int i = 0; i < 500; i++) {
+        ScrambleMove scramble = StochasticScrambleMultiMoveGenerator.GenerateRandomMove(assignment, random);
+
+        // SYMMETRIC MATRICES
+        double before = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
+        double move = QAPScrambleMoveEvaluator.Apply(assignment, scramble, symmetricWeights, symmetricDistances);
+        ScrambleManipulator.Apply(assignment, scramble.StartIndex, scramble.ScrambledIndices);
+        double after = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on symmetric matrices");
+
+        // ASYMMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        move = QAPScrambleMoveEvaluator.Apply(assignment, scramble, asymmetricWeights, asymmetricDistances);
+        ScrambleManipulator.Apply(assignment, scramble.StartIndex, scramble.ScrambledIndices);
+        after = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on asymmetric matrices");
+
+        // NON-ZERO DIAGONAL ASYMMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        move = QAPScrambleMoveEvaluator.Apply(assignment, scramble, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        ScrambleManipulator.Apply(assignment, scramble.StartIndex, scramble.ScrambledIndices);
+        after = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on non-zero diagonal matrices");
+      }
+    }
+
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/AckleyEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/AckleyEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/AckleyEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.RealVectorEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.Tests {
+  /// <summary>
+  ///This is a test class for AckleyEvaluatorTest and is intended
+  ///to contain all AckleyEvaluatorTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class AckleyEvaluatorTest {
+    /// <summary>
+    ///A test for EvaluateFunction
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions")]
+    [TestProperty("Time", "short")]
+    public void AckleyEvaluateFunctionTest() {
+      AckleyEvaluator target = new AckleyEvaluator();
+      RealVector point = null;
+      double expected = target.BestKnownQuality;
+      double actual;
+      for (int dimension = target.MinimumProblemSize; dimension <= System.Math.Min(10, target.MaximumProblemSize); dimension++) {
+        point = target.GetBestKnownSolution(dimension);
+        actual = target.Evaluate(point);
+        Assert.AreEqual(expected, actual);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/BealeEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/BealeEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/BealeEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.RealVectorEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.Tests {
+  /// <summary>
+  ///This is a test class for BealeEvaluatorTest and is intended
+  ///to contain all BealeEvaluatorTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class BealeEvaluatorTest {
+    /// <summary>
+    ///A test for EvaluateFunction
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions")]
+    [TestProperty("Time", "short")]
+    public void BealeEvaluateFunctionTest() {
+      BealeEvaluator target = new BealeEvaluator();
+      RealVector point = null;
+      double expected = target.BestKnownQuality;
+      double actual;
+      for (int dimension = target.MinimumProblemSize; dimension <= System.Math.Min(10, target.MaximumProblemSize); dimension++) {
+        point = target.GetBestKnownSolution(dimension);
+        actual = target.Evaluate(point);
+        Assert.AreEqual(expected, actual);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/BoothEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/BoothEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/BoothEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.RealVectorEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.Tests {
+  /// <summary>
+  ///This is a test class for BoothEvaluatorTest and is intended
+  ///to contain all BoothEvaluatorTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class BoothEvaluatorTest {
+    /// <summary>
+    ///A test for EvaluateFunction
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions")]
+    [TestProperty("Time", "short")]
+    public void BoothEvaluateFunctionTest() {
+      BoothEvaluator target = new BoothEvaluator();
+      RealVector point = null;
+      double expected = target.BestKnownQuality;
+      double actual;
+      for (int dimension = target.MinimumProblemSize; dimension <= System.Math.Min(10, target.MaximumProblemSize); dimension++) {
+        point = target.GetBestKnownSolution(dimension);
+        actual = target.Evaluate(point);
+        Assert.AreEqual(expected, actual);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/GriewankEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/GriewankEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/GriewankEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.RealVectorEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.Tests {
+  /// <summary>
+  ///This is a test class for GriewankEvaluatorTest and is intended
+  ///to contain all GriewankEvaluatorTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class GriewankEvaluatorTest {
+    /// <summary>
+    ///A test for EvaluateFunction
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions")]
+    [TestProperty("Time", "short")]
+    public void GriewankEvaluateFunctionTest() {
+      GriewankEvaluator target = new GriewankEvaluator();
+      RealVector point = null;
+      double expected = target.BestKnownQuality;
+      double actual;
+      for (int dimension = target.MinimumProblemSize; dimension <= System.Math.Min(10, target.MaximumProblemSize); dimension++) {
+        point = target.GetBestKnownSolution(dimension);
+        actual = target.Evaluate(point);
+        Assert.AreEqual(expected, actual);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/LevyEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/LevyEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/LevyEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.RealVectorEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.Tests {
+  /// <summary>
+  ///This is a test class for LevyEvaluatorTest and is intended
+  ///to contain all LevyEvaluatorTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class LevyEvaluatorTest {
+    /// <summary>
+    ///A test for EvaluateFunction
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions")]
+    [TestProperty("Time", "short")]
+    public void LevyEvaluateFunctionTest() {
+      LevyEvaluator target = new LevyEvaluator();
+      RealVector point = null;
+      double expected = target.BestKnownQuality;
+      double actual;
+      for (int dimension = target.MinimumProblemSize; dimension <= System.Math.Min(10, target.MaximumProblemSize); dimension++) {
+        point = target.GetBestKnownSolution(dimension);
+        actual = target.Evaluate(point);
+        Assert.AreEqual(expected, actual);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/MatyasEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/MatyasEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/MatyasEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.RealVectorEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.Tests {
+  /// <summary>
+  ///This is a test class for MatyasEvaluatorTest and is intended
+  ///to contain all MatyasEvaluatorTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class MatyasEvaluatorTest {
+    /// <summary>
+    ///A test for EvaluateFunction
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions")]
+    [TestProperty("Time", "short")]
+    public void MatyasEvaluateFunctionTest() {
+      MatyasEvaluator target = new MatyasEvaluator();
+      RealVector point = null;
+      double expected = target.BestKnownQuality;
+      double actual;
+      for (int dimension = target.MinimumProblemSize; dimension <= System.Math.Min(10, target.MaximumProblemSize); dimension++) {
+        point = target.GetBestKnownSolution(dimension);
+        actual = target.Evaluate(point);
+        Assert.AreEqual(expected, actual);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/RastriginEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/RastriginEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/RastriginEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.RealVectorEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.Tests {
+  /// <summary>
+  ///This is a test class for RastriginEvaluatorTest and is intended
+  ///to contain all RastriginEvaluatorTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class RastriginEvaluatorTest {
+    /// <summary>
+    ///A test for EvaluateFunction
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions")]
+    [TestProperty("Time", "short")]
+    public void RastriginEvaluateFunctionTest() {
+      RastriginEvaluator target = new RastriginEvaluator();
+      RealVector point = null;
+      double expected = target.BestKnownQuality;
+      double actual;
+      for (int dimension = target.MinimumProblemSize; dimension <= System.Math.Min(10, target.MaximumProblemSize); dimension++) {
+        point = target.GetBestKnownSolution(dimension);
+        actual = target.Evaluate(point);
+        Assert.AreEqual(expected, actual);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/RosenbrockEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/RosenbrockEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/RosenbrockEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.RealVectorEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.Tests {
+  /// <summary>
+  ///This is a test class for RosenbrockEvaluatorTest and is intended
+  ///to contain all RosenbrockEvaluatorTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class RosenbrockEvaluatorTest {
+    /// <summary>
+    ///A test for EvaluateFunction
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions")]
+    [TestProperty("Time", "short")]
+    public void RosenbrockEvaluateFunctionTest() {
+      RosenbrockEvaluator target = new RosenbrockEvaluator();
+      RealVector point = null;
+      double expected = target.BestKnownQuality;
+      double actual;
+      for (int dimension = target.MinimumProblemSize; dimension <= System.Math.Min(10, target.MaximumProblemSize); dimension++) {
+        point = target.GetBestKnownSolution(dimension);
+        actual = target.Evaluate(point);
+        Assert.AreEqual(expected, actual);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/SphereEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/SphereEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/SphereEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.RealVectorEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.Tests {
+  /// <summary>
+  ///This is a test class for SphereEvaluatorTest and is intended
+  ///to contain all SphereEvaluatorTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class SphereEvaluatorTest {
+    /// <summary>
+    ///A test for EvaluateFunction
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions")]
+    [TestProperty("Time", "short")]
+    public void SphereEvaluateFunctionTest() {
+      SphereEvaluator target = new SphereEvaluator();
+      RealVector point = null;
+      double expected = target.BestKnownQuality;
+      double actual;
+      for (int dimension = target.MinimumProblemSize; dimension <= System.Math.Min(10, target.MaximumProblemSize); dimension++) {
+        point = target.GetBestKnownSolution(dimension);
+        actual = target.Evaluate(point);
+        Assert.AreEqual(expected, actual);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/SumSquaresEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/SumSquaresEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/SumSquaresEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.RealVectorEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.Tests {
+  /// <summary>
+  ///This is a test class for SumSquaresEvaluatorTest and is intended
+  ///to contain all SumSquaresEvaluatorTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class SumSquaresEvaluatorTest {
+    /// <summary>
+    ///A test for EvaluateFunction
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions")]
+    [TestProperty("Time", "short")]
+    public void SumSquaresEvaluateFunctionTest() {
+      SumSquaresEvaluator target = new SumSquaresEvaluator();
+      RealVector point = null;
+      double expected = target.BestKnownQuality;
+      double actual;
+      for (int dimension = target.MinimumProblemSize; dimension <= System.Math.Min(10, target.MaximumProblemSize); dimension++) {
+        point = target.GetBestKnownSolution(dimension);
+        actual = target.Evaluate(point);
+        Assert.AreEqual(expected, actual);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/ZakharovEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/ZakharovEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions-3.3/ZakharovEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.RealVectorEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.Tests {
+  /// <summary>
+  ///This is a test class for ZakharovEvaluatorTest and is intended
+  ///to contain all ZakharovEvaluatorTest Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class ZakharovEvaluatorTest {
+    /// <summary>
+    ///A test for EvaluateFunction
+    ///</summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions")]
+    [TestProperty("Time", "short")]
+    public void ZakharovEvaluateFunctionTest() {
+      ZakharovEvaluator target = new ZakharovEvaluator();
+      RealVector point = null;
+      double expected = target.BestKnownQuality;
+      double actual;
+      for (int dimension = target.MinimumProblemSize; dimension <= System.Math.Min(10, target.MaximumProblemSize); dimension++) {
+        point = target.GetBestKnownSolution(dimension);
+        actual = target.Evaluate(point);
+        Assert.AreEqual(expected, actual);
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/CrowdingTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/CrowdingTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/CrowdingTest.cs	(revision 16038)
@@ -0,0 +1,140 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests {
+  [TestClass]
+  public class CrowdingTest {
+
+    [TestMethod]
+    [ExpectedException(typeof(ArgumentException))]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void CrowdingTestEmptyFront() {
+      double[][] front = { };
+
+      Crowding.Calculate(front, null);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void CrowdingTestSamePoint() {
+
+      double[] point = new double[2];
+      point[0] = 0.5;
+      point[1] = 0.5;
+
+      double[] point1 = new double[2];
+      point1[0] = 0.5;
+      point1[1] = 0.5;
+      double[][] front = { point, point1 };
+      double dist = Crowding.Calculate(front, new double[,] { { 0, 1 }, { 0, 1 } });
+      Assert.AreEqual(double.PositiveInfinity, dist);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void CrowdingTestSinglePoint() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[][] front = { point };
+      double dist = Crowding.Calculate(front, new double[,] { { 0, 1 }, { 0, 1 } });
+      Assert.AreEqual(double.PositiveInfinity, dist);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void CrowdingTestDiagonal() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[] point1 = new double[2];
+      point1[0] = 0.5;
+      point1[1] = 0.5;
+
+      double[] point2 = new double[2];
+      point2[0] = 1;
+      point2[1] = 1;
+      double[][] front = { point, point1, point2 };
+      double dist = Crowding.Calculate(front, new double[,] { { 0, 1 }, { 0, 1 } });
+      Assert.AreEqual(2, dist);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void CrowdingTestDiamond() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[] point1 = new double[2];
+      point1[0] = 1;
+      point1[1] = 1.5;
+
+      double[] point2 = new double[2];
+      point2[0] = 3;
+      point2[1] = 0.5;
+      double[] point3 = new double[2];
+      point3[0] = 4;
+      point3[1] = 2;
+      double[][] front = { point, point1, point2, point3 };
+      double dist = Crowding.Calculate(front, new double[,] { { 0, 4 }, { 0, 2 } });
+      Assert.AreEqual(1.5, dist);
+    }
+
+    /// <summary> 
+    /// deltoid with 4 points of the 1-unit-square and the northeastern point at 4,4
+    /// 
+    /// </summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void CrowdingTestDeltoid() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[] point1 = new double[2];
+      point1[0] = 0.00000001;         //points should not be exactly equal because sorting behaviour could change result
+      point1[1] = 1.00000001;
+
+      double[] point2 = new double[2];
+      point2[0] = 1;
+      point2[1] = 0;
+      double[] point3 = new double[2];
+      point3[0] = 4;
+      point3[1] = 4;
+
+
+      double[][] front = { point, point1, point2, point3, };
+      double dist = Crowding.Calculate(front, new double[,] { { 0, 4 }, { 0, 4 } });
+      Assert.AreEqual(1.25, dist);
+    }
+
+
+  }
+
+
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/FastHyperVolumeTests.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/FastHyperVolumeTests.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/FastHyperVolumeTests.cs	(revision 16038)
@@ -0,0 +1,115 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests {
+  [TestClass]
+  public class FastHypervolumeTest {
+    /// <summary>
+    ///  /*
+    /// +-----+
+    /// |     |
+    /// |  x  |
+    /// |     |
+    /// +-----+
+    /// 
+    /// box between(0,0,0) and(1,1,1) with singular point pareto front at(0.5,0.5,0.5)
+    /// Hypervolume should be 0.125;  
+    /// 
+    /// </summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void FastHypervolumeTestSinglePoint() {
+      double[] point = new double[] { 0.5, 0.5, 0.5 };
+      double[][] front = { point };
+      double[] referencePoint = new double[] { 1, 1, 1 };
+      double hv = Hypervolume.Calculate(front, referencePoint, new bool[3]);
+      Assert.AreEqual(0.125, hv);
+    }
+
+    /// <summary>
+    ///  /*
+    /// +-----+
+    /// | x   |
+    /// |     |
+    /// |     |
+    /// +-----+
+    /// 
+    /// box between(0,0) and(1,1) with singular point pareto front at a random Location
+    /// Sum of the Hypervolume to each of the corners should be 1;  
+    /// 
+    /// </summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void FastHypervolumeTestRandomSinglePoint() {
+      //Front with a single Point
+      double[] point = new double[3];
+      var r = new System.Random();
+
+      point[0] = r.NextDouble();
+      point[1] = r.NextDouble();
+      point[2] = r.NextDouble();
+      double[][] front = { point };
+
+      double[] referencePoint = new double[3];
+
+      //Northeast
+      referencePoint[0] = 1;
+      referencePoint[1] = 1;
+      referencePoint[2] = 1;
+      double hv = Hypervolume.Calculate(front, referencePoint, new bool[3]);
+      double hv2 = 1;
+      foreach (double d in point) {
+        hv2 *= Math.Abs(d - 1);
+      }
+      Assert.AreEqual(hv2, hv);
+    }
+
+    /// <summary>
+    ///  /*
+    /// x-----+
+    /// |     |
+    /// |  X  |
+    /// |     |
+    /// +-----x
+    /// 
+    /// box between(0,0,0) and(1,1,1) with three point (pareto) front at (1,0,0), (0.5,0.5,0)  and (0,1,0) 
+    /// Hypervolume should be 0.25
+    /// </summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void FastHypervolumeTestDiagonalPoint() {
+      //Front with three points
+      double[] point1 = new double[] { 1, 0, 0 };
+      double[] point2 = new double[] { 0, 1, 0 };
+      double[] point3 = new double[] { 0.5, 0.5, 0 };
+      double[][] front = { point1, point2, point3 };
+
+      double[] referencePoint = new double[] { 1, 1, 1 };
+      double hv = Hypervolume.Calculate(front, referencePoint, new bool[3]);
+      Assert.AreEqual(0.5, hv);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/GenerationalDistanceTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/GenerationalDistanceTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/GenerationalDistanceTest.cs	(revision 16038)
@@ -0,0 +1,130 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests {
+  [TestClass]
+  public class GenerationalDistanceTest {
+
+    [TestMethod]
+    [ExpectedException(typeof(ArgumentException))]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void GenerationalDistanceTestEmptyOptimalFront() {
+
+      double[] point = new double[2];
+      point[0] = 0.5;
+      point[1] = 0.5;
+      double[][] front = { point };
+      double[][] referencefront = { };
+      GenerationalDistance.Calculate(front, referencefront, 1);
+    }
+
+    [TestMethod]
+    [ExpectedException(typeof(ArgumentException))]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void GenerationalDistanceTestEmptyFront() {
+
+      double[] point = new double[2];
+      point[0] = 0.5;
+      point[1] = 0.5;
+      double[][] front = { };
+      double[][] referencefront = { point };
+      GenerationalDistance.Calculate(front, referencefront, 1);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void GenerationalDistanceTestSamePoint() {
+
+      double[] point = new double[2];
+      point[0] = 0.5;
+      point[1] = 0.5;
+      double[][] front = { point };
+      double[] point1 = new double[2];
+      point1[0] = 0.5;
+      point1[1] = 0.5;
+      double[][] referencefront = { point1 };
+      double dist = GenerationalDistance.Calculate(front, referencefront, 1);
+      Assert.AreEqual(0, dist);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void GenerationalDistanceTestSinglePoint() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[][] front = { point };
+      double[] point2 = new double[2];
+      point2[0] = 1;
+      point2[1] = 1;
+      double[][] referencefront = { point2 };
+      double dist = GenerationalDistance.Calculate(front, referencefront, 1);
+      Assert.AreEqual(Math.Sqrt(2), dist);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void GenerationalDistanceTestDifferentSizes() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[] point1 = new double[2];
+      point1[0] = 1;
+      point1[1] = 0.5;
+      double[][] front = { point, point1 };
+      double[] point2 = new double[2];
+      point2[0] = 1;
+      point2[1] = 0;
+      double[][] referencefront = { point2 };
+      double dist = GenerationalDistance.Calculate(front, referencefront, 1);
+      Assert.AreEqual(0.75, dist);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void GenerationalDistanceTestQuadratic() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[] point1 = new double[2];
+      point1[0] = 0;
+      point1[1] = 1;
+      double[][] front = { point, point1 };
+      double[] point2 = new double[2];
+      point2[0] = 1;
+      point2[1] = 0;
+      double[] point3 = new double[2];
+      point3[0] = 1;
+      point3[1] = 1;
+      double[][] referencefront = { point2, point3 };
+      double dist = GenerationalDistance.Calculate(front, referencefront, 1);
+      Assert.AreEqual(1, dist);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/HyperVolumeTests.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/HyperVolumeTests.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/HyperVolumeTests.cs	(revision 16038)
@@ -0,0 +1,286 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests {
+  [TestClass]
+  public class HypervolumeTest {
+
+    /// <summary>
+    ///  /*
+    /// +-----+
+    /// |     |
+    /// |  x  |
+    /// |     |
+    /// +-----+
+    /// 
+    /// box between(0,0) and(1,1) with singular point pareto front at(0.5,0.5)
+    /// Hypervolume to each of the corners should be 0.25;  
+    /// 
+    /// </summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void HypervolumeTestSinglePoint() {
+
+      //Front with a single Point
+      double[] point = new double[2];
+      point[0] = 0.5;
+      point[1] = 0.5;
+      double[][] front = { point };
+
+      double[] referencePoint = new double[2];
+      bool[] maximization;
+
+      //Northeast
+      maximization = new bool[] { false, false };
+      referencePoint[0] = 1;
+      referencePoint[1] = 1;
+      double ne = Hypervolume.Calculate(front, referencePoint, maximization);
+      Assert.AreEqual(0.25, ne);
+
+      //NorthWest
+      maximization = new bool[] { true, false };
+      referencePoint[0] = 0;
+      referencePoint[1] = 1;
+      double nw = Hypervolume.Calculate(front, referencePoint, maximization);
+      Assert.AreEqual(0.25, nw);
+
+      //SouthWest
+      maximization = new bool[] { true, true };
+      referencePoint[0] = 0;
+      referencePoint[1] = 0;
+      double sw = Hypervolume.Calculate(front, referencePoint, maximization);
+      Assert.AreEqual(0.25, sw);
+
+      //SouthEast
+      maximization = new bool[] { false, true };
+      referencePoint[0] = 1;
+      referencePoint[1] = 0;
+      double se = Hypervolume.Calculate(front, referencePoint, maximization);
+      Assert.AreEqual(0.25, se);
+
+
+    }
+
+    /// <summary>
+    ///  /*
+    /// +-----+
+    /// | x   |
+    /// |     |
+    /// |     |
+    /// +-----+
+    /// 
+    /// box between(0,0) and(1,1) with singular point pareto front at a random Location
+    /// Sum of the Hypervolume to each of the corners should be 1;  
+    /// 
+    /// </summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void HypervolumeTestRandomSinglePoint() {
+      //Front with a single Point
+      double[] point = new double[2];
+      var r = new System.Random();
+
+      point[0] = r.NextDouble();
+      point[1] = r.NextDouble();
+      double[][] front = { point };
+
+      double[] referencePoint = new double[2];
+      bool[] maximization;
+
+      //Northeast
+      maximization = new bool[] { false, false };
+      referencePoint[0] = 1;
+      referencePoint[1] = 1;
+      double ne = Hypervolume.Calculate(front, referencePoint, maximization);
+
+      //NorthWest
+      maximization = new bool[] { true, false };
+      referencePoint[0] = 0;
+      referencePoint[1] = 1;
+      double nw = Hypervolume.Calculate(front, referencePoint, maximization);
+
+      //SouthWest
+      maximization = new bool[] { true, true };
+      referencePoint[0] = 0;
+      referencePoint[1] = 0;
+      double sw = Hypervolume.Calculate(front, referencePoint, maximization);
+
+      //SouthEast
+      maximization = new bool[] { false, true };
+      referencePoint[0] = 1;
+      referencePoint[1] = 0;
+      double se = Hypervolume.Calculate(front, referencePoint, maximization);
+      Assert.AreEqual(1.0, ne + se + nw + sw, 1e8);
+    }
+
+    /// <summary>
+    ///  /*
+    /// x-----+
+    /// |     |
+    /// |  X  |
+    /// |     |
+    /// +-----x
+    /// 
+    /// box between(0,0) and(1,1) with three point (pareto) front at (1,0), (0.5,0.5)  and (0,1) 
+    /// Hypervolume to (1,0) and (0,1) of the corners should be 1 (dominated Points need to be reemoved beforehand and   
+    /// Hypervolume to (0,0) and (1,1) of the corners should be 0.25
+    /// </summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void HypervolumeTestDiagonalPoint() {
+      //Front with three points
+      double[] point1 = new double[2];
+      point1[0] = 0;
+      point1[1] = 1;
+      double[] point2 = new double[2];
+      point2[0] = 1;
+      point2[1] = 0;
+      double[] point3 = new double[2];
+      point3[0] = 0.5;
+      point3[1] = 0.5;
+      double[][] front = { point1, point2, point3 };
+
+      double[] referencePoint = new double[2];
+      bool[] maximization;
+
+      //Northeast
+      maximization = new bool[] { false, false };
+      referencePoint[0] = 1;
+      referencePoint[1] = 1;
+      double ne = Hypervolume.Calculate(front, referencePoint, maximization);
+      Assert.AreEqual(0.25, ne);
+
+      //NorthWest
+      maximization = new bool[] { true, false };
+      referencePoint[0] = 0;
+      referencePoint[1] = 1;
+      double nw = Hypervolume.Calculate(NonDominatedSelect.SelectNonDominatedVectors(front, maximization, true), referencePoint, maximization);
+      Assert.AreEqual(1, nw);
+
+      //SouthWest
+      maximization = new bool[] { true, true };
+      referencePoint[0] = 0;
+      referencePoint[1] = 0;
+      double sw = Hypervolume.Calculate(front, referencePoint, maximization);
+      Assert.AreEqual(0.25, sw);
+
+      //SouthEast
+      maximization = new bool[] { false, true };
+      referencePoint[0] = 1;
+      referencePoint[1] = 0;
+      double se = Hypervolume.Calculate(NonDominatedSelect.SelectNonDominatedVectors(front, maximization, true), referencePoint, maximization);
+      Assert.AreEqual(1, se);
+
+    }
+
+    [TestMethod()]
+    [ExpectedException(typeof(ArgumentException))]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void HypervolumeTestReferencePointViolationNE() {
+      //Front with a single Point
+      double[] point = new double[2];
+      point[0] = 0.5;
+      point[1] = 0.5;
+      double[][] front = { point };
+
+      double[] referencePoint = new double[2];
+      bool[] maximization;
+
+      //Northeast
+      maximization = new bool[] { true, true };
+      referencePoint[0] = 1;
+      referencePoint[1] = 1;
+      double ne = Hypervolume.Calculate(front, referencePoint, maximization);
+    }
+
+    [TestMethod()]
+    [ExpectedException(typeof(ArgumentException))]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void HypervolumeTestReferencePointViolationNW() {
+      //Front with a single Point
+      double[] point = new double[2];
+      point[0] = 0.5;
+      point[1] = 0.5;
+      double[][] front = { point };
+
+      double[] referencePoint = new double[2];
+      bool[] maximization;
+
+      //NorthWest
+      maximization = new bool[] { false, true };
+      referencePoint[0] = 0;
+      referencePoint[1] = 1;
+      double nw = Hypervolume.Calculate(front, referencePoint, maximization);
+      Assert.AreEqual(0.25, nw);
+    }
+
+    [TestMethod()]
+    [ExpectedException(typeof(ArgumentException))]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void HypervolumeTestReferencePointViolationSW() {
+      //Front with a single Point
+      double[] point = new double[2];
+      point[0] = 0.5;
+      point[1] = 0.5;
+      double[][] front = { point };
+
+      double[] referencePoint = new double[2];
+      bool[] maximization;
+
+      //SouthWest
+      maximization = new bool[] { false, false };
+      referencePoint[0] = 0;
+      referencePoint[1] = 0;
+      double sw = Hypervolume.Calculate(front, referencePoint, maximization);
+      Assert.AreEqual(0.25, sw);
+    }
+
+    [TestMethod()]
+    [ExpectedException(typeof(ArgumentException))]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void HypervolumeTestReferencePointViolationSE() {
+      //Front with a single Point
+      double[] point = new double[2];
+      point[0] = 0.5;
+      point[1] = 0.5;
+      double[][] front = { point };
+
+      double[] referencePoint = new double[2];
+      bool[] maximization;
+
+      //SouthEast
+      maximization = new bool[] { true, false };
+      referencePoint[0] = 1;
+      referencePoint[1] = 0;
+      double se = Hypervolume.Calculate(front, referencePoint, maximization);
+      Assert.AreEqual(0.25, se);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/InvertedGenerationalDistanceTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/InvertedGenerationalDistanceTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/InvertedGenerationalDistanceTest.cs	(revision 16038)
@@ -0,0 +1,131 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests {
+  [TestClass]
+  public class InvertedGenerationalDistanceTest {
+
+    [TestMethod]
+    [ExpectedException(typeof(ArgumentException))]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void InvertedGenerationalDistanceTestEmptyOptimalFront() {
+
+      double[] point = new double[2];
+      point[0] = 0.5;
+      point[1] = 0.5;
+      double[][] front = { point };
+      double[][] referencefront = { };
+      InvertedGenerationalDistance.Calculate(front, referencefront, 1);
+    }
+
+    [TestMethod]
+    [ExpectedException(typeof(ArgumentException))]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void InvertedGenerationalDistanceTestEmptyFront() {
+
+      double[] point = new double[2];
+      point[0] = 0.5;
+      point[1] = 0.5;
+      double[][] front = { };
+      double[][] referencefront = { point };
+      InvertedGenerationalDistance.Calculate(front, referencefront, 1);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void InvertedGenerationalDistanceTestSamePoint() {
+      double[] point = new double[2];
+      point[0] = 0.5;
+      point[1] = 0.5;
+      double[][] front = { point };
+      double[] point1 = new double[2];
+      point1[0] = 0.5;
+      point1[1] = 0.5;
+      double[][] referencefront = { point1 };
+      double dist = GenerationalDistance.Calculate(front, referencefront, 1);
+      Assert.AreEqual(0, dist);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void InvertedGenerationalDistanceTestSinglePoint() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[][] front = { point };
+      double[] point2 = new double[2];
+      point2[0] = 1;
+      point2[1] = 1;
+      double[][] referencefront = { point2 };
+      double dist = InvertedGenerationalDistance.Calculate(front, referencefront, 1);
+      Assert.AreEqual(Math.Sqrt(2), dist);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void InvertedGenerationalDistanceTestDifferentSizes() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[] point1 = new double[2];
+      point1[0] = 1;
+      point1[1] = 0.5;
+      double[][] front = { point, point1 };
+      double[] point2 = new double[2];
+      point2[0] = 1;
+      point2[1] = 0;
+      double[][] referencefront = { point2 };
+      double dist = InvertedGenerationalDistance.Calculate(front, referencefront, 1);
+      Assert.AreEqual(0.5, dist);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void InvertedGenerationalDistanceTestQuadratic() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[] point1 = new double[2];
+      point1[0] = 0;
+      point1[1] = 1;
+      double[][] front = { point, point1 };
+      double[] point2 = new double[2];
+      point2[0] = 1;
+      point2[1] = 0;
+      double[] point3 = new double[2];
+      point3[0] = 1;
+      point3[1] = 1;
+      double[][] referencefront = { point2, point3 };
+      double dist = InvertedGenerationalDistance.Calculate(front, referencefront, 1);
+      Assert.AreEqual(1, dist);
+    }
+  }
+
+
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/SpacingTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/SpacingTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/SpacingTest.cs	(revision 16038)
@@ -0,0 +1,137 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests {
+  [TestClass]
+  public class SpacingTest {
+    [TestMethod]
+    [ExpectedException(typeof(ArgumentException))]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void SpacingTestEmptyFront() {
+      double[][] front = { };
+
+      Spacing.Calculate(front);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void SpacingTestSamePoint() {
+
+      double[] point = new double[2];
+      point[0] = 0.5;
+      point[1] = 0.5;
+
+      double[] point1 = new double[2];
+      point1[0] = 0.5;
+      point1[1] = 0.5;
+      double[][] front = { point, point1 };
+      double dist = Spacing.Calculate(front);
+      Assert.AreEqual(0, dist);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void SpacingTestSinglePoint() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[][] front = { point };
+      double dist = Spacing.Calculate(front);
+      Assert.AreEqual(0, dist);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void SpacingTestQuadratic() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[] point1 = new double[2];
+      point1[0] = 0;
+      point1[1] = 1;
+
+      double[] point2 = new double[2];
+      point2[0] = 1;
+      point2[1] = 0;
+      double[] point3 = new double[2];
+      point3[0] = 1;
+      point3[1] = 1;
+      double[][] front = { point, point1, point2, point3 };
+      double dist = Spacing.Calculate(front);
+      Assert.AreEqual(0, dist);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void SpacingTestRectangular() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[] point1 = new double[2];
+      point1[0] = 0;
+      point1[1] = 1;
+
+      double[] point2 = new double[2];
+      point2[0] = 2;
+      point2[1] = 0;
+      double[] point3 = new double[2];
+      point3[0] = 2;
+      point3[1] = 1;
+      double[][] front = { point, point1, point2, point3 };
+      double dist = Spacing.Calculate(front);
+      Assert.AreEqual(0, dist);
+    }
+
+    /// <summary> 
+    /// deltoid with 3 points of the 1-unit-square and the northeastern point at 4,4
+    /// which gives d=(1,1,1,5) for minimal distances. Mean of d is 2 and variance of d is 3
+    /// Spacing is defined as the standarddeviation of d
+    /// </summary>
+    [TestMethod]
+    [TestCategory("Problems.TestFunctions.MultiObjective")]
+    [TestProperty("Time", "short")]
+    public void SpacingTestDeltoid() {
+      double[] point = new double[2];
+      point[0] = 0;
+      point[1] = 0;
+      double[] point1 = new double[2];
+      point1[0] = 0;
+      point1[1] = 1;
+
+      double[] point2 = new double[2];
+      point2[0] = 1;
+      point2[1] = 0;
+      double[] point3 = new double[2];
+      point3[0] = 4;
+      point3[1] = 4;
+      double[][] front = { point, point1, point2, point3 };
+      double dist = Spacing.Calculate(front);
+      Assert.AreEqual(Math.Sqrt(3), dist);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TravelingSalesman-3.3/TSPMoveEvaluatorTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TravelingSalesman-3.3/TSPMoveEvaluatorTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.TravelingSalesman-3.3/TSPMoveEvaluatorTest.cs	(revision 16038)
@@ -0,0 +1,125 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 HeuristicLab.Common;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.TravelingSalesman.Tests {
+  /// <summary>
+  ///This is a test class for TSP move evaluators
+  ///</summary>
+  [TestClass()]
+  public class TSPMoveEvaluatorTest {
+    private const int ProblemSize = 10;
+    private static DoubleMatrix coordinates;
+    private static DistanceMatrix distances;
+    private static Permutation tour;
+    private static MersenneTwister random;
+
+    [ClassInitialize]
+    public static void MyClassInitialize(TestContext testContext) {
+      random = new MersenneTwister();
+      coordinates = new DoubleMatrix(ProblemSize, 2);
+      distances = new DistanceMatrix(ProblemSize, ProblemSize);
+      for (int i = 0; i < ProblemSize; i++) {
+        coordinates[i, 0] = random.Next(ProblemSize * 10);
+        coordinates[i, 1] = random.Next(ProblemSize * 10);
+      }
+      for (int i = 0; i < ProblemSize - 1; i++) {
+        for (int j = i + 1; j < ProblemSize; j++) {
+          distances[i, j] = Math.Round(Math.Sqrt(Math.Pow(coordinates[i, 0] - coordinates[j, 0], 2) + Math.Pow(coordinates[i, 1] - coordinates[j, 1], 2)));
+          distances[j, i] = distances[i, j];
+        }
+      }
+      tour = new Permutation(PermutationTypes.RelativeUndirected, ProblemSize, random);
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TravelingSalesman")]
+    [TestProperty("Time", "short")]
+    public void InversionMoveEvaluatorTest() {
+      var evaluator = new TSPRoundedEuclideanPathEvaluator();
+      var moveEvaluator = new TSPInversionMoveRoundedEuclideanPathEvaluator();
+      double beforeMatrix = TSPDistanceMatrixEvaluator.Apply(distances, tour);
+      double beforeCoordinates = TSPCoordinatesPathEvaluator.Apply(evaluator, coordinates, tour);
+      Assert.IsTrue(beforeMatrix.IsAlmost(beforeCoordinates), "Evaluation differs between using the coordinates and using the distance matrix.");
+
+      for (int i = 0; i < 500; i++) {
+        var move = StochasticInversionSingleMoveGenerator.Apply(tour, random);
+
+        double moveMatrix = TSPInversionMovePathEvaluator.EvaluateByDistanceMatrix(tour, move, distances);
+        double moveCoordinates = TSPInversionMovePathEvaluator.EvaluateByCoordinates(tour, move, coordinates, moveEvaluator);
+        Assert.IsTrue(moveMatrix.IsAlmost(moveCoordinates), "Evaluation differs between using the coordinates and using the distance matrix.");
+
+        string failureString = string.Format(@"Inversion move is calculated with quality {0}, but actual difference is {4}.
+The move would invert the tour {1} between values {2} and {3}.", moveMatrix.ToString(), tour.ToString(), tour[move.Index1].ToString(), tour[move.Index2].ToString(), "{0}");
+
+        InversionManipulator.Apply(tour, move.Index1, move.Index2);
+
+        double afterMatrix = TSPDistanceMatrixEvaluator.Apply(distances, tour);
+        double afterCoordinates = TSPCoordinatesPathEvaluator.Apply(evaluator, coordinates, tour);
+        Assert.IsTrue(afterMatrix.IsAlmost(afterCoordinates), "Evaluation differs between using the coordinates and using the distance matrix.");
+
+        Assert.IsTrue(moveMatrix.IsAlmost(afterMatrix - beforeMatrix), string.Format(failureString, (afterMatrix - beforeMatrix).ToString()));
+
+        beforeMatrix = afterMatrix;
+        beforeCoordinates = afterCoordinates;
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.TravelingSalesman")]
+    [TestProperty("Time", "short")]
+    public void TranslocationMoveEvaluatorTest() {
+      var evaluator = new TSPRoundedEuclideanPathEvaluator();
+      var moveEvaluator = new TSPTranslocationMoveRoundedEuclideanPathEvaluator();
+      double beforeMatrix = TSPDistanceMatrixEvaluator.Apply(distances, tour);
+      double beforeCoordinates = TSPCoordinatesPathEvaluator.Apply(evaluator, coordinates, tour);
+      Assert.IsTrue(beforeMatrix.IsAlmost(beforeCoordinates), "Evaluation differs between using the coordinates and using the distance matrix.");
+
+      for (int i = 0; i < 500; i++) {
+        var move = StochasticTranslocationSingleMoveGenerator.Apply(tour, random);
+
+        double moveMatrix = TSPTranslocationMovePathEvaluator.EvaluateByDistanceMatrix(tour, move, distances);
+        double moveCoordinates = TSPTranslocationMovePathEvaluator.EvaluateByCoordinates(tour, move, coordinates, moveEvaluator);
+        Assert.IsTrue(moveMatrix.IsAlmost(moveCoordinates), "Evaluation differs between using the coordinates and using the distance matrix.");
+
+        string failureString = string.Format(@"Translocation move is calculated with quality {0}, but actual difference is {5}.
+The move would move the segment between {1} and {2} in the tour {3} to the new index {4}.", moveMatrix.ToString(), tour[move.Index1].ToString(), tour[move.Index2].ToString(), tour.ToString(), move.Index3.ToString(), "{0}");
+        TranslocationManipulator.Apply(tour, move.Index1, move.Index2, move.Index3);
+
+        double afterMatrix = TSPDistanceMatrixEvaluator.Apply(distances, tour);
+        double afterCoordinates = TSPCoordinatesPathEvaluator.Apply(evaluator, coordinates, tour);
+        Assert.IsTrue(afterMatrix.IsAlmost(afterCoordinates), "Evaluation differs between using the coordinates and using the distance matrix.");
+
+        Assert.IsTrue(moveMatrix.IsAlmost(afterMatrix - beforeMatrix), string.Format(failureString, (afterMatrix - beforeMatrix).ToString()));
+
+        beforeMatrix = afterMatrix;
+        beforeCoordinates = afterCoordinates;
+      }
+    }
+
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.VehicleRouting-3.4/VRPInstancesTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.VehicleRouting-3.4/VRPInstancesTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Problems.VehicleRouting-3.4/VRPInstancesTest.cs	(revision 16038)
@@ -0,0 +1,59 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 System.Text;
+using HeuristicLab.Problems.Instances;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Problems.VehicleRouting.Tests {
+  [TestClass]
+  public class VRPInstancesTest {
+    [TestMethod]
+    [TestCategory("Problems.VehicleRouting")]
+    [TestProperty("Time", "long")]
+    public void TestVRPInstances() {
+      var vrp = new VehicleRoutingProblem();
+      var providers = ProblemInstanceManager.GetProviders(vrp);
+      var failedInstances = new StringBuilder();
+
+      Assert.IsTrue(providers.Any(), "No providers could be found.");
+
+      foreach (var provider in providers) {
+        IEnumerable<IDataDescriptor> instances = ((dynamic)provider).GetDataDescriptors();
+        Assert.IsTrue(instances.Any(), string.Format("No instances could be found in {0}.", provider.Name));
+
+        foreach (var instance in instances) {
+          try {
+            // throws InvalidOperationException if zero or more than one interpreter is found
+            ((dynamic)vrp).Load(((dynamic)provider).LoadData(instance));
+          } catch (Exception exc) {
+            failedInstances.AppendLine(instance.Name + ": " + exc.Message);
+          }
+        }
+      }
+
+      Assert.IsTrue(failedInstances.Length == 0, "Following instances failed: " + Environment.NewLine + failedInstances);
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Random-3.3/RandomEnumerableSampleTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Random-3.3/RandomEnumerableSampleTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Random-3.3/RandomEnumerableSampleTest.cs	(revision 16038)
@@ -0,0 +1,212 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using System.Text;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+namespace HeuristicLab.Random.Tests {
+
+  [TestClass()]
+  public class RandomEnumerableSampleTest {
+    [TestMethod]
+    [TestCategory("General")]
+    [TestProperty("Time", "short")]
+    public void SampleProportionalWithoutRepetitionTest() {
+      {
+        // select 1 of 100 uniformly (weights = 0)
+        var items = Enumerable.Range(0, 100);
+        var random = new MersenneTwister(31415);
+        var weights = Enumerable.Repeat(0.0, 100);
+        for (int i = 0; i < 1000; i++) {
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 1, weights, false, false).ToArray();
+          Assert.AreEqual(sample.Count(), 1);
+        }
+      }
+      {
+        // select 1 of 1 uniformly (weights = 0)
+        var items = Enumerable.Range(0, 1);
+        var random = new MersenneTwister(31415);
+        var weights = Enumerable.Repeat(0.0, 1);
+        for (int i = 0; i < 1000; i++) {
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 1, weights, false, false).ToArray();
+          Assert.AreEqual(sample.Count(), 1);
+        }
+      }
+      {
+        // select 1 of 2 non-uniformly (weights = 1, 2)
+        var items = Enumerable.Range(0, 2);
+        var random = new MersenneTwister(31415);
+        var weights = new double[] { 1.0, 2.0 };
+        var zeroSelected = 0;
+        for (int i = 0; i < 1000; i++) {
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 1, weights, false, false).ToArray();
+          Assert.AreEqual(sample.Count(), 1);
+          if (sample[0] == 0) zeroSelected++;
+        }
+        Assert.IsTrue(zeroSelected > 0 && zeroSelected < 1000);
+      }
+      {
+        // select 2 of 2 non-uniformly (weights = 1, 1000)
+        var items = Enumerable.Range(0, 2);
+        var random = new MersenneTwister(31415);
+        var weights = new double[] { 1.0, 1000.0 };
+        for (int i = 0; i < 1000; i++) {
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 2, weights, false, false).ToArray();
+          Assert.AreEqual(sample.Count(), 2);
+          Assert.AreEqual(sample.Distinct().Count(), 2);
+        }
+      }
+      {
+        // select 2 from 1 uniformly (weights = 0), this does not throw an exception but instead returns a sample with 1 element!
+        var items = Enumerable.Range(0, 1);
+        var random = new MersenneTwister(31415);
+        var weights = Enumerable.Repeat(0.0, 1);
+        var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 2, weights, false, false).ToArray();
+        Assert.AreEqual(sample.Count(), 1);
+      }
+
+      {
+        // select 10 of 100 uniformly (weights = 0)
+        var items = Enumerable.Range(0, 100);
+        var random = new MersenneTwister(31415);
+        var weights = Enumerable.Repeat(0.0, 100);
+        for (int i = 0; i < 1000; i++) {
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 10, weights, false, false).ToArray();
+          Assert.AreEqual(sample.Count(), 10);
+          Assert.AreEqual(sample.Distinct().Count(), 10);
+        }
+      }
+
+      {
+        // select 100 of 100 uniformly (weights = 0)
+        var items = Enumerable.Range(0, 100);
+        var random = new MersenneTwister(31415);
+        var weights = Enumerable.Repeat(0.0, 100);
+        for (int i = 0; i < 1000; i++) {
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 100, weights, false, false).ToArray();
+          Assert.AreEqual(sample.Count(), 100);
+          Assert.AreEqual(sample.Distinct().Count(), 100);
+        }
+      }
+
+      {
+        // select 10 of 10 uniformly (weights = 1)
+        var items = Enumerable.Range(0, 10);
+        var random = new MersenneTwister(31415);
+        var weights = Enumerable.Repeat(1.0, 10);
+        for (int i = 0; i < 1000; i++) {
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 10, weights, false, false).ToArray();
+          Assert.AreEqual(sample.Count(), 10);
+          Assert.AreEqual(sample.Distinct().Count(), 10);
+        }
+      }
+
+      {
+        // select 10 of 10 uniformly (weights = 1)
+        var items = Enumerable.Range(0, 10);
+        var random = new MersenneTwister(31415);
+        var weights = Enumerable.Repeat(1.0, 10);
+        for (int i = 0; i < 1000; i++) {
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 10, weights, true, false).ToArray();
+          Assert.AreEqual(sample.Count(), 10);
+          Assert.AreEqual(sample.Distinct().Count(), 10);
+        }
+      }
+
+      {
+        // select 10 of 10 uniformly (weights = 1)
+        var items = Enumerable.Range(0, 10);
+        var random = new MersenneTwister(31415);
+        var weights = Enumerable.Repeat(1.0, 10);
+        for (int i = 0; i < 1000; i++) {
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 10, weights, true, true).ToArray();
+          Assert.AreEqual(sample.Count(), 10);
+          Assert.AreEqual(sample.Distinct().Count(), 10);
+        }
+      }
+
+      {
+        // select 5 of 10 uniformly (weights = 0..n)
+        var items = Enumerable.Range(0, 10);
+        var random = new MersenneTwister(31415);
+        var weights = new double[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+        for (int i = 0; i < 1000; i++) {
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 5, weights, false, false).ToArray();
+          Assert.AreEqual(sample.Count(), 5);
+          Assert.AreEqual(sample.Distinct().Count(), 5);
+        }
+      }
+
+      {
+        // select 5 of 10 uniformly (weights = 0..n)
+        var items = Enumerable.Range(0, 10);
+        var random = new MersenneTwister(31415);
+        var weights = new double[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+        for (int i = 0; i < 1000; i++) {
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 5, weights, true, false).ToArray();
+          Assert.AreEqual(sample.Count(), 5);
+          Assert.AreEqual(sample.Distinct().Count(), 5);
+        }
+      }
+
+      {
+        // select 5 of 10 uniformly (weights = 0..n)
+        var items = Enumerable.Range(0, 10);
+        var random = new MersenneTwister(31415);
+        var weights = new double[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+        for (int i = 0; i < 1000; i++) {
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 5, weights, true, true).ToArray();
+          Assert.AreEqual(sample.Count(), 5);
+          Assert.AreEqual(sample.Distinct().Count(), 5);
+        }
+      }
+
+      {
+        // select 10 of 100 uniformly (weights = 1)
+        // repeat 1000000 times and calculate statistics
+        var items = Enumerable.Range(0, 100);
+        var random = new MersenneTwister(31415);
+        var weights = Enumerable.Repeat(1.0, 100);
+        var selectionCount = new int[100, 100]; // frequency of selecting item at pos
+        for (int i = 0; i < 1000000; i++) {
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 100, weights, false, false).ToArray();
+          Assert.AreEqual(sample.Count(), 100);
+          Assert.AreEqual(sample.Distinct().Count(), 100);
+
+          int pos = 0;
+          foreach (var item in sample) {
+            selectionCount[item, pos]++;
+            pos++;
+          }
+        }
+        var sb = new StringBuilder();
+        for (int item = 0; item < 100; item++) {
+          for (int pos = 0; pos < 100; pos++) {
+            sb.AppendFormat("{0} ", selectionCount[item, pos]);
+          }
+          sb.AppendLine();
+        }
+        Console.WriteLine(sb.ToString());
+      }
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GAQAPScriptTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GAQAPScriptTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GAQAPScriptTest.cs	(revision 16038)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.Instances.QAPLIB;
+using HeuristicLab.Problems.QuadraticAssignment;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GAQAPScriptTest {
+    private const string ScriptFileName = "GA_QAP_Script";
+    private const string ScriptItemName = "Genetic Algorithm Script - QAP";
+    private const string ScriptItemDescription = "A scripted genetic algorithm which solves the \"" + ProblemInstanceName + "\" quadratic assignment problem (imported from Drezner)";
+    private const string ProblemInstanceName = "dre56";
+    private const string BestQualityVariableName = "bestQuality";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateGAQAPScriptScriptTest() {
+      var script = CreateGAQAPScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Scripts.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGAQAPScriptTest() {
+      var script = CreateGAQAPScript();
+
+      script.Compile();
+      ScriptingUtils.RunScript(script);
+
+      var bestQuality = ScriptingUtils.GetVariable<double>(script, BestQualityVariableName);
+      Assert.AreEqual(2410.0, bestQuality, 1E-8);
+    }
+
+    private CSharpScript CreateGAQAPScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Variables
+      var provider = new DreznerQAPInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name == ProblemInstanceName);
+      var data = provider.LoadData(instance);
+      var problem = new QuadraticAssignmentProblem();
+      problem.Load(data);
+      script.VariableStore.Add(ProblemInstanceName, problem);
+      #endregion
+      #region Code
+      script.Code = ScriptSources.GAQAPScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GUIAutomationScriptTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GUIAutomationScriptTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GUIAutomationScriptTest.cs	(revision 16038)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GUIAutomationScriptTest {
+    private const string ScriptFileName = "GUI_Automation_Script";
+    private const string ScriptItemName = "GUI Automation Script";
+    private const string ScriptItemDescription = "A script that runs a genetic algorithm on a traveling salesman problem with 5 different settings for population sizes and with 10 repetitions, then opens a bubble chart of the results and chooses the appropriate values for x and y axis automatically";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateGUIAutomationScriptTest() {
+      var script = CreateGUIAutomationScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    private CSharpScript CreateGUIAutomationScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Code
+      script.Code = ScriptSources.GUIAutomationScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFClassificationScriptTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFClassificationScriptTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFClassificationScriptTest.cs	(revision 16038)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GridSearchRFClassificationScriptTest {
+    private const string ScriptFileName = "GridSearch_RF_Classification_Script";
+    private const string ScriptItemName = "Grid Search Random Forest Script - Classification";
+    private const string ScriptItemDescription = "A script that runs a grid search for random forest parameters for solving symbolic classification problems";
+    private const string ProblemInstanceName = "Mammography, M. Elter, 2007";
+    private const string ProblemInstanceDataVaribleName = "problem";
+    private const string BestSolutionVariableName = "bestSolution";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateGridSearchRFClassificationScriptTest() {
+      var script = CreateGridSearchRFClassificationScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Scripts.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGridSearchRFClassificationScriptTest() {
+      var script = CreateGridSearchRFClassificationScript();
+
+      script.Compile();
+      ScriptingUtils.RunScript(script);
+
+      var bestSolution = ScriptingUtils.GetVariable<IClassificationSolution>(script, BestSolutionVariableName);
+      Assert.AreEqual(0.85179407176287, bestSolution.TrainingAccuracy, 1E-8);
+      Assert.AreEqual(0.81875, bestSolution.TestAccuracy, 1E-8);
+    }
+
+    private CSharpScript CreateGridSearchRFClassificationScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Variables
+      var provider = new UCIInstanceProvider();
+      var instance = (UCIDataDescriptor)provider.GetDataDescriptors().Single(x => x.Name == ProblemInstanceName);
+      var data = provider.LoadData(instance);
+      script.VariableStore.Add(ProblemInstanceDataVaribleName, data);
+      #endregion
+      #region Code
+      script.Code = ScriptSources.GridSearchRFClassificationScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFRegressionScriptTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFRegressionScriptTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFRegressionScriptTest.cs	(revision 16038)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GridSearchRFRegressionScriptTest {
+    private const string ScriptFileName = "GridSearch_RF_Regression_Script";
+    private const string ScriptItemName = "Grid Search Random Forest Script - Regression";
+    private const string ScriptItemDescription = "A script that runs a grid search for random forest parameters for solving symbolic regression problems";
+    private const string ProblemInstanceName = "Keijzer 3 f(x) = 0.3 * x *sin(2 * PI * x); Interval [-3, 3]";
+    private const string ProblemInstanceDataVaribleName = "problem";
+    private const string BestSolutionVariableName = "bestSolution";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateGridSearchRFRegressionScriptTest() {
+      var script = CreateGridSearchRFRegressionScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Scripts.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGridSearchRFRegressionScriptTest() {
+      var script = CreateGridSearchRFRegressionScript();
+
+      script.Compile();
+      ScriptingUtils.RunScript(script);
+
+      var bestSolution = ScriptingUtils.GetVariable<IRegressionSolution>(script, BestSolutionVariableName);
+      Assert.AreEqual(0.968329534139836, bestSolution.TrainingRSquared, 1E-8);
+      Assert.AreEqual(0.982380790563445, bestSolution.TestRSquared, 1E-8);
+    }
+
+    private CSharpScript CreateGridSearchRFRegressionScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Variables
+      var provider = new KeijzerInstanceProvider();
+      var instance = (ArtificialRegressionDataDescriptor)provider.GetDataDescriptors().Single(x => x.Name == ProblemInstanceName);
+      var data = instance.GenerateRegressionData();
+      script.VariableStore.Add(ProblemInstanceDataVaribleName, data);
+      #endregion
+      #region Code
+      script.Code = ScriptSources.GridSearchRFRegressionScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchSVMClassificationScriptTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchSVMClassificationScriptTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchSVMClassificationScriptTest.cs	(revision 16038)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GridSearchSVMClassificationScriptTest {
+    private const string ScriptFileName = "GridSearch_SVM_Classification_Script";
+    private const string ScriptItemName = "Grid Search SVM Script - Classification";
+    private const string ScriptItemDescription = "A script that runs a grid search for SVM parameters for solving symbolic classification problems";
+    private const string ProblemInstanceName = "Mammography, M. Elter, 2007";
+    private const string ProblemInstanceDataVaribleName = "problem";
+    private const string BestSolutionVariableName = "bestSolution";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateGridSearchSVMClassificationScriptTest() {
+      var script = CreateGridSearchSVMClassificationScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Scripts.Execute")]
+    [TestProperty("Time", "medium")]
+    public void RunGridSearchSVMClassificationScriptTest() {
+      var script = CreateGridSearchSVMClassificationScript();
+
+      script.Compile();
+      ScriptingUtils.RunScript(script);
+
+      var bestSolution = ScriptingUtils.GetVariable<IClassificationSolution>(script, BestSolutionVariableName);
+      Assert.AreEqual(0.819032761310452, bestSolution.TrainingAccuracy, 1E-8);
+      Assert.AreEqual(0.721875, bestSolution.TestAccuracy, 1E-8);
+    }
+
+    private CSharpScript CreateGridSearchSVMClassificationScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Variables
+      var provider = new UCIInstanceProvider();
+      var instance = (UCIDataDescriptor)provider.GetDataDescriptors().Single(x => x.Name == ProblemInstanceName);
+      var data = provider.LoadData(instance);
+      script.VariableStore.Add(ProblemInstanceDataVaribleName, data);
+      #endregion
+      #region Code
+      script.Code = ScriptSources.GridSearchSVMClassificationScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchSVMRegressionScriptTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchSVMRegressionScriptTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchSVMRegressionScriptTest.cs	(revision 16038)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using System.Linq;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GridSearchSVMRegressionScriptTest {
+    private const string ScriptFileName = "GridSearch_SVM_Regression_Script";
+    private const string ScriptItemName = "Grid Search SVM Script - Regression";
+    private const string ScriptItemDescription = "A script that runs a grid search for SVM parameters for solving symbolic regression problems";
+    private const string ProblemInstanceName = "Keijzer 9 f(x) = arcsinh(x)  i.e. ln(x + sqrt(x² + 1))";
+    private const string ProblemInstanceDataVaribleName = "problem";
+    private const string BestSolutionVariableName = "bestSolution";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateGridSearchSVMRegressionScriptTest() {
+      var script = CreateGridSearchSVMRegressionScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Scripts.Execute")]
+    [TestProperty("Time", "medium")]
+    public void RunGridSearchSVMRegressionScriptTest() {
+      var script = CreateGridSearchSVMRegressionScript();
+
+      script.Compile();
+      ScriptingUtils.RunScript(script);
+
+      var bestSolution = ScriptingUtils.GetVariable<IRegressionSolution>(script, BestSolutionVariableName);
+      Assert.AreEqual(0.982485852864274, bestSolution.TrainingRSquared, 1E-8);
+      Assert.AreEqual(0.98817480950295, bestSolution.TestRSquared, 1E-8);
+    }
+
+    private CSharpScript CreateGridSearchSVMRegressionScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Variables
+      var provider = new KeijzerInstanceProvider();
+      var instance = (ArtificialRegressionDataDescriptor)provider.GetDataDescriptors().Single(x => x.Name == ProblemInstanceName);
+      var data = instance.GenerateRegressionData();
+      script.VariableStore.Add(ProblemInstanceDataVaribleName, data);
+      #endregion
+      #region Code
+      script.Code = ScriptSources.GridSearchSVMRegressionScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/OSGARastriginScriptTest.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/OSGARastriginScriptTest.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/OSGARastriginScriptTest.cs	(revision 16038)
@@ -0,0 +1,79 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.IO;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class OSGARastriginScriptTest {
+    private const string ScriptFileName = "OSGA_Rastrigin_Script";
+    private const string ScriptItemName = "Offspring Selection Genetic Algorithm Script - Rastrigin";
+    private const string ScriptItemDescription = "A scripted offspring selection genetic algorithm that solves the 100-dimensional Rastrigin test function";
+    private const string LowerBoundVariableName = "minX";
+    private const string UpperBoundVariableName = "maxX";
+    private const string DimensionsVariableName = "N";
+    private const string SeedVariableName = "seed";
+    private const string BestQualityVariableName = "bestFitness";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateOSGARastriginScriptTest() {
+      var script = CreateOSGARastriginScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Scripts.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunOSGARastriginScriptTest() {
+      var script = CreateOSGARastriginScript();
+
+      script.Compile();
+      ScriptingUtils.RunScript(script);
+
+      var bestQuality = ScriptingUtils.GetVariable<double>(script, BestQualityVariableName);
+      Assert.AreEqual(0.176350329149955, bestQuality, 1E-8);
+    }
+
+    private CSharpScript CreateOSGARastriginScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Variables
+      script.VariableStore.Add(LowerBoundVariableName, new DoubleValue(-5.12));
+      script.VariableStore.Add(UpperBoundVariableName, new DoubleValue(5.12));
+      script.VariableStore.Add(DimensionsVariableName, new IntValue(100));
+      script.VariableStore.Add(SeedVariableName, new IntValue(0));
+      #endregion
+      #region Code
+      script.Code = ScriptSources.OSGARastriginScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GAQAPScriptSource.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GAQAPScriptSource.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GAQAPScriptSource.cs	(revision 16038)
@@ -0,0 +1,69 @@
+﻿using System;
+using System.Linq;
+
+using HeuristicLab.Analysis;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Problems.Instances.QAPLIB;
+using HeuristicLab.Problems.QuadraticAssignment;
+using HeuristicLab.Random;
+
+public class GAQAPScript : HeuristicLab.Scripting.CSharpScriptBase {
+  public override void Main() {
+    DateTime start = DateTime.UtcNow;
+
+    QuadraticAssignmentProblem qap;
+    if (vars.Contains("qap")) qap = vars.qap;
+    else {
+      var provider = new DreznerQAPInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name == "dre56");
+      var data = provider.LoadData(instance);
+      qap = new QuadraticAssignmentProblem();
+      qap.Load(data);
+      vars.qap = qap;
+    }
+
+    const uint seed = 0;
+    const int popSize = 100;
+    const int generations = 1000;
+    const double mutationRate = 0.05;
+
+    var random = new MersenneTwister(seed);
+    var population = new Permutation[popSize];
+    var qualities = new double[popSize];
+    var nextGen = new Permutation[popSize];
+    var nextQual = new double[popSize];
+
+    var qualityChart = new DataTable("Quality Chart");
+    var qualityRow = new DataRow("Best Quality");
+    qualityChart.Rows.Add(qualityRow);
+    vars.qualityChart = qualityChart;
+
+    for (int i = 0; i < popSize; i++) {
+      population[i] = new Permutation(PermutationTypes.Absolute, qap.Weights.Rows, random);
+      qualities[i] = QAPEvaluator.Apply(population[i], qap.Weights, qap.Distances);
+    }
+    var bestQuality = qualities.Min();
+    var bestQualityGeneration = 0;
+
+    for (int g = 0; g < generations; g++) {
+      var parents = population.SampleProportional(random, 2 * popSize, qualities, windowing: true, inverseProportional: true).ToArray();
+      for (int i = 0; i < popSize; i++) {
+        nextGen[i] = PartiallyMatchedCrossover.Apply(random, parents[i * 2], parents[i * 2 + 1]);
+        if (random.NextDouble() < mutationRate) Swap2Manipulator.Apply(random, nextGen[i]);
+        nextQual[i] = QAPEvaluator.Apply(nextGen[i], qap.Weights, qap.Distances);
+        if (nextQual[i] < bestQuality) {
+          bestQuality = nextQual[i];
+          bestQualityGeneration = g;
+        }
+      }
+      qualityRow.Values.Add(bestQuality);
+      Array.Copy(nextGen, population, popSize);
+      Array.Copy(nextQual, qualities, popSize);
+    }
+
+    vars.elapsed = new TimeSpanValue(DateTime.UtcNow - start);
+    vars.bestQuality = bestQuality;
+    vars.bestQualityFoundAt = bestQualityGeneration;
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GUIAutomationScriptSource.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GUIAutomationScriptSource.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GUIAutomationScriptSource.cs	(revision 16038)
@@ -0,0 +1,33 @@
+﻿using System.Linq;
+using System.Windows.Forms;
+
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Views;
+using HeuristicLab.Problems.TravelingSalesman;
+
+public class GUIAutomationScript : HeuristicLab.Scripting.CSharpScriptBase {
+  public override void Main() {
+    var ga = new GeneticAlgorithm {
+      MaximumGenerations = { Value = 50 },
+      PopulationSize = { Value = 10 },
+      Problem = new TravelingSalesmanProblem()
+    };
+
+    var experiment = new Experiment();
+    for (int i = 0; i < 5; i++) {
+      experiment.Optimizers.Add(new BatchRun() { Optimizer = (IOptimizer)ga.Clone(), Repetitions = 10 });
+      ga.PopulationSize.Value *= 2;
+    }
+    experiment.Start();
+
+    vars.experiment = experiment;
+    MainFormManager.MainForm.ShowContent(experiment);
+    var viewHost = (ViewHost)MainFormManager.MainForm.ShowContent(experiment.Runs, typeof(RunCollectionBubbleChartView));
+    var bubbleChart = (UserControl)(viewHost.ActiveView);
+    bubbleChart.Controls.OfType<ComboBox>().Single(x => x.Name == "yAxisComboBox").SelectedItem = "BestQuality";
+    bubbleChart.Controls.OfType<ComboBox>().Single(x => x.Name == "xAxisComboBox").SelectedItem = "PopulationSize";
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFClassificationScriptSource.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFClassificationScriptSource.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFClassificationScriptSource.cs	(revision 16038)
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.Common;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Scripting;
+
+public class RFClassificationCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+  /* Maximum degree of parallelism (specifies whether or not the grid search should be parallelized) */
+  const int maximumDegreeOfParallelism = 4;
+  /* Number of crossvalidation folds: */
+  const int numberOfFolds = 3;
+  /* Specify whether the folds should be shuffled before doing crossvalidation */
+  const bool shuffleFolds = true;
+
+  /* The tunable Random Forest parameters:
+     - "N" (number of trees). In the random forests literature, this is referred to as the ntree parameter.
+       Larger number of trees produce more stable models and covariate importance estimates, but require more memory and a longer run time.
+       For small datasets, 50 trees may be sufficient. For larger datasets, 500 or more may be required. Please consult the random forests
+       literature for extensive discussion of this parameter (e.g. Cutler et al., 2007; Strobl et al., 2007; Strobl et al., 2008).
+
+     - "R" The ratio of the training set that will be used in the construction of individual trees (0<r<=1). Should be adjusted depending on
+       the noise level in the dataset in the range from 0.66 (low noise) to 0.05 (high noise). This parameter should be adjusted to achieve
+       good generalization error.
+
+     - "M" The ratio of features that will be used in the construction of individual trees (0<m<=1)
+  */
+  static Dictionary<string, IEnumerable<double>> randomForestParameterRanges = new Dictionary<string, IEnumerable<double>> {
+    { "N", SequenceGenerator.GenerateSteps(5m, 10, 1).Select(x => Math.Pow(2,(double)x)) },
+    { "R", SequenceGenerator.GenerateSteps(0.05m, 0.66m, 0.05m).Select(x => (double)x) },
+    { "M", SequenceGenerator.GenerateSteps(0.1m, 1, 0.1m).Select(x => (double)x) }
+  };
+
+  private static RandomForestClassificationSolution GridSearchWithCrossvalidation(IClassificationProblemData problemData, int numberOfCrossvalidationFolds, out RFParameter bestParameters,
+  int seed = 3141519) {
+    double rmsError, outOfBagRmsError, relClassificationError, outOfBagRelClassificationError;
+    bestParameters = RandomForestUtil.GridSearch(problemData, numberOfFolds, shuffleFolds, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
+    var model = RandomForestModel.CreateClassificationModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
+                                                            out rmsError, out outOfBagRmsError, out relClassificationError, out outOfBagRelClassificationError);
+    return (RandomForestClassificationSolution)model.CreateClassificationSolution(problemData);
+  }
+
+  private static RandomForestClassificationSolution GridSearch(IClassificationProblemData problemData, out RFParameter bestParameters, int seed = 3141519) {
+    double rmsError, outOfBagRmsError, relClassificationError, outOfBagRelClassificationError;
+    bestParameters = RandomForestUtil.GridSearch(problemData, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
+    var model = RandomForestModel.CreateClassificationModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
+                                                            out rmsError, out outOfBagRmsError, out relClassificationError, out outOfBagRelClassificationError);
+    return (RandomForestClassificationSolution)model.CreateClassificationSolution(problemData);
+  }
+
+  public override void Main() {
+    var variables = (Variables)vars;
+    var item = variables.SingleOrDefault(x => x.Value is IClassificationProblem || x.Value is IClassificationProblemData);
+    if (item.Equals(default(KeyValuePair<string, object>)))
+      throw new ArgumentException("Could not find a suitable problem or problem data.");
+
+    string name = item.Key;
+    IClassificationProblemData problemData;
+    if (item.Value is IClassificationProblem)
+      problemData = ((IClassificationProblem)item.Value).ProblemData;
+    else
+      problemData = (IClassificationProblemData)item.Value;
+
+    var bestParameters = new RFParameter();
+    var bestSolution = GridSearch(problemData, out bestParameters);
+    vars["bestSolution"] = bestSolution;
+    vars["bestParameters"] = bestParameters;
+
+    Console.WriteLine("Accuracy (training): " + bestSolution.TrainingAccuracy + ", Accuracy (test): " + bestSolution.TestAccuracy);
+    Console.WriteLine("Model parameters: n = {0}, r = {1}, m = {2}", bestParameters.N, bestParameters.R, bestParameters.M);
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFRegressionScriptSource.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFRegressionScriptSource.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFRegressionScriptSource.cs	(revision 16038)
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.Common;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Random;
+using HeuristicLab.Scripting;
+
+public class RFRegressionCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+  /* Maximum degree of parallelism (specifies whether or not the grid search should be parallelized) */
+  const int maximumDegreeOfParallelism = 4;
+  /* Number of crossvalidation folds: */
+  const int numberOfFolds = 3;
+  /* Specify whether the crossvalidation folds should be shuffled */
+  const bool shuffleFolds = true;
+
+  /* The tunable Random Forest parameters:
+     - "n" (number of trees). In the random forests literature, this is referred to as the ntree parameter.
+       Larger number of trees produce more stable models and covariate importance estimates, but require more memory and a longer run time.
+       For small datasets, 50 trees may be sufficient. For larger datasets, 500 or more may be required. Please consult the random forests
+       literature for extensive discussion of this parameter (e.g. Cutler et al., 2007; Strobl et al., 2007; Strobl et al., 2008).
+
+     - "r" The ratio of the training set that will be used in the construction of individual trees (0<r<=1). Should be adjusted depending on
+       the noise level in the dataset in the range from 0.66 (low noise) to 0.05 (high noise). This parameter should be adjusted to achieve
+       good generalization error.
+
+     - "m" The ratio of features that will be used in the construction of individual trees (0<m<=1)
+  */
+  static Dictionary<string, IEnumerable<double>> randomForestParameterRanges = new Dictionary<string, IEnumerable<double>> {
+    { "N", SequenceGenerator.GenerateSteps(5m, 10, 1).Select(x => Math.Pow(2,(double)x)) },
+    { "R", SequenceGenerator.GenerateSteps(0.05m, 0.66m, 0.05m).Select(x => (double)x) },
+    { "M", SequenceGenerator.GenerateSteps(0.1m, 1, 0.1m).Select(x => (double)x) }
+  };
+
+  private static RandomForestRegressionSolution GridSearchWithCrossvalidation(IRegressionProblemData problemData, out RFParameter bestParameters, int seed = 3141519) {
+    double rmsError, outOfBagRmsError, avgRelError, outOfBagAvgRelError;
+    bestParameters = RandomForestUtil.GridSearch(problemData, numberOfFolds, shuffleFolds, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
+    var model = RandomForestModel.CreateRegressionModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed, out rmsError, out outOfBagRmsError, out avgRelError, out outOfBagAvgRelError);
+    return (RandomForestRegressionSolution)model.CreateRegressionSolution(problemData);
+  }
+
+  private static RandomForestRegressionSolution GridSearch(IRegressionProblemData problemData, out RFParameter bestParameters, int seed = 3141519) {
+    double rmsError, outOfBagRmsError, avgRelError, outOfBagAvgRelError;
+    var random = new MersenneTwister();
+    bestParameters = RandomForestUtil.GridSearch(problemData, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
+    var model = RandomForestModel.CreateRegressionModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
+                                                        out rmsError, out outOfBagRmsError, out avgRelError, out outOfBagAvgRelError);
+    return (RandomForestRegressionSolution)model.CreateRegressionSolution(problemData);
+  }
+
+  public override void Main() {
+    var variables = (Variables)vars;
+    var item = variables.SingleOrDefault(x => x.Value is IRegressionProblem || x.Value is IRegressionProblemData);
+    if (item.Equals(default(KeyValuePair<string, object>)))
+      throw new ArgumentException("Could not find a suitable problem or problem data.");
+
+    string name = item.Key;
+    IRegressionProblemData problemData;
+    if (item.Value is IRegressionProblem)
+      problemData = ((IRegressionProblem)item.Value).ProblemData;
+    else
+      problemData = (IRegressionProblemData)item.Value;
+
+    var bestParameters = new RFParameter();
+    var bestSolution = GridSearch(problemData, out bestParameters);
+    vars["bestSolution"] = bestSolution;
+    vars["bestParameters"] = bestParameters;
+
+    Console.WriteLine("R2 (training): " + bestSolution.TrainingRSquared + ", R2 (test): " + bestSolution.TestRSquared);
+    Console.WriteLine("Model parameters: n = {0}, r = {1}, m = {2}", bestParameters.N, bestParameters.R, bestParameters.M);
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchSVMClassificationScriptSource.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchSVMClassificationScriptSource.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchSVMClassificationScriptSource.cs	(revision 16038)
@@ -0,0 +1,106 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+
+using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Scripting;
+
+using LibSVM;
+
+public class SVMClassificationCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+  /* Maximum degree of parallelism (specifies whether or not the grid search should be parallelized) */
+  const int maximumDegreeOfParallelism = 4;
+
+  /* Number of crossvalidation folds: */
+  const int numberOfFolds = 5;
+
+  /* Specify whether the folds should be shuffled */
+  const bool shuffleFolds = false;
+
+  /* The tunable SVM parameters:
+     - "C" (penalty factor) effects the trade-off between complexity and proportion of nonseparable samples and must be selected by the user. Can have any positive value.
+     - "nu" is an upper bound on the fraction of margin errors and a lower bound of the fraction of support vectors relative to the total number of training examples.
+     - "degree" represents the polynomial kernel degree
+     - "eps" (epsilon) determines the level of accuracy of the approximated function. It controls the width of the epsilon-insensitive zone used to fit the training data.
+       With optimal values of epsilon, the parameter C has negligible effect.
+     - "degree" represents the degree of the polynomial kernel
+     - "kernel_type" specifies the kernel to be used: linear, polynomial, radial basis or sigmoidal.
+       Valid values: svm_parameter.LINEAR, svm_parameter.POLY, svm_parameter.RBF, svm_parameter.SIGMOID
+     Comment or uncomment the parameter ranges below as needed.  */
+
+  static Dictionary<string, IEnumerable<double>> svmParameterRanges = new Dictionary<string, IEnumerable<double>> {
+        { "svm_type", new List<double> {svm_parameter.NU_SVC } },
+        { "kernel_type", new List<double> { svm_parameter.RBF }},
+        { "C", SequenceGenerator.GenerateSteps(-1m, 10, 1).Select(x => Math.Pow(2,(double)x)) },
+        { "gamma", SequenceGenerator.GenerateSteps(-4m, -1, 1).Select(x => Math.Pow(2,(double)x)) },
+//        { "eps", SequenceGenerator.GenerateSteps(-8m, -1, 1).Select(x => Math.Pow(2, (double)x)) },
+        { "nu" , SequenceGenerator.GenerateSteps(-10m, 0, 1m).Select(x => Math.Pow(2, (double)x)) },
+//        { "degree", SequenceGenerator.GenerateSteps(1m, 4, 1).Select(x => (double)x) }
+  };
+
+  static Dictionary<int, string> svmTypes = new Dictionary<int, string> {
+    { svm_parameter.NU_SVC, "NU_SVC" },
+    { svm_parameter.C_SVC, "C_SVC" }
+  };
+
+  static Dictionary<int, string> kernelTypes = new Dictionary<int, string> {
+    { svm_parameter.LINEAR, "LINEAR" },
+    { svm_parameter.POLY, "POLY" },
+    { svm_parameter.RBF, "RBF" },
+    { svm_parameter.SIGMOID, "SIGMOID" }
+  };
+
+  private static SupportVectorClassificationSolution SvmGridSearch(IClassificationProblemData problemData, out svm_parameter bestParameters, out int nSv, out double cvMse) {
+    bestParameters = SupportVectorMachineUtil.GridSearch(out cvMse, problemData, svmParameterRanges, numberOfFolds, shuffleFolds, maximumDegreeOfParallelism);
+    double trainingError, testError;
+    string svmType = svmTypes[bestParameters.svm_type];
+    string kernelType = kernelTypes[bestParameters.kernel_type];
+    var svm_solution = SupportVectorClassification.CreateSupportVectorClassificationSolution(problemData, problemData.AllowedInputVariables, svmType, kernelType,
+                       bestParameters.C, bestParameters.nu, bestParameters.gamma, bestParameters.degree, out trainingError, out testError, out nSv);
+    return svm_solution;
+  }
+
+  public override void Main() {
+    var variables = (Variables)vars;
+    var item = variables.SingleOrDefault(x => x.Value is IClassificationProblem || x.Value is IClassificationProblemData);
+    if (item.Equals(default(KeyValuePair<string, object>)))
+      throw new ArgumentException("Could not find a suitable problem or problem data.");
+
+    string name = item.Key;
+    IClassificationProblemData problemData;
+    if (item.Value is IClassificationProblem)
+      problemData = ((IClassificationProblem)item.Value).ProblemData;
+    else
+      problemData = (IClassificationProblemData)item.Value;
+
+    int nSv; // number of support vectors
+    double cvMse;
+    svm_parameter bestParameters;
+    var bestSolution = SvmGridSearch(problemData, out bestParameters, out nSv, out cvMse);
+
+    vars["bestSolution"] = bestSolution;
+    Console.WriteLine(name + " parameters: C = {0}, g = {1:0.000}, eps = {2:0.000}, nu = {3:0.000}, degree = {4}", bestParameters.C, bestParameters.gamma, bestParameters.eps, bestParameters.nu, bestParameters.degree);
+    Console.WriteLine(name + " best solution accuracy (training): " + bestSolution.TrainingAccuracy + ", accuracy (test): " + bestSolution.TestAccuracy);
+
+    var bestParametersCollection = new ParameterCollection();
+    foreach (var p in svmParameterRanges.Keys) {
+      var getter = GenerateGetter(p);
+      bestParametersCollection.Add(new FixedValueParameter<DoubleValue>(p, new DoubleValue(getter(bestParameters))));
+    }
+    vars["bestParameters"] = bestParametersCollection;
+  }
+
+  private static Func<svm_parameter, double> GenerateGetter(string field) {
+    var paramExpr = Expression.Parameter(typeof(svm_parameter));
+    var getterExpr = Expression.Convert(Expression.Field(paramExpr, field), typeof(double)); // cast to double
+    Func<svm_parameter, double> f = Expression.Lambda<Func<svm_parameter, double>>(getterExpr, paramExpr).Compile();
+    return f;
+  }
+}
+
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchSVMRegressionScriptSource.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchSVMRegressionScriptSource.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchSVMRegressionScriptSource.cs	(revision 16038)
@@ -0,0 +1,107 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+
+using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Scripting;
+
+using LibSVM;
+
+public class SVMRegressionCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+  /* Maximum degree of parallelism (specifies whether or not the grid search should be parallelized) */
+  const int maximumDegreeOfParallelism = 4;
+
+  /* Number of crossvalidation folds: */
+  const int numberOfFolds = 5;
+
+  /* Specify whether the folds should be shuffled */
+  const bool shuffleFolds = false;
+
+  /* The tunable SVM parameters:
+     - "C" (penalty factor) effects the trade-off between complexity and proportion of nonseparable samples and must be selected by the user. Can have any positive value.
+     - "nu" is an upper bound on the fraction of margin errors and a lower bound of the fraction of support vectors relative to the total number of training examples.
+     - "degree" represents the polynomial kernel degree
+     - "eps" (epsilon) determines the level of accuracy of the approximated function. It controls the width of the epsilon-insensitive zone used to fit the training data.
+       With optimal values of epsilon, the parameter C has negligible effect.
+     - "degree" represents the degree of the polynomial kernel
+     - "kernel_type" specifies the kernel to be used: linear, polynomial, radial basis or sigmoidal.
+       Valid values: svm_parameter.LINEAR, svm_parameter.POLY, svm_parameter.RBF, svm_parameter.SIGMOID
+     Comment or uncomment the parameter ranges below as needed.  */
+
+  static Dictionary<string, IEnumerable<double>> svmParameterRanges = new Dictionary<string, IEnumerable<double>> {
+        { "svm_type", new List<double> {svm_parameter.NU_SVR } },
+        { "kernel_type", new List<double> { svm_parameter.RBF }},
+        { "C", SequenceGenerator.GenerateSteps(-1m, 12, 1).Select(x => Math.Pow(2, (double)x)) },
+        { "gamma", SequenceGenerator.GenerateSteps(-4m, -1, 1).Select(x => Math.Pow(2, (double)x)) },
+//        { "eps", SequenceGenerator.GenerateSteps(-8m, -1, 1).Select(x => Math.Pow(2, (double)x)) },
+        { "nu" , SequenceGenerator.GenerateSteps(-10m, 0, 1m).Select(x => Math.Pow(2, (double)x)) },
+//        { "degree", SequenceGenerator.GenerateSteps(1m, 4, 1).Select(x => (double)x) }
+  };
+
+  static Dictionary<int, string> svmTypes = new Dictionary<int, string> {
+    { svm_parameter.NU_SVR, "NU_SVR" },
+    { svm_parameter.EPSILON_SVR, "EPSILON_SVR" }
+  };
+
+  static Dictionary<int, string> kernelTypes = new Dictionary<int, string> {
+    { svm_parameter.LINEAR, "LINEAR" },
+    { svm_parameter.POLY, "POLY" },
+    { svm_parameter.RBF, "RBF" },
+    { svm_parameter.SIGMOID, "SIGMOID" }
+  };
+
+  private static SupportVectorRegressionSolution SvmGridSearch(IRegressionProblemData problemData, out svm_parameter bestParameters, out int nSv, out double cvMse) {
+    bestParameters = SupportVectorMachineUtil.GridSearch(out cvMse, problemData, svmParameterRanges, numberOfFolds, shuffleFolds, maximumDegreeOfParallelism);
+    double trainingError, testError;
+    string svmType = svmTypes[bestParameters.svm_type];
+    string kernelType = kernelTypes[bestParameters.kernel_type];
+    var svm_solution = SupportVectorRegression.CreateSupportVectorRegressionSolution(problemData, problemData.AllowedInputVariables, svmType, kernelType,
+                       bestParameters.C, bestParameters.nu, bestParameters.gamma, bestParameters.eps, bestParameters.degree, out trainingError, out testError, out nSv);
+    return svm_solution;
+  }
+
+  public override void Main() {
+    var variables = (Variables)vars;
+    var item = variables.SingleOrDefault(x => x.Value is IRegressionProblem || x.Value is IRegressionProblemData);
+    if (item.Equals(default(KeyValuePair<string, object>)))
+      throw new ArgumentException("Could not find a suitable problem or problem data.");
+
+    string name = item.Key;
+    IRegressionProblemData problemData;
+    if (item.Value is IRegressionProblem)
+      problemData = ((IRegressionProblem)item.Value).ProblemData;
+    else
+      problemData = (IRegressionProblemData)item.Value;
+
+    int nSv; // number of support vectors
+    double cvMse;
+    svm_parameter bestParameters;
+    var bestSolution = SvmGridSearch(problemData, out bestParameters, out nSv, out cvMse);
+
+    vars["bestSolution"] = bestSolution;
+    Console.WriteLine(name + " parameters: C = {0}, g = {1:0.000}, eps = {2:0.000}, nu = {3:0.000}, degree = {4}", bestParameters.C, bestParameters.gamma, bestParameters.eps, bestParameters.nu, bestParameters.degree);
+    Console.WriteLine(name + " best solution mse (training): " + bestSolution.TrainingMeanSquaredError + ", mse (test): " + bestSolution.TestMeanSquaredError);
+    Console.WriteLine(name + " best solution R2 (training): " + bestSolution.TrainingRSquared + ", R2 (test): " + bestSolution.TestRSquared);
+
+    var bestParametersCollection = new ParameterCollection();
+    foreach (var p in svmParameterRanges.Keys) {
+      var getter = GenerateGetter(p);
+      bestParametersCollection.Add(new FixedValueParameter<DoubleValue>(p, new DoubleValue(getter(bestParameters))));
+    }
+    vars["bestParameters"] = bestParametersCollection;
+  }
+
+  private static Func<svm_parameter, double> GenerateGetter(string field) {
+    var paramExpr = Expression.Parameter(typeof(svm_parameter));
+    var getterExpr = Expression.Convert(Expression.Field(paramExpr, field), typeof(double)); // cast to double
+    Func<svm_parameter, double> f = Expression.Lambda<Func<svm_parameter, double>>(getterExpr, paramExpr).Compile();
+    return f;
+  }
+}
+
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/OSGARastriginScriptSource.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/OSGARastriginScriptSource.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/OSGARastriginScriptSource.cs	(revision 16038)
@@ -0,0 +1,111 @@
+﻿using System;
+using System.Linq;
+
+public class OSGARastriginScript : HeuristicLab.Scripting.CSharpScriptBase {
+  public override void Main() {
+    int N = vars.N.Value;
+    double minX = vars.minX.Value;
+    double maxX = vars.maxX.Value;
+    int seed = vars.seed.Value;
+    var rand = new Random(seed);
+
+    var result = OSGA(rand, popSize: 1000, iterations: 5000, maxSelPres: 1000, mutationRate: 0.1,
+         obj: Rastrigin,
+      // x ~(i.i.d) U(0,1) * 10.24 - 5.12
+         creator: () => Enumerable.Range(1, N).Select(_ => rand.NextDouble() * (maxX - minX) + minX).ToArray(),
+      // random parent selection
+         selector: (f) => rand.Next(f.Length),
+      // single point crossover
+         crossover: (p0, p1, cand) => {
+           int cut = rand.Next(cand.Length);
+           Array.Copy(p0, cand, cut);
+           Array.Copy(p1, cut, cand, cut, cand.Length - cut);
+         },
+      // single point manipulation
+         manipulator: (p) => p[rand.Next(N)] = rand.NextDouble() * (maxX - minX) + minX,
+         output: true
+      );
+
+    double bestFit = result.Item2;
+    vars.bestFitness = bestFit;
+    Console.WriteLine("best fitness: {0}", bestFit);
+  }
+
+  private double Rastrigin(double[] x) {
+    return 10.0 * x.Length + x.Sum(xi => xi * xi - 10.0 * Math.Cos(2.0 * Math.PI * xi));
+  }
+
+  private Tuple<T, double> OSGA<T>(Random rand, int popSize, int iterations, double maxSelPres, double mutationRate, Func<T, double> obj,
+      Func<T> creator, Func<double[], int> selector, Action<T, T, T> crossover, Action<T> manipulator,
+      bool output = false)
+      where T : ICloneable {
+    // generate random pop
+    T[] pop = Enumerable.Range(0, popSize).Select(_ => creator()).ToArray();
+    // evaluate initial pop
+    double[] fit = pop.Select(p => obj(p)).ToArray();
+
+    // arrays for next pop (clone current pop because solutions are reused)
+    T[] popNew = pop.Select(pi => (T)pi.Clone()).ToArray();
+    double[] fitNew = new double[popSize];
+
+    var bestSolution = (T)pop.First().Clone(); // take a random solution (don't care)
+    double bestFit = fit.First();
+
+    // run generations
+    double curSelPres = 0;
+    for (int g = 0; g < iterations && curSelPres < maxSelPres; g++) {
+      // keep the first element as elite
+      int i = 1;
+      int genEvals = 0;
+      do {
+        var p1Idx = selector(fit);
+        var p2Idx = selector(fit);
+
+        var p1 = pop[p1Idx];
+        var p2 = pop[p2Idx];
+        var f1 = fit[p1Idx];
+        var f2 = fit[p2Idx];
+
+        // generate candidate solution (reuse old solutions)
+        crossover(p1, p2, popNew[i]);
+        // optional mutation
+        if (rand.NextDouble() < mutationRate) {
+          manipulator(popNew[i]);
+        }
+
+        double f = obj(popNew[i]);
+        genEvals++;
+        // if child is better than best (strict offspring selection)
+        if (f < Math.Min(f1, f2)) {
+          // update best fitness
+          if (f < bestFit) {
+            bestFit = f;
+            bestSolution = (T)popNew[i].Clone(); // overall best
+          }
+
+          // keep
+          fitNew[i] = f;
+          i++;
+        }
+
+        curSelPres = genEvals / (double)popSize;
+      } while (i < popNew.Length && curSelPres < maxSelPres);
+
+      Console.WriteLine("generation {0} obj {1:0.000} sel. pres. {2:###.0}", g, bestFit, curSelPres);
+
+      // swap 
+      var tmpPop = pop;
+      var tmpFit = fit;
+      pop = popNew;
+      fit = fitNew;
+      popNew = tmpPop;
+      fitNew = tmpFit;
+
+      // keep elite
+      popNew[0] = (T)bestSolution.Clone();
+      fitNew[0] = bestFit;
+    }
+
+    return Tuple.Create(bestSolution, bestFit);
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/ScriptSources.Designer.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/ScriptSources.Designer.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/ScriptSources.Designer.cs	(revision 16038)
@@ -0,0 +1,229 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.34014
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace HeuristicLab.Tests {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class ScriptSources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal ScriptSources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Tests.HeuristicLab.Scripting_3._3.Script_Sources.ScriptSources", typeof(ScriptSources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Linq;
+        ///
+        ///using HeuristicLab.Analysis;
+        ///using HeuristicLab.Data;
+        ///using HeuristicLab.Encodings.PermutationEncoding;
+        ///using HeuristicLab.Problems.Instances.QAPLIB;
+        ///using HeuristicLab.Problems.QuadraticAssignment;
+        ///using HeuristicLab.Random;
+        ///
+        ///public class GAQAPScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  public override void Main() {
+        ///    DateTime start = DateTime.UtcNow;
+        ///
+        ///    QuadraticAssignmentProblem qap;
+        ///    if (vars.Contains(&quot;qap&quot;)) qap = vars.qap;
+        ///    else {
+        ///  [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string GAQAPScriptSource {
+            get {
+                return ResourceManager.GetString("GAQAPScriptSource", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Collections.Generic;
+        ///using System.Linq;
+        ///
+        ///using HeuristicLab.Algorithms.DataAnalysis;
+        ///using HeuristicLab.Problems.DataAnalysis;
+        ///using HeuristicLab.Problems.Instances.DataAnalysis;
+        ///using HeuristicLab.Scripting;
+        ///
+        ///public class RFClassificationCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  /* Maximum degree of parallelism (specifies whether or not the grid search should be parallelized) */
+        ///  const int maximumDegreeOfParallelism = 4;
+        ///  /* Number of cross [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string GridSearchRFClassificationScriptSource {
+            get {
+                return ResourceManager.GetString("GridSearchRFClassificationScriptSource", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Collections.Generic;
+        ///using System.Linq;
+        ///
+        ///using HeuristicLab.Algorithms.DataAnalysis;
+        ///using HeuristicLab.Problems.DataAnalysis;
+        ///using HeuristicLab.Problems.Instances.DataAnalysis;
+        ///using HeuristicLab.Random;
+        ///using HeuristicLab.Scripting;
+        ///
+        ///public class RFRegressionCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  /* Maximum degree of parallelism (specifies whether or not the grid search should be parallelized) */
+        ///  const int maximumDegreeOfParallelism =  [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string GridSearchRFRegressionScriptSource {
+            get {
+                return ResourceManager.GetString("GridSearchRFRegressionScriptSource", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Collections.Generic;
+        ///using System.Linq;
+        ///using System.Linq.Expressions;
+        ///
+        ///using HeuristicLab.Algorithms.DataAnalysis;
+        ///using HeuristicLab.Core;
+        ///using HeuristicLab.Data;
+        ///using HeuristicLab.Parameters;
+        ///using HeuristicLab.Problems.DataAnalysis;
+        ///using HeuristicLab.Problems.Instances.DataAnalysis;
+        ///using HeuristicLab.Scripting;
+        ///
+        ///using LibSVM;
+        ///
+        ///public class SVMClassificationCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  /* Maximum degree of parallelism ( [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string GridSearchSVMClassificationScriptSource {
+            get {
+                return ResourceManager.GetString("GridSearchSVMClassificationScriptSource", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Collections.Generic;
+        ///using System.Linq;
+        ///using System.Linq.Expressions;
+        ///
+        ///using HeuristicLab.Algorithms.DataAnalysis;
+        ///using HeuristicLab.Core;
+        ///using HeuristicLab.Data;
+        ///using HeuristicLab.Parameters;
+        ///using HeuristicLab.Problems.DataAnalysis;
+        ///using HeuristicLab.Problems.Instances.DataAnalysis;
+        ///using HeuristicLab.Scripting;
+        ///
+        ///using LibSVM;
+        ///
+        ///public class SVMRegressionCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  /* Maximum degree of parallelism (spec [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string GridSearchSVMRegressionScriptSource {
+            get {
+                return ResourceManager.GetString("GridSearchSVMRegressionScriptSource", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Linq;
+        ///using System.Threading;
+        ///using System.Windows.Forms;
+        ///
+        ///using HeuristicLab.Algorithms.GeneticAlgorithm;
+        ///using HeuristicLab.Core;
+        ///using HeuristicLab.MainForm;
+        ///using HeuristicLab.MainForm.WindowsForms;
+        ///using HeuristicLab.Optimization;
+        ///using HeuristicLab.Optimization.Views;
+        ///using HeuristicLab.Problems.TravelingSalesman;
+        ///
+        ///public class GUIAutomationScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  readonly ManualResetEvent mutex = new ManualResetEvent(false);
+        ///
+        ///  p [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string GUIAutomationScriptSource {
+            get {
+                return ResourceManager.GetString("GUIAutomationScriptSource", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Linq;
+        ///
+        ///public class OSGARastriginScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  public override void Main() {
+        ///    int N = vars.N.Value;
+        ///    double minX = vars.minX.Value;
+        ///    double maxX = vars.maxX.Value;
+        ///    int seed = vars.seed.Value;
+        ///    var rand = new Random(seed);
+        ///
+        ///    var result = OSGA(rand, popSize: 1000, iterations: 5000, maxSelPres: 1000, mutationRate: 0.1,
+        ///         obj: Rastrigin,
+        ///      // x ~(i.i.d) U(0,1) * 10.24 - 5.12
+        ///         creator: () =&gt; Enum [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string OSGARastriginScriptSource {
+            get {
+                return ResourceManager.GetString("OSGARastriginScriptSource", resourceCulture);
+            }
+        }
+    }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/ScriptSources.resx
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/ScriptSources.resx	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/ScriptSources.resx	(revision 16038)
@@ -0,0 +1,142 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="GAQAPScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>gaqapscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
+  </data>
+  <data name="GridSearchRFClassificationScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>gridsearchrfclassificationscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
+  <data name="GridSearchRFRegressionScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>gridsearchrfregressionscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
+  <data name="GridSearchSVMClassificationScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>gridsearchsvmclassificationscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
+  <data name="GridSearchSVMRegressionScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>gridsearchsvmregressionscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
+  <data name="GUIAutomationScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>guiautomationscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
+  </data>
+  <data name="OSGARastriginScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>osgarastriginscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
+  </data>
+</root>
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/ScriptingUtils.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/ScriptingUtils.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/ScriptingUtils.cs	(revision 16038)
@@ -0,0 +1,44 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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 HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  public static class ScriptingUtils {
+    public const string ScriptsDirectory = @"Scripts\";
+    public const string ScriptSourcesDirectory = @"Test Resources\Script Sources\";
+    public const string ScriptFileExtension = ".hl";
+    public const string ScriptSourceFileExtension = ".cs";
+
+    public static void RunScript(CSharpScript s) {
+      Exception ex = null;
+      s.ScriptExecutionFinished += (sender, e) => { ex = e.Value; };
+      s.Execute();
+      Assert.IsNull(ex);
+    }
+
+    public static T GetVariable<T>(CSharpScript a, string resultName) {
+      return (T)a.VariableStore[resultName];
+    }
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Tests.csproj
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 16038)
@@ -0,0 +1,710 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>
+    </ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{B62872C1-6752-4758-9823-751A2D28C388}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Tests</RootNamespace>
+    <AssemblyName>HeuristicLab.Tests</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <TargetFrameworkProfile />
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\HeuristicLab.Tests.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <OutputPath>..\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Release\HeuristicLab.Tests.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\HeuristicLab.Tests.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <OutputPath>..\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Release\HeuristicLab.Tests.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="ALGLIB-3.7.0">
+      <HintPath>..\bin\ALGLIB-3.7.0.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.ALPS-3.3">
+      <HintPath>..\bin\HeuristicLab.Algorithms.ALPS-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.DataAnalysis-3.4">
+      <HintPath>..\bin\HeuristicLab.Algorithms.DataAnalysis-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.EvolutionStrategy-3.3">
+      <HintPath>..\bin\HeuristicLab.Algorithms.EvolutionStrategy-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.GeneticAlgorithm-3.3">
+      <HintPath>..\bin\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.LocalSearch-3.3">
+      <HintPath>..\bin\HeuristicLab.Algorithms.LocalSearch-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.OffspringSelectionEvolutionStrategy-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\bin\HeuristicLab.Algorithms.OffspringSelectionEvolutionStrategy-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3">
+      <HintPath>..\bin\HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3">
+      <HintPath>..\bin\HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.RAPGA-3.3">
+      <HintPath>..\bin\HeuristicLab.Algorithms.RAPGA-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.ScatterSearch-3.3">
+      <HintPath>..\bin\HeuristicLab.Algorithms.ScatterSearch-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.SimulatedAnnealing-3.3">
+      <HintPath>..\bin\HeuristicLab.Algorithms.SimulatedAnnealing-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.TabuSearch-3.3">
+      <HintPath>..\bin\HeuristicLab.Algorithms.TabuSearch-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.VariableNeighborhoodSearch-3.3">
+      <HintPath>..\bin\HeuristicLab.Algorithms.VariableNeighborhoodSearch-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Analysis-3.3">
+      <HintPath>..\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Collections-3.3">
+      <HintPath>..\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\bin\HeuristicLab.Common-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\bin\HeuristicLab.Core-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3">
+      <HintPath>..\bin\HeuristicLab.Data-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.BinaryVectorEncoding-3.3">
+      <HintPath>..\bin\HeuristicLab.Encodings.BinaryVectorEncoding-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3">
+      <Private>False</Private>
+      <HintPath>..\bin\HeuristicLab.Encodings.IntegerVectorEncoding-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Encodings.LinearLinkageEncoding-3.4.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3">
+      <HintPath>..\bin\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.RealVectorEncoding-3.3">
+      <HintPath>..\bin\HeuristicLab.Encodings.RealVectorEncoding-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.ScheduleEncoding-3.3">
+      <HintPath>..\bin\HeuristicLab.Encodings.ScheduleEncoding-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4">
+      <HintPath>..\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.IGraph-0.8.0-pre, Version=0.8.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.IGraph-0.8.0-pre.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm-3.3">
+      <HintPath>..\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3">
+      <HintPath>..\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3">
+      <HintPath>..\bin\HeuristicLab.Operators-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <HintPath>..\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Operators-3.3">
+      <HintPath>..\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Views-3.3">
+      <HintPath>..\bin\HeuristicLab.Optimization.Views-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimizer-3.3">
+      <HintPath>..\bin\HeuristicLab.Optimizer-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.ParallelEngine-3.3">
+      <HintPath>..\bin\HeuristicLab.ParallelEngine-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Parameters-3.3">
+      <HintPath>..\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Persistence-3.3">
+      <HintPath>..\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
+      <HintPath>..\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Binary-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Problems.Binary-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.BinPacking-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Problems.BinPacking-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4">
+      <HintPath>..\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4">
+      <HintPath>..\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4">
+      <HintPath>..\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4">
+      <HintPath>..\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4">
+      <HintPath>..\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.ExternalEvaluation-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Problems.ExternalEvaluation-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.ExternalEvaluation.GP-3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Problems.ExternalEvaluation.GP-3.5.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.ExternalEvaluation.Views-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Problems.ExternalEvaluation.Views-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.GeneticProgramming-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Problems.GeneticProgramming-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.GrammaticalEvolution-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Problems.GrammaticalEvolution-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances-3.3">
+      <HintPath>..\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances.CordeauGQAP-3.3">
+      <HintPath>..\bin\HeuristicLab.Problems.Instances.CordeauGQAP-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances.DataAnalysis-3.3">
+      <HintPath>..\bin\HeuristicLab.Problems.Instances.DataAnalysis-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances.DIMACS-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Problems.Instances.DIMACS-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances.ElloumiCTAP-3.3">
+      <HintPath>..\bin\HeuristicLab.Problems.Instances.ElloumiCTAP-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances.QAPLIB-3.3">
+      <HintPath>..\bin\HeuristicLab.Problems.Instances.QAPLIB-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances.TSPLIB-3.3">
+      <HintPath>..\bin\HeuristicLab.Problems.Instances.TSPLIB-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances.VehicleRouting-3.4">
+      <HintPath>..\bin\HeuristicLab.Problems.Instances.VehicleRouting-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Knapsack-3.3">
+      <HintPath>..\bin\HeuristicLab.Problems.Knapsack-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.LinearAssignment-3.3">
+      <HintPath>..\bin\HeuristicLab.Problems.LinearAssignment-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Programmable-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Problems.Programmable-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Programmable.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Problems.Programmable.Views-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Orienteering-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\bin\HeuristicLab.Problems.Orienteering-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.PTSP-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Problems.PTSP-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.QuadraticAssignment-3.3">
+      <HintPath>..\bin\HeuristicLab.Problems.QuadraticAssignment-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Scheduling-3.3">
+      <HintPath>..\bin\HeuristicLab.Problems.Scheduling-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.TestFunctions-3.3">
+      <HintPath>..\bin\HeuristicLab.Problems.TestFunctions-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\bin\HeuristicLab.Problems.TestFunctions.MultiObjective-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.TravelingSalesman-3.3">
+      <HintPath>..\bin\HeuristicLab.Problems.TravelingSalesman-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.VehicleRouting-3.4">
+      <HintPath>..\bin\HeuristicLab.Problems.VehicleRouting-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Random-3.3">
+      <HintPath>..\bin\HeuristicLab.Random-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Scripting-3.3">
+      <HintPath>..\bin\HeuristicLab.Scripting-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Selection-3.3">
+      <HintPath>..\bin\HeuristicLab.Selection-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.SequentialEngine-3.3">
+      <HintPath>..\bin\HeuristicLab.SequentialEngine-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="LibSVM-3.12">
+      <HintPath>..\bin\LibSVM-3.12.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.Windows.Forms" />
+  </ItemGroup>
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="AssemblyInitializer.cs" />
+    <Compile Include="HeuristicLab-3.3\CloningConstructorTest.cs" />
+    <Compile Include="HeuristicLab-3.3\CollectObjectGraphTest.cs" />
+    <Compile Include="HeuristicLab-3.3\ContentViewTests.cs" />
+    <Compile Include="HeuristicLab-3.3\DeepCloneableCloningTest.cs" />
+    <Compile Include="HeuristicLab-3.3\GeneticAlgorithmTest.cs" />
+    <Compile Include="HeuristicLab-3.3\InstantiateCreatablesTest.cs" />
+    <Compile Include="HeuristicLab-3.3\NamedItemTest.cs" />
+    <Compile Include="HeuristicLab-3.3\ParameterVisibilityTest.cs" />
+    <Compile Include="HeuristicLab-3.3\PluginDependenciesTest.cs" />
+    <Compile Include="HeuristicLab-3.3\PluginLoader.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\AlpsSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GABppSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GPRobocodeSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GPSymbolicRegressionSampleWithOSTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\OSESGriewankSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GAGroupingProblemSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\VnsOpSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\EsGriewankSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GaussianProcessRegressionSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GAVrpSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GeSymbolicRegressionSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GPArtificialAntSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GPLawnMowerSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GPSymbolicClassificationSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GPSymbolicRegressionSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GPTimeSeriesSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GPMultiplexerSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\LocalSearchKnapsackSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\PsoRastriginSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\RAPGASchedulingSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\SamplesUtils.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\GATspSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\IslandGaTspSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\ScatterSearchVRPSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\SimulatedAnnealingRastriginSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\TabuSearchTspSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\TabuSearchVRPSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\Samples\VnsTspSampleTest.cs" />
+    <Compile Include="HeuristicLab-3.3\StorableTest.cs" />
+    <Compile Include="HeuristicLab-3.3\ThreadSafeLogTest.cs" />
+    <Compile Include="HeuristicLab-3.3\ToStringTest.cs" />
+    <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\GradientBoostingTest.cs" />
+    <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\NcaAlgorithmTest.cs" />
+    <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\SupportVectorMachineTest.cs" />
+    <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\GaussianProcessModelTest.cs" />
+    <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\GaussianProcessFunctionsTest.cs" />
+    <Compile Include="HeuristicLab.Algorithms.DataAnalysis-3.4\GaussianProcessRegressionTest.cs" />
+    <Compile Include="HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3\EnumerableBoolEqualityComparerTest.cs" />
+    <Compile Include="HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3\LinkageTreeTest.cs" />
+    <Compile Include="HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3\ParameterlessPopulationPyramidTest.cs" />
+    <Compile Include="HeuristicLab.Analysis-3.3\BonferroniHolmUnitTests.cs" />
+    <Compile Include="HeuristicLab.Analysis-3.3\ConfidenceIntervalsTests.cs" />
+    <Compile Include="HeuristicLab.Analysis-3.3\EffectSizeUnitTests.cs" />
+    <Compile Include="HeuristicLab.Analysis-3.3\KruskalWallisUnitTests.cs" />
+    <Compile Include="HeuristicLab.Analysis-3.3\MultidimensionalScalingTest.cs" />
+    <Compile Include="HeuristicLab.Collections-3.3\BidirectionalDictionaryTest.cs" />
+    <Compile Include="HeuristicLab.Collections-3.3\BidirectionalLookupTest.cs" />
+    <Compile Include="HeuristicLab.Collections-3.3\ObservableKeyedListTest.cs" />
+    <Compile Include="HeuristicLab.Common-3.3\EnumerableStatisticExtensions.cs" />
+    <Compile Include="HeuristicLab.Encodings.BinaryVectorEncoding-3.3\Auxiliary.cs" />
+    <Compile Include="HeuristicLab.Encodings.BinaryVectorEncoding-3.3\NPointCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.BinaryVectorEncoding-3.3\SinglePositionBitflipManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.BinaryVectorEncoding-3.3\SomePositionsBitflipManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.BinaryVectorEncoding-3.3\UniformCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3\Auxiliary.cs" />
+    <Compile Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3\DiscreteCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3\SinglePointCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3\UniformOnePositionManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.4\Auxiliary.cs" />
+    <Compile Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.4\ConversionsTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.4\GroupCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.4\MoveTests.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\Auxiliary.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\CosaCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\CyclicCrossover2Test.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\CyclicCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\EdgeRecombinationCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\InsertionManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\InversionManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\MaximalPreservativeCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\OrderBasedCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\OrderCrossover2Test.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\OrderCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\PartiallyMatchedCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\PermutationEqualityComparerTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\PositionBasedCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\ScrambleManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\Swap2ManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\Swap3ManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\TranslocationInversionManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\TranslocationManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\UniformLikeCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\PermutationManipulationTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\Auxiliary.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\BlendAlphaBetaCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\BlendAlphaCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\DiscreteCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\HeuristicCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\LocalCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\MichalewiczNonUniformAllPositionsManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\MichalewiczNonUniformOnePositionManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\PolynomialAllPositionManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\PolynomialOnePositionManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\RandomConvexCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\SimulatedBinaryCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\SinglePointCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.RealVectorEncoding-3.3\UniformOnePositionManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.ScheduleEncoding-3.3\DirectScheduleGTCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.ScheduleEncoding-3.3\JSMJOXCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.ScheduleEncoding-3.3\JSMShiftChangeManipulatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.ScheduleEncoding-3.3\JSMSXXCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.ScheduleEncoding-3.3\PWRGOXCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.ScheduleEncoding-3.3\PWRPPXCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.ScheduleEncoding-3.3\TestUtils.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\AllArchitectureAlteringOperatorsTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\ArgumentCreaterTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\ArgumentDeleterTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\ArgumentDuplicaterTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\ChangeNodeTypeManipulationTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\FullTreeCreatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\Grammars.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\GrowTreeCreatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\ProbabilisticTreeCreatorTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\ReplaceBranchManipulationTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\SubroutineCreaterTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\SubroutineDeleterTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\SubroutineDuplicaterTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\SubtreeCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\GrammarsTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4\Util.cs" />
+    <Compile Include="HeuristicLab.IGraph\IGraphLayoutTest.cs" />
+    <Compile Include="HeuristicLab.IGraph\IGraphWrappersGraphTest.cs" />
+    <Compile Include="HeuristicLab.IGraph\IGraphWrappersMatrixTest.cs" />
+    <Compile Include="HeuristicLab.IGraph\IGraphWrappersVectorTest.cs" />
+    <Compile Include="HeuristicLab.Persistence-3.3\StorableAttributeTests.cs" />
+    <Compile Include="HeuristicLab.Persistence-3.3\UseCases.cs" />
+    <Compile Include="HeuristicLab.PluginInfraStructure-3.3\TypeExtensionsTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis-3.4\ThresholdCalculatorsTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis-3.4\OnlineCalculatorPerformanceTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis-3.4\StatisticCalculatorsTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis-3.4\VariableImpactCalculationTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4\InfixExpressionParserTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4\SymbolicExpressionTreeBottomUpSimilarityCalculatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4\SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4\SymbolicDataAnalysisExpressionTreeInterpreterTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4\Util.cs" />
+    <Compile Include="HeuristicLab.Problems.Instances-3.3\DIMACSGcolInstanceProviderTest.cs" />
+    <Compile Include="HeuristicLab.Problems.Instances.DataAnalysis-3.3\RegressionInstanceProviderTest.cs" />
+    <Compile Include="HeuristicLab.Problems.Instances.DataAnalysis-3.3\TableFileParserTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4\SymbolicDataAnalysisExpressionCrossoverTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4\SymbolicDataAnalysisExpressionTreeInterpreterTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4\SymbolicDataAnalysisExpressionTreeSimplifierTest.cs" />
+    <Compile Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4\Util.cs" />
+    <Compile Include="HeuristicLab.Problems.Instances-3.3\CordeauGQAPInstanceProviderTest.cs" />
+    <Compile Include="HeuristicLab.Problems.Instances-3.3\ElloumiCTAPInstanceProviderTest.cs" />
+    <Compile Include="HeuristicLab.Problems.Instances-3.3\QAPLIBInstanceProviderTest.cs" />
+    <Compile Include="HeuristicLab.Problems.Instances-3.3\TSPLIBInstanceProviderTest.cs" />
+    <Compile Include="HeuristicLab.Problems.Instances.DataAnalysis-3.3\ClassificationInstanceProviderTest.cs" />
+    <Compile Include="HeuristicLab.Problems.PTSP-3.3\PTSPMoveEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.QuadraticAssignment-3.3\QAPLIBInstancesTest.cs" />
+    <Compile Include="HeuristicLab.Problems.QuadraticAssignment-3.3\QAPMoveEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions-3.3\AckleyEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions-3.3\BealeEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions-3.3\BoothEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions-3.3\GriewankEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions-3.3\LevyEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions-3.3\MatyasEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions-3.3\RastriginEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions-3.3\RosenbrockEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions-3.3\SphereEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions-3.3\SumSquaresEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions-3.3\ZakharovEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3\CrowdingTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3\FastHyperVolumeTests.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3\GenerationalDistanceTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3\HyperVolumeTests.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3\InvertedGenerationalDistanceTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3\SpacingTest.cs" />
+    <Compile Include="HeuristicLab.Problems.TravelingSalesman-3.3\TSPMoveEvaluatorTest.cs" />
+    <Compile Include="HeuristicLab.Problems.LinearAssignment-3.3\LinearAssignmentProblemSolverTest.cs" />
+    <Compile Include="HeuristicLab.Problems.VehicleRouting-3.4\VRPInstancesTest.cs" />
+    <Compile Include="HeuristicLab.Random-3.3\RandomEnumerableSampleTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\GAQAPScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\GridSearchRFClassificationScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\GridSearchRFRegressionScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\GridSearchSVMClassificationScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\GridSearchSVMRegressionScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\ScriptSources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>ScriptSources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="HeuristicLab.Scripting-3.3\ScriptingUtils.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\GUIAutomationScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\OSGARastriginScriptTest.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\GridSearchRFClassificationScriptSource.cs">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Compile>
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\GridSearchRFRegressionScriptSource.cs">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Compile>
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\GridSearchSVMClassificationScriptSource.cs">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Compile>
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\GridSearchSVMRegressionScriptSource.cs">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Compile>
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\GAQAPScriptSource.cs">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Compile>
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\OSGARastriginScriptSource.cs">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Compile>
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\GUIAutomationScriptSource.cs">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Compile>
+    <Compile Include="TestRandom.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="app.config" />
+    <None Include="Builder.testsettings">
+      <SubType>Designer</SubType>
+    </None>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Test Resources\GA_SymbReg.hl">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="Test Resources\GA_TSP.hl">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="Test Resources\SamplesExperimentFinished.hl">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Test Resources\C101.opt.txt">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Test Resources\C101.txt">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Test Resources\co2.txt">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="HeuristicLab.Scripting-3.3\Script Sources\ScriptSources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>ScriptSources.Designer.cs</LastGenOutput>
+      <CustomToolNamespace>HeuristicLab.Tests</CustomToolNamespace>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/Properties/AssemblyInfo.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/Properties/AssemblyInfo.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/Properties/AssemblyInfo.cs	(revision 16038)
@@ -0,0 +1,55 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Tests")]
+[assembly: AssemblyDescription("HeuristicLab unit tests.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2018 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("fb91e607-de02-4a3f-a402-9376865a8155")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/Test Resources/C101.opt.txt
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/Test Resources/C101.opt.txt	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/Test Resources/C101.opt.txt	(revision 16038)
@@ -0,0 +1,11 @@
+﻿Route #1: 67 65 63 62 74 72 61 64 68 66 69 
+Route #2: 98 96 95 94 92 93 97 100 99 
+Route #3: 32 33 31 35 37 38 39 36 34 
+Route #4: 90 87 86 83 82 84 85 88 89 91 
+Route #5: 81 78 76 71 70 73 77 79 80 
+Route #6: 57 55 54 53 56 58 60 59 
+Route #7: 20 24 25 27 29 30 28 26 23 22 21 
+Route #8: 43 42 41 40 44 46 45 48 51 50 52 49 47 
+Route #9: 5 3 7 8 10 11 9 6 4 2 1 75 
+Route #10: 13 17 18 19 15 16 14 12 
+cost 1828.9368669428336
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/Test Resources/C101.txt
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/Test Resources/C101.txt	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/Test Resources/C101.txt	(revision 16038)
@@ -0,0 +1,110 @@
+C101
+
+VEHICLE
+NUMBER     CAPACITY
+  25         200
+
+CUSTOMER
+CUST NO.  XCOORD.   YCOORD.    DEMAND   READY TIME  DUE DATE   SERVICE   TIME
+ 
+    0      40         50          0          0       1236          0   
+    1      45         68         10        912        967         90   
+    2      45         70         30        825        870         90   
+    3      42         66         10         65        146         90   
+    4      42         68         10        727        782         90   
+    5      42         65         10         15         67         90   
+    6      40         69         20        621        702         90   
+    7      40         66         20        170        225         90   
+    8      38         68         20        255        324         90   
+    9      38         70         10        534        605         90   
+   10      35         66         10        357        410         90   
+   11      35         69         10        448        505         90   
+   12      25         85         20        652        721         90   
+   13      22         75         30         30         92         90   
+   14      22         85         10        567        620         90   
+   15      20         80         40        384        429         90   
+   16      20         85         40        475        528         90   
+   17      18         75         20         99        148         90   
+   18      15         75         20        179        254         90   
+   19      15         80         10        278        345         90   
+   20      30         50         10         10         73         90   
+   21      30         52         20        914        965         90   
+   22      28         52         20        812        883         90   
+   23      28         55         10        732        777         90   
+   24      25         50         10         65        144         90   
+   25      25         52         40        169        224         90   
+   26      25         55         10        622        701         90   
+   27      23         52         10        261        316         90   
+   28      23         55         20        546        593         90   
+   29      20         50         10        358        405         90   
+   30      20         55         10        449        504         90   
+   31      10         35         20        200        237         90   
+   32      10         40         30         31        100         90   
+   33       8         40         40         87        158         90   
+   34       8         45         20        751        816         90   
+   35       5         35         10        283        344         90   
+   36       5         45         10        665        716         90   
+   37       2         40         20        383        434         90   
+   38       0         40         30        479        522         90   
+   39       0         45         20        567        624         90   
+   40      35         30         10        264        321         90   
+   41      35         32         10        166        235         90   
+   42      33         32         20         68        149         90   
+   43      33         35         10         16         80         90   
+   44      32         30         10        359        412         90   
+   45      30         30         10        541        600         90   
+   46      30         32         30        448        509         90   
+   47      30         35         10       1054       1127         90   
+   48      28         30         10        632        693         90   
+   49      28         35         10       1001       1066         90   
+   50      26         32         10        815        880         90   
+   51      25         30         10        725        786         90   
+   52      25         35         10        912        969         90   
+   53      44          5         20        286        347         90   
+   54      42         10         40        186        257         90   
+   55      42         15         10         95        158         90   
+   56      40          5         30        385        436         90   
+   57      40         15         40         35         87         90   
+   58      38          5         30        471        534         90   
+   59      38         15         10        651        740         90   
+   60      35          5         20        562        629         90   
+   61      50         30         10        531        610         90   
+   62      50         35         20        262        317         90   
+   63      50         40         50        171        218         90   
+   64      48         30         10        632        693         90   
+   65      48         40         10         76        129         90   
+   66      47         35         10        826        875         90   
+   67      47         40         10         12         77         90   
+   68      45         30         10        734        777         90   
+   69      45         35         10        916        969         90   
+   70      95         30         30        387        456         90   
+   71      95         35         20        293        360         90   
+   72      53         30         10        450        505         90   
+   73      92         30         10        478        551         90   
+   74      53         35         50        353        412         90   
+   75      45         65         20        997       1068         90   
+   76      90         35         10        203        260         90   
+   77      88         30         10        574        643         90   
+   78      88         35         20        109        170         90   
+   79      87         30         10        668        731         90   
+   80      85         25         10        769        820         90   
+   81      85         35         30         47        124         90   
+   82      75         55         20        369        420         90   
+   83      72         55         10        265        338         90   
+   84      70         58         20        458        523         90   
+   85      68         60         30        555        612         90   
+   86      66         55         10        173        238         90   
+   87      65         55         20         85        144         90   
+   88      65         60         30        645        708         90   
+   89      63         58         10        737        802         90   
+   90      60         55         10         20         84         90   
+   91      60         60         10        836        889         90   
+   92      67         85         20        368        441         90   
+   93      65         85         40        475        518         90   
+   94      65         82         10        285        336         90   
+   95      62         80         30        196        239         90   
+   96      60         80         10         95        156         90   
+   97      60         85         30        561        622         90   
+   98      58         75         20         30         84         90   
+   99      55         80         10        743        820         90   
+  100      55         85         20        647        726         90   
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/Test Resources/co2.txt
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/Test Resources/co2.txt	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/Test Resources/co2.txt	(revision 16038)
@@ -0,0 +1,653 @@
+year, month, decimal date, average, interpolated, trend, #days
+1958, 3,1958.208,315.71,315.71,314.62,-1
+1958, 4,1958.292,317.45,317.45,315.29,-1
+1958, 5,1958.375,317.50,317.50,314.71,-1
+1958, 6,1958.458,-99.99,317.10,314.85,-1
+1958, 7,1958.542,315.86,315.86,314.98,-1
+1958, 8,1958.625,314.93,314.93,315.94,-1
+1958, 9,1958.708,313.20,313.20,315.91,-1
+1958,10,1958.792,-99.99,312.66,315.61,-1
+1958,11,1958.875,313.33,313.33,315.31,-1
+1958,12,1958.958,314.67,314.67,315.61,-1
+1959, 1,1959.042,315.62,315.62,315.70,-1
+1959, 2,1959.125,316.38,316.38,315.88,-1
+1959, 3,1959.208,316.71,316.71,315.62,-1
+1959, 4,1959.292,317.72,317.72,315.56,-1
+1959, 5,1959.375,318.29,318.29,315.50,-1
+1959, 6,1959.458,318.15,318.15,315.92,-1
+1959, 7,1959.542,316.54,316.54,315.66,-1
+1959, 8,1959.625,314.80,314.80,315.81,-1
+1959, 9,1959.708,313.84,313.84,316.55,-1
+1959,10,1959.792,313.26,313.26,316.19,-1
+1959,11,1959.875,314.80,314.80,316.78,-1
+1959,12,1959.958,315.58,315.58,316.52,-1
+1960, 1,1960.042,316.43,316.43,316.51,-1
+1960, 2,1960.125,316.97,316.97,316.47,-1
+1960, 3,1960.208,317.58,317.58,316.49,-1
+1960, 4,1960.292,319.02,319.02,316.86,-1
+1960, 5,1960.375,320.03,320.03,317.24,-1
+1960, 6,1960.458,319.59,319.59,317.36,-1
+1960, 7,1960.542,318.18,318.18,317.30,-1
+1960, 8,1960.625,315.91,315.91,316.92,-1
+1960, 9,1960.708,314.16,314.16,316.87,-1
+1960,10,1960.792,313.83,313.83,316.76,-1
+1960,11,1960.875,315.00,315.00,316.98,-1
+1960,12,1960.958,316.19,316.19,317.13,-1
+1961, 1,1961.042,316.93,316.93,317.03,-1
+1961, 2,1961.125,317.70,317.70,317.28,-1
+1961, 3,1961.208,318.54,318.54,317.47,-1
+1961, 4,1961.292,319.48,319.48,317.27,-1
+1961, 5,1961.375,320.58,320.58,317.70,-1
+1961, 6,1961.458,319.77,319.77,317.48,-1
+1961, 7,1961.542,318.57,318.57,317.70,-1
+1961, 8,1961.625,316.79,316.79,317.80,-1
+1961, 9,1961.708,314.80,314.80,317.49,-1
+1961,10,1961.792,315.38,315.38,318.35,-1
+1961,11,1961.875,316.10,316.10,318.13,-1
+1961,12,1961.958,317.01,317.01,317.94,-1
+1962, 1,1962.042,317.94,317.94,318.06,-1
+1962, 2,1962.125,318.56,318.56,318.11,-1
+1962, 3,1962.208,319.68,319.68,318.57,-1
+1962, 4,1962.292,320.63,320.63,318.45,-1
+1962, 5,1962.375,321.01,321.01,318.20,-1
+1962, 6,1962.458,320.55,320.55,318.27,-1
+1962, 7,1962.542,319.58,319.58,318.67,-1
+1962, 8,1962.625,317.40,317.40,318.48,-1
+1962, 9,1962.708,316.26,316.26,319.03,-1
+1962,10,1962.792,315.42,315.42,318.33,-1
+1962,11,1962.875,316.69,316.69,318.62,-1
+1962,12,1962.958,317.69,317.69,318.61,-1
+1963, 1,1963.042,318.74,318.74,318.91,-1
+1963, 2,1963.125,319.08,319.08,318.68,-1
+1963, 3,1963.208,319.86,319.86,318.69,-1
+1963, 4,1963.292,321.39,321.39,319.09,-1
+1963, 5,1963.375,322.25,322.25,319.39,-1
+1963, 6,1963.458,321.47,321.47,319.16,-1
+1963, 7,1963.542,319.74,319.74,318.77,-1
+1963, 8,1963.625,317.77,317.77,318.83,-1
+1963, 9,1963.708,316.21,316.21,319.06,-1
+1963,10,1963.792,315.99,315.99,319.00,-1
+1963,11,1963.875,317.12,317.12,319.10,-1
+1963,12,1963.958,318.31,318.31,319.25,-1
+1964, 1,1964.042,319.57,319.57,319.67,-1
+1964, 2,1964.125,-99.99,320.07,319.61,-1
+1964, 3,1964.208,-99.99,320.73,319.55,-1
+1964, 4,1964.292,-99.99,321.77,319.48,-1
+1964, 5,1964.375,322.25,322.25,319.42,-1
+1964, 6,1964.458,321.89,321.89,319.69,-1
+1964, 7,1964.542,320.44,320.44,319.58,-1
+1964, 8,1964.625,318.70,318.70,319.81,-1
+1964, 9,1964.708,316.70,316.70,319.56,-1
+1964,10,1964.792,316.79,316.79,319.78,-1
+1964,11,1964.875,317.79,317.79,319.72,-1
+1964,12,1964.958,318.71,318.71,319.59,-1
+1965, 1,1965.042,319.44,319.44,319.48,-1
+1965, 2,1965.125,320.44,320.44,319.97,-1
+1965, 3,1965.208,320.89,320.89,319.65,-1
+1965, 4,1965.292,322.13,322.13,319.80,-1
+1965, 5,1965.375,322.16,322.16,319.36,-1
+1965, 6,1965.458,321.87,321.87,319.65,-1
+1965, 7,1965.542,321.39,321.39,320.51,-1
+1965, 8,1965.625,318.81,318.81,319.93,-1
+1965, 9,1965.708,317.81,317.81,320.68,-1
+1965,10,1965.792,317.30,317.30,320.36,-1
+1965,11,1965.875,318.87,318.87,320.87,-1
+1965,12,1965.958,319.42,319.42,320.26,-1
+1966, 1,1966.042,320.62,320.62,320.63,-1
+1966, 2,1966.125,321.59,321.59,321.10,-1
+1966, 3,1966.208,322.39,322.39,321.16,-1
+1966, 4,1966.292,323.87,323.87,321.51,-1
+1966, 5,1966.375,324.01,324.01,321.18,-1
+1966, 6,1966.458,323.75,323.75,321.52,-1
+1966, 7,1966.542,322.39,322.39,321.49,-1
+1966, 8,1966.625,320.37,320.37,321.50,-1
+1966, 9,1966.708,318.64,318.64,321.54,-1
+1966,10,1966.792,318.10,318.10,321.18,-1
+1966,11,1966.875,319.79,319.79,321.84,-1
+1966,12,1966.958,321.08,321.08,321.95,-1
+1967, 1,1967.042,322.07,322.07,322.07,-1
+1967, 2,1967.125,322.50,322.50,321.94,-1
+1967, 3,1967.208,323.04,323.04,321.72,-1
+1967, 4,1967.292,324.42,324.42,322.05,-1
+1967, 5,1967.375,325.00,325.00,322.27,-1
+1967, 6,1967.458,324.09,324.09,321.94,-1
+1967, 7,1967.542,322.55,322.55,321.66,-1
+1967, 8,1967.625,320.92,320.92,322.04,-1
+1967, 9,1967.708,319.31,319.31,322.19,-1
+1967,10,1967.792,319.31,319.31,322.36,-1
+1967,11,1967.875,320.72,320.72,322.78,-1
+1967,12,1967.958,321.96,321.96,322.86,-1
+1968, 1,1968.042,322.57,322.57,322.55,-1
+1968, 2,1968.125,323.15,323.15,322.56,-1
+1968, 3,1968.208,323.89,323.89,322.59,-1
+1968, 4,1968.292,325.02,325.02,322.73,-1
+1968, 5,1968.375,325.57,325.57,322.87,-1
+1968, 6,1968.458,325.36,325.36,323.20,-1
+1968, 7,1968.542,324.14,324.14,323.25,-1
+1968, 8,1968.625,322.03,322.03,323.15,-1
+1968, 9,1968.708,320.41,320.41,323.31,-1
+1968,10,1968.792,320.25,320.25,323.32,-1
+1968,11,1968.875,321.31,321.31,323.32,-1
+1968,12,1968.958,322.84,322.84,323.69,-1
+1969, 1,1969.042,324.00,324.00,323.98,-1
+1969, 2,1969.125,324.42,324.42,323.89,-1
+1969, 3,1969.208,325.64,325.64,324.41,-1
+1969, 4,1969.292,326.66,326.66,324.35,-1
+1969, 5,1969.375,327.34,327.34,324.57,-1
+1969, 6,1969.458,326.76,326.76,324.63,-1
+1969, 7,1969.542,325.88,325.88,325.08,-1
+1969, 8,1969.625,323.67,323.67,324.80,-1
+1969, 9,1969.708,322.38,322.38,325.28,-1
+1969,10,1969.792,321.78,321.78,324.84,-1
+1969,11,1969.875,322.85,322.85,324.78,-1
+1969,12,1969.958,324.11,324.11,324.88,-1
+1970, 1,1970.042,325.03,325.03,325.04,-1
+1970, 2,1970.125,325.99,325.99,325.42,-1
+1970, 3,1970.208,326.87,326.87,325.69,-1
+1970, 4,1970.292,328.13,328.13,325.86,-1
+1970, 5,1970.375,328.07,328.07,325.27,-1
+1970, 6,1970.458,327.66,327.66,325.52,-1
+1970, 7,1970.542,326.35,326.35,325.51,-1
+1970, 8,1970.625,324.69,324.69,325.76,-1
+1970, 9,1970.708,323.10,323.10,325.93,-1
+1970,10,1970.792,323.16,323.16,326.15,-1
+1970,11,1970.875,323.98,323.98,325.96,-1
+1970,12,1970.958,325.13,325.13,326.06,-1
+1971, 1,1971.042,326.17,326.17,326.26,-1
+1971, 2,1971.125,326.68,326.68,326.09,-1
+1971, 3,1971.208,327.18,327.18,325.94,-1
+1971, 4,1971.292,327.78,327.78,325.47,-1
+1971, 5,1971.375,328.92,328.92,326.11,-1
+1971, 6,1971.458,328.57,328.57,326.41,-1
+1971, 7,1971.542,327.34,327.34,326.46,-1
+1971, 8,1971.625,325.46,325.46,326.49,-1
+1971, 9,1971.708,323.36,323.36,326.18,-1
+1971,10,1971.792,323.57,323.57,326.58,-1
+1971,11,1971.875,324.80,324.80,326.82,-1
+1971,12,1971.958,326.01,326.01,327.02,-1
+1972, 1,1972.042,326.77,326.77,326.86,-1
+1972, 2,1972.125,327.63,327.63,327.05,-1
+1972, 3,1972.208,327.75,327.75,326.52,-1
+1972, 4,1972.292,329.72,329.72,327.41,-1
+1972, 5,1972.375,330.07,330.07,327.21,-1
+1972, 6,1972.458,329.09,329.09,326.94,-1
+1972, 7,1972.542,328.05,328.05,327.24,-1
+1972, 8,1972.625,326.32,326.32,327.37,-1
+1972, 9,1972.708,324.93,324.93,327.73,-1
+1972,10,1972.792,325.06,325.06,328.05,-1
+1972,11,1972.875,326.50,326.50,328.51,-1
+1972,12,1972.958,327.55,327.55,328.56,-1
+1973, 1,1973.042,328.54,328.54,328.58,-1
+1973, 2,1973.125,329.56,329.56,328.87,-1
+1973, 3,1973.208,330.30,330.30,328.99,-1
+1973, 4,1973.292,331.50,331.50,329.12,-1
+1973, 5,1973.375,332.48,332.48,329.60,-1
+1973, 6,1973.458,332.07,332.07,329.96,-1
+1973, 7,1973.542,330.87,330.87,330.09,-1
+1973, 8,1973.625,329.31,329.31,330.43,-1
+1973, 9,1973.708,327.51,327.51,330.43,-1
+1973,10,1973.792,327.18,327.18,330.23,-1
+1973,11,1973.875,328.16,328.16,330.17,-1
+1973,12,1973.958,328.64,328.64,329.66,-1
+1974, 1,1974.042,329.35,329.35,329.44,-1
+1974, 2,1974.125,330.71,330.71,330.11,-1
+1974, 3,1974.208,331.48,331.48,330.19,-1
+1974, 4,1974.292,332.65,332.65,330.25,-1
+1974, 5,1974.375,333.19,333.19,330.25,15
+1974, 6,1974.458,332.12,332.12,329.93,27
+1974, 7,1974.542,330.99,330.99,330.20,31
+1974, 8,1974.625,329.17,329.17,330.31,31
+1974, 9,1974.708,327.41,327.41,330.35,29
+1974,10,1974.792,327.21,327.21,330.29,29
+1974,11,1974.875,328.34,328.34,330.33,29
+1974,12,1974.958,329.50,329.50,330.47,31
+1975, 1,1975.042,330.68,330.68,330.81,31
+1975, 2,1975.125,331.41,331.41,330.86,28
+1975, 3,1975.208,331.85,331.85,330.49,26
+1975, 4,1975.292,333.29,333.29,330.77,30
+1975, 5,1975.375,333.91,333.91,330.94,30
+1975, 6,1975.458,333.40,333.40,331.18,29
+1975, 7,1975.542,331.74,331.74,330.92,27
+1975, 8,1975.625,329.88,329.88,331.06,31
+1975, 9,1975.708,328.57,328.57,331.54,30
+1975,10,1975.792,328.36,328.36,331.46,17
+1975,11,1975.875,329.33,329.33,331.39,25
+1975,12,1975.958,-99.99,330.59,331.60, 1
+1976, 1,1976.042,331.66,331.66,331.82,25
+1976, 2,1976.125,332.75,332.75,332.19,29
+1976, 3,1976.208,333.46,333.46,331.99,29
+1976, 4,1976.292,334.78,334.78,332.24,25
+1976, 5,1976.375,334.78,334.78,331.86,31
+1976, 6,1976.458,334.06,334.06,331.74,25
+1976, 7,1976.542,332.95,332.95,332.06,21
+1976, 8,1976.625,330.64,330.64,331.87,31
+1976, 9,1976.708,328.96,328.96,331.94,28
+1976,10,1976.792,328.77,328.77,331.92,30
+1976,11,1976.875,330.18,330.18,332.33,26
+1976,12,1976.958,331.65,331.65,332.69,24
+1977, 1,1977.042,332.69,332.69,332.75,29
+1977, 2,1977.125,333.23,333.23,332.60,26
+1977, 3,1977.208,334.97,334.97,333.36,29
+1977, 4,1977.292,336.03,336.03,333.39,29
+1977, 5,1977.375,336.82,336.82,333.87,30
+1977, 6,1977.458,336.10,336.10,333.76,25
+1977, 7,1977.542,334.79,334.79,333.96,28
+1977, 8,1977.625,332.53,332.53,333.92,30
+1977, 9,1977.708,331.19,331.19,334.27,27
+1977,10,1977.792,331.21,331.21,334.43,30
+1977,11,1977.875,332.35,332.35,334.59,28
+1977,12,1977.958,333.47,333.47,334.48,31
+1978, 1,1978.042,335.10,335.10,335.11,26
+1978, 2,1978.125,335.26,335.26,334.58,28
+1978, 3,1978.208,336.61,336.61,334.95,30
+1978, 4,1978.292,337.77,337.77,335.11,28
+1978, 5,1978.375,338.01,338.01,335.05,30
+1978, 6,1978.458,337.98,337.98,335.60,27
+1978, 7,1978.542,336.48,336.48,335.68,31
+1978, 8,1978.625,334.37,334.37,335.88,31
+1978, 9,1978.708,332.33,332.33,335.49,24
+1978,10,1978.792,332.41,332.41,335.66,31
+1978,11,1978.875,333.76,333.76,336.01,28
+1978,12,1978.958,334.83,334.83,335.79,31
+1979, 1,1979.042,336.21,336.21,336.23,31
+1979, 2,1979.125,336.65,336.65,335.94,27
+1979, 3,1979.208,338.13,338.13,336.40,29
+1979, 4,1979.292,338.95,338.95,336.21,24
+1979, 5,1979.375,339.00,339.00,336.01,20
+1979, 6,1979.458,339.20,339.20,336.79,30
+1979, 7,1979.542,337.60,337.60,336.78,29
+1979, 8,1979.625,335.56,335.56,337.10,29
+1979, 9,1979.708,333.93,333.93,337.17,26
+1979,10,1979.792,334.12,334.12,337.44,28
+1979,11,1979.875,335.26,335.26,337.54,30
+1979,12,1979.958,336.78,336.78,337.76,24
+1980, 1,1980.042,337.80,337.80,337.95,30
+1980, 2,1980.125,338.28,338.28,337.73,28
+1980, 3,1980.208,340.04,340.04,338.43,31
+1980, 4,1980.292,340.86,340.86,338.20,30
+1980, 5,1980.375,341.47,341.47,338.45,31
+1980, 6,1980.458,341.26,341.26,338.79,30
+1980, 7,1980.542,339.34,339.34,338.48,26
+1980, 8,1980.625,337.45,337.45,338.92,24
+1980, 9,1980.708,336.10,336.10,339.27,26
+1980,10,1980.792,336.05,336.05,339.32,29
+1980,11,1980.875,337.21,337.21,339.38,27
+1980,12,1980.958,338.29,338.29,339.23,27
+1981, 1,1981.042,339.36,339.36,339.41,31
+1981, 2,1981.125,340.51,340.51,339.89,28
+1981, 3,1981.208,341.57,341.57,339.98,31
+1981, 4,1981.292,342.56,342.56,339.93,30
+1981, 5,1981.375,343.01,343.01,339.98,31
+1981, 6,1981.458,342.49,342.49,340.02,28
+1981, 7,1981.542,340.68,340.68,339.81,31
+1981, 8,1981.625,338.49,338.49,339.97,28
+1981, 9,1981.708,336.92,336.92,340.17,30
+1981,10,1981.792,337.12,337.12,340.44,31
+1981,11,1981.875,338.59,338.59,340.76,30
+1981,12,1981.958,339.90,339.90,340.81,28
+1982, 1,1982.042,340.92,340.92,341.03,30
+1982, 2,1982.125,341.69,341.69,341.05,27
+1982, 3,1982.208,342.85,342.85,341.21,21
+1982, 4,1982.292,343.92,343.92,341.30, 9
+1982, 5,1982.375,344.67,344.67,341.63,31
+1982, 6,1982.458,343.78,343.78,341.33,29
+1982, 7,1982.542,342.23,342.23,341.45,28
+1982, 8,1982.625,340.11,340.11,341.61,27
+1982, 9,1982.708,338.32,338.32,341.53,26
+1982,10,1982.792,338.39,338.39,341.72,30
+1982,11,1982.875,339.48,339.48,341.62,28
+1982,12,1982.958,340.88,340.88,341.77,31
+1983, 1,1983.042,341.64,341.64,341.79,31
+1983, 2,1983.125,342.87,342.87,342.30,27
+1983, 3,1983.208,343.59,343.59,342.04,30
+1983, 4,1983.292,345.25,345.25,342.63,26
+1983, 5,1983.375,345.96,345.96,342.80,29
+1983, 6,1983.458,345.52,345.52,343.03,25
+1983, 7,1983.542,344.15,344.15,343.41,30
+1983, 8,1983.625,342.25,342.25,343.72,28
+1983, 9,1983.708,340.17,340.17,343.34,27
+1983,10,1983.792,340.30,340.30,343.63,31
+1983,11,1983.875,341.53,341.53,343.66,29
+1983,12,1983.958,343.07,343.07,343.97,26
+1984, 1,1984.042,344.05,344.05,344.15,31
+1984, 2,1984.125,344.77,344.77,344.21,29
+1984, 3,1984.208,345.46,345.46,344.00,23
+1984, 4,1984.292,-99.99,346.77,344.17, 2
+1984, 5,1984.375,347.55,347.55,344.35,27
+1984, 6,1984.458,346.98,346.98,344.49,25
+1984, 7,1984.542,345.55,345.55,344.82,29
+1984, 8,1984.625,343.20,343.20,344.67,24
+1984, 9,1984.708,341.35,341.35,344.54,27
+1984,10,1984.792,341.68,341.68,344.99,28
+1984,11,1984.875,343.06,343.06,345.16,28
+1984,12,1984.958,344.54,344.54,345.42,28
+1985, 1,1985.042,345.25,345.25,345.35,29
+1985, 2,1985.125,346.06,346.06,345.51,26
+1985, 3,1985.208,347.66,347.66,346.27,28
+1985, 4,1985.292,348.20,348.20,345.64,27
+1985, 5,1985.375,348.92,348.92,345.75,31
+1985, 6,1985.458,348.40,348.40,345.94,30
+1985, 7,1985.542,346.66,346.66,345.86,28
+1985, 8,1985.625,344.85,344.85,346.22,27
+1985, 9,1985.708,343.20,343.20,346.32,27
+1985,10,1985.792,343.08,343.08,346.36,27
+1985,11,1985.875,344.40,344.40,346.53,29
+1985,12,1985.958,345.82,345.82,346.75,29
+1986, 1,1986.042,346.54,346.54,346.56,26
+1986, 2,1986.125,347.13,347.13,346.59,26
+1986, 3,1986.208,348.05,348.05,346.71,31
+1986, 4,1986.292,349.77,349.77,347.21,30
+1986, 5,1986.375,350.53,350.53,347.39,30
+1986, 6,1986.458,349.90,349.90,347.47,24
+1986, 7,1986.542,348.11,348.11,347.30,26
+1986, 8,1986.625,346.09,346.09,347.49,29
+1986, 9,1986.708,345.01,345.01,348.16,25
+1986,10,1986.792,344.47,344.47,347.71,30
+1986,11,1986.875,345.86,345.86,347.99,30
+1986,12,1986.958,347.15,347.15,348.06,30
+1987, 1,1987.042,348.38,348.38,348.31,30
+1987, 2,1987.125,348.70,348.70,348.01,28
+1987, 3,1987.208,349.72,349.72,348.31,27
+1987, 4,1987.292,351.32,351.32,348.77,30
+1987, 5,1987.375,352.14,352.14,349.03,31
+1987, 6,1987.458,351.61,351.61,349.23,29
+1987, 7,1987.542,349.91,349.91,349.20,28
+1987, 8,1987.625,347.84,347.84,349.34,27
+1987, 9,1987.708,346.52,346.52,349.71,29
+1987,10,1987.792,346.65,346.65,349.88,30
+1987,11,1987.875,347.95,347.95,350.07,27
+1987,12,1987.958,349.18,349.18,350.07,30
+1988, 1,1988.042,350.38,350.38,350.36,29
+1988, 2,1988.125,351.68,351.68,351.01,27
+1988, 3,1988.208,352.24,352.24,350.76,30
+1988, 4,1988.292,353.66,353.66,351.00,30
+1988, 5,1988.375,354.18,354.18,350.99,31
+1988, 6,1988.458,353.68,353.68,351.30,29
+1988, 7,1988.542,352.58,352.58,351.94,30
+1988, 8,1988.625,350.66,350.66,352.19,27
+1988, 9,1988.708,349.03,349.03,352.22,29
+1988,10,1988.792,349.08,349.08,352.34,31
+1988,11,1988.875,350.15,350.15,352.29,27
+1988,12,1988.958,351.44,351.44,352.36,30
+1989, 1,1989.042,352.89,352.89,352.83,31
+1989, 2,1989.125,353.24,353.24,352.55,28
+1989, 3,1989.208,353.80,353.80,352.36,30
+1989, 4,1989.292,355.59,355.59,352.93,30
+1989, 5,1989.375,355.89,355.89,352.65,31
+1989, 6,1989.458,355.30,355.30,352.88,30
+1989, 7,1989.542,353.98,353.98,353.33,31
+1989, 8,1989.625,351.53,351.53,353.11,29
+1989, 9,1989.708,350.02,350.02,353.27,28
+1989,10,1989.792,350.29,350.29,353.53,30
+1989,11,1989.875,351.44,351.44,353.60,30
+1989,12,1989.958,352.84,352.84,353.78,28
+1990, 1,1990.042,353.79,353.79,353.74,30
+1990, 2,1990.125,354.88,354.88,354.20,28
+1990, 3,1990.208,355.65,355.65,354.21,31
+1990, 4,1990.292,356.27,356.27,353.66,29
+1990, 5,1990.375,357.29,357.29,354.10,30
+1990, 6,1990.458,356.32,356.32,353.92,30
+1990, 7,1990.542,354.88,354.88,354.27,29
+1990, 8,1990.625,352.89,352.89,354.51,30
+1990, 9,1990.708,351.28,351.28,354.53,27
+1990,10,1990.792,351.59,351.59,354.81,31
+1990,11,1990.875,353.05,353.05,355.10,29
+1990,12,1990.958,354.27,354.27,355.12,30
+1991, 1,1991.042,354.87,354.87,354.85,29
+1991, 2,1991.125,355.68,355.68,355.01,28
+1991, 3,1991.208,357.06,357.06,355.57,27
+1991, 4,1991.292,358.51,358.51,355.88,30
+1991, 5,1991.375,359.09,359.09,355.94,31
+1991, 6,1991.458,358.10,358.10,355.75,30
+1991, 7,1991.542,356.12,356.12,355.51,29
+1991, 8,1991.625,353.89,353.89,355.50,31
+1991, 9,1991.708,352.30,352.30,355.58,30
+1991,10,1991.792,352.32,352.32,355.55,31
+1991,11,1991.875,353.79,353.79,355.78,30
+1991,12,1991.958,355.07,355.07,355.89,31
+1992, 1,1992.042,356.17,356.17,356.12,30
+1992, 2,1992.125,356.93,356.93,356.23,29
+1992, 3,1992.208,357.82,357.82,356.28,29
+1992, 4,1992.292,359.00,359.00,356.30,30
+1992, 5,1992.375,359.55,359.55,356.33,31
+1992, 6,1992.458,359.32,359.32,356.92,30
+1992, 7,1992.542,356.85,356.85,356.27,30
+1992, 8,1992.625,354.91,354.91,356.61,30
+1992, 9,1992.708,352.93,352.93,356.27,29
+1992,10,1992.792,353.31,353.31,356.57,30
+1992,11,1992.875,354.27,354.27,356.32,30
+1992,12,1992.958,355.53,355.53,356.37,31
+1993, 1,1993.042,356.86,356.86,356.83,28
+1993, 2,1993.125,357.27,357.27,356.43,28
+1993, 3,1993.208,358.36,358.36,356.70,31
+1993, 4,1993.292,359.27,359.27,356.60,30
+1993, 5,1993.375,360.19,360.19,357.00,31
+1993, 6,1993.458,359.52,359.52,357.09,30
+1993, 7,1993.542,357.42,357.42,356.83,27
+1993, 8,1993.625,355.46,355.46,357.14,28
+1993, 9,1993.708,354.10,354.10,357.45,26
+1993,10,1993.792,354.12,354.12,357.46,30
+1993,11,1993.875,355.40,355.40,357.53,30
+1993,12,1993.958,356.84,356.84,357.76,31
+1994, 1,1994.042,358.22,358.22,358.13,27
+1994, 2,1994.125,358.98,358.98,358.15,27
+1994, 3,1994.208,359.91,359.91,358.25,30
+1994, 4,1994.292,361.32,361.32,358.57,30
+1994, 5,1994.375,361.68,361.68,358.44,30
+1994, 6,1994.458,360.80,360.80,358.39,30
+1994, 7,1994.542,359.39,359.39,358.79,31
+1994, 8,1994.625,357.42,357.42,359.12,31
+1994, 9,1994.708,355.63,355.63,359.05,30
+1994,10,1994.792,356.09,356.09,359.50,31
+1994,11,1994.875,357.56,357.56,359.72,30
+1994,12,1994.958,358.87,358.87,359.75,31
+1995, 1,1995.042,359.87,359.87,359.76,31
+1995, 2,1995.125,360.79,360.79,359.98,28
+1995, 3,1995.208,361.77,361.77,360.19,30
+1995, 4,1995.292,363.23,363.23,360.56,30
+1995, 5,1995.375,363.77,363.77,360.61,29
+1995, 6,1995.458,363.22,363.22,360.82,30
+1995, 7,1995.542,361.70,361.70,361.03,31
+1995, 8,1995.625,359.11,359.11,360.74,30
+1995, 9,1995.708,358.11,358.11,361.48,30
+1995,10,1995.792,357.97,357.97,361.34,31
+1995,11,1995.875,359.40,359.40,361.54,30
+1995,12,1995.958,360.61,360.61,361.49,30
+1996, 1,1996.042,362.04,362.04,361.84,31
+1996, 2,1996.125,363.17,363.17,362.29,29
+1996, 3,1996.208,364.17,364.17,362.55,31
+1996, 4,1996.292,364.51,364.51,361.81,29
+1996, 5,1996.375,365.16,365.16,362.10,31
+1996, 6,1996.458,364.93,364.93,362.64,30
+1996, 7,1996.542,363.53,363.53,362.83,31
+1996, 8,1996.625,361.38,361.38,362.99,30
+1996, 9,1996.708,359.60,359.60,363.03,28
+1996,10,1996.792,359.54,359.54,362.91,31
+1996,11,1996.875,360.84,360.84,362.99,30
+1996,12,1996.958,362.18,362.18,363.05,31
+1997, 1,1997.042,363.04,363.04,362.85,31
+1997, 2,1997.125,364.09,364.09,363.28,28
+1997, 3,1997.208,364.47,364.47,362.86,31
+1997, 4,1997.292,366.25,366.25,363.59,29
+1997, 5,1997.375,366.69,366.69,363.76,30
+1997, 6,1997.458,365.59,365.59,363.39,28
+1997, 7,1997.542,364.34,364.34,363.63,26
+1997, 8,1997.625,362.20,362.20,363.78,27
+1997, 9,1997.708,360.31,360.31,363.69,29
+1997,10,1997.792,360.71,360.71,364.01,31
+1997,11,1997.875,362.44,362.44,364.51,29
+1997,12,1997.958,364.33,364.33,365.12,31
+1998, 1,1998.042,365.18,365.18,365.01,30
+1998, 2,1998.125,365.98,365.98,365.18,27
+1998, 3,1998.208,367.13,367.13,365.50,31
+1998, 4,1998.292,368.61,368.61,366.00,30
+1998, 5,1998.375,369.49,369.49,366.60,30
+1998, 6,1998.458,368.95,368.95,366.73,30
+1998, 7,1998.542,367.74,367.74,367.05,30
+1998, 8,1998.625,365.79,365.79,367.37,31
+1998, 9,1998.708,364.01,364.01,367.34,29
+1998,10,1998.792,364.35,364.35,367.63,31
+1998,11,1998.875,365.52,365.52,367.58,23
+1998,12,1998.958,367.08,367.08,367.85,26
+1999, 1,1999.042,368.12,368.12,367.92,27
+1999, 2,1999.125,368.98,368.98,368.18,23
+1999, 3,1999.208,369.60,369.60,368.00,25
+1999, 4,1999.292,370.96,370.96,368.44,30
+1999, 5,1999.375,370.77,370.77,367.95,30
+1999, 6,1999.458,370.33,370.33,368.14,30
+1999, 7,1999.542,369.28,369.28,368.60,30
+1999, 8,1999.625,366.86,366.86,368.42,30
+1999, 9,1999.708,364.94,364.94,368.24,28
+1999,10,1999.792,365.35,365.35,368.62,31
+1999,11,1999.875,366.68,366.68,368.68,29
+1999,12,1999.958,368.04,368.04,368.72,29
+2000, 1,2000.042,369.25,369.25,369.06,27
+2000, 2,2000.125,369.50,369.50,368.79,23
+2000, 3,2000.208,370.56,370.56,369.04,31
+2000, 4,2000.292,371.82,371.82,369.29,29
+2000, 5,2000.375,371.51,371.51,368.64,29
+2000, 6,2000.458,371.71,371.71,369.49,29
+2000, 7,2000.542,369.85,369.85,369.18,28
+2000, 8,2000.625,368.20,368.20,369.78,28
+2000, 9,2000.708,366.91,366.91,370.19,30
+2000,10,2000.792,366.99,366.99,370.22,31
+2000,11,2000.875,368.33,368.33,370.29,25
+2000,12,2000.958,369.67,369.67,370.31,30
+2001, 1,2001.042,370.52,370.52,370.36,29
+2001, 2,2001.125,371.49,371.49,370.77,28
+2001, 3,2001.208,372.53,372.53,370.97,29
+2001, 4,2001.292,373.37,373.37,370.79,30
+2001, 5,2001.375,373.82,373.82,370.92,25
+2001, 6,2001.458,373.18,373.18,370.97,28
+2001, 7,2001.542,371.57,371.57,370.94,30
+2001, 8,2001.625,369.63,369.63,371.21,30
+2001, 9,2001.708,368.16,368.16,371.41,30
+2001,10,2001.792,368.42,368.42,371.65,31
+2001,11,2001.875,369.69,369.69,371.70,27
+2001,12,2001.958,371.18,371.18,371.89,31
+2002, 1,2002.042,372.45,372.45,372.23,29
+2002, 2,2002.125,373.14,373.14,372.26,27
+2002, 3,2002.208,373.93,373.93,372.22,27
+2002, 4,2002.292,375.00,375.00,372.33,30
+2002, 5,2002.375,375.65,375.65,372.74,31
+2002, 6,2002.458,375.50,375.50,373.29,30
+2002, 7,2002.542,374.00,374.00,373.36,31
+2002, 8,2002.625,371.83,371.83,373.47,31
+2002, 9,2002.708,370.66,370.66,374.01,29
+2002,10,2002.792,370.51,370.51,373.85,31
+2002,11,2002.875,372.20,372.20,374.33,30
+2002,12,2002.958,373.71,373.71,374.50,30
+2003, 1,2003.042,374.87,374.87,374.63,31
+2003, 2,2003.125,375.62,375.62,374.75,27
+2003, 3,2003.208,376.48,376.48,374.79,31
+2003, 4,2003.292,377.74,377.74,375.02,27
+2003, 5,2003.375,378.50,378.50,375.47,31
+2003, 6,2003.458,378.18,378.18,375.95,29
+2003, 7,2003.542,376.72,376.72,376.16,28
+2003, 8,2003.625,374.31,374.31,375.98,26
+2003, 9,2003.708,373.20,373.20,376.51,28
+2003,10,2003.792,373.10,373.10,376.45,30
+2003,11,2003.875,374.64,374.64,376.83,25
+2003,12,2003.958,375.93,375.93,376.74,30
+2004, 1,2004.042,377.00,377.00,376.79,31
+2004, 2,2004.125,377.87,377.87,377.01,27
+2004, 3,2004.208,378.73,378.73,377.06,30
+2004, 4,2004.292,380.41,380.41,377.65,29
+2004, 5,2004.375,380.63,380.63,377.51,28
+2004, 6,2004.458,379.56,379.56,377.28,26
+2004, 7,2004.542,377.61,377.61,377.03,28
+2004, 8,2004.625,376.15,376.15,377.85,19
+2004, 9,2004.708,374.11,374.11,377.49,16
+2004,10,2004.792,374.44,374.44,377.80,31
+2004,11,2004.875,375.93,375.93,378.13,27
+2004,12,2004.958,377.45,377.45,378.30,31
+2005, 1,2005.042,378.47,378.47,378.21,31
+2005, 2,2005.125,379.76,379.76,378.95,27
+2005, 3,2005.208,381.14,381.14,379.63,27
+2005, 4,2005.292,382.20,382.20,379.54,30
+2005, 5,2005.375,382.47,382.47,379.33,31
+2005, 6,2005.458,382.20,382.20,379.87,30
+2005, 7,2005.542,380.78,380.78,380.17,30
+2005, 8,2005.625,378.73,378.73,380.38,30
+2005, 9,2005.708,376.66,376.66,379.98,30
+2005,10,2005.792,376.98,376.98,380.29,14
+2005,11,2005.875,378.29,378.29,380.47,24
+2005,12,2005.958,379.92,379.92,380.75,29
+2006, 1,2006.042,381.35,381.35,381.11,26
+2006, 2,2006.125,382.16,382.16,381.35,25
+2006, 3,2006.208,382.66,382.66,381.11,30
+2006, 4,2006.292,384.73,384.73,382.01,27
+2006, 5,2006.375,384.98,384.98,381.83,29
+2006, 6,2006.458,384.09,384.09,381.78,29
+2006, 7,2006.542,382.38,382.38,381.81,27
+2006, 8,2006.625,380.45,380.45,382.10,28
+2006, 9,2006.708,378.92,378.92,382.22,29
+2006,10,2006.792,379.16,379.16,382.48,25
+2006,11,2006.875,380.18,380.18,382.38,30
+2006,12,2006.958,381.79,381.79,382.65,31
+2007, 1,2007.042,382.93,382.93,382.75,23
+2007, 2,2007.125,383.81,383.81,382.96,21
+2007, 3,2007.208,384.56,384.56,382.92,31
+2007, 4,2007.292,386.40,386.40,383.58,28
+2007, 5,2007.375,386.58,386.58,383.35,31
+2007, 6,2007.458,386.05,386.05,383.77,30
+2007, 7,2007.542,384.49,384.49,383.98,31
+2007, 8,2007.625,382.00,382.00,383.70,30
+2007, 9,2007.708,380.90,380.90,384.25,25
+2007,10,2007.792,381.14,381.14,384.47,30
+2007,11,2007.875,382.42,382.42,384.64,30
+2007,12,2007.958,383.89,383.89,384.81,28
+2008, 1,2008.042,385.44,385.44,385.26,31
+2008, 2,2008.125,385.73,385.73,384.92,28
+2008, 3,2008.208,385.97,385.97,384.41,30
+2008, 4,2008.292,387.16,387.16,384.50,28
+2008, 5,2008.375,388.50,388.50,385.39,26
+2008, 6,2008.458,387.88,387.88,385.56,24
+2008, 7,2008.542,386.42,386.42,385.86,10
+2008, 8,2008.625,384.15,384.15,385.83,28
+2008, 9,2008.708,383.09,383.09,386.34,30
+2008,10,2008.792,382.99,382.99,386.24,24
+2008,11,2008.875,384.13,384.13,386.31,29
+2008,12,2008.958,385.56,385.56,386.43,30
+2009, 1,2009.042,386.93,386.93,386.69,31
+2009, 2,2009.125,387.42,387.42,386.56,28
+2009, 3,2009.208,388.77,388.77,387.19,30
+2009, 4,2009.292,389.46,389.46,386.73,28
+2009, 5,2009.375,390.19,390.19,387.00,31
+2009, 6,2009.458,389.44,389.44,387.15,29
+2009, 7,2009.542,387.91,387.91,387.39,29
+2009, 8,2009.625,385.92,385.92,387.61,30
+2009, 9,2009.708,384.79,384.79,388.10,27
+2009,10,2009.792,384.39,384.39,387.70,31
+2009,11,2009.875,386.00,386.00,388.22,30
+2009,12,2009.958,387.27,387.27,388.15,21
+2010, 1,2010.042,388.45,388.45,388.21,28
+2010, 2,2010.125,389.82,389.82,388.96,24
+2010, 3,2010.208,391.08,391.08,389.50,28
+2010, 4,2010.292,392.46,392.46,389.72,28
+2010, 5,2010.375,392.95,392.95,389.76,30
+2010, 6,2010.458,392.03,392.03,389.75,29
+2010, 7,2010.542,390.13,390.13,389.61,30
+2010, 8,2010.625,388.15,388.15,389.84,31
+2010, 9,2010.708,386.80,386.80,390.11,30
+2010,10,2010.792,387.18,387.18,390.49,31
+2010,11,2010.875,388.59,388.59,390.80,29
+2010,12,2010.958,389.68,389.68,390.56,31
+2011, 1,2011.042,391.19,391.19,390.95,29
+2011, 2,2011.125,391.76,391.76,390.90,28
+2011, 3,2011.208,392.40,392.40,390.83,30
+2011, 4,2011.292,393.28,393.28,390.55,28
+2011, 5,2011.375,394.16,394.16,390.97,31
+2011, 6,2011.458,393.68,393.68,391.39,28
+2011, 7,2011.542,392.39,392.39,391.87,31
+2011, 8,2011.625,390.08,390.08,391.77,29
+2011, 9,2011.708,389.00,389.00,392.31,28
+2011,10,2011.792,388.92,388.92,392.23,31
+2011,11,2011.875,390.20,390.20,392.41,29
+2011,12,2011.958,391.80,391.80,392.68,31
+2012, 1,2012.042,393.10,393.10,392.86,30
+2012, 2,2012.125,393.65,393.65,392.79,26
+2012, 3,2012.208,394.44,394.44,392.87,31
+2012, 4,2012.292,396.19,396.19,393.45,30
+2012, 5,2012.375,396.77,396.77,393.58,31
+2012, 6,2012.458,395.77,395.77,393.48,29
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/TestRandom.cs
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/TestRandom.cs	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/TestRandom.cs	(revision 16038)
@@ -0,0 +1,147 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Tests {
+  public class TestRandom : IRandom {
+    #region Variables and Properties
+    private int[] intNumbers;
+    public int[] IntNumbers {
+      get { return intNumbers; }
+      set {
+        if (value == null) intNumbers = new int[0];
+        else intNumbers = value;
+      }
+    }
+    private int nextIntIndex;
+    private double[] doubleNumbers;
+    public double[] DoubleNumbers {
+      get { return doubleNumbers; }
+      set {
+        if (value == null) doubleNumbers = new double[0];
+        else doubleNumbers = value;
+      }
+    }
+    private int nextDoubleIndex;
+    #endregion
+
+    public TestRandom() {
+      intNumbers = new int[0];
+      doubleNumbers = new double[0];
+      nextIntIndex = 0;
+      nextDoubleIndex = 0;
+    }
+
+    protected TestRandom(TestRandom original, Cloner cloner) {
+      this.intNumbers = original.intNumbers.ToArray();
+      this.doubleNumbers = original.doubleNumbers.ToArray();
+    }
+
+    public TestRandom(int[] intNumbers, double[] doubleNumbers) {
+      if (intNumbers == null) this.intNumbers = new int[0];
+      else this.intNumbers = intNumbers;
+      if (doubleNumbers == null) this.doubleNumbers = new double[0];
+      else this.doubleNumbers = doubleNumbers;
+      nextIntIndex = 0;
+      nextDoubleIndex = 0;
+    }
+
+    #region IRandom Members
+
+    public void Reset() {
+      nextIntIndex = 0;
+      nextDoubleIndex = 0;
+    }
+
+    public void Reset(int seed) {
+      throw new NotImplementedException();
+    }
+
+    public int Next() {
+      if (nextIntIndex >= intNumbers.Length) throw new InvalidOperationException("Random: No more integer random numbers available");
+      return intNumbers[nextIntIndex++];
+    }
+
+    public int Next(int maxVal) {
+      if (nextIntIndex >= intNumbers.Length) throw new InvalidOperationException("Random: No more integer random numbers available");
+      if (IntNumbers[nextIntIndex] >= maxVal) throw new InvalidOperationException("Random: Next integer random number (" + IntNumbers[nextIntIndex] + ") is >= " + maxVal);
+      return intNumbers[nextIntIndex++];
+    }
+
+    public int Next(int minVal, int maxVal) {
+      if (nextIntIndex >= intNumbers.Length) throw new InvalidOperationException("Random: No more integer random numbers available");
+      if (IntNumbers[nextIntIndex] < minVal || IntNumbers[nextIntIndex] >= maxVal) throw new InvalidOperationException("Random: Next integer random number (" + IntNumbers[nextIntIndex] + ") is not in the range [" + minVal + ";" + maxVal + ")");
+      return intNumbers[nextIntIndex++];
+    }
+
+    public double NextDouble() {
+      if (nextDoubleIndex >= doubleNumbers.Length) throw new InvalidOperationException("Random: No more double random numbers available");
+      if (doubleNumbers[nextDoubleIndex] < 0.0 || doubleNumbers[nextDoubleIndex] >= 1.0) throw new InvalidOperationException("Random: Next double ranomd number (" + DoubleNumbers[nextDoubleIndex] + ") is not in the range [0;1)");
+      return doubleNumbers[nextDoubleIndex++];
+    }
+
+    #endregion
+
+    #region IItem Members
+
+    public string ItemName {
+      get { throw new NotImplementedException(); }
+    }
+
+    public string ItemDescription {
+      get { throw new NotImplementedException(); }
+    }
+
+    public Version ItemVersion {
+      get { throw new NotImplementedException(); }
+    }
+
+    public System.Drawing.Image ItemImage {
+      get { throw new NotImplementedException(); }
+    }
+
+#pragma warning disable 67
+    public event EventHandler ItemImageChanged;
+    public event EventHandler ToStringChanged;
+#pragma warning restore 67
+    #endregion
+
+    #region IDeepCloneable Members
+
+    public IDeepCloneable Clone(Cloner cloner) {
+      return new TestRandom(this, cloner);
+    }
+
+    #endregion
+
+    #region ICloneable Members
+
+    public object Clone() {
+      throw new NotImplementedException();
+    }
+
+    #endregion
+  }
+}
Index: /branches/2904_CalculateImpacts/HeuristicLab.Tests/app.config
===================================================================
--- /branches/2904_CalculateImpacts/HeuristicLab.Tests/app.config	(revision 16038)
+++ /branches/2904_CalculateImpacts/HeuristicLab.Tests/app.config	(revision 16038)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
+  </startup>
+</configuration>
