Index: /branches/DataPreprocessing/HeuristicLab 3.3.sln
===================================================================
--- /branches/DataPreprocessing/HeuristicLab 3.3.sln	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab 3.3.sln	(revision 11009)
@@ -34,4 +34,5 @@
 		{F62BCD22-FB83-4444-9401-8031C2487A86} = {F62BCD22-FB83-4444-9401-8031C2487A86}
 		{E0B45023-CB84-48A1-A1B7-8295B64B7BAD} = {E0B45023-CB84-48A1-A1B7-8295B64B7BAD}
+		{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED} = {C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}
 		{CDA28124-ACD0-4231-8EB0-C510B361F84E} = {CDA28124-ACD0-4231-8EB0-C510B361F84E}
 		{14AB8D24-25BC-400C-A846-4627AA945192} = {14AB8D24-25BC-400C-A846-4627AA945192}
@@ -80,4 +81,5 @@
 		{3C906172-E044-4DF0-B4FD-AA21192D5D3E} = {3C906172-E044-4DF0-B4FD-AA21192D5D3E}
 		{DC3D7072-7999-4719-B65D-3997744D5DC1} = {DC3D7072-7999-4719-B65D-3997744D5DC1}
+		{7FC70D74-1813-48B7-9CE5-0BD913457579} = {7FC70D74-1813-48B7-9CE5-0BD913457579}
 		{20831A74-D18F-42D9-A667-1CE3AF53DF93} = {20831A74-D18F-42D9-A667-1CE3AF53DF93}
 		{76945D76-CA61-4147-9DC2-0ACDCDDF87F9} = {76945D76-CA61-4147-9DC2-0ACDCDDF87F9}
@@ -111,4 +113,5 @@
 		{F4539FB6-4708-40C9-BE64-0A1390AEA197} = {F4539FB6-4708-40C9-BE64-0A1390AEA197}
 		{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C} = {A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}
+		{D2C39FBA-A1D5-403A-9211-B0A299A76313} = {D2C39FBA-A1D5-403A-9211-B0A299A76313}
 		{958B43BC-CC5C-4FA2-8628-2B3B01D890B6} = {958B43BC-CC5C-4FA2-8628-2B3B01D890B6}
 		{AB687BBE-1BFE-476B-906D-44237135431D} = {AB687BBE-1BFE-476B-906D-44237135431D}
@@ -389,4 +392,10 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Scripting.Views-3.3", "HeuristicLab.Scripting.Views\3.3\HeuristicLab.Scripting.Views-3.3.csproj", "{0C2917C8-7AA8-4E18-800A-C4D064F992ED}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.ParameterOptimization-3.3", "HeuristicLab.Problems.ParameterOptimization\3.3\HeuristicLab.Problems.ParameterOptimization-3.3.csproj", "{D2C39FBA-A1D5-403A-9211-B0A299A76313}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.ExternalEvaluation.Scilab-3.3", "HeuristicLab.Problems.ExternalEvaluation.Scilab\3.3\HeuristicLab.Problems.ExternalEvaluation.Scilab-3.3.csproj", "{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.GrammaticalEvolution-3.3", "HeuristicLab.Problems.GrammaticalEvolution\3.3\HeuristicLab.Problems.GrammaticalEvolution-3.3.csproj", "{7FC70D74-1813-48B7-9CE5-0BD913457579}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.DataPreprocessing-3.4", "HeuristicLab.DataPreprocessing\3.4\HeuristicLab.DataPreprocessing-3.4.csproj", "{3B90F866-70F8-43EF-A541-51819D255B7B}"
@@ -1894,4 +1903,40 @@
 		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Release|x86.ActiveCfg = Release|x86
 		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Release|x86.Build.0 = Release|x86
+		{D2C39FBA-A1D5-403A-9211-B0A299A76313}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D2C39FBA-A1D5-403A-9211-B0A299A76313}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D2C39FBA-A1D5-403A-9211-B0A299A76313}.Debug|x64.ActiveCfg = Debug|x64
+		{D2C39FBA-A1D5-403A-9211-B0A299A76313}.Debug|x64.Build.0 = Debug|x64
+		{D2C39FBA-A1D5-403A-9211-B0A299A76313}.Debug|x86.ActiveCfg = Debug|x86
+		{D2C39FBA-A1D5-403A-9211-B0A299A76313}.Debug|x86.Build.0 = Debug|x86
+		{D2C39FBA-A1D5-403A-9211-B0A299A76313}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{D2C39FBA-A1D5-403A-9211-B0A299A76313}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D2C39FBA-A1D5-403A-9211-B0A299A76313}.Release|x64.ActiveCfg = Release|x64
+		{D2C39FBA-A1D5-403A-9211-B0A299A76313}.Release|x64.Build.0 = Release|x64
+		{D2C39FBA-A1D5-403A-9211-B0A299A76313}.Release|x86.ActiveCfg = Release|x86
+		{D2C39FBA-A1D5-403A-9211-B0A299A76313}.Release|x86.Build.0 = Release|x86
+		{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}.Debug|x64.ActiveCfg = Debug|x64
+		{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}.Debug|x64.Build.0 = Debug|x64
+		{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}.Debug|x86.ActiveCfg = Debug|x86
+		{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}.Debug|x86.Build.0 = Debug|x86
+		{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}.Release|x64.ActiveCfg = Release|x64
+		{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}.Release|x64.Build.0 = Release|x64
+		{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}.Release|x86.ActiveCfg = Release|x86
+		{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}.Release|x86.Build.0 = Release|x86
+		{7FC70D74-1813-48B7-9CE5-0BD913457579}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{7FC70D74-1813-48B7-9CE5-0BD913457579}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{7FC70D74-1813-48B7-9CE5-0BD913457579}.Debug|x64.ActiveCfg = Debug|x64
+		{7FC70D74-1813-48B7-9CE5-0BD913457579}.Debug|x64.Build.0 = Debug|x64
+		{7FC70D74-1813-48B7-9CE5-0BD913457579}.Debug|x86.ActiveCfg = Debug|x86
+		{7FC70D74-1813-48B7-9CE5-0BD913457579}.Debug|x86.Build.0 = Debug|x86
+		{7FC70D74-1813-48B7-9CE5-0BD913457579}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{7FC70D74-1813-48B7-9CE5-0BD913457579}.Release|Any CPU.Build.0 = Release|Any CPU
+		{7FC70D74-1813-48B7-9CE5-0BD913457579}.Release|x64.ActiveCfg = Release|x64
+		{7FC70D74-1813-48B7-9CE5-0BD913457579}.Release|x64.Build.0 = Release|x64
+		{7FC70D74-1813-48B7-9CE5-0BD913457579}.Release|x86.ActiveCfg = Release|x86
+		{7FC70D74-1813-48B7-9CE5-0BD913457579}.Release|x86.Build.0 = Release|x86
 		{3B90F866-70F8-43EF-A541-51819D255B7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{3B90F866-70F8-43EF-A541-51819D255B7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
Index: /branches/DataPreprocessing/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs	(revision 11009)
@@ -131,45 +131,6 @@
     public static IClassificationSolution CreateRandomForestClassificationSolution(IClassificationProblemData problemData, int nTrees, double r, double m, int seed,
       out double rmsError, out double relClassificationError, out double outOfBagRmsError, out double outOfBagRelClassificationError) {
-      if (r <= 0 || r > 1) throw new ArgumentException("The R parameter in the random forest regression must be between 0 and 1.");
-      if (m <= 0 || m > 1) throw new ArgumentException("The M parameter in the random forest regression must be between 0 and 1.");
-
-      alglib.math.rndobject = new System.Random(seed);
-
-      Dataset dataset = problemData.Dataset;
-      string targetVariable = problemData.TargetVariable;
-      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
-      IEnumerable<int> rows = problemData.TrainingIndices;
-      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
-      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
-        throw new NotSupportedException("Random forest classification does not support NaN or infinity values in the input dataset.");
-
-      int info = 0;
-      alglib.decisionforest dForest = new alglib.decisionforest();
-      alglib.dfreport rep = new alglib.dfreport(); ;
-      int nRows = inputMatrix.GetLength(0);
-      int nColumns = inputMatrix.GetLength(1);
-      int sampleSize = Math.Max((int)Math.Round(r * nRows), 1);
-      int nFeatures = Math.Max((int)Math.Round(m * (nColumns - 1)), 1);
-
-
-      double[] classValues = problemData.ClassValues.ToArray();
-      int nClasses = problemData.Classes;
-      // map original class values to values [0..nClasses-1]
-      Dictionary<double, double> classIndices = new Dictionary<double, double>();
-      for (int i = 0; i < nClasses; i++) {
-        classIndices[classValues[i]] = i;
-      }
-      for (int row = 0; row < nRows; row++) {
-        inputMatrix[row, nColumns - 1] = classIndices[inputMatrix[row, nColumns - 1]];
-      }
-      // execute random forest algorithm      
-      alglib.dforest.dfbuildinternal(inputMatrix, nRows, nColumns - 1, nClasses, nTrees, sampleSize, nFeatures, alglib.dforest.dfusestrongsplits + alglib.dforest.dfuseevs, ref info, dForest.innerobj, rep.innerobj);
-      if (info != 1) throw new ArgumentException("Error in calculation of random forest classification solution");
-
-      rmsError = rep.rmserror;
-      outOfBagRmsError = rep.oobrmserror;
-      relClassificationError = rep.relclserror;
-      outOfBagRelClassificationError = rep.oobrelclserror;
-      return new RandomForestClassificationSolution((IClassificationProblemData)problemData.Clone(), new RandomForestModel(dForest, targetVariable, allowedInputVariables, classValues));
+      var model = RandomForestModel.CreateClassificationModel(problemData, nTrees, r, m, seed, out rmsError, out relClassificationError, out outOfBagRmsError, out outOfBagRelClassificationError);
+      return new RandomForestClassificationSolution((IClassificationProblemData)problemData.Clone(), model);
     }
     #endregion
Index: /branches/DataPreprocessing/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs	(revision 11009)
@@ -35,28 +35,35 @@
   [Item("RandomForestModel", "Represents a random forest for regression and classification.")]
   public sealed class RandomForestModel : NamedItem, IRandomForestModel {
-
+    // not persisted
     private alglib.decisionforest randomForest;
-    public alglib.decisionforest RandomForest {
-      get { return randomForest; }
-      set {
-        if (value != randomForest) {
-          if (value == null) throw new ArgumentNullException();
-          randomForest = value;
-          OnChanged(EventArgs.Empty);
-        }
-      }
-    }
-
-    [Storable]
-    private string targetVariable;
-    [Storable]
-    private string[] allowedInputVariables;
+    private alglib.decisionforest RandomForest {
+      get {
+        // recalculate lazily
+        if (randomForest.innerobj.trees == null || randomForest.innerobj.trees.Length == 0) RecalculateModel();
+        return randomForest;
+      }
+    }
+
+    // instead of storing the data of the model itself
+    // we instead only store data necessary to recalculate the same model lazily on demand
+    [Storable]
+    private int seed;
+    [Storable]
+    private IDataAnalysisProblemData originalTrainingData;
     [Storable]
     private double[] classValues;
+    [Storable]
+    private int nTrees;
+    [Storable]
+    private double r;
+    [Storable]
+    private double m;
+
+
     [StorableConstructor]
     private RandomForestModel(bool deserializing)
       : base(deserializing) {
-      if (deserializing)
-        randomForest = new alglib.decisionforest();
+      // for backwards compatibility (loading old solutions)
+      randomForest = new alglib.decisionforest();
     }
     private RandomForestModel(RandomForestModel original, Cloner cloner)
@@ -67,19 +74,36 @@
       randomForest.innerobj.ntrees = original.randomForest.innerobj.ntrees;
       randomForest.innerobj.nvars = original.randomForest.innerobj.nvars;
-      randomForest.innerobj.trees = (double[])original.randomForest.innerobj.trees.Clone();
-      targetVariable = original.targetVariable;
-      allowedInputVariables = (string[])original.allowedInputVariables.Clone();
-      if (original.classValues != null)
-        this.classValues = (double[])original.classValues.Clone();
-    }
-    public RandomForestModel(alglib.decisionforest randomForest, string targetVariable, IEnumerable<string> allowedInputVariables, double[] classValues = null)
+      // we assume that the trees array (double[]) is immutable in alglib
+      randomForest.innerobj.trees = original.randomForest.innerobj.trees;
+      
+      // allowedInputVariables is immutable so we don't need to clone
+      allowedInputVariables = original.allowedInputVariables;
+
+      // clone data which is necessary to rebuild the model
+      this.seed = original.seed;
+      this.originalTrainingData = cloner.Clone(original.originalTrainingData);
+      // classvalues is immutable so we don't need to clone
+      this.classValues = original.classValues;
+      this.nTrees = original.nTrees;
+      this.r = original.r;
+      this.m = original.m;
+    }
+
+    // random forest models can only be created through the static factory methods CreateRegressionModel and CreateClassificationModel
+    private RandomForestModel(alglib.decisionforest randomForest,
+      int seed, IDataAnalysisProblemData originalTrainingData,
+      int nTrees, double r, double m, double[] classValues = null)
       : base() {
       this.name = ItemName;
       this.description = ItemDescription;
+      // the model itself
       this.randomForest = randomForest;
-      this.targetVariable = targetVariable;
-      this.allowedInputVariables = allowedInputVariables.ToArray();
-      if (classValues != null)
-        this.classValues = (double[])classValues.Clone();
+      // data which is necessary for recalculation of the model
+      this.seed = seed;
+      this.originalTrainingData = (IDataAnalysisProblemData)originalTrainingData.Clone();
+      this.classValues = classValues;
+      this.nTrees = nTrees;
+      this.r = r;
+      this.m = m;
     }
 
@@ -88,6 +112,24 @@
     }
 
+    private void RecalculateModel() {
+      double rmsError, oobRmsError, relClassError, oobRelClassError;
+      var regressionProblemData = originalTrainingData as IRegressionProblemData;
+      var classificationProblemData = originalTrainingData as IClassificationProblemData;
+      if (regressionProblemData != null) {
+        var model = CreateRegressionModel(regressionProblemData,
+                                              nTrees, r, m, seed, out rmsError, out oobRmsError,
+                                              out relClassError, out oobRelClassError);
+        randomForest = model.randomForest;
+      } else if (classificationProblemData != null) {
+        var model = CreateClassificationModel(classificationProblemData,
+                                              nTrees, r, m, seed, out rmsError, out oobRmsError,
+                                              out relClassError, out oobRelClassError);
+        randomForest = model.randomForest;
+      }
+    }
+
     public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) {
-      double[,] inputData = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables, rows);
+      double[,] inputData = AlglibUtil.PrepareInputMatrix(dataset, AllowedInputVariables, rows);
+      AssertInputMatrix(inputData);
 
       int n = inputData.GetLength(0);
@@ -100,5 +142,5 @@
           x[column] = inputData[row, column];
         }
-        alglib.dfprocess(randomForest, x, ref y);
+        alglib.dfprocess(RandomForest, x, ref y);
         yield return y[0];
       }
@@ -106,10 +148,11 @@
 
     public IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows) {
-      double[,] inputData = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables, rows);
+      double[,] inputData = AlglibUtil.PrepareInputMatrix(dataset, AllowedInputVariables, rows);
+      AssertInputMatrix(inputData);
 
       int n = inputData.GetLength(0);
       int columns = inputData.GetLength(1);
       double[] x = new double[columns];
-      double[] y = new double[randomForest.innerobj.nclasses];
+      double[] y = new double[RandomForest.innerobj.nclasses];
 
       for (int row = 0; row < n; row++) {
@@ -144,18 +187,105 @@
     }
 
-    #region events
-    public event EventHandler Changed;
-    private void OnChanged(EventArgs e) {
-      var handlers = Changed;
-      if (handlers != null)
-        handlers(this, e);
-    }
-    #endregion
-
-    #region persistence
+    public static RandomForestModel CreateRegressionModel(IRegressionProblemData problemData, int nTrees, double r, double m, int seed,
+      out double rmsError, out double avgRelError, out double outOfBagAvgRelError, out double outOfBagRmsError) {
+
+      var variables = problemData.AllowedInputVariables.Concat(new string[] { problemData.TargetVariable });
+      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(problemData.Dataset, variables, problemData.TrainingIndices);
+
+      alglib.dfreport rep;
+      var dForest = CreateRandomForestModel(seed, inputMatrix, nTrees, r, m, 1, out rep);
+
+      rmsError = rep.rmserror;
+      avgRelError = rep.avgrelerror;
+      outOfBagAvgRelError = rep.oobavgrelerror;
+      outOfBagRmsError = rep.oobrmserror;
+
+      return new RandomForestModel(dForest,
+        seed, problemData,
+        nTrees, r, m);
+    }
+
+    public static RandomForestModel CreateClassificationModel(IClassificationProblemData problemData, int nTrees, double r, double m, int seed,
+      out double rmsError, out double outOfBagRmsError, out double relClassificationError, out double outOfBagRelClassificationError) {
+
+      var variables = problemData.AllowedInputVariables.Concat(new string[] { problemData.TargetVariable });
+      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(problemData.Dataset, variables, problemData.TrainingIndices);
+
+      var classValues = problemData.ClassValues.ToArray();
+      int nClasses = classValues.Length;
+
+      // map original class values to values [0..nClasses-1]
+      var classIndices = new Dictionary<double, double>();
+      for (int i = 0; i < nClasses; i++) {
+        classIndices[classValues[i]] = i;
+      }
+
+      int nRows = inputMatrix.GetLength(0);
+      int nColumns = inputMatrix.GetLength(1);
+      for (int row = 0; row < nRows; row++) {
+        inputMatrix[row, nColumns - 1] = classIndices[inputMatrix[row, nColumns - 1]];
+      }
+
+      alglib.dfreport rep;
+      var dForest = CreateRandomForestModel(seed, inputMatrix, nTrees, r, m, nClasses, out rep);
+
+      rmsError = rep.rmserror;
+      outOfBagRmsError = rep.oobrmserror;
+      relClassificationError = rep.relclserror;
+      outOfBagRelClassificationError = rep.oobrelclserror;
+
+      return new RandomForestModel(dForest,
+        seed, problemData,
+        nTrees, r, m, classValues);
+    }
+
+    private static alglib.decisionforest CreateRandomForestModel(int seed, double[,] inputMatrix, int nTrees, double r, double m, int nClasses, out alglib.dfreport rep) {
+      AssertParameters(r, m);
+      AssertInputMatrix(inputMatrix);
+
+      int info = 0;
+      alglib.math.rndobject = new System.Random(seed);
+      var dForest = new alglib.decisionforest();
+      rep = new alglib.dfreport();
+      int nRows = inputMatrix.GetLength(0);
+      int nColumns = inputMatrix.GetLength(1);
+      int sampleSize = Math.Max((int)Math.Round(r * nRows), 1);
+      int nFeatures = Math.Max((int)Math.Round(m * (nColumns - 1)), 1);
+
+      alglib.dforest.dfbuildinternal(inputMatrix, nRows, nColumns - 1, nClasses, nTrees, sampleSize, nFeatures, alglib.dforest.dfusestrongsplits + alglib.dforest.dfuseevs, ref info, dForest.innerobj, rep.innerobj);
+      if (info != 1) throw new ArgumentException("Error in calculation of random forest model");
+      return dForest;
+    }
+
+    private static void AssertParameters(double r, double m) {
+      if (r <= 0 || r > 1) throw new ArgumentException("The R parameter for random forest modeling must be between 0 and 1.");
+      if (m <= 0 || m > 1) throw new ArgumentException("The M parameter for random forest modeling must be between 0 and 1.");
+    }
+
+    private static void AssertInputMatrix(double[,] inputMatrix) {
+      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
+        throw new NotSupportedException("Random forest modeling does not support NaN or infinity values in the input dataset.");
+    }
+
+    #region persistence for backwards compatibility
+    // when the originalTrainingData is null this means the model was loaded from an old file 
+    // therefore, we cannot use the new persistence mechanism because the original data is not available anymore
+    // in such cases we still store the compete model
+    private bool IsCompatibilityLoaded { get { return originalTrainingData == null; } }
+
+    private string[] allowedInputVariables;
+    [Storable(Name = "allowedInputVariables")]
+    private string[] AllowedInputVariables {
+      get {
+        if (IsCompatibilityLoaded) return allowedInputVariables;
+        else return originalTrainingData.AllowedInputVariables.ToArray();
+      }
+      set { allowedInputVariables = value; }
+    }
     [Storable]
     private int RandomForestBufSize {
       get {
-        return randomForest.innerobj.bufsize;
+        if (IsCompatibilityLoaded) return randomForest.innerobj.bufsize;
+        else return 0;
       }
       set {
@@ -166,5 +296,6 @@
     private int RandomForestNClasses {
       get {
-        return randomForest.innerobj.nclasses;
+        if (IsCompatibilityLoaded) return randomForest.innerobj.nclasses;
+        else return 0;
       }
       set {
@@ -175,5 +306,6 @@
     private int RandomForestNTrees {
       get {
-        return randomForest.innerobj.ntrees;
+        if (IsCompatibilityLoaded) return randomForest.innerobj.ntrees;
+        else return 0;
       }
       set {
@@ -184,5 +316,6 @@
     private int RandomForestNVars {
       get {
-        return randomForest.innerobj.nvars;
+        if (IsCompatibilityLoaded) return randomForest.innerobj.nvars;
+        else return 0;
       }
       set {
@@ -193,5 +326,6 @@
     private double[] RandomForestTrees {
       get {
-        return randomForest.innerobj.trees;
+        if (IsCompatibilityLoaded) return randomForest.innerobj.trees;
+        else return new double[] { };
       }
       set {
Index: /branches/DataPreprocessing/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestRegression.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestRegression.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestRegression.cs	(revision 11009)
@@ -130,34 +130,6 @@
     public static IRegressionSolution CreateRandomForestRegressionSolution(IRegressionProblemData problemData, int nTrees, double r, double m, int seed,
       out double rmsError, out double avgRelError, out double outOfBagRmsError, out double outOfBagAvgRelError) {
-      if (r <= 0 || r > 1) throw new ArgumentException("The R parameter in the random forest regression must be between 0 and 1.");
-      if (m <= 0 || m > 1) throw new ArgumentException("The M parameter in the random forest regression must be between 0 and 1.");
-
-      alglib.math.rndobject = new System.Random(seed);
-
-      Dataset dataset = problemData.Dataset;
-      string targetVariable = problemData.TargetVariable;
-      IEnumerable<string> allowedInputVariables = problemData.AllowedInputVariables;
-      IEnumerable<int> rows = problemData.TrainingIndices;
-      double[,] inputMatrix = AlglibUtil.PrepareInputMatrix(dataset, allowedInputVariables.Concat(new string[] { targetVariable }), rows);
-      if (inputMatrix.Cast<double>().Any(x => double.IsNaN(x) || double.IsInfinity(x)))
-        throw new NotSupportedException("Random forest regression does not support NaN or infinity values in the input dataset.");
-
-      int info = 0;
-      alglib.decisionforest dForest = new alglib.decisionforest();
-      alglib.dfreport rep = new alglib.dfreport(); ;
-      int nRows = inputMatrix.GetLength(0);
-      int nColumns = inputMatrix.GetLength(1);
-      int sampleSize = Math.Max((int)Math.Round(r * nRows), 1);
-      int nFeatures = Math.Max((int)Math.Round(m * (nColumns - 1)), 1);
-
-      alglib.dforest.dfbuildinternal(inputMatrix, nRows, nColumns - 1, 1, nTrees, sampleSize, nFeatures, alglib.dforest.dfusestrongsplits + alglib.dforest.dfuseevs, ref info, dForest.innerobj, rep.innerobj);
-      if (info != 1) throw new ArgumentException("Error in calculation of random forest regression solution");
-
-      rmsError = rep.rmserror;
-      avgRelError = rep.avgrelerror;
-      outOfBagAvgRelError = rep.oobavgrelerror;
-      outOfBagRmsError = rep.oobrmserror;
-
-      return new RandomForestRegressionSolution((IRegressionProblemData)problemData.Clone(), new RandomForestModel(dForest, targetVariable, allowedInputVariables));
+      var model = RandomForestModel.CreateRegressionModel(problemData, nTrees, r, m, seed, out rmsError, out avgRelError, out outOfBagRmsError, out outOfBagAvgRelError);
+      return new RandomForestRegressionSolution((IRegressionProblemData)problemData.Clone(), model);
     }
     #endregion
Index: /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs	(revision 11009)
@@ -133,4 +133,7 @@
       get { return (ValueParameter<IntValue>)Parameters["MaximumEvaluatedSolutions"]; }
     }
+    private IFixedValueParameter<BoolValue> FillPopulationWithParentsParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters["FillPopulationWithParents"]; }
+    }
     #endregion
 
@@ -200,13 +203,13 @@
       set { ReevaluateElitesParameter.Value.Value = value; }
     }
-    private DoubleValue SuccessRatio {
+    public DoubleValue SuccessRatio {
       get { return SuccessRatioParameter.Value; }
       set { SuccessRatioParameter.Value = value; }
     }
-    private DoubleValue ComparisonFactorLowerBound {
+    public DoubleValue ComparisonFactorLowerBound {
       get { return ComparisonFactorLowerBoundParameter.Value; }
       set { ComparisonFactorLowerBoundParameter.Value = value; }
     }
-    private DoubleValue ComparisonFactorUpperBound {
+    public DoubleValue ComparisonFactorUpperBound {
       get { return ComparisonFactorUpperBoundParameter.Value; }
       set { ComparisonFactorUpperBoundParameter.Value = value; }
@@ -216,9 +219,9 @@
       set { ComparisonFactorModifierParameter.Value = value; }
     }
-    private DoubleValue MaximumSelectionPressure {
+    public DoubleValue MaximumSelectionPressure {
       get { return MaximumSelectionPressureParameter.Value; }
       set { MaximumSelectionPressureParameter.Value = value; }
     }
-    private BoolValue OffspringSelectionBeforeMutation {
+    public BoolValue OffspringSelectionBeforeMutation {
       get { return OffspringSelectionBeforeMutationParameter.Value; }
       set { OffspringSelectionBeforeMutationParameter.Value = value; }
@@ -235,4 +238,8 @@
       get { return MaximumEvaluatedSolutionsParameter.Value; }
       set { MaximumEvaluatedSolutionsParameter.Value = value; }
+    }
+    public bool FillPopulationWithParents {
+      get { return FillPopulationWithParentsParameter.Value.Value; }
+      set { FillPopulationWithParentsParameter.Value.Value = value; }
     }
     private RandomCreator RandomCreator {
@@ -271,4 +278,6 @@
         Parameters.Add(new FixedValueParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)", (BoolValue)new BoolValue(false).AsReadOnly()) { Hidden = true });
       }
+      if (!Parameters.ContainsKey("FillPopulationWithParents"))
+        Parameters.Add(new FixedValueParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded.", new BoolValue(false)) { Hidden = true });
       #endregion
 
@@ -315,4 +324,5 @@
       Parameters.Add(new ValueParameter<MultiAnalyzer>("IslandAnalyzer", "The operator used to analyze each island.", new MultiAnalyzer()));
       Parameters.Add(new ValueParameter<IntValue>("MaximumEvaluatedSolutions", "The maximum number of evaluated solutions (approximately).", new IntValue(int.MaxValue)));
+      Parameters.Add(new FixedValueParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded.", new BoolValue(true)) { Hidden = true });
 
       RandomCreator randomCreator = new RandomCreator();
@@ -379,4 +389,5 @@
       mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
       mainLoop.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions";
+      mainLoop.FillPopulationWithParentsParameter.ActualName = FillPopulationWithParentsParameter.Name;
       mainLoop.Successor = null;
 
Index: /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 11009)
@@ -129,4 +129,7 @@
     public LookupParameter<IntValue> EvaluatedSolutionsParameter {
       get { return (LookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; }
+    }
+    public IValueLookupParameter<BoolValue> FillPopulationWithParentsParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters["FillPopulationWithParents"]; }
     }
     #endregion
@@ -174,4 +177,5 @@
       Parameters.Add(new ValueLookupParameter<IOperator>("IslandAnalyzer", "The operator used to analyze each island."));
       Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of times solutions have been evaluated."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded."));
       #endregion
 
@@ -265,4 +269,5 @@
       mainOperator.SelectorParameter.ActualName = SelectorParameter.Name;
       mainOperator.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
+      mainOperator.FillPopulationWithParentsParameter.ActualName = FillPopulationWithParentsParameter.Name;
 
       islandAnalyzer2.Name = "Island Analyzer (placeholder)";
@@ -426,4 +431,6 @@
         Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)"));
       }
+      if (!Parameters.ContainsKey("FillPopulationWithParents"))
+        Parameters.Add(new ValueLookupParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded."));
       #endregion
     }
Index: /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs	(revision 11009)
@@ -112,4 +112,7 @@
       get { return (ValueParameter<IntValue>)Parameters["MaximumEvaluatedSolutions"]; }
     }
+    private IFixedValueParameter<BoolValue> FillPopulationWithParentsParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters["FillPopulationWithParents"]; }
+    }
     #endregion
 
@@ -190,4 +193,8 @@
       get { return MaximumEvaluatedSolutionsParameter.Value; }
       set { MaximumEvaluatedSolutionsParameter.Value = value; }
+    }
+    public bool FillPopulationWithParents {
+      get { return FillPopulationWithParentsParameter.Value.Value; }
+      set { FillPopulationWithParentsParameter.Value.Value = value; }
     }
     private RandomCreator RandomCreator {
@@ -219,4 +226,6 @@
         Parameters.Add(new FixedValueParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)", (BoolValue)new BoolValue(false).AsReadOnly()) { Hidden = true });
       }
+      if (!Parameters.ContainsKey("FillPopulationWithParents"))
+        Parameters.Add(new FixedValueParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded.", new BoolValue(false)) { Hidden = true });
       #endregion
 
@@ -254,4 +263,5 @@
       Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer()));
       Parameters.Add(new ValueParameter<IntValue>("MaximumEvaluatedSolutions", "The maximum number of evaluated solutions (approximately).", new IntValue(int.MaxValue)));
+      Parameters.Add(new FixedValueParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded.", new BoolValue(false)) { Hidden = true });
 
       RandomCreator randomCreator = new RandomCreator();
@@ -297,4 +307,5 @@
       mainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
       mainLoop.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
+      mainLoop.FillPopulationWithParentsParameter.ActualName = FillPopulationWithParentsParameter.Name;
 
       foreach (ISelector selector in ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name))
Index: /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 11009)
@@ -96,4 +96,7 @@
       get { return (LookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; }
     }
+    public IValueLookupParameter<BoolValue> FillPopulationWithParentsParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters["FillPopulationWithParents"]; }
+    }
     #endregion
 
@@ -118,4 +121,6 @@
         Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)"));
       }
+      if (!Parameters.ContainsKey("FillPopulationWithParents"))
+        Parameters.Add(new ValueLookupParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded."));
       #endregion
     }
@@ -144,4 +149,5 @@
       Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation."));
       Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of times solutions have been evaluated."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded."));
       #endregion
 
@@ -197,4 +203,5 @@
       mainOperator.SelectorParameter.ActualName = SelectorParameter.Name;
       mainOperator.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
+      mainOperator.FillPopulationWithParentsParameter.ActualName = FillPopulationWithParentsParameter.Name;
 
       generationsCounter.Increment = new IntValue(1);
Index: /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainOperator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainOperator.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainOperator.cs	(revision 11009)
@@ -88,4 +88,7 @@
       get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
     }
+    public IValueLookupParameter<BoolValue> FillPopulationWithParentsParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters["FillPopulationWithParents"]; }
+    }
     #endregion
 
@@ -110,4 +113,6 @@
         Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)"));
       }
+      if (!Parameters.ContainsKey("FillPopulationWithParents"))
+        Parameters.Add(new ValueLookupParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded."));
       #endregion
     }
@@ -132,4 +137,5 @@
       Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure that terminates the algorithm."));
       Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded."));
       #endregion
 
@@ -261,4 +267,5 @@
       offspringSelector.OffspringPopulationWinnersParameter.ActualName = "OffspringPopulationWinners";
       offspringSelector.SuccessfulOffspringParameter.ActualName = "SuccessfulOffspring";
+      offspringSelector.FillPopulationWithParentsParameter.ActualName = FillPopulationWithParentsParameter.Name;
 
       bestSelector.CopySelected = new BoolValue(false);
Index: /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs	(revision 11009)
@@ -121,4 +121,7 @@
       get { return (ValueParameter<IntValue>)Parameters["MaximumEvaluatedSolutions"]; }
     }
+    private IFixedValueParameter<BoolValue> FillPopulationWithParentsParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters["FillPopulationWithParents"]; }
+    }
     #endregion
 
@@ -211,4 +214,8 @@
       get { return MaximumEvaluatedSolutionsParameter.Value; }
       set { MaximumEvaluatedSolutionsParameter.Value = value; }
+    }
+    public bool FillPopulationWithParents {
+      get { return FillPopulationWithParentsParameter.Value.Value; }
+      set { FillPopulationWithParentsParameter.Value.Value = value; }
     }
     private RandomCreator RandomCreator {
@@ -247,4 +254,6 @@
         Parameters.Add(new FixedValueParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)", (BoolValue)new BoolValue(false).AsReadOnly()) { Hidden = true });
       }
+      if (!Parameters.ContainsKey("FillPopulationWithParents"))
+        Parameters.Add(new FixedValueParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded.", new BoolValue(false)) { Hidden = true });
       #endregion
 
@@ -287,4 +296,5 @@
       Parameters.Add(new ValueParameter<MultiAnalyzer>("VillageAnalyzer", "The operator used to analyze each village.", new MultiAnalyzer()));
       Parameters.Add(new ValueParameter<IntValue>("MaximumEvaluatedSolutions", "The maximum number of evaluated solutions (approximately).", new IntValue(int.MaxValue)));
+      Parameters.Add(new FixedValueParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded.", new BoolValue(true)) { Hidden = true });
 
       RandomCreator randomCreator = new RandomCreator();
@@ -346,4 +356,5 @@
       mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
       mainLoop.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions";
+      mainLoop.FillPopulationWithParentsParameter.ActualName = FillPopulationWithParentsParameter.Name;
       mainLoop.Successor = null;
 
Index: /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs	(revision 11009)
@@ -111,4 +111,7 @@
     public LookupParameter<IntValue> EvaluatedSolutionsParameter {
       get { return (LookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; }
+    }
+    public IValueLookupParameter<BoolValue> FillPopulationWithParentsParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters["FillPopulationWithParents"]; }
     }
     #endregion
@@ -150,4 +153,5 @@
       Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation."));
       Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of times solutions have been evaluated."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded."));
       #endregion
 
@@ -253,4 +257,5 @@
       mainOperator.SelectorParameter.ActualName = SelectorParameter.Name;
       mainOperator.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
+      mainOperator.FillPopulationWithParentsParameter.ActualName = FillPopulationWithParentsParameter.Name;
 
       villageAnalyzer2.Name = "Village Analyzer (placeholder)";
@@ -436,4 +441,6 @@
         Parameters.Add(new ValueLookupParameter<BoolValue>("ReevaluateElites", "Flag to determine if elite individuals should be reevaluated (i.e., if stochastic fitness functions are used.)"));
       }
+      if (!Parameters.ContainsKey("FillPopulationWithParents"))
+        Parameters.Add(new ValueLookupParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded."));
       #endregion
     }
Index: /branches/DataPreprocessing/HeuristicLab.Common/3.3/ArrayExtensions.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Common/3.3/ArrayExtensions.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Common/3.3/ArrayExtensions.cs	(revision 11009)
@@ -26,32 +26,27 @@
 namespace HeuristicLab.Common {
   public static class ArrayExtensions {
-    public static void StableSort<T>(this T[] values) {
-      values.StableSort(0, values.Length);
+
+    public static void StableSort<T>(this T[] values, Comparison<T> comparison) {
+      values.StableSort(new StableSortComparer<T>(comparison));
     }
 
-    public static void StableSort<T>(this T[] values, int index, int count) {
-      var sortedArray = values.Skip(index).Take(count).OrderBy(x => x).ToArray();
-      Array.ConstrainedCopy(sortedArray, 0, values, index, count);
+    public static void StableSort<T>(this T[] values, IComparer<T> comparer = null) {
+      var sorted = values.OrderBy(x => x, comparer ?? Comparer<T>.Default).ToArray();
+      Array.ConstrainedCopy(sorted, 0, values, 0, values.Length);
     }
 
-    public static void StableSort<T>(this T[] values, IComparer<T> comparer) {
-      values.StableSort(0, values.Length, comparer);
+    public static void StableSort<T>(this T[] values, int index, int length, Comparison<T> comparison) {
+      values.StableSort(index, length, new StableSortComparer<T>(comparison));
     }
 
-    public static void StableSort<T>(this T[] values, int index, int count, IComparer<T> comparer) {
-      var sortedArray = values.Skip(index).Take(count).OrderBy(x => x, comparer).ToArray();
-      Array.ConstrainedCopy(sortedArray, 0, values, index, count);
+    public static void StableSort<T>(this T[] values, int index, int length, IComparer<T> comparer = null) {
+      if (index < 0) throw new ArgumentOutOfRangeException("index is less than zero.");
+      if (length < 0) throw new ArgumentOutOfRangeException("length is less than zero.");
+      if (index + length > values.Length) throw new ArgumentException("index and length do not specify a valid range in the array.");
+      var sortedArray = values.Skip(index).Take(length).OrderBy(x => x, comparer ?? Comparer<T>.Default).ToArray();
+      Array.ConstrainedCopy(sortedArray, 0, values, index, length);
     }
 
-    public static void StableSort<T>(this T[] values, Comparison<T> comparison) {
-      values.StableSort(0, values.Length, comparison);
-    }
-
-    public static void StableSort<T>(this T[] values, int index, int count, Comparison<T> comparison) {
-      var sortedArray = values.Skip(index).Take(count).OrderBy(x => x, new StableSortComparer<T>(comparison)).ToArray();
-      Array.ConstrainedCopy(sortedArray, 0, values, index, count);
-    }
-
-    public class StableSortComparer<T> : IComparer<T> {
+    private class StableSortComparer<T> : IComparer<T> {
       public StableSortComparer(Comparison<T> comparison) {
         this.comparison = comparison;
Index: /branches/DataPreprocessing/HeuristicLab.Common/3.3/ListExtensions.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Common/3.3/ListExtensions.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Common/3.3/ListExtensions.cs	(revision 11009)
@@ -26,10 +26,24 @@
 namespace HeuristicLab.Common {
   public static class ListExtensions {
-    public static void StableSort<T>(this List<T> values) {
-      values.StableSort(0, values.Count);
+
+    public static void StableSort<T>(this List<T> values, Comparison<T> comparison) {
+      values.StableSort(new StableSortComparer<T>(comparison));
     }
 
-    public static void StableSort<T>(this List<T> values, int index, int count) {
-      var orderedList = values.Skip(index).Take(count).OrderBy(x => x);
+    public static void StableSort<T>(this List<T> values, IComparer<T> comparer = null) {
+      int i = 0;
+      foreach (var e in values.OrderBy(x => x, comparer ?? Comparer<T>.Default))
+        values[i++] = e;
+    }
+
+    public static void StableSort<T>(this List<T> values, int index, int count, Comparison<T> comparison) {
+      values.StableSort(index, count, new StableSortComparer<T>(comparison));
+    }
+
+    public static void StableSort<T>(this List<T> values, int index, int count, IComparer<T> comparer = null) {
+      if (index < 0) throw new ArgumentOutOfRangeException("index is less than zero.");
+      if (count < 0) throw new ArgumentOutOfRangeException("count is less than zero.");
+      if (index + count > values.Count) throw new ArgumentException("index and count do not specify a valid range in the List<T>.");
+      var orderedList = values.Skip(index).Take(count).OrderBy(x => x, comparer ?? Comparer<T>.Default);
       int i = index;
       foreach (var e in orderedList)
@@ -37,27 +51,5 @@
     }
 
-    public static void StableSort<T>(this List<T> values, IComparer<T> comparer) {
-      values.StableSort(0, values.Count, comparer);
-    }
-
-    public static void StableSort<T>(this List<T> values, int index, int count, IComparer<T> comparer) {
-      var orderedList = values.OrderBy(x => x, comparer);
-      int i = 0;
-      foreach (var e in orderedList)
-        values[i++] = e;
-    }
-
-    public static void StableSort<T>(this List<T> values, Comparison<T> comparison) {
-      values.StableSort(0, values.Count, comparison);
-    }
-
-    public static void StableSort<T>(this List<T> values, int index, int count, Comparison<T> comparison) {
-      var orderedList = values.OrderBy(x => x, new StableSortComparer<T>(comparison));
-      int i = 0;
-      foreach (var e in orderedList)
-        values[i++] = e;
-    }
-
-    public class StableSortComparer<T> : IComparer<T> {
+    private class StableSortComparer<T> : IComparer<T> {
       public StableSortComparer(Comparison<T> comparison) {
         this.comparison = comparison;
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/Formatters/SymbolicExpressionTreeLatexFormatter.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/Formatters/SymbolicExpressionTreeLatexFormatter.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/Formatters/SymbolicExpressionTreeLatexFormatter.cs	(revision 11009)
@@ -22,4 +22,5 @@
 using System;
 using System.Collections.Generic;
+using System.Drawing;
 using System.Globalization;
 using System.Linq;
@@ -36,9 +37,10 @@
       {"StartSymbol","RPB"}
     };
-    private readonly ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode> layoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode>();
+
+    private readonly ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode> layoutEngine;
 
     public SymbolicExpressionTreeLatexFormatter()
       : base("LaTeX/PDF Formatter", "Formatter for symbolic expression trees for use with latex package tikz.") {
-      layoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode> {
+      layoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode>(n => n.Subtrees) {
         HorizontalSpacing = 2,
         VerticalSpacing = 2,
@@ -57,10 +59,7 @@
 
     public string Format(ISymbolicExpressionTree symbolicExpressionTree) {
-      layoutEngine.Reset();
       var root = symbolicExpressionTree.Root;
       var actualRoot = root.SubtreeCount == 0 ? root.GetSubtree(0) : root;
-      layoutEngine.Initialize(actualRoot, x => x.Subtrees);
-      layoutEngine.CalculateLayout();
-      var nodeCoordinates = layoutEngine.GetCoordinates();
+      var nodeCoordinates = layoutEngine.CalculateLayout(actualRoot).ToDictionary(n => n.Content, n => new PointF(n.X, n.Y));
       var sb = new StringBuilder();
       var nl = Environment.NewLine;
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj	(revision 11009)
@@ -272,5 +272,4 @@
     </BootstrapperPackage>
   </ItemGroup>
-  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/BoxesLayoutEngine.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/BoxesLayoutEngine.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/BoxesLayoutEngine.cs	(revision 11009)
@@ -1,93 +1,77 @@
-﻿
+﻿#region License Information
+
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Drawing;
 using System.Linq;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
   public class BoxesLayoutEngine<T> : ILayoutEngine<T> where T : class {
-    private readonly Dictionary<T, VisualTreeNode<T>> nodeMap;
-
     public int NodeWidth { get; set; }
     public int NodeHeight { get; set; }
     public int HorizontalSpacing { get; set; }
     public int VerticalSpacing { get; set; }
-    private VisualTreeNode<T> layoutRoot;
 
-    public int Width { get; private set; }
-    public int Height { get; private set; }
+    private readonly Func<T, IEnumerable<T>> GetChildren;
+    private readonly Func<T, int> GetLength;
+    private readonly Func<T, int> GetDepth;
 
-    public Func<T, IEnumerable<T>> GetChildren { get; set; }
-    public Func<T, int> GetLength { get; set; }
-    public Func<T, int> GetDepth { get; set; }
+    public BoxesLayoutEngine(Func<T, IEnumerable<T>> GetChildren, Func<T, int> GetLength, Func<T, int> GetDepth) {
+      if (GetChildren == null) throw new ArgumentNullException("GetChildren");
+      if (GetLength == null) throw new ArgumentNullException("GetLength");
+      if (GetDepth == null) throw new ArgumentNullException("GetDepth");
 
-    public BoxesLayoutEngine() {
-      nodeMap = new Dictionary<T, VisualTreeNode<T>>();
+      this.GetChildren = GetChildren;
+      this.GetLength = GetLength;
+      this.GetDepth = GetDepth;
     }
 
-    public void CalculateLayout() {
-      throw new Exception("The BoxesLayoutEngine does not support arbitrary bounds. Please use method CalculateLayout(Width, Height)");
+
+    public IEnumerable<VisualTreeNode<T>> CalculateLayout(T root, float width, float height) {
+      var nodeMap = new Dictionary<T, VisualTreeNode<T>>();
+      CreateVisualNodes(root, nodeMap);
+      RecursiveLayout(nodeMap, nodeMap[root], 0, 0, (int)Math.Round(width), (int)Math.Round(height) / GetDepth(root));
+      return nodeMap.Values;
     }
 
-    public void CalculateLayout(float width, float height) {
-      Width = (int)Math.Round(width);
-      Height = (int)Math.Round(height);
-      Reset();
-      RecursiveLayout(layoutRoot, 0, 0, Width, Height / GetDepth(layoutRoot.Content));
-    }
-
-    public void Initialize(T root, Func<T, IEnumerable<T>> getChildren, Func<T, int> getLength, Func<T, int> getDepth) {
-      if (getChildren == null || getLength == null || getDepth == null)
-        throw new ArgumentNullException("The BoxesLayoutEngine requires all of the lambdas: (getChildren, getLength and getDepth) to be defined.");
-      GetChildren = getChildren;
-      GetLength = getLength;
-      GetDepth = getDepth;
-      Clear();
-      Expand(root); // produce the nodeMap
-      layoutRoot = nodeMap[root];
-    }
-
-    private void Expand(T root) {
+    private void CreateVisualNodes(T root, Dictionary<T, VisualTreeNode<T>> map) {
       var node = new VisualTreeNode<T>(root) {
         PreferredWidth = NodeWidth,
         PreferredHeight = NodeHeight
       };
-      nodeMap.Add(root, node);
+
+      map.Add(root, node);
       var children = GetChildren(root).ToList();
       if (children.Any()) {
         foreach (var child in children) {
-          Expand(child);
+          CreateVisualNodes(child, map);
         }
       }
     }
 
-    public void Center(float width, float height) {
-      // does nothing because the BoxesLayout centers the tree by default
-    }
-
-    public void Clear() {
-      nodeMap.Clear();
-      layoutRoot = null;
-    }
-
-    public void Reset() {
-      foreach (var node in nodeMap.Values) {
-        node.X = 0;
-        node.Y = 0;
-      }
-    }
-
-    public Dictionary<T, PointF> GetCoordinates() {
-      return nodeMap.ToDictionary(x => x.Key, x => new PointF(x.Value.X, x.Value.Y));
-    }
-
-    public void FitToBounds(float width, float height) {
-      // does nothing because the BoxesLayout is by default stretched on the whole drawing area
-    }
-
-    private void RecursiveLayout(VisualTreeNode<T> visualTreeNode, int x, int y, int width, int height) {
+    private void RecursiveLayout(Dictionary<T, VisualTreeNode<T>> nodeMap, VisualTreeNode<T> visualTreeNode, int x, int y, int width, int height) {
       float center_x = x + width / 2;
       float center_y = y + height / 2;
-      int actualWidth = width - VerticalSpacing;
+      int actualWidth = width - HorizontalSpacing;
       int actualHeight = height - VerticalSpacing;
 
@@ -127,10 +111,6 @@
       for (int i = 0; i < children.Count; i++) {
         xBoundaries[i + 1] = (int)(xBoundaries[i] + (width * (double)GetLength(children[i])) / (GetLength(node) - 1));
-        RecursiveLayout(nodeMap[children[i]], xBoundaries[i], y + height, xBoundaries[i + 1] - xBoundaries[i], height);
+        RecursiveLayout(nodeMap, nodeMap[children[i]], xBoundaries[i], y + height, xBoundaries[i + 1] - xBoundaries[i], height);
       }
-    }
-
-    public IEnumerable<VisualTreeNode<T>> GetVisualNodes() {
-      return nodeMap.Values;
     }
   }
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/ILayoutEngine.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/ILayoutEngine.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/ILayoutEngine.cs	(revision 11009)
@@ -1,6 +1,26 @@
-﻿
-using System;
+﻿#region License Information
+
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Drawing;
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
@@ -11,17 +31,5 @@
     int VerticalSpacing { get; set; }
 
-    void CalculateLayout();
-    void CalculateLayout(float width, float height);
-    void Initialize(T root, Func<T, IEnumerable<T>> getChildren, Func<T, int> getLength = null, Func<T, int> getDepth = null);
-    void Clear();
-    void Reset();
-
-    // function members necessary to navigate the tree structure
-    Func<T, IEnumerable<T>> GetChildren { get; set; }
-    Func<T, int> GetLength { get; set; }
-    Func<T, int> GetDepth { get; set; }
-
-    IEnumerable<VisualTreeNode<T>> GetVisualNodes();
-    Dictionary<T, PointF> GetCoordinates();
+    IEnumerable<VisualTreeNode<T>> CalculateLayout(T root, float width, float height);
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/LayoutNode.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/LayoutNode.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/LayoutNode.cs	(revision 11009)
@@ -25,5 +25,5 @@
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
-  public class LayoutNode<T> : object where T : class {
+  internal class LayoutNode<T> : object where T : class {
     public float Width { get; set; }
     public float Height { get; set; }
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/ReingoldTilfordLayoutEngine.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/ReingoldTilfordLayoutEngine.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/LayoutEngines/ReingoldTilfordLayoutEngine.cs	(revision 11009)
@@ -7,5 +7,4 @@
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
   public class ReingoldTilfordLayoutEngine<T> : ILayoutEngine<T> where T : class {
-    private readonly Dictionary<T, LayoutNode<T>> nodeMap; // provides a reverse mapping T => LayoutNode
     public int NodeWidth { get; set; }
     public int NodeHeight { get; set; }
@@ -22,29 +21,38 @@
     }
 
-    public Func<T, IEnumerable<T>> GetChildren { get; set; }
-    public Func<T, int> GetLength { get; set; }
-    public Func<T, int> GetDepth { get; set; }
-    private LayoutNode<T> layoutRoot;
-
-    public ReingoldTilfordLayoutEngine() {
-      nodeMap = new Dictionary<T, LayoutNode<T>>();
-    }
-
-    public ReingoldTilfordLayoutEngine(T root, Func<T, IEnumerable<T>> childrenFunc)
-      : this() {
-      Initialize(root, childrenFunc);
-    }
-
-    public void Initialize(T root, Func<T, IEnumerable<T>> getChildren, Func<T, int> getLength = null, Func<T, int> getDepth = null) {
-      GetChildren = getChildren;
-      Clear();
-      var node = new LayoutNode<T> { Content = root, Width = NodeWidth, Height = NodeHeight };
-      node.Ancestor = node;
-      layoutRoot = node;
-      Expand(node);
-    }
-
-    private void Expand(LayoutNode<T> lRoot) {
-      nodeMap.Add(lRoot.Content, lRoot);
+    private readonly Func<T, IEnumerable<T>> GetChildren;
+
+    public ReingoldTilfordLayoutEngine(Func<T, IEnumerable<T>> GetChildren) {
+      this.GetChildren = GetChildren;
+    }
+
+    public IEnumerable<VisualTreeNode<T>> CalculateLayout(T root) {
+      return CalculateLayout(root, 0, 0);
+    }
+
+    public IEnumerable<VisualTreeNode<T>> CalculateLayout(T root, float width, float height) {
+      Dictionary<T, LayoutNode<T>> layoutNodeMap = new Dictionary<T, LayoutNode<T>>();
+      var layoutRoot = new LayoutNode<T> { Content = root, Width = NodeWidth, Height = NodeHeight, };
+      layoutRoot.Ancestor = layoutRoot;
+      Expand(layoutRoot, layoutNodeMap);
+
+      FirstWalk(layoutRoot);
+      SecondWalk(layoutRoot, -layoutRoot.Prelim);
+      NormalizeCoordinates(layoutNodeMap.Values);
+      if (height != 0 && width != 0) {
+        FitToBounds(width, height, layoutNodeMap.Values);
+        Center(width, height, layoutNodeMap.Values);
+      }
+
+      return layoutNodeMap.Values.Select(x => new VisualTreeNode<T>(x.Content) {
+        Width = (int)Math.Round(x.Width),
+        Height = (int)Math.Round(x.Height),
+        X = (int)Math.Round(x.X),
+        Y = (int)Math.Round(x.Y)
+      });
+    }
+
+    private void Expand(LayoutNode<T> lRoot, Dictionary<T, LayoutNode<T>> map) {
+      map.Add(lRoot.Content, lRoot);
       var children = GetChildren(lRoot.Content).ToList();
       if (!children.Any()) return;
@@ -61,59 +69,13 @@
         node.Ancestor = node;
         lRoot.Children.Add(node);
-        Expand(node);
-      }
-    }
-
-    public IEnumerable<VisualTreeNode<T>> GetVisualNodes() {
-      return nodeMap.Values.Select(x => new VisualTreeNode<T>(x.Content) {
-        Width = (int)Math.Round(x.Width),
-        Height = (int)Math.Round(x.Height),
-        X = (int)Math.Round(x.X),
-        Y = (int)Math.Round(x.Y)
-      });
-    }
-
-    public IEnumerable<LayoutNode<T>> GetLayoutNodes() {
-      return nodeMap.Values;
-    }
-
-    public void AddNode(T content) {
-      if (nodeMap.ContainsKey(content)) { throw new ArgumentException("Content already present in the dictionary."); }
-      var node = new LayoutNode<T> { Content = content };
-      nodeMap.Add(content, node);
-    }
-
-    public void AddNode(LayoutNode<T> node) {
-      var content = node.Content;
-      if (nodeMap.ContainsKey(content)) { throw new ArgumentException("Content already present in the dictionary."); }
-      nodeMap.Add(content, node);
-    }
-
-    public void AddNodes(IEnumerable<LayoutNode<T>> nodes) {
-      foreach (var node in nodes)
-        nodeMap.Add(node.Content, node);
-    }
-
-    public LayoutNode<T> GetNode(T content) {
-      LayoutNode<T> layoutNode;
-      nodeMap.TryGetValue(content, out layoutNode);
-      return layoutNode;
-    }
-
-    public void ResetCoordinates() {
-      foreach (var node in nodeMap.Values) {
-        node.ResetCoordinates();
-      }
-    }
-
-    public Dictionary<T, PointF> GetCoordinates() {
-      return nodeMap.ToDictionary(x => x.Key, x => new PointF(x.Value.X, x.Value.Y));
-    }
+        Expand(node, map);
+      }
+    }
+
 
     /// <summary>
     /// Transform LayoutNode coordinates so that all coordinates are positive and start from (0,0)
     /// </summary>
-    private void NormalizeCoordinates() {
-      var nodes = nodeMap.Values.ToList();
+    private static void NormalizeCoordinates(IEnumerable<LayoutNode<T>> nodes) {
       float xmin = 0, ymin = 0;
       foreach (var node in nodes) {
@@ -127,15 +89,15 @@
     }
 
-    public void Center(float width, float height) {
+    private void Center(float width, float height, IEnumerable<LayoutNode<T>> nodes) {
       // center layout on screen
-      var bounds = Bounds();
+      var bounds = Bounds(nodes);
       float dx = 0, dy = 0;
       if (width > bounds.Width) { dx = (width - bounds.Width) / 2f; }
       if (height > bounds.Height) { dy = (height - bounds.Height) / 2f; }
-      foreach (var node in nodeMap.Values) { node.Translate(dx, dy); }
-    }
-
-    public void FitToBounds(float width, float height) {
-      var bounds = Bounds();
+      foreach (var node in nodes) { node.Translate(dx, dy); }
+    }
+
+    private void FitToBounds(float width, float height, IEnumerable<LayoutNode<T>> nodes) {
+      var bounds = Bounds(nodes);
       var myWidth = bounds.Width;
       var myHeight = bounds.Height;
@@ -143,5 +105,5 @@
       if (myWidth <= width && myHeight <= height) return; // no need to fit since we are within bounds
 
-      var layers = nodeMap.Values.GroupBy(node => node.Level, node => node).ToList();
+      var layers = nodes.GroupBy(node => node.Level, node => node).ToList();
 
       if (myWidth > width) {
@@ -154,9 +116,9 @@
         float spacing = minHorizontalSpacing * x;
         foreach (var layer in layers) {
-          var nodes = layer.ToList();
+          var nodesLayer = layer.ToList();
           float minWidth = float.MaxValue;
-          for (int i = 0; i < nodes.Count - 1; ++i) { minWidth = Math.Min(minWidth, nodes[i + 1].X - nodes[i].X); }
+          for (int i = 0; i < nodesLayer.Count - 1; ++i) { minWidth = Math.Min(minWidth, nodesLayer[i + 1].X - nodesLayer[i].X); }
           float w = Math.Min(NodeWidth, minWidth - spacing);
-          foreach (var node in nodes) {
+          foreach (var node in nodesLayer) {
             node.X += (node.Width - w) / 2f;
             node.Width = w;
@@ -182,29 +144,4 @@
     }
 
-    public void Clear() {
-      layoutRoot = null;
-      nodeMap.Clear();
-    }
-
-    public void Reset() {
-      foreach (var layoutNode in nodeMap.Values) {
-        // reset layout-related parameters 
-        layoutNode.Reset();
-      }
-    }
-
-    public void CalculateLayout() {
-      if (layoutRoot == null) throw new Exception("Layout layoutRoot cannot be null.");
-      Reset(); // reset node parameters like Mod, Shift etc. and set coordinates to 0
-      FirstWalk(layoutRoot);
-      SecondWalk(layoutRoot, -layoutRoot.Prelim);
-      NormalizeCoordinates();
-    }
-
-    public void CalculateLayout(float width, float height) {
-      CalculateLayout();
-      FitToBounds(width, height);
-      Center(width, height);
-    }
 
     /// <summary>
@@ -212,8 +149,7 @@
     /// </summary>
     /// <returns></returns>
-    public RectangleF Bounds() {
+    private RectangleF Bounds(IEnumerable<LayoutNode<T>> nodes) {
       float xmin = 0, xmax = 0, ymin = 0, ymax = 0;
-      var list = nodeMap.Values.ToList();
-      foreach (LayoutNode<T> node in list) {
+      foreach (LayoutNode<T> node in nodes) {
         float x = node.X, y = node.Y;
         if (xmin > x) xmin = x;
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarAllowedChildSymbolsControl.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarAllowedChildSymbolsControl.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarAllowedChildSymbolsControl.cs	(revision 11009)
@@ -105,5 +105,4 @@
 
       var tree = new SymbolicExpressionTree(new SymbolicExpressionTreeNode(Symbol));
-      symbolicExpressionTreeChart.SuspendRepaint = true;
       if (Grammar.GetMaximumSubtreeCount(Symbol) > 0) {
         for (int i = 0; i < Grammar.GetMaximumSubtreeCount(Symbol); i++) {
@@ -118,5 +117,5 @@
       }
       symbolicExpressionTreeChart.Tree = tree;
-
+      symbolicExpressionTreeChart.SuspendRepaint = true;
       foreach (var subtreeNode in tree.Root.Subtrees) {
         foreach (var allowedChildNode in subtreeNode.Subtrees) {
@@ -144,5 +143,4 @@
         }
       }
-
       symbolicExpressionTreeChart.SuspendRepaint = false;
       UpdateSelectedSymbolicExpressionTreeNodes();
@@ -155,5 +153,5 @@
         else visualNode.FillColor = Color.LightSteelBlue;
       }
-      symbolicExpressionTreeChart.Repaint();
+      symbolicExpressionTreeChart.RepaintNodes();
     }
 
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarSampleExpressionTreeView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarSampleExpressionTreeView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarSampleExpressionTreeView.cs	(revision 11009)
@@ -42,5 +42,5 @@
         treeCreatorComboBox.Items.Add(treeCreator);
       }
-      treeCreatorComboBox.SelectedIndex = 0;
+      treeCreatorComboBox.SelectedItem = treeCreatorComboBox.Items.OfType<ProbabilisticTreeCreator>().First();
     }
 
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs	(revision 11009)
@@ -27,5 +27,5 @@
 using System.Linq;
 using System.Windows.Forms;
-using Point = System.Drawing.Point;
+
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views {
@@ -39,6 +39,6 @@
     private const int preferredNodeWidth = 70;
     private const int preferredNodeHeight = 46;
-    private const int minHorizontalDistance = 30;
-    private const int minVerticalDistance = 30;
+    private int minHorizontalDistance = 30;
+    private int minVerticalDistance = 30;
 
     public SymbolicExpressionTreeChart() {
@@ -50,5 +50,9 @@
       this.backgroundColor = Color.White;
       this.textFont = new Font(FontFamily.GenericSansSerif, 12);
-      layoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode> {
+
+      visualTreeNodes = new Dictionary<ISymbolicExpressionTreeNode, VisualTreeNode<ISymbolicExpressionTreeNode>>();
+      visualLines = new Dictionary<Tuple<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode>, VisualTreeNodeConnection>();
+
+      layoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode>(n => n.Subtrees) {
         NodeWidth = preferredNodeWidth,
         NodeHeight = preferredNodeHeight,
@@ -56,4 +60,5 @@
         VerticalSpacing = minVerticalDistance
       };
+      reingoldTilfordToolStripMenuItem.Checked = true;
     }
 
@@ -105,9 +110,5 @@
       set {
         tree = value;
-        if (tree != null) {
-          //the layout engine needs to be initialized here so that the visualNodes and the visualLines dictionaries are populated 
-          InitializeLayout();
-          Repaint();
-        }
+        Repaint();
       }
     }
@@ -128,7 +129,16 @@
       if (this.Width <= 1 || this.Height <= 1)
         this.image = new Bitmap(1, 1);
-      else
+      else {
         this.image = new Bitmap(Width, Height);
+      }
       this.Repaint();
+    }
+
+    public event EventHandler Repainted;//expose this event to notify the parent control that the tree was repainted
+    protected virtual void OnRepaint(object sender, EventArgs e) {
+      var repainted = Repainted;
+      if (repainted != null) {
+        repainted(sender, e);
+      }
     }
 
@@ -137,4 +147,5 @@
         this.GenerateImage();
         this.Refresh();
+        OnRepaint(this, EventArgs.Empty);
       }
     }
@@ -147,4 +158,9 @@
           foreach (var visualNode in visualTreeNodes.Values) {
             DrawTreeNode(graphics, visualNode);
+            if (visualNode.Content.SubtreeCount > 0) {
+              foreach (var visualSubtree in visualNode.Content.Subtrees.Select(s => visualTreeNodes[s])) {
+                DrawLine(graphics, visualNode, visualSubtree);
+              }
+            }
           }
         }
@@ -170,5 +186,5 @@
         graphics.Clear(backgroundColor);
         if (tree != null) {
-          DrawFunctionTree(tree, graphics, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance);
+          DrawFunctionTree(graphics, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance);
         }
       }
@@ -236,5 +252,4 @@
 
     private void SymbolicExpressionTreeChart_MouseMove(object sender, MouseEventArgs e) {
-
       VisualTreeNode<ISymbolicExpressionTreeNode> visualTreeNode = FindVisualSymbolicExpressionTreeNodeAt(e.X, e.Y);
       if (draggedSymbolicExpressionTree != null &&
@@ -262,10 +277,16 @@
     #endregion
 
-    private void InitializeLayout() {
-      var actualRoot = tree.Root.SubtreeCount == 1 ? tree.Root.GetSubtree(0) : tree.Root;
-      layoutEngine.Initialize(actualRoot, n => n.Subtrees, n => n.GetLength(), n => n.GetDepth());
-      layoutEngine.CalculateLayout(this.Width, this.Height);
-      var visualNodes = layoutEngine.GetVisualNodes().ToList();
-      //populate the visual nodes and visual connections dictionaries
+    private void CalculateLayout(int preferredWidth, int preferredHeight, int minHDistance, int minVDistance) {
+      layoutEngine.NodeWidth = preferredWidth;
+      layoutEngine.NodeHeight = preferredHeight;
+      layoutEngine.HorizontalSpacing = minHDistance;
+      layoutEngine.VerticalSpacing = minVDistance;
+
+      var actualRoot = tree.Root;
+      if (actualRoot.Symbol is ProgramRootSymbol && actualRoot.SubtreeCount == 1) {
+        actualRoot = tree.Root.GetSubtree(0);
+      }
+
+      var visualNodes = layoutEngine.CalculateLayout(actualRoot, Width, Height).ToList();
       visualTreeNodes = visualNodes.ToDictionary(x => x.Content, x => x);
       visualLines = new Dictionary<Tuple<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode>, VisualTreeNodeConnection>();
@@ -278,16 +299,10 @@
 
     #region methods for painting the symbolic expression tree
-    private void DrawFunctionTree(ISymbolicExpressionTree symbExprTree, Graphics graphics, int preferredWidth, int preferredHeight, int minHDistance, int minVDistance) {
-      //we assume here that the layout has already been initialized when the symbolic expression tree was changed
-      //recalculate layout according to new node widths and spacing
-      layoutEngine.NodeWidth = preferredWidth;
-      layoutEngine.NodeHeight = preferredHeight;
-      layoutEngine.HorizontalSpacing = minHDistance;
-      layoutEngine.VerticalSpacing = minVDistance;
-      layoutEngine.CalculateLayout(Width, Height);
+    private void DrawFunctionTree(Graphics graphics, int preferredWidth, int preferredHeight, int minHDistance, int minVDistance) {
+      CalculateLayout(preferredWidth, preferredHeight, minHDistance, minVDistance);
       var visualNodes = visualTreeNodes.Values;
       //draw nodes and connections
       foreach (var visualNode in visualNodes) {
-        DrawTreeNode(visualNode);
+        DrawTreeNode(graphics, visualNode);
         var node = visualNode.Content;
         foreach (var subtree in node.Subtrees) {
@@ -302,12 +317,4 @@
           }
         }
-      }
-    }
-
-    protected void DrawTreeNode(VisualTreeNode<ISymbolicExpressionTreeNode> visualTreeNode) {
-      using (var graphics = Graphics.FromImage(image)) {
-        graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
-        graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
-        DrawTreeNode(graphics, visualTreeNode);
       }
     }
@@ -333,4 +340,15 @@
       }
     }
+
+    protected void DrawLine(Graphics graphics, VisualTreeNode<ISymbolicExpressionTreeNode> startNode, VisualTreeNode<ISymbolicExpressionTreeNode> endNode) {
+      var origin = new Point(startNode.X + startNode.Width / 2, startNode.Y + startNode.Height);
+      var target = new Point(endNode.X + endNode.Width / 2, endNode.Y);
+      graphics.Clip = new Region(new Rectangle(Math.Min(origin.X, target.X), origin.Y, Math.Max(origin.X, target.X), target.Y));
+      var visualLine = GetVisualSymbolicExpressionTreeNodeConnection(startNode.Content, endNode.Content);
+      using (var linePen = new Pen(visualLine.LineColor)) {
+        linePen.DashStyle = visualLine.DashStyle;
+        graphics.DrawLine(linePen, origin, target);
+      }
+    }
     #endregion
     #region save image
@@ -348,5 +366,5 @@
       Image image = new Bitmap(Width, Height);
       using (Graphics g = Graphics.FromImage(image)) {
-        DrawFunctionTree(tree, g, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance);
+        DrawFunctionTree(g, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance);
       }
       image.Save(filename);
@@ -358,5 +376,5 @@
         using (Metafile file = new Metafile(filename, g.GetHdc())) {
           using (Graphics emfFile = Graphics.FromImage(file)) {
-            DrawFunctionTree(tree, emfFile, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance);
+            DrawFunctionTree(emfFile, preferredNodeWidth, preferredNodeHeight, minHorizontalDistance, minVerticalDistance);
           }
         }
@@ -377,5 +395,7 @@
 
     private void reingoldTilfordToolStripMenuItem_Click(object sender, EventArgs e) {
-      layoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode> {
+      minHorizontalDistance = 30;
+      minVerticalDistance = 30;
+      layoutEngine = new ReingoldTilfordLayoutEngine<ISymbolicExpressionTreeNode>(n => n.Subtrees) {
         NodeWidth = preferredNodeWidth,
         NodeHeight = preferredNodeHeight,
@@ -383,10 +403,13 @@
         VerticalSpacing = minVerticalDistance
       };
-      InitializeLayout();
+      reingoldTilfordToolStripMenuItem.Checked = true;
+      boxesToolStripMenuItem.Checked = false;
       Repaint();
     }
 
     private void boxesToolStripMenuItem_Click(object sender, EventArgs e) {
-      layoutEngine = new BoxesLayoutEngine<ISymbolicExpressionTreeNode> {
+      minHorizontalDistance = 5;
+      minVerticalDistance = 5;
+      layoutEngine = new BoxesLayoutEngine<ISymbolicExpressionTreeNode>(n => n.Subtrees, n => n.GetLength(), n => n.GetDepth()) {
         NodeWidth = preferredNodeWidth,
         NodeHeight = preferredNodeHeight,
@@ -394,5 +417,6 @@
         VerticalSpacing = minVerticalDistance
       };
-      InitializeLayout();
+      reingoldTilfordToolStripMenuItem.Checked = false;
+      boxesToolStripMenuItem.Checked = true;
       Repaint();
     }
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.Designer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.Designer.cs	(revision 11009)
@@ -52,8 +52,9 @@
       // textBox
       // 
-      this.textBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.textBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
       this.textBox.BackColor = System.Drawing.Color.White;
+      this.textBox.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
       this.textBox.Location = new System.Drawing.Point(3, 30);
       this.textBox.Multiline = true;
@@ -66,6 +67,6 @@
       // formattersComboBox
       // 
-      this.formattersComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.formattersComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
       this.formattersComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
       this.formattersComboBox.FormattingEnabled = true;
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionView.cs	(revision 11009)
@@ -78,4 +78,5 @@
       UpdateTextbox();
     }
+
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/LinearInstruction.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/LinearInstruction.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/LinearInstruction.cs	(revision 11009)
@@ -25,5 +25,5 @@
   public class LinearInstruction : Instruction {
     public double value;
-    public byte childIndex;
+    public int childIndex;
     public bool skip;
   }
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeLinearCompiler.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeLinearCompiler.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/SymbolicExpressionTreeLinearCompiler.cs	(revision 11009)
@@ -34,5 +34,5 @@
           code[c + j] = new LinearInstruction { dynamicNode = s, nArguments = (byte)s.SubtreeCount, opCode = opCodeMapper(s) };
         }
-        code[i].childIndex = (byte)c;
+        code[i].childIndex = c;
         c += node.SubtreeCount;
         ++i;
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj	(revision 11009)
@@ -140,4 +140,6 @@
     <Compile Include="Interfaces\ISymbolicExpressionGrammarBase.cs" />
     <Compile Include="Interfaces\ISymbolicExpressionTreeGrammar.cs" />
+    <Compile Include="Interfaces\ISymbolicExpressionTreeNodeComparer.cs" />
+    <Compile Include="Interfaces\ISymbolicExpressionTreeNodeSimilarityComparer.cs" />
     <Compile Include="Interfaces\Operators\ISymbolicExpressionTreeArchitectureAlteringOperator.cs" />
     <Compile Include="Interfaces\Operators\ISymbolicExpressionTreeGrammarBasedOperator.cs" />
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNodeComparer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNodeComparer.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNodeComparer.cs	(revision 11009)
@@ -0,0 +1,5 @@
+﻿using System.Collections.Generic;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ISymbolicExpressionTreeNodeComparer : IComparer<ISymbolicExpressionTreeNode> { }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNodeSimilarityComparer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNodeSimilarityComparer.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbolicExpressionTreeNodeSimilarityComparer.cs	(revision 11009)
@@ -0,0 +1,10 @@
+﻿using System.Collections.Generic;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  public interface ISymbolicExpressionTreeNodeSimilarityComparer : IEqualityComparer<ISymbolicExpressionTreeNode>, IItem {
+    bool MatchConstantValues { get; set; }
+    bool MatchVariableWeights { get; set; }
+    bool MatchVariableNames { get; set; }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammarBase.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammarBase.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammarBase.cs	(revision 11009)
@@ -323,14 +323,19 @@
       if (cachedIsAllowedChildSymbol.TryGetValue(key, out result)) return result;
 
-      List<string> temp;
-      if (allowedChildSymbols.TryGetValue(parent.Name, out temp)) {
-        //if (temp.Contains(child.Name)) return true;
-        if (temp.SelectMany(s => GetSymbol(s).Flatten()).Any(s => s.Name == child.Name)) {
-          cachedIsAllowedChildSymbol.Add(key, true);
-          return true;
+      // value has to be calculated and cached make sure this is done in only one thread
+      lock (cachedIsAllowedChildSymbol) {
+        // in case the value has been calculated on another thread in the meanwhile
+        if (cachedIsAllowedChildSymbol.TryGetValue(key, out result)) return result;
+
+        List<string> temp;
+        if (allowedChildSymbols.TryGetValue(parent.Name, out temp)) {
+          if (temp.SelectMany(s => GetSymbol(s).Flatten()).Any(s => s.Name == child.Name)) {
+            cachedIsAllowedChildSymbol.Add(key, true);
+            return true;
+          }
         }
-      }
-      cachedIsAllowedChildSymbol.Add(key, false);
-      return false;
+        cachedIsAllowedChildSymbol.Add(key, false);
+        return false;
+      }
     }
 
@@ -345,13 +350,19 @@
       if (cachedIsAllowedChildSymbolIndex.TryGetValue(key, out result)) return result;
 
-      List<string> temp;
-      if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(parent.Name, argumentIndex), out temp)) {
-        if (temp.SelectMany(s => GetSymbol(s).Flatten()).Any(s => s.Name == child.Name)) {
-          cachedIsAllowedChildSymbolIndex.Add(key, true);
-          return true;
+      // value has to be calculated and cached make sure this is done in only one thread
+      lock (cachedIsAllowedChildSymbolIndex) {
+        // in case the value has been calculated on another thread in the meanwhile
+        if (cachedIsAllowedChildSymbolIndex.TryGetValue(key, out result)) return result;
+
+        List<string> temp;
+        if (allowedChildSymbolsPerIndex.TryGetValue(Tuple.Create(parent.Name, argumentIndex), out temp)) {
+          if (temp.SelectMany(s => GetSymbol(s).Flatten()).Any(s => s.Name == child.Name)) {
+            cachedIsAllowedChildSymbolIndex.Add(key, true);
+            return true;
+          }
         }
-      }
-      cachedIsAllowedChildSymbolIndex.Add(key, false);
-      return false;
+        cachedIsAllowedChildSymbolIndex.Add(key, false);
+        return false;
+      }
     }
 
@@ -391,9 +402,15 @@
         return res;
 
-      res = GetMinimumExpressionLengthRec(symbol);
-      foreach (var entry in cachedMinExpressionLength.Where(e => e.Value >= int.MaxValue).ToList()) {
-        if (entry.Key != symbol.Name) cachedMinExpressionLength.Remove(entry.Key);
-      }
-      return res;
+      // value has to be calculated and cached make sure this is done in only one thread
+      lock (cachedMinExpressionLength) {
+        // in case the value has been calculated on another thread in the meanwhile
+        if (cachedMinExpressionLength.TryGetValue(symbol.Name, out res)) return res;
+
+        res = GetMinimumExpressionLengthRec(symbol);
+        foreach (var entry in cachedMinExpressionLength.Where(e => e.Value >= int.MaxValue).ToList()) {
+          if (entry.Key != symbol.Name) cachedMinExpressionLength.Remove(entry.Key);
+        }
+        return res;
+      }
     }
 
@@ -418,5 +435,10 @@
       int temp;
       var key = Tuple.Create(symbol.Name, maxDepth);
-      if (!cachedMaxExpressionLength.TryGetValue(key, out temp)) {
+      if (cachedMaxExpressionLength.TryGetValue(key, out temp)) return temp;
+      // value has to be calculated and cached make sure this is done in only one thread
+      lock (cachedMaxExpressionLength) {
+        // in case the value has been calculated on another thread in the meanwhile
+        if (cachedMaxExpressionLength.TryGetValue(key, out temp)) return temp;
+
         cachedMaxExpressionLength[key] = int.MaxValue; // prevent infinite recursion
         long sumOfMaxTrees = 1 + (from argIndex in Enumerable.Range(0, GetMaximumSubtreeCount(symbol))
@@ -429,5 +451,4 @@
         return cachedMaxExpressionLength[key];
       }
-      return temp;
     }
 
@@ -438,9 +459,15 @@
         return res;
 
-      res = GetMinimumExpressionDepthRec(symbol);
-      foreach (var entry in cachedMinExpressionDepth.Where(e => e.Value >= int.MaxValue).ToList()) {
-        if (entry.Key != symbol.Name) cachedMinExpressionDepth.Remove(entry.Key);
-      }
-      return res;
+      // value has to be calculated and cached make sure this is done in only one thread
+      lock (cachedMinExpressionDepth) {
+        // in case the value has been calculated on another thread in the meanwhile
+        if (cachedMinExpressionDepth.TryGetValue(symbol.Name, out res)) return res;
+
+        res = GetMinimumExpressionDepthRec(symbol);
+        foreach (var entry in cachedMinExpressionDepth.Where(e => e.Value >= int.MaxValue).ToList()) {
+          if (entry.Key != symbol.Name) cachedMinExpressionDepth.Remove(entry.Key);
+        }
+        return res;
+      }
     }
     private int GetMinimumExpressionDepthRec(ISymbol symbol) {
@@ -462,5 +489,10 @@
     public int GetMaximumExpressionDepth(ISymbol symbol) {
       int temp;
-      if (!cachedMaxExpressionDepth.TryGetValue(symbol.Name, out temp)) {
+      if (cachedMaxExpressionDepth.TryGetValue(symbol.Name, out temp)) return temp;
+      // value has to be calculated and cached make sure this is done in only one thread
+      lock (cachedMaxExpressionDepth) {
+        // in case the value has been calculated on another thread in the meanwhile
+        if (cachedMaxExpressionDepth.TryGetValue(symbol.Name, out temp)) return temp;
+
         cachedMaxExpressionDepth[symbol.Name] = int.MaxValue;
         long maxDepth = 1 + (from argIndex in Enumerable.Range(0, GetMaximumSubtreeCount(symbol))
@@ -472,5 +504,4 @@
         return cachedMaxExpressionDepth[symbol.Name];
       }
-      return temp;
     }
 
Index: /branches/DataPreprocessing/HeuristicLab.ExtLibs.sln
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs.sln	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs.sln	(revision 11009)
@@ -44,4 +44,8 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.EPPlus-3.1.3", "HeuristicLab.ExtLibs\HeuristicLab.EPPlus\3.1.3\HeuristicLab.EPPlus-3.1.3\HeuristicLab.EPPlus-3.1.3.csproj", "{B8B9E73B-18DE-4781-8F31-D3472BA9DB66}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetScilab-1.0", "HeuristicLab.ExtLibs\HeuristicLab.DotNetScilab\1.0\DotNetScilab-1.0\DotNetScilab-1.0.csproj", "{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.DotNetScilab-1.0", "HeuristicLab.ExtLibs\HeuristicLab.DotNetScilab\1.0\HeuristicLab.DotNetScilab-1.0\HeuristicLab.DotNetScilab-1.0.csproj", "{F2F242B0-9996-4B49-828D-2BFC5925FDE0}"
 EndProject
 Global
@@ -283,4 +287,24 @@
 		{B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Release|x86.ActiveCfg = Release|x86
 		{B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Release|x86.Build.0 = Release|x86
+		{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}.Debug|x64.ActiveCfg = Debug|x64
+		{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}.Debug|x64.Build.0 = Debug|x64
+		{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}.Debug|x86.ActiveCfg = Debug|x86
+		{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}.Debug|x86.Build.0 = Debug|x86
+		{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}.Release|x64.ActiveCfg = Release|x64
+		{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}.Release|x64.Build.0 = Release|x64
+		{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}.Release|x86.ActiveCfg = Release|x86
+		{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}.Release|x86.Build.0 = Release|x86
+		{F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Release|x64.ActiveCfg = Release|Any CPU
+		{F2F242B0-9996-4B49-828D-2BFC5925FDE0}.Release|x86.ActiveCfg = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0 Example/Properties/AssemblyInfo.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0 Example/Properties/AssemblyInfo.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0 Example/Properties/AssemblyInfo.cs	(revision 11009)
@@ -0,0 +1,36 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+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("example")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Scilab - DIGITEO")]
+[assembly: AssemblyProduct("example")]
+[assembly: AssemblyCopyright("Copyright © Scilab 2009")]
+[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("17e29de2-0c66-420c-931c-662ab2883fb8")]
+
+// 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.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0 Example/Util.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0 Example/Util.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0 Example/Util.cs	(revision 11009)
@@ -0,0 +1,38 @@
+﻿using System;
+using Microsoft.Win32;
+
+namespace cs_example {
+  class Util {
+    private const string registryKey = @"SOFTWARE\Scilab";
+    private const string scilab_Install = @"LASTINSTALL";
+    private const string scilab_PATH = @"SCIPATH";
+
+    public static void AddScilabInstalltionPathToEnvironment() {
+      var currentPath = Environment.GetEnvironmentVariable("path");
+      if (currentPath == null) return;
+
+      var scilabPath = GetScilabInstallPath();
+      if (string.IsNullOrEmpty(scilabPath)) return;
+
+      Environment.SetEnvironmentVariable("path", scilabPath + ";" + currentPath);
+    }
+
+    private static string GetScilabInstallPath() {
+      using (var registryLocalMachine = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default)) {
+        using (var registryScilab = registryLocalMachine.OpenSubKey(registryKey)) {
+          if (registryScilab == null) return string.Empty;
+          var scilabVersion = registryScilab.GetValue(scilab_Install);
+          if (scilabVersion == null) return string.Empty;
+          using (var registryScilabVersion = registryScilab.OpenSubKey(scilabVersion.ToString())) {
+            if (registryScilabVersion == null) return string.Empty;
+            var scilabPath = registryScilabVersion.GetValue(scilab_PATH);
+            if (scilabPath == null) return string.Empty;
+            string path = scilabPath.ToString();
+            path += @"\bin";
+            return path;
+          }
+        }
+      }
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0 Example/cs_example.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0 Example/cs_example.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0 Example/cs_example.cs	(revision 11009)
@@ -0,0 +1,270 @@
+﻿/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * 
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at    
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+//=============================================================================
+using System;
+using cs_example;
+using DotNetScilab;
+//=============================================================================
+namespace example {
+  class cs_example {
+    //=============================================================================
+    /*
+     * A small example to call scilab from C#
+     * read & write matrix of double, string, boolean, int(32)
+     */
+    static void example_readwriteMatrixOfDouble(Scilab _objScilab) {
+      //=============================================================================
+      // Send a command to scilab
+      // Here , we want to display SCI variable
+      _objScilab.SendScilabJob("disp(\'SCI = \');");
+      _objScilab.SendScilabJob("disp(SCI);");
+      //=============================================================================
+      double[] A = new double[] { 1, 2, 3, 4, 5, 6 };
+      int mA = 2, nA = 3;
+
+      // Write a matrix of double named in scilab
+      _objScilab.createNamedMatrixOfDouble("A", mA, nA, A);
+
+      // display matrix of double by scilab
+      _objScilab.SendScilabJob("disp(\'A =\');");
+      _objScilab.SendScilabJob("disp(A);");
+      //=============================================================================
+      if (_objScilab.getNamedVarType("A") == (int)DotNetScilab.ScilabType.sci_matrix) {
+        Console.WriteLine("A is a matrix of double");
+      }
+      //=============================================================================
+      _objScilab.SendScilabJob("B = A + 1;");
+
+      // get dimensions of a named matrix of double
+      int[] DimB = _objScilab.getNamedVarDimension("B");
+
+      // get named matrix of double
+      double[] B = _objScilab.readNamedMatrixOfDouble("B");
+
+      // display matrix of double from C#
+      Console.WriteLine("");
+      Console.WriteLine("(C#) B =");
+      for (int i = 0; i < DimB[0]; i++) {
+        for (int j = 0; j < DimB[1]; j++) {
+          Console.Write(B[j * DimB[0] + i] + " ");
+        }
+
+        Console.WriteLine("");
+      }
+
+      // display matrix of double by scilab
+      _objScilab.SendScilabJob("disp(\'B =\');");
+      _objScilab.SendScilabJob("disp(B);");
+      //=============================================================================
+    }
+    //=============================================================================
+    static void example_readwriteMatrixOfString(Scilab _objScilab) {
+      //=============================================================================
+      string[] strA = new string[] { "Scilab", "The", "open",
+                                        "source", "for", "numerical",
+                                        "computation" , ":", ")"};
+      int mstrA = 3, nstrA = 3;
+
+      // Write a matrix of string named in scilab
+      _objScilab.createNamedMatrixOfString("string_A", mstrA, nstrA, strA);
+
+      // display matrix of string by scilab
+      _objScilab.SendScilabJob("disp(\'string_A =\');");
+      _objScilab.SendScilabJob("disp(string_A);");
+      //=============================================================================
+      if (_objScilab.getNamedVarType("string_A") == (int)DotNetScilab.ScilabType.sci_strings) {
+        Console.WriteLine("string_A is a matrix of strings");
+      }
+      //=============================================================================
+      _objScilab.SendScilabJob("string_B = convstr(string_A,\'u\');");
+
+      // get dimensions of a named matrix of string
+      int[] DimstrB = _objScilab.getNamedVarDimension("string_B");
+
+      // get named matrix of string
+      string[] strB = _objScilab.readNamedMatrixOfString("string_B");
+
+      Console.WriteLine("");
+      Console.WriteLine("(C#) strB =");
+      for (int i = 0; i < DimstrB[0]; i++) {
+        for (int j = 0; j < DimstrB[1]; j++) {
+          Console.Write(strB[j * DimstrB[0] + i] + " ");
+        }
+
+        Console.WriteLine("");
+      }
+
+      // display matrix of string by scilab
+      _objScilab.SendScilabJob("disp(\'string_B =\');");
+      _objScilab.SendScilabJob("disp(string_B);");
+      //=============================================================================
+    }
+    //=============================================================================
+    static void example_readwriteMatrixOfBoolean(Scilab _objScilab) {
+      //=============================================================================
+      Boolean[] bA = new Boolean[] { false, true, false,
+                                           true, false, true};
+      int mbA = 2, nbA = 3;
+
+      // Write a matrix of string named in scilab
+      _objScilab.createNamedMatrixOfBoolean("boolean_A", mbA, nbA, bA);
+
+      // display matrix of string by scilab
+      _objScilab.SendScilabJob("disp(\'boolean_A =\');");
+      _objScilab.SendScilabJob("disp(boolean_A);");
+      //=============================================================================
+      // check if av
+      if (_objScilab.existNamedVariable("boolean_A") == true) {
+        Console.WriteLine("boolean_A exists in scilab");
+      }
+
+      if (_objScilab.existNamedVariable("boolean_B") == false) {
+        Console.WriteLine("boolean_B does not exist in scilab");
+      }
+      //=============================================================================
+      if (_objScilab.getNamedVarType("boolean_A") == (int)DotNetScilab.ScilabType.sci_boolean) {
+        Console.WriteLine("boolean_A is a matrix of boolean");
+      }
+      //=============================================================================
+      _objScilab.SendScilabJob("boolean_B = ~boolean_A;");
+      // get dimensions of a named matrix of boolean
+      int[] DimbB = _objScilab.getNamedVarDimension("boolean_B");
+
+      // get named matrix of boolean
+      Boolean[] bB = _objScilab.getNamedMatrixOfBoolean("boolean_B");
+
+      Console.WriteLine("");
+      Console.WriteLine("(C#) bB =");
+      for (int i = 0; i < DimbB[0]; i++) {
+        for (int j = 0; j < DimbB[1]; j++) {
+          Console.Write(bB[j * DimbB[0] + i] + " ");
+        }
+
+        Console.WriteLine("");
+      }
+
+      // display matrix of string by scilab
+      _objScilab.SendScilabJob("disp(\'boolean_B =\');");
+      _objScilab.SendScilabJob("disp(boolean_B);");
+      //=============================================================================
+    }
+    //=============================================================================
+    static void example_doplot3d(Scilab _objScilab) {
+      _objScilab.SendScilabJob("plot3d()");
+      while (_objScilab.HaveAGraph()) {
+        _objScilab.doEvent();
+      }
+    }
+    //=============================================================================
+    static void example_readwriteMatrixOfInt(Scilab _objScilab) {
+      //=============================================================================
+      int[] A = new int[] { 1, 2, 3, 4, 5, 6 };
+      int mA = 2, nA = 3;
+
+      // Write a matrix of double named in scilab
+      _objScilab.createNamedMatrixOfInt32("int32_A", mA, nA, A);
+
+      // display matrix of double by scilab
+      _objScilab.SendScilabJob("disp(\'int32_A =\');");
+      _objScilab.SendScilabJob("disp(int32_A);");
+      //=============================================================================
+      if (_objScilab.getNamedVarType("int32_A") == (int)DotNetScilab.ScilabType.sci_ints) {
+        Console.WriteLine("int32_A is a matrix of int(32)");
+      }
+      //=============================================================================
+      _objScilab.SendScilabJob("int32_B = int32_A + 1;");
+
+      // get dimensions of a named matrix of double
+      int[] DimB = _objScilab.getNamedVarDimension("int32_B");
+
+      // get named matrix of double
+      int[] B = _objScilab.readNamedMatrixOfInt32("int32_B");
+
+      // display matrix of double from C#
+      Console.WriteLine("");
+      Console.WriteLine("(C#) int32_B =");
+      for (int i = 0; i < DimB[0]; i++) {
+        for (int j = 0; j < DimB[1]; j++) {
+          Console.Write(B[j * DimB[0] + i] + " ");
+        }
+
+        Console.WriteLine("");
+      }
+
+      // display matrix of double by scilab
+      _objScilab.SendScilabJob("disp(\'int32_B =\');");
+      _objScilab.SendScilabJob("disp(int32_B);");
+      //=============================================================================
+    }
+    //=============================================================================
+    static void example_readwriteComplexMatrixOfDouble(Scilab _objScilab) {
+      //=============================================================================
+      double[] realPartA = new double[] { 1, 2, 3, 4, 5, 6 };
+      double[] imagPartA = new double[] { 6, 5, 4, 3, 2, 1 };
+      int mA = 2, nA = 3;
+
+      // Write a matrix of double named in scilab
+      _objScilab.createNamedComplexMatrixOfDouble("cplx_A", mA, nA, realPartA, imagPartA);
+
+      // display matrix of double by scilab
+      _objScilab.SendScilabJob("disp(\'cplx_A =\');");
+      _objScilab.SendScilabJob("disp(cplx_A);");
+      //=============================================================================
+      _objScilab.SendScilabJob("cplx_B = cplx_A * 2;");
+
+      // get dimensions of a named matrix of double
+      int[] DimB = _objScilab.getNamedVarDimension("cplx_B");
+
+      // get named matrix of double
+      double[] realPartB = _objScilab.readNamedComplexMatrixOfDoubleRealPart("cplx_B");
+      double[] imagPartB = _objScilab.readNamedComplexMatrixOfDoubleImgPart("cplx_B");
+
+      // display matrix of double from C#
+      Console.WriteLine("");
+      Console.WriteLine("(C#) cplx_B =");
+      for (int i = 0; i < DimB[0]; i++) {
+        for (int j = 0; j < DimB[1]; j++) {
+          Console.Write(realPartB[j * DimB[0] + i] + " + i *" + imagPartB[j * DimB[0] + i] + " ");
+        }
+
+        Console.WriteLine("");
+      }
+
+      // display matrix of double by scilab
+      _objScilab.SendScilabJob("disp(\'cplx_B =\');");
+      _objScilab.SendScilabJob("disp(cplx_B);");
+      //=============================================================================
+    }
+    //=============================================================================
+    static void Main(string[] args) {
+      Util.AddScilabInstalltionPathToEnvironment();
+      // start scilab engine with graphics
+      Scilab m_oSCilab = new Scilab(true);
+
+      example_readwriteMatrixOfDouble(m_oSCilab);
+
+      example_readwriteMatrixOfString(m_oSCilab);
+
+      example_readwriteMatrixOfBoolean(m_oSCilab);
+
+      example_readwriteMatrixOfInt(m_oSCilab);
+
+      example_readwriteComplexMatrixOfDouble(m_oSCilab);
+
+      //mkommend 11.11.2013: commented out as this functionality is not completely working
+      //chart is displayed, but hasFigures throws an exception
+      //example_doplot3d(m_oSCilab);
+    }
+    //=============================================================================
+  }
+}
+//=============================================================================
Index: /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0 Example/cs_example.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0 Example/cs_example.csproj	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0 Example/cs_example.csproj	(revision 11009)
@@ -0,0 +1,107 @@
+﻿<?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>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{10B5A5BF-3204-4B47-91C0-7FA614EFA94A}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>cs_example</RootNamespace>
+    <AssemblyName>cs_example</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <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>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+  </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>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="DotNetScilab-1.0">
+      <HintPath>..\..\..\..\bin\DotNetScilab-1.0.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="cs_example.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Util.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\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/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/DotNetScilab-1.0.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/DotNetScilab-1.0.csproj	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/DotNetScilab-1.0.csproj	(revision 11009)
@@ -0,0 +1,122 @@
+﻿<?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>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{C3F0C7DC-82AD-405B-990A-BF2C5B7F46FF}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>DotNetScilab</RootNamespace>
+    <AssemblyName>DotNetScilab-1.0</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <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>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <RegisterForComInterop>false</RegisterForComInterop>
+  </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>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <RegisterForComInterop>false</RegisterForComInterop>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\..\..\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>..\..\..\..\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Optimize>true</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\..\..\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>..\..\..\..\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Optimize>true</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Scilab.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Scilab_cs_wrapper.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="DotNetScilab-1.0.dll.config">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="HeuristicLab.snk" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\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/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/DotNetScilab-1.0.dll.config
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/DotNetScilab-1.0.dll.config	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/DotNetScilab-1.0.dll.config	(revision 11009)
@@ -0,0 +1,7 @@
+﻿<?xml version="1.0"?>
+<configuration>
+  <dllmap dll="call_scilab.dll" target="libscilab.so"/>
+  <dllmap dll="api_scilab.dll" target="libscilab.so"/>
+  <dllmap dll="graphics.dll" target="libscigraphics.so"/>
+  <dllmap dll="scioutput_stream.dll" target="libscioutput_stream.so"/>
+</configuration>
Index: /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/Properties/AssemblyInfo.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/Properties/AssemblyInfo.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/Properties/AssemblyInfo.cs	(revision 11009)
@@ -0,0 +1,36 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+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("dotnetsci")]
+[assembly: AssemblyDescription(".NET Component for Scilab 5.x")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Scilab - DIGITEO")]
+[assembly: AssemblyProduct("dotnetsci")]
+[assembly: AssemblyCopyright("Copyright © Scilab 2009")]
+[assembly: AssemblyTrademark("Allan CORNET")]
+[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("ef7effe8-4440-47b7-b579-433dc94cc859")]
+
+// 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.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/Scilab.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/Scilab.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/Scilab.cs	(revision 11009)
@@ -0,0 +1,463 @@
+﻿/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * 
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at    
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+//=============================================================================
+/* Please notice that it is only a example and not a full C# wrapper */
+//=============================================================================
+using System;
+using System.Threading;
+//=============================================================================
+namespace DotNetScilab {
+  /* Scilab Types */
+  public enum ScilabType {
+    sci_matrix = 1,
+    sci_poly = 2,
+    sci_boolean = 4,
+    sci_sparse = 5,
+    sci_boolean_sparse = 6,
+    sci_matlab_sparse = 7,
+    sci_ints = 8,
+    sci_handles = 9,
+    sci_strings = 10,
+    sci_u_function = 11,
+    sci_c_function = 13,
+    sci_lib = 14,
+    sci_list = 15,
+    sci_tlist = 16,
+    sci_mlist = 17,
+    sci_pointer = 128,
+    sci_implicit_poly = 129,
+    sci_intrinsic_function = 130
+  };
+
+  public sealed class Scilab {
+    //=============================================================================
+    static Scilab instance = null;
+    static readonly object padlock = new object();
+    private Boolean withGraphics = false;
+    //=============================================================================
+    /// <summary>
+    /// Constructor, initialize scilab engine.
+    /// </summary>
+    public Scilab() {
+      // Disable TCL/TK and Java graphic interfaces
+      Scilab_cs_wrapper.DisableInteractiveMode();
+      withGraphics = false;
+
+      // start Scilab engine configurated without java
+      string SCI = System.Environment.GetEnvironmentVariable("SCI");
+      Scilab_cs_wrapper.StartScilab(SCI, null, null);
+    }
+    //=============================================================================
+    public Scilab(Boolean _bWithGraphics) {
+      // Disable TCL/TK and Java graphic interfaces
+      if (_bWithGraphics == false) {
+        Scilab_cs_wrapper.DisableInteractiveMode();
+        withGraphics = false;
+      } else {
+        withGraphics = true;
+      }
+
+      // start Scilab engine
+      string SCI = System.Environment.GetEnvironmentVariable("SCI");
+      Scilab_cs_wrapper.StartScilab(SCI, null, null);
+    }
+    //=============================================================================
+    /// <summary>
+    /// Singleton 
+    /// Only one instance of Scilab can be launch
+    /// thread safe
+    /// </summary>
+    public static Scilab Instance {
+      get {
+        lock (padlock) {
+          if (instance == null) {
+            instance = new Scilab();
+          }
+          return instance;
+        }
+      }
+    }
+    //=============================================================================
+    /// <summary>
+    /// Destructor
+    /// </summary>
+    ~Scilab() {
+      // freed by O.S
+      //Scilab_cs_wrapper.TerminateScilab(null);
+    }
+    //=============================================================================
+    /// <summary>
+    /// Send a job to scilab
+    /// </summary>
+    /// <param name="command">command to send to scilab</param>
+    /// <returns>error code operation, 0 : OK</returns>
+    public int SendScilabJob(string command) {
+      return Scilab_cs_wrapper.SendScilabJob(command);
+    }
+    //=============================================================================
+    /// <summary>
+    ///  get last error code
+    /// </summary>
+    /// <returns>last error code</returns>
+    public int GetLastErrorCode() {
+      return Scilab_cs_wrapper.GetLastErrorCode();
+    }
+    //=============================================================================
+    /// <summary>
+    /// Write a named matrix of double in Scilab
+    /// </summary>
+    /// <param name="matrixName"> variable name</param>
+    /// <param name="iRows"> Number of row</param>
+    /// <param name="iCols"> Number of column</param>
+    /// <param name="matrixDouble"> pointer on data</param>
+    /// <returns> if the operation successes (0) or not ( !0 )</returns>
+    public int createNamedMatrixOfDouble(string matrixName, int iRows, int iCols, double[] matrixDouble) {
+      System.IntPtr ptrEmpty = new System.IntPtr();
+      Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.createNamedMatrixOfDouble(ptrEmpty, matrixName, iRows, iCols, matrixDouble);
+      return SciErr.iErr;
+    }
+    //=============================================================================
+    /// <summary>
+    /// Write a named matrix of string in scilab
+    /// </summary>
+    /// <param name="matrixName"> variable name</param>
+    /// <param name="iRows"> Number of row</param>
+    /// <param name="iCols"> Number of column</param>
+    /// <param name="matrixDouble"> pointer on data</param>
+    /// <returns> if the operation successes (0) or not ( !0 )</returns>
+    public int createNamedMatrixOfString(string matrixName, int iRows, int iCols, string[] matrixString) {
+      System.IntPtr ptrEmpty = new System.IntPtr();
+      Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.createNamedMatrixOfString(ptrEmpty, matrixName, iRows, iCols, matrixString);
+      return SciErr.iErr;
+    }
+    //=============================================================================
+    /// <summary>
+    /// Write a named matrix of boolean in Scilab
+    /// </summary>
+    /// <param name="matrixName"> variable name</param>
+    /// <param name="iRows"> Number of row</param>
+    /// <param name="iCols"> Number of column</param>
+    /// <param name="matrixBoolean"> pointer on data</param>
+    /// <returns> if the operation successes (0) or not ( !0 )</returns>
+    public int createNamedMatrixOfBoolean(string matrixName, int iRows, int iCols, Boolean[] matrixBoolean) {
+      int[] matrixInt = new int[matrixBoolean.Length];
+      for (int i = 0; i < matrixBoolean.Length; i++) {
+        if (matrixBoolean[i] == true) {
+          matrixInt[i] = 1;
+        } else {
+          matrixInt[i] = 0;
+        }
+      }
+      System.IntPtr ptrEmpty = new System.IntPtr();
+      Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.createNamedMatrixOfBoolean(ptrEmpty, matrixName, iRows, iCols, matrixInt);
+      return SciErr.iErr;
+    }
+    //=============================================================================
+    /// <summary>
+    /// Write a named matrix of int(32) in Scilab
+    /// </summary>
+    /// <param name="matrixName"> variable name</param>
+    /// <param name="iRows"> Number of row</param>
+    /// <param name="iCols"> Number of column</param>
+    /// <param name="matrixInt"> pointer on data</param>
+    public int createNamedMatrixOfInt32(string matrixName, int iRows, int iCols, int[] matrixInt) {
+      System.IntPtr ptrEmpty = new System.IntPtr();
+      Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.createNamedMatrixOfInteger32(ptrEmpty, matrixName, iRows, iCols, matrixInt);
+      return SciErr.iErr;
+    }
+    //=============================================================================
+    /// <summary>
+    /// Write a named matrix of complex double in Scilab
+    /// </summary>
+    /// <param name="matrixName"> variable name</param>
+    /// <param name="iRows">Number of row</param>
+    /// <param name="iCols">Number of column</param>
+    /// <param name="matrixRealPart">real part</param>
+    /// <param name="matrixImagPart">imag part</param>
+    /// <returns></returns>
+    public int createNamedComplexMatrixOfDouble(string matrixName,
+                                            int iRows, int iCols,
+                                            double[] matrixRealPart,
+                                            double[] matrixImagPart) {
+      System.IntPtr ptrEmpty = new System.IntPtr();
+      Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.createNamedComplexMatrixOfDouble(ptrEmpty, matrixName,
+                                              iRows, iCols,
+                                              matrixRealPart,
+                                              matrixImagPart);
+      return SciErr.iErr;
+    }
+    //=============================================================================
+    /// <summary>
+    /// Read a named matrix of double from Scilab
+    /// </summary>
+    /// <param name="matrixName"> variable name</param>
+    /// <returns>a matrix of double from scilab. If Variable name does not exist returns null</returns>
+    public unsafe double[] readNamedMatrixOfDouble(string matrixName) {
+      int iRows = 0;
+      int iCols = 0;
+
+      System.IntPtr ptrEmpty = new System.IntPtr();
+      Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.readNamedMatrixOfDouble(ptrEmpty, matrixName, &iRows, &iCols, null);
+
+      if (iRows * iCols > 0) {
+        double[] matrixDouble = new double[iRows * iCols];
+
+        // get values in matrixDouble
+        SciErr = Scilab_cs_wrapper.readNamedMatrixOfDouble(ptrEmpty, matrixName, &iRows, &iCols, matrixDouble);
+        if (SciErr.iErr != 0) return null;
+        return matrixDouble;
+      }
+      return null;
+    }
+    //=============================================================================
+    /// <summary>
+    /// Get dimensions of a named matrix in scilab
+    /// </summary>
+    /// <returns>a int array. 
+    /// if variable name does not exist dimensions are null </returns>
+    public unsafe int[] getNamedVarDimension(string matrixName) {
+      int[] iDim = null;
+      int iRows = 0;
+      int iCols = 0;
+
+      System.IntPtr ptrEmpty = new System.IntPtr();
+      Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.getNamedVarDimension(ptrEmpty, matrixName, &iRows, &iCols);
+      if (SciErr.iErr == 0) {
+        iDim = new int[2];
+        iDim[0] = iRows;
+        iDim[1] = iCols;
+      }
+      return iDim;
+    }
+    //=============================================================================
+    /// <summary>
+    /// Read a named matrix of string from scilab
+    /// </summary>
+    /// <param name="matrixName"> variable name</param>
+    /// <returns>a matrix of string from scilab. If Variable name does not exist returns null</returns>
+    public unsafe string[] readNamedMatrixOfString(string matrixName) {
+      string[] matrixString = null;
+
+      int[] iDim = getNamedVarDimension(matrixName);
+
+      if (iDim != null) {
+        int iRows = iDim[0];
+        int iCols = iDim[1];
+
+        // we allocate lengthmatrixString
+        int[] lengthmatrixString = new int[iRows * iCols];
+
+        System.IntPtr ptrEmpty = new System.IntPtr();
+
+        // we get length of strings
+        Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.readNamedMatrixOfString(ptrEmpty, matrixName,
+                                &iRows, &iCols,
+                                lengthmatrixString, null);
+
+        // we allocate each string
+        matrixString = new string[iRows * iCols];
+        for (int i = 0; i < iRows * iCols; i++) {
+          matrixString[i] = new string(' ', lengthmatrixString[i]);
+        }
+
+        // we get strings from scilab
+        SciErr = Scilab_cs_wrapper.readNamedMatrixOfString(ptrEmpty, matrixName,
+                                        &iRows, &iCols,
+                                        lengthmatrixString,
+                                        matrixString);
+      }
+      return matrixString;
+    }
+    //=============================================================================
+    /// <summary>
+    /// Read a named matrix of boolean from Scilab
+    /// </summary>
+    /// <param name="matrixName"> variable name</param>
+    /// <returns>a matrix of boolean from scilab. If Variable name does not exist returns null</returns>
+    public unsafe Boolean[] getNamedMatrixOfBoolean(string matrixName) {
+      Boolean[] matrixBoolean = null;
+      int[] iDim = getNamedVarDimension(matrixName);
+
+      if (iDim != null) {
+        int iRows = iDim[0];
+        int iCols = iDim[1];
+        int[] matrixInt = new int[iRows * iCols];
+
+        System.IntPtr ptrEmpty = new System.IntPtr();
+
+        // get values in matrixDouble
+        Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.readNamedMatrixOfBoolean(ptrEmpty, matrixName,
+                                                    &iRows, &iCols,
+                                                    matrixInt);
+
+        if (matrixInt != null) {
+          matrixBoolean = new Boolean[iRows * iCols];
+          for (int i = 0; i < iRows * iCols; i++) {
+            if (matrixInt[i] == 1) {
+              matrixBoolean[i] = true;
+            } else {
+              matrixBoolean[i] = false;
+            }
+          }
+        }
+      }
+      return matrixBoolean;
+    }
+    //=============================================================================
+    /// <summary>
+    /// Read a named matrix of complex double in Scilab (Real part)
+    /// </summary>
+    /// <param name="matrixName">variable name</param>
+    /// <returns> real part. If Variable name does not exist returns null</returns>
+    public unsafe double[] readNamedComplexMatrixOfDoubleRealPart(string matrixName) {
+      double[] dRealPart = null;
+      int[] iDim = getNamedVarDimension(matrixName);
+      if (iDim != null) {
+        int iRows = iDim[0];
+        int iCols = iDim[1];
+
+        double[] dImagPart = new double[iRows * iCols];
+        dRealPart = new double[iRows * iCols];
+
+        System.IntPtr ptrEmpty = new System.IntPtr();
+
+        Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.readNamedComplexMatrixOfDouble(ptrEmpty, matrixName,
+                                   &iRows, &iCols,
+                                   dRealPart,
+                                   dImagPart);
+      }
+      return dRealPart;
+    }
+    //=============================================================================
+    /// <summary>
+    /// Read a named matrix of complex double in Scilab (Imag part)
+    /// </summary>
+    /// <param name="matrixName">variable name</param>
+    /// <returns> img part. If Variable name does not exist returns null</returns>
+    public unsafe double[] readNamedComplexMatrixOfDoubleImgPart(string matrixName) {
+      double[] dImagPart = null;
+      int[] iDim = getNamedVarDimension(matrixName);
+      if (iDim != null) {
+        int iRows = iDim[0];
+        int iCols = iDim[1];
+
+        double[] dRealPart = new double[iRows * iCols];
+        dImagPart = new double[iRows * iCols];
+
+        System.IntPtr ptrEmpty = new System.IntPtr();
+
+        Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.readNamedComplexMatrixOfDouble(ptrEmpty, matrixName,
+                                   &iRows, &iCols,
+                                   dRealPart,
+                                   dImagPart);
+      }
+      return dImagPart;
+    }
+    //=============================================================================
+    /// <summary>
+    /// Read a named matrix of int(32) in Scilab
+    /// </summary>
+    /// <param name="matrixName"> variable name</param>
+    /// <returns>a matrix of int(32) from scilab. If Variable name does not exist returns null</returns>
+    public unsafe int[] readNamedMatrixOfInt32(string matrixName) {
+      int[] matrixInt = null;
+      int[] iDim = getNamedVarDimension(matrixName);
+      if (iDim != null) {
+        int iRows = iDim[0];
+        int iCols = iDim[1];
+
+        // we allocate matrixInt array
+        matrixInt = new int[iRows * iCols];
+
+        System.IntPtr ptrEmpty = new System.IntPtr();
+
+        // get values in matrixInt
+        Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.readNamedMatrixOfInteger32(ptrEmpty, matrixName, &iRows, &iCols, matrixInt);
+      }
+      return matrixInt;
+    }
+    //=============================================================================
+    /// <summary>
+    /// get scilab type of named matrix
+    /// </summary>
+    /// <param name="matrixName"> variable name</param>
+    /// <returns>scilab type (see enum ScilabType)</returns>
+    public unsafe int getNamedVarType(string matrixName) {
+      int iType = 0;
+      System.IntPtr ptrEmpty = new System.IntPtr();
+
+      Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.getNamedVarType(ptrEmpty, matrixName, &iType);
+      if (SciErr.iErr == 0) return iType;
+      return 0;
+    }
+    //=============================================================================
+    /// <summary>
+    /// Detect if a variable name exists in Scilab
+    /// </summary>
+    /// <param name="matrixName"> variable name</param>
+    /// <returns> true if exists</returns>
+    public unsafe Boolean existNamedVariable(string matrixName) {
+      int* piAdress = null;
+      System.IntPtr ptrEmpty = new System.IntPtr();
+
+      Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.getVarAddressFromName(ptrEmpty, matrixName, &piAdress);
+      if (SciErr.iErr == 0) return true;
+      return false;
+    }
+    //=============================================================================
+    /// <summary>
+    /// Execute a scilab script .sce
+    /// </summary>
+    /// <param name="scriptFilename">the path to the .sce file</param>
+    /// <returns>error code operation, 0 : OK</returns>
+    public int execScilabScript(String scriptFilename) {
+      return Scilab_cs_wrapper.SendScilabJob("exec('" + scriptFilename + "');");
+    }
+    //=============================================================================
+    /// <summary>
+    /// Detect if a Scilab graphic window is opened
+    /// </summary>
+    /// <returns>true or false</returns>
+    public Boolean HaveAGraph() {
+      if (withGraphics) {
+        int ierr = Scilab_cs_wrapper.sciHasFigures();
+        if (ierr == 1) return true;
+      }
+      return false;
+    }
+    //=============================================================================
+    /// <summary>
+    /// do a scilab event
+    /// parser need to run to do a event
+    /// </summary>
+    /// <returns>error code operation, 0 : OK</returns>
+    public int doEvent() {
+      // do a pause (we do not want 100% CPU used)
+      // ugly but it works ...
+      Thread.Sleep(1);
+      // do a loop of parser
+      return SendScilabJob("");
+    }
+    //=============================================================================
+    /// <summary>
+    /// get scilab type of named matrix
+    /// </summary>
+    /// <param name="matrixName"> variable name</param>
+    /// <returns>scilab type (see enum ScilabType)</returns>
+    public int isNamedVarComplex(string matrixName) {
+      System.IntPtr ptrEmpty = new System.IntPtr();
+      return Scilab_cs_wrapper.isNamedVarComplex(ptrEmpty, matrixName);
+    }
+    //=============================================================================
+  }
+}
+//=============================================================================
Index: /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/Scilab_cs_wrapper.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/Scilab_cs_wrapper.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/DotNetScilab-1.0/Scilab_cs_wrapper.cs	(revision 11009)
@@ -0,0 +1,229 @@
+﻿/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2009 - DIGITEO - Allan CORNET
+ * 
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at    
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ */
+//=============================================================================
+using System;
+using System.Runtime.InteropServices;
+//=============================================================================
+namespace DotNetScilab {
+  class Scilab_cs_wrapper {
+    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
+    public unsafe struct api_Ctx {
+      public String pstName; /**< Function name */
+    }
+
+    //=============================================================================
+    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
+    public unsafe struct api_Err {
+      public int iErr;
+      public int iMsgCount;
+      public fixed char pstructMsg[5];
+    }
+    //=============================================================================
+    private const string CALL_SCILAB_DLL = "call_scilab.dll";
+    private const string API_SCILAB_DLL = "api_scilab.dll";
+    private const string GRAPHICS_DLL = "graphics.dll";
+    private const string OUTPUT_STREAM_DLL = "scioutput_stream.dll";
+    //=============================================================================
+    /// <summary>
+    /// import SendScilabJob from C (see call_scilab.h)
+    /// </summary>
+    [DllImport(CALL_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public static extern int SendScilabJob([In]String job);
+    //=============================================================================
+    /// <summary>
+    /// import StartScilab from C (see call_scilab.h)
+    /// </summary>
+    [DllImport(CALL_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public static extern int StartScilab([In] String SCIpath,
+                                          [In] String ScilabStartup,
+                                          [In] Int32[] Stacksize);
+    //=============================================================================
+    /// <summary>
+    /// import TerminateScilab from C (see call_scilab.h)
+    /// </summary>
+    [DllImport(CALL_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public static extern int TerminateScilab([In] String ScilabQuit);
+    //=============================================================================
+    /// <summary>
+    /// import DisableInteractiveMode from C (see call_scilab.h)
+    /// </summary>
+    [DllImport(CALL_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public static extern void DisableInteractiveMode();
+    //=============================================================================
+    /// <summary>
+    /// import createNamedMatrixOfString from C (see api_string.h)
+    /// </summary>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public static extern api_Err createNamedMatrixOfString([In]IntPtr pvApiCtx, [In] String _pstName,
+                                                        [In] int _iRows, [In] int _iCols,
+                                                        [In] String[] _pstStrings);
+    //=============================================================================
+    /// <summary>
+    /// import createNamedMatrixOfWideString from C (see api_string.h)
+    /// </summary>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Unicode)]
+    public static extern api_Err createNamedMatrixOfWideString([In]IntPtr pvApiCtx,
+                                                        [In] String _pstName,
+                                                        [In] int _iRows, [In] int _iCols,
+                                                        [In] String[] _pstStrings);
+    //=============================================================================
+    /// <summary>
+    /// import createNamedMatrixOfDouble from C (see api_double.h)
+    /// </summary>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    [return: MarshalAs(UnmanagedType.Struct)]
+    public static extern api_Err createNamedMatrixOfDouble([In]IntPtr pvApiCtx, [In] String _pstName,
+                                                        [In] int _iRows, [In] int _iCols,
+                                                        [In] double[] _pdblReal);
+
+
+    //=============================================================================
+    /// <summary>
+    /// import createNamedMatrixOfBoolean from C (see api_boolean.h)
+    /// </summary>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public static extern api_Err createNamedMatrixOfBoolean([In]IntPtr pvApiCtx, [In] String _pstName,
+                                                        [In] int _iRows, [In] int _iCols,
+                                                        [In] int[] _piBool);
+    //=============================================================================
+    /// <summary>
+    /// import createNamedMatrixOfInteger32 from C (see api_int.h)
+    /// </summary>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern api_Err createNamedMatrixOfInteger32([In]IntPtr pvApiCtx, [In] String _pstName,
+                                                       [In] int _iRows, [In] int _iCols,
+                                                       [In] int[] _piData);
+    //=============================================================================
+    /// <summary>
+    /// import createNamedComplexMatrixOfDouble from C (see api_double.h)
+    /// </summary>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern api_Err createNamedComplexMatrixOfDouble([In]IntPtr pvApiCtx, [In] String _pstName,
+                                                        [In] int _iRows, [In] int _iCols,
+                                                        [In] double[] _pdblReal,
+                                                        [In] double[] _pdblImg);
+    //=============================================================================
+    /// <summary>
+    /// import readNamedMatrixOfString from C (see api_string.h)
+    /// </summary>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern api_Err readNamedMatrixOfString([In]IntPtr pvApiCtx, [In] String _pstName,
+                                                      [Out]  Int32* _piRows, [Out]  Int32* _piCols,
+                                                      [In, Out] int[] _piLength,
+                                                      [In, Out] String[] _pstStrings);
+    //=============================================================================
+    /// <summary>
+    /// import readNamedMatrixOfWideString from C (see api_string.h)
+    /// </summary>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Unicode)]
+    public unsafe static extern api_Err readNamedMatrixOfWideString([In]IntPtr pvApiCtx, [In] String _pstName,
+                                                      [Out]  Int32* _piRows, [Out]  Int32* _piCols,
+                                                      [In, Out] int[] _piLength,
+                                                      [In, Out] String[] _pstStrings);
+    //=============================================================================
+    /// <summary>
+    /// import readNamedMatrixOfDouble from C (see api_double.h)
+    /// </summary>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern api_Err readNamedMatrixOfDouble([In]IntPtr pvApiCtx, [In] String _pstName,
+                                                      [Out] Int32* _piRows, [Out] Int32* _piCols,
+                                                      [In, Out] Double[] _pdblReal);
+    //=============================================================================
+    /// <summary>
+    /// import readNamedMatrixOfBoolean from C (see api_boolean.h)
+    /// </summary>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern api_Err readNamedMatrixOfBoolean([In]IntPtr pvApiCtx, [In] String _pstName,
+                                                      [Out] Int32* _piRows, [Out] Int32* _piCols,
+                                                      [In, Out] int[] _piBool);
+    //=============================================================================
+    /// <summary>
+    /// import readNamedMatrixOfInteger32 from C (see api_int.h)
+    /// </summary>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern api_Err readNamedMatrixOfInteger32([In]IntPtr pvApiCtx, [In] String _pstName,
+                                                      [Out] Int32* _piRows, [Out] Int32* _piCols,
+                                                      [In, Out] int[] _piData);
+
+    //=============================================================================
+    /// <summary>
+    /// import readNamedComplexMatrixOfDouble from C (see api_double.h)
+    /// </summary>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern api_Err readNamedComplexMatrixOfDouble([In]IntPtr pvApiCtx, [In] String _pstName,
+                                                    [Out] Int32* _piRows, [Out] Int32* _piCols,
+                                                    [In, Out] double[] _pdblReal,
+                                                    [In, Out] double[] _pdblImg);
+    //=============================================================================
+    /// <summary>
+    /// get Variable Adress in scilab stack from name
+    /// used for getNamedMatrixType (internal)
+    /// </summary>
+    /// <param name="_pstName">variable name</param>
+    /// <param name="_piAddress"> stack address</param>
+    /// <returns>1 if ok</returns>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern api_Err getVarAddressFromName([In]IntPtr pvApiCtx, [In] String _pstName,
+                                                           [Out] Int32** _piAddress);
+    //=============================================================================
+    /// <summary>
+    /// get Variable type in scilab stack from name
+    /// </summary>
+    /// <param name="_pstName">variable name</param>
+    /// <returns>type or -1</returns>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern api_Err getNamedVarType([In]IntPtr pvApiCtx, [In] String _pstName, [Out]Int32* _piType);
+    //=============================================================================
+    /// <summary>
+    /// get variable type with adress in scilab stack
+    /// used for getNamedMatrixType (internal)
+    /// </summary>
+    /// <param name="_piAddress"> stack address</param>
+    /// <returns>scilab type, 0 fails</returns>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern api_Err getVarType([In]IntPtr pvApiCtx, [In] Int32* _piAddress, [Out]Int32* _piType);
+    //=============================================================================
+    /// <summary>
+    ///  Detect if a Scilab graphic window is opened
+    /// </summary>
+    /// <returns>0 (FALSE) or 1 (TRUE)</returns>
+    [DllImport(GRAPHICS_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern int sciHasFigures();
+    //=============================================================================
+    /// <summary>
+    ///  get last error code
+    /// </summary>
+    /// <returns>last error code</returns>
+    [DllImport(OUTPUT_STREAM_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern int GetLastErrorCode();
+    //=============================================================================
+    /// <summary>
+    ///  Get variable dimension
+    /// </summary>
+    /// import getNamedVarDimension from C (see api_common.h)
+    /// <returns>int last error code</returns>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern api_Err getNamedVarDimension([In]IntPtr pvApiCtx, [In] String _pstName,
+                               [Out] Int32* _piRows, [Out] Int32* _piCols);
+    //=============================================================================
+    /// <summary>
+    ///  Get named complex information
+    /// </summary>
+    /// import isNamedVarComplex from C (see api_common.h)
+    /// <returns>int if complex 1 otherwise 0</returns>
+    [DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
+    public unsafe static extern int isNamedVarComplex([In]IntPtr pvApiCtx, [In] String _pstName);
+    //=============================================================================
+
+  }
+}
+//=============================================================================
Index: /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/HeuristicLab.DotNetScilab-1.0/DotNetScilab License.txt
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/HeuristicLab.DotNetScilab-1.0/DotNetScilab License.txt	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/HeuristicLab.DotNetScilab-1.0/DotNetScilab License.txt	(revision 11009)
@@ -0,0 +1,506 @@
+
+CeCILL FREE SOFTWARE LICENSE AGREEMENT
+
+
+    Notice
+
+This Agreement is a Free Software license agreement that is the result
+of discussions between its authors in order to ensure compliance with
+the two main principles guiding its drafting:
+
+    * firstly, compliance with the principles governing the distribution
+      of Free Software: access to source code, broad rights granted to
+      users,
+    * secondly, the election of a governing law, French law, with which
+      it is conformant, both as regards the law of torts and
+      intellectual property law, and the protection that it offers to
+      both authors and holders of the economic rights over software.
+
+The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
+license are:
+
+Commissariat à l'Energie Atomique - CEA, a public scientific, technical
+and industrial research establishment, having its principal place of
+business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.
+
+Centre National de la Recherche Scientifique - CNRS, a public scientific
+and technological establishment, having its principal place of business
+at 3 rue Michel-Ange, 75794 Paris cedex 16, France.
+
+Institut National de Recherche en Informatique et en Automatique -
+INRIA, a public scientific and technological establishment, having its
+principal place of business at Domaine de Voluceau, Rocquencourt, BP
+105, 78153 Le Chesnay cedex, France.
+
+
+    Preamble
+
+The purpose of this Free Software license agreement is to grant users
+the right to modify and redistribute the software governed by this
+license within the framework of an open source distribution model.
+
+The exercising of these rights is conditional upon certain obligations
+for users so as to preserve this status for all subsequent redistributions.
+
+In consideration of access to the source code and the rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty and the software's author, the holder of the
+economic rights, and the successive licensors only have limited liability.
+
+In this respect, the risks associated with loading, using, modifying
+and/or developing or reproducing the software by the user are brought to
+the user's attention, given its Free Software status, which may make it
+complicated to use, with the result that its use is reserved for
+developers and experienced professionals having in-depth computer
+knowledge. Users are therefore encouraged to load and test the
+suitability of the software as regards their requirements in conditions
+enabling the security of their systems and/or data to be ensured and,
+more generally, to use and operate it in the same conditions of
+security. This Agreement may be freely reproduced and published,
+provided it is not altered, and that no provisions are either added or
+removed herefrom.
+
+This Agreement may apply to any or all software for which the holder of
+the economic rights decides to submit the use thereof to its provisions.
+
+
+    Article 1 - DEFINITIONS
+
+For the purpose of this Agreement, when the following expressions
+commence with a capital letter, they shall have the following meaning:
+
+Agreement: means this license agreement, and its possible subsequent
+versions and annexes.
+
+Software: means the software in its Object Code and/or Source Code form
+and, where applicable, its documentation, "as is" when the Licensee
+accepts the Agreement.
+
+Initial Software: means the Software in its Source Code and possibly its
+Object Code form and, where applicable, its documentation, "as is" when
+it is first distributed under the terms and conditions of the Agreement.
+
+Modified Software: means the Software modified by at least one
+Contribution.
+
+Source Code: means all the Software's instructions and program lines to
+which access is required so as to modify the Software.
+
+Object Code: means the binary files originating from the compilation of
+the Source Code.
+
+Holder: means the holder(s) of the economic rights over the Initial
+Software.
+
+Licensee: means the Software user(s) having accepted the Agreement.
+
+Contributor: means a Licensee having made at least one Contribution.
+
+Licensor: means the Holder, or any other individual or legal entity, who
+distributes the Software under the Agreement.
+
+Contribution: means any or all modifications, corrections, translations,
+adaptations and/or new functions integrated into the Software by any or
+all Contributors, as well as any or all Internal Modules.
+
+Module: means a set of sources files including their documentation that
+enables supplementary functions or services in addition to those offered
+by the Software.
+
+External Module: means any or all Modules, not derived from the
+Software, so that this Module and the Software run in separate address
+spaces, with one calling the other when they are run.
+
+Internal Module: means any or all Module, connected to the Software so
+that they both execute in the same address space.
+
+GNU GPL: means the GNU General Public License version 2 or any
+subsequent version, as published by the Free Software Foundation Inc.
+
+Parties: mean both the Licensee and the Licensor.
+
+These expressions may be used both in singular and plural form.
+
+
+    Article 2 - PURPOSE
+
+The purpose of the Agreement is the grant by the Licensor to the
+Licensee of a non-exclusive, transferable and worldwide license for the
+Software as set forth in Article 5 hereinafter for the whole term of the
+protection granted by the rights over said Software. 
+
+
+    Article 3 - ACCEPTANCE
+
+3.1 The Licensee shall be deemed as having accepted the terms and
+conditions of this Agreement upon the occurrence of the first of the
+following events:
+
+    * (i) loading the Software by any or all means, notably, by
+      downloading from a remote server, or by loading from a physical
+      medium;
+    * (ii) the first time the Licensee exercises any of the rights
+      granted hereunder.
+
+3.2 One copy of the Agreement, containing a notice relating to the
+characteristics of the Software, to the limited warranty, and to the
+fact that its use is restricted to experienced users has been provided
+to the Licensee prior to its acceptance as set forth in Article 3.1
+hereinabove, and the Licensee hereby acknowledges that it has read and
+understood it.
+
+
+    Article 4 - EFFECTIVE DATE AND TERM
+
+
+      4.1 EFFECTIVE DATE
+
+The Agreement shall become effective on the date when it is accepted by
+the Licensee as set forth in Article 3.1.
+
+
+      4.2 TERM
+
+The Agreement shall remain in force for the entire legal term of
+protection of the economic rights over the Software.
+
+
+    Article 5 - SCOPE OF RIGHTS GRANTED
+
+The Licensor hereby grants to the Licensee, who accepts, the following
+rights over the Software for any or all use, and for the term of the
+Agreement, on the basis of the terms and conditions set forth hereinafter.
+
+Besides, if the Licensor owns or comes to own one or more patents
+protecting all or part of the functions of the Software or of its
+components, the Licensor undertakes not to enforce the rights granted by
+these patents against successive Licensees using, exploiting or
+modifying the Software. If these patents are transferred, the Licensor
+undertakes to have the transferees subscribe to the obligations set
+forth in this paragraph.
+
+
+      5.1 RIGHT OF USE
+
+The Licensee is authorized to use the Software, without any limitation
+as to its fields of application, with it being hereinafter specified
+that this comprises:
+
+   1. permanent or temporary reproduction of all or part of the Software
+      by any or all means and in any or all form.
+
+   2. loading, displaying, running, or storing the Software on any or
+      all medium.
+
+   3. entitlement to observe, study or test its operation so as to
+      determine the ideas and principles behind any or all constituent
+      elements of said Software. This shall apply when the Licensee
+      carries out any or all loading, displaying, running, transmission
+      or storage operation as regards the Software, that it is entitled
+      to carry out hereunder.
+
+
+      5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS
+
+The right to make Contributions includes the right to translate, adapt,
+arrange, or make any or all modifications to the Software, and the right
+to reproduce the resulting software.
+
+The Licensee is authorized to make any or all Contributions to the
+Software provided that it includes an explicit notice that it is the
+author of said Contribution and indicates the date of the creation thereof.
+
+
+      5.3 RIGHT OF DISTRIBUTION
+
+In particular, the right of distribution includes the right to publish,
+transmit and communicate the Software to the general public on any or
+all medium, and by any or all means, and the right to market, either in
+consideration of a fee, or free of charge, one or more copies of the
+Software by any means.
+
+The Licensee is further authorized to distribute copies of the modified
+or unmodified Software to third parties according to the terms and
+conditions set forth hereinafter.
+
+
+        5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION
+
+The Licensee is authorized to distribute true copies of the Software in
+Source Code or Object Code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+   1. a copy of the Agreement,
+
+   2. a notice relating to the limitation of both the Licensor's
+      warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the Object Code of the Software is
+redistributed, the Licensee allows future Licensees unhindered access to
+the full Source Code of the Software by indicating how to access it, it
+being understood that the additional cost of acquiring the Source Code
+shall not exceed the cost of transferring the data.
+
+
+        5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE
+
+When the Licensee makes a Contribution to the Software, the terms and
+conditions for the distribution of the resulting Modified Software
+become subject to all the provisions of this Agreement.
+
+The Licensee is authorized to distribute the Modified Software, in
+source code or object code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+   1. a copy of the Agreement,
+
+   2. a notice relating to the limitation of both the Licensor's
+      warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the object code of the Modified
+Software is redistributed, the Licensee allows future Licensees
+unhindered access to the full source code of the Modified Software by
+indicating how to access it, it being understood that the additional
+cost of acquiring the source code shall not exceed the cost of
+transferring the data.
+
+
+        5.3.3 DISTRIBUTION OF EXTERNAL MODULES
+
+When the Licensee has developed an External Module, the terms and
+conditions of this Agreement do not apply to said External Module, that
+may be distributed under a separate license agreement.
+
+
+        5.3.4 COMPATIBILITY WITH THE GNU GPL
+
+The Licensee can include a code that is subject to the provisions of one
+of the versions of the GNU GPL in the Modified or unmodified Software,
+and distribute that entire code under the terms of the same version of
+the GNU GPL.
+
+The Licensee can include the Modified or unmodified Software in a code
+that is subject to the provisions of one of the versions of the GNU GPL,
+and distribute that entire code under the terms of the same version of
+the GNU GPL.
+
+
+    Article 6 - INTELLECTUAL PROPERTY
+
+
+      6.1 OVER THE INITIAL SOFTWARE
+
+The Holder owns the economic rights over the Initial Software. Any or
+all use of the Initial Software is subject to compliance with the terms
+and conditions under which the Holder has elected to distribute its work
+and no one shall be entitled to modify the terms and conditions for the
+distribution of said Initial Software.
+
+The Holder undertakes that the Initial Software will remain ruled at
+least by this Agreement, for the duration set forth in Article 4.2.
+
+
+      6.2 OVER THE CONTRIBUTIONS
+
+The Licensee who develops a Contribution is the owner of the
+intellectual property rights over this Contribution as defined by
+applicable law.
+
+
+      6.3 OVER THE EXTERNAL MODULES
+
+The Licensee who develops an External Module is the owner of the
+intellectual property rights over this External Module as defined by
+applicable law and is free to choose the type of agreement that shall
+govern its distribution.
+
+
+      6.4 JOINT PROVISIONS
+
+The Licensee expressly undertakes:
+
+   1. not to remove, or modify, in any manner, the intellectual property
+      notices attached to the Software;
+
+   2. to reproduce said notices, in an identical manner, in the copies
+      of the Software modified or not.
+
+The Licensee undertakes not to directly or indirectly infringe the
+intellectual property rights of the Holder and/or Contributors on the
+Software and to take, where applicable, vis-à-vis its staff, any and all
+measures required to ensure respect of said intellectual property rights
+of the Holder and/or Contributors.
+
+
+    Article 7 - RELATED SERVICES
+
+7.1 Under no circumstances shall the Agreement oblige the Licensor to
+provide technical assistance or maintenance services for the Software.
+
+However, the Licensor is entitled to offer this type of services. The
+terms and conditions of such technical assistance, and/or such
+maintenance, shall be set forth in a separate instrument. Only the
+Licensor offering said maintenance and/or technical assistance services
+shall incur liability therefor.
+
+7.2 Similarly, any Licensor is entitled to offer to its licensees, under
+its sole responsibility, a warranty, that shall only be binding upon
+itself, for the redistribution of the Software and/or the Modified
+Software, under terms and conditions that it is free to decide. Said
+warranty, and the financial terms and conditions of its application,
+shall be subject of a separate instrument executed between the Licensor
+and the Licensee.
+
+
+    Article 8 - LIABILITY
+
+8.1 Subject to the provisions of Article 8.2, the Licensee shall be
+entitled to claim compensation for any direct loss it may have suffered
+from the Software as a result of a fault on the part of the relevant
+Licensor, subject to providing evidence thereof.
+
+8.2 The Licensor's liability is limited to the commitments made under
+this Agreement and shall not be incurred as a result of in particular:
+(i) loss due the Licensee's total or partial failure to fulfill its
+obligations, (ii) direct or consequential loss that is suffered by the
+Licensee due to the use or performance of the Software, and (iii) more
+generally, any consequential loss. In particular the Parties expressly
+agree that any or all pecuniary or business loss (i.e. loss of data,
+loss of profits, operating loss, loss of customers or orders,
+opportunity cost, any disturbance to business activities) or any or all
+legal proceedings instituted against the Licensee by a third party,
+shall constitute consequential loss and shall not provide entitlement to
+any or all compensation from the Licensor.
+
+
+    Article 9 - WARRANTY
+
+9.1 The Licensee acknowledges that the scientific and technical
+state-of-the-art when the Software was distributed did not enable all
+possible uses to be tested and verified, nor for the presence of
+possible defects to be detected. In this respect, the Licensee's
+attention has been drawn to the risks associated with loading, using,
+modifying and/or developing and reproducing the Software which are
+reserved for experienced users.
+
+The Licensee shall be responsible for verifying, by any or all means,
+the suitability of the product for its requirements, its good working
+order, and for ensuring that it shall not cause damage to either persons
+or properties.
+
+9.2 The Licensor hereby represents, in good faith, that it is entitled
+to grant all the rights over the Software (including in particular the
+rights set forth in Article 5).
+
+9.3 The Licensee acknowledges that the Software is supplied "as is" by
+the Licensor without any other express or tacit warranty, other than
+that provided for in Article 9.2 and, in particular, without any warranty 
+as to its commercial value, its secured, safe, innovative or relevant
+nature.
+
+Specifically, the Licensor does not warrant that the Software is free
+from any error, that it will operate without interruption, that it will
+be compatible with the Licensee's own equipment and software
+configuration, nor that it will meet the Licensee's requirements.
+
+9.4 The Licensor does not either expressly or tacitly warrant that the
+Software does not infringe any third party intellectual property right
+relating to a patent, software or any other property right. Therefore,
+the Licensor disclaims any and all liability towards the Licensee
+arising out of any or all proceedings for infringement that may be
+instituted in respect of the use, modification and redistribution of the
+Software. Nevertheless, should such proceedings be instituted against
+the Licensee, the Licensor shall provide it with technical and legal
+assistance for its defense. Such technical and legal assistance shall be
+decided on a case-by-case basis between the relevant Licensor and the
+Licensee pursuant to a memorandum of understanding. The Licensor
+disclaims any and all liability as regards the Licensee's use of the
+name of the Software. No warranty is given as regards the existence of
+prior rights over the name of the Software or as regards the existence
+of a trademark.
+
+
+    Article 10 - TERMINATION
+
+10.1 In the event of a breach by the Licensee of its obligations
+hereunder, the Licensor may automatically terminate this Agreement
+thirty (30) days after notice has been sent to the Licensee and has
+remained ineffective.
+
+10.2 A Licensee whose Agreement is terminated shall no longer be
+authorized to use, modify or distribute the Software. However, any
+licenses that it may have granted prior to termination of the Agreement
+shall remain valid subject to their having been granted in compliance
+with the terms and conditions hereof.
+
+
+    Article 11 - MISCELLANEOUS
+
+
+      11.1 EXCUSABLE EVENTS
+
+Neither Party shall be liable for any or all delay, or failure to
+perform the Agreement, that may be attributable to an event of force
+majeure, an act of God or an outside cause, such as defective
+functioning or interruptions of the electricity or telecommunications
+networks, network paralysis following a virus attack, intervention by
+government authorities, natural disasters, water damage, earthquakes,
+fire, explosions, strikes and labor unrest, war, etc.
+
+11.2 Any failure by either Party, on one or more occasions, to invoke
+one or more of the provisions hereof, shall under no circumstances be
+interpreted as being a waiver by the interested Party of its right to
+invoke said provision(s) subsequently.
+
+11.3 The Agreement cancels and replaces any or all previous agreements,
+whether written or oral, between the Parties and having the same
+purpose, and constitutes the entirety of the agreement between said
+Parties concerning said purpose. No supplement or modification to the
+terms and conditions hereof shall be effective as between the Parties
+unless it is made in writing and signed by their duly authorized
+representatives.
+
+11.4 In the event that one or more of the provisions hereof were to
+conflict with a current or future applicable act or legislative text,
+said act or legislative text shall prevail, and the Parties shall make
+the necessary amendments so as to comply with said act or legislative
+text. All other provisions shall remain effective. Similarly, invalidity
+of a provision of the Agreement, for any reason whatsoever, shall not
+cause the Agreement as a whole to be invalid.
+
+
+      11.5 LANGUAGE
+
+The Agreement is drafted in both French and English and both versions
+are deemed authentic.
+
+
+    Article 12 - NEW VERSIONS OF THE AGREEMENT
+
+12.1 Any person is authorized to duplicate and distribute copies of this
+Agreement.
+
+12.2 So as to ensure coherence, the wording of this Agreement is
+protected and may only be modified by the authors of the License, who
+reserve the right to periodically publish updates or new versions of the
+Agreement, each with a separate number. These subsequent versions may
+address new issues encountered by Free Software.
+
+12.3 Any Software distributed under a given version of the Agreement may
+only be subsequently distributed under the same version of the Agreement
+or a subsequent version, subject to the provisions of Article 5.3.4.
+
+
+    Article 13 - GOVERNING LAW AND JURISDICTION
+
+13.1 The Agreement is governed by French law. The Parties agree to
+endeavor to seek an amicable solution to any disagreements or disputes
+that may arise during the performance of the Agreement.
+
+13.2 Failing an amicable solution within two (2) months as from their
+occurrence, and unless emergency proceedings are necessary, the
+disagreements or disputes shall be referred to the Paris Courts having
+jurisdiction, by the more diligent Party.
+
+
+Version 2.0 dated 2006-09-05.
Index: /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/HeuristicLab.DotNetScilab-1.0/HeuristicLab.DotNetScilab-1.0.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/HeuristicLab.DotNetScilab-1.0/HeuristicLab.DotNetScilab-1.0.csproj	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/HeuristicLab.DotNetScilab-1.0/HeuristicLab.DotNetScilab-1.0.csproj	(revision 11009)
@@ -0,0 +1,83 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{F2F242B0-9996-4B49-828D-2BFC5925FDE0}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.DotNetScilab</RootNamespace>
+    <AssemblyName>HeuristicLab.DotNetScilab-1.0</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </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>
+  </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>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="DotNetScilab License.txt">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd</PreBuildEvent>
+  </PropertyGroup>
+  <!-- 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/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/HeuristicLab.DotNetScilab-1.0/Plugin.cs.frame
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/HeuristicLab.DotNetScilab-1.0/Plugin.cs.frame	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/HeuristicLab.DotNetScilab-1.0/Plugin.cs.frame	(revision 11009)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.PluginInfrastructure;
+
+namespace HeuristicLab.DotNetScilab {
+  [Plugin("HeuristicLab.DotNetScilab", "HeuristicLab wrapper for DotNetScilab", "1.0.0.$WCREV$")]
+  [PluginFile("HeuristicLab.DotNetScilab-1.0.dll", PluginFileType.Assembly)]
+  [PluginFile("DotNetScilab-1.0.dll", PluginFileType.Assembly)]
+  [PluginFile("DotNetScilab-1.0.dll.config", PluginFileType.Data)]
+  [PluginFile("DotNetScilab License.txt", PluginFileType.License)]
+  public class HeuristicLabDotNetScilabPlugin : PluginBase {
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/HeuristicLab.DotNetScilab-1.0/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/HeuristicLab.DotNetScilab-1.0/Properties/AssemblyInfo.cs.frame	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.ExtLibs/HeuristicLab.DotNetScilab/1.0/HeuristicLab.DotNetScilab-1.0/Properties/AssemblyInfo.cs.frame	(revision 11009)
@@ -0,0 +1,57 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.CompilerServices;
+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.DotNetScilab")]
+[assembly: AssemblyDescription("Transport plugin for DotNetScilab")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2014 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("f70ed15d-9703-4c6f-b2f0-89ae10be305d")]
+
+// 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.*")]
+[assembly: AssemblyVersion("1.0")]
+[assembly: AssemblyFileVersion("1.0.0.$WCREV$")]
Index: /branches/DataPreprocessing/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs	(revision 11009)
@@ -436,4 +436,9 @@
     /// </summary>
     public void RemoveOperationProgressFromView(Control control, bool finishProgress = true) {
+      if (InvokeRequired) {
+        Invoke((Action<Control, bool>)RemoveOperationProgressFromView, control, finishProgress);
+        return;
+      }
+
       IProgress progress;
       if (!viewProgressLookup.TryGetValue(control, out progress))
@@ -550,6 +555,5 @@
       try {
         ((IActionUserInterfaceItem)item.Tag).Execute();
-      }
-      catch (Exception ex) {
+      } catch (Exception ex) {
         ErrorHandling.ShowErrorDialog((Control)MainFormManager.MainForm, ex);
       }
Index: /branches/DataPreprocessing/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs	(revision 11009)
@@ -122,5 +122,4 @@
         Invoke(new EventHandler(Content_Reset), sender, e);
       else {
-        this.categoricalMapping.Clear();
         UpdateDataPoints();
         UpdateAxisLabels();
@@ -189,4 +188,5 @@
 
     private void UpdateDataPoints() {
+      this.categoricalMapping.Clear();
       this.chart.Series.Clear();
       this.seriesCache.Clear();
@@ -234,5 +234,5 @@
       }
       matrix.ColumnNames = columnNames;
-      matrix.RowNames = new string[] { "Count", "Minimum", "Maximum", "Average", "Median", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile" };
+      matrix.RowNames = new string[] { "Count", "Minimum", "Maximum", "Median", "Average", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile" };
 
       for (int i = 0; i < seriesCache.Count; i++) {
@@ -242,6 +242,6 @@
         matrix[1, i] = seriesValues.Min();
         matrix[2, i] = seriesValues.Max();
-        matrix[3, i] = seriesValues.Average();
-        matrix[4, i] = seriesValues.Median();
+        matrix[3, i] = seriesValues.Median();
+        matrix[4, i] = seriesValues.Average();
         matrix[5, i] = seriesValues.StandardDeviation();
         matrix[6, i] = seriesValues.Variance();
@@ -325,5 +325,5 @@
       }
     }
-    private double GetCategoricalValue(int dimension, string value) {
+    private double? GetCategoricalValue(int dimension, string value) {
       if (!this.categoricalMapping.ContainsKey(dimension)) {
         this.categoricalMapping[dimension] = new Dictionary<object, double>();
@@ -336,8 +336,9 @@
         }
       }
+      if (!this.categoricalMapping[dimension].ContainsKey(value)) return null;
       return this.categoricalMapping[dimension][value];
     }
-    private double GetValue(IRun run, AxisDimension axisDimension) {
-      double value = double.NaN;
+    private double? GetValue(IRun run, AxisDimension axisDimension) {
+      double? value = double.NaN;
       switch (axisDimension) {
         case AxisDimension.Color: {
Index: /branches/DataPreprocessing/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs	(revision 11009)
@@ -56,5 +56,5 @@
     private bool suppressUpdates = false;
 
-    private RunCollectionContentConstraint visibilityConstraint = new RunCollectionContentConstraint() { Active = true };
+    private readonly RunCollectionContentConstraint visibilityConstraint = new RunCollectionContentConstraint() { Active = true };
 
     public RunCollectionBubbleChartView() {
@@ -153,8 +153,5 @@
         if (suppressUpdates) return;
 
-        foreach (var run in Content) UpdateRun(run);
-        UpdateMarkerSizes();
-        UpdateCursorInterval();
-        chart.ChartAreas[0].RecalculateAxesScale();
+        UpdateDataPoints();
         UpdateAxisLabels();
       }
@@ -190,9 +187,7 @@
     protected override void OnContentChanged() {
       base.OnContentChanged();
-      this.categoricalMapping.Clear();
       UpdateComboBoxes();
       UpdateDataPoints();
       UpdateCaption();
-      RebuildInverseIndex();
     }
 
@@ -267,6 +262,4 @@
         Invoke(new EventHandler(Content_Reset), sender, e);
       else {
-        this.categoricalMapping.Clear();
-        RebuildInverseIndex();
         UpdateDataPoints();
         UpdateAxisLabels();
@@ -278,5 +271,7 @@
       series.Points.Clear();
       runToDataPointMapping.Clear();
+      categoricalMapping.Clear();
       selectedRuns.Clear();
+      RebuildInverseIndex();
 
       chart.ChartAreas[0].AxisX.IsMarginVisible = xAxisValue != AxisDimension.Index.ToString();
@@ -438,5 +433,5 @@
       }
     }
-    private double GetCategoricalValue(int dimension, string value) {
+    private double? GetCategoricalValue(int dimension, string value) {
       if (!this.categoricalMapping.ContainsKey(dimension)) {
         this.categoricalMapping[dimension] = new Dictionary<object, double>();
@@ -449,4 +444,5 @@
         }
       }
+      if (!this.categoricalMapping[dimension].ContainsKey(value)) return null;
       return this.categoricalMapping[dimension][value];
     }
@@ -723,10 +719,12 @@
     }
     private void hideRunsToolStripMenuItem_Click(object sender, EventArgs e) {
-      HideRuns(selectedRuns);
+      //ToList is necessary to prevent lazy evaluation
+      HideRuns(selectedRuns.ToList());
       //could not use ClearSelectedRuns as the runs are not visible anymore
       selectedRuns.Clear();
     }
     private void hideRunsButton_Click(object sender, EventArgs e) {
-      HideRuns(selectedRuns);
+      //ToList is necessary to prevent lazy evaluation
+      HideRuns(selectedRuns.ToList());
       //could not use ClearSelectedRuns as the runs are not visible anymore
       selectedRuns.Clear();
Index: /branches/DataPreprocessing/HeuristicLab.Optimizer/3.3/HeuristicLab.Optimizer-3.3.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Optimizer/3.3/HeuristicLab.Optimizer-3.3.csproj	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Optimizer/3.3/HeuristicLab.Optimizer-3.3.csproj	(revision 11009)
@@ -128,4 +128,6 @@
     <EmbeddedResource Include="Documents\GPR.hl" />
     <EmbeddedResource Include="Documents\TS_VRP.hl" />
+    <EmbeddedResource Include="Documents\GE_ArtificialAnt.hl" />
+    <EmbeddedResource Include="Documents\GE_SymbReg.hl" />
     <None Include="Plugin.cs.frame" />
     <Compile Include="OptimizerSingleDocumentMainForm.cs">
Index: /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Number2StringSerializer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Number2StringSerializer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Number2StringSerializer.cs	(revision 11009)
@@ -78,5 +78,5 @@
     /// </returns>
     public bool CanSerialize(Type type) {
-      return numberSerializerMap.ContainsKey(type);
+      return numberSerializerMap.ContainsKey(Nullable.GetUnderlyingType(type) ?? type);
     }
 
@@ -90,5 +90,5 @@
     /// </returns>
     public string JustifyRejection(Type type) {
-      return string.Format("not a number type (one of {0})",
+      return string.Format("not a (nullable) number type (one of {0})",
         string.Join(", ", numberSerializers.Select(n => n.SourceType.Name).ToArray()));
     }
@@ -100,5 +100,7 @@
     /// <returns></returns>
     public string Format(object obj) {
-      return ((XmlString)numberSerializerMap[obj.GetType()].Format(obj)).Data;
+      if (obj == null) return "null";
+      Type type = obj.GetType();
+      return ((XmlString)numberSerializerMap[Nullable.GetUnderlyingType(type) ?? type].Format(obj)).Data;
     }
 
@@ -110,6 +112,7 @@
     /// <returns></returns>
     public object Parse(string stringValue, Type type) {
+      if (stringValue == "null") return null;
       try {
-        return numberSerializerMap[type].Parse(new XmlString(stringValue));
+        return numberSerializerMap[Nullable.GetUnderlyingType(type) ?? type].Parse(new XmlString(stringValue));
       }
       catch (FormatException e) {
Index: /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs	(revision 11009)
@@ -47,4 +47,5 @@
       hookCache = new Dictionary<HookDesignator, List<StorableReflection.Hook>>();
     }
+
     [StorableConstructor]
     private StorableSerializer(bool deserializing) : this() { }
@@ -68,5 +69,5 @@
     /// </returns>
     public bool CanSerialize(Type type) {
-      bool markedStorable = StorableReflection.HasStorableClassAttribute(type);
+      var markedStorable = StorableReflection.HasStorableClassAttribute(type);
       if (GetConstructor(type) == null)
         if (markedStorable)
@@ -91,5 +92,5 @@
     /// </returns>
     public string JustifyRejection(Type type) {
-      StringBuilder sb = new StringBuilder();
+      var sb = new StringBuilder();
       if (GetConstructor(type) == null)
         sb.Append("class has no default constructor and no [StorableConstructor]");
@@ -117,8 +118,7 @@
     /// <returns>An enumerable of <see cref="Tag"/>s.</returns>
     public IEnumerable<Tag> Decompose(object obj) {
-      foreach (var accessor in GetStorableAccessors(obj.GetType())) {
-        if (accessor.Get != null)
-          yield return new Tag(accessor.Name, accessor.Get(obj));
-      }
+      return from accessor in GetStorableAccessors(obj.GetType())
+             where accessor.Get != null
+             select new Tag(accessor.Name, accessor.Get(obj));
     }
 
@@ -147,5 +147,5 @@
     public void Populate(object instance, IEnumerable<Tag> objects, Type type) {
       var memberDict = new Dictionary<string, Tag>();
-      IEnumerator<Tag> iter = objects.GetEnumerator();
+      var iter = objects.GetEnumerator();
       while (iter.MoveNext()) {
         memberDict.Add(iter.Current.Name, iter.Current);
@@ -170,15 +170,6 @@
       BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
 
-    private static readonly object[] emptyArgs = new object[] { };
-    private static readonly object[] trueArgs = new object[] { true };
-
-    private sealed class HookDesignator {
-      public Type Type { get; private set; }
-      public HookType HookType { get; private set; }
-      public HookDesignator() { }
-      public HookDesignator(Type type, HookType hookType) {
-        Type = type;
-        HookType = HookType;
-      }
+    private sealed class HookDesignator : Tuple<Type, HookType> {
+      public HookDesignator(Type type, HookType hookType) : base(type, hookType) { }
     }
 
@@ -191,8 +182,8 @@
     #region caches
 
-    private AccessorListCache accessorListCache;
-    private AccessorCache accessorCache;
-    private Dictionary<Type, Constructor> constructorCache;
-    private Dictionary<HookDesignator, List<StorableReflection.Hook>> hookCache;
+    private readonly AccessorListCache accessorListCache;
+    private readonly AccessorCache accessorCache;
+    private readonly Dictionary<Type, Constructor> constructorCache;
+    private readonly Dictionary<HookDesignator, List<StorableReflection.Hook>> hookCache;
 
     #endregion
@@ -206,5 +197,6 @@
         var storableMembers = StorableReflection
           .GenerateStorableMembers(type)
-          .Select(mi => GetMemberAccessor(mi));
+          .Select(GetMemberAccessor)
+          .ToList();
         accessorListCache[type] = storableMembers;
         return storableMembers;
@@ -216,5 +208,5 @@
         if (accessorCache.ContainsKey(mi.MemberInfo))
           return new DataMemberAccessor(accessorCache[mi.MemberInfo], mi.DisentangledName, mi.DefaultValue);
-        DataMemberAccessor dma = new DataMemberAccessor(mi.MemberInfo, mi.DisentangledName, mi.DefaultValue);
+        var dma = new DataMemberAccessor(mi.MemberInfo, mi.DisentangledName, mi.DefaultValue);
         accessorCache[mi.MemberInfo] = dma;
         return dma;
@@ -226,5 +218,5 @@
         if (constructorCache.ContainsKey(type))
           return constructorCache[type];
-        Constructor c = FindStorableConstructor(type) ?? GetDefaultConstructor(type);
+        var c = FindStorableConstructor(type) ?? GetDefaultConstructor(type);
         constructorCache.Add(type, c);
         return c;
@@ -233,9 +225,9 @@
 
     private Constructor GetDefaultConstructor(Type type) {
-      ConstructorInfo ci = type.GetConstructor(ALL_CONSTRUCTORS, null, Type.EmptyTypes, null);
+      var ci = type.GetConstructor(ALL_CONSTRUCTORS, null, Type.EmptyTypes, null);
       if (ci == null)
         return null;
-      DynamicMethod dm = new DynamicMethod("", typeof(object), null, type, true);
-      ILGenerator ilgen = dm.GetILGenerator();
+      var dm = new DynamicMethod("", typeof(object), null, type, true);
+      var ilgen = dm.GetILGenerator();
       ilgen.Emit(OpCodes.Newobj, ci);
       ilgen.Emit(OpCodes.Ret);
@@ -244,16 +236,16 @@
 
     private Constructor FindStorableConstructor(Type type) {
-      foreach (ConstructorInfo ci in type.GetConstructors(ALL_CONSTRUCTORS)) {
-        if (ci.GetCustomAttributes(typeof(StorableConstructorAttribute), false).Length > 0) {
-          if (ci.GetParameters().Length != 1 ||
-              ci.GetParameters()[0].ParameterType != typeof(bool))
-            throw new PersistenceException("StorableConstructor must have exactly one argument of type bool");
-          DynamicMethod dm = new DynamicMethod("", typeof(object), null, type, true);
-          ILGenerator ilgen = dm.GetILGenerator();
-          ilgen.Emit(OpCodes.Ldc_I4_1); // load true
-          ilgen.Emit(OpCodes.Newobj, ci);
-          ilgen.Emit(OpCodes.Ret);
-          return (Constructor)dm.CreateDelegate(typeof(Constructor));
-        }
+      foreach (var ci in type
+        .GetConstructors(ALL_CONSTRUCTORS)
+        .Where(ci => ci.GetCustomAttributes(typeof(StorableConstructorAttribute), false).Length > 0)) {
+        if (ci.GetParameters().Length != 1 ||
+            ci.GetParameters()[0].ParameterType != typeof(bool))
+          throw new PersistenceException("StorableConstructor must have exactly one argument of type bool");
+        var dm = new DynamicMethod("", typeof(object), null, type, true);
+        var ilgen = dm.GetILGenerator();
+        ilgen.Emit(OpCodes.Ldc_I4_1); // load true
+        ilgen.Emit(OpCodes.Newobj, ci);
+        ilgen.Emit(OpCodes.Ret);
+        return (Constructor)dm.CreateDelegate(typeof(Constructor));
       }
       return null;
@@ -262,6 +254,6 @@
     private void InvokeHook(HookType hookType, object obj) {
       if (obj == null)
-        throw new ArgumentNullException("Cannot invoke hooks on null");
-      foreach (StorableReflection.Hook hook in GetHooks(hookType, obj.GetType())) {
+        throw new ArgumentNullException("obj");
+      foreach (var hook in GetHooks(hookType, obj.GetType())) {
         hook(obj);
       }
Index: /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Char2XmlFormatter.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Char2XmlFormatter.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Char2XmlFormatter.cs	(revision 11009)
@@ -20,4 +20,7 @@
 #endregion
 
+using System;
+using System.Text;
+using System.Text.RegularExpressions;
 using HeuristicLab.Persistence.Core;
 using HeuristicLab.Persistence.Interfaces;
@@ -27,12 +30,24 @@
   internal sealed class Char2XmlSerializer : PrimitiveSerializerBase<char, XmlString> {
 
+    private static readonly Regex base64Regex = new Regex("<Base64>(.+)</Base64>");
+
+    private static bool IsSpecial(char c) {
+      return c <= 0x1F && c != 0x9 && c != 0xA && c != 0xD;
+    }
+
+    private static string ToBase64String(char c) {
+      return string.Format("<Base64>{0}</Base64>", Convert.ToBase64String(Encoding.ASCII.GetBytes(new[] {c})));
+    }
+
     public override XmlString Format(char c) {
-      return new XmlString(new string(c, 1));
+      return new XmlString(IsSpecial(c) ? ToBase64String(c) : new string(c, 1));
     }
 
     public override char Parse(XmlString x) {
-      if (x.Data.Length != 1)
-        throw new PersistenceException("Invalid character format, XML string length != 1");
-      return x.Data[0];
+      if (x.Data.Length <= 1) return x.Data[0];
+      var m = base64Regex.Match(x.Data);
+      if (m.Success)
+        return Encoding.ASCII.GetString(Convert.FromBase64String(m.Groups[1].Value))[0];
+      throw new PersistenceException("Invalid character format, XML string length != 1");
     }
   }
Index: /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlSerializer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlSerializer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/String2XmlSerializer.cs	(revision 11009)
@@ -20,8 +20,8 @@
 #endregion
 
+using System;
 using System.Text;
 using System.Text.RegularExpressions;
 using HeuristicLab.Persistence.Core;
-
 
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
@@ -42,8 +42,18 @@
       sb.Append(s.Replace("]]>", "]]]]><![CDATA[>"));
       sb.Append("]]>");
-      return new XmlString(sb.ToString());
+      s = special.Replace(sb.ToString(), m => ToBase64Tag(m.Value));
+      return new XmlString(s);
     }
 
-    private static Regex re = new Regex(@"<!\[CDATA\[((?:[^]]|\](?!\]>))*)\]\]>", RegexOptions.Singleline);
+    private static readonly Regex re = new Regex(@"<!\[CDATA\[((?:[^]]|\](?!\]>))*)\]\]>|<Base64>([^<]*)</Base64>", RegexOptions.Singleline);
+    private static readonly Regex special = new Regex(@"[\x00-\x08\x0b\x0c\x0e-\x1f]+", RegexOptions.Singleline);
+
+    private static string ToBase64Tag(string s) {
+      return new StringBuilder()
+        .Append("]]><Base64>")
+        .Append(Convert.ToBase64String(Encoding.ASCII.GetBytes(s)))
+        .Append("</Base64><![CDATA[")
+        .ToString();
+    }
 
     /// <summary>
@@ -55,5 +65,9 @@
       StringBuilder sb = new StringBuilder();
       foreach (Match m in re.Matches(x.Data)) {
-        sb.Append(m.Groups[1]);
+        if (m.Groups[1].Success)
+          sb.Append(m.Groups[1].Value);
+        else if (m.Groups[2].Success) {
+          sb.Append(Encoding.ASCII.GetString(Convert.FromBase64String(m.Groups[2].Value)));
+        }
       }
       string result = sb.ToString();
Index: /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Font2XmlSerializer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Font2XmlSerializer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Font2XmlSerializer.cs	(revision 11009)
@@ -28,5 +28,5 @@
     public override XmlString Format(Font font) {
       return new XmlString(string.Format("{0};{1};{2};{3};{4};{5}",
-        font.FontFamily.Name,
+        GetFontFamilyName(font.FontFamily),
         Float2XmlSerializer.FormatG8(font.Size),
         font.Style,
@@ -39,5 +39,5 @@
       string[] tokens = fontData.Data.Split(';');
       return new Font(
-        tokens[0],
+        GetFontFamily(tokens[0]),
         Float2XmlSerializer.ParseG8(tokens[1]),
         (FontStyle)Enum.Parse(typeof(FontStyle), tokens[2]),
@@ -46,4 +46,23 @@
         bool.Parse(tokens[5]));
     }
+
+    public const string GENERIC_MONOSPACE_NAME = "_GenericMonospace";
+    public const string GENERIC_SANS_SERIF_NAME = "_GenericSansSerif";
+    public const string GENERIC_SERIF_NAME = "_GenericSerif";
+
+    public static FontFamily GetFontFamily(string name) {
+      if (name == GENERIC_MONOSPACE_NAME) return FontFamily.GenericMonospace;
+      if (name == GENERIC_SANS_SERIF_NAME) return FontFamily.GenericSansSerif;
+      if (name == GENERIC_SERIF_NAME) return FontFamily.GenericSerif;
+      return new FontFamily(name);
+    }
+
+    public static string GetFontFamilyName(FontFamily ff) {
+      if (ff.Equals(FontFamily.GenericMonospace)) return GENERIC_MONOSPACE_NAME;
+      if (ff.Equals(FontFamily.GenericSansSerif)) return GENERIC_SANS_SERIF_NAME;
+      if (ff.Equals(FontFamily.GenericSerif)) return GENERIC_SERIF_NAME;
+      return ff.Name;
+    }
+
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj	(revision 11009)
@@ -152,4 +152,9 @@
       <Private>False</Private>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
       <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/Plugin.cs.frame
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/Plugin.cs.frame	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/Plugin.cs.frame	(revision 11009)
@@ -29,4 +29,5 @@
   [PluginFile("HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
   [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Core.Views", "3.3")]
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicClassificationSolutionView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicClassificationSolutionView.Designer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicClassificationSolutionView.Designer.cs	(revision 11009)
@@ -45,4 +45,6 @@
     /// </summary>
     private void InitializeComponent() {
+      this.exportButton = new System.Windows.Forms.Button();
+      this.exportFileDialog = new System.Windows.Forms.SaveFileDialog();
       this.btnSimplify = new System.Windows.Forms.Button();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
@@ -53,25 +55,39 @@
       this.detailsGroupBox.SuspendLayout();
       this.SuspendLayout();
-      exportButton.Visible = false;
       // 
-      // splitContainer
+      // flowLayoutPanel
       // 
-      // 
-      // splitContainer.Panel1
-      // 
-      this.splitContainer.Panel1.Controls.Add(this.btnSimplify);
+      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
+      this.flowLayoutPanel.Controls.Add(this.exportButton);
       // 
       // btnSimplify
       // 
-      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.btnSimplify.Location = new System.Drawing.Point(172, 4);
+      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
+      this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator;
+      this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
       this.btnSimplify.Name = "btnSimplify";
-      this.btnSimplify.Size = new System.Drawing.Size(75, 23);
-      this.btnSimplify.TabIndex = 6;
-      this.btnSimplify.Text = "Simplify";
+      this.btnSimplify.Size = new System.Drawing.Size(105, 24);
+      this.btnSimplify.TabIndex = 7;
+      this.btnSimplify.Text = "Simplify Model";
+      this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
       this.btnSimplify.UseVisualStyleBackColor = true;
       this.btnSimplify.Click += new System.EventHandler(this.btn_SimplifyModel_Click);
+      this.toolTip.SetToolTip(this.btnSimplify, "Simplify solution");
       // 
-      // SymbolicDiscriminantFunctionClassificationSolutionView
+      // exportButton
+      // 
+      this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
+      this.exportButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Statistics;
+      this.exportButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+      this.exportButton.Name = "exportButton";
+      this.exportButton.Size = new System.Drawing.Size(105, 24);
+      this.exportButton.TabIndex = 8;
+      this.exportButton.Text = "Export to Excel ";
+      this.exportButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+      this.exportButton.UseVisualStyleBackColor = true;
+      this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
+      this.toolTip.SetToolTip(this.exportButton, "Exports the symbolic regression solution to Excel.");
+      // 
+      // SymbolicClassificationSolutionView
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -88,4 +104,6 @@
     #endregion
 
+    protected System.Windows.Forms.SaveFileDialog exportFileDialog;
+    protected System.Windows.Forms.Button exportButton;
     protected System.Windows.Forms.Button btnSimplify;
   }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicClassificationSolutionView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicClassificationSolutionView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicClassificationSolutionView.cs	(revision 11009)
@@ -21,6 +21,8 @@
 
 using System;
+using System.ComponentModel;
 using System.Windows.Forms;
 using HeuristicLab.MainForm;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Views;
 using HeuristicLab.Problems.DataAnalysis.Views;
 
@@ -38,4 +40,10 @@
     }
 
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      btnSimplify.Enabled = Content != null && !Locked;
+      exportButton.Enabled = Content != null && !Locked;
+    }
+
     private void btn_SimplifyModel_Click(object sender, EventArgs e) {
       var view = new InteractiveSymbolicClassificationSolutionSimplifierView();
@@ -43,4 +51,19 @@
       view.Show();
     }
+
+    private void exportButton_Click(object sender, EventArgs e) {
+      var exporter = new SymbolicSolutionExcelExporter();
+      exportFileDialog.Filter = exporter.FileTypeFilter;
+      if (exportFileDialog.ShowDialog(this) == DialogResult.OK) {
+
+        var name = exportFileDialog.FileName;
+        using (BackgroundWorker bg = new BackgroundWorker()) {
+          MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Exportion solution to " + name + ".");
+          bg.DoWork += (o, a) => exporter.Export(Content, name);
+          bg.RunWorkerCompleted += (o, a) => MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);
+          bg.RunWorkerAsync();
+        }
+      }
+    }
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.Designer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.Designer.cs	(revision 11009)
@@ -45,5 +45,6 @@
     /// </summary>
     private void InitializeComponent() {
-      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SymbolicDiscriminantFunctionClassificationSolutionView));
+      this.exportButton = new System.Windows.Forms.Button();
+      this.exportFileDialog = new System.Windows.Forms.SaveFileDialog();
       this.btnSimplify = new System.Windows.Forms.Button();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
@@ -54,23 +55,37 @@
       this.detailsGroupBox.SuspendLayout();
       this.SuspendLayout();
-      exportButton.Visible = false;
       // 
-      // splitContainer
+      // flowLayoutPanel
       // 
-      // 
-      // splitContainer.Panel1
-      // 
-      this.splitContainer.Panel1.Controls.Add(this.btnSimplify);
+      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
+      this.flowLayoutPanel.Controls.Add(this.exportButton);
       // 
       // btnSimplify
       // 
-      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.btnSimplify.Location = new System.Drawing.Point(172, 4);
+      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
+      this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator;
+      this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
       this.btnSimplify.Name = "btnSimplify";
-      this.btnSimplify.Size = new System.Drawing.Size(75, 23);
-      this.btnSimplify.TabIndex = 6;
-      this.btnSimplify.Text = "Simplify";
+      this.btnSimplify.Size = new System.Drawing.Size(105, 24);
+      this.btnSimplify.TabIndex = 7;
+      this.btnSimplify.Text = "Simplify Model";
+      this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
       this.btnSimplify.UseVisualStyleBackColor = true;
       this.btnSimplify.Click += new System.EventHandler(this.btn_SimplifyModel_Click);
+      this.toolTip.SetToolTip(this.btnSimplify, "Simplify solution");
+      // 
+      // exportButton
+      // 
+      this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
+      this.exportButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Statistics;
+      this.exportButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+      this.exportButton.Name = "exportButton";
+      this.exportButton.Size = new System.Drawing.Size(105, 24);
+      this.exportButton.TabIndex = 8;
+      this.exportButton.Text = "Export to Excel ";
+      this.exportButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+      this.exportButton.UseVisualStyleBackColor = true;
+      this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
+      this.toolTip.SetToolTip(this.exportButton, "Exports the symbolic regression solution to Excel.");
       // 
       // SymbolicDiscriminantFunctionClassificationSolutionView
@@ -89,4 +104,6 @@
     #endregion
 
+    protected System.Windows.Forms.SaveFileDialog exportFileDialog;
+    protected System.Windows.Forms.Button exportButton;
     protected System.Windows.Forms.Button btnSimplify;
   }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.cs	(revision 11009)
@@ -21,6 +21,8 @@
 
 using System;
+using System.ComponentModel;
 using System.Windows.Forms;
 using HeuristicLab.MainForm;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Views;
 using HeuristicLab.Problems.DataAnalysis.Views;
 
@@ -38,4 +40,10 @@
     }
 
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      btnSimplify.Enabled = Content != null && !Locked;
+      exportButton.Enabled = Content != null && !Locked;
+    }
+
     private void btn_SimplifyModel_Click(object sender, EventArgs e) {
       var view = new InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView();
@@ -43,4 +51,19 @@
       view.Show();
     }
+
+    private void exportButton_Click(object sender, EventArgs e) {
+      var exporter = new SymbolicSolutionExcelExporter();
+      exportFileDialog.Filter = exporter.FileTypeFilter;
+      if (exportFileDialog.ShowDialog(this) == DialogResult.OK) {
+
+        var name = exportFileDialog.FileName;
+        using (BackgroundWorker bg = new BackgroundWorker()) {
+          MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Exportion solution to " + name + ".");
+          bg.DoWork += (o, a) => exporter.Export(Content, name);
+          bg.RunWorkerCompleted += (o, a) => MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);
+          bg.RunWorkerAsync();
+        }
+      }
+    }
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveOverfittingAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveOverfittingAnalyzer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveOverfittingAnalyzer.cs	(revision 11009)
@@ -83,5 +83,4 @@
       IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
       double[] validationQuality = SymbolicExpressionTree
-        .AsParallel()
         .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
         .ToArray();
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.csproj	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.csproj	(revision 11009)
@@ -110,7 +110,5 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="InteractiveSymbolicRegressionSolutionSimplifierView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="InteractiveSymbolicRegressionSolutionSimplifierView.cs" />
     <Compile Include="InteractiveSymbolicRegressionSolutionSimplifierView.Designer.cs">
       <DependentUpon>InteractiveSymbolicRegressionSolutionSimplifierView.cs</DependentUpon>
@@ -155,4 +153,9 @@
       <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
       <Name>HeuristicLab.Collections-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
       <Private>False</Private>
     </ProjectReference>
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/Plugin.cs.frame
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/Plugin.cs.frame	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/Plugin.cs.frame	(revision 11009)
@@ -31,4 +31,5 @@
   [PluginDependency("HeuristicLab.Collections", "3.3")]
   [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
   [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Core.Views", "3.3")]
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.Designer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.Designer.cs	(revision 11009)
@@ -45,4 +45,6 @@
     /// </summary>
     private void InitializeComponent() {
+      this.exportButton = new System.Windows.Forms.Button();
+      this.exportFileDialog = new System.Windows.Forms.SaveFileDialog();
       this.btnSimplify = new System.Windows.Forms.Button();
       this.transformModelButton = new System.Windows.Forms.Button();
@@ -55,43 +57,51 @@
       this.SuspendLayout();
       // 
-      // splitContainer
+      // flowLayoutPanel
       // 
-      // 
-      // splitContainer.Panel1
-      // 
-      this.splitContainer.Panel1.Controls.Add(this.btnSimplify);
-      //
-      // splitContainer.Panel2
-      //
-      this.splitContainer.Panel2.Controls.Add(this.transformModelButton);
-      // 
-      // addButton
-      // 
-      this.toolTip.SetToolTip(this.addButton, "Add");
-      // 
-      // removeButton
-      // 
-      this.toolTip.SetToolTip(this.removeButton, "Remove");
+      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
+      this.flowLayoutPanel.Controls.Add(this.exportButton);
+      this.flowLayoutPanel.Controls.Add(this.transformModelButton);
       // 
       // btnSimplify
       // 
-      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.btnSimplify.Location = new System.Drawing.Point(172, 4);
+      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
+      this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator;
+      this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
       this.btnSimplify.Name = "btnSimplify";
-      this.btnSimplify.Size = new System.Drawing.Size(75, 23);
-      this.btnSimplify.TabIndex = 6;
-      this.btnSimplify.Text = "Simplify";
+      this.btnSimplify.TabIndex = 7;
+      this.btnSimplify.Size = new System.Drawing.Size(105, 24);
+      this.btnSimplify.Text = "Simplify Model";
+      this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
       this.btnSimplify.UseVisualStyleBackColor = true;
       this.btnSimplify.Click += new System.EventHandler(this.btn_SimplifyModel_Click);
+      this.toolTip.SetToolTip(this.btnSimplify, "Simplify solution");
+      // 
+      // exportButton
+      // 
+      this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
+      this.exportButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Statistics;
+      this.exportButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+      this.exportButton.Name = "exportButton";
+      this.exportButton.Size = new System.Drawing.Size(105, 24);
+      this.exportButton.TabIndex = 8;
+      this.exportButton.Text = "Export to Excel ";
+      this.exportButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+      this.exportButton.UseVisualStyleBackColor = true;
+      this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
+      this.toolTip.SetToolTip(this.exportButton, "Exports the symbolic regression solution to Excel.");
       // 
       // transformModelButton
       // 
-      this.transformModelButton.Location = new System.Drawing.Point(84, 3);
+      this.transformModelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
+      this.transformModelButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Event;
+      this.transformModelButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
       this.transformModelButton.Name = "transformModelButton";
-      this.transformModelButton.Size = new System.Drawing.Size(125, 23);
-      this.transformModelButton.TabIndex = 8;
+      this.transformModelButton.Size = new System.Drawing.Size(135, 23);
+      this.transformModelButton.TabIndex = 9;
       this.transformModelButton.Text = "Backtransform Model";
+      this.transformModelButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
       this.transformModelButton.UseVisualStyleBackColor = true;
       this.transformModelButton.Click += new System.EventHandler(this.transformModelButton_Click);
+      this.toolTip.SetToolTip(this.transformModelButton, "Backtransform model based on the stored transformations.");
       // 
       // SymbolicRegressionSolutionView
@@ -110,6 +120,8 @@
 
     #endregion
-    private System.Windows.Forms.Button btnSimplify;
-    private System.Windows.Forms.Button transformModelButton;
+    protected System.Windows.Forms.SaveFileDialog exportFileDialog;
+    protected System.Windows.Forms.Button exportButton;
+    protected System.Windows.Forms.Button btnSimplify;
+    protected System.Windows.Forms.Button transformModelButton;
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs	(revision 11009)
@@ -21,6 +21,8 @@
 
 using System;
+using System.ComponentModel;
 using System.Windows.Forms;
 using HeuristicLab.MainForm;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Views;
 using HeuristicLab.Problems.DataAnalysis.Views;
 
@@ -40,9 +42,7 @@
     protected override void SetEnabledStateOfControls() {
       base.SetEnabledStateOfControls();
-      if (Content == null) {
-        transformModelButton.Enabled = false;
-      } else {
-        transformModelButton.Enabled = !Locked;
-      }
+      btnSimplify.Enabled = Content != null && !Locked;
+      exportButton.Enabled = Content != null && !Locked;
+      transformModelButton.Enabled = Content != null && !Locked;
     }
 
@@ -53,4 +53,18 @@
     }
 
+    private void exportButton_Click(object sender, EventArgs e) {
+      var exporter = new SymbolicSolutionExcelExporter();
+      exportFileDialog.Filter = exporter.FileTypeFilter;
+      if (exportFileDialog.ShowDialog(this) == DialogResult.OK) {
+        var name = exportFileDialog.FileName;
+        using (BackgroundWorker bg = new BackgroundWorker()) {
+          MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Exporting solution to " + name + ".");
+          bg.DoWork += (o, a) => exporter.Export(Content, name);
+          bg.RunWorkerCompleted += (o, a) => MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);
+          bg.RunWorkerAsync();
+        }
+      }
+    }
+
     private void transformModelButton_Click(object sender, EventArgs e) {
       var mapper = new TransformationToSymbolicTreeMapper();
@@ -58,5 +72,4 @@
       var transformations = Content.ProblemData.Transformations;
       var targetVar = Content.ProblemData.TargetVariable;
-
       transformator.Backtransform(Content.Model, transformations, targetVar);
       // TODO: cloning is needed for refreshing the view, find a better approach for this.
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 11009)
@@ -121,4 +121,5 @@
     <Compile Include="SingleObjective\ConstantOptimizationAnalyzer.cs" />
     <Compile Include="SingleObjective\Evaluators\SymbolicRegressionMeanRelativeErrorEvaluator.cs" />
+    <Compile Include="SingleObjective\SymbolicRegressionSolutionsAnalyzer.cs" />
     <Compile Include="SymbolicRegressionPruningAnalyzer.cs" />
     <Compile Include="SingleObjective\Evaluators\SymbolicRegressionLogResidualEvaluator.cs" />
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveOverfittingAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveOverfittingAnalyzer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveOverfittingAnalyzer.cs	(revision 11009)
@@ -84,5 +84,4 @@
       IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
       double[] validationQuality = SymbolicExpressionTree
-        .AsParallel()
         .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
         .ToArray();
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs	(revision 11009)
@@ -86,4 +86,8 @@
         changed = true;
       }
+      if (!Operators.OfType<SymbolicRegressionSolutionsAnalyzer>().Any()) {
+        Operators.Add(new SymbolicRegressionSolutionsAnalyzer());
+        changed = true;
+      }
       if (changed) {
         ParameterizeOperators();
@@ -106,4 +110,5 @@
       Operators.Add(new SymbolicRegressionSingleObjectiveTrainingParetoBestSolutionAnalyzer());
       Operators.Add(new SymbolicRegressionSingleObjectiveValidationParetoBestSolutionAnalyzer());
+      Operators.Add(new SymbolicRegressionSolutionsAnalyzer());
 
       ParameterizeOperators();
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSolutionsAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSolutionsAnalyzer.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSolutionsAnalyzer.cs	(revision 11009)
@@ -0,0 +1,86 @@
+﻿#region License Information
+
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
+  public class SymbolicRegressionSolutionsAnalyzer : SingleSuccessorOperator, IAnalyzer {
+    private const string ResultCollectionParameterName = "Results";
+    private const string RegressionSolutionQualitiesResultName = "Regression Solution Qualities";
+
+    public ILookupParameter<ResultCollection> ResultCollectionParameter {
+      get { return (ILookupParameter<ResultCollection>)Parameters[ResultCollectionParameterName]; }
+    }
+
+    public virtual bool EnabledByDefault {
+      get { return false; }
+    }
+
+    [StorableConstructor]
+    protected SymbolicRegressionSolutionsAnalyzer(bool deserializing) : base(deserializing) { }
+    protected SymbolicRegressionSolutionsAnalyzer(SymbolicRegressionSolutionsAnalyzer original, Cloner cloner)
+      : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicRegressionSolutionsAnalyzer(this, cloner);
+    }
+
+    public SymbolicRegressionSolutionsAnalyzer() {
+      Parameters.Add(new LookupParameter<ResultCollection>(ResultCollectionParameterName, "The result collection to store the analysis results."));
+    }
+
+    public override IOperation Apply() {
+      var results = ResultCollectionParameter.ActualValue;
+
+      if (!results.ContainsKey(RegressionSolutionQualitiesResultName)) {
+        var newDataTable = new DataTable(RegressionSolutionQualitiesResultName);
+        results.Add(new Result(RegressionSolutionQualitiesResultName, "Chart displaying the training and test qualities of the regression solutions.", newDataTable));
+      }
+
+      var dataTable = (DataTable)results[RegressionSolutionQualitiesResultName].Value;
+      foreach (var result in results.Where(r => r.Value is IRegressionSolution)) {
+        var solution = (IRegressionSolution)result.Value;
+
+        var trainingR2 = result.Name + Environment.NewLine + "Training R²";
+        if (!dataTable.Rows.ContainsKey(trainingR2))
+          dataTable.Rows.Add(new DataRow(trainingR2));
+
+        var testR2 = result.Name + Environment.NewLine + " Test R²";
+        if (!dataTable.Rows.ContainsKey(testR2))
+          dataTable.Rows.Add(new DataRow(testR2));
+
+        dataTable.Rows[trainingR2].Values.Add(solution.TrainingRSquared);
+        dataTable.Rows[testR2].Values.Add(solution.TestRSquared);
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views-3.4.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views-3.4.csproj	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views-3.4.csproj	(revision 11009)
@@ -151,4 +151,9 @@
       <Private>False</Private>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
       <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/Plugin.cs.frame
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/Plugin.cs.frame	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/Plugin.cs.frame	(revision 11009)
@@ -29,4 +29,5 @@
   [PluginFile("HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views-3.4.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
   [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Core.Views", "3.3")]
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/SymbolicTimeSeriesPrognosisSolutionView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/SymbolicTimeSeriesPrognosisSolutionView.Designer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/SymbolicTimeSeriesPrognosisSolutionView.Designer.cs	(revision 11009)
@@ -54,33 +54,21 @@
       this.SuspendLayout();
       // 
-      // exportButton
+      // flowLayoutPanel
       // 
-      this.exportButton.Visible = false;
-      // 
-      // splitContainer
-      // 
-      // 
-      // splitContainer.Panel1
-      // 
-      this.splitContainer.Panel1.Controls.Add(this.btnSimplify);
-      // 
-      // addButton
-      // 
-      this.toolTip.SetToolTip(this.addButton, "Add");
-      // 
-      // removeButton
-      // 
-      this.toolTip.SetToolTip(this.removeButton, "Remove");
+      this.flowLayoutPanel.Controls.Add(this.btnSimplify);
       // 
       // btnSimplify
       // 
-      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.btnSimplify.Location = new System.Drawing.Point(172, 4);
+      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
+      this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator;
+      this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
       this.btnSimplify.Name = "btnSimplify";
-      this.btnSimplify.Size = new System.Drawing.Size(75, 23);
-      this.btnSimplify.TabIndex = 6;
-      this.btnSimplify.Text = "Simplify";
+      this.btnSimplify.TabIndex = 7;
+      this.btnSimplify.Size = new System.Drawing.Size(105, 24);
+      this.btnSimplify.Text = "Simplify Model";
+      this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
       this.btnSimplify.UseVisualStyleBackColor = true;
       this.btnSimplify.Click += new System.EventHandler(this.btn_SimplifyModel_Click);
+      this.toolTip.SetToolTip(this.btnSimplify, "Simplify solution");
       // 
       // SymbolicTimeSeriesPrognosisSolutionView
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/SymbolicTimeSeriesPrognosisSolutionView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/SymbolicTimeSeriesPrognosisSolutionView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/SymbolicTimeSeriesPrognosisSolutionView.cs	(revision 11009)
@@ -38,4 +38,9 @@
     }
 
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      btnSimplify.Enabled = Content != null && !Locked;
+    }
+
     private void btn_SimplifyModel_Click(object sender, EventArgs e) {
       InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView view = new InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView();
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveOverfittingAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveOverfittingAnalyzer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveOverfittingAnalyzer.cs	(revision 11009)
@@ -84,5 +84,4 @@
       IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
       double[] validationQuality = SymbolicExpressionTree
-        .AsParallel()
         .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
         .ToArray();
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj	(revision 11009)
@@ -111,62 +111,42 @@
   <ItemGroup>
     <Compile Include="Exporters\SymbolicSolutionExcelExporter.cs" />
-    <Compile Include="InteractiveSymbolicExpressionTreeChart.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="InteractiveSymbolicExpressionTreeChart.cs" />
     <Compile Include="InteractiveSymbolicExpressionTreeChart.Designer.cs">
       <DependentUpon>InteractiveSymbolicExpressionTreeChart.cs</DependentUpon>
     </Compile>
-    <Compile Include="MathSymbolicDataAnalysisModelView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="MathSymbolicDataAnalysisModelView.cs" />
     <Compile Include="MathSymbolicDataAnalysisModelView.designer.cs">
       <DependentUpon>MathSymbolicDataAnalysisModelView.cs</DependentUpon>
     </Compile>
     <Compile Include="Plugin.cs" />
-    <Compile Include="TextualSymbolicDataAnalysisModelView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="TextualSymbolicDataAnalysisModelView.cs" />
     <Compile Include="TextualSymbolicDataAnalysisModelView.designer.cs">
       <DependentUpon>TextualSymbolicDataAnalysisModelView.cs</DependentUpon>
     </Compile>
-    <Compile Include="InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs" />
     <Compile Include="InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs">
       <DependentUpon>InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs</DependentUpon>
     </Compile>
-    <Compile Include="GraphicalSymbolicDataAnalysisModelView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="GraphicalSymbolicDataAnalysisModelView.cs" />
     <Compile Include="GraphicalSymbolicDataAnalysisModelView.designer.cs">
       <DependentUpon>GraphicalSymbolicDataAnalysisModelView.cs</DependentUpon>
     </Compile>
-    <Compile Include="Symbols\ConstantView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="Symbols\ConstantView.cs" />
     <Compile Include="Symbols\ConstantView.Designer.cs">
       <DependentUpon>ConstantView.cs</DependentUpon>
     </Compile>
-    <Compile Include="Symbols\LaggedVariableView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="Symbols\LaggedVariableView.cs" />
     <Compile Include="Symbols\LaggedVariableView.Designer.cs">
       <DependentUpon>LaggedVariableView.cs</DependentUpon>
     </Compile>
-    <Compile Include="Symbols\TimeLagView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="Symbols\TimeLagView.cs" />
     <Compile Include="Symbols\TimeLagView.Designer.cs">
       <DependentUpon>TimeLagView.cs</DependentUpon>
     </Compile>
-    <Compile Include="Symbols\VariableConditionView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="Symbols\VariableConditionView.cs" />
     <Compile Include="Symbols\VariableConditionView.Designer.cs">
       <DependentUpon>VariableConditionView.cs</DependentUpon>
     </Compile>
-    <Compile Include="Symbols\VariableView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="Symbols\VariableView.cs" />
     <Compile Include="Symbols\VariableView.Designer.cs">
       <DependentUpon>VariableView.cs</DependentUpon>
@@ -193,7 +173,5 @@
     <None Include="Plugin.cs.frame" />
     <None Include="Properties\AssemblyInfo.cs.frame" />
-    <Compile Include="RunCollectionVariableImpactView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
+    <Compile Include="RunCollectionVariableImpactView.cs" />
     <Compile Include="RunCollectionVariableImpactView.Designer.cs">
       <DependentUpon>RunCollectionVariableImpactView.cs</DependentUpon>
@@ -205,4 +183,9 @@
       <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
       <Name>HeuristicLab.Collections-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
       <Private>False</Private>
     </ProjectReference>
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs	(revision 11009)
@@ -19,4 +19,5 @@
  */
 #endregion
+
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
@@ -137,12 +138,16 @@
       // 
       // btnOptimizeConstants
-      // 
-      this.btnOptimizeConstants.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      //       
+      this.btnOptimizeConstants.AutoSize = true;
       this.btnOptimizeConstants.Enabled = false;
-      this.btnOptimizeConstants.Location = new System.Drawing.Point(104, 3);
+      this.btnOptimizeConstants.Image = HeuristicLab.Common.Resources.VSImageLibrary.Performance;
+      this.btnOptimizeConstants.ImageAlign = System.Drawing.ContentAlignment.MiddleCenter;
+      this.btnOptimizeConstants.Location = new System.Drawing.Point(105, 3);
       this.btnOptimizeConstants.Name = "btnOptimizeConstants";
-      this.btnOptimizeConstants.Size = new System.Drawing.Size(97, 23);
+      this.btnOptimizeConstants.Size = new System.Drawing.Size(80, 24);
       this.btnOptimizeConstants.TabIndex = 2;
       this.btnOptimizeConstants.Text = "Optimize";
+      this.btnOptimizeConstants.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+      this.btnOptimizeConstants.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
       this.btnOptimizeConstants.UseVisualStyleBackColor = true;
       this.btnOptimizeConstants.Click += new System.EventHandler(this.btnOptimizeConstants_Click);
@@ -150,9 +155,15 @@
       // btnSimplify
       // 
+      this.btnSimplify.AutoSize = true;
+      this.btnSimplify.Enabled = true;
+      this.btnSimplify.Image = HeuristicLab.Common.Resources.VSImageLibrary.FormulaEvaluator;
+      this.btnSimplify.ImageAlign = System.Drawing.ContentAlignment.MiddleCenter;
       this.btnSimplify.Location = new System.Drawing.Point(3, 3);
       this.btnSimplify.Name = "btnSimplify";
-      this.btnSimplify.Size = new System.Drawing.Size(95, 23);
+      this.btnSimplify.Size = new System.Drawing.Size(80, 24);
       this.btnSimplify.TabIndex = 1;
       this.btnSimplify.Text = "Simplify";
+      this.btnSimplify.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+      this.btnSimplify.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
       this.btnSimplify.UseVisualStyleBackColor = true;
       this.btnSimplify.Click += new System.EventHandler(this.btnSimplify_Click);
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs	(revision 11009)
@@ -52,4 +52,5 @@
       Content.ModelChanged += Content_Changed;
       Content.ProblemDataChanged += Content_Changed;
+      treeChart.Repainted += treeChart_Repainted;
     }
     protected override void DeregisterContentEvents() {
@@ -57,4 +58,5 @@
       Content.ModelChanged -= Content_Changed;
       Content.ProblemDataChanged -= Content_Changed;
+      treeChart.Repainted -= treeChart_Repainted;
     }
 
@@ -68,4 +70,9 @@
       UpdateView();
       viewHost.Content = this.Content;
+    }
+
+    private void treeChart_Repainted(object sender, EventArgs e) {
+      if (nodeImpacts != null && nodeImpacts.Count > 0)
+        PaintNodeImpacts();
     }
 
@@ -98,20 +105,17 @@
     private void treeChart_SymbolicExpressionTreeNodeDoubleClicked(object sender, MouseEventArgs e) {
       var visualNode = (VisualTreeNode<ISymbolicExpressionTreeNode>)sender;
+      if (visualNode.Content == null) { throw new Exception("Visual node content cannot be null."); }
       var symbExprTreeNode = (SymbolicExpressionTreeNode)visualNode.Content;
-      if (symbExprTreeNode == null) return;
-      var tree = Content.Model.SymbolicExpressionTree;
+      if (!foldedNodes.ContainsKey(symbExprTreeNode)) return; // constant nodes cannot be folded
       var parent = symbExprTreeNode.Parent;
       int indexOfSubtree = parent.IndexOfSubtree(symbExprTreeNode);
-      if (foldedNodes.ContainsKey(symbExprTreeNode)) {
-        // undo node folding
-        SwitchNodeWithReplacementNode(parent, indexOfSubtree);
-      }
-      UpdateModel(tree);
+      SwitchNodeWithReplacementNode(parent, indexOfSubtree);
+      UpdateModel(Content.Model.SymbolicExpressionTree);
     }
 
     private void SwitchNodeWithReplacementNode(ISymbolicExpressionTreeNode parent, int subTreeIndex) {
       ISymbolicExpressionTreeNode subTree = parent.GetSubtree(subTreeIndex);
-      parent.RemoveSubtree(subTreeIndex);
       if (foldedNodes.ContainsKey(subTree)) {
+        parent.RemoveSubtree(subTreeIndex);
         var replacementNode = foldedNodes[subTree];
         parent.InsertSubtree(subTreeIndex, replacementNode);
@@ -130,4 +134,5 @@
 
         if (!(treeNode is ConstantTreeNode) && nodeImpacts.ContainsKey(treeNode)) {
+          visualTree.ToolTip = visualTree.Content.ToString(); // to avoid duplicate tooltips
           double impact = nodeImpacts[treeNode];
 
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs	(revision 11009)
@@ -218,5 +218,5 @@
             if (tempNode.IterateNodesBreadth().Contains(node))
               throw new ArgumentException();// cannot cut/paste a node into itself
-            ModifyTree(Tree, tempNode.Parent, tempNode, null); //remove node from its original parent 	 	 
+            ModifyTree(Tree, tempNode.Parent, tempNode, null); //remove node from its original parent
             ModifyTree(Tree, node, null, tempNode); //insert it as a child to the new parent 
             break;
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs.frame
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs.frame	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs.frame	(revision 11009)
@@ -32,4 +32,5 @@
   [PluginDependency("HeuristicLab.Collections", "3.3")]
   [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
   [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Core.Views", "3.3")]
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TextualSymbolicDataAnalysisModelView.designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TextualSymbolicDataAnalysisModelView.designer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TextualSymbolicDataAnalysisModelView.designer.cs	(revision 11009)
@@ -54,5 +54,4 @@
       this.symbolicExpressionTreeView.Content = null;
       this.symbolicExpressionTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.symbolicExpressionTreeView.Font = new System.Drawing.Font("Consolas", 8.25F);
       this.symbolicExpressionTreeView.Location = new System.Drawing.Point(0, 0);
       this.symbolicExpressionTreeView.Name = "symbolicExpressionTreeView";
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs	(revision 11009)
@@ -75,5 +75,4 @@
     public static Allele[] CalculateAlleles(ISymbolicExpressionTree solution, int alleleTreedepth) {
       return GetAllSubtreesOfDepth(solution, alleleTreedepth)
-        .AsParallel()
         .Select(t => GetAlleleFromSubtreeOfDepth(t, alleleTreedepth))
         .ToArray();
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs	(revision 11009)
@@ -121,5 +121,4 @@
 
       var qualities = tree
-        .AsParallel()
         .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
         .ToArray();
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectivePruningAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectivePruningAnalyzer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectivePruningAnalyzer.cs	(revision 11009)
@@ -148,4 +148,5 @@
       if (end > count) end = count;
 
+      if (PopulationSlice.Start > 1 || PopulationSlice.End > 1) throw new ArgumentOutOfRangeException("The slice bounds should be expressed as unit percentages.");
       if (start >= end) throw new ArgumentOutOfRangeException("Invalid PopulationSlice bounds.");
       return new IntRange(start, end);
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer.cs	(revision 11009)
@@ -35,9 +35,13 @@
   [Item("SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer", "An operator that analyzes the training best symbolic data analysis solution for single objective symbolic data analysis problems.")]
   [StorableClass]
-  public abstract class SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer<T> : SymbolicDataAnalysisSingleObjectiveAnalyzer
+  public abstract class SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer<T> : SymbolicDataAnalysisSingleObjectiveAnalyzer, IIterationBasedOperator
+
     where T : class, ISymbolicDataAnalysisSolution {
     private const string TrainingBestSolutionParameterName = "Best training solution";
     private const string TrainingBestSolutionQualityParameterName = "Best training solution quality";
+    private const string TrainingBestSolutionGenerationParameterName = "Best training solution generation";
     private const string UpdateAlwaysParameterName = "Always update best solution";
+    private const string IterationsParameterName = "Iterations";
+    private const string MaximumIterationsParameterName = "Maximum Iterations";
 
     #region parameter properties
@@ -48,6 +52,15 @@
       get { return (ILookupParameter<DoubleValue>)Parameters[TrainingBestSolutionQualityParameterName]; }
     }
+    public ILookupParameter<IntValue> TrainingBestSolutionGenerationParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[TrainingBestSolutionGenerationParameterName]; }
+    }
     public IFixedValueParameter<BoolValue> UpdateAlwaysParameter {
       get { return (IFixedValueParameter<BoolValue>)Parameters[UpdateAlwaysParameterName]; }
+    }
+    public ILookupParameter<IntValue> IterationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[IterationsParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumIterationsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumIterationsParameterName]; }
     }
     #endregion
@@ -73,5 +86,8 @@
       Parameters.Add(new LookupParameter<T>(TrainingBestSolutionParameterName, "The training best symbolic data analyis solution."));
       Parameters.Add(new LookupParameter<DoubleValue>(TrainingBestSolutionQualityParameterName, "The quality of the training best symbolic data analysis solution."));
+      Parameters.Add(new LookupParameter<IntValue>(TrainingBestSolutionGenerationParameterName, "The generation in which the best training solution was found."));
       Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best training solution should always be updated regardless of its quality.", new BoolValue(false)));
+      Parameters.Add(new LookupParameter<IntValue>(IterationsParameterName, "The number of performed iterations."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsParameterName, "The maximum number of performed iterations.") { Hidden = true });
       UpdateAlwaysParameter.Hidden = true;
     }
@@ -83,4 +99,10 @@
         UpdateAlwaysParameter.Hidden = true;
       }
+      if (!Parameters.ContainsKey(TrainingBestSolutionGenerationParameterName))
+        Parameters.Add(new LookupParameter<IntValue>(TrainingBestSolutionGenerationParameterName, "The generation in which the best training solution was found."));
+      if (!Parameters.ContainsKey(IterationsParameterName))
+        Parameters.Add(new LookupParameter<IntValue>(IterationsParameterName, "The number of performed iterations."));
+      if (!Parameters.ContainsKey(MaximumIterationsParameterName))
+        Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsParameterName, "The maximum number of performed iterations.") { Hidden = true });
     }
 
@@ -104,11 +126,18 @@
         TrainingBestSolution = CreateSolution(bestTree, bestQuality);
         TrainingBestSolutionQuality = new DoubleValue(bestQuality);
+        if (IterationsParameter.ActualValue != null)
+          TrainingBestSolutionGenerationParameter.ActualValue = new IntValue(IterationsParameter.ActualValue.Value);
 
         if (!results.ContainsKey(TrainingBestSolutionParameter.Name)) {
           results.Add(new Result(TrainingBestSolutionParameter.Name, TrainingBestSolutionParameter.Description, TrainingBestSolution));
           results.Add(new Result(TrainingBestSolutionQualityParameter.Name, TrainingBestSolutionQualityParameter.Description, TrainingBestSolutionQuality));
+          if (TrainingBestSolutionGenerationParameter.ActualValue != null)
+            results.Add(new Result(TrainingBestSolutionGenerationParameter.Name, TrainingBestSolutionGenerationParameter.Description, TrainingBestSolutionGenerationParameter.ActualValue));
         } else {
           results[TrainingBestSolutionParameter.Name].Value = TrainingBestSolution;
           results[TrainingBestSolutionQualityParameter.Name].Value = TrainingBestSolutionQuality;
+          if (TrainingBestSolutionGenerationParameter.ActualValue != null)
+            results[TrainingBestSolutionGenerationParameter.Name].Value = TrainingBestSolutionGenerationParameter.ActualValue;
+
         }
       }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs	(revision 11009)
@@ -37,5 +37,5 @@
   [Item("SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer", "An operator that analyzes the validation best symbolic data analysis solution for single objective symbolic data analysis problems.")]
   [StorableClass]
-  public abstract class SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U>
+  public abstract class SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U>, IIterationBasedOperator
     where S : class, ISymbolicDataAnalysisSolution
     where T : class, ISymbolicDataAnalysisSingleObjectiveEvaluator<U>
@@ -43,5 +43,8 @@
     private const string ValidationBestSolutionParameterName = "Best validation solution";
     private const string ValidationBestSolutionQualityParameterName = "Best validation solution quality";
+    private const string ValidationBestSolutionGenerationParameterName = "Best validation solution generation";
     private const string UpdateAlwaysParameterName = "Always update best solution";
+    private const string IterationsParameterName = "Iterations";
+    private const string MaximumIterationsParameterName = "Maximum Iterations";
 
     #region parameter properties
@@ -52,6 +55,15 @@
       get { return (ILookupParameter<DoubleValue>)Parameters[ValidationBestSolutionQualityParameterName]; }
     }
+    public ILookupParameter<IntValue> ValidationBestSolutionGenerationParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[ValidationBestSolutionGenerationParameterName]; }
+    }
     public IFixedValueParameter<BoolValue> UpdateAlwaysParameter {
       get { return (IFixedValueParameter<BoolValue>)Parameters[UpdateAlwaysParameterName]; }
+    }
+    public ILookupParameter<IntValue> IterationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[IterationsParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumIterationsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumIterationsParameterName]; }
     }
     #endregion
@@ -77,5 +89,8 @@
       Parameters.Add(new LookupParameter<S>(ValidationBestSolutionParameterName, "The validation best symbolic data analyis solution."));
       Parameters.Add(new LookupParameter<DoubleValue>(ValidationBestSolutionQualityParameterName, "The quality of the validation best symbolic data analysis solution."));
+      Parameters.Add(new LookupParameter<IntValue>(ValidationBestSolutionGenerationParameterName, "The generation in which the best validation solution was found."));
       Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best validation solution should always be updated regardless of its quality.", new BoolValue(false)));
+      Parameters.Add(new LookupParameter<IntValue>(IterationsParameterName, "The number of performed iterations."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsParameterName, "The maximum number of performed iterations.") { Hidden = true });
       UpdateAlwaysParameter.Hidden = true;
     }
@@ -84,7 +99,13 @@
     private void AfterDeserialization() {
       if (!Parameters.ContainsKey(UpdateAlwaysParameterName)) {
-        Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best training solution should always be updated regardless of its quality.", new BoolValue(false)));
+        Parameters.Add(new FixedValueParameter<BoolValue>(UpdateAlwaysParameterName, "Determines if the best validation solution should always be updated regardless of its quality.", new BoolValue(false)));
         UpdateAlwaysParameter.Hidden = true;
       }
+      if (!Parameters.ContainsKey(ValidationBestSolutionGenerationParameterName))
+        Parameters.Add(new LookupParameter<IntValue>(ValidationBestSolutionGenerationParameterName, "The generation in which the best validation solution was found."));
+      if (!Parameters.ContainsKey(IterationsParameterName))
+        Parameters.Add(new LookupParameter<IntValue>(IterationsParameterName, "The number of performed iterations."));
+      if (!Parameters.ContainsKey(MaximumIterationsParameterName))
+        Parameters.Add(new ValueLookupParameter<IntValue>(MaximumIterationsParameterName, "The maximum number of performed iterations.") { Hidden = true });
     }
 
@@ -121,5 +142,4 @@
       var quality = tree
         .Take(topN)
-        .AsParallel()
         .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
         .ToArray();
@@ -138,11 +158,17 @@
         ValidationBestSolution = CreateSolution(bestTree, bestValidationQuality);
         ValidationBestSolutionQuality = new DoubleValue(bestValidationQuality);
+        if (IterationsParameter.ActualValue != null)
+          ValidationBestSolutionGenerationParameter.ActualValue = new IntValue(IterationsParameter.ActualValue.Value);
 
         if (!results.ContainsKey(ValidationBestSolutionParameter.Name)) {
           results.Add(new Result(ValidationBestSolutionParameter.Name, ValidationBestSolutionParameter.Description, ValidationBestSolution));
           results.Add(new Result(ValidationBestSolutionQualityParameter.Name, ValidationBestSolutionQualityParameter.Description, ValidationBestSolutionQuality));
+          if (ValidationBestSolutionGenerationParameter.ActualValue != null)
+            results.Add(new Result(ValidationBestSolutionGenerationParameter.Name, ValidationBestSolutionGenerationParameter.Description, ValidationBestSolutionGenerationParameter.ActualValue));
         } else {
           results[ValidationBestSolutionParameter.Name].Value = ValidationBestSolution;
           results[ValidationBestSolutionQualityParameter.Name].Value = ValidationBestSolutionQuality;
+          if (ValidationBestSolutionGenerationParameter.ActualValue != null)
+            results[ValidationBestSolutionGenerationParameter.Name].Value = ValidationBestSolutionGenerationParameter.ActualValue;
         }
       }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs	(revision 11009)
@@ -120,5 +120,4 @@
         .Select(i => tree[i])
         .Take(topN)
-        .AsParallel()
         .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
         .ToArray();
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs	(revision 11009)
@@ -131,5 +131,4 @@
 
       var variableFrequencies = trees
-        .AsParallel()
         .SelectMany(t => GetVariableReferences(t, aggregateLaggedVariables))
         .GroupBy(pair => pair.Key, pair => pair.Value)
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs	(revision 11009)
@@ -99,4 +99,5 @@
       var or = new Or();
       var not = new Not();
+      var xor = new Xor();
 
       var timeLag = new TimeLag();
@@ -122,5 +123,5 @@
       var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, sin, cos, tan, log, square, pow, sqrt, root, exp,
         airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral,
-        @if, gt, lt, and, or, not, timeLag, integral, derivative, constant, variableSymbol, laggedVariable,autoregressiveVariable, variableCondition };
+        @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, variableSymbol, laggedVariable,autoregressiveVariable, variableCondition };
       var unaryFunctionSymbols = new List<Symbol>() { square, sqrt, sin, cos, tan, log, exp, not, timeLag, integral, derivative,
         airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral
@@ -128,5 +129,5 @@
 
       var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, variableCondition };
-      var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or };
+      var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or, xor };
       var terminalSymbols = new List<Symbol>() { variableSymbol, constant, laggedVariable, autoregressiveVariable };
 
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs	(revision 11009)
@@ -93,4 +93,5 @@
       var or = new Or();
       var not = new Not();
+      var xor = new Xor();
       var variableCondition = new VariableCondition();
 
@@ -120,5 +121,5 @@
       var conditionSymbols = new GroupSymbol(ConditionsName, new List<ISymbol> { @if, variableCondition });
       var comparisonSymbols = new GroupSymbol(ComparisonsName, new List<ISymbol> { gt, lt });
-      var booleanOperationSymbols = new GroupSymbol(BooleanOperatorsName, new List<ISymbol> { and, or, not });
+      var booleanOperationSymbols = new GroupSymbol(BooleanOperatorsName, new List<ISymbol> { and, or, not, xor });
       var conditionalSymbols = new GroupSymbol(ConditionalSymbolsName, new List<ISymbol> { conditionSymbols, comparisonSymbols, booleanOperationSymbols });
 
@@ -148,4 +149,5 @@
       SetSubtreeCount(or, 2, 2);
       SetSubtreeCount(not, 1, 1);
+      SetSubtreeCount(xor, 2, 2);
 
       SetSubtreeCount(timeLag, 1, 1);
@@ -237,4 +239,5 @@
       Symbols.First(s => s is Average).Enabled = false;
       Symbols.First(s => s is VariableCondition).Enabled = false;
+      Symbols.First(s => s is Xor).Enabled = false;
       Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false;
       Symbols.First(s => s.Name == ExponentialFunctionsName).Enabled = false;
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 11009)
@@ -126,4 +126,10 @@
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="Matching\SymbolicExpressionTreeCanonicalSorter.cs" />
+    <Compile Include="Matching\SymbolicExpressionTreeEqualityComparer.cs" />
+    <Compile Include="Matching\SymbolicExpressionTreeMatching.cs" />
+    <Compile Include="Matching\SymbolicExpressionTreeMaxCommonSequenceCalculator.cs" />
+    <Compile Include="Matching\SymbolicExpressionTreeNodeComparer.cs" />
+    <Compile Include="Matching\SymbolicExpressionTreeNodeSimilarityComparer.cs" />
     <Compile Include="SymbolicExpressionTreeBacktransformator.cs" />
     <Compile Include="SymbolicDataAnalysisExpressionPruningOperator.cs" />
@@ -181,4 +187,5 @@
     <Compile Include="Symbols\AiryB.cs" />
     <Compile Include="Symbols\Bessel.cs" />
+    <Compile Include="Symbols\Xor.cs" />
     <Compile Include="Symbols\Erf.cs" />
     <Compile Include="Symbols\Norm.cs" />
@@ -324,4 +331,5 @@
       <Project>{2e257a94-d1af-435c-99b4-5ac00eadfd6a}</Project>
       <Name>HeuristicLab.Problems.DataAnalysis.Transformations-3.4</Name>
+      <Private>False</Private>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs	(revision 11009)
@@ -46,4 +46,5 @@
     public const byte OR = 14;
     public const byte NOT = 15;
+    public const byte XOR = 45;
 
 
@@ -99,4 +100,5 @@
       { typeof(Or), OpCodes.OR },
       { typeof(Not), OpCodes.NOT},
+      { typeof(Xor),OpCodes.XOR},
       { typeof(Average), OpCodes.Average},
       { typeof(InvokeFunction), OpCodes.Call },
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 11009)
@@ -447,4 +447,21 @@
             il.Emit(System.Reflection.Emit.OpCodes.Sub);
             il.Emit(System.Reflection.Emit.OpCodes.Neg); // * -1
+            return;
+          }
+        case OpCodes.XOR: {
+            CompileInstructions(il, state, ds);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0);
+            il.Emit(System.Reflection.Emit.OpCodes.Cgt);// > 0
+
+            for (int i = 1; i < nArgs; i++) {
+              CompileInstructions(il, state, ds);
+              il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0);
+              il.Emit(System.Reflection.Emit.OpCodes.Cgt);// > 0
+              il.Emit(System.Reflection.Emit.OpCodes.Xor);
+            }
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 2.0); // * 2
+            il.Emit(System.Reflection.Emit.OpCodes.Mul);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // - 1
+            il.Emit(System.Reflection.Emit.OpCodes.Sub);
             return;
           }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 11009)
@@ -344,4 +344,13 @@
             return Evaluate(dataset, ref row, state) > 0.0 ? -1.0 : 1.0;
           }
+        case OpCodes.XOR: {
+            //mkommend: XOR on multiple inputs is defined as true if the number of positive signals is odd
+            // this is equal to a consecutive execution of binary XOR operations.
+            int positiveSignals = 0;
+            for (int i = 0; i < currentInstr.nArguments; i++) {
+              if (Evaluate(dataset, ref row, state) > 0.0) positiveSignals++;
+            }
+            return positiveSignals % 2 != 0 ? 1.0 : -1.0;
+          }
         case OpCodes.GT: {
             double x = Evaluate(dataset, ref row, state);
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs	(revision 11009)
@@ -311,4 +311,10 @@
         } else if (instr.opCode == OpCodes.NOT) {
           instr.value = code[instr.childIndex].value > 0.0 ? -1.0 : 1.0;
+        } else if (instr.opCode == OpCodes.XOR) {
+          int positiveSignals = 0;
+          for (int j = 0; j < instr.nArguments; j++) {
+            if (code[instr.childIndex + j].value > 0.0) positiveSignals++;
+          }
+          instr.value = positiveSignals % 2 != 0 ? 1.0 : -1.0;
         } else if (instr.opCode == OpCodes.GT) {
           double x = code[instr.childIndex].value;
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeCanonicalSorter.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeCanonicalSorter.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeCanonicalSorter.cs	(revision 11009)
@@ -0,0 +1,30 @@
+﻿
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public class SymbolicExpressionTreeCanonicalSorter {
+    private readonly HashSet<Type> nonSymmetricSymbols = new HashSet<Type> { typeof(Subtraction), typeof(Division) };
+
+    public void SortSubtrees(ISymbolicExpressionTree tree) {
+      SortSubtrees(tree.Root);
+    }
+
+    public void SortSubtrees(ISymbolicExpressionTreeNode node) {
+      if (node.SubtreeCount == 0) return;
+      var subtrees = node.Subtrees as List<ISymbolicExpressionTreeNode> ?? node.Subtrees.ToList();
+      if (IsSymmetric(node.Symbol)) {
+        var comparer = new SymbolicExpressionTreeNodeComparer();
+        subtrees.Sort(comparer);
+      }
+      foreach (var s in subtrees)
+        SortSubtrees(s);
+    }
+
+    private bool IsSymmetric(ISymbol s) {
+      return !nonSymmetricSymbols.Contains(s.GetType());
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeEqualityComparer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeEqualityComparer.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeEqualityComparer.cs	(revision 11009)
@@ -0,0 +1,19 @@
+﻿using System;
+using System.Collections.Generic;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public class SymbolicExpressionTreeEqualityComparer : IEqualityComparer<ISymbolicExpressionTree> {
+    public SymbolicExpressionTreeNodeSimilarityComparer SimilarityComparer { get; set; }
+
+    public bool Equals(ISymbolicExpressionTree a, ISymbolicExpressionTree b) {
+      if (SimilarityComparer == null) throw new Exception("SimilarityComparer needs to be initialized first.");
+      return a.Length == b.Length &&
+             SymbolicExpressionTreeMatching.Match(a.Root, b.Root, SimilarityComparer) == Math.Min(a.Length, b.Length);
+    }
+
+    public int GetHashCode(ISymbolicExpressionTree tree) {
+      return (tree.Length << 8) % 12345;
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeMatching.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeMatching.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeMatching.cs	(revision 11009)
@@ -0,0 +1,48 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+//using HeuristicLab.EvolutionTracking;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  public static class SymbolicExpressionTreeMatching {
+    public static bool ContainsSubtree(this ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode subtree, SymbolicExpressionTreeNodeSimilarityComparer comparer) {
+      return FindMatches(root, subtree, comparer).Any();
+    }
+    public static IEnumerable<ISymbolicExpressionTreeNode> FindMatches(ISymbolicExpressionTree tree, ISymbolicExpressionTreeNode subtree, SymbolicExpressionTreeNodeSimilarityComparer comparer) {
+      return FindMatches(tree.Root, subtree, comparer);
+    }
+
+    public static IEnumerable<ISymbolicExpressionTreeNode> FindMatches(ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode subtree, SymbolicExpressionTreeNodeSimilarityComparer comp) {
+      var fragmentLength = subtree.GetLength();
+      // below, we use ">=" for Match(n, subtree, comp) >= fragmentLength because in case of relaxed conditions, 
+      // we can have multiple matches of the same node
+
+      return root.IterateNodesBreadth().Where(n => n.GetLength() >= fragmentLength && Match(n, subtree, comp) == fragmentLength);
+    }
+
+    ///<summary>
+    /// Finds the longest common subsequence in quadratic time and linear space
+    /// Variant of:
+    /// D. S. Hirschberg. A linear space algorithm for or computing maximal common subsequences. 1975.
+    /// http://dl.acm.org/citation.cfm?id=360861
+    /// </summary>
+    /// <returns>Number of pairs that were matched</returns>
+    public static int Match(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b, SymbolicExpressionTreeNodeSimilarityComparer comp) {
+      if (!comp.Equals(a, b)) return 0;
+      int m = a.SubtreeCount;
+      int n = b.SubtreeCount;
+      if (m == 0 || n == 0) return 1;
+      var matrix = new int[m + 1, n + 1];
+      for (int i = 1; i <= m; ++i) {
+        var ai = a.GetSubtree(i - 1);
+        for (int j = 1; j <= n; ++j) {
+          var bj = b.GetSubtree(j - 1);
+          int match = Match(ai, bj, comp);
+          matrix[i, j] = Math.Max(Math.Max(matrix[i, j - 1], matrix[i - 1, j]), matrix[i - 1, j - 1] + match);
+        }
+      }
+      return matrix[m, n] + 1;
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeMaxCommonSequenceCalculator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeMaxCommonSequenceCalculator.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeMaxCommonSequenceCalculator.cs	(revision 11009)
@@ -0,0 +1,59 @@
+﻿using System;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Matching {
+  public class MaxCommonSequenceCalculator<T, U>
+    where T : class
+    where U : IEqualityComparer<T> {
+
+    public U Comparer { get; set; }
+    private int[,] matrix;
+    private List<T> sequence;
+
+    /// <summary>
+    /// Calculate the maximal common subsequence between arrays a and b and return it
+    /// </summary>
+    /// <param name="a"></param>
+    /// <param name="b"></param>
+    /// <returns></returns>
+    public IEnumerable<T> Calculate(T[] a, T[] b) {
+      int m = a.Length;
+      int n = b.Length;
+
+      if (m == 0 || n == 0) return null;
+      sequence = new List<T>();
+      matrix = new int[m + 1, n + 1];
+
+      for (int i = 0; i <= m; ++i) {
+        for (int j = 0; j <= n; ++j) {
+          if (i == 0 || j == 0) {
+            matrix[i, j] = 0;
+          } else if (Comparer.Equals(a[i - 1], b[j - 1])) {
+            matrix[i, j] = matrix[i - 1, j - 1] + 1;
+          } else {
+            matrix[i, j] = Math.Max(matrix[i - 1, j], matrix[i, j - 1]);
+          }
+        }
+      }
+      recon(a, b, n, m);
+      return sequence;
+    }
+
+    private void recon(T[] a, T[] b, int i, int j) {
+      while (true) {
+        if (i == 0 || j == 0) return;
+        if (Comparer.Equals(a[i - 1], b[j - 1])) {
+          recon(a, b, i - 1, j - 1);
+          sequence.Add(a[i - 1]);
+        } else if (matrix[i - 1, j] > matrix[i, j - 1]) {
+          i = i - 1;
+          continue;
+        } else {
+          j = j - 1;
+          continue;
+        }
+        break;
+      }
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeNodeComparer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeNodeComparer.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeNodeComparer.cs	(revision 11009)
@@ -0,0 +1,33 @@
+﻿using System;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  // this comparer considers that a < b if the type of a is "greater" than the type of b, for example:
+  // - A function node is "greater" than a terminal node
+  // - A variable terminal is "greater" than a constant terminal
+  // - used for bringing subtrees to a "canonical" form when the operation allows reordering of arguments
+  public class SymbolicExpressionTreeNodeComparer : ISymbolicExpressionTreeNodeComparer {
+    public int Compare(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b) {
+      if (!(a is SymbolicExpressionTreeTerminalNode)) {
+        return b is SymbolicExpressionTreeTerminalNode
+          ? -1
+          : string.Compare(a.Symbol.Name, b.Symbol.Name, StringComparison.Ordinal);
+      }
+      if (!(b is SymbolicExpressionTreeTerminalNode)) return 1;
+      // at this point we know a and b are terminal nodes
+      var va = a as VariableTreeNode;
+      if (va != null) {
+        if (b is ConstantTreeNode) return -1;
+        var vb = (VariableTreeNode)b;
+        return (va.VariableName.Equals(vb.VariableName)
+          ? va.Weight.CompareTo(vb.Weight)
+          : string.Compare(va.VariableName, vb.VariableName, StringComparison.Ordinal));
+      }
+      // at this point we know for sure that a is a constant tree node
+      if (b is VariableTreeNode) return 1;
+      var ca = (ConstantTreeNode)a;
+      var cb = (ConstantTreeNode)b;
+      return ca.Value.CompareTo(cb.Value);
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeNodeSimilarityComparer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeNodeSimilarityComparer.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Matching/SymbolicExpressionTreeNodeSimilarityComparer.cs	(revision 11009)
@@ -0,0 +1,76 @@
+﻿using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [Item("SymbolicExpressionTreeNodeSimilarityComparer", "A comparison operator that checks node equality based on different similarity measures.")]
+  [StorableClass]
+  public class SymbolicExpressionTreeNodeSimilarityComparer : Item, ISymbolicExpressionTreeNodeSimilarityComparer {
+    [StorableConstructor]
+    protected SymbolicExpressionTreeNodeSimilarityComparer(bool deserializing) : base(deserializing) { }
+    protected SymbolicExpressionTreeNodeSimilarityComparer(SymbolicExpressionTreeNodeSimilarityComparer original, Cloner cloner)
+      : base(original, cloner) {
+      matchConstantValues = original.matchConstantValues;
+      matchVariableNames = original.matchVariableNames;
+      matchVariableWeights = original.matchVariableWeights;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) { return new SymbolicExpressionTreeNodeSimilarityComparer(this, cloner); }
+
+    // more flexible matching criteria 
+    [Storable]
+    private bool matchConstantValues;
+    public bool MatchConstantValues {
+      get { return matchConstantValues; }
+      set { matchConstantValues = value; }
+    }
+
+    [Storable]
+    private bool matchVariableNames;
+    public bool MatchVariableNames {
+      get { return matchVariableNames; }
+      set { matchVariableNames = value; }
+    }
+
+    [Storable]
+    private bool matchVariableWeights;
+    public bool MatchVariableWeights {
+      get { return matchVariableWeights; }
+      set { matchVariableWeights = value; }
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public SymbolicExpressionTreeNodeSimilarityComparer() {
+      matchConstantValues = true;
+      matchVariableNames = true;
+      matchVariableWeights = true;
+    }
+
+    public int GetHashCode(ISymbolicExpressionTreeNode n) {
+      return n.ToString().ToLower().GetHashCode();
+    }
+
+    public bool Equals(ISymbolicExpressionTreeNode a, ISymbolicExpressionTreeNode b) {
+      if (!(a is SymbolicExpressionTreeTerminalNode))
+        // if a and b are non terminal nodes, check equality of symbol names
+        return !(b is SymbolicExpressionTreeTerminalNode) && a.Symbol.Name.Equals(b.Symbol.Name);
+      var va = a as VariableTreeNode;
+      if (va != null) {
+        var vb = b as VariableTreeNode;
+        if (vb == null) return false;
+
+        return (!MatchVariableNames || va.VariableName.Equals(vb.VariableName)) && (!MatchVariableWeights || va.Weight.Equals(vb.Weight));
+      }
+      var ca = a as ConstantTreeNode;
+      if (ca != null) {
+        var cb = b as ConstantTreeNode;
+        if (cb == null) return false;
+        return (!MatchConstantValues || ca.Value.Equals(cb.Value));
+      }
+      return false;
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Xor.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Xor.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Xor.cs	(revision 11009)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("Xor", "Symbol that represents the boolean XOR operator.")]
+  public sealed class Xor : Symbol {
+    private const int minimumArity = 1;
+    private const int maximumArity = byte.MaxValue;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Xor(bool deserializing) : base(deserializing) { }
+    private Xor(Xor original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Xor(this, cloner);
+    }
+    public Xor() : base("Xor", "Symbol that represents the boolean XOR operator.") { }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Trading.Views/3.4/SolutionView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Trading.Views/3.4/SolutionView.Designer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Trading.Views/3.4/SolutionView.Designer.cs	(revision 11009)
@@ -52,22 +52,6 @@
       this.detailsGroupBox.SuspendLayout();
       this.SuspendLayout();
-      this.exportButton.Visible = false;
       // 
-      // splitContainer
-      // 
-      // 
-      // itemsGroupBox
-      // 
-      this.itemsGroupBox.Text = "Trading Solution";
-      // 
-      // addButton
-      // 
-      this.toolTip.SetToolTip(this.addButton, "Add");
-      // 
-      // removeButton
-      // 
-      this.toolTip.SetToolTip(this.removeButton, "Remove");
-      // 
-      // RegressionSolutionView
+      // SolutionView
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -81,7 +65,5 @@
       this.detailsGroupBox.ResumeLayout(false);
       this.ResumeLayout(false);
-
     }
-
     #endregion
   }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Trading/3.4/ProblemData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Trading/3.4/ProblemData.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Trading/3.4/ProblemData.cs	(revision 11009)
@@ -1651,4 +1651,8 @@
       OnChanged();
     }
+
+    public override void AdjustProblemDataProperties(IDataAnalysisProblemData problemData) {
+      throw new NotImplementedException("TODO");
+    }
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/CreateEnsembleMenuItem.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/CreateEnsembleMenuItem.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/CreateEnsembleMenuItem.cs	(revision 11009)
@@ -113,9 +113,11 @@
       var cloner = new Cloner();
       var allResults = from r in runs
+                       where r.Visible
                        select r.Results;
       return from r in allResults
              from result in r
-             let s = cloner.Clone(result.Value) as IDataAnalysisSolution
-             where s != null
+             let solution = result.Value as IDataAnalysisSolution
+             where solution != null
+             let s = (IDataAnalysisSolution)cloner.Clone(result.Value)
              select new KeyValuePair<string, IDataAnalysisSolution>(result.Key, s);
     }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationSolutionView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationSolutionView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationSolutionView.cs	(revision 11009)
@@ -20,10 +20,7 @@
 #endregion
 
-using System;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.MainForm;
-using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
@@ -54,22 +51,4 @@
     }
     #endregion
-
-    protected override bool CheckCompatibilityOfProblemData(IDataAnalysisProblemData problemData) {
-      IClassificationProblemData classificationProblemData = problemData as IClassificationProblemData;
-      if (classificationProblemData == null) {
-        ErrorHandling.ShowErrorDialog(this, new ArgumentException("The problem data is no classification problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided."));
-        return false;
-      }
-
-      if (!classificationProblemData.TargetVariable.Equals(Content.ProblemData.TargetVariable)) {
-        string message = "The target variables are not matching. Old target variable: '"
-                         + Content.ProblemData.TargetVariable
-                         + "'. New targetvariable: '" + classificationProblemData.TargetVariable + "'";
-        ErrorHandling.ShowErrorDialog(this, new InvalidOperationException(message));
-        return false;
-      }
-
-      return base.CheckCompatibilityOfProblemData(problemData);
-    }
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.Designer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.Designer.cs	(revision 11009)
@@ -19,5 +19,4 @@
  */
 #endregion
-
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
@@ -46,6 +45,5 @@
     /// </summary>
     private void InitializeComponent() {
-      this.exportButton = new System.Windows.Forms.Button();
-      this.exportFileDialog = new System.Windows.Forms.SaveFileDialog();
+      this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
       this.loadProblemDataButton = new System.Windows.Forms.Button();
       this.loadProblemDataFileDialog = new System.Windows.Forms.OpenFileDialog();
@@ -57,4 +55,13 @@
       this.detailsGroupBox.SuspendLayout();
       this.SuspendLayout();
+      //
+      // itemslistView
+      //
+      this.itemsListView.Location = new System.Drawing.Point(this.itemsListView.Location.X, this.itemsListView.Location.Y + 3);
+      //
+      // detailsGroupBox
+      //
+      this.detailsGroupBox.Location = new System.Drawing.Point(this.detailsGroupBox.Location.X, this.detailsGroupBox.Location.Y + 3);
+      //
       // 
       // splitContainer
@@ -63,41 +70,33 @@
       // splitContainer.Panel2
       // 
-      this.splitContainer.Panel2.Controls.Add(this.loadProblemDataButton);
-      this.splitContainer.Panel2.Controls.Add(this.exportButton);
+      this.splitContainer.Panel2.Controls.Add(this.flowLayoutPanel);
       // 
       // itemsGroupBox
       // 
       this.itemsGroupBox.Text = "Data Analysis Solution";
-      // 
-      // addButton
-      // 
-      this.toolTip.SetToolTip(this.addButton, "Add");
-      // 
-      // removeButton
-      // 
-      this.toolTip.SetToolTip(this.removeButton, "Remove");
-      // 
-      // exportButton
-      // 
-      this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
-      this.exportButton.Location = new System.Drawing.Point(194, 3);
-      this.exportButton.Name = "exportButton";
-      this.exportButton.Size = new System.Drawing.Size(75, 24);
-      this.exportButton.TabIndex = 6;
-      this.exportButton.Text = "Export";
-      this.exportButton.UseVisualStyleBackColor = true;
-      this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
+      //
+      // flowLayoutPanel
+      //
+      this.flowLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+      this.flowLayoutPanel.FlowDirection = System.Windows.Forms.FlowDirection.LeftToRight;
+      this.flowLayoutPanel.Location = new System.Drawing.Point(0, 0);
+      this.flowLayoutPanel.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
+      this.flowLayoutPanel.Size = new System.Drawing.Size(266, 30);
+      this.flowLayoutPanel.Controls.Add(this.loadProblemDataButton);
       //
       // loadProblemDataButton
       //
-      this.loadProblemDataButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
-      this.loadProblemDataButton.Location = new System.Drawing.Point(3, 3);
+      this.loadProblemDataButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
+      this.loadProblemDataButton.AutoSize = true;
+      this.loadProblemDataButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Open;
+      this.loadProblemDataButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
       this.loadProblemDataButton.Name = "loadProblemDataButton";
-      this.loadProblemDataButton.Size = new System.Drawing.Size(75, 24);
-      this.loadProblemDataButton.TabIndex = 7;
-      this.loadProblemDataButton.Text = "Load Data";
+      this.loadProblemDataButton.Size = new System.Drawing.Size(105, 24);
+      this.loadProblemDataButton.TabIndex = 6;
+      this.loadProblemDataButton.Text = "Load new Data";
+      this.loadProblemDataButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
       this.loadProblemDataButton.UseVisualStyleBackColor = true;
       this.loadProblemDataButton.Click += new System.EventHandler(this.loadProblemDataButton_Click);
-      this.toolTip.SetToolTip(this.loadProblemDataButton, "Load new data");
+      this.toolTip.SetToolTip(this.loadProblemDataButton, "Creates a new data analysis solution with the same model and the loaded problem data.");
       // 
       // openFileDialog
@@ -122,8 +121,7 @@
     #endregion
 
-    private System.Windows.Forms.SaveFileDialog exportFileDialog;
-    protected System.Windows.Forms.Button exportButton;
     protected System.Windows.Forms.Button loadProblemDataButton;
     protected System.Windows.Forms.OpenFileDialog loadProblemDataFileDialog;
+    protected System.Windows.Forms.FlowLayoutPanel flowLayoutPanel;
 
   }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs	(revision 11009)
@@ -22,8 +22,6 @@
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Drawing;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
 using HeuristicLab.Core;
@@ -54,11 +52,5 @@
       addButton.Enabled = false;
       removeButton.Enabled = false;
-      if (Content == null) {
-        exportButton.Enabled = false;
-        loadProblemDataButton.Enabled = false;
-      } else {
-        exportButton.Enabled = !Locked;
-        loadProblemDataButton.Enabled = !Locked;
-      }
+      loadProblemDataButton.Enabled = Content != null && !Locked;
     }
 
@@ -133,46 +125,31 @@
     protected virtual void loadProblemDataButton_Click(object sender, EventArgs e) {
       if (loadProblemDataFileDialog.ShowDialog(this) != DialogResult.OK) return;
-      object hlFile = XmlParser.Deserialize(loadProblemDataFileDialog.FileName);
-
-      IDataAnalysisProblemData problemData = null;
-      if (hlFile is IDataAnalysisProblemData) {
-        problemData = (IDataAnalysisProblemData)hlFile;
-      } else if (hlFile is IDataAnalysisProblem) {
-        problemData = ((IDataAnalysisProblem)hlFile).ProblemData;
-      } else if (hlFile is IDataAnalysisSolution) {
-        problemData = ((IDataAnalysisSolution)hlFile).ProblemData;
-      }
-
-      if (problemData == null) {
-        ErrorHandling.ShowErrorDialog(this, new NullReferenceException("The problem data is null." + Environment.NewLine
-                                      + "The .hl-file contains no DataAnalysisProblemData or DataAnylsisProblem."));
-        return;
-      }
-
-      if (CheckCompatibilityOfProblemData(problemData)) {
+      try {
+        object hlFile = XmlParser.Deserialize(loadProblemDataFileDialog.FileName);
+
+        IDataAnalysisProblemData problemData = null;
+        if (hlFile is IDataAnalysisProblemData) {
+          problemData = (IDataAnalysisProblemData)hlFile;
+        } else if (hlFile is IDataAnalysisProblem) {
+          problemData = ((IDataAnalysisProblem)hlFile).ProblemData;
+        } else if (hlFile is IDataAnalysisSolution) {
+          problemData = ((IDataAnalysisSolution)hlFile).ProblemData;
+        }
+
+        if (problemData == null)
+          throw new InvalidOperationException("The chosen HeuristicLab file does not contain a ProblemData, Problem, or DataAnalysisSolution.");
+
         var solution = (IDataAnalysisSolution)Content.Clone();
+        problemData.AdjustProblemDataProperties(solution.ProblemData);
         solution.ProblemData = problemData;
-        solution.Name += " with loaded problem data (" + loadProblemDataFileDialog + ")";
+        if (!solution.Name.EndsWith(" with loaded problemData"))
+          solution.Name += " with loaded problemData";
         MainFormManager.MainForm.ShowContent(solution);
       }
-    }
-
-    private void exportButton_Click(object sender, EventArgs e) {
-      var exporters = ApplicationManager.Manager.GetInstances<IDataAnalysisSolutionExporter>()
-        .Where(exporter => exporter.Supports(Content)).ToArray();
-      exportFileDialog.Filter = exporters.Skip(1)
-        .Aggregate(exporters.First().FileTypeFilter, (s, exporter) => s + "|" + exporter.FileTypeFilter);
-      var result = exportFileDialog.ShowDialog();
-      if (result == DialogResult.OK) {
-
-        var name = exportFileDialog.FileName;
-        var selectedExporter = exporters.Single(exporter => exporter.FileTypeFilter == exportFileDialog.Filter);
-
-        using (BackgroundWorker bg = new BackgroundWorker()) {
-          MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Exportion solution to " + name + ".");
-          bg.DoWork += (_, __) => selectedExporter.Export(Content, name);
-          bg.RunWorkerCompleted += (_, __) => MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);
-          bg.RunWorkerAsync();
-        }
+      catch (InvalidOperationException invalidOperationException) {
+        ErrorHandling.ShowErrorDialog(this, invalidOperationException);
+      }
+      catch (ArgumentException argumentException) {
+        ErrorHandling.ShowErrorDialog(this, argumentException);
       }
     }
@@ -224,7 +201,8 @@
       validDragOperation = false;
       if (ReadOnly) return;
+      if (e.Effect != DragDropEffects.Copy) return;
 
       var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
-      if (dropData is DataAnalysisProblemData) validDragOperation = true;
+      if (dropData is IDataAnalysisProblemData) validDragOperation = true;
       else if (dropData is IDataAnalysisProblem) validDragOperation = true;
       else if (dropData is IValueParameter) {
@@ -248,25 +226,21 @@
       }
       if (problemData == null) return;
-      CheckCompatibilityOfProblemData(problemData);
-      Content.ProblemData = (IDataAnalysisProblemData)problemData.Clone();
+
+      try {
+        problemData.AdjustProblemDataProperties(Content.ProblemData);
+        Content.ProblemData = problemData;
+
+        if (!Content.Name.EndsWith(" with changed problemData"))
+          Content.Name += " with changed problemData";
+      }
+      catch (InvalidOperationException invalidOperationException) {
+        ErrorHandling.ShowErrorDialog(this, invalidOperationException);
+      }
+      catch (ArgumentException argumentException) {
+        ErrorHandling.ShowErrorDialog(this, argumentException);
+      }
     }
     #endregion
 
-    #region load problem data
-    protected virtual bool CheckCompatibilityOfProblemData(IDataAnalysisProblemData problemData) {
-      StringBuilder message = new StringBuilder();
-      List<string> variables = problemData.InputVariables.Select(x => x.Value).ToList();
-      foreach (var item in Content.ProblemData.InputVariables.CheckedItems) {
-        if (!variables.Contains(item.Value.Value))
-          message.AppendLine("Input variable '" + item.Value.Value + "' is not in the new problem data.");
-      }
-
-      if (message.Length != 0) {
-        ErrorHandling.ShowErrorDialog(this, new InvalidOperationException(message.ToString()));
-        return false;
-      }
-      return true;
-    }
-    #endregion
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs	(revision 11009)
@@ -20,10 +20,7 @@
 #endregion
 
-using System;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.MainForm;
-using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
@@ -54,22 +51,4 @@
     }
     #endregion
-
-    protected override bool CheckCompatibilityOfProblemData(IDataAnalysisProblemData problemData) {
-      IRegressionProblemData regressionProblemData = problemData as IRegressionProblemData;
-      if (regressionProblemData == null) {
-        ErrorHandling.ShowErrorDialog(this, new ArgumentException("The problem data is no regression problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided."));
-        return false;
-      }
-
-      if (!regressionProblemData.TargetVariable.Equals(Content.ProblemData.TargetVariable)) {
-        string message = "The target variables are not matching. Old target variable: '"
-                         + Content.ProblemData.TargetVariable
-                         + "'. New targetvariable: '" + regressionProblemData.TargetVariable + "'";
-        ErrorHandling.ShowErrorDialog(this, new InvalidOperationException(message));
-        return false;
-      }
-
-      return base.CheckCompatibilityOfProblemData(problemData);
-    }
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs	(revision 11009)
@@ -222,4 +222,13 @@
     public string TargetVariable {
       get { return TargetVariableParameter.Value.Value; }
+      set {
+        if (value == null) throw new ArgumentNullException("targetVariable", "The provided value for the targetVariable is null.");
+        if (value == TargetVariable) return;
+
+
+        var matchingParameterValue = TargetVariableParameter.ValidValues.FirstOrDefault(v => v.Value == value);
+        if (matchingParameterValue == null) throw new ArgumentException("The provided value is not valid as the targetVariable.", "targetVariable");
+        TargetVariableParameter.Value = matchingParameterValue;
+      }
     }
 
@@ -409,4 +418,45 @@
     }
     #endregion
+
+    protected override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) {
+      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
+      IClassificationProblemData classificationProblemData = problemData as IClassificationProblemData;
+      if (classificationProblemData == null)
+        throw new ArgumentException("The problem data is no classification problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
+
+      var returnValue = base.IsProblemDataCompatible(classificationProblemData, out errorMessage);
+      //check targetVariable
+      if (classificationProblemData.InputVariables.All(var => var.Value != TargetVariable)) {
+        errorMessage = string.Format("The target variable {0} is not present in the new problem data.", TargetVariable)
+                       + Environment.NewLine + errorMessage;
+        return false;
+      }
+
+      var newClassValues = classificationProblemData.Dataset.GetDoubleValues(TargetVariable).Distinct().OrderBy(x => x);
+      if (!newClassValues.SequenceEqual(ClassValues)) {
+        errorMessage = errorMessage + string.Format("The class values differ in the provided classification problem data.");
+        return false;
+      }
+
+      return returnValue;
+    }
+
+    public override void AdjustProblemDataProperties(IDataAnalysisProblemData problemData) {
+      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
+      ClassificationProblemData classificationProblemData = problemData as ClassificationProblemData;
+      if (classificationProblemData == null)
+        throw new ArgumentException("The problem data is not a classification problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
+
+      base.AdjustProblemDataProperties(problemData);
+      TargetVariable = classificationProblemData.TargetVariable;
+      for (int i = 0; i < classificationProblemData.ClassNames.Count(); i++)
+        ClassNamesParameter.Value[i, 0] = classificationProblemData.ClassNames.ElementAt(i);
+
+      for (int i = 0; i < Classes; i++) {
+        for (int j = 0; j < Classes; j++) {
+          ClassificationPenaltiesParameter.Value[i, j] = classificationProblemData.GetClassificationPenalty(ClassValuesCache[i], ClassValuesCache[j]);
+        }
+      }
+    }
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 11009)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Text;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
@@ -179,4 +180,43 @@
       if (listeners != null) listeners(this, EventArgs.Empty);
     }
+
+    protected virtual bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) {
+      errorMessage = string.Empty;
+      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
+
+      //check allowed input variables
+      StringBuilder message = new StringBuilder();
+      var variables = new HashSet<string>(problemData.InputVariables.Select(x => x.Value));
+      foreach (var item in AllowedInputVariables) {
+        if (!variables.Contains(item))
+          message.AppendLine("Input variable '" + item + "' is not present in the new problem data.");
+      }
+
+      if (message.Length != 0) {
+        errorMessage = message.ToString();
+        return false;
+      }
+      return true;
+
+    }
+
+    public virtual void AdjustProblemDataProperties(IDataAnalysisProblemData problemData) {
+      DataAnalysisProblemData data = problemData as DataAnalysisProblemData;
+      if (data == null) throw new ArgumentException("The problem data is not a data analysis problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
+
+      string errorMessage;
+      if (!data.IsProblemDataCompatible(this, out errorMessage)) {
+        throw new InvalidOperationException(errorMessage);
+      }
+
+      foreach (var inputVariable in InputVariables) {
+        var variable = data.InputVariables.FirstOrDefault(i => i.Value == inputVariable.Value);
+        InputVariables.SetItemCheckedState(inputVariable, variable != null && data.InputVariables.ItemChecked(variable));
+      }
+
+      TrainingPartition.Start = TrainingPartition.End = 0;
+      TestPartition.Start = 0;
+      TestPartition.End = Dataset.Rows;
+    }
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 11009)
@@ -101,4 +101,12 @@
     public string TargetVariable {
       get { return TargetVariableParameter.Value.Value; }
+      set {
+        if (value == null) throw new ArgumentNullException("targetVariable", "The provided value for the targetVariable is null.");
+        if (value == TargetVariable) return;
+
+        var matchingParameterValue = TargetVariableParameter.ValidValues.FirstOrDefault(v => v.Value == value);
+        if (matchingParameterValue == null) throw new ArgumentException("The provided value is not valid as the targetVariable.", "targetVariable");
+        TargetVariableParameter.Value = matchingParameterValue;
+      }
     }
 
@@ -143,4 +151,30 @@
       OnChanged();
     }
+
+    protected override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) {
+      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
+      IRegressionProblemData regressionProblemData = problemData as IRegressionProblemData;
+      if (regressionProblemData == null)
+        throw new ArgumentException("The problem data is not a regression problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
+
+      var returnValue = base.IsProblemDataCompatible(problemData, out errorMessage);
+      //check targetVariable
+      if (problemData.InputVariables.All(var => var.Value != TargetVariable)) {
+        errorMessage = string.Format("The target variable {0} is not present in the new problem data.", TargetVariable)
+                       + Environment.NewLine + errorMessage;
+        return false;
+      }
+      return returnValue;
+    }
+
+    public override void AdjustProblemDataProperties(IDataAnalysisProblemData problemData) {
+      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
+      RegressionProblemData regressionProblemData = problemData as RegressionProblemData;
+      if (regressionProblemData == null)
+        throw new ArgumentException("The problem data is not a regression problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
+
+      base.AdjustProblemDataProperties(problemData);
+      TargetVariable = regressionProblemData.TargetVariable;
+    }
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs	(revision 11009)
@@ -1621,4 +1621,15 @@
     }
 
+    public override void AdjustProblemDataProperties(IDataAnalysisProblemData problemData) {
+      TimeSeriesPrognosisProblemData timeSeriesProblemData = problemData as TimeSeriesPrognosisProblemData;
+      if (timeSeriesProblemData == null)
+        throw new ArgumentException("The problem data is not a timeseries problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
+
+      base.AdjustProblemDataProperties(problemData);
+
+      TrainingHorizon = timeSeriesProblemData.TrainingHorizon;
+      TestHorizon = timeSeriesProblemData.TestHorizon;
+    }
+
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IClassificationProblemData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IClassificationProblemData.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IClassificationProblemData.cs	(revision 11009)
@@ -23,5 +23,5 @@
 namespace HeuristicLab.Problems.DataAnalysis {
   public interface IClassificationProblemData : IDataAnalysisProblemData {
-    string TargetVariable { get; }
+    string TargetVariable { get; set; }
 
     IEnumerable<string> ClassNames { get; }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs	(revision 11009)
@@ -46,4 +46,6 @@
 
     event EventHandler Changed;
+
+    void AdjustProblemDataProperties(IDataAnalysisProblemData problemData);
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionProblemData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionProblemData.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionProblemData.cs	(revision 11009)
@@ -22,5 +22,5 @@
 namespace HeuristicLab.Problems.DataAnalysis {
   public interface IRegressionProblemData : IDataAnalysisProblemData {
-    string TargetVariable { get; }
+    string TargetVariable { get; set; }
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/HeuristicLab.Problems.ExternalEvaluation.Scilab-3.3.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/HeuristicLab.Problems.ExternalEvaluation.Scilab-3.3.csproj	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/HeuristicLab.Problems.ExternalEvaluation.Scilab-3.3.csproj	(revision 11009)
@@ -0,0 +1,191 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{C633FB23-BAE6-448E-BF5D-E1F9A839B5ED}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.ExternalEvaluation.Scilab</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.ExternalEvaluation.Scilab-3.3</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SccProjectName>Svn</SccProjectName>
+    <SccLocalPath>Svn</SccLocalPath>
+    <SccAuxPath>Svn</SccAuxPath>
+    <SccProvider>SubversionScc</SccProvider>
+  </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>
+  </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>
+  </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>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="DotNetScilab-1.0, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\bin\DotNetScilab-1.0.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.DotNetScilab-1.0, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\bin\HeuristicLab.DotNetScilab-1.0.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="ScilabParameterVectorEvaluator.cs" />
+    <Compile Include="ScilabParameterOptimizationProblem.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958b43bc-cc5c-4fa2-8628-2b3b01d890b6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{a9ad58b9-3ef9-4cc1-97e5-8d909039ff5c}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{c36bd924-a541-4a00-afa8-41701378ddc5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{bbab9df5-5ef3-4ba8-ade9-b36e82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.RealVectorEncoding\3.3\HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj">
+      <Project>{bb6d334a-4bb6-4674-9883-31a6ebb32cab}</Project>
+      <Name>HeuristicLab.Encodings.RealVectorEncoding-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23da7ff4-d5b8-41b6-aa96-f0561d24f3ee}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
+      <Project>{56f9106a-079f-4c61-92f6-86a84c2d84b7}</Project>
+      <Name>HeuristicLab.Parameters-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102bc7d3-0ef9-439c-8f6d-96ff0fdb8e1b}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.ParameterOptimization\3.3\HeuristicLab.Problems.ParameterOptimization-3.3.csproj">
+      <Project>{d2c39fba-a1d5-403a-9211-b0a299a76313}</Project>
+      <Name>HeuristicLab.Problems.ParameterOptimization-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
+      set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+      set ProjectDir=$(ProjectDir)
+      set SolutionDir=$(SolutionDir)
+      set Outdir=$(Outdir)
+
+      call PreBuildEvent.cmd
+    </PreBuildEvent>
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+      export ProjectDir=$(ProjectDir)
+      export SolutionDir=$(SolutionDir)
+
+      $SolutionDir/PreBuildEvent.sh
+    </PreBuildEvent>
+  </PropertyGroup>
+  <!-- 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/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/Plugin.cs.frame
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/Plugin.cs.frame	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/Plugin.cs.frame	(revision 11009)
@@ -0,0 +1,77 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.PluginInfrastructure;
+using Microsoft.Win32;
+
+namespace HeuristicLab.Problems.ExternalEvaluation.Scilab {
+  /// <summary>
+  /// Plugin class for HeuristicLab.Problems.ExternalEvaluation.Scilab plugin.
+  /// </summary>
+  [Plugin("HeuristicLab.Problems.ExternalEvaluation.Scilab", "3.3.9.$WCREV$")]
+  [PluginFile("HeuristicLab.Problems.ExternalEvaluation.Scilab-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.DotNetScilab", "1.0")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.RealVectorEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.ParameterOptimization", "3.3")]
+  public class HeuristicLabProblemsExternalEvaluationScilabPlugin : PluginBase {
+    private const string registryKey = @"SOFTWARE\Scilab";
+    private const string scilab_Install = @"LASTINSTALL";
+    private const string scilab_PATH = @"SCIPATH";
+
+    public override void OnLoad() {
+      base.OnLoad();
+
+      var currentPath = Environment.GetEnvironmentVariable("path");
+      if (currentPath == null) return;
+
+      var scilabPath = GetScilabInstallPath();
+      if (string.IsNullOrEmpty(scilabPath)) return;
+
+      Environment.SetEnvironmentVariable("path", scilabPath + ";" + currentPath);
+    }
+
+    private string GetScilabInstallPath() {
+      using (var registryLocalMachine = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Default)) {
+        using (var registryScilab = registryLocalMachine.OpenSubKey(registryKey)) {
+          if (registryScilab == null) return string.Empty;
+          var scilabVersion = registryScilab.GetValue(scilab_Install);
+          if (scilabVersion == null) return string.Empty;
+          using (var registryScilabVersion = registryScilab.OpenSubKey(scilabVersion.ToString())) {
+            if (registryScilabVersion == null) return string.Empty;
+            var scilabPath = registryScilabVersion.GetValue(scilab_PATH);
+            if (scilabPath == null) return string.Empty;
+            string path = scilabPath.ToString();
+            path += @"\bin";
+            return path;
+          }
+        }
+      }
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/Properties/AssemblyInfo.cs.frame	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/Properties/AssemblyInfo.cs.frame	(revision 11009)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Problems.ExternalEvaluation.Scilab")]
+[assembly: AssemblyDescription("HeuristicLab problems for real valued parameter optimization performed in Scilab.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2013 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("B211BD50-DE67-4AB1-8A43-DF3C5222B1D5")]
+
+// 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 Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.8.$WCREV$")]
Index: /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/ScilabParameterOptimizationProblem.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/ScilabParameterOptimizationProblem.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/ScilabParameterOptimizationProblem.cs	(revision 11009)
@@ -0,0 +1,83 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.ParameterOptimization;
+
+namespace HeuristicLab.Problems.ExternalEvaluation.Scilab {
+  [Item("Scilab Parameter Optimization Problem", "Optimization of a parameter vector which is evaluated in Scilab.")]
+  [StorableClass]
+  [Creatable("Problems")]
+  public class ScilabParameterOptimizationProblem : ParameterOptimizationProblem {
+    private const string QualityVariableParameterName = "QualityVariableName";
+    private const string ScilabEvaluationScriptParameterName = "ScilabEvaluationScript";
+    private const string ScilabInitializationScriptParameterName = "ScilabInitializationScript";
+
+    #region parameters
+    public IFixedValueParameter<StringValue> QualityVariableParameter {
+      get { return (IFixedValueParameter<StringValue>)Parameters[QualityVariableParameterName]; }
+    }
+    public IFixedValueParameter<TextFileValue> ScilabEvaluationScriptParameter {
+      get { return (IFixedValueParameter<TextFileValue>)Parameters[ScilabEvaluationScriptParameterName]; }
+    }
+    public IFixedValueParameter<TextFileValue> ScilabInitializationScriptParameter {
+      get { return (IFixedValueParameter<TextFileValue>)Parameters[ScilabInitializationScriptParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public string QualityVariable {
+      get { return QualityVariableParameter.Value.Value; }
+      set { QualityVariableParameter.Value.Value = value; }
+    }
+    public TextFileValue ScilabEvaluationScript {
+      get { return ScilabEvaluationScriptParameter.Value; }
+    }
+    public TextFileValue ScilabInitializationScript {
+      get { return ScilabInitializationScriptParameter.Value; }
+    }
+
+    #endregion
+
+    [StorableConstructor]
+    protected ScilabParameterOptimizationProblem(bool deserializing) : base(deserializing) { }
+    protected ScilabParameterOptimizationProblem(ScilabParameterOptimizationProblem original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ScilabParameterOptimizationProblem(this, cloner);
+    }
+
+    public ScilabParameterOptimizationProblem()
+      : base(new ScilabParameterVectorEvaluator()) {
+      Parameters.Add(new FixedValueParameter<StringValue>(QualityVariableParameterName, "The name of the quality variable of the Scilab script.", new StringValue("quality")));
+      Parameters.Add(new FixedValueParameter<TextFileValue>(ScilabEvaluationScriptParameterName, "The path to the Scilab evaluation script.", new TextFileValue()));
+      Parameters.Add(new FixedValueParameter<TextFileValue>(ScilabInitializationScriptParameterName, "The path to a Scilab script the should be execute before the evaluation starts.", new TextFileValue()));
+
+      ScilabEvaluationScript.FileDialogFilter = @"Scilab Scripts|*.sce|All files|*.*";
+      ScilabInitializationScript.FileDialogFilter = @"Scilab Scripts|*.sce|All files|*.*";
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/ScilabParameterVectorEvaluator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/ScilabParameterVectorEvaluator.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.ExternalEvaluation.Scilab/3.3/ScilabParameterVectorEvaluator.cs	(revision 11009)
@@ -0,0 +1,141 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.ParameterOptimization;
+using ScilabConnector = DotNetScilab.Scilab;
+
+namespace HeuristicLab.Problems.ExternalEvaluation.Scilab {
+  [Item("SciLabParameterVectorEvaluator", "An evaluator which takes a parameter vector and returns a quality value, calculated by a Scilab script.")]
+  [StorableClass]
+  public sealed class ScilabParameterVectorEvaluator : ParameterVectorEvaluator {
+    private const string QualityVariableParameterName = "QualityVariableName";
+    private const string ScilabEvaluationScriptParameterName = "ScilabEvaluationScript";
+    private const string ScilabInitializationScriptParameterName = "ScilabInitializationScript";
+
+    #region parameters
+    public ILookupParameter<StringValue> QualityVariableParameter {
+      get { return (ILookupParameter<StringValue>)Parameters[QualityVariableParameterName]; }
+    }
+    public ILookupParameter<TextFileValue> ScilabEvaluationScriptParameter {
+      get { return (ILookupParameter<TextFileValue>)Parameters[ScilabEvaluationScriptParameterName]; }
+    }
+    public ILookupParameter<TextFileValue> ScilabInitializationScriptParameter {
+      get { return (ILookupParameter<TextFileValue>)Parameters[ScilabInitializationScriptParameterName]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private ScilabParameterVectorEvaluator(bool deserializing) : base(deserializing) { }
+    private ScilabParameterVectorEvaluator(ScilabParameterVectorEvaluator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ScilabParameterVectorEvaluator(this, cloner);
+    }
+
+    public ScilabParameterVectorEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<StringValue>(QualityVariableParameterName, "The name of the quality variable of the Scilab script."));
+      Parameters.Add(new LookupParameter<TextFileValue>(ScilabEvaluationScriptParameterName, "The path to the Scilab evaluation script."));
+      Parameters.Add(new LookupParameter<TextFileValue>(ScilabInitializationScriptParameterName, "The path to a Scilab script the should be execute before the evaluation starts."));
+    }
+
+    private readonly object locker = new object();
+    private static ScilabConnector scilab = null;
+    private bool startedScilab = false;
+
+    public override IOperation Apply() {
+      var evaluationScript = ScilabEvaluationScriptParameter.ActualValue;
+      if (string.IsNullOrEmpty(evaluationScript.Value)) throw new FileNotFoundException("The evaluation script in the problem is not set.");
+      if (!evaluationScript.Exists()) throw new FileNotFoundException(string.Format("The evaluation script \"{0}\" cannot be found.", evaluationScript.Value));
+
+      var initializationScript = ScilabInitializationScriptParameter.ActualValue;
+      if (!string.IsNullOrEmpty(initializationScript.Value) && !initializationScript.Exists()) throw new FileNotFoundException(string.Format("The initialization script \"{0}\" cannot be found.", initializationScript.Value));
+
+      int result;
+      //Scilab is used via a c++ wrapper that calls static methods. Hence it is not possible to parallelize the evaluation.
+      lock (locker) {
+        //initialize scilab and execute initialization script
+        if (scilab == null) {
+          startedScilab = true;
+          scilab = new ScilabConnector(false);
+          if (!string.IsNullOrEmpty(initializationScript.Value)) {
+            result = scilab.execScilabScript(initializationScript.Value);
+            if (result != 0) ThrowSciLabException(initializationScript.Value, result);
+          }
+        } else if (!startedScilab) {
+          throw new InvalidOperationException("Could not run multiple optimization algorithms in parallel.");
+        }
+
+        var parameterVector = ParameterVectorParameter.ActualValue;
+        var parameterNames = ParameterNamesParameter.ActualValue;
+        if (parameterNames.Any(string.IsNullOrEmpty)) throw new ArgumentException("Not all parameter names are provided.");
+
+        for (int i = 0; i < ProblemSizeParameter.ActualValue.Value; i++) {
+          result = scilab.createNamedMatrixOfDouble(parameterNames[i], 1, 1, new double[] { parameterVector[i] });
+          if (result != 0) ThrowSciLabException("setting parameter " + parameterNames[i], result);
+        }
+
+        string script = ScilabEvaluationScriptParameter.ActualValue.Value;
+        result = scilab.execScilabScript(script);
+        if (result != 0) ThrowSciLabException(script, result);
+
+        string qualityVariableName = QualityVariableParameter.ActualValue.Value;
+        double[] values = scilab.readNamedMatrixOfDouble(qualityVariableName);
+        if (values == null) throw new InvalidOperationException(string.Format("Could not find the variable \"{0}\" in the Scilab workspace, that should hold the quality value.", qualityVariableName));
+        double quality = values[0];
+
+        if (double.IsNaN(quality)) quality = double.MaxValue;
+        if (double.IsInfinity(quality)) quality = double.MaxValue;
+
+        QualityParameter.ActualValue = new DoubleValue(quality);
+        return base.Apply();
+      }
+    }
+
+    public override void ClearState() {
+      base.ClearState();
+      if (startedScilab)
+        scilab = null;
+      startedScilab = false;
+    }
+
+    private void ThrowSciLabException(string fileName, int errorCode) {
+      const string code = "errorMsg = lasterror();";
+      int result = scilab.SendScilabJob(code);
+      if (result != 0) throw new InvalidOperationException(string.Format("An error occured during the execution of the Scilab script {0}.", fileName));
+
+      string errorMessage = scilab.readNamedMatrixOfString("errorMsg")[0];
+
+      string message = string.Format("The error {1} occured during the execution of the Scilab script {0}. "
+        + Environment.NewLine + Environment.NewLine + " {2}", fileName, errorCode, errorMessage);
+      throw new InvalidOperationException(message);
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/ArtificialAnt/GEArtificialAntEvaluator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/ArtificialAnt/GEArtificialAntEvaluator.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/ArtificialAnt/GEArtificialAntEvaluator.cs	(revision 11009)
@@ -0,0 +1,119 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.ArtificialAnt;
+using HeuristicLab.Problems.GrammaticalEvolution.Mappers;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  [Item("GEArtificialAntEvaluator", "Evaluates an artificial ant solution for grammatical evolution.")]
+  [StorableClass]
+  public class GEArtificialAntEvaluator : SingleSuccessorOperator,
+    ISingleObjectiveEvaluator, ISymbolicExpressionTreeGrammarBasedOperator {
+
+    #region Parameter Properties
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    // genotype:
+    public ILookupParameter<IntegerVector> IntegerVectorParameter {
+      get { return (ILookupParameter<IntegerVector>)Parameters["IntegerVector"]; }
+    }
+    // phenotype:
+    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters["SymbolicExpressionTree"]; }
+    }
+    public ILookupParameter<BoolMatrix> WorldParameter {
+      get { return (ILookupParameter<BoolMatrix>)Parameters["World"]; }
+    }
+    public ILookupParameter<IntValue> MaxTimeStepsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["MaxTimeSteps"]; }
+    }
+    public IValueLookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionTreeGrammarParameter {
+      get { return (IValueLookupParameter<ISymbolicExpressionGrammar>)Parameters["SymbolicExpressionTreeGrammar"]; }
+    }
+    // genotype-to-phenotype-mapper:
+    public ILookupParameter<IGenotypeToPhenotypeMapper> GenotypeToPhenotypeMapperParameter {
+      get { return (ILookupParameter<IGenotypeToPhenotypeMapper>)Parameters["GenotypeToPhenotypeMapper"]; }
+    }
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public ILookupParameter<IntMatrix> BoundsParameter {
+      get { return (ILookupParameter<IntMatrix>)Parameters["Bounds"]; }
+    }
+    public ILookupParameter<IntValue> MaxExpressionLengthParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["MaximumExpressionLength"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected GEArtificialAntEvaluator(bool deserializing) : base(deserializing) { }
+    protected GEArtificialAntEvaluator(GEArtificialAntEvaluator original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new GEArtificialAntEvaluator(this, cloner); }
+    public GEArtificialAntEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the evaluated artificial ant solution."));
+      Parameters.Add(new LookupParameter<IntegerVector>("IntegerVector", "The artificial ant solution encoded as an integer vector genome."));
+      Parameters.Add(new LookupParameter<SymbolicExpressionTree>("SymbolicExpressionTree", "The artificial ant solution encoded as a symbolic expression tree that should be evaluated"));
+      Parameters.Add(new LookupParameter<BoolMatrix>("World", "The world for the artificial ant with scattered food items."));
+      Parameters.Add(new LookupParameter<IntValue>("MaxTimeSteps", "The maximal number of time steps that the artificial ant should be simulated."));
+      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionGrammar>("SymbolicExpressionTreeGrammar", "The tree grammar that defines the correct syntax of symbolic expression trees that should be created."));
+      Parameters.Add(new LookupParameter<IGenotypeToPhenotypeMapper>("GenotypeToPhenotypeMapper", "Maps the genotype (an integer vector) to the phenotype (a symbolic expression tree)."));
+      Parameters.Add(new LookupParameter<IRandom>("Random", "Random number generator for the genotype creation and the genotype-to-phenotype mapping."));
+
+      Parameters.Add(new LookupParameter<IntMatrix>("Bounds", "The integer number range in which the single genomes of a genotype are created."));
+      Parameters.Add(new LookupParameter<IntValue>("MaximumExpressionLength", "Maximal length of the expression to control the artificial ant (genotype length)."));
+    }
+
+    public sealed override IOperation Apply() {
+      SymbolicExpressionTree tree = GenotypeToPhenotypeMapperParameter.ActualValue.Map(
+        RandomParameter.ActualValue,
+        BoundsParameter.ActualValue,
+        MaxExpressionLengthParameter.ActualValue.Value,
+        SymbolicExpressionTreeGrammarParameter.ActualValue,
+        IntegerVectorParameter.ActualValue
+      );
+      SymbolicExpressionTreeParameter.ActualValue = tree;
+      BoolMatrix world = WorldParameter.ActualValue;
+      IntValue maxTimeSteps = MaxTimeStepsParameter.ActualValue;
+
+      AntInterpreter interpreter = new AntInterpreter();
+      interpreter.MaxTimeSteps = maxTimeSteps.Value;
+      interpreter.World = world;
+      interpreter.Expression = tree;
+      interpreter.Run();
+
+      QualityParameter.ActualValue = new DoubleValue(interpreter.FoodEaten);
+      return null;
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/ArtificialAnt/GEArtificialAntProblem.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/ArtificialAnt/GEArtificialAntProblem.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/ArtificialAnt/GEArtificialAntProblem.cs	(revision 11009)
@@ -0,0 +1,271 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.ArtificialAnt;
+using HeuristicLab.Problems.ArtificialAnt.Analyzers;
+using HeuristicLab.Problems.GrammaticalEvolution.Mappers;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  [Item("Grammatical Evolution Artificial Ant Problem", "Represents the Artificial Ant problem, implemented in Grammatical Evolution.")]
+  [Creatable("Problems")]
+  [StorableClass]
+  public sealed class GEArtificialAntProblem : SingleObjectiveHeuristicOptimizationProblem<GEArtificialAntEvaluator, IIntegerVectorCreator>, IStorableContent {
+    public string Filename { get; set; }
+
+    #region constant for default world (Santa Fe)
+    private readonly bool[,] santaFeAntTrail = new bool[,] {
+      {false, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, true, false, false, false, false}, 
+      {false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, true, false, false}, 
+      {false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, true, false, false}, 
+      {false, false, false, true, true, true, true, false, true, true, true, true, true, false, false, false, false, false, false, false, false, true, true, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, true, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, true, false, false, false, false, false, true, true, true, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, true, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false}, 
+      {false, false, false, true, true, false, false, true, true, true, true, true, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, true, false, false, false, false, false, false, true, true, true, true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, true, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
+      {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false }
+    };
+    #endregion
+
+    #region Parameter Properties
+    public IValueParameter<ISymbolicExpressionGrammar> ArtificialAntExpressionGrammarParameter {
+      get { return (IValueParameter<ISymbolicExpressionGrammar>)Parameters["ArtificialAntExpressionGrammar"]; }
+    }
+    public IValueParameter<IntValue> MaxExpressionLengthParameter {
+      get { return (IValueParameter<IntValue>)Parameters["MaximumExpressionLength"]; }
+    }
+    public IValueParameter<BoolMatrix> WorldParameter {
+      get { return (IValueParameter<BoolMatrix>)Parameters["World"]; }
+    }
+    public IValueParameter<IntValue> MaxTimeStepsParameter {
+      get { return (IValueParameter<IntValue>)Parameters["MaximumTimeSteps"]; }
+    }
+    public IValueParameter<IntMatrix> BoundsParameter {
+      get { return (IValueParameter<IntMatrix>)Parameters["Bounds"]; }
+    }
+    public IValueParameter<IGenotypeToPhenotypeMapper> GenotypeToPhenotypeMapperParameter {
+      get { return (IValueParameter<IGenotypeToPhenotypeMapper>)Parameters["GenotypeToPhenotypeMapper"]; }
+    }
+    #endregion
+
+    #region Properties
+    public BoolMatrix World {
+      get { return WorldParameter.Value; }
+      set { WorldParameter.Value = value; }
+    }
+    public IntValue MaxTimeSteps {
+      get { return MaxTimeStepsParameter.Value; }
+      set { MaxTimeStepsParameter.Value = value; }
+    }
+    public IntValue MaxExpressionLength {
+      get { return MaxExpressionLengthParameter.Value; }
+      set { MaxExpressionLengthParameter.Value = value; }
+    }
+    public ArtificialAntExpressionGrammar ArtificialAntExpressionGrammar {
+      get { return (ArtificialAntExpressionGrammar)ArtificialAntExpressionGrammarParameter.Value; }
+    }
+    public IEnumerable<IAntTrailAnalyzer> AntTrailAnalyzers {
+      get { return Operators.OfType<IAntTrailAnalyzer>(); }
+    }
+    public IntMatrix Bounds {
+      get { return BoundsParameter.Value; }
+      set { BoundsParameter.Value = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private GEArtificialAntProblem(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
+
+    private GEArtificialAntProblem(GEArtificialAntProblem original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEventHandlers();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GEArtificialAntProblem(this, cloner);
+    }
+
+    public GEArtificialAntProblem()
+      : base(new GEArtificialAntEvaluator(), new UniformRandomIntegerVectorCreator()) {
+      BoolMatrix world = new BoolMatrix(santaFeAntTrail);
+      Parameters.Add(new ValueParameter<IntValue>("MaximumExpressionLength", "Maximal length of the expression to control the artificial ant (genotype length).", new IntValue(30)));
+      Parameters.Add(new ValueParameter<ISymbolicExpressionGrammar>("ArtificialAntExpressionGrammar", "The grammar that should be used for artificial ant expressions.", new ArtificialAntExpressionGrammar()));
+      Parameters.Add(new ValueParameter<BoolMatrix>("World", "The world for the artificial ant with scattered food items.", world));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumTimeSteps", "The number of time steps the artificial ant has available to collect all food items.", new IntValue(600)));
+      IntMatrix m = new IntMatrix(new int[,] { { 0, 100 } });
+      Parameters.Add(new ValueParameter<IntMatrix>("Bounds", "The integer number range in which the single genomes of a genotype are created.", m));
+      Parameters.Add(new ValueParameter<IGenotypeToPhenotypeMapper>("GenotypeToPhenotypeMapper", "Maps the genotype (an integer vector) to the phenotype (a symbolic expression tree).", new DepthFirstMapper()));
+
+      Maximization.Value = true;
+      MaximizationParameter.Hidden = true;
+      BestKnownQuality = new DoubleValue(89);
+
+      SolutionCreator.IntegerVectorParameter.ActualName = "AntTrailSolutionIntegerVector";
+      Evaluator.SymbolicExpressionTreeParameter.ActualName = "AntTrailSolutionTree";
+      Evaluator.SymbolicExpressionTreeGrammarParameter.ActualName = "ArtificialAntExpressionGrammar";
+      Evaluator.QualityParameter.ActualName = "FoodEaten";
+
+      InitializeOperators();
+      RegisterEventHandlers();
+    }
+
+    #region Events
+    protected override void OnSolutionCreatorChanged() {
+      base.OnSolutionCreatorChanged();
+
+      SolutionCreator.IntegerVectorParameter.ActualName = "AntTrailSolutionIntegerVector";
+      SolutionCreator.IntegerVectorParameter.ActualNameChanged += new EventHandler(SolutionCreator_IntegerVectorParameter_ActualNameChanged);
+
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+
+      Evaluator.SymbolicExpressionTreeParameter.ActualName = "AntTrailSolutionTree";
+      Evaluator.SymbolicExpressionTreeGrammarParameter.ActualName = "ArtificialAntExpressionGrammar";
+      Evaluator.QualityParameter.ActualName = "FoodEaten";
+
+      Evaluator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(Evaluator_SymbolicExpressionTreeParameter_ActualNameChanged);
+      Evaluator.SymbolicExpressionTreeGrammarParameter.ActualNameChanged += new EventHandler(Evaluator_SymbolicExpressionTreeGrammarParameter_ActualNameChanged);
+      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+
+    private void SolutionCreator_IntegerVectorParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+
+    private void Evaluator_SymbolicExpressionTreeParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+
+    private void Evaluator_SymbolicExpressionTreeGrammarParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+
+    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+    #endregion
+
+    #region Helpers
+    private void RegisterEventHandlers() {
+      SolutionCreator.IntegerVectorParameter.ActualNameChanged += new EventHandler(SolutionCreator_IntegerVectorParameter_ActualNameChanged);
+      Evaluator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(Evaluator_SymbolicExpressionTreeParameter_ActualNameChanged);
+      Evaluator.SymbolicExpressionTreeGrammarParameter.ActualNameChanged += new EventHandler(Evaluator_SymbolicExpressionTreeGrammarParameter_ActualNameChanged);
+      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+    }
+
+    private void InitializeOperators() {
+      Operators.AddRange(ApplicationManager.Manager.GetInstances<IIntegerVectorOperator>().OfType<IOperator>());
+      Operators.Add(new BestAntTrailAnalyzer());
+      Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer());
+      Operators.Add(new SymbolicExpressionSymbolFrequencyAnalyzer());
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+
+    private void ParameterizeAnalyzers() {
+      foreach (IAntTrailAnalyzer analyzer in AntTrailAnalyzers) {
+        analyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+        analyzer.SymbolicExpressionTreeParameter.ActualName = Evaluator.SymbolicExpressionTreeParameter.ActualName;
+        analyzer.WorldParameter.ActualName = WorldParameter.Name;
+        analyzer.MaxTimeStepsParameter.ActualName = MaxTimeStepsParameter.Name;
+      }
+      foreach (ISymbolicExpressionTreeAnalyzer analyzer in Operators.OfType<ISymbolicExpressionTreeAnalyzer>()) {
+        analyzer.SymbolicExpressionTreeParameter.ActualName = Evaluator.SymbolicExpressionTreeParameter.ActualName;
+      }
+    }
+
+    private void ParameterizeOperators() {
+      var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators);
+
+      foreach (ISymbolicExpressionTreeGrammarBasedOperator op in operators.OfType<ISymbolicExpressionTreeGrammarBasedOperator>()) {
+        op.SymbolicExpressionTreeGrammarParameter.ActualName = ArtificialAntExpressionGrammarParameter.Name;
+      }
+      foreach (GEArtificialAntEvaluator op in operators.OfType<GEArtificialAntEvaluator>()) {
+        op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+        op.MaxTimeStepsParameter.ActualName = MaxTimeStepsParameter.Name;
+        op.WorldParameter.ActualName = WorldParameter.Name;
+      }
+      foreach (IIntegerVectorCrossover op in operators.OfType<IIntegerVectorCrossover>()) {
+        op.ParentsParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+        op.ChildParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+      }
+      foreach (IIntegerVectorManipulator op in operators.OfType<IIntegerVectorManipulator>()) {
+        op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+      }
+      foreach (IIntegerVectorCreator op in operators.OfType<IIntegerVectorCreator>()) {
+        op.BoundsParameter.ActualName = BoundsParameter.Name;
+        op.LengthParameter.ActualName = MaxExpressionLengthParameter.Name;
+      }
+    }
+    #endregion
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/HeuristicLab.Problems.GrammaticalEvolution-3.3.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/HeuristicLab.Problems.GrammaticalEvolution-3.3.csproj	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/HeuristicLab.Problems.GrammaticalEvolution-3.3.csproj	(revision 11009)
@@ -0,0 +1,296 @@
+﻿<?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>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{7FC70D74-1813-48B7-9CE5-0BD913457579}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.GrammaticalEvolution</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.GrammaticalEvolution-3.3</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>True</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+    <NoWin32Manifest>False</NoWin32Manifest>
+    <DelaySign>False</DelaySign>
+    <AssemblyOriginatorKeyMode>File</AssemblyOriginatorKeyMode>
+    <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+    <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
+    <NoStdLib>True</NoStdLib>
+    <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
+    <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
+    <RunCodeAnalysis>False</RunCodeAnalysis>
+    <SourceAnalysisOverrideSettingsFile>C:\Users\Sabine\AppData\Roaming\ICSharpCode/SharpDevelop4\Settings.SourceAnalysis</SourceAnalysisOverrideSettingsFile>
+  </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>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </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>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="mscorlib" />
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Symbolic\GESymbolicDataAnalysisEvaluator.cs" />
+    <Compile Include="Symbolic\GESymbolicDataAnalysisProblem.cs" />
+    <Compile Include="Symbolic\GESymbolicDataAnalysisSingleObjectiveEvaluator.cs" />
+    <Compile Include="Symbolic\GESymbolicDataAnalysisSingleObjectiveProblem.cs" />
+    <Compile Include="Symbolic\GESymbolicRegressionSingleObjectiveEvaluator.cs" />
+    <Compile Include="Symbolic\GESymbolicRegressionSingleObjectiveProblem.cs" />
+    <Compile Include="Symbolic\IGESymbolicDataAnalysisEvaluator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Symbolic\IGESymbolicDataAnalysisProblem.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Symbolic\IGESymbolicDataAnalysisSingleObjectiveEvaluator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Symbolic\IGESymbolicDataAnalysisValidationAnalyzer.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Symbolic\IGESymbolicRegressionEvaluator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Symbolic\IGESymbolicRegressionSingleObjectiveEvaluator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Symbolic\GESymbolicExpressionGrammar.cs" />
+    <None Include="HeuristicLab.snk" />
+    <Compile Include="ArtificialAnt\GEArtificialAntEvaluator.cs" />
+    <Compile Include="ArtificialAnt\GEArtificialAntProblem.cs" />
+    <Compile Include="Mappers\BreathFirstMapper.cs" />
+    <Compile Include="Mappers\DepthFirstMapper.cs" />
+    <Compile Include="Mappers\GenotypeToPhenotypeMapper.cs" />
+    <Compile Include="Mappers\IGenotypeToPhenotypeMapper.cs" />
+    <Compile Include="Mappers\PIGEMapper.cs" />
+    <Compile Include="Mappers\RandomMapper.cs" />
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
+      <Project>{887425b4-4348-49ed-a457-b7d2c26ddbf9}</Project>
+      <Name>HeuristicLab.Analysis-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958b43bc-cc5c-4fa2-8628-2b3b01d890b6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0e27a536-1c4a-4624-a65e-dc4f4f23e3e1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{a9ad58b9-3ef9-4cc1-97e5-8d909039ff5c}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{c36bd924-a541-4a00-afa8-41701378ddc5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{bbab9df5-5ef3-4ba8-ade9-b36e82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.IntegerVectorEncoding\3.3\HeuristicLab.Encodings.IntegerVectorEncoding-3.3.csproj">
+      <Project>{ddfb14dd-2a85-493c-a52d-e69729bbaeb0}</Project>
+      <Name>HeuristicLab.Encodings.IntegerVectorEncoding-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
+      <Project>{06d4a186-9319-48a0-bade-a2058d462eea}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23da7ff4-d5b8-41b6-aa96-f0561d24f3ee}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
+      <Project>{56f9106a-079f-4c61-92f6-86a84c2d84b7}</Project>
+      <Name>HeuristicLab.Parameters-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102bc7d3-0ef9-439c-8f6d-96ff0fdb8e1b}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.ArtificialAnt\3.4\HeuristicLab.Problems.ArtificialAnt-3.4.csproj">
+      <Project>{0c67a033-f6d9-4237-b3ca-c033a44706be}</Project>
+      <Name>HeuristicLab.Problems.ArtificialAnt-3.4</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj">
+      <Project>{5ac82412-911b-4fa2-a013-edc5e3f3fcc2}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj">
+      <Project>{3d28463f-ec96-4d82-afee-38be91a0ca00}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
+      <Project>{df87c13e-a889-46ff-8153-66dcaa8c5674}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
+      <Project>{3540e29e-4793-49e7-8ee2-fea7f61c3994}</Project>
+      <Name>HeuristicLab.Problems.Instances-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
+      <Project>{f4539fb6-4708-40c9-be64-0a1390aea197}</Project>
+      <Name>HeuristicLab.Random-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\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>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd</PreBuildEvent>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+    <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
+    <BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
+    <StartAction>Program</StartAction>
+    <StartProgram>..\..\..\trunk\sources\bin\HeuristicLab 3.3.exe</StartProgram>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
+    <BaseAddress>4194304</BaseAddress>
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <RegisterForComInterop>False</RegisterForComInterop>
+    <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Platform)' == 'x64' ">
+    <PlatformTarget>x64</PlatformTarget>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Platform)' == 'x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+</Project>
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/BreathFirstMapper.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/BreathFirstMapper.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/BreathFirstMapper.cs	(revision 11009)
@@ -0,0 +1,121 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  /// <summary>
+  /// BreathFirstMapper
+  /// </summary>
+  [Item("BreathFirstMapper", "Resolves the non-terminal symbols of the resulting phenotypic syntax tree in a breath-first manner.")]
+  [StorableClass]
+  public class BreathFirstMapper : GenotypeToPhenotypeMapper {
+
+    [StorableConstructor]
+    protected BreathFirstMapper(bool deserializing) : base(deserializing) { }
+    protected BreathFirstMapper(BreathFirstMapper original, Cloner cloner) : base(original, cloner) { }
+    public BreathFirstMapper() : base() { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BreathFirstMapper(this, cloner);
+    }
+
+
+    /// <summary>
+    /// Maps a genotype (an integer vector) to a phenotype (a symbolic expression tree).
+    /// Breath-first approach.
+    /// </summary>
+    /// <param name="random">random number generator</param>
+    /// <param name="bounds">only used for PIGEMapper (ignore here)</param>
+    /// <param name="length">only used for PIGEMapper (ignore here)</param>
+    /// <param name="grammar">grammar definition</param>
+    /// <param name="genotype">integer vector, which should be mapped to a tree</param>
+    /// <returns>phenotype (a symbolic expression tree)</returns>
+    public override SymbolicExpressionTree Map(IRandom random, IntMatrix bounds, int length,
+                                               ISymbolicExpressionGrammar grammar,
+                                               IntegerVector genotype) {
+
+      SymbolicExpressionTree tree = new SymbolicExpressionTree();
+      var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
+      var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
+      rootNode.AddSubtree(startNode);
+      tree.Root = rootNode;
+
+      MapBreathFirstIteratively(startNode, genotype, grammar,
+                                genotype.Length, random);
+
+      return tree;
+    }
+
+    /// <summary>
+    /// Genotype-to-Phenotype mapper (iterative breath-first approach, by using a queue -> FIFO).
+    /// </summary>
+    /// <param name="startNode">first node of the tree with arity 1</param>
+    /// <param name="genotype">integer vector, which should be mapped to a tree</param>
+    /// <param name="grammar">grammar to determine the allowed child symbols for each node</param>
+    /// <param name="maxSubtreeCount">maximum allowed subtrees (= number of used genomes)</param>
+    /// <param name="random">random number generator</param>
+    private void MapBreathFirstIteratively(ISymbolicExpressionTreeNode startNode,
+                                          IntegerVector genotype,
+                                          ISymbolicExpressionGrammar grammar,
+                                          int maxSubtreeCount, IRandom random) {
+
+      Queue<Tuple<ISymbolicExpressionTreeNode, int>> queue
+        = new Queue<Tuple<ISymbolicExpressionTreeNode, int>>(); // tuples of <node, arity>
+
+      int genotypeIndex = 0;
+      queue.Enqueue(new Tuple<ISymbolicExpressionTreeNode, int>(startNode, 1));
+
+      while (queue.Count > 0) {
+
+        Tuple<ISymbolicExpressionTreeNode, int> current = queue.Dequeue();
+
+        // foreach subtree of the current node, create a new node and enqueue it, if it is no terminal node
+        for (int i = 0; i < current.Item2; ++i) {
+
+          if (genotypeIndex >= maxSubtreeCount) {
+            // if all genomes were used, only add terminal nodes to the remaining subtrees
+            current.Item1.AddSubtree(GetRandomTerminalNode(current.Item1, grammar, random));
+          } else {
+            var newNode = GetNewChildNode(current.Item1, genotype, grammar, genotypeIndex, random);
+            int arity = SampleArity(random, newNode, grammar);
+
+            current.Item1.AddSubtree(newNode);
+            genotypeIndex++;
+            if (arity > 0) {
+              // new node has subtrees so enqueue the node 
+              queue.Enqueue(new Tuple<ISymbolicExpressionTreeNode, int>(newNode, arity));
+            }
+          }
+        }
+      }
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/DepthFirstMapper.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/DepthFirstMapper.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/DepthFirstMapper.cs	(revision 11009)
@@ -0,0 +1,124 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  /// <summary>
+  /// DepthFirstMapper
+  /// </summary>
+  [Item("DepthFirstMapper", "Resolves the non-terminal symbols of the resulting phenotypic syntax tree in a depth-first manner.")]
+  [StorableClass]
+  public class DepthFirstMapper : GenotypeToPhenotypeMapper {
+
+    [StorableConstructor]
+    protected DepthFirstMapper(bool deserializing) : base(deserializing) { }
+    protected DepthFirstMapper(DepthFirstMapper original, Cloner cloner) : base(original, cloner) { }
+    public DepthFirstMapper() : base() { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new DepthFirstMapper(this, cloner);
+    }
+
+
+    /// <summary>
+    /// Maps a genotype (an integer vector) to a phenotype (a symbolic expression tree).
+    /// Depth-first approach.
+    /// </summary>
+    /// <param name="random">random number generator</param>
+    /// <param name="bounds">only used for PIGEMapper (ignore here)</param>
+    /// <param name="length">only used for PIGEMapper (ignore here)</param>
+    /// <param name="grammar">grammar definition</param>
+    /// <param name="genotype">integer vector, which should be mapped to a tree</param>
+    /// <returns>phenotype (a symbolic expression tree)</returns>
+    public override SymbolicExpressionTree Map(IRandom random, IntMatrix bounds, int length,
+                                               ISymbolicExpressionGrammar grammar,
+                                               IntegerVector genotype) {
+
+      SymbolicExpressionTree tree = new SymbolicExpressionTree();
+      var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
+      if (rootNode.HasLocalParameters) rootNode.ResetLocalParameters(random);
+      var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
+      if (startNode.HasLocalParameters) startNode.ResetLocalParameters(random);
+      rootNode.AddSubtree(startNode);
+      tree.Root = rootNode;
+
+      MapDepthFirstIteratively(startNode, genotype, grammar,
+                               genotype.Length, random);
+      return tree;
+    }
+
+
+    /// <summary>
+    /// Genotype-to-Phenotype mapper (iterative depth-first approach, by using a stack -> LIFO).
+    /// </summary>
+    /// <param name="startNode">first node of the tree with arity 1</param>
+    /// <param name="genotype">integer vector, which should be mapped to a tree</param>
+    /// <param name="grammar">grammar to determine the allowed child symbols for each node</param>
+    /// <param name="maxSubtreeCount">maximum allowed subtrees (= number of used genomes)</param>
+    /// <param name="random">random number generator</param>
+    private void MapDepthFirstIteratively(ISymbolicExpressionTreeNode startNode,
+                                          IntegerVector genotype,
+                                          ISymbolicExpressionGrammar grammar,
+                                          int maxSubtreeCount, IRandom random) {
+
+      Stack<Tuple<ISymbolicExpressionTreeNode, int>> stack
+        = new Stack<Tuple<ISymbolicExpressionTreeNode, int>>(); // tuples of <node, arity>
+
+      int genotypeIndex = 0;
+      stack.Push(new Tuple<ISymbolicExpressionTreeNode, int>(startNode, 1));
+
+      while (stack.Count > 0) {
+
+        // get next node from stack and re-push it, if this node still has unhandled subtrees ...
+        Tuple<ISymbolicExpressionTreeNode, int> current = stack.Pop();
+        if (current.Item2 > 1) {
+          stack.Push(new Tuple<ISymbolicExpressionTreeNode, int>(current.Item1, current.Item2 - 1));
+        }
+
+        if (genotypeIndex >= maxSubtreeCount) {
+          // if all genomes were used, only add terminal nodes to the remaining subtrees
+          current.Item1.AddSubtree(GetRandomTerminalNode(current.Item1, grammar, random));
+        } else {
+          var newNode = GetNewChildNode(current.Item1, genotype, grammar, genotypeIndex, random);
+          int arity = SampleArity(random, newNode, grammar);
+
+          current.Item1.AddSubtree(newNode);
+          genotypeIndex++;
+          if (arity > 0) {
+            // new node has subtrees so push it onto the stack 
+            stack.Push(new Tuple<ISymbolicExpressionTreeNode, int>(newNode, arity));
+          }
+        }
+      }
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/GenotypeToPhenotypeMapper.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/GenotypeToPhenotypeMapper.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/GenotypeToPhenotypeMapper.cs	(revision 11009)
@@ -0,0 +1,131 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.GrammaticalEvolution.Mappers;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  /// <summary>
+  /// Abstract base class for GenotypeToPhenotypeMappers
+  /// </summary>
+  public abstract class GenotypeToPhenotypeMapper : IntegerVectorOperator, IGenotypeToPhenotypeMapper {
+
+    [StorableConstructor]
+    protected GenotypeToPhenotypeMapper(bool deserializing) : base(deserializing) { }
+    protected GenotypeToPhenotypeMapper(GenotypeToPhenotypeMapper original, Cloner cloner) : base(original, cloner) { }
+    protected GenotypeToPhenotypeMapper() : base() { }
+
+    public abstract SymbolicExpressionTree Map(IRandom random, IntMatrix bounds, int length,
+                                               ISymbolicExpressionGrammar grammar,
+                                               IntegerVector genotype);
+
+    /// <summary>
+    /// Randomly returns a terminal node for the given <paramref name="parentNode"/>.
+    /// (A terminal has got a minimum and maximum arity of 0.)
+    /// </summary>
+    /// <param name="parentNode">parent node for which a child node is returned randomly</param>
+    /// <param name="grammar">grammar to determine the allowed child symbols for parentNode</param>
+    /// <param name="random">random number generator</param>
+    /// <returns>randomly chosen terminal node with arity 0 or null, if no terminal node exists</returns>
+    protected ISymbolicExpressionTreeNode GetRandomTerminalNode(ISymbolicExpressionTreeNode parentNode,
+                                                                ISymbolicExpressionGrammar grammar,
+                                                                IRandom random) {
+      // only select specific symbols, which can be interpreted ...
+      var possibleSymbolsList = (from s in grammar.GetAllowedChildSymbols(parentNode.Symbol)
+                                 where s.InitialFrequency > 0.0
+                                 where s.MaximumArity == 0
+                                 where s.MinimumArity == 0
+                                 select s).ToList();
+
+      // no terminal node exists for the given parent node
+      if (!possibleSymbolsList.Any()) return null;
+
+      var newNode = possibleSymbolsList.SelectRandom(random).CreateTreeNode();
+      if (newNode.HasLocalParameters) newNode.ResetLocalParameters(random);
+      return newNode;
+    }
+
+
+    /// <summary>
+    /// Returns a randomly chosen child node for the given <paramref name="parentNode"/>.
+    /// </summary>
+    /// <param name="parentNode">parent node to find a child node randomly for</param>
+    /// <param name="genotype">integer vector, which should be mapped to a tree</param>
+    /// <param name="grammar">grammar used to define the allowed child symbols</param>
+    /// <param name="genotypeIndex">index in the integer vector; can be greater than vector length</param>
+    /// <param name="random">random number generator</param>
+    /// <returns>randomly chosen child node or null, if no child node exits</returns>
+    protected ISymbolicExpressionTreeNode GetNewChildNode(ISymbolicExpressionTreeNode parentNode,
+                                                          IntegerVector genotype,
+                                                          ISymbolicExpressionGrammar grammar,
+                                                          int genotypeIndex,
+                                                          IRandom random) {
+
+      // only select specific symbols, which can be interpreted ...
+      IEnumerable<ISymbol> symbolList = (from s in grammar.GetAllowedChildSymbols(parentNode.Symbol)
+                                         where s.InitialFrequency > 0.0
+                                         select s).ToList();
+
+      int prodRuleCount = symbolList.Count();
+
+      // no child node exists for the given parent node
+      if (prodRuleCount < 1) return null;
+
+      // genotypeIndex % genotype.Length, if wrapping is allowed
+      int prodRuleIndex = genotype[genotypeIndex] % prodRuleCount;
+
+      var newNode = symbolList.ElementAt(prodRuleIndex).CreateTreeNode();
+      if (newNode.HasLocalParameters) newNode.ResetLocalParameters(random);
+      return newNode;
+    }
+
+
+    /// <summary>
+    /// Randomly determines an arity for the given node.
+    /// </summary>
+    /// <param name="random">random number generator</param>
+    /// <param name="node">node, for which a random arity is determined</param>
+    /// <param name="grammar">symbolic expression grammar to use</param>
+    /// <returns>random arity in the interval [minArity, maxArity]</returns>
+    protected int SampleArity(IRandom random,
+                              ISymbolicExpressionTreeNode node,
+                              ISymbolicExpressionGrammar grammar) {
+
+      int minArity = grammar.GetMinimumSubtreeCount(node.Symbol);
+      int maxArity = grammar.GetMaximumSubtreeCount(node.Symbol);
+
+      if (minArity == maxArity) {
+        return minArity;
+      }
+
+      return random.Next(minArity, maxArity);
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/IGenotypeToPhenotypeMapper.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/IGenotypeToPhenotypeMapper.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/IGenotypeToPhenotypeMapper.cs	(revision 11009)
@@ -0,0 +1,38 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution.Mappers {
+  /// <summary>
+  /// IGenotypeToPhenotypeMapper
+  /// </summary>
+  public interface IGenotypeToPhenotypeMapper : IIntegerVectorOperator {
+    SymbolicExpressionTree Map(IRandom random, IntMatrix bounds, int length,
+                               ISymbolicExpressionGrammar grammar,
+                               IntegerVector genotype);
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/PIGEMapper.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/PIGEMapper.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/PIGEMapper.cs	(revision 11009)
@@ -0,0 +1,176 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+#endregion
+
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+
+  /// <summary>
+  /// Position Independent (PI) Grammatical Evolution Mapper
+  /// -----------------------------------------------------------------------------------
+  /// Standard GE mappers:
+  ///   Rule = Codon Value % Number Of Rules
+  ///   
+  /// 𝜋GE:
+  ///   𝜋GE codons consist of (nont, rule) tuples, where nont may be one value from an "order"
+  ///   integer vector and rule may be one value from a "content" integer vector.
+  ///   
+  ///   Order:   NT   = nont % Num. NT      ... determines, which non-terminal to expand next
+  ///   Content: Rule = rule % Num. Rules   ... rule determination as with standard GE mappers
+  /// 
+  /// Four mutation and crossover strategies possible:
+  ///  * Order-only:    only "order" vector is modified, "content" vector is fixed (1:0),
+  ///                   worst result according to [2]
+  ///  * Content-only:  only "content" vector is modified, "order" vector is fixed (0:1),
+  ///                   best result according to [2]
+  ///  * 𝜋GE:           genetic operators are applied equally (1:1), 
+  ///  * Content:Order: genetic operators are applied unequally (e.g. 2:1 or 1:2),
+  /// 
+  /// Here, the "content-only" strategy is implemented, as it is the best solution according to [2]
+  /// and it does not require much to change in the problem and evaluator classes.
+  /// 
+  /// </summary>
+  /// <remarks>
+  /// Described in
+  /// 
+  /// [1] Michael O’Neill et al. 𝜋Grammatical Evolution. In: GECCO 2004.
+  /// Vol. 3103. LNCS. Heidelberg: Springer-Verlag Berlin, 2004, pp. 617–629.
+  /// url: http://dynamics.org/Altenberg/UH_ICS/EC_REFS/GP_REFS/GECCO/2004/31030617.pdf.
+  /// 
+  /// [2] David Fagan et al. Investigating Mapping Order in πGE. IEEE, 2010
+  /// url: http://ncra.ucd.ie/papers/pigeWCCI2010.pdf
+  /// </remarks>
+  [Item("PIGEMapper", "Position Independent (PI) Grammatical Evolution Mapper")]
+  [StorableClass]
+  public class PIGEMapper : GenotypeToPhenotypeMapper {
+
+    private object nontVectorLocker = new object();
+    private IntegerVector nontVector;
+
+    public IntegerVector NontVector {
+      get { return nontVector; }
+      set { nontVector = value; }
+    }
+
+    private static IntegerVector GetNontVector(IRandom random, IntMatrix bounds, int length) {
+      IntegerVector v = new IntegerVector(length);
+      v.Randomize(random, bounds);
+      return v;
+    }
+
+    [StorableConstructor]
+    protected PIGEMapper(bool deserializing) : base(deserializing) { }
+    protected PIGEMapper(PIGEMapper original, Cloner cloner) : base(original, cloner) { }
+    public PIGEMapper() : base() { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PIGEMapper(this, cloner);
+    }
+
+
+    /// <summary>
+    /// Maps a genotype (an integer vector) to a phenotype (a symbolic expression tree).
+    /// PIGE approach.
+    /// </summary>
+    /// <param name="random">random number generator</param>
+    /// <param name="bounds">integer number range for genomes (codons) of the nont vector</param>
+    /// <param name="length">length of the nont vector to create</param>
+    /// <param name="grammar">grammar definition</param>
+    /// <param name="genotype">integer vector, which should be mapped to a tree</param>
+    /// <returns>phenotype (a symbolic expression tree)</returns>
+    public override SymbolicExpressionTree Map(IRandom random, IntMatrix bounds, int length,
+                                               ISymbolicExpressionGrammar grammar,
+                                               IntegerVector genotype) {
+
+      SymbolicExpressionTree tree = new SymbolicExpressionTree();
+      var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
+      var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
+      rootNode.AddSubtree(startNode);
+      tree.Root = rootNode;
+
+      // Map can be called simultaniously on multiple threads
+      lock (nontVectorLocker) {
+        if (NontVector == null) {
+          NontVector = GetNontVector(random, bounds, length);
+        }
+      }
+
+      MapPIGEIteratively(startNode, genotype, grammar,
+                         genotype.Length, random);
+
+      return tree;
+    }
+
+
+    /// <summary>
+    /// Genotype-to-Phenotype mapper (iterative 𝜋GE approach, using a list of not expanded nonTerminals).
+    /// </summary>
+    /// <param name="startNode">first node of the tree with arity 1</param>
+    /// <param name="genotype">integer vector, which should be mapped to a tree</param>
+    /// <param name="grammar">grammar to determine the allowed child symbols for each node</param>
+    /// <param name="maxSubtreeCount">maximum allowed subtrees (= number of used genomes)</param>
+    /// <param name="random">random number generator</param>
+    private void MapPIGEIteratively(ISymbolicExpressionTreeNode startNode,
+                                    IntegerVector genotype,
+                                    ISymbolicExpressionGrammar grammar,
+                                    int maxSubtreeCount, IRandom random) {
+
+      List<ISymbolicExpressionTreeNode> nonTerminals = new List<ISymbolicExpressionTreeNode>();
+
+      int genotypeIndex = 0;
+      nonTerminals.Add(startNode);
+
+      while (nonTerminals.Count > 0) {
+
+        if (genotypeIndex >= maxSubtreeCount) {
+          // if all genomes were used, only add terminal nodes to the remaining subtrees
+          ISymbolicExpressionTreeNode current = nonTerminals[0];
+          nonTerminals.RemoveAt(0);
+          current.AddSubtree(GetRandomTerminalNode(current, grammar, random));
+        } else {
+          // Order:   NT   = nont % Num. NT
+          int nt = NontVector[genotypeIndex] % nonTerminals.Count;
+          ISymbolicExpressionTreeNode current = nonTerminals[nt];
+          nonTerminals.RemoveAt(nt);
+
+          // Content: Rule = rule % Num. Rules
+          ISymbolicExpressionTreeNode newNode = GetNewChildNode(current, genotype, grammar, genotypeIndex, random);
+          int arity = SampleArity(random, newNode, grammar);
+
+          current.AddSubtree(newNode);
+          genotypeIndex++;
+          // new node has subtrees, so add "arity" number of copies of this node to the nonTerminals list
+          for (int i = 0; i < arity; ++i) {
+            nonTerminals.Add(newNode);
+          }
+        }
+      }
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/RandomMapper.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/RandomMapper.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Mappers/RandomMapper.cs	(revision 11009)
@@ -0,0 +1,120 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+#endregion
+
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  /// <summary>
+  /// RandomMapper
+  /// </summary>
+  [Item("RandomMapper", "Randomly determines the next non-terminal symbol to expand.")]
+  [StorableClass]
+  public class RandomMapper : GenotypeToPhenotypeMapper {
+
+    [StorableConstructor]
+    protected RandomMapper(bool deserializing) : base(deserializing) { }
+    protected RandomMapper(RandomMapper original, Cloner cloner) : base(original, cloner) { }
+    public RandomMapper() : base() { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RandomMapper(this, cloner);
+    }
+
+
+    /// <summary>
+    /// Maps a genotype (an integer vector) to a phenotype (a symbolic expression tree).
+    /// Random approach.
+    /// </summary>
+    /// <param name="random">random number generator</param>
+    /// <param name="bounds">only used for PIGEMapper (ignore here)</param>
+    /// <param name="length">only used for PIGEMapper (ignore here)</param>
+    /// <param name="grammar">grammar definition</param>
+    /// <param name="genotype">integer vector, which should be mapped to a tree</param>
+    /// <returns>phenotype (a symbolic expression tree)</returns>
+    public override SymbolicExpressionTree Map(IRandom random, IntMatrix bounds, int length,
+                                               ISymbolicExpressionGrammar grammar,
+                                               IntegerVector genotype) {
+
+      SymbolicExpressionTree tree = new SymbolicExpressionTree();
+      var rootNode = (SymbolicExpressionTreeTopLevelNode)grammar.ProgramRootSymbol.CreateTreeNode();
+      var startNode = (SymbolicExpressionTreeTopLevelNode)grammar.StartSymbol.CreateTreeNode();
+      rootNode.AddSubtree(startNode);
+      tree.Root = rootNode;
+
+      MapRandomIteratively(startNode, genotype, grammar,
+                           genotype.Length, random);
+
+      return tree;
+    }
+
+
+    /// <summary>
+    /// Genotype-to-Phenotype mapper (iterative random approach, where the next non-terminal
+    /// symbol to expand is randomly determined).
+    /// </summary>
+    /// <param name="startNode">first node of the tree with arity 1</param>
+    /// <param name="genotype">integer vector, which should be mapped to a tree</param>
+    /// <param name="grammar">grammar to determine the allowed child symbols for each node</param>
+    /// <param name="maxSubtreeCount">maximum allowed subtrees (= number of used genomes)</param>
+    /// <param name="random">random number generator</param>
+    private void MapRandomIteratively(ISymbolicExpressionTreeNode startNode,
+                                     IntegerVector genotype,
+                                     ISymbolicExpressionGrammar grammar,
+                                     int maxSubtreeCount, IRandom random) {
+
+      List<ISymbolicExpressionTreeNode> nonTerminals = new List<ISymbolicExpressionTreeNode>();
+
+      int genotypeIndex = 0;
+      nonTerminals.Add(startNode);
+
+      while (nonTerminals.Count > 0) {
+        if (genotypeIndex >= maxSubtreeCount) {
+          // if all genomes were used, only add terminal nodes to the remaining subtrees
+          ISymbolicExpressionTreeNode current = nonTerminals[0];
+          nonTerminals.RemoveAt(0);
+          current.AddSubtree(GetRandomTerminalNode(current, grammar, random));
+        } else {
+          // similar to PIGEMapper, but here the current node is determined randomly ...
+          ISymbolicExpressionTreeNode current = nonTerminals.SelectRandom(random);
+          nonTerminals.Remove(current);
+
+          ISymbolicExpressionTreeNode newNode = GetNewChildNode(current, genotype, grammar, genotypeIndex, random);
+          int arity = SampleArity(random, newNode, grammar);
+
+          current.AddSubtree(newNode);
+          genotypeIndex++;
+          // new node has subtrees, so add "arity" number of copies of this node to the nonTerminals list
+          for (int i = 0; i < arity; ++i) {
+            nonTerminals.Add(newNode);
+          }
+        }
+      }
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Plugin.cs.frame
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Plugin.cs.frame	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Plugin.cs.frame	(revision 11009)
@@ -0,0 +1,49 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+
+#endregion
+
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  [Plugin("HeuristicLab.Problems.GrammaticalEvolution","Provides classes for grammatical evolution.", "3.3.0.$WCREV$")]
+  [PluginFile("HeuristicLab.Problems.GrammaticalEvolution-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.IntegerVectorEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.ArtificialAnt", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic.Regression", "3.4")]
+  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
+  [PluginDependency("HeuristicLab.Random", "3.3")]
+  public class HeuristicLabProblemsGrammaticalEvolutionPlugin : PluginBase {
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Properties/AssemblyInfo.cs.frame	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Properties/AssemblyInfo.cs.frame	(revision 11009)
@@ -0,0 +1,56 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ *
+ * Author: Sabine Winkler
+ */
+#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.Problems.GrammaticalEvolution")]
+[assembly: AssemblyDescription("Provides classes for Grammatical Evolution (GE).")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) Sabine Winkler")]
+[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("B3B18403-394F-423D-ADD0-C65EF47D42E2")]
+// 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 Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.0.$WCREV$")]
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicDataAnalysisEvaluator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicDataAnalysisEvaluator.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicDataAnalysisEvaluator.cs	(revision 11009)
@@ -0,0 +1,133 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.GrammaticalEvolution.Mappers;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  [StorableClass]
+  public abstract class GESymbolicDataAnalysisEvaluator<T> : SingleSuccessorOperator,
+    IGESymbolicDataAnalysisEvaluator<T>, ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator, IStochasticOperator
+  where T : class, IDataAnalysisProblemData {
+    private const string RandomParameterName = "Random";
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string IntegerVectorParameterName = "IntegerVector";
+    private const string GenotypeToPhenotypeMapperParameterName = "GenotypeToPhenotypeMapper";
+    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
+
+    private const string EstimationLimitsParameterName = "EstimationLimits";
+    private const string EvaluationPartitionParameterName = "EvaluationPartition";
+    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
+    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
+    private const string ValidRowIndicatorParameterName = "ValidRowIndicator";
+
+    public override bool CanChangeName { get { return false; } }
+
+    #region parameter properties
+    ILookupParameter<IRandom> IStochasticOperator.RandomParameter {
+      get { return RandomParameter; }
+    }
+
+    public IValueLookupParameter<IRandom> RandomParameter {
+      get { return (IValueLookupParameter<IRandom>)Parameters[RandomParameterName]; }
+    }
+    public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
+    }
+    public IValueLookupParameter<T> ProblemDataParameter {
+      get { return (IValueLookupParameter<T>)Parameters[ProblemDataParameterName]; }
+    }
+    public ILookupParameter<IntegerVector> IntegerVectorParameter {
+      get { return (ILookupParameter<IntegerVector>)Parameters[IntegerVectorParameterName]; }
+    }
+    public ILookupParameter<IGenotypeToPhenotypeMapper> GenotypeToPhenotypeMapperParameter {
+      get { return (ILookupParameter<IGenotypeToPhenotypeMapper>)Parameters[GenotypeToPhenotypeMapperParameterName]; }
+    }
+    public IValueLookupParameter<ISymbolicDataAnalysisGrammar> SymbolicExpressionTreeGrammarParameter {
+      get { return (IValueLookupParameter<ISymbolicDataAnalysisGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
+    }
+
+    public IValueLookupParameter<IntRange> EvaluationPartitionParameter {
+      get { return (IValueLookupParameter<IntRange>)Parameters[EvaluationPartitionParameterName]; }
+    }
+    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
+      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
+    }
+    public IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
+      get { return (IValueLookupParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
+    }
+    public ILookupParameter<BoolValue> ApplyLinearScalingParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
+    }
+    public IValueLookupParameter<StringValue> ValidRowIndicatorParameter {
+      get { return (IValueLookupParameter<StringValue>)Parameters[ValidRowIndicatorParameterName]; }
+    }
+    #endregion
+
+
+    [StorableConstructor]
+    protected GESymbolicDataAnalysisEvaluator(bool deserializing) : base(deserializing) { }
+    protected GESymbolicDataAnalysisEvaluator(GESymbolicDataAnalysisEvaluator<T> original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public GESymbolicDataAnalysisEvaluator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IRandom>(RandomParameterName, "The random generator to use."));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic data analysis tree."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic data analysis solution encoded as a symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<T>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new LookupParameter<IntegerVector>(IntegerVectorParameterName, "The symbolic data analysis solution encoded as an integer vector genome."));
+      Parameters.Add(new LookupParameter<IGenotypeToPhenotypeMapper>(GenotypeToPhenotypeMapperParameterName, "Maps the genotype (an integer vector) to the phenotype (a symbolic expression tree)."));
+      Parameters.Add(new ValueLookupParameter<ISymbolicDataAnalysisGrammar>(SymbolicExpressionTreeGrammarParameterName, "The tree grammar that defines the correct syntax of symbolic expression trees that should be created."));
+
+      Parameters.Add(new ValueLookupParameter<IntRange>(EvaluationPartitionParameterName, "The start index of the dataset partition on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The upper and lower limit that should be used as cut off value for the output values of symbolic data analysis trees."));
+      Parameters.Add(new ValueLookupParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index."));
+      Parameters.Add(new LookupParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the individual should be linearly scaled before evaluating."));
+      Parameters.Add(new ValueLookupParameter<StringValue>(ValidRowIndicatorParameterName, "An indicator variable in the data set that specifies which rows should be evaluated (those for which the indicator <> 0) (optional)."));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicDataAnalysisProblem.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicDataAnalysisProblem.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicDataAnalysisProblem.cs	(revision 11009)
@@ -0,0 +1,319 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+
+#endregion
+
+using System;
+using System.Drawing;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Common.Resources;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.GrammaticalEvolution.Mappers;
+using HeuristicLab.Problems.Instances;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  [StorableClass]
+  public abstract class GESymbolicDataAnalysisProblem<T, U, V> : HeuristicOptimizationProblem<U, V>, IDataAnalysisProblem<T>,
+                                                                 IGESymbolicDataAnalysisProblem, IStorableContent,
+                                                                 IProblemInstanceConsumer<T>, IProblemInstanceExporter<T>
+    where T : class, IDataAnalysisProblemData
+    where U : class, IGESymbolicDataAnalysisEvaluator<T>
+    where V : class, IIntegerVectorCreator {
+
+    #region parameter names & descriptions
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
+    private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
+    private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition";
+    private const string ValidationPartitionParameterName = "ValidationPartition";
+    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
+    private const string BoundsParameterName = "Bounds";
+    private const string GenotypeToPhenotypeMapperParameterName = "GenotypeToPhenotypeMapper";
+    private const string ProblemDataParameterDescription = "";
+    private const string SymbolicExpressionTreeGrammarParameterDescription = "The grammar that should be used for symbolic expression tree.";
+    private const string SymbolicExpressionTreeInterpreterParameterDescription = "The interpreter that should be used to evaluate the symbolic expression tree.";
+    private const string MaximumSymbolicExpressionTreeLengthParameterDescription = "Maximal length of the symbolic expression.";
+    private const string RelativeNumberOfEvaluatedSamplesParameterDescription = "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation.";
+    private const string FitnessCalculationPartitionParameterDescription = "The partition of the problem data training partition, that should be used to calculate the fitness of an individual.";
+    private const string ValidationPartitionParameterDescription = "The partition of the problem data training partition, that should be used to select the best model from (optional).";
+    private const string ApplyLinearScalingParameterDescription = "Flag that indicates if the individual should be linearly scaled before evaluating.";
+    private const string BoundsParameterDescription = "The integer number range in which the single genomes of a genotype are created.";
+    private const string GenotypeToPhenotypeMapperParameterDescription = "Maps the genotype (an integer vector) to the phenotype (a symbolic expression tree).";
+    #endregion
+
+    #region parameter properties
+    IParameter IDataAnalysisProblem.ProblemDataParameter {
+      get { return ProblemDataParameter; }
+    }
+    public IValueParameter<T> ProblemDataParameter {
+      get { return (IValueParameter<T>)Parameters[ProblemDataParameterName]; }
+    }
+    public IValueParameter<ISymbolicDataAnalysisGrammar> SymbolicExpressionTreeGrammarParameter {
+      get { return (IValueParameter<ISymbolicDataAnalysisGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
+    }
+    public IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
+      get { return (IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IFixedValueParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
+      get { return (IFixedValueParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
+    }
+    public IFixedValueParameter<IntRange> FitnessCalculationPartitionParameter {
+      get { return (IFixedValueParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; }
+    }
+    public IFixedValueParameter<IntRange> ValidationPartitionParameter {
+      get { return (IFixedValueParameter<IntRange>)Parameters[ValidationPartitionParameterName]; }
+    }
+    public IFixedValueParameter<BoolValue> ApplyLinearScalingParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
+    }
+    public IValueParameter<IntMatrix> BoundsParameter {
+      get { return (IValueParameter<IntMatrix>)Parameters[BoundsParameterName]; }
+    }
+    public IValueParameter<IGenotypeToPhenotypeMapper> GenotypeToPhenotypeMapperParameter {
+      get { return (IValueParameter<IGenotypeToPhenotypeMapper>)Parameters[GenotypeToPhenotypeMapperParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public string Filename { get; set; }
+    public static new Image StaticItemImage { get { return VSImageLibrary.Type; } }
+
+    IDataAnalysisProblemData IDataAnalysisProblem.ProblemData {
+      get { return ProblemData; }
+    }
+    public T ProblemData {
+      get { return ProblemDataParameter.Value; }
+      set { ProblemDataParameter.Value = value; }
+    }
+
+    public ISymbolicDataAnalysisGrammar SymbolicExpressionTreeGrammar {
+      get { return SymbolicExpressionTreeGrammarParameter.Value; }
+      set { SymbolicExpressionTreeGrammarParameter.Value = value; }
+    }
+    public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicExpressionTreeInterpreter {
+      get { return SymbolicExpressionTreeInterpreterParameter.Value; }
+      set { SymbolicExpressionTreeInterpreterParameter.Value = value; }
+    }
+
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.Value; }
+    }
+
+    public PercentValue RelativeNumberOfEvaluatedSamples {
+      get { return RelativeNumberOfEvaluatedSamplesParameter.Value; }
+    }
+
+    public IntRange FitnessCalculationPartition {
+      get { return FitnessCalculationPartitionParameter.Value; }
+    }
+    public IntRange ValidationPartition {
+      get { return ValidationPartitionParameter.Value; }
+    }
+    public BoolValue ApplyLinearScaling {
+      get { return ApplyLinearScalingParameter.Value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected GESymbolicDataAnalysisProblem(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
+    protected GESymbolicDataAnalysisProblem(GESymbolicDataAnalysisProblem<T, U, V> original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEventHandlers();
+    }
+
+    protected GESymbolicDataAnalysisProblem(T problemData, U evaluator, V solutionCreator)
+      : base(evaluator, solutionCreator) {
+      Parameters.Add(new ValueParameter<T>(ProblemDataParameterName, ProblemDataParameterDescription, problemData));
+      Parameters.Add(new ValueParameter<ISymbolicDataAnalysisGrammar>(SymbolicExpressionTreeGrammarParameterName, SymbolicExpressionTreeGrammarParameterDescription));
+      Parameters.Add(new ValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, SymbolicExpressionTreeInterpreterParameterDescription));
+      Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, MaximumSymbolicExpressionTreeLengthParameterDescription));
+      Parameters.Add(new FixedValueParameter<IntRange>(FitnessCalculationPartitionParameterName, FitnessCalculationPartitionParameterDescription));
+      Parameters.Add(new FixedValueParameter<IntRange>(ValidationPartitionParameterName, ValidationPartitionParameterDescription));
+      Parameters.Add(new FixedValueParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, RelativeNumberOfEvaluatedSamplesParameterDescription, new PercentValue(1)));
+      Parameters.Add(new FixedValueParameter<BoolValue>(ApplyLinearScalingParameterName, ApplyLinearScalingParameterDescription, new BoolValue(false)));
+      IntMatrix m = new IntMatrix(new int[,] { { 0, 100 } });
+      Parameters.Add(new ValueParameter<IntMatrix>(BoundsParameterName, BoundsParameterDescription, m));
+      Parameters.Add(new ValueParameter<IGenotypeToPhenotypeMapper>(GenotypeToPhenotypeMapperParameterName, GenotypeToPhenotypeMapperParameterDescription, new DepthFirstMapper()));
+
+      SymbolicExpressionTreeInterpreterParameter.Hidden = true;
+      ApplyLinearScalingParameter.Hidden = true;
+
+      SymbolicExpressionTreeGrammar = new GESymbolicExpressionGrammar(problemData.AllowedInputVariables, problemData.AllowedInputVariables.Count() * 3);
+      SymbolicExpressionTreeInterpreter = new SymbolicDataAnalysisExpressionTreeLinearInterpreter();
+
+      FitnessCalculationPartition.Start = ProblemData.TrainingPartition.Start;
+      FitnessCalculationPartition.End = ProblemData.TrainingPartition.End;
+
+      InitializeOperators();
+
+      UpdateGrammar();
+      RegisterEventHandlers();
+    }
+
+    private void DeregisterGrammarHandler() {
+      SymbolicExpressionTreeGrammarParameter.ValueChanged -= SymbolicExpressionTreeGrammarParameter_ValueChanged;
+    }
+    private void RegisterGrammarHandler() {
+      SymbolicExpressionTreeGrammarParameter.ValueChanged += SymbolicExpressionTreeGrammarParameter_ValueChanged;
+    }
+
+    private void UpdateGrammar() {
+      DeregisterGrammarHandler();
+      // create a new grammar instance with the correct allowed input variables
+      SymbolicExpressionTreeGrammarParameter.Value =
+        new GESymbolicExpressionGrammar(ProblemData.AllowedInputVariables, ProblemData.AllowedInputVariables.Count() * 3);
+      RegisterGrammarHandler();
+    }
+
+    private void InitializeOperators() {
+      Operators.AddRange(ApplicationManager.Manager.GetInstances<IIntegerVectorOperator>());
+      Operators.Add(new SymbolicExpressionSymbolFrequencyAnalyzer());
+      Operators.Add(new SymbolicDataAnalysisVariableFrequencyAnalyzer());
+      Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer());
+      Operators.Add(new SymbolicExpressionTreeLengthAnalyzer());
+      ParameterizeOperators();
+    }
+
+    #region events
+    private void RegisterEventHandlers() {
+      ProblemDataParameter.ValueChanged += new EventHandler(ProblemDataParameter_ValueChanged);
+      ProblemDataParameter.Value.Changed += (object sender, EventArgs e) => OnProblemDataChanged();
+
+      RegisterGrammarHandler();
+    }
+
+    private void ProblemDataParameter_ValueChanged(object sender, EventArgs e) {
+      ValidationPartition.Start = 0;
+      ValidationPartition.End = 0;
+      ProblemDataParameter.Value.Changed += (object s, EventArgs args) => OnProblemDataChanged();
+      OnProblemDataChanged();
+    }
+
+    private void SymbolicExpressionTreeGrammarParameter_ValueChanged(object sender, EventArgs e) {
+      UpdateGrammar();
+    }
+
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      Evaluator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(Evaluator_SymbolicExpressionTreeParameter_ActualNameChanged);
+      ParameterizeOperators();
+    }
+
+    private void Evaluator_SymbolicExpressionTreeParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeOperators();
+    }
+
+    public event EventHandler ProblemDataChanged;
+    protected virtual void OnProblemDataChanged() {
+      FitnessCalculationPartition.Start = ProblemData.TrainingPartition.Start;
+      FitnessCalculationPartition.End = ProblemData.TrainingPartition.End;
+
+      UpdateGrammar();
+      ParameterizeOperators();
+
+      var handler = ProblemDataChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+
+      OnReset();
+    }
+    #endregion
+
+    protected virtual void ParameterizeOperators() {
+      var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators).ToList();
+
+      foreach (var op in operators.OfType<ISymbolicExpressionTreeGrammarBasedOperator>()) {
+        op.SymbolicExpressionTreeGrammarParameter.ActualName = SymbolicExpressionTreeGrammarParameter.Name;
+      }
+      foreach (var op in operators.OfType<IGESymbolicDataAnalysisEvaluator<T>>()) {
+        op.ProblemDataParameter.ActualName = ProblemDataParameterName;
+        op.SymbolicExpressionTreeParameter.ActualName = Evaluator.SymbolicExpressionTreeParameter.ActualName;
+        op.EvaluationPartitionParameter.ActualName = FitnessCalculationPartitionParameter.Name;
+        op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
+        op.ApplyLinearScalingParameter.ActualName = ApplyLinearScalingParameter.Name;
+        op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.Name;
+        op.GenotypeToPhenotypeMapperParameter.ActualName = GenotypeToPhenotypeMapperParameter.Name;
+        op.SymbolicExpressionTreeGrammarParameter.ActualName = SymbolicExpressionTreeGrammarParameter.Name;
+      }
+      foreach (var op in operators.OfType<IIntegerVectorCrossover>()) {
+        op.ParentsParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+        op.ChildParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+      }
+      foreach (var op in operators.OfType<IIntegerVectorManipulator>()) {
+        op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+      }
+      foreach (var op in operators.OfType<IIntegerVectorCreator>()) {
+        op.BoundsParameter.ActualName = BoundsParameter.Name;
+        op.LengthParameter.ActualName = MaximumSymbolicExpressionTreeLengthParameter.Name;
+      }
+      foreach (var op in operators.OfType<ISymbolicExpressionTreeAnalyzer>()) {
+        op.SymbolicExpressionTreeParameter.ActualName = Evaluator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (var op in operators.OfType<ISymbolicDataAnalysisSingleObjectiveAnalyzer>()) {
+        op.ApplyLinearScalingParameter.ActualName = ApplyLinearScalingParameter.Name;
+      }
+      foreach (var op in operators.OfType<ISymbolicDataAnalysisMultiObjectiveAnalyzer>()) {
+        op.ApplyLinearScalingParameter.ActualName = ApplyLinearScalingParameter.Name;
+      }
+      foreach (var op in operators.OfType<ISymbolicDataAnalysisAnalyzer>()) {
+        op.SymbolicExpressionTreeParameter.ActualName = Evaluator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (var op in operators.OfType<IGESymbolicDataAnalysisValidationAnalyzer<U, T>>()) {
+        op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
+        op.ValidationPartitionParameter.ActualName = ValidationPartitionParameter.Name;
+      }
+      foreach (var op in operators.OfType<ISymbolicDataAnalysisInterpreterOperator>()) {
+        op.SymbolicDataAnalysisTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
+      }
+    }
+
+    #region Import & Export
+    public virtual void Load(T data) {
+      Name = data.Name;
+      Description = data.Description;
+      ProblemData = data;
+    }
+
+    public virtual T Export() {
+      return ProblemData;
+    }
+    #endregion
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicDataAnalysisSingleObjectiveEvaluator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicDataAnalysisSingleObjectiveEvaluator.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicDataAnalysisSingleObjectiveEvaluator.cs	(revision 11009)
@@ -0,0 +1,56 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  [StorableClass]
+  public abstract class GESymbolicDataAnalysisSingleObjectiveEvaluator<T> : GESymbolicDataAnalysisEvaluator<T>, IGESymbolicDataAnalysisSingleObjectiveEvaluator<T>
+   where T : class, IDataAnalysisProblemData {
+    private const string QualityParameterName = "Quality";
+    #region parameter properties
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+    #endregion
+    #region properties
+    public abstract bool Maximization { get; }
+    #endregion
+    [StorableConstructor]
+    protected GESymbolicDataAnalysisSingleObjectiveEvaluator(bool deserializing) : base(deserializing) { }
+    protected GESymbolicDataAnalysisSingleObjectiveEvaluator(GESymbolicDataAnalysisSingleObjectiveEvaluator<T> original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    protected GESymbolicDataAnalysisSingleObjectiveEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>(QualityParameterName, "The quality of the evaluated symbolic data analysis solution."));
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicDataAnalysisSingleObjectiveProblem.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicDataAnalysisSingleObjectiveProblem.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicDataAnalysisSingleObjectiveProblem.cs	(revision 11009)
@@ -0,0 +1,125 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+#endregion
+
+using System;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  [StorableClass]
+  public abstract class GESymbolicDataAnalysisSingleObjectiveProblem<T, U, V> : GESymbolicDataAnalysisProblem<T, U, V>,
+                                                                                IGESymbolicDataAnalysisSingleObjectiveProblem
+    where T : class, IDataAnalysisProblemData
+    where U : class, IGESymbolicDataAnalysisSingleObjectiveEvaluator<T>
+    where V : class, IIntegerVectorCreator {
+    private const string MaximizationParameterName = "Maximization";
+    private const string BestKnownQualityParameterName = "BestKnownQuality";
+
+    #region parameter properties
+    public IFixedValueParameter<BoolValue> MaximizationParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters[MaximizationParameterName]; }
+    }
+    IParameter ISingleObjectiveHeuristicOptimizationProblem.MaximizationParameter {
+      get { return MaximizationParameter; }
+    }
+    public IFixedValueParameter<DoubleValue> BestKnownQualityParameter {
+      get { return (IFixedValueParameter<DoubleValue>)Parameters[BestKnownQualityParameterName]; }
+    }
+    IParameter ISingleObjectiveHeuristicOptimizationProblem.BestKnownQualityParameter {
+      get { return BestKnownQualityParameter; }
+    }
+    #endregion
+
+    #region properties
+    public BoolValue Maximization {
+      get { return MaximizationParameter.Value; }
+    }
+    public DoubleValue BestKnownQuality {
+      get { return BestKnownQualityParameter.Value; }
+    }
+    ISingleObjectiveEvaluator ISingleObjectiveHeuristicOptimizationProblem.Evaluator {
+      get { return Evaluator; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    protected GESymbolicDataAnalysisSingleObjectiveProblem(bool deserializing) : base(deserializing) { }
+    protected GESymbolicDataAnalysisSingleObjectiveProblem(GESymbolicDataAnalysisSingleObjectiveProblem<T, U, V> original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEventHandler();
+      MaximizationParameter.Hidden = true;
+    }
+
+    public GESymbolicDataAnalysisSingleObjectiveProblem(T problemData, U evaluator, V solutionCreator)
+      : base(problemData, evaluator, solutionCreator) {
+      Parameters.Add(new FixedValueParameter<BoolValue>(MaximizationParameterName, "Set to false if the problem should be minimized."));
+      Parameters.Add(new FixedValueParameter<DoubleValue>(BestKnownQualityParameterName, "The quality of the best known solution of this problem."));
+
+      MaximizationParameter.Hidden = true;
+      InitializeOperators();
+      RegisterEventHandler();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandler();
+    }
+
+    private void InitializeOperators() {
+      Operators.Add(new SymbolicDataAnalysisAlleleFrequencyAnalyzer());
+      ParameterizeOperators();
+    }
+
+    private void RegisterEventHandler() {
+      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(QualityParameter_ActualNameChanged);
+    }
+
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(QualityParameter_ActualNameChanged);
+      Maximization.Value = base.Evaluator.Maximization;
+      ParameterizeOperators();
+    }
+
+    private void QualityParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeOperators();
+    }
+
+    protected override void ParameterizeOperators() {
+      base.ParameterizeOperators();
+
+      foreach (var op in Operators.OfType<ISymbolicDataAnalysisSingleObjectiveAnalyzer>()) {
+        op.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+        op.MaximizationParameter.ActualName = MaximizationParameterName;
+      }
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicExpressionGrammar.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicExpressionGrammar.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicExpressionGrammar.cs	(revision 11009)
@@ -0,0 +1,154 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  [StorableClass]
+  [Item("GESymbolicExpressionGrammar", "Represents a grammar for functional expressions for grammatical evolution.")]
+  public class GESymbolicExpressionGrammar : SymbolicExpressionGrammar, ISymbolicDataAnalysisGrammar {
+    [StorableConstructor]
+    protected GESymbolicExpressionGrammar(bool deserializing) : base(deserializing) { }
+    protected GESymbolicExpressionGrammar(GESymbolicExpressionGrammar original, Cloner cloner) : base(original, cloner) { }
+    public GESymbolicExpressionGrammar()
+      : base(ItemAttribute.GetName(typeof(GESymbolicExpressionGrammar)), ItemAttribute.GetDescription(typeof(GESymbolicExpressionGrammar))) {
+      // empty ctor is necessary to allow creation of new GEGrammars from the GUI.
+      // the problem creates a new correctly configured grammar when the grammar is set
+    }
+    internal GESymbolicExpressionGrammar(IEnumerable<string> variableNames, int nConstants)
+      : base(ItemAttribute.GetName(typeof(GESymbolicExpressionGrammar)), ItemAttribute.GetDescription(typeof(GESymbolicExpressionGrammar))) {
+      // this ctor is called by the problem as only the problem knows the allowed input variables
+      Initialize(variableNames, nConstants);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GESymbolicExpressionGrammar(this, cloner);
+    }
+
+    private void Initialize(IEnumerable<string> variableNames, int nConstants) {
+      #region symbol declaration
+      var add = new Addition();
+      var sub = new Subtraction();
+      var mul = new Multiplication();
+      var div = new Division();
+      var mean = new Average();
+      var log = new Logarithm();
+      var pow = new Power();
+      var square = new Square();
+      var root = new Root();
+      var sqrt = new SquareRoot();
+      var exp = new Exponential();
+
+      // we use our own random number generator here because we assume 
+      // that grammars are only initialized once when setting the grammar in the problem.
+      // This means everytime the grammar parameter in the problem is changed
+      // we initialize the constants to new values
+      var rand = new MersenneTwister();
+      // warm up
+      for (int i = 0; i < 1000; i++) rand.NextDouble();
+
+      var constants = new List<Constant>(nConstants);
+      for (int i = 0; i < nConstants; i++) {
+        var constant = new Constant();
+        do {
+          var constVal = rand.NextDouble() * 20.0 - 10.0;
+          constant.Name = string.Format("{0:0.000}", constVal);
+          constant.MinValue = constVal;
+          constant.MaxValue = constVal;
+          constant.ManipulatorSigma = 0.0;
+          constant.ManipulatorMu = 0.0;
+          constant.MultiplicativeManipulatorSigma = 0.0;
+        } while (constants.Any(c => c.Name == constant.Name)); // unlikely, but it could happen that the same constant value is sampled twice. so we resample if necessary.
+        constants.Add(constant);
+      }
+
+      var variables = new List<HeuristicLab.Problems.DataAnalysis.Symbolic.Variable>();
+      foreach (var variableName in variableNames) {
+        var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable();
+        variableSymbol.Name = variableName;
+        variableSymbol.WeightManipulatorMu = 0.0;
+        variableSymbol.WeightManipulatorSigma = 0.0;
+        variableSymbol.WeightMu = 1.0;
+        variableSymbol.WeightSigma = 0.0;
+        variableSymbol.MultiplicativeWeightManipulatorSigma = 0.0;
+        variableSymbol.AllVariableNames = new[] { variableName };
+        variableSymbol.VariableNames = new[] { variableName };
+        variables.Add(variableSymbol);
+      }
+
+      #endregion
+
+      AddSymbol(add);
+      AddSymbol(sub);
+      AddSymbol(mul);
+      AddSymbol(div);
+      AddSymbol(mean);
+      AddSymbol(log);
+      AddSymbol(pow);
+      AddSymbol(square);
+      AddSymbol(root);
+      AddSymbol(sqrt);
+      AddSymbol(exp);
+      constants.ForEach(AddSymbol);
+      variables.ForEach(AddSymbol);
+
+      #region subtree count configuration
+      SetSubtreeCount(add, 2, 2);
+      SetSubtreeCount(sub, 2, 2);
+      SetSubtreeCount(mul, 2, 2);
+      SetSubtreeCount(div, 2, 2);
+      SetSubtreeCount(mean, 2, 2);
+      SetSubtreeCount(log, 1, 1);
+      SetSubtreeCount(pow, 2, 2);
+      SetSubtreeCount(square, 1, 1);
+      SetSubtreeCount(root, 2, 2);
+      SetSubtreeCount(sqrt, 1, 1);
+      SetSubtreeCount(exp, 1, 1);
+      constants.ForEach((c) => SetSubtreeCount(c, 0, 0));
+      variables.ForEach((v) => SetSubtreeCount(v, 0, 0));
+      #endregion
+
+      var functions = new ISymbol[] { add, sub, mul, div, mean, log, pow, root, square, sqrt };
+      var terminalSymbols = variables.Concat<ISymbol>(constants);
+      var allSymbols = functions.Concat(terminalSymbols);
+
+      #region allowed child symbols configuration
+      foreach (var s in allSymbols) {
+        AddAllowedChildSymbol(StartSymbol, s);
+      }
+      foreach (var parentSymb in functions)
+        foreach (var childSymb in allSymbols) {
+          AddAllowedChildSymbol(parentSymb, childSymb);
+        }
+
+      #endregion
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicRegressionSingleObjectiveEvaluator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicRegressionSingleObjectiveEvaluator.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicRegressionSingleObjectiveEvaluator.cs	(revision 11009)
@@ -0,0 +1,96 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  [StorableClass]
+  public class GESymbolicRegressionSingleObjectiveEvaluator : GESymbolicDataAnalysisSingleObjectiveEvaluator<IRegressionProblemData>,
+                                                              IGESymbolicRegressionSingleObjectiveEvaluator {
+
+    public const string EvaluatorParameterName = "Evaluator";
+    public const string RandomParameterName = "Random";
+    public const string BoundsParameterName = "Bounds";
+    public const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+
+    public IValueParameter<ISymbolicRegressionSingleObjectiveEvaluator> EvaluatorParameter {
+      get { return (IValueParameter<ISymbolicRegressionSingleObjectiveEvaluator>)Parameters[EvaluatorParameterName]; }
+    }
+    public ILookupParameter<IntMatrix> BoundsParameter {
+      get { return (ILookupParameter<IntMatrix>)Parameters[BoundsParameterName]; }
+    }
+    public ILookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+
+    public ISymbolicRegressionSingleObjectiveEvaluator Evaluator {
+      get { return EvaluatorParameter.Value; }
+    }
+
+
+    [StorableConstructor]
+    protected GESymbolicRegressionSingleObjectiveEvaluator(bool deserializing) : base(deserializing) { }
+    protected GESymbolicRegressionSingleObjectiveEvaluator(GESymbolicRegressionSingleObjectiveEvaluator original, Cloner cloner) : base(original, cloner) { }
+    public GESymbolicRegressionSingleObjectiveEvaluator()
+      : base() {
+      Parameters.Add(new ValueParameter<ISymbolicRegressionSingleObjectiveEvaluator>(EvaluatorParameterName, "The symbolic regression evaluator that should be used to assess the quality of trees.", new SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator()));
+      Parameters.Add(new LookupParameter<IntMatrix>(BoundsParameterName, "The integer number range in which the single genomes of a genotype are created."));
+      Parameters.Add(new LookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "Genotype length."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GESymbolicRegressionSingleObjectiveEvaluator(this, cloner);
+    }
+
+    public override bool Maximization {
+      get { return Evaluator.Maximization; }
+    }
+
+    public override IOperation Apply() {
+      var genotype = IntegerVectorParameter.ActualValue;
+
+      // translate to phenotype
+      var tree = GenotypeToPhenotypeMapperParameter.ActualValue.Map(
+        RandomParameter.ActualValue,
+        BoundsParameter.ActualValue,
+        MaximumSymbolicExpressionTreeLengthParameter.ActualValue.Value,
+        SymbolicExpressionTreeGrammarParameter.ActualValue,
+        genotype
+      );
+      SymbolicExpressionTreeParameter.ActualValue = tree; // write to scope for analyzers
+
+      // create operation for evaluation
+      var evalOp = ExecutionContext.CreateChildOperation(Evaluator);
+      var successorOp = base.Apply();
+
+      return new OperationCollection(evalOp, successorOp);
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicRegressionSingleObjectiveProblem.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicRegressionSingleObjectiveProblem.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/GESymbolicRegressionSingleObjectiveProblem.cs	(revision 11009)
@@ -0,0 +1,138 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  [Item("Grammatical Evolution Symbolic Regression Problem (single objective)",
+        "Represents grammatical evolution for single objective symbolic regression problems.")]
+  [StorableClass]
+  [Creatable("Problems")]
+  public class GESymbolicRegressionSingleObjectiveProblem : GESymbolicDataAnalysisSingleObjectiveProblem<IRegressionProblemData, IGESymbolicRegressionSingleObjectiveEvaluator, IIntegerVectorCreator>,
+                                                            IRegressionProblem {
+    private const double PunishmentFactor = 10;
+    private const int InitialMaximumTreeLength = 30;
+    private const string EstimationLimitsParameterName = "EstimationLimits";
+    private const string EstimationLimitsParameterDescription
+      = "The limits for the estimated value that can be returned by the symbolic regression model.";
+
+    #region parameter properties
+    public IFixedValueParameter<DoubleLimit> EstimationLimitsParameter {
+      get { return (IFixedValueParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
+    }
+    #endregion
+    #region properties
+    public DoubleLimit EstimationLimits {
+      get { return EstimationLimitsParameter.Value; }
+    }
+    #endregion
+    [StorableConstructor]
+    protected GESymbolicRegressionSingleObjectiveProblem(bool deserializing) : base(deserializing) { }
+    protected GESymbolicRegressionSingleObjectiveProblem(GESymbolicRegressionSingleObjectiveProblem original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEventHandlers();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) { return new GESymbolicRegressionSingleObjectiveProblem(this, cloner); }
+
+    public GESymbolicRegressionSingleObjectiveProblem()
+      : base(new RegressionProblemData(), new GESymbolicRegressionSingleObjectiveEvaluator(), new UniformRandomIntegerVectorCreator()) {
+      Parameters.Add(new FixedValueParameter<DoubleLimit>(EstimationLimitsParameterName, EstimationLimitsParameterDescription));
+
+      EstimationLimitsParameter.Hidden = true;
+
+
+      ApplyLinearScalingParameter.Value.Value = true;
+      Maximization.Value = Evaluator.Maximization;
+      MaximumSymbolicExpressionTreeLength.Value = InitialMaximumTreeLength;
+
+      RegisterEventHandlers();
+      InitializeOperators();
+      UpdateEstimationLimits();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
+
+    private void RegisterEventHandlers() {
+      // when the ge evaluator itself changes
+      EvaluatorParameter.ValueChanged += (sender, args) => {
+        // register a new hander for the symbreg evaluator in the ge evaluator
+        // hacky because we the evaluator does not have an event for changes of the maximization property
+        EvaluatorParameter.Value.EvaluatorParameter.ValueChanged +=
+          (_, __) => Maximization.Value = Evaluator.Maximization;
+      };
+      EvaluatorParameter.Value.EvaluatorParameter.ValueChanged +=
+        (sender, args) => Maximization.Value = Evaluator.Maximization;
+    }
+
+
+    private void InitializeOperators() {
+      Operators.Add(new SymbolicRegressionSingleObjectiveTrainingBestSolutionAnalyzer());
+      Operators.Add(new SymbolicRegressionSingleObjectiveValidationBestSolutionAnalyzer());
+      Operators.Add(new SymbolicRegressionSingleObjectiveOverfittingAnalyzer());
+      Operators.Add(new SymbolicRegressionSingleObjectiveTrainingParetoBestSolutionAnalyzer());
+      Operators.Add(new SymbolicRegressionSingleObjectiveValidationParetoBestSolutionAnalyzer());
+
+      ParameterizeOperators();
+    }
+
+    private void UpdateEstimationLimits() {
+      if (ProblemData.TrainingIndices.Any()) {
+        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).ToList();
+        var mean = targetValues.Average();
+        var range = targetValues.Max() - targetValues.Min();
+        EstimationLimits.Upper = mean + PunishmentFactor * range;
+        EstimationLimits.Lower = mean - PunishmentFactor * range;
+      } else {
+        EstimationLimits.Upper = double.MaxValue;
+        EstimationLimits.Lower = double.MinValue;
+      }
+    }
+
+    protected override void OnProblemDataChanged() {
+      base.OnProblemDataChanged();
+      UpdateEstimationLimits();
+    }
+
+    protected override void ParameterizeOperators() {
+      base.ParameterizeOperators();
+      if (Parameters.ContainsKey(EstimationLimitsParameterName)) {
+        var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators);
+        foreach (var op in operators.OfType<ISymbolicDataAnalysisBoundedOperator>()) {
+          op.EstimationLimitsParameter.ActualName = EstimationLimitsParameter.Name;
+        }
+      }
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicDataAnalysisEvaluator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicDataAnalysisEvaluator.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicDataAnalysisEvaluator.cs	(revision 11009)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.GrammaticalEvolution.Mappers;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+
+  public interface IGESymbolicDataAnalysisEvaluator<T> : IEvaluator
+    where T : class, IDataAnalysisProblemData {
+
+    ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter { get; }  // phenotype
+    IValueLookupParameter<IntRange> EvaluationPartitionParameter { get; }
+    IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter { get; }
+    ILookupParameter<BoolValue> ApplyLinearScalingParameter { get; }
+
+    IValueLookupParameter<T> ProblemDataParameter { get; }
+
+    ILookupParameter<IntegerVector> IntegerVectorParameter { get; } // genotype
+    ILookupParameter<IGenotypeToPhenotypeMapper> GenotypeToPhenotypeMapperParameter { get; }
+    IValueLookupParameter<ISymbolicDataAnalysisGrammar> SymbolicExpressionTreeGrammarParameter { get; }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicDataAnalysisProblem.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicDataAnalysisProblem.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicDataAnalysisProblem.cs	(revision 11009)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  public interface IGESymbolicDataAnalysisProblem : IDataAnalysisProblem, IHeuristicOptimizationProblem {
+
+    IValueParameter<ISymbolicDataAnalysisGrammar> SymbolicExpressionTreeGrammarParameter { get; }
+    IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter { get; }
+    IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter { get; }
+    IFixedValueParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter { get; }
+    IFixedValueParameter<IntRange> FitnessCalculationPartitionParameter { get; }
+    IFixedValueParameter<IntRange> ValidationPartitionParameter { get; }
+
+    ISymbolicDataAnalysisGrammar SymbolicExpressionTreeGrammar { get; set; }
+    ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicExpressionTreeInterpreter { get; set; }
+    IntValue MaximumSymbolicExpressionTreeLength { get; }
+    PercentValue RelativeNumberOfEvaluatedSamples { get; }
+    IntRange FitnessCalculationPartition { get; }
+    IntRange ValidationPartition { get; }
+  }
+
+  public interface IGESymbolicDataAnalysisSingleObjectiveProblem : IGESymbolicDataAnalysisProblem, ISingleObjectiveHeuristicOptimizationProblem { }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicDataAnalysisSingleObjectiveEvaluator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicDataAnalysisSingleObjectiveEvaluator.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicDataAnalysisSingleObjectiveEvaluator.cs	(revision 11009)
@@ -0,0 +1,33 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+
+#endregion
+
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  public interface IGESymbolicDataAnalysisSingleObjectiveEvaluator<T> : IGESymbolicDataAnalysisEvaluator<T>, ISingleObjectiveEvaluator
+    where T : class,IDataAnalysisProblemData {
+    bool Maximization { get; }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicDataAnalysisValidationAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicDataAnalysisValidationAnalyzer.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicDataAnalysisValidationAnalyzer.cs	(revision 11009)
@@ -0,0 +1,39 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+
+#endregion
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  public interface IGESymbolicDataAnalysisValidationAnalyzer<T, U> : ISymbolicDataAnalysisAnalyzer, ISymbolicDataAnalysisInterpreterOperator
+    where T : class,IGESymbolicDataAnalysisEvaluator<U>
+    where U : class, IDataAnalysisProblemData {
+    ILookupParameter<IRandom> RandomParameter { get; }
+    ILookupParameter<U> ProblemDataParameter { get; }
+    ILookupParameter<T> EvaluatorParameter { get; }
+    IValueLookupParameter<IntRange> ValidationPartitionParameter { get; }
+    IValueLookupParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter { get; }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicRegressionEvaluator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicRegressionEvaluator.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicRegressionEvaluator.cs	(revision 11009)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+
+#endregion
+
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  public interface IGESymbolicRegressionEvaluator : IGESymbolicDataAnalysisEvaluator<IRegressionProblemData> {
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicRegressionSingleObjectiveEvaluator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicRegressionSingleObjectiveEvaluator.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.GrammaticalEvolution/3.3/Symbolic/IGESymbolicRegressionSingleObjectiveEvaluator.cs	(revision 11009)
@@ -0,0 +1,34 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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/>.
+ * 
+ * Author: Sabine Winkler
+ */
+
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
+
+namespace HeuristicLab.Problems.GrammaticalEvolution {
+  public interface IGESymbolicRegressionSingleObjectiveEvaluator : IGESymbolicRegressionEvaluator,
+                                                                   IGESymbolicDataAnalysisSingleObjectiveEvaluator<IRegressionProblemData> {
+    IValueParameter<ISymbolicRegressionSingleObjectiveEvaluator> EvaluatorParameter { get; }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionAnalyzer.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionAnalyzer.cs	(revision 11009)
@@ -0,0 +1,133 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.ParameterOptimization {
+  [Item("BestSolutionAnalyzer", "Tracks the best parameter vector solution of the current algorithm run.")]
+  [StorableClass]
+  public class BestSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer {
+    private const string MaximizationParameterName = "Maximization";
+    private const string ParameterVectorParameterName = "RealVector";
+    private const string ParameterNamesParameterName = "ParameterNames";
+    private const string QualityParameterName = "Quality";
+    private const string BestQualityParameterName = "BestQuality";
+    private const string BestKnownQualityParameterName = "BestKnownQuality";
+
+    private const string ResultsParameterName = "Results";
+    private const string BestSolutionResultName = "Best Solution";
+
+    public virtual bool EnabledByDefault {
+      get { return true; }
+    }
+
+    public ILookupParameter<BoolValue> MaximizationParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters[MaximizationParameterName]; }
+    }
+    public IScopeTreeLookupParameter<RealVector> ParameterVectorParameter {
+      get { return (IScopeTreeLookupParameter<RealVector>)Parameters[ParameterVectorParameterName]; }
+    }
+    public ILookupParameter<StringArray> ParameterNamesParameter {
+      get { return (ILookupParameter<StringArray>)Parameters[ParameterNamesParameterName]; }
+    }
+    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> BestQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[BestQualityParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> BestKnownQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[BestKnownQualityParameterName]; }
+    }
+    public IValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (IValueLookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
+    }
+
+    [StorableConstructor]
+    protected BestSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+    protected BestSolutionAnalyzer(BestSolutionAnalyzer original, Cloner cloner)
+      : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BestSolutionAnalyzer(this, cloner);
+    }
+
+    public BestSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<BoolValue>(MaximizationParameterName, "True if the problem is a maximization problem."));
+      Parameters.Add(new ScopeTreeLookupParameter<RealVector>(ParameterVectorParameterName, "The parameter vector which should be evaluated."));
+      Parameters.Add(new LookupParameter<StringArray>(ParameterNamesParameterName, "The names of the elements in the parameter vector."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The quality name for the parameter vectors."));
+      Parameters.Add(new LookupParameter<DoubleValue>(BestQualityParameterName, "The best quality found so far."));
+      Parameters.Add(new LookupParameter<DoubleValue>(BestKnownQualityParameterName, "The quality of the best known solution."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>(ResultsParameterName, "The result collection where the results should be stored."));
+    }
+
+    public override IOperation Apply() {
+      ItemArray<RealVector> parameterVectors = ParameterVectorParameter.ActualValue;
+      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
+      bool max = MaximizationParameter.ActualValue.Value;
+      DoubleValue bestKnownQuality = BestKnownQualityParameter.ActualValue;
+
+      int ind = -1;
+      if (!max) ind = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
+      else ind = qualities.Select((x, index) => new { index, x.Value }).OrderByDescending(x => x.Value).First().index;
+
+      var bestQuality = qualities[ind].Value;
+      var bestParameterVector = (RealVector)parameterVectors[ind].Clone();
+      ResultCollection results = ResultsParameter.ActualValue;
+
+      if (BestQualityParameter.ActualValue == null) {
+        if (max) BestQualityParameter.ActualValue = new DoubleValue(double.MinValue);
+        else BestQualityParameter.ActualValue = new DoubleValue(double.MaxValue);
+      }
+
+      if (max && bestQuality > BestQualityParameter.ActualValue.Value
+          || !max && bestQuality < BestQualityParameter.ActualValue.Value) {
+        BestQualityParameter.ActualValue.Value = bestQuality;
+        if (results.ContainsKey(BestSolutionResultName)) {
+          var bestSolution = (DoubleArray)results[BestSolutionResultName].Value;
+          bestSolution.ElementNames = ParameterNamesParameter.ActualValue;
+          for (int i = 0; i < bestParameterVector.Length; i++)
+            bestSolution[i] = bestParameterVector[i];
+        }
+      } else if (!results.ContainsKey(BestSolutionResultName)) {
+        results.Add(new Result(BestSolutionResultName, new DoubleArray(bestParameterVector.ToArray())));
+        var bestSolution = (DoubleArray)results[BestSolutionResultName].Value;
+        bestSolution.ElementNames = ParameterNamesParameter.ActualValue;
+      }
+      //update best known quality
+      if (bestKnownQuality == null || max && bestQuality > bestKnownQuality.Value
+        || !max && bestQuality < bestKnownQuality.Value) {
+        BestKnownQualityParameter.ActualValue = new DoubleValue(bestQuality);
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionsAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionsAnalyzer.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionsAnalyzer.cs	(revision 11009)
@@ -0,0 +1,161 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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 HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.ParameterOptimization {
+  [Item("BestSolutionsAnalyzer", "Tracks the best parameter vector solutions of the current algorithm run.")]
+  [StorableClass]
+  public class BestSolutionsAnalyzer : SingleSuccessorOperator, IAnalyzer {
+    private const string MaximizationParameterName = "Maximization";
+    private const string ParameterVectorParameterName = "RealVector";
+    private const string ParameterNamesParameterName = "ParameterNames";
+    private const string QualityParameterName = "Quality";
+    private const string PreviousBestQualityParameterName = "PreviousBestQuality";
+    private const string BestQualityParameterName = "BestQuality";
+    private const string BestKnownQualityParameterName = "BestKnownQuality";
+
+    private const string ResultsParameterName = "Results";
+    private const string BestSolutionsResultName = "Best Solutions Store";
+
+    public virtual bool EnabledByDefault {
+      get { return false; }
+    }
+
+    public ILookupParameter<BoolValue> MaximizationParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters[MaximizationParameterName]; }
+    }
+    public IScopeTreeLookupParameter<RealVector> ParameterVectorParameter {
+      get { return (IScopeTreeLookupParameter<RealVector>)Parameters[ParameterVectorParameterName]; }
+    }
+    public ILookupParameter<StringArray> ParameterNamesParameter {
+      get { return (ILookupParameter<StringArray>)Parameters[ParameterNamesParameterName]; }
+    }
+    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> PreviousBestQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[PreviousBestQualityParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> BestQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[BestQualityParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> BestKnownQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[BestKnownQualityParameterName]; }
+    }
+    public IValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (IValueLookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
+    }
+
+    [StorableConstructor]
+    protected BestSolutionsAnalyzer(bool deserializing) : base(deserializing) { }
+    protected BestSolutionsAnalyzer(BestSolutionsAnalyzer original, Cloner cloner)
+      : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BestSolutionsAnalyzer(this, cloner);
+    }
+
+    public BestSolutionsAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<BoolValue>(MaximizationParameterName, "True if the problem is a maximization problem."));
+      Parameters.Add(new ScopeTreeLookupParameter<RealVector>(ParameterVectorParameterName, "The parameter vector which should be evaluated."));
+      Parameters.Add(new LookupParameter<StringArray>(ParameterNamesParameterName, "The names of the elements in the parameter vector."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The quality name for the parameter vectors."));
+      Parameters.Add(new LookupParameter<DoubleValue>(PreviousBestQualityParameterName, "The best quality of the previous iteration."));
+      Parameters.Add(new LookupParameter<DoubleValue>(BestQualityParameterName, "The best quality found so far."));
+      Parameters.Add(new LookupParameter<DoubleValue>(BestKnownQualityParameterName, "The quality of the best known solution."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>(ResultsParameterName, "The result collection where the results should be stored."));
+    }
+
+    public override IOperation Apply() {
+      ItemArray<RealVector> parameterVectors = ParameterVectorParameter.ActualValue;
+      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
+      bool max = MaximizationParameter.ActualValue.Value;
+      DoubleValue bestKnownQuality = BestKnownQualityParameter.ActualValue;
+
+      var solutions = parameterVectors.Zip(qualities, (ParameterVector, Quality) => new { ParameterVector, Quality });
+      if (max) solutions = solutions.MaxItems(s => s.Quality.Value);
+      else solutions = solutions.MinItems(s => s.Quality.Value);
+
+      if (BestQualityParameter.ActualValue == null) {
+        if (max) BestQualityParameter.ActualValue = new DoubleValue(double.MinValue);
+        else BestQualityParameter.ActualValue = new DoubleValue(double.MaxValue);
+      }
+      if (PreviousBestQualityParameter.ActualValue == null)
+        PreviousBestQualityParameter.ActualValue = (DoubleValue)BestQualityParameter.ActualValue.Clone();
+
+      //add result for best solutions
+      ResultCollection results = ResultsParameter.ActualValue;
+      if (!results.ContainsKey(BestSolutionsResultName))
+        results.Add(new Result(BestSolutionsResultName, new ItemSet<DoubleArray>(new DoubleArrayEqualityComparer())));
+
+      var previousBestQuality = PreviousBestQualityParameter.ActualValue.Value;
+      var bestQuality = solutions.First().Quality.Value;
+      var bestSolutions = (ItemSet<DoubleArray>)results[BestSolutionsResultName].Value;
+      //clear best solutions if new found quality is better than the existing one
+      if (max && bestQuality > previousBestQuality
+          || !max && bestQuality < previousBestQuality)
+        bestSolutions.Clear();
+
+      //add new found solutions
+      if (max && bestQuality >= BestQualityParameter.ActualValue.Value
+          || !max && bestQuality <= BestQualityParameter.ActualValue.Value) {
+        foreach (var solution in solutions) {
+          var newSolution = (DoubleArray)solution.ParameterVector.Clone();
+          newSolution.ElementNames = ParameterNamesParameter.ActualValue;
+          bestSolutions.Add(newSolution);
+        }
+      }
+      PreviousBestQualityParameter.ActualValue = (DoubleValue)BestQualityParameter.ActualValue.Clone();
+
+      //update best known quality
+      if (bestKnownQuality == null || max && bestQuality > bestKnownQuality.Value
+        || !max && bestQuality < bestKnownQuality.Value) {
+        BestKnownQualityParameter.ActualValue = new DoubleValue(bestQuality);
+      }
+
+      return base.Apply();
+    }
+  }
+
+  public class DoubleArrayEqualityComparer : IEqualityComparer<DoubleArray> {
+    public bool Equals(DoubleArray x, DoubleArray y) {
+      if (x == null && y == null) return true;
+      if (x == null) return false;
+      if (y == null) return false;
+      return x.SequenceEqual(y);
+    }
+
+    public int GetHashCode(DoubleArray obj) {
+      if (obj == null) return 0;
+      return obj.Aggregate(23, (current, item) => current ^ (int)item);
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/HeuristicLab.Problems.ParameterOptimization-3.3.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/HeuristicLab.Problems.ParameterOptimization-3.3.csproj	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/HeuristicLab.Problems.ParameterOptimization-3.3.csproj	(revision 11009)
@@ -0,0 +1,173 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{D2C39FBA-A1D5-403A-9211-B0A299A76313}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.ParameterOptimization</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.ParameterOptimization-3.3</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </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>
+  </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>
+  </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>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="BestSolutionAnalyzer.cs" />
+    <Compile Include="BestSolutionsAnalyzer.cs" />
+    <Compile Include="IParameterVectorEvaluator.cs" />
+    <Compile Include="ParameterOptimizationProblem.cs" />
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="ParameterVectorEvaluator.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958b43bc-cc5c-4fa2-8628-2b3b01d890b6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{a9ad58b9-3ef9-4cc1-97e5-8d909039ff5c}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{c36bd924-a541-4a00-afa8-41701378ddc5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{bbab9df5-5ef3-4ba8-ade9-b36e82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.RealVectorEncoding\3.3\HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj">
+      <Project>{bb6d334a-4bb6-4674-9883-31a6ebb32cab}</Project>
+      <Name>HeuristicLab.Encodings.RealVectorEncoding-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23da7ff4-d5b8-41b6-aa96-f0561d24f3ee}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
+      <Project>{56f9106a-079f-4c61-92f6-86a84c2d84b7}</Project>
+      <Name>HeuristicLab.Parameters-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102bc7d3-0ef9-439c-8f6d-96ff0fdb8e1b}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
+      set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+      set ProjectDir=$(ProjectDir)
+      set SolutionDir=$(SolutionDir)
+      set Outdir=$(Outdir)
+
+      call PreBuildEvent.cmd
+    </PreBuildEvent>
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+      export ProjectDir=$(ProjectDir)
+      export SolutionDir=$(SolutionDir)
+
+      $SolutionDir/PreBuildEvent.sh
+    </PreBuildEvent>
+  </PropertyGroup>
+  <!-- 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/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/IParameterVectorEvaluator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/IParameterVectorEvaluator.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/IParameterVectorEvaluator.cs	(revision 11009)
@@ -0,0 +1,33 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.ParameterOptimization {
+  public interface IParameterVectorEvaluator : ISingleObjectiveEvaluator {
+    ILookupParameter<IntValue> ProblemSizeParameter { get; }
+    ILookupParameter<RealVector> ParameterVectorParameter { get; }
+    ILookupParameter<StringArray> ParameterNamesParameter { get; }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/ParameterOptimizationProblem.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/ParameterOptimizationProblem.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/ParameterOptimizationProblem.cs	(revision 11009)
@@ -0,0 +1,179 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.ParameterOptimization {
+  [Item("Parameter Optimization Problem", "A base class for other problems for the optimization of a parameter vector.")]
+  [StorableClass]
+  public abstract class ParameterOptimizationProblem : SingleObjectiveHeuristicOptimizationProblem<IParameterVectorEvaluator, IRealVectorCreator>, IStorableContent {
+    public string Filename { get; set; }
+    private const string ProblemSizeParameterName = "ProblemSize";
+    private const string BoundsParameterName = "Bounds";
+    private const string ParameterNamesParameterName = "ParameterNames";
+
+
+    #region parameters
+    public IFixedValueParameter<IntValue> ProblemSizeParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[ProblemSizeParameterName]; }
+    }
+    public IValueParameter<DoubleMatrix> BoundsParameter {
+      get { return (IValueParameter<DoubleMatrix>)Parameters[BoundsParameterName]; }
+    }
+    public IValueParameter<StringArray> ParameterNamesParameter {
+      get { return (IValueParameter<StringArray>)Parameters[ParameterNamesParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public int ProblemSize {
+      get { return ProblemSizeParameter.Value.Value; }
+      set { ProblemSizeParameter.Value.Value = value; }
+    }
+    public DoubleMatrix Bounds {
+      get { return BoundsParameter.Value; }
+      set { BoundsParameter.Value = value; }
+    }
+    public StringArray ParameterNames {
+      get { return ParameterNamesParameter.Value; }
+      set { ParameterNamesParameter.Value = value; }
+    }
+    #endregion
+
+
+    [Storable]
+    protected StdDevStrategyVectorCreator strategyVectorCreator;
+    [Storable]
+    protected StdDevStrategyVectorCrossover strategyVectorCrossover;
+    [Storable]
+    protected StdDevStrategyVectorManipulator strategyVectorManipulator;
+
+    [StorableConstructor]
+    protected ParameterOptimizationProblem(bool deserializing) : base(deserializing) { }
+    protected ParameterOptimizationProblem(ParameterOptimizationProblem original, Cloner cloner)
+      : base(original, cloner) {
+      strategyVectorCreator = cloner.Clone(original.strategyVectorCreator);
+      strategyVectorCrossover = cloner.Clone(original.strategyVectorCrossover);
+      strategyVectorManipulator = cloner.Clone(original.strategyVectorManipulator);
+      RegisterEventHandlers();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
+
+    protected ParameterOptimizationProblem(IParameterVectorEvaluator evaluator)
+      : base(evaluator, new UniformRandomRealVectorCreator()) {
+      Parameters.Add(new FixedValueParameter<IntValue>(ProblemSizeParameterName, "The dimension of the parameter vector that is to be optimized.", new IntValue(1)));
+      Parameters.Add(new ValueParameter<DoubleMatrix>(BoundsParameterName, "The bounds for each dimension of the parameter vector. If fewer bounds are", new DoubleMatrix(new double[,] { { 0, 100 } }, new string[] { "LowerBound", "UpperBound" })));
+      Parameters.Add(new ValueParameter<StringArray>(ParameterNamesParameterName, "The element names which are used to calculate the quality of a parameter vector.", new StringArray(new string[] { "Parameter0" })));
+
+      SolutionCreator.LengthParameter.ActualName = "ProblemSize";
+
+      Operators.AddRange(ApplicationManager.Manager.GetInstances<IRealVectorOperator>());
+
+      strategyVectorCreator = new StdDevStrategyVectorCreator();
+      strategyVectorCreator.LengthParameter.ActualName = ProblemSizeParameter.Name;
+      strategyVectorCrossover = new StdDevStrategyVectorCrossover();
+      strategyVectorManipulator = new StdDevStrategyVectorManipulator();
+      strategyVectorManipulator.LearningRateParameter.Value = new DoubleValue(0.5);
+      strategyVectorManipulator.GeneralLearningRateParameter.Value = new DoubleValue(0.5);
+
+      Operators.Add(strategyVectorCreator);
+      Operators.Add(strategyVectorCrossover);
+      Operators.Add(strategyVectorManipulator);
+      Operators.Add(new BestSolutionAnalyzer());
+      Operators.Add(new BestSolutionsAnalyzer());
+      UpdateParameters();
+      UpdateStrategyVectorBounds();
+
+      RegisterEventHandlers();
+    }
+
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      strategyVectorManipulator.GeneralLearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * ProblemSize));
+      strategyVectorManipulator.LearningRateParameter.Value = new DoubleValue(1.0 / Math.Sqrt(2 * Math.Sqrt(ProblemSize)));
+      UpdateParameters();
+    }
+
+    private void RegisterEventHandlers() {
+      Bounds.ToStringChanged += Bounds_ToStringChanged;
+      ProblemSizeParameter.Value.ValueChanged += ProblemSize_Changed;
+      ParameterNames.Reset += ParameterNames_Reset;
+    }
+
+    private void UpdateParameters() {
+      Evaluator.ParameterVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
+      Evaluator.ParameterNamesParameter.ActualName = ParameterNamesParameter.Name;
+
+      var bestSolutionAnalyzer = Operators.OfType<BestSolutionAnalyzer>().First();
+      bestSolutionAnalyzer.ParameterVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
+      bestSolutionAnalyzer.ParameterNamesParameter.ActualName = ParameterNamesParameter.Name;
+
+      Bounds = new DoubleMatrix(ProblemSize, 2);
+      Bounds.RowNames = ParameterNames;
+      for (int i = 0; i < Bounds.Rows; i++) {
+        Bounds[i, 0] = 0.0;
+        Bounds[i, 1] = 100.0;
+      }
+
+      foreach (var op in Operators.OfType<IRealVectorManipulator>())
+        op.RealVectorParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName;
+    }
+
+    private void Bounds_ToStringChanged(object sender, EventArgs e) {
+      if (Bounds.Columns != 2 || Bounds.Rows < 1)
+        Bounds = new DoubleMatrix(1, 2);
+      UpdateStrategyVectorBounds();
+    }
+    protected virtual void UpdateStrategyVectorBounds() {
+      DoubleMatrix strategyBounds = (DoubleMatrix)Bounds.Clone();
+      for (int i = 0; i < strategyBounds.Rows; i++) {
+        if (strategyBounds[i, 0] < 0) strategyBounds[i, 0] = 0;
+        strategyBounds[i, 1] = 0.1 * (Bounds[i, 1] - Bounds[i, 0]);
+      }
+      strategyVectorCreator.BoundsParameter.Value = strategyBounds;
+    }
+
+    protected virtual void ProblemSize_Changed(object sender, EventArgs e) {
+      if (ParameterNames.Length != ProblemSize)
+        ((IStringConvertibleArray)ParameterNames).Length = ProblemSize;
+      for (int i = 0; i < ParameterNames.Length; i++) {
+        if (string.IsNullOrEmpty(ParameterNames[i])) ParameterNames[i] = "Parameter" + i;
+      }
+    }
+
+    protected virtual void ParameterNames_Reset(object sender, EventArgs e) {
+      ProblemSize = ParameterNames.Length;
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/ParameterVectorEvaluator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/ParameterVectorEvaluator.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/ParameterVectorEvaluator.cs	(revision 11009)
@@ -0,0 +1,69 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.ParameterOptimization {
+  [Item("ParameterVectorEvaluator", "An base class for other parameter vector evaluators.")]
+  [StorableClass]
+  public abstract class ParameterVectorEvaluator : SingleSuccessorOperator, IParameterVectorEvaluator {
+    private const string QualityParameterName = "Quality";
+    private const string ProblemSizeParameterName = "ProblemSize";
+    private const string ParameterVectorParameterName = "RealVector";
+    private const string ParameterNamesParameterName = "ParameterNames";
+
+    #region parameters
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+    public ILookupParameter<IntValue> ProblemSizeParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[ProblemSizeParameterName]; }
+    }
+    public ILookupParameter<RealVector> ParameterVectorParameter {
+      get { return (ILookupParameter<RealVector>)Parameters[ParameterVectorParameterName]; }
+    }
+    public ILookupParameter<StringArray> ParameterNamesParameter {
+      get { return (ILookupParameter<StringArray>)Parameters[ParameterNamesParameterName]; }
+    }
+    #endregion
+
+
+    [StorableConstructor]
+    protected ParameterVectorEvaluator(bool deserializing) : base(deserializing) { }
+    protected ParameterVectorEvaluator(ParameterVectorEvaluator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    protected ParameterVectorEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>(QualityParameterName, "Result of the evaluation of a parameter vector."));
+      Parameters.Add(new LookupParameter<IntValue>(ProblemSizeParameterName, "The dimension of the parameter vector that is to be optimized."));
+      Parameters.Add(new LookupParameter<RealVector>(ParameterVectorParameterName, "The parameter vector which should be evaluated."));
+      Parameters.Add(new LookupParameter<StringArray>(ParameterNamesParameterName, "The name of the parameters that should be optimized."));
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/Plugin.cs.frame
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/Plugin.cs.frame	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/Plugin.cs.frame	(revision 11009)
@@ -0,0 +1,42 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.PluginInfrastructure;
+using Microsoft.Win32;
+
+namespace HeuristicLab.Problems.ParameterOptimization {
+  /// <summary>
+  /// Plugin class for HeuristicLab.Problems.ParameterOptimization.
+  /// </summary>
+  [Plugin("HeuristicLab.Problems.ParameterOptimization", "3.3.8.$WCREV$")]
+  [PluginFile("HeuristicLab.Problems.ParameterOptimization-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.RealVectorEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  public class HeuristicLabProblemsParameterOptimizationPlugin : PluginBase {    }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/Properties/AssemblyInfo.cs.frame	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/Properties/AssemblyInfo.cs.frame	(revision 11009)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Problems.ParameterOptimization")]
+[assembly: AssemblyDescription("HeuristicLab problems for parameter optimization.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2014 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("B211BD50-DE67-4AB1-8A43-DF3C5222B1D5")]
+
+// 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 Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.9.$WCREV$")]
Index: /branches/DataPreprocessing/HeuristicLab.Problems.TestFunctions/3.3/Analyzers/BestSingleObjectiveTestFunctionSolutionAnalyzer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.TestFunctions/3.3/Analyzers/BestSingleObjectiveTestFunctionSolutionAnalyzer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.TestFunctions/3.3/Analyzers/BestSingleObjectiveTestFunctionSolutionAnalyzer.cs	(revision 11009)
@@ -138,6 +138,10 @@
       if (solution == null) {
         ResultCollection results = ResultsParameter.ActualValue;
-        solution = new SingleObjectiveTestFunctionSolution(realVectors[i], qualities[i], EvaluatorParameter.ActualValue);
-        solution.Population = realVectors[i].Length == 2 ? realVectors : null;
+        solution = new SingleObjectiveTestFunctionSolution((RealVector)realVectors[i].Clone(),
+                                                           (DoubleValue)qualities[i].Clone(),
+                                                           EvaluatorParameter.ActualValue);
+        solution.Population = realVectors[i].Length == 2
+          ? new ItemArray<RealVector>(realVectors.Select(x => x.Clone()).Cast<RealVector>())
+          : null;
         solution.BestKnownRealVector = BestKnownSolutionParameter.ActualValue;
         solution.Bounds = BoundsParameter.ActualValue;
@@ -147,8 +151,10 @@
         if (max && qualities[i].Value > solution.BestQuality.Value
           || !max && qualities[i].Value < solution.BestQuality.Value) {
-          solution.BestRealVector = realVectors[i];
-          solution.BestQuality = qualities[i];
+          solution.BestRealVector = (RealVector)realVectors[i].Clone();
+          solution.BestQuality = (DoubleValue)qualities[i].Clone();
         }
-        solution.Population = realVectors[i].Length == 2 ? realVectors : null;
+        solution.Population = realVectors[i].Length == 2
+          ? new ItemArray<RealVector>(realVectors.Select(x => x.Clone()).Cast<RealVector>())
+          : null;
       }
 
Index: /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting.Views/3.4/VRPSolutionView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting.Views/3.4/VRPSolutionView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting.Views/3.4/VRPSolutionView.cs	(revision 11009)
@@ -49,9 +49,11 @@
 
     private void UpdateContent() {
+      var view = problemInstanceView.ActiveView as VRPProblemInstanceView;
+      if (view != null) view.Solution = null;
+
       problemInstanceView.Content = Content.ProblemInstance;
-      VRPProblemInstanceView view = problemInstanceView.ActiveView as VRPProblemInstanceView;
-      if (view != null) {
-        view.Solution = Content.Solution;
-      }
+
+      view = problemInstanceView.ActiveView as VRPProblemInstanceView;
+      if (view != null) view.Solution = Content.Solution;
 
       UpdateTourView();
Index: /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs	(revision 11009)
@@ -31,4 +31,6 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Potvin;
 using HeuristicLab.Problems.VehicleRouting.Interfaces;
 using HeuristicLab.Problems.VehicleRouting.Variants;
@@ -99,5 +101,5 @@
       foreach (IOperator op in operators) {
         if (op is IMultiVRPMoveGenerator && !(op is MultiOperator<IMultiVRPMoveGenerator>)) {
-          Operators.Add(op.Clone() as IMultiVRPMoveGenerator, true);
+          Operators.Add(op.Clone() as IMultiVRPMoveGenerator, !(op is IAlbaOperator || op is PotvinVehicleAssignmentMultiMoveGenerator));
         }
       }
Index: /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/IterativeInsertionCreator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/IterativeInsertionCreator.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/IterativeInsertionCreator.cs	(revision 11009)
@@ -107,5 +107,5 @@
         int stopIdx = 0;
         if (currentTour.Stops.Count > 0)
-          result.FindBestInsertionPlace(currentTour, customers[index]);
+          stopIdx = result.FindBestInsertionPlace(currentTour, customers[index]);
         currentTour.Stops.Insert(stopIdx, customers[index]);
 
Index: /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/PushForwardInsertionCreator.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/PushForwardInsertionCreator.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/PushForwardInsertionCreator.cs	(revision 11009)
@@ -33,5 +33,5 @@
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
-  [Item("PushForwardInsertionCreator", "Creates a randomly initialized VRP solution.")]
+  [Item("PushForwardInsertionCreator", "The push forward insertion heuristic. It is implemented as described in Sam, and Thangiah, R. (1999). A Hybrid Genetic Algorithms, Simulated Annealing and Tabu Search Heuristic for Vehicle Routing Problems with Time Windows. Practical Handbook of Genetic Algorithms, Volume III, pp 347–381.")]
   [StorableClass]
   public sealed class PushForwardInsertionCreator : PotvinCreator, IStochasticOperator {
@@ -138,13 +138,10 @@
           dueTime = 0;
 
-        double dist;
-        if (problemInstance.Coordinates[customer + depotCount - 1, 0] < x0)
-          dist = -distance;
-        else
-          dist = distance;
+        double x = problemInstance.Coordinates[customer + depotCount - 1, 0];
+        double y = problemInstance.Coordinates[customer + depotCount - 1, 1];
 
         double cost = alpha * distance + // distance 0 <-> City[i]
-                   -beta * dueTime + // latest arrival time
-                   -gamma * (Math.Asin((problemInstance.Coordinates[customer + depotCount - 1, 1] - y0) / dist) / 360 * dist); // polar angle
+                      -beta * dueTime + // latest arrival time
+                      -gamma * ((Math.Atan2(y - y0, x - x0) + Math.PI) / (2.0 * Math.PI) * distance); // polar angle
 
         if (cost < minCost) {
Index: /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveTabuCriterion.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveTabuCriterion.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveTabuCriterion.cs	(revision 11009)
@@ -20,4 +20,5 @@
 #endregion
 
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -98,7 +99,5 @@
       PotvinCustomerRelocationMove move = CustomerRelocationMoveParameter.ActualValue;
 
-      foreach (IItem tabuMove in tabuList) {
-        PotvinCustomerRelocationMoveAttribute attribute = tabuMove as PotvinCustomerRelocationMoveAttribute;
-
+      foreach (var attribute in tabuList.OfType<PotvinCustomerRelocationMoveAttribute>()) {
         if (!useAspiration || moveQuality >= attribute.MoveQuality) {
           if (attribute.City == move.City && attribute.Tour == move.Tour) {
Index: /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/VehicleRoutingProblem.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/VehicleRoutingProblem.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Problems.VehicleRouting/3.4/VehicleRoutingProblem.cs	(revision 11009)
@@ -365,4 +365,8 @@
       Name = instance.Name;
       Description = instance.Description;
+
+      BestKnownQuality = null;
+      BestKnownSolution = null;
+
       if (ProblemInstance != null && instance.ProblemInstance != null &&
         instance.ProblemInstance.GetType() == ProblemInstance.GetType())
@@ -372,6 +376,4 @@
 
       OnReset();
-      BestKnownQuality = null;
-      BestKnownSolution = null;
 
       if (instance.BestKnownQuality != null) {
@@ -389,21 +391,20 @@
 
     public void Load(VRPData data) {
-      Type interpreterType = typeof(IVRPDataInterpreter<>).MakeGenericType(data.GetType());
-      var interpreters = ApplicationManager.Manager.GetInstances(interpreterType);
-      IVRPDataInterpreter interpreter = null;
-      foreach (object i in interpreters) {
-        var parentInterfaces = i.GetType().BaseType.GetInterfaces();
-        var interfaces = i.GetType().GetInterfaces().Except(parentInterfaces);
-        var interpreterInterface = interfaces.First(j => typeof(IVRPDataInterpreter).IsAssignableFrom(j));
-        var interpreterDataType = interpreterInterface.GetGenericArguments()[0];
-        if (interpreterDataType == data.GetType()) {
-          interpreter = i as IVRPDataInterpreter;
-          break;
-        }
-      }
-
-      if (interpreter == null)
-        throw new ArgumentException("No interpreter found for the VRP type");
-      Load(data, interpreter);
+      var interpreterDataType = data.GetType();
+      var interpreterType = typeof(IVRPDataInterpreter<>).MakeGenericType(interpreterDataType);
+
+      var interpreters = ApplicationManager.Manager.GetTypes(interpreterType);
+
+      var concreteInterpreter = interpreters.Single(t => GetInterpreterDataType(t) == interpreterDataType);
+
+      Load(data, (IVRPDataInterpreter)Activator.CreateInstance(concreteInterpreter));
+    }
+
+    private Type GetInterpreterDataType(Type type) {
+      var parentInterfaces = type.BaseType.GetInterfaces();
+      var interfaces = type.GetInterfaces().Except(parentInterfaces);
+
+      var interpreterInterface = interfaces.Single(i => typeof(IVRPDataInterpreter).IsAssignableFrom(i));
+      return interpreterInterface.GetGenericArguments()[0];
     }
 
Index: /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.Designer.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.Designer.cs	(revision 11009)
@@ -0,0 +1,162 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Windows.Forms;
+
+namespace HeuristicLab.Scripting.Views {
+  partial class CSharpScriptView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      this.startStopButton = new System.Windows.Forms.Button();
+      this.splitContainer2 = new System.Windows.Forms.SplitContainer();
+      this.variableStoreView = new HeuristicLab.Scripting.Views.VariableStoreView();
+      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
+      this.splitContainer2.Panel1.SuspendLayout();
+      this.splitContainer2.Panel2.SuspendLayout();
+      this.splitContainer2.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      this.nameTextBox.Location = new System.Drawing.Point(60, 0);
+      this.nameTextBox.Size = new System.Drawing.Size(750, 20);
+      // 
+      // infoLabel
+      // 
+      this.infoLabel.Location = new System.Drawing.Point(816, 4);
+      // 
+      // startStopButton
+      // 
+      this.startStopButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Play;
+      this.startStopButton.Location = new System.Drawing.Point(36, 26);
+      this.startStopButton.Name = "startStopButton";
+      this.startStopButton.Size = new System.Drawing.Size(24, 24);
+      this.startStopButton.TabIndex = 1;
+      this.startStopButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+      this.toolTip.SetToolTip(this.startStopButton, "Run (F5)");
+      this.startStopButton.UseVisualStyleBackColor = true;
+      this.startStopButton.Click += new System.EventHandler(this.StartStopButtonOnClick);
+      // 
+      // splitContainer2
+      // 
+      this.splitContainer2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.splitContainer2.Location = new System.Drawing.Point(3, 56);
+      this.splitContainer2.Name = "splitContainer2";
+      // 
+      // splitContainer2.Panel1
+      // 
+      this.splitContainer2.Panel1.Controls.Add(this.splitContainer1);
+      // 
+      // splitContainer2.Panel2
+      // 
+      this.splitContainer2.Panel2.Controls.Add(this.variableStoreView);
+      this.splitContainer2.Panel2.Controls.Add(this.viewHost);
+      this.splitContainer2.Size = new System.Drawing.Size(829, 543);
+      this.splitContainer2.SplitterDistance = 637;
+      this.splitContainer2.TabIndex = 7;
+      //
+      // splitContainer1
+      //
+      this.splitContainer1.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer1.Dock = DockStyle.Fill;
+      // 
+      // variableStoreView
+      // 
+      this.variableStoreView.Caption = "ItemCollection View";
+      this.variableStoreView.Content = null;
+      this.variableStoreView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.variableStoreView.Location = new System.Drawing.Point(0, 0);
+      this.variableStoreView.Name = "variableStoreView";
+      this.variableStoreView.ReadOnly = false;
+      this.variableStoreView.Size = new System.Drawing.Size(188, 543);
+      this.variableStoreView.TabIndex = 0;
+      // 
+      // viewHost
+      // 
+      this.viewHost.Caption = "View";
+      this.viewHost.Content = null;
+      this.viewHost.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.viewHost.Enabled = false;
+      this.viewHost.Location = new System.Drawing.Point(0, 0);
+      this.viewHost.Name = "viewHost";
+      this.viewHost.ReadOnly = false;
+      this.viewHost.Size = new System.Drawing.Size(188, 543);
+      this.viewHost.TabIndex = 0;
+      this.viewHost.ViewsLabelVisible = true;
+      this.viewHost.ViewType = null;
+      // 
+      // ScriptView
+      // 
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.splitContainer2);
+      this.Controls.Add(this.startStopButton);
+      this.Name = "ScriptView";
+      this.Size = new System.Drawing.Size(835, 602);
+      this.Controls.SetChildIndex(this.startStopButton, 0);
+      this.Controls.SetChildIndex(this.splitContainer2, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      this.splitContainer2.Panel1.ResumeLayout(false);
+      this.splitContainer2.Panel2.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
+      this.splitContainer2.ResumeLayout(false);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    protected System.Windows.Forms.Button startStopButton;
+    protected System.Windows.Forms.SplitContainer splitContainer2;
+    protected MainForm.WindowsForms.ViewHost viewHost;
+    protected VariableStoreView variableStoreView;
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.cs	(revision 11009)
@@ -0,0 +1,141 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.Windows.Forms;
+using HeuristicLab.Common;
+using HeuristicLab.Common.Resources;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Scripting.Views {
+
+  [View("C# Script View")]
+  [Content(typeof(CSharpScript), true)]
+  public partial class CSharpScriptView : ScriptView {
+    protected bool Running { get; set; }
+
+    public new CSharpScript Content {
+      get { return (CSharpScript)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public CSharpScriptView() {
+      InitializeComponent();
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ScriptExecutionStarted += ContentOnScriptExecutionStarted;
+      Content.ScriptExecutionFinished += ContentOnScriptExecutionFinished;
+      Content.ConsoleOutputChanged += ContentOnConsoleOutputChanged;
+    }
+
+    protected override void DeregisterContentEvents() {
+      Content.ScriptExecutionStarted -= ContentOnScriptExecutionStarted;
+      Content.ScriptExecutionFinished -= ContentOnScriptExecutionFinished;
+      Content.ConsoleOutputChanged -= ContentOnConsoleOutputChanged;
+      base.DeregisterContentEvents();
+    }
+
+    #region Content event handlers
+    protected virtual void ContentOnScriptExecutionStarted(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke((Action<object, EventArgs>)ContentOnScriptExecutionStarted, sender, e);
+      else {
+        Locked = true;
+        ReadOnly = true;
+        startStopButton.Image = VSImageLibrary.Stop;
+        toolTip.SetToolTip(startStopButton, "Stop (Shift+F5)");
+        infoTabControl.SelectedTab = outputTabPage;
+      }
+    }
+    protected virtual void ContentOnScriptExecutionFinished(object sender, EventArgs<Exception> e) {
+      if (InvokeRequired)
+        Invoke((Action<object, EventArgs<Exception>>)ContentOnScriptExecutionFinished, sender, e);
+      else {
+        Locked = false;
+        ReadOnly = false;
+        startStopButton.Image = VSImageLibrary.Play;
+        toolTip.SetToolTip(startStopButton, "Run (F5)");
+        Running = false;
+        var ex = e.Value;
+        if (ex != null)
+          PluginInfrastructure.ErrorHandling.ShowErrorDialog(this, ex);
+      }
+    }
+    protected virtual void ContentOnConsoleOutputChanged(object sender, EventArgs<string> e) {
+      if (InvokeRequired)
+        Invoke((Action<object, EventArgs<string>>)ContentOnConsoleOutputChanged, sender, e);
+      else {
+        outputTextBox.AppendText(e.Value);
+      }
+    }
+    #endregion
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        variableStoreView.Content = null;
+      } else {
+        variableStoreView.Content = Content.VariableStore;
+      }
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      startStopButton.Enabled = Content != null && (!Locked || Running);
+    }
+
+    protected virtual void StartStopButtonOnClick(object sender, EventArgs e) {
+      if (Running) {
+        Content.Kill();
+      } else
+        if (Compile()) {
+          outputTextBox.Clear();
+          Content.Execute();
+          Running = true;
+        }
+    }
+
+    #region global HotKeys
+    protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
+      switch (keyData) {
+        case Keys.F5:
+          if (Content != null && !Locked && !Running) {
+            if (Compile()) {
+              outputTextBox.Clear();
+              Content.Execute();
+              Running = true;
+            }
+          }
+          return true;
+        case Keys.F5 | Keys.Shift:
+          if (Running) Content.Kill();
+          return true;
+        case Keys.F6:
+          if (!Running) Compile();
+          return true;
+      }
+      return base.ProcessCmdKey(ref msg, keyData); ;
+    }
+    #endregion
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/HeuristicLab.Scripting.Views-3.3.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/HeuristicLab.Scripting.Views-3.3.csproj	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/HeuristicLab.Scripting.Views-3.3.csproj	(revision 11009)
@@ -86,4 +86,10 @@
   <ItemGroup>
     <None Include="Plugin.cs.frame" />
+    <Compile Include="CSharpScriptView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="CSharpScriptView.Designer.cs">
+      <DependentUpon>CSharpScriptView.cs</DependentUpon>
+    </Compile>
     <Compile Include="ScriptView.cs">
       <SubType>UserControl</SubType>
Index: /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/ScriptView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/ScriptView.Designer.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/ScriptView.Designer.cs	(revision 11009)
@@ -46,6 +46,12 @@
     private void InitializeComponent() {
       this.components = new System.ComponentModel.Container();
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ScriptView));
       this.compilationLabel = new System.Windows.Forms.Label();
-      this.startStopButton = new System.Windows.Forms.Button();
+      this.imageList = new System.Windows.Forms.ImageList(this.components);
+      this.compileButton = new System.Windows.Forms.Button();
+      this.infoTabControl = new System.Windows.Forms.TabControl();
+      this.outputTabPage = new System.Windows.Forms.TabPage();
+      this.outputTextBox = new System.Windows.Forms.TextBox();
+      this.errorListTabPage = new System.Windows.Forms.TabPage();
       this.errorListView = new System.Windows.Forms.ListView();
       this.iconColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@@ -55,27 +61,14 @@
       this.columnColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
       this.descriptionColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
-      this.imageList = new System.Windows.Forms.ImageList(this.components);
       this.codeEditor = new HeuristicLab.CodeEditor.CodeEditor();
       this.splitContainer1 = new System.Windows.Forms.SplitContainer();
-      this.splitContainer2 = new System.Windows.Forms.SplitContainer();
-      this.infoTabControl = new System.Windows.Forms.TabControl();
-      this.outputTabPage = new System.Windows.Forms.TabPage();
-      this.outputTextBox = new System.Windows.Forms.TextBox();
-      this.errorListTabPage = new System.Windows.Forms.TabPage();
-      this.variableStoreView = new HeuristicLab.Scripting.Views.VariableStoreView();
-      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
-      this.compileButton = new System.Windows.Forms.Button();
       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.infoTabControl.SuspendLayout();
+      this.outputTabPage.SuspendLayout();
+      this.errorListTabPage.SuspendLayout();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
       this.splitContainer1.Panel1.SuspendLayout();
       this.splitContainer1.Panel2.SuspendLayout();
       this.splitContainer1.SuspendLayout();
-      ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
-      this.splitContainer2.Panel1.SuspendLayout();
-      this.splitContainer2.Panel2.SuspendLayout();
-      this.splitContainer2.SuspendLayout();
-      this.infoTabControl.SuspendLayout();
-      this.outputTabPage.SuspendLayout();
-      this.errorListTabPage.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -84,6 +77,6 @@
       this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
       this.errorProvider.SetIconPadding(this.nameTextBox, 2);
-      this.nameTextBox.Location = new System.Drawing.Point(60, 0);
-      this.nameTextBox.Size = new System.Drawing.Size(750, 20);
+      this.nameTextBox.Location = new System.Drawing.Point(69, 0);
+      this.nameTextBox.Size = new System.Drawing.Size(741, 20);
       // 
       // infoLabel
@@ -101,15 +94,67 @@
       this.compilationLabel.Text = "Not compiled";
       // 
-      // startStopButton
-      // 
-      this.startStopButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Play;
-      this.startStopButton.Location = new System.Drawing.Point(36, 26);
-      this.startStopButton.Name = "startStopButton";
-      this.startStopButton.Size = new System.Drawing.Size(24, 24);
-      this.startStopButton.TabIndex = 1;
-      this.startStopButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
-      this.toolTip.SetToolTip(this.startStopButton, "Run (F5)");
-      this.startStopButton.UseVisualStyleBackColor = true;
-      this.startStopButton.Click += new System.EventHandler(this.startStopButton_Click);
+      // imageList
+      // 
+      this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+      this.imageList.ImageSize = new System.Drawing.Size(16, 16);
+      this.imageList.TransparentColor = System.Drawing.Color.Transparent;
+      // 
+      // compileButton
+      // 
+      this.compileButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Script;
+      this.compileButton.Location = new System.Drawing.Point(6, 26);
+      this.compileButton.Name = "compileButton";
+      this.compileButton.Size = new System.Drawing.Size(24, 24);
+      this.compileButton.TabIndex = 8;
+      this.compileButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
+      this.toolTip.SetToolTip(this.compileButton, "Compile (F6)");
+      this.compileButton.UseVisualStyleBackColor = true;
+      this.compileButton.Click += new System.EventHandler(this.CompileButtonOnClick);
+      // 
+      // infoTabControl
+      // 
+      this.infoTabControl.Controls.Add(this.outputTabPage);
+      this.infoTabControl.Controls.Add(this.errorListTabPage);
+      this.infoTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.infoTabControl.Location = new System.Drawing.Point(0, 0);
+      this.infoTabControl.Name = "infoTabControl";
+      this.infoTabControl.SelectedIndex = 0;
+      this.infoTabControl.Size = new System.Drawing.Size(832, 112);
+      this.infoTabControl.TabIndex = 1;
+      // 
+      // outputTabPage
+      // 
+      this.outputTabPage.Controls.Add(this.outputTextBox);
+      this.outputTabPage.Location = new System.Drawing.Point(4, 22);
+      this.outputTabPage.Name = "outputTabPage";
+      this.outputTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.outputTabPage.Size = new System.Drawing.Size(824, 86);
+      this.outputTabPage.TabIndex = 1;
+      this.outputTabPage.Text = "Output";
+      this.outputTabPage.UseVisualStyleBackColor = true;
+      // 
+      // outputTextBox
+      // 
+      this.outputTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.outputTextBox.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+      this.outputTextBox.Location = new System.Drawing.Point(3, 3);
+      this.outputTextBox.Multiline = true;
+      this.outputTextBox.Name = "outputTextBox";
+      this.outputTextBox.ReadOnly = true;
+      this.outputTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
+      this.outputTextBox.Size = new System.Drawing.Size(818, 80);
+      this.outputTextBox.TabIndex = 0;
+      this.outputTextBox.WordWrap = false;
+      // 
+      // errorListTabPage
+      // 
+      this.errorListTabPage.Controls.Add(this.errorListView);
+      this.errorListTabPage.Location = new System.Drawing.Point(4, 22);
+      this.errorListTabPage.Name = "errorListTabPage";
+      this.errorListTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.errorListTabPage.Size = new System.Drawing.Size(824, 86);
+      this.errorListTabPage.TabIndex = 0;
+      this.errorListTabPage.Text = "Error List";
+      this.errorListTabPage.UseVisualStyleBackColor = true;
       // 
       // errorListView
@@ -128,5 +173,5 @@
       this.errorListView.Location = new System.Drawing.Point(3, 3);
       this.errorListView.Name = "errorListView";
-      this.errorListView.Size = new System.Drawing.Size(623, 79);
+      this.errorListView.Size = new System.Drawing.Size(818, 80);
       this.errorListView.SmallImageList = this.imageList;
       this.errorListView.TabIndex = 0;
@@ -158,10 +203,4 @@
       this.descriptionColumnHeader.Text = "Description";
       // 
-      // imageList
-      // 
-      this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
-      this.imageList.ImageSize = new System.Drawing.Size(16, 16);
-      this.imageList.TransparentColor = System.Drawing.Color.Transparent;
-      // 
       // codeEditor
       // 
@@ -170,9 +209,9 @@
       this.codeEditor.Name = "codeEditor";
       this.codeEditor.Prefix = "";
-      this.codeEditor.Size = new System.Drawing.Size(637, 428);
+      this.codeEditor.Size = new System.Drawing.Size(832, 430);
       this.codeEditor.Suffix = "";
       this.codeEditor.TabIndex = 0;
       this.codeEditor.UserCode = "";
-      this.codeEditor.TextEditorTextChanged += new System.EventHandler(this.codeEditor_TextEditorTextChanged);
+      this.codeEditor.TextEditorTextChanged += new System.EventHandler(this.CodeEditorOnTextEditorTextChanged);
       // 
       // splitContainer1
@@ -181,149 +220,42 @@
             | System.Windows.Forms.AnchorStyles.Left)
             | System.Windows.Forms.AnchorStyles.Right)));
-      this.splitContainer1.Location = new System.Drawing.Point(3, 56);
+      this.splitContainer1.Location = new System.Drawing.Point(0, 56);
       this.splitContainer1.Name = "splitContainer1";
+      this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
       // 
       // splitContainer1.Panel1
       // 
-      this.splitContainer1.Panel1.Controls.Add(this.splitContainer2);
+      this.splitContainer1.Panel1.Controls.Add(this.codeEditor);
       // 
       // splitContainer1.Panel2
       // 
-      this.splitContainer1.Panel2.Controls.Add(this.variableStoreView);
-      this.splitContainer1.Panel2.Controls.Add(this.viewHost);
-      this.splitContainer1.Size = new System.Drawing.Size(829, 543);
-      this.splitContainer1.SplitterDistance = 637;
-      this.splitContainer1.TabIndex = 7;
-      // 
-      // splitContainer2
-      // 
-      this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.splitContainer2.Location = new System.Drawing.Point(0, 0);
-      this.splitContainer2.Name = "splitContainer2";
-      this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
-      // 
-      // splitContainer2.Panel1
-      // 
-      this.splitContainer2.Panel1.Controls.Add(this.codeEditor);
-      // 
-      // splitContainer2.Panel2
-      // 
-      this.splitContainer2.Panel2.Controls.Add(this.infoTabControl);
-      this.splitContainer2.Size = new System.Drawing.Size(637, 543);
-      this.splitContainer2.SplitterDistance = 428;
-      this.splitContainer2.TabIndex = 5;
-      // 
-      // infoTabControl
-      // 
-      this.infoTabControl.Controls.Add(this.outputTabPage);
-      this.infoTabControl.Controls.Add(this.errorListTabPage);
-      this.infoTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.infoTabControl.Location = new System.Drawing.Point(0, 0);
-      this.infoTabControl.Name = "infoTabControl";
-      this.infoTabControl.SelectedIndex = 0;
-      this.infoTabControl.Size = new System.Drawing.Size(637, 111);
-      this.infoTabControl.TabIndex = 1;
-      // 
-      // outputTabPage
-      // 
-      this.outputTabPage.Controls.Add(this.outputTextBox);
-      this.outputTabPage.Location = new System.Drawing.Point(4, 22);
-      this.outputTabPage.Name = "outputTabPage";
-      this.outputTabPage.Padding = new System.Windows.Forms.Padding(3);
-      this.outputTabPage.Size = new System.Drawing.Size(629, 85);
-      this.outputTabPage.TabIndex = 1;
-      this.outputTabPage.Text = "Output";
-      this.outputTabPage.UseVisualStyleBackColor = true;
-      // 
-      // outputTextBox
-      // 
-      this.outputTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.outputTextBox.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-      this.outputTextBox.Location = new System.Drawing.Point(3, 3);
-      this.outputTextBox.Multiline = true;
-      this.outputTextBox.Name = "outputTextBox";
-      this.outputTextBox.ReadOnly = true;
-      this.outputTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
-      this.outputTextBox.Size = new System.Drawing.Size(623, 79);
-      this.outputTextBox.TabIndex = 0;
-      this.outputTextBox.WordWrap = false;
-      // 
-      // errorListTabPage
-      // 
-      this.errorListTabPage.Controls.Add(this.errorListView);
-      this.errorListTabPage.Location = new System.Drawing.Point(4, 22);
-      this.errorListTabPage.Name = "errorListTabPage";
-      this.errorListTabPage.Padding = new System.Windows.Forms.Padding(3);
-      this.errorListTabPage.Size = new System.Drawing.Size(629, 85);
-      this.errorListTabPage.TabIndex = 0;
-      this.errorListTabPage.Text = "Error List";
-      this.errorListTabPage.UseVisualStyleBackColor = true;
-      // 
-      // variableStoreView
-      // 
-      this.variableStoreView.Caption = "ItemCollection View";
-      this.variableStoreView.Content = null;
-      this.variableStoreView.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.variableStoreView.Location = new System.Drawing.Point(0, 0);
-      this.variableStoreView.Name = "variableStoreView";
-      this.variableStoreView.ReadOnly = false;
-      this.variableStoreView.Size = new System.Drawing.Size(188, 543);
-      this.variableStoreView.TabIndex = 0;
-      // 
-      // viewHost
-      // 
-      this.viewHost.Caption = "View";
-      this.viewHost.Content = null;
-      this.viewHost.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.viewHost.Enabled = false;
-      this.viewHost.Location = new System.Drawing.Point(0, 0);
-      this.viewHost.Name = "viewHost";
-      this.viewHost.ReadOnly = false;
-      this.viewHost.Size = new System.Drawing.Size(188, 543);
-      this.viewHost.TabIndex = 0;
-      this.viewHost.ViewsLabelVisible = true;
-      this.viewHost.ViewType = null;
-      // 
-      // compileButton
-      // 
-      this.compileButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Script;
-      this.compileButton.Location = new System.Drawing.Point(6, 26);
-      this.compileButton.Name = "compileButton";
-      this.compileButton.Size = new System.Drawing.Size(24, 24);
-      this.compileButton.TabIndex = 8;
-      this.compileButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
-      this.toolTip.SetToolTip(this.compileButton, "Compile (F6)");
-      this.compileButton.UseVisualStyleBackColor = true;
-      this.compileButton.Click += new System.EventHandler(this.compileButton_Click);
+      this.splitContainer1.Panel2.Controls.Add(this.infoTabControl);
+      this.splitContainer1.Size = new System.Drawing.Size(832, 546);
+      this.splitContainer1.SplitterDistance = 430;
+      this.splitContainer1.TabIndex = 9;
       // 
       // ScriptView
       // 
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.splitContainer1);
       this.Controls.Add(this.compileButton);
-      this.Controls.Add(this.splitContainer1);
-      this.Controls.Add(this.startStopButton);
       this.Controls.Add(this.compilationLabel);
       this.Name = "ScriptView";
       this.Size = new System.Drawing.Size(835, 602);
       this.Controls.SetChildIndex(this.compilationLabel, 0);
-      this.Controls.SetChildIndex(this.startStopButton, 0);
+      this.Controls.SetChildIndex(this.compileButton, 0);
       this.Controls.SetChildIndex(this.splitContainer1, 0);
       this.Controls.SetChildIndex(this.nameLabel, 0);
       this.Controls.SetChildIndex(this.nameTextBox, 0);
       this.Controls.SetChildIndex(this.infoLabel, 0);
-      this.Controls.SetChildIndex(this.compileButton, 0);
       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.infoTabControl.ResumeLayout(false);
+      this.outputTabPage.ResumeLayout(false);
+      this.outputTabPage.PerformLayout();
+      this.errorListTabPage.ResumeLayout(false);
       this.splitContainer1.Panel1.ResumeLayout(false);
       this.splitContainer1.Panel2.ResumeLayout(false);
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
       this.splitContainer1.ResumeLayout(false);
-      this.splitContainer2.Panel1.ResumeLayout(false);
-      this.splitContainer2.Panel2.ResumeLayout(false);
-      ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
-      this.splitContainer2.ResumeLayout(false);
-      this.infoTabControl.ResumeLayout(false);
-      this.outputTabPage.ResumeLayout(false);
-      this.outputTabPage.PerformLayout();
-      this.errorListTabPage.ResumeLayout(false);
       this.ResumeLayout(false);
       this.PerformLayout();
@@ -333,24 +265,20 @@
     #endregion
 
-    private System.Windows.Forms.Label compilationLabel;
-    private System.Windows.Forms.Button startStopButton;
-    private System.Windows.Forms.ListView errorListView;
-    private System.Windows.Forms.ColumnHeader descriptionColumnHeader;
-    private System.Windows.Forms.ColumnHeader lineColumnHeader;
-    private System.Windows.Forms.ColumnHeader columnColumnHeader;
-    private CodeEditor.CodeEditor codeEditor;
-    private System.Windows.Forms.SplitContainer splitContainer1;
-    private System.Windows.Forms.SplitContainer splitContainer2;
-    private MainForm.WindowsForms.ViewHost viewHost;
-    private VariableStoreView variableStoreView;
-    private System.Windows.Forms.ColumnHeader errorNumberColumnHeader;
-    private System.Windows.Forms.ColumnHeader categoryColumnHeader;
-    private System.Windows.Forms.TabControl infoTabControl;
-    private System.Windows.Forms.TabPage errorListTabPage;
-    private System.Windows.Forms.TabPage outputTabPage;
-    private System.Windows.Forms.TextBox outputTextBox;
-    private System.Windows.Forms.Button compileButton;
-    private System.Windows.Forms.ColumnHeader iconColumnHeader;
-    private System.Windows.Forms.ImageList imageList;
+    protected System.Windows.Forms.Label compilationLabel;
+    protected System.Windows.Forms.Button compileButton;
+    protected System.Windows.Forms.ImageList imageList;
+    protected System.Windows.Forms.TabControl infoTabControl;
+    protected System.Windows.Forms.TabPage outputTabPage;
+    protected System.Windows.Forms.TextBox outputTextBox;
+    protected System.Windows.Forms.TabPage errorListTabPage;
+    protected System.Windows.Forms.ListView errorListView;
+    protected System.Windows.Forms.ColumnHeader iconColumnHeader;
+    protected System.Windows.Forms.ColumnHeader categoryColumnHeader;
+    protected System.Windows.Forms.ColumnHeader errorNumberColumnHeader;
+    protected System.Windows.Forms.ColumnHeader lineColumnHeader;
+    protected System.Windows.Forms.ColumnHeader columnColumnHeader;
+    protected System.Windows.Forms.ColumnHeader descriptionColumnHeader;
+    protected CodeEditor.CodeEditor codeEditor;
+    protected System.Windows.Forms.SplitContainer splitContainer1;
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/ScriptView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/ScriptView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/ScriptView.cs	(revision 11009)
@@ -26,5 +26,4 @@
 using System.Linq;
 using System.Windows.Forms;
-using HeuristicLab.Common;
 using HeuristicLab.Common.Resources;
 using HeuristicLab.Core.Views;
@@ -36,9 +35,7 @@
   [Content(typeof(Script), true)]
   public partial class ScriptView : NamedItemView {
-    private bool running;
-
     public new Script Content {
       get { return (Script)base.Content; }
-      set { base.Content = (Script)value; }
+      set { base.Content = value; }
     }
 
@@ -46,58 +43,19 @@
       InitializeComponent();
       errorListView.SmallImageList.Images.AddRange(new Image[] { VSImageLibrary.Warning, VSImageLibrary.Error });
-      AdjustErrorListViewColumnSizes();
     }
 
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
-      Content.CodeChanged += Content_CodeChanged;
-      Content.ScriptExecutionStarted += Content_ScriptExecutionStarted;
-      Content.ScriptExecutionFinished += Content_ScriptExecutionFinished;
-      Content.ConsoleOutputChanged += Content_ConsoleOutputChanged;
+      Content.CodeChanged += ContentOnCodeChanged;
     }
 
     protected override void DeregisterContentEvents() {
-      Content.CodeChanged -= Content_CodeChanged;
-      Content.ScriptExecutionStarted -= Content_ScriptExecutionStarted;
-      Content.ScriptExecutionFinished -= Content_ScriptExecutionFinished;
-      Content.ConsoleOutputChanged -= Content_ConsoleOutputChanged;
+      Content.CodeChanged -= ContentOnCodeChanged;
       base.DeregisterContentEvents();
     }
 
-    #region Content event handlers
-    private void Content_CodeChanged(object sender, EventArgs e) {
+    protected virtual void ContentOnCodeChanged(object sender, EventArgs e) {
       codeEditor.UserCode = Content.Code;
     }
-    private void Content_ScriptExecutionStarted(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke((Action<object, EventArgs>)Content_ScriptExecutionStarted, sender, e);
-      else {
-        Locked = true;
-        ReadOnly = true;
-        startStopButton.Image = VSImageLibrary.Stop;
-        infoTabControl.SelectedTab = outputTabPage;
-      }
-    }
-    private void Content_ScriptExecutionFinished(object sender, EventArgs<Exception> e) {
-      if (InvokeRequired)
-        Invoke((Action<object, EventArgs<Exception>>)Content_ScriptExecutionFinished, sender, e);
-      else {
-        Locked = false;
-        ReadOnly = false;
-        startStopButton.Image = VSImageLibrary.Play;
-        running = false;
-        var ex = e.Value;
-        if (ex != null)
-          PluginInfrastructure.ErrorHandling.ShowErrorDialog(this, ex);
-      }
-    }
-    private void Content_ConsoleOutputChanged(object sender, EventArgs<string> e) {
-      if (InvokeRequired)
-        Invoke((Action<object, EventArgs<string>>)Content_ConsoleOutputChanged, sender, e);
-      else {
-        outputTextBox.AppendText(e.Value);
-      }
-    }
-    #endregion
 
     protected override void OnContentChanged() {
@@ -105,10 +63,8 @@
       if (Content == null) {
         codeEditor.UserCode = string.Empty;
-        variableStoreView.Content = null;
       } else {
         codeEditor.UserCode = Content.Code;
         foreach (var asm in Content.GetAssemblies())
           codeEditor.AddAssembly(asm);
-        variableStoreView.Content = Content.VariableStore;
         if (Content.CompileErrors == null) {
           compilationLabel.ForeColor = SystemColors.ControlDarkDark;
@@ -127,56 +83,26 @@
       base.SetEnabledStateOfControls();
       compileButton.Enabled = Content != null && !Locked && !ReadOnly;
-      startStopButton.Enabled = Content != null && (!Locked || running);
       codeEditor.Enabled = Content != null && !Locked && !ReadOnly;
     }
 
-    #region Child Control event handlers
-    private void compileButton_Click(object sender, EventArgs e) {
+    protected virtual void CompileButtonOnClick(object sender, EventArgs e) {
       Compile();
     }
 
-    private void startStopButton_Click(object sender, EventArgs e) {
-      if (running) {
-        Content.Kill();
-      } else
-        if (Compile()) {
-          outputTextBox.Clear();
-          Content.Execute();
-          running = true;
-        }
-    }
-
-    private void codeEditor_TextEditorTextChanged(object sender, EventArgs e) {
+    protected virtual void CodeEditorOnTextEditorTextChanged(object sender, EventArgs e) {
+      if (Content == null) return;
       Content.Code = codeEditor.UserCode;
     }
-    #endregion
-
-    #region global HotKeys
     protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
       switch (keyData) {
-        case Keys.F5:
-          if (Content != null && !Locked) {
-            if (Compile()) {
-              outputTextBox.Clear();
-              Content.Execute();
-              running = true;
-            } else
-              infoTabControl.SelectedTab = errorListTabPage;
-          }
-          break;
-        case Keys.F5 | Keys.Shift:
-          if (running) Content.Kill();
-          break;
         case Keys.F6:
-          if (!Compile() || Content.CompileErrors.HasWarnings)
-            infoTabControl.SelectedTab = errorListTabPage;
-          break;
+          if (Content != null && !Locked)
+            Compile();
+          return true;
       }
       return base.ProcessCmdKey(ref msg, keyData);
     }
-    #endregion
 
-    #region Auxiliary functions
-    private bool Compile() {
+    public virtual bool Compile() {
       ReadOnly = true;
       Locked = true;
@@ -188,8 +114,15 @@
         return true;
       } catch {
-        outputTextBox.AppendText("Compilation failed.");
-        return false;
+        if (Content.CompileErrors.HasErrors) {
+          outputTextBox.AppendText("Compilation failed.");
+          return false;
+        } else {
+          outputTextBox.AppendText("Compilation succeeded.");
+          return true;
+        }
       } finally {
         ShowCompilationResults();
+        if (Content.CompileErrors.Count > 0)
+          infoTabControl.SelectedTab = errorListTabPage;
         ReadOnly = false;
         Locked = false;
@@ -197,7 +130,6 @@
       }
     }
-    #endregion
 
-    private void ShowCompilationResults() {
+    protected virtual void ShowCompilationResults() {
       if (Content.CompileErrors.Count == 0) return;
       var msgs = Content.CompileErrors.OfType<CompilerError>()
@@ -220,8 +152,7 @@
     }
 
-    private void AdjustErrorListViewColumnSizes() {
+    protected virtual void AdjustErrorListViewColumnSizes() {
       foreach (ColumnHeader ch in errorListView.Columns)
-        // adjusts the column width to the width of the column
-        // header or the column content, whichever is greater
+        // adjusts the column width to the width of the column header
         ch.Width = -2;
     }
Index: /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/VariableStoreView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/VariableStoreView.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Scripting.Views/3.3/VariableStoreView.cs	(revision 11009)
@@ -21,5 +21,4 @@
 
 using System;
-using System.Collections;
 using System.Collections.Generic;
 using System.Drawing;
@@ -220,11 +219,11 @@
 
         if (items.Count > 0) {
-          DataObject data = new DataObject();
+          var data = new DataObject();
           if (items.Count == 1) data.SetData(HeuristicLab.Common.Constants.DragDropDataFormat, items[0]);
           else data.SetData(HeuristicLab.Common.Constants.DragDropDataFormat, items);
           if (ReadOnly) {
-            DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link);
+            DoDragDrop(data, DragDropEffects.Copy);
           } else {
-            DragDropEffects result = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link | DragDropEffects.Move);
+            var result = DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link | DragDropEffects.Move);
             if ((result & DragDropEffects.Move) == DragDropEffects.Move) {
               foreach (string item in items) Content.Remove(item);
@@ -235,13 +234,5 @@
     }
     protected virtual void variableListView_DragEnter(object sender, DragEventArgs e) {
-      validDragOperation = false;
-      if (!Locked && !ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is object)) {
-        validDragOperation = true;
-      } else if (!Locked && !ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable)) {
-        validDragOperation = true;
-        IEnumerable items = (IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
-        foreach (object item in items)
-          validDragOperation = validDragOperation && (item is object);
-      }
+      validDragOperation = !Locked && !ReadOnly && e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) != null;
     }
     protected virtual void variableListView_DragOver(object sender, DragEventArgs e) {
@@ -257,33 +248,14 @@
     protected virtual void variableListView_DragDrop(object sender, DragEventArgs e) {
       if (e.Effect != DragDropEffects.None) {
-        if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable) {
-          IEnumerable<object> items = ((IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat)).Cast<object>();
-          if (e.Effect.HasFlag(DragDropEffects.Copy)) {
-            var cloner = new Cloner();
-            var clonedItems = new List<object>();
-            foreach (var item in items) {
-              var dc = item as IDeepCloneable;
-              clonedItems.Add(dc != null ? cloner.Clone(dc) : item);
-            }
-            items = clonedItems;
-          }
-          foreach (var item in items) {
-            string name = GenerateNewVariableName();
-            Content.Add(name, item);
-            var listViewItem = variableListView.FindItemWithText(name);
-            listViewItem.BeginEdit();
-          }
-        } else {
-          object item = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
-          if (e.Effect.HasFlag(DragDropEffects.Copy)) {
-            var cloner = new Cloner();
-            var dc = item as IDeepCloneable;
-            if (dc != null) item = cloner.Clone(dc);
-          }
-          string name = GenerateNewVariableName();
-          Content.Add(name, item);
-          var listViewItem = variableListView.FindItemWithText(name);
-          listViewItem.BeginEdit();
-        }
+        object item = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+        if (e.Effect.HasFlag(DragDropEffects.Copy)) {
+          var cloner = new Cloner();
+          var dc = item as IDeepCloneable;
+          if (dc != null) item = cloner.Clone(dc);
+        }
+        string name = GenerateNewVariableName();
+        Content.Add(name, item);
+        var listViewItem = variableListView.FindItemWithText(name);
+        listViewItem.BeginEdit();
       }
     }
@@ -423,5 +395,5 @@
       string toolTipText = string.Join(Environment.NewLine, lines);
       if (!serializable)
-        toolTipText += Environment.NewLine + "CAUTION: Type is not serializable!";
+        toolTipText = "Caution: Type is not serializable!" + Environment.NewLine + toolTipText;
       return toolTipText;
     }
Index: /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/CSharpScript.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/CSharpScript.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/CSharpScript.cs	(revision 11009)
@@ -0,0 +1,165 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Threading;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Scripting {
+  [Item("C# Script", "An empty C# script.")]
+  [Creatable("Scripts")]
+  [StorableClass]
+  public class CSharpScript : Script, IStorableContent {
+    #region Constants
+    protected const string ExecuteMethodName = "Execute";
+    protected override string CodeTemplate {
+      get {
+        return @"// use 'vars' to access variables in the script's variable store (e.g. vars.x = 5)
+// use 'vars.Contains(string)' to check if a variable exists
+// use 'vars.Clear()' to remove all variables
+// use 'foreach (KeyValuePair<string, object> v in vars) { ... }' to iterate over all variables
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+
+public class MyScript : HeuristicLab.Scripting.CSharpScriptBase {
+  public override void Main() {
+    // type your code here
+  }
+
+  // implement further classes and methods
+
+}";
+      }
+    }
+    #endregion
+
+    #region Fields & Properties
+    private CSharpScriptBase compiledScript;
+
+    public string Filename { get; set; }
+
+    [Storable]
+    private VariableStore variableStore;
+    public VariableStore VariableStore {
+      get { return variableStore; }
+    }
+    #endregion
+
+    #region Construction & Initialization
+    [StorableConstructor]
+    protected CSharpScript(bool deserializing) : base(deserializing) { }
+    protected CSharpScript(CSharpScript original, Cloner cloner)
+      : base(original, cloner) {
+      variableStore = new VariableStore();
+    }
+    public CSharpScript() {
+      variableStore = new VariableStore();
+      Code = CodeTemplate;
+    }
+    public CSharpScript(string code)
+      : base(code) {
+      variableStore = new VariableStore();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new CSharpScript(this, cloner);
+    }
+    #endregion
+
+    protected virtual void RegisterScriptEvents() {
+      if (compiledScript != null)
+        compiledScript.ConsoleOutputChanged += CompiledScriptOnConsoleOutputChanged;
+    }
+
+    protected virtual void DeregisterScriptEvents() {
+      if (compiledScript != null)
+        compiledScript.ConsoleOutputChanged -= CompiledScriptOnConsoleOutputChanged;
+    }
+
+    #region Compilation
+
+    public override Assembly Compile() {
+      DeregisterScriptEvents();
+      compiledScript = null;
+      var assembly = base.Compile();
+      var types = assembly.GetTypes();
+      compiledScript = (CSharpScriptBase)Activator.CreateInstance(types.Single(x => typeof(CSharpScriptBase).IsAssignableFrom(x)));
+      RegisterScriptEvents();
+      return assembly;
+    }
+    #endregion
+
+    private Thread scriptThread;
+    public virtual void Execute() {
+      if (compiledScript == null) return;
+      scriptThread = new Thread(() => {
+        Exception ex = null;
+        try {
+          OnScriptExecutionStarted();
+          compiledScript.Execute(VariableStore);
+        } catch (ThreadAbortException) {
+          // the execution was cancelled by the user
+        } catch (Exception e) {
+          ex = e;
+        } finally {
+          OnScriptExecutionFinished(ex);
+        }
+      });
+      scriptThread.Start();
+    }
+
+    public virtual void Kill() {
+      if (scriptThread.IsAlive)
+        scriptThread.Abort();
+    }
+
+    protected virtual void CompiledScriptOnConsoleOutputChanged(object sender, EventArgs<string> e) {
+      OnConsoleOutputChanged(e.Value);
+    }
+
+    public event EventHandler ScriptExecutionStarted;
+    protected virtual void OnScriptExecutionStarted() {
+      var handler = ScriptExecutionStarted;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    public event EventHandler<EventArgs<Exception>> ScriptExecutionFinished;
+    protected virtual void OnScriptExecutionFinished(Exception e) {
+      var handler = ScriptExecutionFinished;
+      if (handler != null) handler(this, new EventArgs<Exception>(e));
+    }
+
+    public event EventHandler<EventArgs<string>> ConsoleOutputChanged;
+    protected virtual void OnConsoleOutputChanged(string args) {
+      var handler = ConsoleOutputChanged;
+      if (handler != null) handler(this, new EventArgs<string>(args));
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/CSharpScriptBase.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/CSharpScriptBase.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/CSharpScriptBase.cs	(revision 11009)
@@ -0,0 +1,108 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Text;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Scripting {
+  public abstract class CSharpScriptBase {
+    protected dynamic vars;
+
+    private readonly EventWriter console;
+    protected EventWriter Console {
+      get { return console; }
+    }
+
+    protected CSharpScriptBase() {
+      console = new EventWriter(this);
+    }
+
+    public abstract void Main();
+
+    internal void Execute(VariableStore variableStore) {
+      vars = new Variables(variableStore);
+      Main();
+    }
+
+    protected internal event EventHandler<EventArgs<string>> ConsoleOutputChanged;
+    private void OnConsoleOutputChanged(string args) {
+      var handler = ConsoleOutputChanged;
+      if (handler != null) handler(null, new EventArgs<string>(args));
+    }
+
+    protected class EventWriter : TextWriter {
+      private readonly CSharpScriptBase script;
+
+      public EventWriter(CSharpScriptBase script) {
+        this.script = script;
+      }
+
+      public override Encoding Encoding {
+        get { return Encoding.UTF8; }
+      }
+
+      #region Write/WriteLine Overrides
+      #region Write
+      public override void Write(bool value) { script.OnConsoleOutputChanged(value.ToString()); }
+      public override void Write(char value) { script.OnConsoleOutputChanged(value.ToString()); }
+      public override void Write(char[] buffer) { script.OnConsoleOutputChanged(new string(buffer)); }
+      public override void Write(char[] buffer, int index, int count) { script.OnConsoleOutputChanged(new string(buffer, index, count)); }
+      public override void Write(decimal value) { script.OnConsoleOutputChanged(value.ToString()); }
+      public override void Write(double value) { script.OnConsoleOutputChanged(value.ToString()); }
+      public override void Write(float value) { script.OnConsoleOutputChanged(value.ToString()); }
+      public override void Write(int value) { script.OnConsoleOutputChanged(value.ToString()); }
+      public override void Write(long value) { script.OnConsoleOutputChanged(value.ToString()); }
+      public override void Write(object value) { script.OnConsoleOutputChanged(value.ToString()); }
+      public override void Write(string value) { script.OnConsoleOutputChanged(value); }
+      public override void Write(string format, object arg0) { script.OnConsoleOutputChanged(string.Format(format, arg0)); }
+      public override void Write(string format, object arg0, object arg1) { script.OnConsoleOutputChanged(string.Format(format, arg0, arg0)); }
+      public override void Write(string format, object arg0, object arg1, object arg2) { script.OnConsoleOutputChanged(string.Format(format, arg0, arg1, arg2)); }
+      public override void Write(string format, params object[] arg) { script.OnConsoleOutputChanged(string.Format(format, arg)); }
+      public override void Write(uint value) { script.OnConsoleOutputChanged(value.ToString()); }
+      public override void Write(ulong value) { script.OnConsoleOutputChanged(value.ToString()); }
+      #endregion
+
+      #region WriteLine
+      public override void WriteLine() { script.OnConsoleOutputChanged(Environment.NewLine); }
+      public override void WriteLine(bool value) { script.OnConsoleOutputChanged(value + Environment.NewLine); }
+      public override void WriteLine(char value) { script.OnConsoleOutputChanged(value + Environment.NewLine); }
+      public override void WriteLine(char[] buffer) { script.OnConsoleOutputChanged(new string(buffer) + Environment.NewLine); }
+      public override void WriteLine(char[] buffer, int index, int count) { script.OnConsoleOutputChanged(new string(buffer, index, count) + Environment.NewLine); }
+      public override void WriteLine(decimal value) { script.OnConsoleOutputChanged(value + Environment.NewLine); }
+      public override void WriteLine(double value) { script.OnConsoleOutputChanged(value + Environment.NewLine); }
+      public override void WriteLine(float value) { script.OnConsoleOutputChanged(value + Environment.NewLine); }
+      public override void WriteLine(int value) { script.OnConsoleOutputChanged(value + Environment.NewLine); }
+      public override void WriteLine(long value) { script.OnConsoleOutputChanged(value + Environment.NewLine); }
+      public override void WriteLine(object value) { script.OnConsoleOutputChanged(value + Environment.NewLine); }
+      public override void WriteLine(string value) { script.OnConsoleOutputChanged(value + Environment.NewLine); }
+      public override void WriteLine(string format, object arg0) { script.OnConsoleOutputChanged(string.Format(format, arg0) + Environment.NewLine); }
+      public override void WriteLine(string format, object arg0, object arg1) { script.OnConsoleOutputChanged(string.Format(format, arg0, arg1) + Environment.NewLine); }
+      public override void WriteLine(string format, object arg0, object arg1, object arg2) { script.OnConsoleOutputChanged(string.Format(format, arg0, arg1, arg2) + Environment.NewLine); }
+      public override void WriteLine(string format, params object[] arg) { script.OnConsoleOutputChanged(string.Format(format, arg) + Environment.NewLine); }
+      public override void WriteLine(uint value) { script.OnConsoleOutputChanged(value + Environment.NewLine); }
+      public override void WriteLine(ulong value) { script.OnConsoleOutputChanged(value + Environment.NewLine); }
+      #endregion
+      #endregion
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/HeuristicLab.Scripting-3.3.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/HeuristicLab.Scripting-3.3.csproj	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/HeuristicLab.Scripting-3.3.csproj	(revision 11009)
@@ -85,8 +85,10 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="CSharpScript.cs" />
+    <Compile Include="Variables.cs" />
     <Compile Include="VariableStore.cs" />
     <None Include="Plugin.cs.frame" />
     <Compile Include="Script.cs" />
-    <Compile Include="UserScriptBase.cs" />
+    <Compile Include="CSharpScriptBase.cs" />
     <Compile Include="Plugin.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
Index: /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/Script.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/Script.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/Script.cs	(revision 11009)
@@ -29,6 +29,4 @@
 using System.Reflection;
 using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Common.Resources;
@@ -38,43 +36,13 @@
 
 namespace HeuristicLab.Scripting {
-  [Item("Script", "An empty C# script.")]
-  [Creatable("Scripts")]
   [StorableClass]
-  public sealed class Script : NamedItem, IStorableContent {
-    #region Constants
-    private const string ExecuteMethodName = "Execute";
-    private const string CodeTemplate =
-@"// use 'vars' to access global variables in the variable store
-
-using System;
-using System.Linq;
-using System.Collections.Generic;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-
-public class UserScript : HeuristicLab.Scripting.UserScriptBase {
-  public override void Main() {
-    // type your code here
-  }
-
-  // further classes and methods
-
-}";
-    #endregion
+  public class Script : NamedItem {
+    protected virtual string CodeTemplate {
+      get { return string.Empty; }
+    }
 
     #region Fields & Properties
-    private UserScriptBase compiledScript;
-
-    public string Filename { get; set; }
-
     public static new Image StaticItemImage {
       get { return VSImageLibrary.Script; }
-    }
-
-    [Storable]
-    private VariableStore variableStore;
-    public VariableStore VariableStore {
-      get { return variableStore; }
     }
 
@@ -86,12 +54,6 @@
         if (value == code) return;
         code = value;
-        compiledScript = null;
         OnCodeChanged();
       }
-    }
-
-    private string compilationUnitCode;
-    public string CompilationUnitCode {
-      get { return compilationUnitCode; }
     }
 
@@ -108,18 +70,18 @@
     #region Construction & Initialization
     [StorableConstructor]
-    private Script(bool deserializing) : base(deserializing) { }
-    private Script(Script original, Cloner cloner)
+    protected Script(bool deserializing) : base(deserializing) { }
+    protected Script(Script original, Cloner cloner)
       : base(original, cloner) {
       code = original.code;
-      variableStore = new VariableStore();
-      compilationUnitCode = original.compilationUnitCode;
       if (original.compileErrors != null)
         compileErrors = new CompilerErrorCollection(original.compileErrors);
     }
-
     public Script()
-      : base("Script", "A HeuristicLab script.") {
-      code = CodeTemplate;
-      variableStore = new VariableStore();
+      : base("Script", "An empty script.") {
+      code = string.Empty;
+    }
+    public Script(string code)
+      : this() {
+      this.code = code;
     }
 
@@ -129,22 +91,15 @@
     #endregion
 
-    private void RegisterScriptEvents() {
-      if (compiledScript == null) return;
-      compiledScript.ConsoleOutputChanged += compiledScript_ConsoleOutputChanged;
+    #region Compilation
+    protected virtual CSharpCodeProvider CodeProvider {
+      get {
+        return new CSharpCodeProvider(
+          new Dictionary<string, string> {
+                {"CompilerVersion", "v4.0"}, // support C# 4.0 syntax
+              });
+      }
     }
 
-    private void DeregisterScriptEvents() {
-      if (compiledScript == null) return;
-      compiledScript.ConsoleOutputChanged -= compiledScript_ConsoleOutputChanged;
-    }
-
-    #region Compilation
-    private CSharpCodeProvider codeProvider =
-      new CSharpCodeProvider(
-        new Dictionary<string, string> {
-          { "CompilerVersion", "v4.0" },  // support C# 4.0 syntax
-        });
-
-    private CompilerResults DoCompile() {
+    protected virtual CompilerResults DoCompile() {
       var parameters = new CompilerParameters {
         GenerateExecutable = false,
@@ -159,5 +114,5 @@
       var unit = CreateCompilationUnit();
       var writer = new StringWriter();
-      codeProvider.GenerateCodeFromCompileUnit(
+      CodeProvider.GenerateCodeFromCompileUnit(
         unit,
         writer,
@@ -166,11 +121,9 @@
           IndentString = "  ",
         });
-      compilationUnitCode = writer.ToString();
-      return codeProvider.CompileAssemblyFromDom(parameters, unit);
+      return CodeProvider.CompileAssemblyFromDom(parameters, unit);
     }
 
-    public void Compile() {
+    public virtual Assembly Compile() {
       var results = DoCompile();
-      compiledScript = null;
       CompileErrors = results.Errors;
       if (results.Errors.HasErrors) {
@@ -181,18 +134,12 @@
             .AppendLine(error.ErrorText);
         }
-        throw new Exception(string.Format(
-          "Compilation of \"{0}\" failed:{1}{2}",
-          Name, Environment.NewLine,
-          sb.ToString()));
+        throw new Exception(string.Format("Compilation of \"{0}\" failed:{1}{2}",
+          Name, Environment.NewLine, sb.ToString()));
       } else {
-        var assembly = results.CompiledAssembly;
-        var types = assembly.GetTypes();
-        DeregisterScriptEvents();
-        compiledScript = (UserScriptBase)Activator.CreateInstance(types[0]);
-        RegisterScriptEvents();
+        return results.CompiledAssembly;
       }
     }
 
-    public IEnumerable<Assembly> GetAssemblies() {
+    public virtual IEnumerable<Assembly> GetAssemblies() {
       var assemblies = new List<Assembly>();
       foreach (var a in AppDomain.CurrentDomain.GetAssemblies()) {
@@ -210,58 +157,12 @@
     }
 
-    private readonly Regex SafeTypeNameCharRegex = new Regex("[_a-zA-Z0-9]+");
-    private readonly Regex SafeTypeNameRegex = new Regex("[_a-zA-Z][_a-zA-Z0-9]*");
-
-    private CodeCompileUnit CreateCompilationUnit() {
+    protected virtual CodeCompileUnit CreateCompilationUnit() {
       var unit = new CodeSnippetCompileUnit(code);
       return unit;
     }
-
-    public string CompiledTypeName {
-      get {
-        var sb = new StringBuilder();
-        var strings = SafeTypeNameCharRegex.Matches(Name)
-                                           .Cast<Match>()
-                                           .Select(m => m.Value);
-        foreach (string s in strings)
-          sb.Append(s);
-        return SafeTypeNameRegex.Match(sb.ToString()).Value;
-      }
-    }
     #endregion
 
-    private Thread scriptThread;
-    public void Execute() {
-      if (compiledScript == null) return;
-      var executeMethod = typeof(UserScriptBase).GetMethod(ExecuteMethodName, BindingFlags.NonPublic | BindingFlags.Instance);
-      if (executeMethod != null) {
-        scriptThread = new Thread(() => {
-          Exception ex = null;
-          try {
-            OnScriptExecutionStarted();
-            executeMethod.Invoke(compiledScript, new[] { VariableStore });
-          } catch (ThreadAbortException) {
-            // the execution was cancelled by the user
-          } catch (TargetInvocationException e) {
-            ex = e.InnerException;
-          } finally {
-            OnScriptExecutionFinished(ex);
-          }
-        });
-        scriptThread.Start();
-      }
-    }
-
-    public void Kill() {
-      if (scriptThread.IsAlive)
-        scriptThread.Abort();
-    }
-
-    private void compiledScript_ConsoleOutputChanged(object sender, EventArgs<string> e) {
-      OnConsoleOutputChanged(e.Value);
-    }
-
     public event EventHandler CodeChanged;
-    private void OnCodeChanged() {
+    protected virtual void OnCodeChanged() {
       var handler = CodeChanged;
       if (handler != null) handler(this, EventArgs.Empty);
@@ -269,26 +170,8 @@
 
     public event EventHandler CompileErrorsChanged;
-    private void OnCompileErrorsChanged() {
+    protected virtual void OnCompileErrorsChanged() {
       var handler = CompileErrorsChanged;
       if (handler != null) handler(this, EventArgs.Empty);
     }
-
-    public event EventHandler ScriptExecutionStarted;
-    private void OnScriptExecutionStarted() {
-      var handler = ScriptExecutionStarted;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-
-    public event EventHandler<EventArgs<Exception>> ScriptExecutionFinished;
-    private void OnScriptExecutionFinished(Exception e) {
-      var handler = ScriptExecutionFinished;
-      if (handler != null) handler(this, new EventArgs<Exception>(e));
-    }
-
-    public event EventHandler<EventArgs<string>> ConsoleOutputChanged;
-    private void OnConsoleOutputChanged(string args) {
-      var handler = ConsoleOutputChanged;
-      if (handler != null) handler(this, new EventArgs<string>(args));
-    }
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/UserScriptBase.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/UserScriptBase.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/UserScriptBase.cs	(revision 11009)
@@ -52,41 +52,4 @@
       var handler = ConsoleOutputChanged;
       if (handler != null) handler(null, new EventArgs<string>(args));
-    }
-
-    protected class Variables : DynamicObject, IEnumerable<KeyValuePair<string, object>> {
-      private readonly VariableStore variableStore;
-
-      public ICollection<string> Keys {
-        get { return variableStore.Keys; }
-      }
-
-      public ICollection<object> Values {
-        get { return variableStore.Values; }
-      }
-
-      public Variables(VariableStore variableStore) {
-        this.variableStore = variableStore;
-      }
-
-      public override bool TryGetMember(GetMemberBinder binder, out object result) {
-        return variableStore.TryGetValue(binder.Name, out result);
-      }
-
-      public override bool TrySetMember(SetMemberBinder binder, object value) {
-        variableStore[binder.Name] = value;
-        return true;
-      }
-
-      public bool Contains(string variableName) {
-        return variableStore.ContainsKey(variableName);
-      }
-
-      public IEnumerator<KeyValuePair<string, object>> GetEnumerator() {
-        return variableStore.GetEnumerator();
-      }
-
-      IEnumerator IEnumerable.GetEnumerator() {
-        return GetEnumerator();
-      }
     }
 
Index: /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/Variables.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/Variables.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Scripting/3.3/Variables.cs	(revision 11009)
@@ -0,0 +1,38 @@
+﻿using System.Collections;
+using System.Collections.Generic;
+using System.Dynamic;
+
+namespace HeuristicLab.Scripting {
+  public class Variables : DynamicObject, IEnumerable<KeyValuePair<string, object>> {
+    private readonly VariableStore variableStore;
+
+    public Variables(VariableStore variableStore) {
+      this.variableStore = variableStore;
+    }
+
+    public override bool TryGetMember(GetMemberBinder binder, out object result) {
+      return variableStore.TryGetValue(binder.Name, out result);
+    }
+
+    public override bool TrySetMember(SetMemberBinder binder, object value) {
+      variableStore[binder.Name] = value;
+      return true;
+    }
+
+    public bool Contains(string variableName) {
+      return variableStore.ContainsKey(variableName);
+    }
+
+    public void Clear() {
+      variableStore.Clear();
+    }
+
+    public IEnumerator<KeyValuePair<string, object>> GetEnumerator() {
+      return variableStore.GetEnumerator();
+    }
+
+    IEnumerator IEnumerable.GetEnumerator() {
+      return GetEnumerator();
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Selection/3.3/OffspringSelector.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Selection/3.3/OffspringSelector.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Selection/3.3/OffspringSelector.cs	(revision 11009)
@@ -57,4 +57,8 @@
     }
 
+    public IValueLookupParameter<BoolValue> FillPopulationWithParentsParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters["FillPopulationWithParents"]; }
+    }
+
     public IOperator OffspringCreator {
       get { return OffspringCreatorParameter.Value; }
@@ -64,4 +68,15 @@
     [StorableConstructor]
     protected OffspringSelector(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code, remove with 3.4
+      if (Parameters.ContainsKey("FillPopulationWithParents") && Parameters["FillPopulationWithParents"] is FixedValueParameter<BoolValue>)
+        Parameters.Remove("FillPopulationWithParents");
+      if (!Parameters.ContainsKey("FillPopulationWithParents"))
+        Parameters.Add(new ValueLookupParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individuals instead of lucky losers."));
+      #endregion
+    }
+
     protected OffspringSelector(OffspringSelector original, Cloner cloner) : base(original, cloner) { }
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -78,4 +93,5 @@
       Parameters.Add(new ScopeTreeLookupParameter<BoolValue>("SuccessfulOffspring", "True if the offspring was more successful than its parents.", 2));
       Parameters.Add(new OperatorParameter("OffspringCreator", "The operator used to create new offspring."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("FillPopulationWithParents", "True if the population should be filled with parent individual or false if worse children should be used when the maximum selection pressure is exceeded."));
     }
 
@@ -83,4 +99,7 @@
       double maxSelPress = MaximumSelectionPressureParameter.ActualValue.Value;
       double successRatio = SuccessRatioParameter.ActualValue.Value;
+      bool fillPopulationWithParents = false;
+      if (FillPopulationWithParentsParameter.ActualValue != null)
+        fillPopulationWithParents = FillPopulationWithParentsParameter.ActualValue.Value;
       IScope scope = ExecutionContext.Scope;
       IScope parents = scope.SubScopes[0];
@@ -133,9 +152,14 @@
           successfulOffspringAdded++;
         } else if (worseOffspringNeeded > 0 || tmpSelPress >= maxSelPress) {
-          IScope currentOffspring = offspring.SubScopes[i];
-          offspring.SubScopes.Remove(currentOffspring);
-          i--;
+          IScope currentOffspring;
+          if (!fillPopulationWithParents || worseOffspringNeeded > 0) {
+            currentOffspring = offspring.SubScopes[i];
+            offspring.SubScopes.Remove(currentOffspring);
+            i--;
+            worseOffspringNeeded--;
+          } else {
+            currentOffspring = parents.SubScopes[i];
+          }
           population.Add(currentOffspring);
-          worseOffspringNeeded--;
         }
         tmpSelPress += tmpSelPressInc;
Index: /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab-3.3/SamplesTest.cs	(revision 11009)
@@ -28,4 +28,5 @@
 using HeuristicLab.Algorithms.GeneticAlgorithm;
 using HeuristicLab.Algorithms.LocalSearch;
+using HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm;
 using HeuristicLab.Algorithms.ParticleSwarmOptimization;
 using HeuristicLab.Algorithms.RAPGA;
@@ -36,4 +37,5 @@
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
 using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.Encodings.RealVectorEncoding;
@@ -62,4 +64,7 @@
 using HeuristicLab.Selection;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
+using StdDevStrategyVectorCreator = HeuristicLab.Encodings.RealVectorEncoding.StdDevStrategyVectorCreator;
+using StdDevStrategyVectorCrossover = HeuristicLab.Encodings.RealVectorEncoding.StdDevStrategyVectorCrossover;
+using StdDevStrategyVectorManipulator = HeuristicLab.Encodings.RealVectorEncoding.StdDevStrategyVectorManipulator;
 
 
@@ -265,4 +270,10 @@
       Assert.AreEqual(0, GetDoubleResult(ga, "CurrentWorstQuality"), 1E-8);
       Assert.AreEqual(50950, 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);
     }
 
@@ -377,4 +388,7 @@
       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);
     }
 
@@ -1185,4 +1199,86 @@
     #endregion
 
+    #region grammatical evolution
+    #region artificial ant
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGeArtificialAntSampleTest() {
+      var geaa = CreateGeArtificialAntSample();
+      XmlGenerator.Serialize(geaa, @"Samples\GE_ArtificialAnt.hl");
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGeArtificalAntSampleTest() {
+      var ga = CreateGeArtificialAntSample();
+      ga.SetSeedRandomly.Value = false;
+      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;
+      ConfigureOsGeneticAlgorithmParameters<GenderSpecificSelector, Encodings.IntegerVectorEncoding.SinglePointCrossover, Encodings.IntegerVectorEncoding.UniformOnePositionManipulator>(
+        ga, 200, 1, 50, 0.05, 200);
+      #endregion
+      return ga;
+    }
+    #endregion
+
+    #region symbolic regression
+    #endregion
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    public void CreateGeSymbolicRegressionSampleTest() {
+      var geSymbReg = CreateGeSymbolicRegressionSample();
+      XmlGenerator.Serialize(geSymbReg, @"Samples\GE_SymbReg.hl");
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGeSymbolicRegressionSampleTest() {
+      var ga = CreateGeSymbolicRegressionSample();
+      ga.SetSeedRandomly.Value = false;
+      RunAlgorithm(ga);
+    }
+
+    [TestMethod]
+    [TestCategory("Samples.Create")]
+    [TestProperty("Time", "medium")]
+    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);
+      }
+
+      ConfigureOsGeneticAlgorithmParameters<GenderSpecificSelector, Encodings.IntegerVectorEncoding.SinglePointCrossover, Encodings.IntegerVectorEncoding.UniformOnePositionManipulator>(
+        ga, 1000, 1, 50, 0.05, 200);
+      #endregion
+      return ga;
+    }
+    #endregion
+
     #region Helpers
     private void ConfigureEvolutionStrategyParameters<R, M, SC, SR, SM>(EvolutionStrategy es, int popSize, int children, int parentsPerChild, int maxGens, bool plusSelection)
@@ -1231,4 +1327,37 @@
       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();
+    }
+
+    private 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>()
Index: /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCases.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCases.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Persistence-3.3/UseCases.cs	(revision 11009)
@@ -1441,4 +1441,38 @@
     }
 
+    [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);
+    }
+
+
     [ClassInitialize]
     public static void Initialize(TestContext testContext) {
Index: /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs	(revision 11009)
@@ -22,8 +22,6 @@
 using System;
 using System.Collections.Generic;
-using System.Diagnostics;
 using System.Globalization;
 using System.Linq;
-using System.Linq.Expressions;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Random;
@@ -319,5 +317,4 @@
       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);
@@ -330,4 +327,17 @@
       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
Index: /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicExpressionImporter.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicExpressionImporter.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicExpressionImporter.cs	(revision 11009)
@@ -70,4 +70,5 @@
         {"OR", new Or()},
         {"NOT", new Not()},
+        {"XOR", new Xor()},
         {"DIFF", new Derivative()},
         {"PROG", new ProgramRootSymbol()},
Index: /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Problems.VehicleRouting-3.4/VRPInstancesTest.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Problems.VehicleRouting-3.4/VRPInstancesTest.cs	(revision 11009)
+++ /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Problems.VehicleRouting-3.4/VRPInstancesTest.cs	(revision 11009)
@@ -0,0 +1,59 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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 HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.Instances.VehicleRouting;
+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 providers = ApplicationManager.Manager.GetInstances<VRPInstanceProvider>();
+      var vrp = new VehicleRoutingProblem();
+      var failedInstances = new StringBuilder();
+
+      Assert.IsTrue(providers.Any(), "No providers could be found.");
+
+      foreach (var provider in providers) {
+        var instances = provider.GetDataDescriptors();
+        Assert.IsTrue(instances.Any(), "No instances could be found.");
+
+        foreach (var instance in instances) {
+          try {
+            // throws InvalidOperationException if zero or more than one interpreter is found
+            vrp.Load(provider.LoadData(instance));
+          } catch (Exception exc) {
+            failedInstances.AppendLine(instance + ": " + exc.Message);
+          }
+        }
+      }
+
+      Assert.IsTrue(failedInstances.Length == 0, "Following instances failed: " + Environment.NewLine + failedInstances);
+    }
+  }
+}
Index: /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Random-3.3/RandomEnumerableSampleTest.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Random-3.3/RandomEnumerableSampleTest.cs	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Random-3.3/RandomEnumerableSampleTest.cs	(revision 11009)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -29,5 +29,5 @@
   public class RandomEnumerableSampleTest {
     [TestMethod]
-    [TestCategory("Problems.Random")]
+    [TestCategory("General")]
     [TestProperty("Time", "short")]
     public void SampleProportionalWithoutRepetitionTest() {
@@ -38,8 +38,6 @@
         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();
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 1, weights, false, false).ToArray();
           Assert.AreEqual(sample.Count(), 1);
-          Assert.AreEqual(sample.Distinct().Count(), 1);
         }
       }
@@ -50,8 +48,6 @@
         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();
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 1, weights, false, false).ToArray();
           Assert.AreEqual(sample.Count(), 1);
-          Assert.AreEqual(sample.Distinct().Count(), 1);
         }
       }
@@ -61,10 +57,11 @@
         var random = new MersenneTwister(31415);
         var weights = new double[] { 1.0, 2.0 };
-        for (int i = 0; i < 1000; i++) {
-          var sample =
-            RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 1, weights, false, false).ToArray();
+        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);
-          Assert.AreEqual(sample.Distinct().Count(), 1);
-        }
+          if (sample[0] == 0) zeroSelected++;
+        }
+        Assert.IsTrue(zeroSelected > 0 && zeroSelected < 1000);
       }
       {
@@ -74,8 +71,7 @@
         var weights = new double[] { 1.0, 1000.0 };
         for (int i = 0; i < 1000; i++) {
-          var sample =
-            RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 1, weights, false, false).ToArray();
-          Assert.AreEqual(sample.Count(), 1);
-          Assert.AreEqual(sample.Distinct().Count(), 1);
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 2, weights, false, false).ToArray();
+          Assert.AreEqual(sample.Count(), 2);
+          Assert.AreEqual(sample.Distinct().Count(), 2);
         }
       }
@@ -85,6 +81,5 @@
         var random = new MersenneTwister(31415);
         var weights = Enumerable.Repeat(0.0, 1);
-        var sample =
-          RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 2, weights, false, false).ToArray();
+        var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 2, weights, false, false).ToArray();
         Assert.AreEqual(sample.Count(), 1);
       }
@@ -96,6 +91,5 @@
         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();
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 10, weights, false, false).ToArray();
           Assert.AreEqual(sample.Count(), 10);
           Assert.AreEqual(sample.Distinct().Count(), 10);
@@ -109,6 +103,5 @@
         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();
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 100, weights, false, false).ToArray();
           Assert.AreEqual(sample.Count(), 100);
           Assert.AreEqual(sample.Distinct().Count(), 100);
@@ -122,7 +115,5 @@
         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();
+          var sample = RandomEnumerable.SampleProportionalWithoutRepetition(items, random, 10, weights, false, false).ToArray();
           Assert.AreEqual(sample.Count(), 10);
           Assert.AreEqual(sample.Distinct().Count(), 10);
@@ -132,4 +123,64 @@
       {
         // 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);
Index: /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Tests.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 11008)
+++ /branches/DataPreprocessing/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 11009)
@@ -122,4 +122,8 @@
       <Private>False</Private>
     </Reference>
+    <Reference Include="HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\bin\HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
     <Reference Include="HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3">
       <HintPath>..\bin\HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.dll</HintPath>
@@ -250,7 +254,11 @@
       <Private>False</Private>
     </Reference>
+    <Reference Include="HeuristicLab.Problems.GrammaticalEvolution-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\bin\HeuristicLab.Problems.GrammaticalEvolution-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
     <Reference Include="HeuristicLab.Problems.DataAnalysis.Transformations-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
       <HintPath>..\bin\HeuristicLab.Problems.DataAnalysis.Transformations-3.4.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="HeuristicLab.Problems.Instances-3.3">
@@ -468,4 +476,5 @@
     <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="Properties\AssemblyInfo.cs" />
