Index: branches/3106_AnalyticContinuedFractionsRegression/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleWithOSTest.cs
===================================================================
--- branches/3106_AnalyticContinuedFractionsRegression/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleWithOSTest.cs	(revision 17847)
+++ branches/3106_AnalyticContinuedFractionsRegression/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPSymbolicRegressionSampleWithOSTest.cs	(revision 17970)
@@ -69,17 +69,17 @@
         // been able to identify the real cause. Presumably, execution on a Xeon and a Core i7 processor 
         // leads to different results. 
-        Assert.AreEqual(0.99174959007940156, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8, Environment.NewLine + "Best Quality differs.");
-        Assert.AreEqual(0.9836083751914968, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8, Environment.NewLine + "Current Average Quality differs.");
-        Assert.AreEqual(0.98298394717065463, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8, Environment.NewLine + "Current Worst Quality differs.");
-        Assert.AreEqual(10100, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"), Environment.NewLine + "Evaluated Solutions differ.");
-        Assert.AreEqual(0.99174959007940156, bestTrainingSolution.TrainingRSquared, 1E-8, Environment.NewLine + "Best Training Solution Training R² differs.");
-        Assert.AreEqual(0.8962902319942232, bestTrainingSolution.TestRSquared, 1E-8, Environment.NewLine + "Best Training Solution Test R² differs.");
+        Assert.AreEqual(0.996270926227739, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8, Environment.NewLine + "Best Quality differs.");
+        Assert.AreEqual(0.95742113235788184, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8, Environment.NewLine + "Current Average Quality differs.");
+        Assert.AreEqual(0.83998301518760388, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8, Environment.NewLine + "Current Worst Quality differs.");
+        Assert.AreEqual(10600, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"), Environment.NewLine + "Evaluated Solutions differ.");
+        Assert.AreEqual(0.996270926227739, bestTrainingSolution.TrainingRSquared, 1E-8, Environment.NewLine + "Best Training Solution Training R² differs.");
+        Assert.AreEqual(0.9963422035282139, 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.");
+        Assert.AreEqual(0.9784573626949189, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8, Environment.NewLine + "Best Quality differs.");
+        Assert.AreEqual(0.82804701987417961, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8, Environment.NewLine + "Current Average Quality differs.");
+        Assert.AreEqual(0.700208975867862, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8, Environment.NewLine + "Current Worst Quality differs.");
+        Assert.AreEqual(10300, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"), Environment.NewLine + "Evaluated Solutions differ.");
+        Assert.AreEqual(0.9784573626949189, bestTrainingSolution.TrainingRSquared, 1E-8, Environment.NewLine + "Best Training Solution Training R² differs.");
+        Assert.AreEqual(0.0014620645328474451, bestTrainingSolution.TestRSquared, 1E-8, Environment.NewLine + "Best Training Solution Test R² differs.");
       }
     }
Index: branches/3106_AnalyticContinuedFractionsRegression/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GaussianProcessRegressionSampleTest.cs
===================================================================
--- branches/3106_AnalyticContinuedFractionsRegression/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GaussianProcessRegressionSampleTest.cs	(revision 17847)
+++ branches/3106_AnalyticContinuedFractionsRegression/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GaussianProcessRegressionSampleTest.cs	(revision 17970)
@@ -52,6 +52,6 @@
       gpr.Seed = 1618551877;
       SamplesUtils.RunAlgorithm(gpr);
-      Assert.AreEqual(-940.70700288855619, SamplesUtils.GetDoubleResult(gpr, "NegativeLogLikelihood"));
-      Assert.AreEqual(0.99563390794061979, SamplesUtils.GetDoubleResult(gpr, "Training R²"));
+      Assert.AreEqual(-992.445399028808, SamplesUtils.GetDoubleResult(gpr, "NegativeLogLikelihood"), 1e-8);
+      Assert.AreEqual(0.99559260785271853, SamplesUtils.GetDoubleResult(gpr, "Training R²"), 1e-8);
     }
 
Index: branches/3106_AnalyticContinuedFractionsRegression/HeuristicLab.Tests/HeuristicLab-3.3/Samples/ShapeConstrainedRegressionSampleTest.cs
===================================================================
--- branches/3106_AnalyticContinuedFractionsRegression/HeuristicLab.Tests/HeuristicLab-3.3/Samples/ShapeConstrainedRegressionSampleTest.cs	(revision 17970)
+++ branches/3106_AnalyticContinuedFractionsRegression/HeuristicLab.Tests/HeuristicLab-3.3/Samples/ShapeConstrainedRegressionSampleTest.cs	(revision 17970)
@@ -0,0 +1,98 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 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 HEAL.Attic;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Problems.DataAnalysis;
+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 ShapeConstrainedRegressionSampleTest {
+    private const string SampleFileName = "GA_Shape_Constrained_Regression";
+    private static readonly ProtoBufSerializer serializer = new ProtoBufSerializer();
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunShapeConstrainedRegressionSampleTest() {
+      var ga = CreateShapeConstrainedRegressionSample();
+      ga.SetSeedRandomly.Value = false;
+      SamplesUtils.RunAlgorithm(ga);
+
+      if (Environment.Is64BitProcess) {
+        Assert.AreEqual(0.355347729912352, SamplesUtils.GetDoubleResult(ga, "BestQuality"), 1E-8);
+        Assert.AreEqual(27.6606834433137, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"), 1E-8);
+        Assert.AreEqual(3359.91748220025, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"), 1E-8);
+        Assert.AreEqual(150200, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
+      } else {
+        Assert.AreEqual(0.317642788600248, SamplesUtils.GetDoubleResult(ga, "BestQuality"), 1E-8);
+        Assert.AreEqual(40.9805778810063, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"), 1E-8);
+        Assert.AreEqual(3359.91748220025, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"), 1E-8);
+        Assert.AreEqual(150200, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
+      }
+    }
+
+    public static GeneticAlgorithm CreateShapeConstrainedRegressionSample() {
+      var alg = new GeneticAlgorithm();
+      var provider = new FeynmanSmallInstanceProvider(0);
+      var instance = provider.GetDataDescriptors().Where(x => x.Name.Contains("Radiated gravitational wave power: -32/5*G**4/c**5*(m1*m2)**2*(m1+m2)/r**5 | no noise")).Single();
+      var problem = new ShapeConstrainedRegressionSingleObjectiveProblem();
+      problem.Load(provider.LoadData(instance));
+      var problemData = (IShapeConstrainedRegressionProblemData)problem.ProblemData;
+      problemData.ShapeConstraints.Add(new ShapeConstraint(new Interval(double.NegativeInfinity, 0), 1.0));
+      problemData.ShapeConstraints.Add(new ShapeConstraint("G", 1, new Interval(double.NegativeInfinity, 0), 1.0));
+      problemData.ShapeConstraints.Add(new ShapeConstraint("c", 1, new Interval(0, double.PositiveInfinity), 1.0));
+      problemData.ShapeConstraints.Add(new ShapeConstraint("m1", 1, new Interval(double.NegativeInfinity, 0), 1.0));
+      problemData.ShapeConstraints.Add(new ShapeConstraint("m2", 1, new Interval(double.NegativeInfinity, 0), 1.0));
+      problemData.ShapeConstraints.Add(new ShapeConstraint("r", 1, new Interval(0, double.PositiveInfinity), 1.0));
+
+      problemData.VariableRanges.SetInterval("G", new Interval(1, 2));
+      problemData.VariableRanges.SetInterval("c", new Interval(1, 2));
+      problemData.VariableRanges.SetInterval("m1", new Interval(1, 5));
+      problemData.VariableRanges.SetInterval("m2", new Interval(1, 5));
+      problemData.VariableRanges.SetInterval("r", new Interval(1, 2));
+      problem.ProblemData = problemData;
+
+
+      #region Algorithm Configuration
+      alg.Name = "Genetic Programming - Shape constrained Regression";
+      alg.Description = "A standard genetic programming algorithm to solve a shape constrained regression problem (Radiated gravitational wave power - Feynman instance)";
+      alg.Problem = problem;
+
+      SamplesUtils.ConfigureGeneticAlgorithmParameters<TournamentSelector, SubtreeCrossover, MultiSymbolicExpressionTreeManipulator>
+        (alg, popSize: 500, elites: 1, maxGens: 300, mutationRate: 0.15, tournGroupSize: 3);
+
+      alg.Seed.Value = 0;
+      #endregion
+
+      alg.Engine = new ParallelEngine.ParallelEngine();
+      return alg;
+    }
+  }
+}
