Index: /branches/GP.Grammar.Editor/HeuristicLab 3.3.sln
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab 3.3.sln	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab 3.3.sln	(revision 6784)
@@ -409,4 +409,8 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.QuadraticAssignment.Algorithms-3.3", "HeuristicLab.Problems.QuadraticAssignment.Algorithms\3.3\HeuristicLab.Problems.QuadraticAssignment.Algorithms-3.3.csproj", "{5B9B9E8C-2706-43C2-80B8-A08341E431F7}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HeuristicLab.DayView", "HeuristicLab.DayView", "{82BF5B4A-0AB0-4873-AA39-EBF8A025D844}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.DayView-1.0", "HeuristicLab.ExtLibs\HeuristicLab.DayView\1.0\HeuristicLab.DayView-1.0.csproj", "{02766ECC-D0F5-4115-9ECA-47409167B638}"
 EndProject
 Global
@@ -1887,4 +1891,16 @@
 		{5B9B9E8C-2706-43C2-80B8-A08341E431F7}.Release|x86.ActiveCfg = Release|x86
 		{5B9B9E8C-2706-43C2-80B8-A08341E431F7}.Release|x86.Build.0 = Release|x86
+		{02766ECC-D0F5-4115-9ECA-47409167B638}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{02766ECC-D0F5-4115-9ECA-47409167B638}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{02766ECC-D0F5-4115-9ECA-47409167B638}.Debug|x64.ActiveCfg = Debug|x64
+		{02766ECC-D0F5-4115-9ECA-47409167B638}.Debug|x64.Build.0 = Debug|x64
+		{02766ECC-D0F5-4115-9ECA-47409167B638}.Debug|x86.ActiveCfg = Debug|x86
+		{02766ECC-D0F5-4115-9ECA-47409167B638}.Debug|x86.Build.0 = Debug|x86
+		{02766ECC-D0F5-4115-9ECA-47409167B638}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{02766ECC-D0F5-4115-9ECA-47409167B638}.Release|Any CPU.Build.0 = Release|Any CPU
+		{02766ECC-D0F5-4115-9ECA-47409167B638}.Release|x64.ActiveCfg = Release|x64
+		{02766ECC-D0F5-4115-9ECA-47409167B638}.Release|x64.Build.0 = Release|x64
+		{02766ECC-D0F5-4115-9ECA-47409167B638}.Release|x86.ActiveCfg = Release|x86
+		{02766ECC-D0F5-4115-9ECA-47409167B638}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
@@ -1899,4 +1915,5 @@
 		{782DDDA3-A7A3-404E-B751-6200CE2D5EF3} = {07BCBC57-3E15-4582-B306-C046E516C49C}
 		{189F7770-5540-4832-B9A0-82474009680C} = {07BCBC57-3E15-4582-B306-C046E516C49C}
+		{82BF5B4A-0AB0-4873-AA39-EBF8A025D844} = {07BCBC57-3E15-4582-B306-C046E516C49C}
 		{99AD3658-DB36-4E26-B4CC-6FEAACC5C88C} = {7F485A48-A80F-4454-9A9B-7B126B43861C}
 		{678E2145-8152-4E19-9646-07D439D00301} = {99AD3658-DB36-4E26-B4CC-6FEAACC5C88C}
@@ -1934,4 +1951,5 @@
 		{FC841674-62A7-4055-BE91-E41944B6C606} = {91243D2B-77EB-4922-BEB0-78C6AB1DEEDC}
 		{DE69A359-A5B8-4D3D-BA8D-D5780D7F96D6} = {91243D2B-77EB-4922-BEB0-78C6AB1DEEDC}
+		{02766ECC-D0F5-4115-9ECA-47409167B638} = {82BF5B4A-0AB0-4873-AA39-EBF8A025D844}
 	EndGlobalSection
 EndGlobal
Index: /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj	(revision 6784)
@@ -107,5 +107,4 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="RegressionWorkbench.cs" />
     <Compile Include="CrossValidation.cs">
       <SubType>Code</SubType>
Index: /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/AlglibUtil.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/AlglibUtil.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/AlglibUtil.cs	(revision 6784)
@@ -31,11 +31,16 @@
 
       double[,] matrix = new double[rowsList.Count, variablesList.Count];
-      for (int row = 0; row < rowsList.Count; row++) {
-        int col = 0;
-        foreach (string column in variables) {
-          matrix[row, col] = dataset[column, rowsList[row]];
-          col++;
+
+      int col = 0;
+      foreach (string column in variables) {
+        var values = dataset.GetDoubleValues(column, rows);
+        int row = 0;
+        foreach (var value in values) {
+          matrix[row, col] = value;
+          row++;
         }
+        col++;
       }
+
       return matrix;
     }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs	(revision 6784)
@@ -78,5 +78,5 @@
       int nRows = inputMatrix.GetLength(0);
       int nFeatures = inputMatrix.GetLength(1) - 1;
-      double[] classValues = dataset.GetVariableValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
+      double[] classValues = dataset.GetDoubleValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
       int nClasses = classValues.Count();
       // map original class values to values [0..nClasses-1]
Index: /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourClassification.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourClassification.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourClassification.cs	(revision 6784)
@@ -96,5 +96,5 @@
       int nRows = inputMatrix.GetLength(0);
       int nFeatures = inputMatrix.GetLength(1) - 1;
-      double[] classValues = dataset.GetVariableValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
+      double[] classValues = dataset.GetDoubleValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
       int nClasses = classValues.Count();
       // map original class values to values [0..nClasses-1]
Index: /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs	(revision 6784)
@@ -113,8 +113,12 @@
     private NeuralNetworkClassification(NeuralNetworkClassification original, Cloner cloner)
       : base(original, cloner) {
+      RegisterEventHandlers();
     }
     public NeuralNetworkClassification()
       : base() {
-      var validHiddenLayerValues = new ItemSet<IntValue>(new IntValue[] { new IntValue(0), new IntValue(1), new IntValue(2) });
+      var validHiddenLayerValues = new ItemSet<IntValue>(new IntValue[] { 
+        (IntValue)new IntValue(0).AsReadOnly(), 
+        (IntValue)new IntValue(1).AsReadOnly(), 
+        (IntValue)new IntValue(2).AsReadOnly() });
       var selectedHiddenLayerValue = (from v in validHiddenLayerValues
                                       where v.Value == 1
@@ -127,11 +131,41 @@
       Parameters.Add(new FixedValueParameter<IntValue>(RestartsParameterName, "The number of restarts for learning.", new IntValue(2)));
 
+      RestartsParameter.Hidden = true;
+      NodesInSecondHiddenLayerParameter.Hidden = true;
+
+      RegisterEventHandlers();
+
       Problem = new ClassificationProblem();
     }
+
+    private void RegisterEventHandlers() {
+      HiddenLayersParameter.Value.ValueChanged += HiddenLayersParameterValueValueChanged;
+      HiddenLayersParameter.ValueChanged += HiddenLayersParameterValueChanged;
+    }
+
     [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() { }
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
       return new NeuralNetworkClassification(this, cloner);
+    }
+    private void HiddenLayersParameterValueChanged(object source, EventArgs e) {
+      HiddenLayersParameter.Value.ValueChanged += HiddenLayersParameterValueValueChanged;
+      HiddenLayersParameterValueValueChanged(this, EventArgs.Empty);
+    }
+
+    private void HiddenLayersParameterValueValueChanged(object source, EventArgs e) {
+      if (HiddenLayers == 0) {
+        NodesInFirstHiddenLayerParameter.Hidden = true;
+        NodesInSecondHiddenLayerParameter.Hidden = true;
+      } else if (HiddenLayers == 1) {
+        NodesInFirstHiddenLayerParameter.Hidden = false;
+        NodesInSecondHiddenLayerParameter.Hidden = true;
+      } else {
+        NodesInFirstHiddenLayerParameter.Hidden = false;
+        NodesInSecondHiddenLayerParameter.Hidden = false;
+      }
     }
 
@@ -158,5 +192,5 @@
       int nRows = inputMatrix.GetLength(0);
       int nFeatures = inputMatrix.GetLength(1) - 1;
-      double[] classValues = dataset.GetVariableValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
+      double[] classValues = dataset.GetDoubleValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
       int nClasses = classValues.Count();
       // map original class values to values [0..nClasses-1]
Index: /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs	(revision 6784)
@@ -127,5 +127,8 @@
     public NeuralNetworkEnsembleClassification()
       : base() {
-      var validHiddenLayerValues = new ItemSet<IntValue>(new IntValue[] { new IntValue(0), new IntValue(1), new IntValue(2) });
+        var validHiddenLayerValues = new ItemSet<IntValue>(new IntValue[] { 
+        (IntValue)new IntValue(0).AsReadOnly(), 
+        (IntValue)new IntValue(1).AsReadOnly(), 
+        (IntValue)new IntValue(2).AsReadOnly() });
       var selectedHiddenLayerValue = (from v in validHiddenLayerValues
                                       where v.Value == 1
@@ -139,4 +142,9 @@
       Parameters.Add(new FixedValueParameter<IntValue>(RestartsParameterName, "The number of restarts for learning.", new IntValue(2)));
 
+      HiddenLayersParameter.Hidden = true;
+      NodesInFirstHiddenLayerParameter.Hidden = true;
+      NodesInSecondHiddenLayerParameter.Hidden = true;
+      RestartsParameter.Hidden = true;
+
       Problem = new ClassificationProblem();
     }
@@ -170,5 +178,5 @@
       int nRows = inputMatrix.GetLength(0);
       int nFeatures = inputMatrix.GetLength(1) - 1;
-      double[] classValues = dataset.GetVariableValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
+      double[] classValues = dataset.GetDoubleValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
       int nClasses = classValues.Count();
       // map original class values to values [0..nClasses-1]
Index: /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleRegression.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleRegression.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleRegression.cs	(revision 6784)
@@ -127,5 +127,8 @@
     public NeuralNetworkEnsembleRegression()
       : base() {
-      var validHiddenLayerValues = new ItemSet<IntValue>(new IntValue[] { new IntValue(0), new IntValue(1), new IntValue(2) });
+        var validHiddenLayerValues = new ItemSet<IntValue>(new IntValue[] { 
+        (IntValue)new IntValue(0).AsReadOnly(), 
+        (IntValue)new IntValue(1).AsReadOnly(), 
+        (IntValue)new IntValue(2).AsReadOnly() });
       var selectedHiddenLayerValue = (from v in validHiddenLayerValues
                                       where v.Value == 1
@@ -138,4 +141,9 @@
       Parameters.Add(new FixedValueParameter<IntValue>(NodesInSecondHiddenLayerParameterName, "The number of nodes in the second hidden layer. This value is not used if the number of hidden layers is zero or one.", new IntValue(100)));
       Parameters.Add(new FixedValueParameter<IntValue>(RestartsParameterName, "The number of restarts for learning.", new IntValue(2)));
+
+      HiddenLayersParameter.Hidden = true;
+      NodesInFirstHiddenLayerParameter.Hidden = true;
+      NodesInSecondHiddenLayerParameter.Hidden = true;
+      RestartsParameter.Hidden = true;
 
       Problem = new RegressionProblem();
Index: /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs	(revision 6784)
@@ -113,8 +113,12 @@
     private NeuralNetworkRegression(NeuralNetworkRegression original, Cloner cloner)
       : base(original, cloner) {
+      RegisterEventHandlers();
     }
     public NeuralNetworkRegression()
       : base() {
-      var validHiddenLayerValues = new ItemSet<IntValue>(new IntValue[] { new IntValue(0), new IntValue(1), new IntValue(2) });
+      var validHiddenLayerValues = new ItemSet<IntValue>(new IntValue[] { 
+        (IntValue)new IntValue(0).AsReadOnly(), 
+        (IntValue)new IntValue(1).AsReadOnly(), 
+        (IntValue)new IntValue(2).AsReadOnly() });
       var selectedHiddenLayerValue = (from v in validHiddenLayerValues
                                       where v.Value == 1
@@ -127,12 +131,44 @@
       Parameters.Add(new FixedValueParameter<IntValue>(RestartsParameterName, "The number of restarts for learning.", new IntValue(2)));
 
+      RestartsParameter.Hidden = true;
+      NodesInSecondHiddenLayerParameter.Hidden = true;
+
+      RegisterEventHandlers();
+
       Problem = new RegressionProblem();
     }
+
+    private void RegisterEventHandlers() {
+      HiddenLayersParameter.Value.ValueChanged += HiddenLayersParameterValueValueChanged;
+      HiddenLayersParameter.ValueChanged += HiddenLayersParameterValueChanged;
+    }
+
     [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() { }
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
       return new NeuralNetworkRegression(this, cloner);
     }
+
+    private void HiddenLayersParameterValueChanged(object source, EventArgs e) {
+      HiddenLayersParameter.Value.ValueChanged += HiddenLayersParameterValueValueChanged;
+      HiddenLayersParameterValueValueChanged(this, EventArgs.Empty);
+    }
+
+    private void HiddenLayersParameterValueValueChanged(object source, EventArgs e) {
+      if (HiddenLayers == 0) {
+        NodesInFirstHiddenLayerParameter.Hidden = true;
+        NodesInSecondHiddenLayerParameter.Hidden = true;
+      } else if (HiddenLayers == 1) {
+        NodesInFirstHiddenLayerParameter.Hidden = false;
+        NodesInSecondHiddenLayerParameter.Hidden = true;
+      } else {
+        NodesInFirstHiddenLayerParameter.Hidden = false;
+        NodesInSecondHiddenLayerParameter.Hidden = false;
+      }
+    }
+
 
     #region neural network
@@ -155,16 +191,11 @@
         throw new NotSupportedException("Neural network regression does not support NaN or infinity values in the input dataset.");
 
-      double targetMin = problemData.Dataset.GetEnumeratedVariableValues(targetVariable).Min();
-      targetMin = targetMin - targetMin * 0.1; // -10%
-      double targetMax = problemData.Dataset.GetEnumeratedVariableValues(targetVariable).Max();
-      targetMax = targetMax + targetMax * 0.1; // + 10%
-
       alglib.multilayerperceptron multiLayerPerceptron = null;
       if (nLayers == 0) {
-        alglib.mlpcreater0(allowedInputVariables.Count(), 1, targetMin, targetMax, out multiLayerPerceptron);
+        alglib.mlpcreate0(allowedInputVariables.Count(), 1, out multiLayerPerceptron);
       } else if (nLayers == 1) {
-        alglib.mlpcreater1(allowedInputVariables.Count(), nHiddenNodes1, 1, targetMin, targetMax, out multiLayerPerceptron);
+        alglib.mlpcreate1(allowedInputVariables.Count(), nHiddenNodes1, 1, out multiLayerPerceptron);
       } else if (nLayers == 2) {
-        alglib.mlpcreater2(allowedInputVariables.Count(), nHiddenNodes1, nHiddenNodes2, 1, targetMin, targetMax, out multiLayerPerceptron);
+        alglib.mlpcreate2(allowedInputVariables.Count(), nHiddenNodes1, nHiddenNodes2, 1, out multiLayerPerceptron);
       } else throw new ArgumentException("Number of layers must be zero, one, or two.", "nLayers");
       alglib.mlpreport rep;
@@ -177,5 +208,5 @@
 
       rmsError = alglib.mlprmserror(multiLayerPerceptron, inputMatrix, nRows);
-      avgRelError = alglib.mlpavgrelerror(multiLayerPerceptron, inputMatrix, nRows);      
+      avgRelError = alglib.mlpavgrelerror(multiLayerPerceptron, inputMatrix, nRows);
 
       return new NeuralNetworkRegressionSolution((IRegressionProblemData)problemData.Clone(), new NeuralNetworkModel(multiLayerPerceptron, targetVariable, allowedInputVariables));
Index: /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs	(revision 6784)
@@ -108,5 +108,5 @@
       int nCols = inputMatrix.GetLength(1);
       int info;
-      double[] classValues = dataset.GetVariableValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
+      double[] classValues = dataset.GetDoubleValues(targetVariable).Distinct().OrderBy(x => x).ToArray();
       int nClasses = classValues.Count();
       // map original class values to values [0..nClasses-1]
Index: /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineUtil.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineUtil.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineUtil.cs	(revision 6784)
@@ -34,6 +34,5 @@
     public static SVM.Problem CreateSvmProblem(Dataset dataset, string targetVariable, IEnumerable<string> inputVariables, IEnumerable<int> rowIndices) {
       double[] targetVector =
-        dataset.GetEnumeratedVariableValues(targetVariable, rowIndices)
-        .ToArray();
+        dataset.GetDoubleValues(targetVariable, rowIndices).ToArray();
 
       SVM.Node[][] nodes = new SVM.Node[targetVector.Length][];
@@ -46,5 +45,5 @@
         int colIndex = 1; // make sure the smallest node index for SVM = 1
         foreach (var inputVariable in inputVariablesList) {
-          double value = dataset[row, dataset.GetVariableIndex(inputVariable)];
+          double value = dataset.GetDoubleValue(inputVariable, row);
           // SVM also works with missing values
           // => don't add NaN values in the dataset to the sparse SVM matrix representation
Index: /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringUtil.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringUtil.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringUtil.cs	(revision 6784)
@@ -20,8 +20,8 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using HeuristicLab.Problems.DataAnalysis;
-using System;
 
 namespace HeuristicLab.Algorithms.DataAnalysis {
@@ -42,5 +42,5 @@
           int col = 0;
           foreach (var inputVariable in allowedInputVariables) {
-            double d = center[col++] - dataset[inputVariable, row];
+            double d = center[col++] - dataset.GetDoubleValue(inputVariable, row);
             d = d * d; // square;
             centerDistance += d;
@@ -73,5 +73,5 @@
         double[] p = new double[allowedInputVariables.Count];
         for (int i = 0; i < nCols; i++) {
-          p[i] = dataset[allowedInputVariables[i], row];
+          p[i] = dataset.GetDoubleValue(allowedInputVariables[i], row);
         }
         clusterPoints[clusterValues[clusterValueIndex++]].Add(p);
Index: /branches/GP.Grammar.Editor/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs	(revision 6784)
@@ -80,6 +80,14 @@
           lineStyleComboBox.SelectedItem = Content.LineStyle;
           startIndexZeroCheckBox.Checked = Content.StartIndexZero;
-          lineWidthNumericUpDown.Value = Content.LineWidth;
-          binsNumericUpDown.Value = Content.Bins;
+          if (Content.LineWidth < lineWidthNumericUpDown.Minimum)
+            lineWidthNumericUpDown.Value = lineWidthNumericUpDown.Minimum;
+          else if (Content.LineWidth > lineWidthNumericUpDown.Maximum)
+            lineWidthNumericUpDown.Value = lineWidthNumericUpDown.Maximum;
+          else lineWidthNumericUpDown.Value = Content.LineWidth;
+          if (Content.Bins < binsNumericUpDown.Minimum)
+            binsNumericUpDown.Value = binsNumericUpDown.Minimum;
+          else if (Content.Bins > binsNumericUpDown.Maximum)
+            binsNumericUpDown.Value = binsNumericUpDown.Maximum;
+          else binsNumericUpDown.Value = Content.Bins;
           binsApproximatelyRadioButton.Checked = !Content.ExactBins;
           binsExactRadioButton.Checked = Content.ExactBins;
Index: /branches/GP.Grammar.Editor/HeuristicLab.Analysis.Views/3.3/DataTableView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Analysis.Views/3.3/DataTableView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Analysis.Views/3.3/DataTableView.cs	(revision 6784)
@@ -258,8 +258,8 @@
       if (!Content.VisualProperties.SecondYAxisMinimumAuto && !double.IsNaN(Content.VisualProperties.SecondYAxisMinimumFixedValue)) area.AxisY2.Minimum = Content.VisualProperties.SecondYAxisMinimumFixedValue;
       if (!Content.VisualProperties.SecondYAxisMaximumAuto && !double.IsNaN(Content.VisualProperties.SecondYAxisMaximumFixedValue)) area.AxisY2.Maximum = Content.VisualProperties.SecondYAxisMaximumFixedValue;
-      if (area.AxisX.Minimum > area.AxisX.Maximum) area.AxisX.Maximum = area.AxisX.Minimum + 1;
-      if (area.AxisX2.Minimum > area.AxisX2.Maximum) area.AxisX2.Maximum = area.AxisX2.Minimum + 1;
-      if (area.AxisY.Minimum > area.AxisY.Maximum) area.AxisY.Maximum = area.AxisY.Minimum + 1;
-      if (area.AxisY2.Minimum > area.AxisY2.Maximum) area.AxisY2.Maximum = area.AxisY2.Minimum + 1;
+      if (area.AxisX.Minimum >= area.AxisX.Maximum) area.AxisX.Maximum = area.AxisX.Minimum + 1;
+      if (area.AxisX2.Minimum >= area.AxisX2.Maximum) area.AxisX2.Maximum = area.AxisX2.Minimum + 1;
+      if (area.AxisY.Minimum >= area.AxisY.Maximum) area.AxisY.Maximum = area.AxisY.Minimum + 1;
+      if (area.AxisY2.Minimum >= area.AxisY2.Maximum) area.AxisY2.Maximum = area.AxisY2.Minimum + 1;
     }
 
Index: /branches/GP.Grammar.Editor/HeuristicLab.Analysis/3.3/DataVisualization/DataRowVisualProperties.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Analysis/3.3/DataVisualization/DataRowVisualProperties.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Analysis/3.3/DataVisualization/DataRowVisualProperties.cs	(revision 6784)
@@ -252,4 +252,22 @@
       if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
     }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code, remove with 3.4
+      if (secondXAxis == default(bool)
+        && lineStyle == default(DataRowLineStyle)
+        && lineWidth == default(int) && bins == default(int) && exactBins == default(bool)
+        && displayName == default(string)) {
+        secondXAxis = false;
+        lineStyle = DataRowLineStyle.Solid;
+        lineWidth = 1;
+        bins = 10;
+        exactBins = false;
+        displayName = String.Empty;
+      }
+      #endregion
+    }
   }
 }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Analysis/3.3/DataVisualization/DataTableVisualProperties.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Analysis/3.3/DataVisualization/DataTableVisualProperties.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Analysis/3.3/DataVisualization/DataTableVisualProperties.cs	(revision 6784)
@@ -491,4 +491,42 @@
       if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
     }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code, remove with 3.4
+      // check if most of the properties that were added in Mai'11 were set to their default values, then we want to reset them to our default values
+      if (xAxisMinimumAuto == default(bool) && xAxisMaximumAuto == default(bool)
+        && yAxisMinimumAuto == default(bool) && yAxisMaximumAuto == default(bool)
+        && secondXAxisMinimumAuto == default(bool) && secondXAxisMaximumAuto == default(bool)
+        && secondYAxisMinimumAuto == default(bool) && secondYAxisMaximumAuto == default(bool)
+        && titleColor == default(Color) && axisTitleColor == default(Color)
+        && secondXAxisTitle == default(string)
+        && xAxisMinimumFixedValue == default(double) && xAxisMaximumFixedValue == default(double)
+        && yAxisMinimumFixedValue == default(double) && yAxisMaximumFixedValue == default(double)
+        && secondXAxisMinimumFixedValue == default(double) && secondXAxisMaximumFixedValue == default(double)
+        && secondYAxisMinimumFixedValue == default(double) && secondYAxisMaximumFixedValue == default(double)) {
+        titleColor = Color.Black;
+        axisTitleColor = Color.Black;
+        this.secondXAxisTitle = string.Empty;
+        this.xAxisMinimumAuto = true;
+        this.xAxisMinimumFixedValue = double.NaN;
+        this.xAxisMaximumAuto = true;
+        this.xAxisMaximumFixedValue = double.NaN;
+        this.secondXAxisMinimumAuto = true;
+        this.secondXAxisMinimumFixedValue = double.NaN;
+        this.secondXAxisMaximumAuto = true;
+        this.secondXAxisMaximumFixedValue = double.NaN;
+        this.yAxisMinimumAuto = true;
+        this.yAxisMinimumFixedValue = double.NaN;
+        this.yAxisMaximumAuto = true;
+        this.yAxisMaximumFixedValue = double.NaN;
+        this.secondYAxisMinimumAuto = true;
+        this.secondYAxisMinimumFixedValue = double.NaN;
+        this.secondYAxisMaximumAuto = true;
+        this.secondYAxisMaximumFixedValue = double.NaN;
+      #endregion
+      }
+    }
   }
 }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Core/3.3/Constraints/Constraint.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Core/3.3/Constraints/Constraint.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Core/3.3/Constraints/Constraint.cs	(revision 6784)
@@ -48,5 +48,5 @@
     protected Constraint() {
       this.Active = false;
-      if (AllowedConstraintOperations != null && AllowedConstraintOperations.Count() != 0)
+      if (AllowedConstraintOperations != null && AllowedConstraintOperations.Any())
         this.ConstraintOperation = AllowedConstraintOperations.ElementAt(0);
     }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Core/3.3/ThreadSafeLog.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Core/3.3/ThreadSafeLog.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Core/3.3/ThreadSafeLog.cs	(revision 6784)
@@ -46,6 +46,5 @@
         try {
           return log.Messages.ToArray(); // return copy of messages
-        }
-        finally { locker.ExitReadLock(); }
+        } finally { locker.ExitReadLock(); }
       }
     }
@@ -72,6 +71,5 @@
       try {
         log = cloner.Clone(original.log);
-      }
-      finally { locker.ExitReadLock(); }
+      } finally { original.locker.ExitReadLock(); }
     }
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -83,6 +81,5 @@
       try {
         log.Clear();
-      }
-      finally { locker.ExitWriteLock(); }
+      } finally { locker.ExitWriteLock(); }
     }
 
@@ -91,6 +88,5 @@
       try {
         log.LogMessage(message);
-      }
-      finally { locker.ExitWriteLock(); }
+      } finally { locker.ExitWriteLock(); }
     }
 
@@ -99,6 +95,5 @@
       try {
         log.LogException(ex);
-      }
-      finally { locker.ExitWriteLock(); }
+      } finally { locker.ExitWriteLock(); }
     }
 
Index: /branches/GP.Grammar.Editor/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs	(revision 6784)
@@ -44,4 +44,8 @@
     }
 
+    public DataGridView DataGridView {
+      get { return dataGridView; }
+    }
+
     public override bool ReadOnly {
       get {
Index: /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionSymbolFrequencyAnalyzer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionSymbolFrequencyAnalyzer.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionSymbolFrequencyAnalyzer.cs	(revision 6784)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -108,5 +109,5 @@
           symbolFrequencies.Rows.Add(row);
         }
-        symbolFrequencies.Rows[pair.Key].Values.Add(pair.Value);
+        symbolFrequencies.Rows[pair.Key].Values.Add(Math.Round(pair.Value, 3));
       }
 
Index: /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Compiler/Instruction.cs	(revision 6784)
@@ -30,6 +30,6 @@
     // number of arguments of the current instruction
     public byte nArguments;
-    // an optional short value (addresses for calls, argument index for arguments)
-    public ushort iArg0;
+    // an optional object value (addresses for calls, argument index for arguments)
+    public object iArg0;
   }
 }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs	(revision 6784)
@@ -55,9 +55,11 @@
       : base() {
       symbol = original.symbol; // symbols are reused
-      subtrees = new List<ISymbolicExpressionTreeNode>(original.subtrees.Count);
-      foreach (var subtree in original.subtrees) {
-        var clonedSubtree = cloner.Clone(subtree);
-        subtrees.Add(clonedSubtree);
-        clonedSubtree.Parent = this;
+      if (original.subtrees != null) {
+        subtrees = new List<ISymbolicExpressionTreeNode>(original.subtrees.Count);
+        foreach (var subtree in original.subtrees) {
+          var clonedSubtree = cloner.Clone(subtree);
+          subtrees.Add(clonedSubtree);
+          clonedSubtree.Parent = this;
+        }
       }
     }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTerminalNode.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTerminalNode.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTerminalNode.cs	(revision 6784)
@@ -37,10 +37,5 @@
     [StorableConstructor]
     protected SymbolicExpressionTreeTerminalNode(bool deserializing) : base(deserializing) { }
-    // don't call cloning constructor of base to prevent allocation of sub-trees list in base!
-    protected SymbolicExpressionTreeTerminalNode(SymbolicExpressionTreeTerminalNode original, Cloner cloner)
-      : base() {
-      // symbols are reused
-      this.Symbol = original.Symbol;
-    }
+    protected SymbolicExpressionTreeTerminalNode(SymbolicExpressionTreeTerminalNode original, Cloner cloner) : base(original, cloner) { }
     protected SymbolicExpressionTreeTerminalNode() : base() { }
 
Index: /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Tests/AllArchitectureAlteringOperatorsTest.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Tests/AllArchitectureAlteringOperatorsTest.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Tests/AllArchitectureAlteringOperatorsTest.cs	(revision 6784)
@@ -118,5 +118,5 @@
 
       Assert.IsTrue(failedEvents * 100.0 / (POPULATION_SIZE * N_ITERATIONS / 2.0) < 75.0); // 25% of architecture operations must succeed
-      Assert.IsTrue(Math.Round(1000.0 / (msPerOperation)) > 1000); // must achieve more than 1000 ops per second
+      Assert.IsTrue(Math.Round(1000.0 / (msPerOperation)) > 800); // must achieve more than 1000 ops per second
     }
   }
Index: /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/3.1.0/ALGLIB-3.1.0/dataanalysis.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/3.1.0/ALGLIB-3.1.0/dataanalysis.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/3.1.0/ALGLIB-3.1.0/dataanalysis.cs	(revision 6784)
@@ -15269,7 +15269,7 @@
                     if( state.xupdated )
                     {
-                        for(i_=0; i_<=wcount-1;i_++)
-                        {
-                            network.weights[i_] = w[i_];
+                        minlbfgs.minlbfgsresults(state, ref w, internalrep);
+                        for (i_ = 0; i_ <= wcount - 1; i_++) {
+                          network.weights[i_] = w[i_];
                         }
                         e = mlpbase.mlperror(network, valxy, valsize);
Index: /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.DayView/1.0/DayView License.txt
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.DayView/1.0/DayView License.txt	(revision 6784)
+++ /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.DayView/1.0/DayView License.txt	(revision 6784)
@@ -0,0 +1,676 @@
+HeuristicLab.DayView uses the DayView Calendar Control from http://calendar.codeplex.com/.
+
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program 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.
+
+    This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Index: /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.DayView/1.0/HeuristicLab.DayView-1.0.csproj
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.DayView/1.0/HeuristicLab.DayView-1.0.csproj	(revision 6784)
+++ /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.DayView/1.0/HeuristicLab.DayView-1.0.csproj	(revision 6784)
@@ -0,0 +1,167 @@
+﻿<?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>{02766ECC-D0F5-4115-9ECA-47409167B638}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.DayView</RootNamespace>
+    <AssemblyName>HeuristicLab.DayView-1.0</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>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</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\Release\</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\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </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="HeuristicLabDayViewPlugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Calendar.DayView.dll">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+    <Content Include="DayView License.txt">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+  </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.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" />
+  <!-- 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>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.DayView/1.0/HeuristicLabDayViewPlugin.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.DayView/1.0/HeuristicLabDayViewPlugin.cs	(revision 6784)
+++ /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.DayView/1.0/HeuristicLabDayViewPlugin.cs	(revision 6784)
@@ -0,0 +1,31 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.DayView {
+  [Plugin("HeuristicLab.DayView", "1.0.0.0")]
+  [PluginFile("HeuristicLab.DayView-1.0.dll", PluginFileType.Assembly)]
+  [PluginFile("Calendar.DayView.dll", PluginFileType.Assembly)]
+  [PluginFile("DayView License.txt", PluginFileType.License)]
+  public class HeuristicLabDayViewPlugin : PluginBase {
+  }
+}
Index: /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.DayView/1.0/Properties/AssemblyInfo.frame
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.DayView/1.0/Properties/AssemblyInfo.frame	(revision 6784)
+++ /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs/HeuristicLab.DayView/1.0/Properties/AssemblyInfo.frame	(revision 6784)
@@ -0,0 +1,57 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.DayView")]
+[assembly: AssemblyDescription("Transport plugin for DayView")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2011 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("3f5083f8-2738-4573-b230-e9928ef61e6b")]
+
+// 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/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj	(revision 6784)
@@ -128,4 +128,10 @@
       <DependentUpon>BatchRunView.cs</DependentUpon>
     </Compile>
+    <Compile Include="RunCollectionModifierListView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="RunCollectionModifierListView.Designer.cs">
+      <DependentUpon>RunCollectionModifierListView.cs</DependentUpon>
+    </Compile>
     <Compile Include="RunCollectionContentConstraintView.cs">
       <SubType>UserControl</SubType>
@@ -157,10 +163,4 @@
     <Compile Include="RunCollectionBoxPlotView.Designer.cs">
       <DependentUpon>RunCollectionBoxPlotView.cs</DependentUpon>
-    </Compile>
-    <Compile Include="RunCollectionModificationEvaluatorView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="RunCollectionModificationEvaluatorView.Designer.cs">
-      <DependentUpon>RunCollectionModificationEvaluatorView.cs</DependentUpon>
     </Compile>
     <Compile Include="RunCollectionComparisonConstraintView.cs">
@@ -307,8 +307,4 @@
       <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
       <Name>HeuristicLab.Optimization-3.3</Name>
-    </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>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/HeuristicLabOptimizationViewsPlugin.cs.frame
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/HeuristicLabOptimizationViewsPlugin.cs.frame	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/HeuristicLabOptimizationViewsPlugin.cs.frame	(revision 6784)
@@ -38,5 +38,4 @@
   [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
   [PluginDependency("HeuristicLab.Optimization", "3.3")]
-  [PluginDependency("HeuristicLab.Parameters", "3.3")]
   [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions","3.3")]
   public class HeuristicLabOptimizationViewsPlugin : PluginBase {
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionModifierListView.Designer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionModifierListView.Designer.cs	(revision 6784)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionModifierListView.Designer.cs	(revision 6784)
@@ -0,0 +1,84 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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;
+
+namespace HeuristicLab.Optimization.Views {
+  partial class RunCollectionModifiersListView {
+    /// <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) {
+        if (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() {
+      components = new System.ComponentModel.Container();
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.evaluateButton = new System.Windows.Forms.Button();
+      this.SuspendLayout();
+      //
+      // splitContainer.Panel1
+      //
+      this.splitContainer.Panel1.Controls.Add(this.evaluateButton);
+      //
+      // showDetailsCheckBox 
+      //
+      this.showDetailsCheckBox.Location = new System.Drawing.Point(153, 3);
+      this.showDetailsCheckBox.TabIndex = 5;
+      //
+      // evaluateButton
+      //
+      this.evaluateButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Play;
+      this.evaluateButton.Location = new System.Drawing.Point(123, 3);
+      this.evaluateButton.Name = "evaluateButton";
+      this.evaluateButton.Size = new System.Drawing.Size(24, 24);
+      this.evaluateButton.TabIndex = 4;
+      this.toolTip.SetToolTip(this.evaluateButton, "Evaluate");
+      this.evaluateButton.UseVisualStyleBackColor = true;
+      this.evaluateButton.Click += new System.EventHandler(this.evaluateButton_Click);
+      //
+      // itemListView
+      //
+      this.itemsListView.TabIndex = 6;
+      this.ResumeLayout(false);
+    }
+
+    protected System.Windows.Forms.Button evaluateButton;
+
+    #endregion
+  }
+}
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionModifierListView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionModifierListView.cs	(revision 6784)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionModifierListView.cs	(revision 6784)
@@ -0,0 +1,75 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.ComponentModel;
+using System.Drawing;
+using System.Windows.Forms;
+using HeuristicLab.Core;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Optimization.Views {
+
+  [View("Modifier View")]
+  [Content(typeof(ICheckedItemList<IRunCollectionModifier>), false)]
+  public partial class RunCollectionModifiersListView : CheckedItemListView<IRunCollectionModifier> {
+
+    public Action Evaluator { get; set; }
+
+    public RunCollectionModifiersListView() {
+      InitializeComponent();
+      itemsGroupBox.Text = "RunCollection Modifiers";
+    }
+
+    protected override IRunCollectionModifier CreateItem() {
+      if (typeSelectorDialog == null) {
+        typeSelectorDialog = new TypeSelectorDialog();
+        typeSelectorDialog.Caption = "Select RunCollection Modifiers";
+        typeSelectorDialog.TypeSelector.Caption = "Available Modifiers";
+        typeSelectorDialog.TypeSelector.Configure(typeof(IRunCollectionModifier), false, true);
+      }
+
+      if (typeSelectorDialog.ShowDialog(this) == DialogResult.OK) {
+        try {
+          return (IRunCollectionModifier)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
+        } catch (Exception ex) {
+          ErrorHandling.ShowErrorDialog(this, ex);
+        }
+      }
+      return null;
+    }
+
+    private void evaluateButton_Click(object sender, EventArgs e) {
+      var evaluator = Evaluator;
+      evaluateButton.Enabled = false;
+      var worker = new BackgroundWorker();
+      worker.DoWork += (s, a) => evaluator();
+      worker.RunWorkerCompleted += (s, a) => {
+        evaluateButton.Enabled = Content != null;
+        if (a.Error != null)
+          new ErrorDialog("Evaluation Failed", a.Error).ShowDialog(ParentForm);
+      };
+      worker.RunWorkerAsync();
+    }
+  }
+}
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionView.Designer.cs	(revision 6784)
@@ -65,4 +65,6 @@
       this.constraintPage = new System.Windows.Forms.TabPage();
       this.runCollectionConstraintCollectionView = new HeuristicLab.Optimization.Views.RunCollectionConstraintCollectionView();
+      this.modifiersPage = new System.Windows.Forms.TabPage();
+      this.runCollectionModifiersListView = new HeuristicLab.Optimization.Views.RunCollectionModifiersListView();
       this.splitContainer.Panel1.SuspendLayout();
       this.splitContainer.Panel2.SuspendLayout();
@@ -74,4 +76,5 @@
       this.runPage.SuspendLayout();
       this.constraintPage.SuspendLayout();
+      this.modifiersPage.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -235,4 +238,5 @@
       this.tabControl.Controls.Add(this.runPage);
       this.tabControl.Controls.Add(this.constraintPage);
+      this.tabControl.Controls.Add(this.modifiersPage);
       this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
       this.tabControl.Location = new System.Drawing.Point(0, 0);
@@ -274,4 +278,29 @@
       this.runCollectionConstraintCollectionView.Size = new System.Drawing.Size(518, 351);
       this.runCollectionConstraintCollectionView.TabIndex = 0;
+      // 
+      // modifiersPage
+      // 
+      this.modifiersPage.Controls.Add(this.runCollectionModifiersListView);
+      this.modifiersPage.Location = new System.Drawing.Point(4, 22);
+      this.modifiersPage.Name = "modifiersPage";
+      this.modifiersPage.Padding = new System.Windows.Forms.Padding(3);
+      this.modifiersPage.Size = new System.Drawing.Size(524, 357);
+      this.modifiersPage.TabIndex = 2;
+      this.modifiersPage.Text = "Modification";
+      this.modifiersPage.UseVisualStyleBackColor = true;
+      // 
+      // runCollectionModifiersListView
+      // 
+      this.runCollectionModifiersListView.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.runCollectionModifiersListView.Caption = "Modifier View";
+      this.runCollectionModifiersListView.Content = null;
+      this.runCollectionModifiersListView.Evaluator = null;
+      this.runCollectionModifiersListView.Location = new System.Drawing.Point(3, 3);
+      this.runCollectionModifiersListView.Name = "runCollectionModifiersListView";
+      this.runCollectionModifiersListView.ReadOnly = false;
+      this.runCollectionModifiersListView.Size = new System.Drawing.Size(518, 351);
+      this.runCollectionModifiersListView.TabIndex = 0;
       // 
       // RunCollectionView
@@ -291,4 +320,5 @@
       this.runPage.ResumeLayout(false);
       this.constraintPage.ResumeLayout(false);
+      this.modifiersPage.ResumeLayout(false);
       this.ResumeLayout(false);
 
@@ -314,4 +344,6 @@
     private Button clearButton;
     private CheckBox showDetailsCheckBox;
+    private TabPage modifiersPage;
+    private RunCollectionModifiersListView runCollectionModifiersListView;
   }
 }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs	(revision 6784)
@@ -58,4 +58,5 @@
       itemsGroupBox.Text = "Runs";
       itemListViewItemMapping = new Dictionary<IRun, List<ListViewItem>>();
+      runCollectionModifiersListView.Evaluator = EvaluateModifications;
     }
 
@@ -98,8 +99,4 @@
         }
       }
-      var modifierMenuItem = new ToolStripMenuItem();
-      modifierMenuItem.Text = "Modify RunCollection";
-      modifierMenuItem.Click += ModifierMenuItem_OnClick;
-      analyzeRunsToolStripDropDownButton.DropDownItems.Add(modifierMenuItem);
     }
 
@@ -122,4 +119,7 @@
           runCollectionConstraintCollectionView.Content = RunCollection.Constraints;
           runCollectionConstraintCollectionView.ReadOnly = itemsListView.Items.Count == 0;
+          if (!tabControl.TabPages.Contains(modifiersPage))
+            tabControl.TabPages.Add(modifiersPage);
+          runCollectionModifiersListView.Content = RunCollection.Modifiers;
         }
         foreach (IRun item in Content) {
@@ -134,4 +134,6 @@
         if (tabControl.TabPages.Contains(constraintPage))
           tabControl.TabPages.Remove(constraintPage);
+        if (tabControl.TabPages.Contains(modifiersPage))
+          tabControl.TabPages.Remove(modifiersPage);
       }
     }
@@ -340,9 +342,4 @@
       }
     }
-    private void ModifierMenuItem_OnClick(object sender, EventArgs args) {
-      var modifier = new RunCollectionModificationEvaluator();
-      modifier.RunCollection.AddRange(Content.Select(r => (IRun)r.Clone()));
-      MainFormManager.MainForm.ShowContent(modifier);
-    }
     private void removeButton_Click(object sender, EventArgs e) {
       if (itemsListView.SelectedItems.Count > 0) {
@@ -357,5 +354,5 @@
     #endregion
 
-    #region CheckBox Events
+    #region Control Events
     private void showDetailsCheckBox_CheckedChanged(object sender, EventArgs e) {
       if (showDetailsCheckBox.Checked) {
@@ -368,4 +365,14 @@
       }
     }
+    private void EvaluateModifications() {
+      if (RunCollection == null)
+        return;
+      ReadOnly = true;
+      try {
+        RunCollection.Modify();
+      } finally {
+        ReadOnly = false;
+      }
+    }
     #endregion
 
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/BatchRun.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/BatchRun.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/BatchRun.cs	(revision 6784)
@@ -147,5 +147,7 @@
     }
 
-    private bool stopPending;
+    private bool batchRunStarted = false;
+    private bool batchRunPaused = false;
+    private bool batchRunStopped = false;
 
     public BatchRun()
@@ -158,5 +160,4 @@
       repetitionsCounter = 0;
       Runs = new RunCollection();
-      stopPending = false;
     }
     public BatchRun(string name)
@@ -168,5 +169,4 @@
       repetitionsCounter = 0;
       Runs = new RunCollection();
-      stopPending = false;
     }
     public BatchRun(string name, string description)
@@ -177,11 +177,7 @@
       repetitionsCounter = 0;
       Runs = new RunCollection();
-      stopPending = false;
     }
     [StorableConstructor]
-    private BatchRun(bool deserializing)
-      : base(deserializing) {
-      stopPending = false;
-    }
+    private BatchRun(bool deserializing) : base(deserializing) { }
     [StorableHook(HookType.AfterDeserialization)]
     private void AfterDeserialization() {
@@ -197,5 +193,7 @@
       repetitionsCounter = original.repetitionsCounter;
       runs = cloner.Clone(original.runs);
-      stopPending = original.stopPending;
+      batchRunStarted = original.batchRunStarted;
+      batchRunPaused = original.batchRunPaused;
+      batchRunStopped = original.batchRunStopped;
       Initialize();
     }
@@ -227,19 +225,32 @@
       if ((ExecutionState != ExecutionState.Prepared) && (ExecutionState != ExecutionState.Paused))
         throw new InvalidOperationException(string.Format("Start not allowed in execution state \"{0}\".", ExecutionState));
-      if (Optimizer != null) Optimizer.Start();
+      if (Optimizer == null) return;
+
+      batchRunStarted = true;
+      batchRunPaused = false;
+      batchRunStopped = false;
+      if (Optimizer.ExecutionState != ExecutionState.Prepared) Optimizer.Prepare();
+      Optimizer.Start();
     }
     public void Pause() {
       if (ExecutionState != ExecutionState.Started)
         throw new InvalidOperationException(string.Format("Pause not allowed in execution state \"{0}\".", ExecutionState));
-      if ((Optimizer != null) && (Optimizer.ExecutionState == ExecutionState.Started))
-        Optimizer.Pause();
+      if (Optimizer == null) return;
+      if (Optimizer.ExecutionState != ExecutionState.Started) return;
+
+      batchRunStarted = false;
+      batchRunPaused = true;
+      batchRunStopped = false;
+      Optimizer.Pause();
     }
     public void Stop() {
       if ((ExecutionState != ExecutionState.Started) && (ExecutionState != ExecutionState.Paused))
         throw new InvalidOperationException(string.Format("Stop not allowed in execution state \"{0}\".", ExecutionState));
-      stopPending = true;
-      if ((Optimizer != null) &&
-          ((Optimizer.ExecutionState == ExecutionState.Started) || (Optimizer.ExecutionState == ExecutionState.Paused)))
-        Optimizer.Stop();
+      if (Optimizer == null) return;
+      if (Optimizer.ExecutionState != ExecutionState.Started && Optimizer.ExecutionState != ExecutionState.Paused) return;
+      batchRunStarted = false;
+      batchRunPaused = false;
+      batchRunStopped = true;
+      Optimizer.Stop();
     }
 
@@ -324,12 +335,17 @@
     }
     private void Optimizer_Paused(object sender, EventArgs e) {
-      OnPaused();
+      if (ExecutionState == ExecutionState.Started) {
+        batchRunStarted = false;
+        batchRunPaused = true;
+        batchRunStopped = false;
+        OnPaused();
+      }
     }
     private void Optimizer_Prepared(object sender, EventArgs e) {
-      if ((ExecutionState == ExecutionState.Paused) || (ExecutionState == ExecutionState.Stopped))
+      if (ExecutionState == ExecutionState.Stopped || !batchRunStarted) {
         OnPrepared();
+      }
     }
     private void Optimizer_Started(object sender, EventArgs e) {
-      stopPending = false;
       if (ExecutionState != ExecutionState.Started)
         OnStarted();
@@ -338,10 +354,11 @@
       repetitionsCounter++;
 
-      if (!stopPending && (repetitionsCounter < repetitions)) {
+      if (batchRunStopped) OnStopped();
+      else if (repetitionsCounter >= repetitions) OnStopped();
+      else if (batchRunPaused) OnPaused();
+      else if (batchRunStarted) {
         Optimizer.Prepare();
         Optimizer.Start();
-      } else {
-        OnStopped();
-      }
+      } else OnStopped();
     }
     private void Optimizer_Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/Calculator.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/Calculator.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/Calculator.cs	(revision 6784)
@@ -1,5 +1,4 @@
 ﻿using System;
 using System.Collections.Generic;
-using System.Drawing;
 using System.Linq;
 using System.Text.RegularExpressions;
@@ -7,15 +6,14 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using System.Globalization;
 
-namespace HeuristicLab.Optimization {  
-    
+namespace HeuristicLab.Optimization {
+
   [StorableClass]
   public class Calculator : IDeepCloneable {
 
     #region Fields & Properties
-    
+
     private List<string> tokens;
 
@@ -26,5 +24,6 @@
     }
 
-    private static readonly Regex TokenRegex = new Regex(@"[a-zA-Z0-9._]+|""([^""]|\"")+""|[-+*/^]|log");    
+    private static readonly Regex TokenRegex =
+      new Regex(@"[a-zA-Z0-9._]+|""([^""]|\\"")*""|'([^']|\\')*'|[-+*/<>^]|dup|swap|drop|log|true|false|if|==|not|isnull|null|ismatch|rename");
 
     #endregion
@@ -35,6 +34,7 @@
     protected Calculator(bool deserializing) { }
     public Calculator() { }
-    public Calculator(Calculator original, Cloner cloner) {
-      this.tokens = original.tokens.ToList();
+    protected Calculator(Calculator original, Cloner cloner) {
+      cloner.RegisterClonedObject(original, this);
+      tokens = original.tokens.ToList();
     }
     public IDeepCloneable Clone(Cloner cloner) {
@@ -46,61 +46,174 @@
     #endregion
 
-    public IEnumerable<string> Tokenize(string s) {
+    private static IEnumerable<string> Tokenize(string s) {
       return TokenRegex.Matches(s).Cast<Match>().Select(m => m.Value);
     }
 
-    private double GetVariableValue(IDictionary<string, IItem> variables, string name) {
-      if (variables.ContainsKey(name)) {
-        var item = variables[name];
-        var intValue = item as IntValue;
-        if (intValue != null) {
-          return intValue.Value;
-        } else {
-          var doubleValue = item as DoubleValue;
-          if (doubleValue != null)
-            return doubleValue.Value;
-          else
-            throw new InvalidOperationException("Non numerical argument");
-        }
-      } else {
-        throw new InvalidOperationException(string.Format("variable \"{0}\" not found", name));
-      }
-    }
-
     public IItem GetValue(IDictionary<string, IItem> variables) {
-      var stack = new Stack<double>();
-      Action<Func<double, double, double>> binf = op => {
-        var b = stack.Pop();
-        stack.Push(op(stack.Pop(), b));
-      };
-      try {
-        foreach (var token in tokens) {
+      var stack = new Stack<object>();
+      int i = 0;
+      try {
+        for (; i<tokens.Count; i++) {
+          var token = tokens[i];
           double d;
-          if (double.TryParse(token,
-                NumberStyles.AllowDecimalPoint |
-              NumberStyles.AllowExponent |
-              NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out d)) {
+          if (TryParse(token, out d)) {
             stack.Push(d);
           } else if (token.StartsWith("\"")) {
             stack.Push(GetVariableValue(variables, token.Substring(1, token.Length - 2).Replace(@"\""", @"""")));
+          } else if (token.StartsWith("'")) {
+            stack.Push(token.Substring(1, token.Length-2).Replace("\'", "'"));
           } else {
-            switch (token) {
-              case "log": stack.Push(Math.Log(stack.Pop())); break;
-              case "+": binf((x, y) => x + y); break;
-              case "-": binf((x, y) => x - y); break;
-              case "*": binf((x, y) => x * y); break;
-              case "/": binf((x, y) => x / y); break;
-              case "^": binf(Math.Pow); break;
-              default: stack.Push(GetVariableValue(variables, token)); break;
-            }
+            Apply(token, stack, variables);
           }
         }
-      } catch (InvalidOperationException x) {
-        return new StringValue(string.Format("Calculation Failed: {0}", x.Message));
-      }
-      if (stack.Count != 1)
-        return new StringValue("Invalid final evaluation stack size != 1");
-      return new DoubleValue(stack.Pop());      
-    }    
+      } catch (Exception x) {
+        throw new Exception(string.Format(
+          "Calculation Failed at token #{1}: '{2}' {0}current stack is: {0}{3}", Environment.NewLine,
+          i, tokens[i], string.Join(Environment.NewLine, stack.Select(AsString))),
+          x);
+      }
+      if (stack.Count != 1) throw new Exception(string.Format("Invalid final evaluation stack size {0} (should be 1)", stack.Count));
+      var result = stack.Pop();
+      if (result is string) return new StringValue((string)result);
+      if (result is double) return new DoubleValue((double)result);
+      if (result is bool) return new BoolValue((bool)result);
+      return null;
+    }
+
+    private static void Apply(string token, Stack<object> stack, IDictionary<string, IItem> variables) {
+      switch (token) {
+        case "null":  stack.Push(null); break;
+        case "true":  stack.Push(true); break;
+        case "false": stack.Push(false); break;
+
+        case "drop": stack.Pop(); break;
+        case "dup": stack.Push(stack.Peek()); break;
+        case "swap":
+          var top = stack.Pop();
+          var next = stack.Pop();
+          stack.Push(top);
+          stack.Push(next);
+          break;
+
+        case "log": Apply(stack, x => Math.Log((double)x)); break;
+        case "+": Apply(stack, (x, y) => (double)x + (double)y); break;
+        case "-": Apply(stack, (x, y) => (double)x - (double)y); break;
+        case "*": Apply(stack, (x, y) => (double)x * (double)y); break;
+        case "/": Apply(stack, (x, y) => (double)x / (double)y); break;
+        case "^": Apply(stack, (x, y) => Math.Pow((double)x, (double)y)); break;
+        case "<": Apply(stack, (x, y) => (double)x < (double)y); break;
+        case ">": Apply(stack, (x, y) => (double)x > (double)y); break;
+
+        case "==": Apply(stack, (x, y) => Equal(x, y)); break;
+        case "not": Apply(stack, x => !(bool)x); break;
+        case "isnull": Apply(stack, x => x == null); break;
+        case "if": Apply(stack, (then, else_, cond) => (bool)cond ? then : else_); break;
+
+        case "ismatch": Apply(stack, (s, p) => new Regex((string)p).IsMatch((string)s)); break;
+        case "rename": Apply(stack, (s, p, r) => new Regex((string)p).Replace((string)s, (string)r)); break;
+
+        default: stack.Push(GetVariableValue(variables, token)); break;
+      }
+    }
+
+    #region Auxiliary Functions
+
+    #region IItem value conversion
+    private static object GetIntValue(IItem value) {
+      var v = value as IntValue;
+      if (v != null) return (double)v.Value;
+      return null;
+    }
+
+    private static object GetDoubleValue(IItem value) {
+      var v = value as DoubleValue;
+      if (v != null) return v.Value;
+      return null;
+    }
+
+    private static object GetBoolValue(IItem value) {
+      var v = value as BoolValue;
+      if (v != null) return v.Value;
+      return null;
+    }
+
+    private static object GetVariableValue(IDictionary<string, IItem> variables, string name) {
+      if (variables.ContainsKey(name)) {
+        var item = variables[name];
+        return
+          GetIntValue(item) ??
+          GetDoubleValue(item) ??
+          GetBoolValue(item) ??
+          item.ToString();
+      }
+      return null;
+    }
+    #endregion
+
+    #region variadic equality
+    private static bool Equal(object a, object b) { return EqualNumber(a, b) || EqualBool(a, b) || EqualString(a, b) || a == b; }
+    private static bool EqualNumber(object a, object b) { return a is double && b is double && (double)a == (double)b; }
+    private static bool EqualBool(object a, object b) { return a is bool && b is bool && (bool)a == (bool)b; }
+    private static bool EqualString(object a, object b) { return a is string && b is string && ((string)a).Equals((string)b); }
+    #endregion
+
+    #region stack calculation
+    private static void Apply(Stack<object> stack, Func<object, object> func) {
+      if (stack.Count < 1)
+        throw new InvalidOperationException("Stack is empty");
+      var a = stack.Pop();
+      try {
+        stack.Push(func(a));
+      } catch (Exception) {
+        stack.Push(a);
+        throw;
+      }
+    }
+
+    private static void Apply(Stack<object> stack, Func<object, object, object> func) {
+      if (stack.Count < 2)
+        throw new InvalidOperationException("Stack contains less than two elements");
+      var b = stack.Pop();
+      var a = stack.Pop();
+      try {
+        stack.Push(func(a, b));
+      } catch (Exception) {
+        stack.Push(b);
+        stack.Push(a);
+        throw;
+      }
+    }
+
+    private static void Apply(Stack<object> stack, Func<object, object, object, object> func) {
+      if (stack.Count < 3)
+        throw new InvalidOperationException("Stack contains less than three elements");
+      var c = stack.Pop();
+      var b = stack.Pop();
+      var a = stack.Pop();
+      try {
+        stack.Push(func(a, b, c));
+      } catch (Exception) {
+        stack.Push(a);
+        stack.Push(b);
+        stack.Push(c);
+        throw;
+      }
+    }
+    #endregion
+
+    private static bool TryParse(string token, out double d) {
+      return double.TryParse(token,
+                             NumberStyles.AllowDecimalPoint |
+                             NumberStyles.AllowExponent |
+                             NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out d);
+    }
+
+    private static string AsString(object o) {
+      if (o == null) return "null";
+      if (o is string) return string.Format("'{0}'", o);
+      return o.ToString();
+    }
+
+    #endregion
   }
 }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/Experiment.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/Experiment.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/Experiment.cs	(revision 6784)
@@ -104,5 +104,6 @@
     }
 
-    private bool stopPending;
+    private bool experimentStarted = false;
+    private bool experimentStopped = false;
 
     public Experiment()
@@ -114,5 +115,4 @@
       optimizers = new OptimizerList();
       Runs = new RunCollection();
-      stopPending = false;
       Initialize();
     }
@@ -124,5 +124,4 @@
       optimizers = new OptimizerList();
       Runs = new RunCollection();
-      stopPending = false;
       Initialize();
     }
@@ -133,12 +132,8 @@
       optimizers = new OptimizerList();
       Runs = new RunCollection();
-      stopPending = false;
       Initialize();
     }
     [StorableConstructor]
-    private Experiment(bool deserializing)
-      : base(deserializing) {
-      stopPending = false;
-    }
+    private Experiment(bool deserializing) : base(deserializing) { }
     [StorableHook(HookType.AfterDeserialization)]
     private void AfterDeserialization() {
@@ -151,5 +146,7 @@
       optimizers = cloner.Clone(original.optimizers);
       runs = cloner.Clone(original.runs);
-      stopPending = original.stopPending;
+
+      experimentStarted = original.experimentStarted;
+      experimentStopped = original.experimentStopped;
       Initialize();
     }
@@ -172,35 +169,40 @@
       if ((ExecutionState != ExecutionState.Prepared) && (ExecutionState != ExecutionState.Paused) && (ExecutionState != ExecutionState.Stopped))
         throw new InvalidOperationException(string.Format("Prepare not allowed in execution state \"{0}\".", ExecutionState));
-      if (Optimizers.Count > 0) {
-        if (clearRuns) runs.Clear();
-        foreach (IOptimizer optimizer in Optimizers.Where(x => x.ExecutionState != ExecutionState.Started))
+      if (Optimizers.Count == 0) return;
+
+      if (clearRuns) runs.Clear();
+      foreach (IOptimizer optimizer in Optimizers.Where(x => x.ExecutionState != ExecutionState.Started))
+        if (clearRuns || optimizer.ExecutionState != ExecutionState.Prepared)
           optimizer.Prepare(clearRuns);
-      }
     }
     public void Start() {
       if ((ExecutionState != ExecutionState.Prepared) && (ExecutionState != ExecutionState.Paused))
         throw new InvalidOperationException(string.Format("Start not allowed in execution state \"{0}\".", ExecutionState));
-      stopPending = false;
-      if (Optimizers.Count > 0) {
-        IOptimizer optimizer = Optimizers.FirstOrDefault(x => (x.ExecutionState == ExecutionState.Prepared) || (x.ExecutionState == ExecutionState.Paused));
-        if (optimizer != null) optimizer.Start();
-      }
+      if (Optimizers.Count == 0) return;
+
+      experimentStarted = true;
+      experimentStopped = false;
+      IOptimizer optimizer = Optimizers.FirstOrDefault(x => (x.ExecutionState == ExecutionState.Prepared) || (x.ExecutionState == ExecutionState.Paused));
+      if (optimizer != null) optimizer.Start();
     }
     public void Pause() {
       if (ExecutionState != ExecutionState.Started)
         throw new InvalidOperationException(string.Format("Pause not allowed in execution state \"{0}\".", ExecutionState));
-      if (Optimizers.Count > 0) {
-        foreach (IOptimizer optimizer in Optimizers.Where(x => x.ExecutionState == ExecutionState.Started))
-          optimizer.Pause();
-      }
+      if (Optimizers.Count == 0) return;
+
+      experimentStarted = false;
+      experimentStopped = false;
+      foreach (IOptimizer optimizer in Optimizers.Where(x => x.ExecutionState == ExecutionState.Started))
+        optimizer.Pause();
     }
     public void Stop() {
       if ((ExecutionState != ExecutionState.Started) && (ExecutionState != ExecutionState.Paused))
         throw new InvalidOperationException(string.Format("Stop not allowed in execution state \"{0}\".", ExecutionState));
-      stopPending = true;
-      if (Optimizers.Count > 0) {
-        foreach (IOptimizer optimizer in Optimizers.Where(x => (x.ExecutionState == ExecutionState.Started) || (x.ExecutionState == ExecutionState.Paused)))
-          optimizer.Stop();
-      }
+      if (Optimizers.Count == 0) return;
+
+      experimentStarted = false;
+      experimentStopped = true;
+      foreach (IOptimizer optimizer in Optimizers.Where(x => (x.ExecutionState == ExecutionState.Started) || (x.ExecutionState == ExecutionState.Paused)))
+        optimizer.Stop();
     }
 
@@ -333,11 +335,9 @@
     }
     private void optimizer_Stopped(object sender, EventArgs e) {
-      if (!stopPending && Optimizers.Any(x => (x.ExecutionState == ExecutionState.Prepared) || (x.ExecutionState == ExecutionState.Paused))) {
+      if (experimentStopped && Optimizers.All(o => o.ExecutionState == ExecutionState.Stopped || o.ExecutionState == ExecutionState.Prepared)) OnStopped();
+      else if (Optimizers.All(o => o.ExecutionState == ExecutionState.Stopped)) OnStopped();
+      else if (Optimizers.Any(o => o.ExecutionState == ExecutionState.Paused) && Optimizers.All(o => o.ExecutionState != ExecutionState.Started)) OnPaused();
+      else if (experimentStarted && !experimentStopped && Optimizers.Any(x => (x.ExecutionState == ExecutionState.Prepared) || (x.ExecutionState == ExecutionState.Paused))) {
         Optimizers.First(x => (x.ExecutionState == ExecutionState.Prepared) || (x.ExecutionState == ExecutionState.Paused)).Start();
-      } else {
-        if (Optimizers.All(x => (x.ExecutionState != ExecutionState.Started) && (x.ExecutionState != ExecutionState.Paused))) {
-          stopPending = false;
-          OnStopped();
-        }
       }
     }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj	(revision 6784)
@@ -111,4 +111,7 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="RunCollectionDiscretizer.cs" />
+    <Compile Include="RunCollectionGroupCreater.cs" />
+    <Compile Include="RunCollectionSorter.cs" />
     <Compile Include="RunCollectionValueRemover.cs" />
     <Compile Include="IRunCollectionModifier.cs" />
@@ -140,6 +143,4 @@
     <Compile Include="Problems\Problem.cs" />
     <Compile Include="RunCollectionFormulaModifer.cs" />
-    <Compile Include="RunCollectionFuzzifier.cs" />
-    <Compile Include="RunCollectionModificationEvaluator.cs" />
     <Compile Include="RunCollectionConstraints\RunCollectionComparisonConstraint.cs" />
     <Compile Include="RunCollectionConstraints\RunCollectionConstraintCollection.cs" />
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollection.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollection.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollection.cs	(revision 6784)
@@ -51,4 +51,5 @@
 
       constraints = new RunCollectionConstraintCollection(original.constraints.Select(x => cloner.Clone(x)));
+      modifiers = new CheckedItemList<IRunCollectionModifier>(original.modifiers.Select(cloner.Clone));
       foreach (IRunCollectionConstraint constraint in constraints)
         constraint.ConstrainedValue = this;
@@ -67,4 +68,5 @@
       dataTypes = new Dictionary<string, HashSet<Type>>();
       constraints = new RunCollectionConstraintCollection();
+      modifiers = new CheckedItemList<IRunCollectionModifier>();
       RegisterConstraintsEvents();
     }
@@ -83,4 +85,11 @@
       get { return constraints; }
     }
+
+    [Storable]
+    private CheckedItemList<IRunCollectionModifier> modifiers;
+    public CheckedItemList<IRunCollectionModifier> Modifiers {
+      get { return modifiers; }
+    }
+
 
     private bool updateOfRunsInProgress;
@@ -98,4 +107,5 @@
     private void AfterDeserialization() {
       if (constraints == null) constraints = new RunCollectionConstraintCollection();
+      if (modifiers == null) modifiers = new CheckedItemList<IRunCollectionModifier>();
       RegisterConstraintsEvents();
       RegisterConstraintEvents(constraints);
@@ -393,4 +403,43 @@
     }
     #endregion
+
+    #region Modification
+    public void Modify() {
+      UpdateOfRunsInProgress = true;
+      var runs = this.ToList();
+      var selectedRuns = runs.Where(r => r.Visible).ToList();
+      int nSelected = selectedRuns.Count;
+      if (nSelected > 0) {
+        foreach (var modifier in Modifiers.CheckedItems)
+          modifier.Value.Modify(selectedRuns);
+        if (nSelected != selectedRuns.Count || HaveDifferentOrder(selectedRuns, runs.Where(r => r.Visible))) {
+          Clear();
+          AddRange(ReplaceVisibleRuns(runs, selectedRuns));
+        } else if (runs.Count > 0) {
+          OnCollectionReset(this, runs);
+        }
+      }
+      UpdateOfRunsInProgress = false;
+    }
+
+    private static IEnumerable<IRun> ReplaceVisibleRuns(IEnumerable<IRun> runs, IEnumerable<IRun> visibleRuns) {
+      var newRuns = new List<IRun>();
+      var runIt = runs.GetEnumerator();
+      var visibleRunIt = visibleRuns.GetEnumerator();
+      while (runIt.MoveNext()) {
+        if (runIt.Current != null && !runIt.Current.Visible)
+          newRuns.Add(runIt.Current);
+        else if (visibleRunIt.MoveNext())
+          newRuns.Add(visibleRunIt.Current);
+      }
+      while (visibleRunIt.MoveNext())
+        newRuns.Add(visibleRunIt.Current);
+      return newRuns;
+    }
+
+    private static bool HaveDifferentOrder(IEnumerable<IRun> l1, IEnumerable<IRun> l2) {
+      return l1.Zip(l2, (r1, r2) => r1 != r2).Any();
+    }
+    #endregion
   }
 }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionEqualityConstraint.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionEqualityConstraint.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionEqualityConstraint.cs	(revision 6784)
@@ -100,5 +100,5 @@
       foreach (IRun run in ConstrainedValue.Where(r => r.Visible)) {
         IItem item = ConstrainedValue.GetValue(run, constraintColumn);
-        if (!base.Check(item.ToString()))
+        if (item != null && !base.Check(item.ToString()))
           run.Visible = false;
       }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionDiscretizer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionDiscretizer.cs	(revision 6784)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionDiscretizer.cs	(revision 6784)
@@ -0,0 +1,161 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [Item("RunCollection Discretizer", "Creates several levels from the distribution of a certain result accross a run collection and assignes a discretized value.")]
+  [StorableClass]
+  public class RunCollectionDiscretizer : ParameterizedNamedItem, IRunCollectionModifier {
+
+    public override bool CanChangeName { get { return false; } }
+    public override bool CanChangeDescription { get { return false; } }
+
+    #region Parameters
+    public ValueParameter<StringValue> SourceParameter {
+      get { return (ValueParameter<StringValue>)Parameters["Source"]; }
+    }
+    public ValueParameter<StringValue> TargetParameter {
+      get { return (ValueParameter<StringValue>)Parameters["Target"]; }
+    }
+    public ValueParameter<DoubleValue> SpreadParameter {
+      get { return (ValueParameter<DoubleValue>)Parameters["Spread"]; }
+    }
+    public ValueParameter<StringValue> GroupByParameter {
+      get { return (ValueParameter<StringValue>)Parameters["GroupBy"]; }
+    }    
+    public ValueParameter<ItemList<StringValue>> LevelsParameter {
+      get { return (ValueParameter<ItemList<StringValue>>)Parameters["Levels"]; }
+    }    
+    #endregion
+
+    private string Source { get { return SourceParameter.Value.Value; } }
+    private string Target { get { return TargetParameter.Value.Value; } }    
+    private double Spread { get { return SpreadParameter.Value.Value; } }
+    private string GroupBy { get { return GroupByParameter.Value.Value; } }
+    private List<string> Levels { get { return LevelsParameter.Value.Select(v => v.Value).ToList(); } }
+
+      #region Construction & Cloning
+    [StorableConstructor]
+    protected RunCollectionDiscretizer(bool deserializing) : base(deserializing) { }
+    protected RunCollectionDiscretizer(RunCollectionDiscretizer original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEvents();
+    }
+    public RunCollectionDiscretizer() {
+      Parameters.Add(new ValueParameter<StringValue>("Source", "Source value name to be fuzzified.", new StringValue("Value")));
+      Parameters.Add(new ValueParameter<StringValue>("Target", "Target value name. The new, fuzzified variable to be created.", new StringValue("Calc.Value")));      
+      Parameters.Add(new ValueParameter<DoubleValue>("Spread", "The number of standard deviations considered one additional level.", new DoubleValue(1)));
+      Parameters.Add(new ValueParameter<StringValue>("GroupBy", "Create separate analyzes for different values of this variable.", new StringValue("")));
+      Parameters.Add(new ValueParameter<ItemList<StringValue>>("Levels", "The list of levels to be assigned.",
+        new ItemList<StringValue> {
+          new StringValue("Very Low"),
+          new StringValue("Low"),
+          new StringValue("Average"),
+          new StringValue("High"),
+          new StringValue("Very High"),
+        }));     
+      RegisterEvents();
+      UpdateName();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RunCollectionDiscretizer(this, cloner);
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEvents();
+    }
+    #endregion
+
+    private void RegisterEvents() {
+      SourceParameter.ToStringChanged += Parameter_NameChanged;
+      TargetParameter.ToStringChanged += Parameter_NameChanged;      
+      GroupByParameter.ToStringChanged += Parameter_NameChanged;
+    }
+
+    private void Parameter_NameChanged(object sender, EventArgs e) {
+      UpdateName();
+    }
+
+    private void UpdateName() {
+      name = string.Format("{0} := Discrete({1}{2})",
+        Target,
+        Source,
+        string.IsNullOrWhiteSpace(GroupBy) ? "" : string.Format("/{0}", GroupBy));        
+      OnNameChanged();
+    }
+
+    #region IRunCollectionModifier Members
+
+    public void Modify(List<IRun> runs) {
+      foreach (var group in runs
+        .Select(r => new {Run=r, Value=GetSourceValue(r)})
+        .Where(r => r.Value.HasValue && !double.IsNaN(r.Value.Value) && !double.IsInfinity(r.Value.Value))
+        .Select(r => new {r.Run, r.Value.Value, Bin=GetGroupByValue(r.Run)})
+        .GroupBy(r => r.Bin).ToList()) {
+        var values = group.Select(r => r.Value).ToList();
+        if (values.Count > 0) {
+          var avg = values.Average();
+          var stdDev = values.StandardDeviation();
+          foreach (var r in group) {
+            r.Run.Results[Target] = new StringValue(Fuzzify(r.Value, avg, stdDev));
+          }
+        }
+      }      
+    }
+
+    private double? GetSourceValue(IRun run) {
+      return CastSourceValue(run.Results) ?? CastSourceValue(run.Parameters);
+    }
+
+    private string GetGroupByValue(IRun run) {
+      if (string.IsNullOrWhiteSpace(GroupBy))
+        return String.Empty;
+      IItem value;
+      run.Results.TryGetValue(GroupBy, out value);
+      if (value == null)
+        run.Parameters.TryGetValue(GroupBy, out value);
+      if (value != null)
+        return value.ToString();
+      else
+        return String.Empty;
+    }
+
+    private double? CastSourceValue(IDictionary<string, IItem> variables) {
+      IItem value;
+      variables.TryGetValue(Source, out value);
+      var intValue = value as IntValue;
+      if (intValue != null) {
+        return intValue.Value;
+      } else {
+        var doubleValue = value as DoubleValue;
+        if (doubleValue != null)
+          return doubleValue.Value;
+      }
+      return null;
+    }
+
+    private string Fuzzify(double value, double avg, double stdDev) {
+      double dev = (value - avg)/(stdDev*Spread);
+      int index;
+      if (Levels.Count % 2 == 1) {
+        index = (int) Math.Floor(Math.Abs(dev));
+        index = (Levels.Count - 1)/2 + Math.Sign(dev) * index;
+      } else {
+        index = (int) Math.Ceiling(Math.Abs(dev));
+        if (dev > 0)
+          index = Levels.Count/2 + index;
+        else
+          index = Levels.Count/2 + 1 - index;
+      }
+      return Levels[Math.Min(Levels.Count - 1, Math.Max(0, index))];
+    }
+
+    #endregion
+  }
+}
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionFormulaModifer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionFormulaModifer.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionFormulaModifer.cs	(revision 6784)
@@ -20,11 +20,14 @@
     public ValueParameter<StringValue> ResultNameParameter {
       get { return (ValueParameter<StringValue>)Parameters["ResultName"]; }
-    }    
-    
+    }
+
     public ValueParameter<StringValue> FormulaParameter {
       get { return (ValueParameter<StringValue>)Parameters["Formula"]; }
-    }    
+    }
 
-    #region Construction & Cloning    
+    private string ResultName { get { return ResultNameParameter.Value.Value; } }
+    private string Formula { get { return FormulaParameter.Value.Value; } }
+
+    #region Construction & Cloning
     [StorableConstructor]
     protected RunCollectionFormulaModifer(bool deserializing) : base(deserializing) { }
@@ -35,5 +38,28 @@
     public RunCollectionFormulaModifer() {
       Parameters.Add(new ValueParameter<StringValue>("ResultName", "The name of the result to be generated by this formula.", new StringValue("Calc.Value")));
-      Parameters.Add(new ValueParameter<StringValue>("Formula", "RPN formula for new value. This can contain existing run parameters or results (optionally in quotes if they contain whitespace), numbers and arithmetic operators in postfix notation.", new StringValue("1 1 +")));
+      Parameters.Add(new ValueParameter<StringValue>("Formula",
+@"RPN formula for new value in postfix notation.
+
+This can contain the following elements:
+
+literals:
+  numbers, true, false, null and strings in single quotes
+variables (run parameters or results):
+  unquoted or in double quotes if they contain special characters or whitespace
+mathematical functions:
+  +, -, /, ^ (power), log
+predicates:
+  ==, <, >, isnull, not
+stack manipulation:
+  drop swap dup
+string matching:
+  <string> <pattern> ismatch
+string replacing:
+  <string> <pattern> <replacement> rename
+conditionals:
+  <then> <else> <condition> if
+
+If the final value is null, the result variable is removed if it exists.",
+        new StringValue("1 1 +")));
       UpdateName();
       RegisterEvents();
@@ -58,10 +84,10 @@
 
     private void UpdateName() {
-      name = string.Format("{0} := {1}", ResultNameParameter.Value.Value, FormulaParameter.Value.Value);
+      name = string.Format("{0} := {1}", ResultName, Formula);
       OnNameChanged();
     }
 
     public void Modify(List<IRun> runs) {
-      var calc = new Calculator {Formula = FormulaParameter.Value.Value};      
+      var calc = new Calculator { Formula = Formula };
       foreach (var run in runs) {
         var variables = new Dictionary<string, IItem>();
@@ -70,8 +96,12 @@
         foreach (var result in run.Results)
           variables[result.Key] = result.Value;
-        run.Results[ResultNameParameter.Value.Value] = calc.GetValue(variables);        
-      }      
+        var value = calc.GetValue(variables);
+        if (value != null)
+          run.Results[ResultName] = value;
+        else
+          run.Results.Remove(ResultName);
+      }
     }
-    
+
   }
 }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionGroupCreater.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionGroupCreater.cs	(revision 6784)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionGroupCreater.cs	(revision 6784)
@@ -0,0 +1,84 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+
+  [Item("RunCollection Group Creater", "Regroups existing runs according to equal values in GroupBy and prefixes them according to their value in Prefix.")]
+  [StorableClass]
+  public class RunCollectionGroupCreater : ParameterizedNamedItem, IRunCollectionModifier {
+    
+    public ValueParameter<ItemCollection<StringValue>> GroupByParameter {
+      get { return (ValueParameter<ItemCollection<StringValue>>)Parameters["GroupBy"]; }
+    }
+
+    public ValueParameter<StringValue> PrefixParameter {
+      get { return (ValueParameter<StringValue>)Parameters["Prefix"]; }
+    }
+
+    private IEnumerable<string> GroupBy { get { return GroupByParameter.Value.Select(v => v.Value); } }
+    private string Prefix { get { return PrefixParameter.Value.Value; } }
+
+    #region Construction & Cloning
+    [StorableConstructor]
+    protected RunCollectionGroupCreater(bool deserializing) : base(deserializing) { }
+    protected RunCollectionGroupCreater(RunCollectionGroupCreater original, Cloner cloner) : base(original, cloner) { }
+    public RunCollectionGroupCreater() {
+      Parameters.Add(new ValueParameter<ItemCollection<StringValue>>("GroupBy", "The variable that has to be the same for all members of a group.",
+        new ItemCollection<StringValue>(new[] { new StringValue("Problem Name") })));
+      Parameters.Add(new ValueParameter<StringValue>("Prefix", "The distinguishing prefix values for the individual runs.",
+        new StringValue("Algorithm Name")));      
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RunCollectionGroupCreater(this, cloner);
+    }
+    #endregion    
+
+    private static string GetStringValue(string name, IRun r) {
+      IItem item;
+      r.Results.TryGetValue(name, out item);
+      if (item != null)
+        return item.ToString();
+      r.Parameters.TryGetValue(name, out item);
+      return item != null ? item.ToString() : "<none>";
+    }
+
+    private static string GetValues(IEnumerable<string> names, IRun r) {
+      return string.Join("/", names.Select(n => GetStringValue(n, r)));
+    }
+
+    public void Modify(List<IRun> runs) {
+      var groups = runs.GroupBy(r => GetValues(GroupBy, r).ToString()).ToList();
+      runs.Clear();
+      foreach (var group in groups) {
+        var run = new Run { Name = string.Format(group.Key) };
+        foreach (var r in group) {
+          var prefix = GetStringValue(Prefix, r);
+          foreach (var result in r.Results) {
+            InsertNew(run.Results, prefix, result.Key, result.Value);
+          }
+          foreach (var parameter in r.Parameters) {
+            InsertNew(run.Parameters, prefix, parameter.Key, parameter.Value);
+          }
+        }
+        runs.Add(run);
+      }
+    }
+
+    private static void InsertNew(IDictionary<string, IItem> dict, string prefix, string key, IItem value) {
+      if (prefix == null)
+        prefix = "<null>";
+      var n = 0;
+      var name = string.Format("{0}.{1}", prefix, key);
+      while (dict.ContainsKey(name)) {
+        name = string.Format("{0}_{1}.{2}", prefix, ++n, key);
+      }
+      dict.Add(name, value);      
+    }
+  }
+}
Index: /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionSorter.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionSorter.cs	(revision 6784)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Optimization/3.3/RunCollectionSorter.cs	(revision 6784)
@@ -0,0 +1,108 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [Item("RunCollection Sorter", "Sorts a run collection according the specified key variable.")]
+  [StorableClass]
+  public class RunCollectionSorter : ParameterizedNamedItem, IRunCollectionModifier {
+
+    public override bool CanChangeName { get { return false; } }
+    public override bool CanChangeDescription { get { return false; } }
+
+    #region Parameters
+    public ValueParameter<StringValue> ValueParameter {
+      get { return (ValueParameter<StringValue>)Parameters["Value"]; }
+    }
+    #endregion
+
+    private string Value { get { return ValueParameter.Value.Value; } }
+
+    #region Construction & Cloning
+    [StorableConstructor]
+    protected RunCollectionSorter(bool deserializing) : base(deserializing) { }
+    protected RunCollectionSorter(RunCollectionSorter original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEvents();
+    }
+    public RunCollectionSorter() {
+      Parameters.Add(new ValueParameter<StringValue>("Value", "The variable name used as sorting key.", new StringValue("Value")));
+      RegisterEvents();
+      UpdateName();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RunCollectionSorter(this, cloner);
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEvents();
+    }
+    #endregion
+
+    private void RegisterEvents() {
+      ValueParameter.ToStringChanged += Parameter_NameChanged;
+    }
+
+    private void Parameter_NameChanged(object sender, EventArgs e) {
+      UpdateName();
+    }
+
+    private void UpdateName() {
+      name = string.Format("Sort by {0}", Value);
+      OnNameChanged();
+    }
+
+    private class ValueComparer : IComparer<IComparable> {
+
+      #region IComparer<IComparable> Members
+
+      public int Compare(IComparable x, IComparable y) {
+        if (x == null && y == null) return 0;
+        if (x == null) return -1;
+        if (y == null) return 1;
+        return x.CompareTo(y);
+      }
+
+      #endregion
+    }
+
+    private static readonly ValueComparer Comparer = new ValueComparer();
+
+    #region IRunCollectionModifier Members
+
+    public void Modify(List<IRun> runs) {
+      var sortedRuns = runs
+        .Select(r => new {Run = r, Key = GetValue(r)})
+        .OrderBy(r => r.Key, Comparer)
+        .Select(r => r.Run).ToList();
+      runs.Clear();
+      runs.AddRange(sortedRuns);
+    }
+
+    private IComparable GetValue(IRun run) {
+      return GetValue(run.Results) ?? GetValue(run.Parameters);
+    }
+
+    private IComparable GetValue(IDictionary<string, IItem> variables) {
+      IItem value;
+      variables.TryGetValue(Value, out value);
+      var intValue = value as IntValue;
+      if (intValue != null)
+        return intValue;
+      var doubleValue = value as DoubleValue;
+      if (doubleValue != null)
+        return doubleValue;
+      if (value != null)
+        return value.ToString();
+      return null;
+    }
+
+    #endregion
+  }
+}
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLab.Problems.DataAnalysis.Regression-3.3.csproj
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLab.Problems.DataAnalysis.Regression-3.3.csproj	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLab.Problems.DataAnalysis.Regression-3.3.csproj	(revision 6784)
@@ -121,4 +121,7 @@
     <Compile Include="SupportVectorRegression\SupportVectorRegressionSolution.cs" />
     <Compile Include="Symbolic\Analyzers\BestSymbolicRegressionSolutionAnalyzer.cs" />
+    <Compile Include="Symbolic\Analyzers\SymbolicRegressionTournamentPruning.cs">
+      <SubType>Code</SubType>
+    </Compile>
     <Compile Include="Symbolic\Analyzers\TrainingBestScaledSymbolicRegressionSolutionAnalyzer.cs" />
     <Compile Include="Symbolic\Analyzers\SymbolicRegressionValidationAnalyzer.cs" />
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionTournamentPruning.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionTournamentPruning.cs	(revision 6784)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionTournamentPruning.cs	(revision 6784)
@@ -0,0 +1,323 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
+
+namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
+  public class SymbolicRegressionTournamentPruning : SingleSuccessorOperator, ISymbolicRegressionAnalyzer {
+    private const string RandomParameterName = "Random";
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string DataAnalysisProblemDataParameterName = "DataAnalysisProblemData";
+    private const string SamplesStartParameterName = "SamplesStart";
+    private const string SamplesEndParameterName = "SamplesEnd";
+    private const string EvaluatorParameterName = "Evaluator";
+    private const string MaximizationParameterName = "Maximization";
+    private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+    private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
+    private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
+    private const string MaxPruningRatioParameterName = "MaxPruningRatio";
+    private const string TournamentSizeParameterName = "TournamentSize";
+    private const string PopulationPercentileStartParameterName = "PopulationPercentileStart";
+    private const string PopulationPercentileEndParameterName = "PopulationPercentileEnd";
+    private const string QualityGainWeightParameterName = "QualityGainWeight";
+    private const string IterationsParameterName = "Iterations";
+    private const string FirstPruningGenerationParameterName = "FirstPruningGeneration";
+    private const string PruningFrequencyParameterName = "PruningFrequency";
+    private const string GenerationParameterName = "Generations";
+    private const string ResultsParameterName = "Results";
+
+    #region parameter properties
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters[RandomParameterName]; }
+    }
+    public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public ILookupParameter<DataAnalysisProblemData> DataAnalysisProblemDataParameter {
+      get { return (ILookupParameter<DataAnalysisProblemData>)Parameters[DataAnalysisProblemDataParameterName]; }
+    }
+    public ILookupParameter<ISymbolicExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }
+    }
+    public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
+    }
+    public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> SamplesStartParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[SamplesStartParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> SamplesEndParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[SamplesEndParameterName]; }
+    }
+    public ILookupParameter<ISymbolicRegressionEvaluator> EvaluatorParameter {
+      get { return (ILookupParameter<ISymbolicRegressionEvaluator>)Parameters[EvaluatorParameterName]; }
+    }
+    public ILookupParameter<BoolValue> MaximizationParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters[MaximizationParameterName]; }
+    }
+    public IValueLookupParameter<DoubleValue> MaxPruningRatioParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[MaxPruningRatioParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> TournamentSizeParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[TournamentSizeParameterName]; }
+    }
+    public IValueLookupParameter<DoubleValue> PopulationPercentileStartParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[PopulationPercentileStartParameterName]; }
+    }
+    public IValueLookupParameter<DoubleValue> PopulationPercentileEndParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[PopulationPercentileEndParameterName]; }
+    }
+    public IValueLookupParameter<DoubleValue> QualityGainWeightParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[QualityGainWeightParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> IterationsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[IterationsParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> FirstPruningGenerationParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[FirstPruningGenerationParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> PruningFrequencyParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[PruningFrequencyParameterName]; }
+    }
+    public ILookupParameter<IntValue> GenerationParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[GenerationParameterName]; }
+    }
+    public ILookupParameter<ResultCollection> ResultsParameter {
+      get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
+    }
+    #endregion
+    #region properties
+    public IRandom Random {
+      get { return RandomParameter.ActualValue; }
+    }
+    public ItemArray<SymbolicExpressionTree> SymbolicExpressionTree {
+      get { return SymbolicExpressionTreeParameter.ActualValue; }
+    }
+    public DataAnalysisProblemData DataAnalysisProblemData {
+      get { return DataAnalysisProblemDataParameter.ActualValue; }
+    }
+    public ISymbolicExpressionTreeInterpreter SymbolicExpressionTreeInterpreter {
+      get { return SymbolicExpressionTreeInterpreterParameter.ActualValue; }
+    }
+    public DoubleValue UpperEstimationLimit {
+      get { return UpperEstimationLimitParameter.ActualValue; }
+    }
+    public DoubleValue LowerEstimationLimit {
+      get { return LowerEstimationLimitParameter.ActualValue; }
+    }
+    public IntValue SamplesStart {
+      get { return SamplesStartParameter.ActualValue; }
+    }
+    public IntValue SamplesEnd {
+      get { return SamplesEndParameter.ActualValue; }
+    }
+    public ISymbolicRegressionEvaluator Evaluator {
+      get { return EvaluatorParameter.ActualValue; }
+    }
+    public BoolValue Maximization {
+      get { return MaximizationParameter.ActualValue; }
+    }
+    public DoubleValue MaxPruningRatio {
+      get { return MaxPruningRatioParameter.ActualValue; }
+    }
+    public IntValue TournamentSize {
+      get { return TournamentSizeParameter.ActualValue; }
+    }
+    public DoubleValue PopulationPercentileStart {
+      get { return PopulationPercentileStartParameter.ActualValue; }
+    }
+    public DoubleValue PopulationPercentileEnd {
+      get { return PopulationPercentileEndParameter.ActualValue; }
+    }
+    public DoubleValue QualityGainWeight {
+      get { return QualityGainWeightParameter.ActualValue; }
+    }
+    public IntValue Iterations {
+      get { return IterationsParameter.ActualValue; }
+    }
+    public IntValue PruningFrequency {
+      get { return PruningFrequencyParameter.ActualValue; }
+    }
+    public IntValue FirstPruningGeneration {
+      get { return FirstPruningGenerationParameter.ActualValue; }
+    }
+    public IntValue Generation {
+      get { return GenerationParameter.ActualValue; }
+    }
+    #endregion
+    protected SymbolicRegressionTournamentPruning(bool deserializing) : base(deserializing) { }
+    public SymbolicRegressionTournamentPruning()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>(RandomParameterName, "A random number generator."));
+      Parameters.Add(new ScopeTreeLookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees to prune."));
+      Parameters.Add(new LookupParameter<DataAnalysisProblemData>(DataAnalysisProblemDataParameterName, "The data analysis problem data to use for branch impact evaluation."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, "The interpreter to use for node impact evaluation"));
+      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesStartParameterName, "The first row index of the dataset partition to use for branch impact evaluation."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesEndParameterName, "The last row index of the dataset partition to use for branch impact evaluation."));
+      Parameters.Add(new LookupParameter<ISymbolicRegressionEvaluator>(EvaluatorParameterName, "The evaluator that should be used to determine which branches are not relevant."));
+      Parameters.Add(new LookupParameter<BoolValue>(MaximizationParameterName, "The direction of optimization."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(MaxPruningRatioParameterName, "The maximal relative size of the pruned branch.", new DoubleValue(0.5)));
+      Parameters.Add(new ValueLookupParameter<IntValue>(TournamentSizeParameterName, "The number of branches to compare for pruning", new IntValue(10)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(PopulationPercentileStartParameterName, "The start of the population percentile to consider for pruning.", new DoubleValue(0.25)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(PopulationPercentileEndParameterName, "The end of the population percentile to consider for pruning.", new DoubleValue(0.75)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(QualityGainWeightParameterName, "The weight of the quality gain relative to the size gain.", new DoubleValue(1.0)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper estimation limit to use for evaluation."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower estimation limit to use for evaluation."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(IterationsParameterName, "The number of pruning iterations to apply for each tree.", new IntValue(1)));
+      Parameters.Add(new ValueLookupParameter<IntValue>(FirstPruningGenerationParameterName, "The first generation when pruning should be applied.", new IntValue(1)));
+      Parameters.Add(new ValueLookupParameter<IntValue>(PruningFrequencyParameterName, "The frequency of pruning operations (1: every generation, 2: every second generation...)", new IntValue(1)));
+      Parameters.Add(new LookupParameter<IntValue>(GenerationParameterName, "The current generation."));
+      Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The results collection."));
+    }
+
+    protected SymbolicRegressionTournamentPruning(SymbolicRegressionTournamentPruning original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicRegressionTournamentPruning(this, cloner);
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      #region compatibility remove before releasing 3.3.1
+      if (!Parameters.ContainsKey(EvaluatorParameterName)) {
+        Parameters.Add(new LookupParameter<ISymbolicRegressionEvaluator>(EvaluatorParameterName, "The evaluator which should be used to evaluate the solution on the validation set."));
+      }
+      if (!Parameters.ContainsKey(MaximizationParameterName)) {
+        Parameters.Add(new LookupParameter<BoolValue>(MaximizationParameterName, "The direction of optimization."));
+      }
+      #endregion
+    }
+
+    public override IOperation Apply() {
+      bool pruningCondition =
+        (Generation.Value >= FirstPruningGeneration.Value) &&
+        ((Generation.Value - FirstPruningGeneration.Value) % PruningFrequency.Value == 0);
+      if (pruningCondition) {
+        int n = SymbolicExpressionTree.Length;
+        double percentileStart = PopulationPercentileStart.Value;
+        double percentileEnd = PopulationPercentileEnd.Value;
+        // for each tree in the given percentile
+        var trees = SymbolicExpressionTree
+          .Skip((int)(n * percentileStart))
+          .Take((int)(n * (percentileEnd - percentileStart)));
+        foreach (var tree in trees) {
+          Prune(Random, tree, Iterations.Value, TournamentSize.Value,
+            DataAnalysisProblemData, SamplesStart.Value, SamplesEnd.Value,
+            SymbolicExpressionTreeInterpreter, Evaluator, Maximization.Value,
+            LowerEstimationLimit.Value, UpperEstimationLimit.Value,
+            MaxPruningRatio.Value, QualityGainWeight.Value);
+        }
+      }
+      return base.Apply();
+    }
+
+    public static void Prune(IRandom random, SymbolicExpressionTree tree, int iterations, int tournamentSize,
+      DataAnalysisProblemData problemData, int samplesStart, int samplesEnd,
+      ISymbolicExpressionTreeInterpreter interpreter, ISymbolicRegressionEvaluator evaluator, bool maximization,
+      double lowerEstimationLimit, double upperEstimationLimit,
+      double maxPruningRatio, double qualityGainWeight) {
+      IEnumerable<int> rows = Enumerable.Range(samplesStart, samplesEnd - samplesStart)
+        .Where(i => i < problemData.TestSamplesStart.Value || problemData.TestSamplesEnd.Value <= i);
+      int originalSize = tree.Size;
+      double originalQuality = evaluator.Evaluate(interpreter, tree,
+        lowerEstimationLimit, upperEstimationLimit, problemData.Dataset, problemData.TargetVariable.Value, rows);
+
+      int minPrunedSize = (int)(originalSize * (1 - maxPruningRatio));
+
+      // tree for branch evaluation
+      SymbolicExpressionTree templateTree = (SymbolicExpressionTree)tree.Clone();
+      while (templateTree.Root.SubTrees[0].SubTrees.Count > 0) templateTree.Root.SubTrees[0].RemoveSubTree(0);
+
+      SymbolicExpressionTree prunedTree = tree;
+      for (int iteration = 0; iteration < iterations; iteration++) {
+        SymbolicExpressionTree iterationBestTree = prunedTree;
+        double bestGain = double.PositiveInfinity;
+        int maxPrunedBranchSize = (int)(prunedTree.Size * maxPruningRatio);
+
+        for (int i = 0; i < tournamentSize; i++) {
+          var clonedTree = (SymbolicExpressionTree)prunedTree.Clone();
+          int clonedTreeSize = clonedTree.Size;
+          var prunePoints = (from node in clonedTree.IterateNodesPostfix()
+                             from subTree in node.SubTrees
+                             let subTreeSize = subTree.GetSize()
+                             where subTreeSize <= maxPrunedBranchSize
+                             where clonedTreeSize - subTreeSize >= minPrunedSize
+                             select new { Parent = node, Branch = subTree, SubTreeIndex = node.SubTrees.IndexOf(subTree) })
+                 .ToList();
+          if (prunePoints.Count > 0) {
+            var selectedPrunePoint = prunePoints.SelectRandom(random);
+            templateTree.Root.SubTrees[0].AddSubTree(selectedPrunePoint.Branch);
+            IEnumerable<double> branchValues = interpreter.GetSymbolicExpressionTreeValues(templateTree, problemData.Dataset, rows);
+            double branchMean = branchValues.Average();
+            templateTree.Root.SubTrees[0].RemoveSubTree(0);
+
+            selectedPrunePoint.Parent.RemoveSubTree(selectedPrunePoint.SubTreeIndex);
+            var constNode = CreateConstant(branchMean);
+            selectedPrunePoint.Parent.InsertSubTree(selectedPrunePoint.SubTreeIndex, constNode);
+
+            double prunedQuality = evaluator.Evaluate(interpreter, clonedTree,
+        lowerEstimationLimit, upperEstimationLimit, problemData.Dataset, problemData.TargetVariable.Value, Enumerable.Range(samplesStart, samplesEnd - samplesStart));
+            double prunedSize = clonedTree.Size;
+            // deteriation in quality:
+            // exp: MSE : newMse < origMse (improvement) => prefer the larger improvement
+            //      MSE : newMse > origMse (deteriation) => prefer the smaller deteriation
+            //      MSE : minimize: newMse / origMse
+            //      R²  : newR² > origR²   (improvment) => prefer the larger improvment
+            //      R²  : newR² < origR²   (deteriation) => prefer smaller deteriation
+            //      R²  : minimize: origR² / newR²
+            double qualityDeteriation = maximization ? originalQuality / prunedQuality : prunedQuality / originalQuality;
+            // size of the pruned tree is always smaller than the size of the original tree
+            // same change in quality => prefer pruning operation that removes a larger tree
+            double gain = (qualityDeteriation * qualityGainWeight) /
+                           (originalSize / prunedSize);
+            if (gain < bestGain) {
+              bestGain = gain;
+              iterationBestTree = clonedTree;
+            }
+          }
+        }
+        prunedTree = iterationBestTree;
+      }
+      tree.Root = prunedTree.Root;
+    }
+
+    private static SymbolicExpressionTreeNode CreateConstant(double constantValue) {
+      var node = (ConstantTreeNode)(new Constant()).CreateTreeNode();
+      node.Value = constantValue;
+      return node;
+    }
+  }
+}
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs	(revision 6784)
@@ -73,5 +73,5 @@
       List<ISymbolicExpressionTreeNode> nodes = tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPostfix().ToList();
 
-      var targetClassValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      var targetClassValues = dataset.GetDoubleValues(targetVariable, rows);
       var originalOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows)
         .LimitToRange(Content.Model.LowerEstimationLimit, Content.Model.UpperEstimationLimit)
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.cs	(revision 6784)
@@ -26,5 +26,5 @@
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views {
-  [Content(typeof(SymbolicDiscriminantFunctionClassificationSolution), true)]
+  [Content(typeof(SymbolicDiscriminantFunctionClassificationSolution), false)]
   [View("SymbolicDiscriminantFunctionClassificationSolution View")]
   public partial class SymbolicDiscriminantFunctionClassificationSolutionView : DiscriminantFunctionClassificationSolutionView {
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs	(revision 6784)
@@ -54,5 +54,5 @@
     public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
       OnlineCalculatorError errorState;
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs	(revision 6784)
@@ -33,5 +33,5 @@
     public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       OnlineCalculatorError errorState;
       double r2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedValues, originalValues, out errorState);
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs	(revision 6784)
@@ -76,10 +76,13 @@
 
     private void UpdateEstimationLimits() {
-      if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
-        var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End);
+      if (ProblemData.TrainingIndizes.Any()) {
+        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).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;
       }
     }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveBoundedMeanSquaredErrorEvaluator.cs	(revision 6784)
@@ -54,5 +54,5 @@
     public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
 
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs	(revision 6784)
@@ -54,5 +54,5 @@
     public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
       OnlineCalculatorError errorState;
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveOverfittingAnalyzer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveOverfittingAnalyzer.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveOverfittingAnalyzer.cs	(revision 6784)
@@ -76,12 +76,14 @@
     public override IOperation Apply() {
       double[] trainingQuality = QualityParameter.ActualValue.Select(x => x.Value).ToArray();
+      var problemData = ProblemDataParameter.ActualValue;
+      var evaluator = EvaluatorParameter.ActualValue;
       // evaluate on validation partition
       IEnumerable<int> rows = GenerateRowsToEvaluate();
       if (!rows.Any()) return base.Apply();
-
-      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(EvaluatorParameter.ActualValue);
-      double[] validationQuality = (from tree in SymbolicExpressionTree
-                                    select EvaluatorParameter.ActualValue.Evaluate(childContext, tree, ProblemDataParameter.ActualValue, rows))
-                                   .ToArray();
+      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
+      double[] validationQuality = SymbolicExpressionTree
+        .AsParallel()
+        .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
+        .ToArray();
       double r = 0.0;
       try {
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs	(revision 6784)
@@ -54,5 +54,5 @@
     public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IClassificationProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       OnlineCalculatorError errorState;
       double r2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedValues, originalValues, out errorState);
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs	(revision 6784)
@@ -75,10 +75,13 @@
 
     private void UpdateEstimationLimits() {
-      if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
-        var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End);
+      if (ProblemData.TrainingIndizes.Any()) {
+        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).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;
       }
     }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationModel.cs	(revision 6784)
@@ -127,5 +127,5 @@
       var rows = problemData.TrainingIndizes;
       var estimatedValues = model.Interpreter.GetSymbolicExpressionTreeValues(model.SymbolicExpressionTree, dataset, rows);
-      var targetValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      var targetValues = dataset.GetDoubleValues(targetVariable, rows);
       double alpha;
       double beta;
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs	(revision 6784)
@@ -72,5 +72,5 @@
       var originalOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows)
         .ToArray();
-      var targetValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      var targetValues = dataset.GetDoubleValues(targetVariable, rows);
       OnlineCalculatorError errorState;
       double originalR2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, originalOutput, out errorState);
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveMeanSquaredErrorTreeSizeEvaluator.cs	(revision 6784)
@@ -54,5 +54,5 @@
     public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
       OnlineCalculatorError errorState;
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs	(revision 6784)
@@ -54,5 +54,5 @@
     public static double[] Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       OnlineCalculatorError errorState;
       double r2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedValues, originalValues, out errorState);
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs	(revision 6784)
@@ -80,10 +80,13 @@
 
     private void UpdateEstimationLimits() {
-      if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
-        var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End);
+      if (ProblemData.TrainingIndizes.Any()) {
+        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).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;
       }
     }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveMeanSquaredErrorEvaluator.cs	(revision 6784)
@@ -56,5 +56,5 @@
     public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
       OnlineCalculatorError errorState;
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveOverfittingAnalyzer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveOverfittingAnalyzer.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveOverfittingAnalyzer.cs	(revision 6784)
@@ -79,9 +79,12 @@
 
       double[] trainingQuality = QualityParameter.ActualValue.Select(x => x.Value).ToArray();
+      var problemData = ProblemDataParameter.ActualValue;
+      var evaluator = EvaluatorParameter.ActualValue;
       // evaluate on validation partition
-      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(EvaluatorParameter.ActualValue);
-      double[] validationQuality = (from tree in SymbolicExpressionTree
-                                    select EvaluatorParameter.ActualValue.Evaluate(childContext, tree, ProblemDataParameter.ActualValue, rows))
-                                   .ToArray();
+      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
+      double[] validationQuality = SymbolicExpressionTree
+        .AsParallel()
+        .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
+        .ToArray();
       double r = 0.0;
       try {
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs	(revision 6784)
@@ -56,5 +56,5 @@
     public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      IEnumerable<double> originalValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable, rows);
+      IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
       OnlineCalculatorError errorState;
       double r2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedValues, originalValues, out errorState);
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs	(revision 6784)
@@ -77,10 +77,13 @@
 
     private void UpdateEstimationLimits() {
-      if (ProblemData.TrainingPartition.Start < ProblemData.TrainingPartition.End) {
-        var targetValues = ProblemData.Dataset.GetVariableValues(ProblemData.TargetVariable, ProblemData.TrainingPartition.Start, ProblemData.TrainingPartition.End);
+      if (ProblemData.TrainingIndizes.Any()) {
+        var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).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;
       }
     }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionModel.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionModel.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionModel.cs	(revision 6784)
@@ -73,5 +73,5 @@
       var rows = problemData.TrainingIndizes;
       var estimatedValues = model.Interpreter.GetSymbolicExpressionTreeValues(model.SymbolicExpressionTree, dataset, rows);
-      var targetValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      var targetValues = dataset.GetDoubleValues(targetVariable, rows);
       double alpha;
       double beta;
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/RunCollectionVariableImpactView.Designer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/RunCollectionVariableImpactView.Designer.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/RunCollectionVariableImpactView.Designer.cs	(revision 6784)
@@ -46,4 +46,8 @@
     private void InitializeComponent() {
       this.matrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView();
+      this.comboBox = new System.Windows.Forms.ComboBox();
+      this.label1 = new System.Windows.Forms.Label();
+      this.variableImpactsGroupBox = new System.Windows.Forms.GroupBox();
+      this.variableImpactsGroupBox.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -55,9 +59,42 @@
       this.matrixView.Caption = "StringConvertibleMatrix View";
       this.matrixView.Content = null;
-      this.matrixView.Location = new System.Drawing.Point(3, 3);
+      this.matrixView.Location = new System.Drawing.Point(6, 19);
       this.matrixView.Name = "matrixView";
       this.matrixView.ReadOnly = true;
-      this.matrixView.Size = new System.Drawing.Size(303, 229);
+      this.matrixView.ShowRowsAndColumnsTextBox = true;
+      this.matrixView.ShowStatisticalInformation = true;
+      this.matrixView.Size = new System.Drawing.Size(294, 174);
       this.matrixView.TabIndex = 0;
+      // 
+      // comboBox
+      // 
+      this.comboBox.FormattingEnabled = true;
+      this.comboBox.Location = new System.Drawing.Point(39, 6);
+      this.comboBox.Name = "comboBox";
+      this.comboBox.Size = new System.Drawing.Size(68, 21);
+      this.comboBox.TabIndex = 1;
+      this.comboBox.SelectedValueChanged += new System.EventHandler(this.comboBox_SelectedValueChanged);
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(3, 9);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(30, 13);
+      this.label1.TabIndex = 2;
+      this.label1.Text = "Fold:";
+      // 
+      // variableImpactsGroupBox
+      // 
+      this.variableImpactsGroupBox.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.variableImpactsGroupBox.Controls.Add(this.matrixView);
+      this.variableImpactsGroupBox.Location = new System.Drawing.Point(0, 33);
+      this.variableImpactsGroupBox.Name = "variableImpactsGroupBox";
+      this.variableImpactsGroupBox.Size = new System.Drawing.Size(306, 199);
+      this.variableImpactsGroupBox.TabIndex = 3;
+      this.variableImpactsGroupBox.TabStop = false;
+      this.variableImpactsGroupBox.Text = "Variable impacts:";
       // 
       // RunCollectionVariableImpactView
@@ -65,8 +102,12 @@
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.matrixView);
+      this.Controls.Add(this.variableImpactsGroupBox);
+      this.Controls.Add(this.label1);
+      this.Controls.Add(this.comboBox);
       this.Name = "RunCollectionVariableImpactView";
       this.Size = new System.Drawing.Size(309, 235);
+      this.variableImpactsGroupBox.ResumeLayout(false);
       this.ResumeLayout(false);
+      this.PerformLayout();
 
     }
@@ -75,4 +116,7 @@
 
     private HeuristicLab.Data.Views.StringConvertibleMatrixView matrixView;
+    private System.Windows.Forms.ComboBox comboBox;
+    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.GroupBox variableImpactsGroupBox;
   }
 }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/RunCollectionVariableImpactView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/RunCollectionVariableImpactView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/RunCollectionVariableImpactView.cs	(revision 6784)
@@ -35,4 +35,6 @@
   public sealed partial class RunCollectionVariableImpactView : AsynchronousContentView {
     private const string variableImpactResultName = "Variable impacts";
+    private const string crossValidationFoldsResultName = "CrossValidation Folds";
+    private const string numberOfFoldsParameterName = "Folds";
     public RunCollectionVariableImpactView() {
       InitializeComponent();
@@ -95,80 +97,143 @@
     }
 
+    private void comboBox_SelectedValueChanged(object sender, EventArgs e) {
+      if (comboBox.SelectedItem != null) {
+        var cvRuns = from r in Content
+                     where r.Visible
+                     where r.Parameters.ContainsKey(numberOfFoldsParameterName)
+                     select r;
+        if (comboBox.SelectedIndex == 0) {
+          var selectedFolds = cvRuns
+            .SelectMany(r => (RunCollection)r.Results[crossValidationFoldsResultName])
+            .Where(r => r.Results.ContainsKey(variableImpactResultName));
+          matrixView.Content = CalculateVariableImpactMatrix(selectedFolds.ToArray());
+        } else {
+          var selectedFolds = from r in cvRuns
+                              let foldCollection = (RunCollection)r.Results[crossValidationFoldsResultName]
+                              let run = foldCollection.ElementAt(comboBox.SelectedIndex - 1)
+                              where run.Results.ContainsKey(variableImpactResultName)
+                              select new { run, r.Name };
+          matrixView.Content = CalculateVariableImpactMatrix(selectedFolds.Select(x => x.run).ToArray(), selectedFolds.Select(x => x.Name).ToArray());
+        }
+      }
+    }
+
+
     private void UpdateData() {
-      matrixView.Content = CalculateVariableImpactMatrix();
-    }
-
-    private DoubleMatrix CalculateVariableImpactMatrix() {
+      if (Content != null) {
+        comboBox.Items.Clear();
+        comboBox.Enabled = false;
+        var visibleRuns = Content.Where(r => r.Visible).ToArray();
+        var representativeCvRun =
+          visibleRuns.Where(r => r.Parameters.ContainsKey(numberOfFoldsParameterName)).FirstOrDefault();
+        if (representativeCvRun != null) {
+          // make sure all runs have the same number of folds
+          int nFolds = ((IntValue)representativeCvRun.Parameters[numberOfFoldsParameterName]).Value;
+          var cvRuns = visibleRuns.Where(r => r.Parameters.ContainsKey(numberOfFoldsParameterName));
+          if (cvRuns.All(r => ((IntValue)r.Parameters[numberOfFoldsParameterName]).Value == nFolds)) {
+            // populate combobox
+            comboBox.Items.Add("Overall");
+            for (int foldIndex = 0; foldIndex < nFolds; foldIndex++) {
+              comboBox.Items.Add("Fold " + foldIndex);
+            }
+            comboBox.SelectedIndex = 0;
+            comboBox.Enabled = true;
+          } else {
+            matrixView.Content = null;
+          }
+        } else {
+          var runsWithVariables = visibleRuns.Where(r => r.Results.ContainsKey(variableImpactResultName)).ToArray();
+          matrixView.Content = CalculateVariableImpactMatrix(runsWithVariables);
+        }
+      }
+    }
+
+    private IStringConvertibleMatrix CalculateVariableImpactMatrix(IRun[] runs) {
+      return CalculateVariableImpactMatrix(runs, runs.Select(r => r.Name).ToArray());
+    }
+
+    private DoubleMatrix CalculateVariableImpactMatrix(IRun[] runs, string[] runNames) {
       DoubleMatrix matrix = null;
-      if (Content != null) {
-        List<IRun> runsWithVariables = Content.Where(r => r.Visible && r.Results.ContainsKey(variableImpactResultName)).ToList();
-        IEnumerable<DoubleMatrix> allVariableImpacts = (from run in runsWithVariables
-                                                        select run.Results[variableImpactResultName]).Cast<DoubleMatrix>();
-        IEnumerable<string> variableNames = (from variableImpact in allVariableImpacts
-                                             from variableName in variableImpact.RowNames
-                                             select variableName)
-                                            .Distinct();
-        // filter variableNames: only include names that have at least one non-zero value in a run
-        List<string> variableNamesList = (from variableName in variableNames
-                                          where GetVariableImpacts(variableName, allVariableImpacts).Any(x => !x.IsAlmost(0.0))
-                                          select variableName)
-                                         .ToList();
-
-        List<string> statictics = new List<string> { "Median Rank", "Mean", "StdDev", "pValue" };
-        List<string> columnNames = runsWithVariables.Select(r => r.Name).ToList();
-        columnNames.AddRange(statictics);
-        int runs = runsWithVariables.Count();
-
-        matrix = new DoubleMatrix(variableNamesList.Count, runs + statictics.Count);
-        matrix.SortableView = true;
-        matrix.RowNames = variableNamesList;
-        matrix.ColumnNames = columnNames;
-
-        for (int i = 0; i < runsWithVariables.Count; i++) {
-          IRun run = runsWithVariables[i];
-          DoubleMatrix runVariableImpacts = (DoubleMatrix)run.Results[variableImpactResultName];
-          for (int j = 0; j < runVariableImpacts.Rows; j++) {
-            int rowIndex = variableNamesList.FindIndex(s => s == runVariableImpacts.RowNames.ElementAt(j));
-            if (rowIndex > -1) {
-              matrix[rowIndex, i] = runVariableImpacts[j, 0];
-            }
-          }
-        }
-
-        List<List<double>> variableImpactsOverRuns = (from variableName in variableNamesList
-                                                      select GetVariableImpacts(variableName, allVariableImpacts).ToList())
-                                                     .ToList();
-        List<List<double>> variableRanks = (from variableName in variableNamesList
-                                            select GetVariableImpactRanks(variableName, allVariableImpacts).ToList())
-                                        .ToList();
-        if (variableImpactsOverRuns.Count() > 0) {
-          // the variable with the worst median impact value is chosen as the reference variable
-          // this is problematic if all variables are relevant, however works often in practice
-          List<double> referenceImpacts = (from impacts in variableImpactsOverRuns
-                                           let avg = impacts.Median()
-                                           orderby avg
-                                           select impacts)
-                                           .First();
-          // for all variables
-          for (int row = 0; row < variableImpactsOverRuns.Count; row++) {
-            // median rank
-            matrix[row, runs] = variableRanks[row].Median();
-            // also show mean and std.dev. of relative variable impacts to indicate the relative difference in impacts of variables
-            matrix[row, runs + 1] = variableImpactsOverRuns[row].Average();
-            matrix[row, runs + 2] = variableImpactsOverRuns[row].StandardDeviation();
-
-            double leftTail = 0; double rightTail = 0; double bothTails = 0;
-            // calc differences of impacts for current variable and reference variable
-            double[] z = new double[referenceImpacts.Count];
-            for (int i = 0; i < z.Length; i++) {
-              z[i] = variableImpactsOverRuns[row][i] - referenceImpacts[i];
-            }
-            // wilcoxon signed rank test is used because the impact values of two variables in a single run are not independent
-            alglib.wsr.wilcoxonsignedranktest(z, z.Length, 0, ref bothTails, ref leftTail, ref rightTail);
-            matrix[row, runs + 3] = bothTails;
-          }
-        }
-      }
-      return matrix;
+      IEnumerable<DoubleMatrix> allVariableImpacts = (from run in runs
+                                                      select run.Results[variableImpactResultName]).Cast<DoubleMatrix>();
+      IEnumerable<string> variableNames = (from variableImpact in allVariableImpacts
+                                           from variableName in variableImpact.RowNames
+                                           select variableName)
+                                          .Distinct();
+      // filter variableNames: only include names that have at least one non-zero value in a run
+      List<string> variableNamesList = (from variableName in variableNames
+                                        where GetVariableImpacts(variableName, allVariableImpacts).Any(x => !x.IsAlmost(0.0))
+                                        select variableName)
+                                       .ToList();
+
+      List<string> statictics = new List<string> { "Median Rank", "Mean", "StdDev", "pValue" };
+      List<string> columnNames = new List<string>(runNames);
+      columnNames.AddRange(statictics);
+      int numberOfRuns = runs.Length;
+
+      matrix = new DoubleMatrix(variableNamesList.Count, numberOfRuns + statictics.Count);
+      matrix.SortableView = true;
+      matrix.RowNames = variableNamesList;
+      matrix.ColumnNames = columnNames;
+
+      // calculate statistics
+      List<List<double>> variableImpactsOverRuns = (from variableName in variableNamesList
+                                                    select GetVariableImpacts(variableName, allVariableImpacts).ToList())
+                                             .ToList();
+      List<List<double>> variableRanks = (from variableName in variableNamesList
+                                          select GetVariableImpactRanks(variableName, allVariableImpacts).ToList())
+                                      .ToList();
+      if (variableImpactsOverRuns.Count() > 0) {
+        // the variable with the worst median impact value is chosen as the reference variable
+        // this is problematic if all variables are relevant, however works often in practice
+        List<double> referenceImpacts = (from impacts in variableImpactsOverRuns
+                                         let avg = impacts.Median()
+                                         orderby avg
+                                         select impacts)
+                                         .First();
+        // for all variables
+        for (int row = 0; row < variableImpactsOverRuns.Count; row++) {
+          // median rank
+          matrix[row, numberOfRuns] = variableRanks[row].Median();
+          // also show mean and std.dev. of relative variable impacts to indicate the relative difference in impacts of variables
+          matrix[row, numberOfRuns + 1] = Math.Round(variableImpactsOverRuns[row].Average(), 3);
+          matrix[row, numberOfRuns + 2] = Math.Round(variableImpactsOverRuns[row].StandardDeviation(), 3);
+
+          double leftTail = 0; double rightTail = 0; double bothTails = 0;
+          // calc differences of impacts for current variable and reference variable
+          double[] z = new double[referenceImpacts.Count];
+          for (int i = 0; i < z.Length; i++) {
+            z[i] = variableImpactsOverRuns[row][i] - referenceImpacts[i];
+          }
+          // wilcoxon signed rank test is used because the impact values of two variables in a single run are not independent
+          alglib.wsr.wilcoxonsignedranktest(z, z.Length, 0, ref bothTails, ref leftTail, ref rightTail);
+          matrix[row, numberOfRuns + 3] = Math.Round(bothTails, 4);
+        }
+      }
+
+      // fill matrix with impacts from runs
+      for (int i = 0; i < runs.Length; i++) {
+        IRun run = runs[i];
+        DoubleMatrix runVariableImpacts = (DoubleMatrix)run.Results[variableImpactResultName];
+        for (int j = 0; j < runVariableImpacts.Rows; j++) {
+          int rowIndex = variableNamesList.FindIndex(s => s == runVariableImpacts.RowNames.ElementAt(j));
+          if (rowIndex > -1) {
+            matrix[rowIndex, i] = Math.Round(runVariableImpacts[j, 0], 3);
+          }
+        }
+      }
+      // sort by median
+      var sortedMatrix = (DoubleMatrix)matrix.Clone();
+      var sortedIndexes = from i in Enumerable.Range(0, sortedMatrix.Rows)
+                          orderby matrix[i, numberOfRuns]
+                          select i;
+
+      int targetIndex = 0;
+      foreach (var sourceIndex in sortedIndexes) {
+        for (int c = 0; c < matrix.Columns; c++)
+          sortedMatrix[targetIndex, c] = matrix[sourceIndex, c];
+        targetIndex++;
+      }
+      return sortedMatrix;
     }
 
@@ -213,4 +278,5 @@
       }
     }
+
   }
 }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicDataAnalysisSolutionResponseFunctionView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicDataAnalysisSolutionResponseFunctionView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/SymbolicDataAnalysisSolutionResponseFunctionView.cs	(revision 6784)
@@ -27,8 +27,6 @@
 using HeuristicLab.Common;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
-using System.Windows.Forms.DataVisualization.Charting;
-using HeuristicLab.MainForm;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views {
@@ -88,10 +86,10 @@
         select varNode.VariableName)
          .Distinct()
-         .OrderBy(x=>x)
+         .OrderBy(x => x)
          .ToList();
 
         medianValues.Clear();
         foreach (var variableName in referencedVariables) {
-          medianValues.Add(variableName, Content.ProblemData.Dataset.GetEnumeratedVariableValues(variableName).Median());
+          medianValues.Add(variableName, Content.ProblemData.Dataset.GetDoubleValues(variableName).Median());
         }
 
@@ -107,5 +105,5 @@
       foreach (var variableName in variableNames) {
         var variableTrackbar = new VariableTrackbar(variableName,
-                                                    Content.ProblemData.Dataset.GetEnumeratedVariableValues(variableName));
+                                                    Content.ProblemData.Dataset.GetDoubleValues(variableName));
         variableTrackbar.Size = new Size(variableTrackbar.Size.Width, flowLayoutPanel.Size.Height - 23);
         variableTrackbar.ValueChanged += TrackBarValueChanged;
@@ -132,5 +130,5 @@
         .Except(new string[] { freeVariable });
 
-      var freeVariableValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(freeVariable, Content.ProblemData.TrainingIndizes).ToArray();
+      var freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TrainingIndizes).ToArray();
       var responseValues = Content.Model.Interpreter.GetSymbolicExpressionTreeValues(clonedTree,
                                                                               Content.ProblemData.Dataset,
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs	(revision 6784)
@@ -70,10 +70,8 @@
 
     protected override Allele[] CalculateAlleles(ISymbolicExpressionTree solution) {
-      List<Allele> alleles = new List<Allele>();
-
-      foreach (var subtree in GetAllSubtreesOfDepth(solution, AlleleTreeDepth)) {
-        alleles.Add(GetAlleleFromSubtreeOfDepth(subtree, AlleleTreeDepth));
-      }
-      return alleles.ToArray();
+      return GetAllSubtreesOfDepth(solution, AlleleTreeDepth)
+        .AsParallel()
+        .Select(t => GetAlleleFromSubtreeOfDepth(t, AlleleTreeDepth))
+        .ToArray();
     }
 
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisMultiObjectiveValidationBestSolutionAnalyzer.cs	(revision 6784)
@@ -93,11 +93,15 @@
       IList<int> nonDominatedIndexes = new List<int>();
       ISymbolicExpressionTree[] tree = SymbolicExpressionTree.ToArray();
-      List<double[]> qualities = new List<double[]>();
       bool[] maximization = Maximization.ToArray();
       List<double[]> newNonDominatedQualities = new List<double[]>();
       var evaluator = EvaluatorParameter.ActualValue;
+      var problemData = ProblemDataParameter.ActualValue;
       IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
+
+      var qualities = tree
+        .AsParallel()
+        .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
+        .ToArray();
       for (int i = 0; i < tree.Length; i++) {
-        qualities.Add(evaluator.Evaluate(childContext, tree[i], ProblemDataParameter.ActualValue, rows)); // qualities[i] = ...
         if (IsNonDominated(qualities[i], trainingBestQualities, maximization) &&
           IsNonDominated(qualities[i], qualities, maximization)) {
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer.cs	(revision 6784)
@@ -76,12 +76,16 @@
       ISymbolicExpressionTree bestTree = null;
       ISymbolicExpressionTree[] tree = SymbolicExpressionTree.ToArray();
-      double[] quality = new double[tree.Length];
       var evaluator = EvaluatorParameter.ActualValue;
+      var problemData = ProblemDataParameter.ActualValue;
       IEnumerable<int> rows = GenerateRowsToEvaluate();
       if (!rows.Any()) return base.Apply();
 
       IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(evaluator);
+      var quality = tree
+        .AsParallel()
+        .Select(t => evaluator.Evaluate(childContext, t, problemData, rows))
+        .ToArray();
+
       for (int i = 0; i < tree.Length; i++) {
-        quality[i] = evaluator.Evaluate(childContext, tree[i], ProblemDataParameter.ActualValue, rows);
         if (IsBetter(quality[i], bestQuality, Maximization.Value)) {
           bestQuality = quality[i];
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisVariableFrequencyAnalyzer.cs	(revision 6784)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -104,5 +105,5 @@
           datatable.Rows.Add(row);
         }
-        datatable.Rows[pair.Key].Values.Add(pair.Value);
+        datatable.Rows[pair.Key].Values.Add(Math.Round(pair.Value, 3));
       }
 
@@ -130,18 +131,12 @@
 
     public static IEnumerable<KeyValuePair<string, double>> CalculateVariableFrequencies(IEnumerable<ISymbolicExpressionTree> trees, bool aggregateLaggedVariables = true) {
-      Dictionary<string, double> variableFrequencies = new Dictionary<string, double>();
-      int totalNumberOfSymbols = 0;
-
-      foreach (var tree in trees) {
-        var variableReferences = GetVariableReferences(tree, aggregateLaggedVariables);
-        foreach (var pair in variableReferences) {
-          totalNumberOfSymbols += pair.Value;
-          if (variableFrequencies.ContainsKey(pair.Key)) {
-            variableFrequencies[pair.Key] += pair.Value;
-          } else {
-            variableFrequencies.Add(pair.Key, pair.Value);
-          }
-        }
-      }
+
+      var variableFrequencies = trees
+        .AsParallel()
+        .SelectMany(t => GetVariableReferences(t, aggregateLaggedVariables))
+        .GroupBy(pair => pair.Key, pair => pair.Value)
+        .ToDictionary(g => g.Key, g => (double)g.Sum());
+
+      double totalNumberOfSymbols = variableFrequencies.Values.Sum();
 
       foreach (var pair in variableFrequencies)
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 6784)
@@ -121,4 +121,5 @@
     <Compile Include="Analyzers\SymbolicDataAnalysisVariableFrequencyAnalyzer.cs" />
     <Compile Include="Analyzers\SymbolicDataAnalysisAlleleFrequencyAnalyzer.cs" />
+    <Compile Include="SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs" />
     <Compile Include="Formatters\SymbolicDataAnalysisExpressionLatexFormatter.cs" />
     <Compile Include="Formatters\SymbolicDataAnalysisExpressionMATLABFormatter.cs" />
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 6784)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 6784)
@@ -0,0 +1,535 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.ObjectModel;
+using System.Linq;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Reflection.Emit;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableClass]
+  [Item("SymbolicDataAnalysisExpressionTreeILEmittingInterpreter", "Interpreter for symbolic expression trees.")]
+  public sealed class SymbolicDataAnalysisExpressionTreeILEmittingInterpreter : ParameterizedNamedItem, ISymbolicDataAnalysisExpressionTreeInterpreter {
+    private static MethodInfo listGetValue = typeof(IList<double>).GetProperty("Item", new Type[] { typeof(int) }).GetGetMethod();
+    private static MethodInfo cos = typeof(Math).GetMethod("Cos", new Type[] { typeof(double) });
+    private static MethodInfo sin = typeof(Math).GetMethod("Sin", new Type[] { typeof(double) });
+    private static MethodInfo tan = typeof(Math).GetMethod("Tan", new Type[] { typeof(double) });
+    private static MethodInfo exp = typeof(Math).GetMethod("Exp", new Type[] { typeof(double) });
+    private static MethodInfo log = typeof(Math).GetMethod("Log", new Type[] { typeof(double) });
+    private static MethodInfo power = typeof(Math).GetMethod("Pow", new Type[] { typeof(double), typeof(double) });
+    private static MethodInfo round = typeof(Math).GetMethod("Round", new Type[] { typeof(double) });
+
+    internal delegate double CompiledFunction(int sampleIndex, IList<double>[] columns);
+    private const string CheckExpressionsWithIntervalArithmeticParameterName = "CheckExpressionsWithIntervalArithmetic";
+    #region private classes
+    private class InterpreterState {
+      private double[] argumentStack;
+      private int argumentStackPointer;
+      private Instruction[] code;
+      private int pc;
+      public int ProgramCounter {
+        get { return pc; }
+        set { pc = value; }
+      }
+      internal InterpreterState(Instruction[] code, int argumentStackSize) {
+        this.code = code;
+        this.pc = 0;
+        if (argumentStackSize > 0) {
+          this.argumentStack = new double[argumentStackSize];
+        }
+        this.argumentStackPointer = 0;
+      }
+
+      internal void Reset() {
+        this.pc = 0;
+        this.argumentStackPointer = 0;
+      }
+
+      internal Instruction NextInstruction() {
+        return code[pc++];
+      }
+      private void Push(double val) {
+        argumentStack[argumentStackPointer++] = val;
+      }
+      private double Pop() {
+        return argumentStack[--argumentStackPointer];
+      }
+
+      internal void CreateStackFrame(double[] argValues) {
+        // push in reverse order to make indexing easier
+        for (int i = argValues.Length - 1; i >= 0; i--) {
+          argumentStack[argumentStackPointer++] = argValues[i];
+        }
+        Push(argValues.Length);
+      }
+
+      internal void RemoveStackFrame() {
+        int size = (int)Pop();
+        argumentStackPointer -= size;
+      }
+
+      internal double GetStackFrameValue(ushort index) {
+        // layout of stack:
+        // [0]   <- argumentStackPointer
+        // [StackFrameSize = N + 1]
+        // [Arg0] <- argumentStackPointer - 2 - 0
+        // [Arg1] <- argumentStackPointer - 2 - 1
+        // [...]
+        // [ArgN] <- argumentStackPointer - 2 - N
+        // <Begin of stack frame>
+        return argumentStack[argumentStackPointer - index - 2];
+      }
+    }
+    private class OpCodes {
+      public const byte Add = 1;
+      public const byte Sub = 2;
+      public const byte Mul = 3;
+      public const byte Div = 4;
+
+      public const byte Sin = 5;
+      public const byte Cos = 6;
+      public const byte Tan = 7;
+
+      public const byte Log = 8;
+      public const byte Exp = 9;
+
+      public const byte IfThenElse = 10;
+
+      public const byte GT = 11;
+      public const byte LT = 12;
+
+      public const byte AND = 13;
+      public const byte OR = 14;
+      public const byte NOT = 15;
+
+
+      public const byte Average = 16;
+
+      public const byte Call = 17;
+
+      public const byte Variable = 18;
+      public const byte LagVariable = 19;
+      public const byte Constant = 20;
+      public const byte Arg = 21;
+
+      public const byte Power = 22;
+      public const byte Root = 23;
+      public const byte TimeLag = 24;
+      public const byte Integral = 25;
+      public const byte Derivative = 26;
+
+      public const byte VariableCondition = 27;
+    }
+    #endregion
+
+    private Dictionary<Type, byte> symbolToOpcode = new Dictionary<Type, byte>() {
+      { typeof(Addition), OpCodes.Add },
+      { typeof(Subtraction), OpCodes.Sub },
+      { typeof(Multiplication), OpCodes.Mul },
+      { typeof(Division), OpCodes.Div },
+      { typeof(Sine), OpCodes.Sin },
+      { typeof(Cosine), OpCodes.Cos },
+      { typeof(Tangent), OpCodes.Tan },
+      { typeof(Logarithm), OpCodes.Log },
+      { typeof(Exponential), OpCodes.Exp },
+      { typeof(IfThenElse), OpCodes.IfThenElse },
+      { typeof(GreaterThan), OpCodes.GT },
+      { typeof(LessThan), OpCodes.LT },
+      { typeof(And), OpCodes.AND },
+      { typeof(Or), OpCodes.OR },
+      { typeof(Not), OpCodes.NOT},
+      { typeof(Average), OpCodes.Average},
+      { typeof(InvokeFunction), OpCodes.Call },
+      { typeof(HeuristicLab.Problems.DataAnalysis.Symbolic.Variable), OpCodes.Variable },
+      { typeof(LaggedVariable), OpCodes.LagVariable },
+      { typeof(Constant), OpCodes.Constant },
+      { typeof(Argument), OpCodes.Arg },
+      { typeof(Power),OpCodes.Power},
+      { typeof(Root),OpCodes.Root},
+      { typeof(TimeLag), OpCodes.TimeLag}, 
+      { typeof(Integral), OpCodes.Integral},
+      { typeof(Derivative), OpCodes.Derivative},
+      { typeof(VariableCondition),OpCodes.VariableCondition}
+    };
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    #region parameter properties
+    public IValueParameter<BoolValue> CheckExpressionsWithIntervalArithmeticParameter {
+      get { return (IValueParameter<BoolValue>)Parameters[CheckExpressionsWithIntervalArithmeticParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public BoolValue CheckExpressionsWithIntervalArithmetic {
+      get { return CheckExpressionsWithIntervalArithmeticParameter.Value; }
+      set { CheckExpressionsWithIntervalArithmeticParameter.Value = value; }
+    }
+    #endregion
+
+
+    [StorableConstructor]
+    private SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(bool deserializing) : base(deserializing) { }
+    private SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(SymbolicDataAnalysisExpressionTreeILEmittingInterpreter original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(this, cloner);
+    }
+
+    public SymbolicDataAnalysisExpressionTreeILEmittingInterpreter()
+      : base("SymbolicDataAnalysisExpressionTreeILEmittingInterpreter", "Interpreter for symbolic expression trees.") {
+      Parameters.Add(new ValueParameter<BoolValue>(CheckExpressionsWithIntervalArithmeticParameterName, "Switch that determines if the interpreter checks the validity of expressions with interval arithmetic before evaluating the expression.", new BoolValue(false)));
+    }
+
+    public IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) {
+      if (CheckExpressionsWithIntervalArithmetic.Value)
+        throw new NotSupportedException("Interval arithmetic is not yet supported in the symbolic data analysis interpreter.");
+      var compiler = new SymbolicExpressionTreeCompiler();
+      Instruction[] code = compiler.Compile(tree, MapSymbolToOpCode);
+      int necessaryArgStackSize = 0;
+
+      Dictionary<string, int> doubleVariableNames = dataset.DoubleVariables.Select((x, i) => new { x, i }).ToDictionary(e => e.x, e => e.i);
+      IList<double>[] columns = (from v in doubleVariableNames.Keys
+                                 select dataset.GetReadOnlyDoubleValues(v))
+                                .ToArray();
+
+      for (int i = 0; i < code.Length; i++) {
+        Instruction instr = code[i];
+        if (instr.opCode == OpCodes.Variable) {
+          var variableTreeNode = instr.dynamicNode as VariableTreeNode;
+          instr.iArg0 = doubleVariableNames[variableTreeNode.VariableName];
+          code[i] = instr;
+        } else if (instr.opCode == OpCodes.LagVariable) {
+          var variableTreeNode = instr.dynamicNode as LaggedVariableTreeNode;
+          instr.iArg0 = doubleVariableNames[variableTreeNode.VariableName];
+          code[i] = instr;
+        } else if (instr.opCode == OpCodes.VariableCondition) {
+          var variableConditionTreeNode = instr.dynamicNode as VariableConditionTreeNode;
+          instr.iArg0 = doubleVariableNames[variableConditionTreeNode.VariableName];
+        } else if (instr.opCode == OpCodes.Call) {
+          necessaryArgStackSize += instr.nArguments + 1;
+        }
+      }
+      var state = new InterpreterState(code, necessaryArgStackSize);
+
+      Type[] methodArgs = { typeof(int), typeof(IList<double>[]) };
+      DynamicMethod testFun = new DynamicMethod("TestFun", typeof(double), methodArgs, typeof(SymbolicDataAnalysisExpressionTreeILEmittingInterpreter).Module);
+
+      ILGenerator il = testFun.GetILGenerator();
+      CompileInstructions(il, state);
+      il.Emit(System.Reflection.Emit.OpCodes.Conv_R8);
+      il.Emit(System.Reflection.Emit.OpCodes.Ret);
+      var function = (CompiledFunction)testFun.CreateDelegate(typeof(CompiledFunction));
+
+      foreach (var row in rows) {
+        yield return function(row, columns);
+      }
+    }
+
+    private void CompileInstructions(ILGenerator il, InterpreterState state) {
+      Instruction currentInstr = state.NextInstruction();
+      int nArgs = currentInstr.nArguments;
+
+      switch (currentInstr.opCode) {
+        case OpCodes.Add: {
+            if (nArgs > 0) {
+              CompileInstructions(il, state);
+            }
+            for (int i = 1; i < nArgs; i++) {
+              CompileInstructions(il, state);
+              il.Emit(System.Reflection.Emit.OpCodes.Add);
+            }
+            return;
+          }
+        case OpCodes.Sub: {
+            if (nArgs == 1) {
+              CompileInstructions(il, state);
+              il.Emit(System.Reflection.Emit.OpCodes.Neg);
+              return;
+            }
+            if (nArgs > 0) {
+              CompileInstructions(il, state);
+            }
+            for (int i = 1; i < nArgs; i++) {
+              CompileInstructions(il, state);
+              il.Emit(System.Reflection.Emit.OpCodes.Sub);
+            }
+            return;
+          }
+        case OpCodes.Mul: {
+            if (nArgs > 0) {
+              CompileInstructions(il, state);
+            }
+            for (int i = 1; i < nArgs; i++) {
+              CompileInstructions(il, state);
+              il.Emit(System.Reflection.Emit.OpCodes.Mul);
+            }
+            return;
+          }
+        case OpCodes.Div: {
+            if (nArgs == 1) {
+              il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0);
+              CompileInstructions(il, state);
+              il.Emit(System.Reflection.Emit.OpCodes.Div);
+              return;
+            }
+            if (nArgs > 0) {
+              CompileInstructions(il, state);
+            }
+            for (int i = 1; i < nArgs; i++) {
+              CompileInstructions(il, state);
+              il.Emit(System.Reflection.Emit.OpCodes.Div);
+            }
+            return;
+          }
+        case OpCodes.Average: {
+            CompileInstructions(il, state);
+            for (int i = 1; i < nArgs; i++) {
+              CompileInstructions(il, state);
+              il.Emit(System.Reflection.Emit.OpCodes.Add);
+            }
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, nArgs);
+            il.Emit(System.Reflection.Emit.OpCodes.Div);
+            return;
+          }
+        case OpCodes.Cos: {
+            CompileInstructions(il, state);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, cos);
+            return;
+          }
+        case OpCodes.Sin: {
+            CompileInstructions(il, state);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, sin);
+            return;
+          }
+        case OpCodes.Tan: {
+            CompileInstructions(il, state);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, tan);
+            return;
+          }
+        case OpCodes.Power: {
+            CompileInstructions(il, state);
+            CompileInstructions(il, state);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, round);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, power);
+            return;
+          }
+        case OpCodes.Root: {
+            CompileInstructions(il, state);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // 1 / round(...)
+            CompileInstructions(il, state);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, round);
+            il.Emit(System.Reflection.Emit.OpCodes.Div);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, power);
+            return;
+          }
+        case OpCodes.Exp: {
+            CompileInstructions(il, state);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, exp);
+            return;
+          }
+        case OpCodes.Log: {
+            CompileInstructions(il, state);
+            il.Emit(System.Reflection.Emit.OpCodes.Call, log);
+            return;
+          }
+        case OpCodes.IfThenElse: {
+            Label end = il.DefineLabel();
+            Label c1 = il.DefineLabel();
+            CompileInstructions(il, state);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0); // > 0
+            il.Emit(System.Reflection.Emit.OpCodes.Cgt);
+            il.Emit(System.Reflection.Emit.OpCodes.Brfalse, c1);
+            CompileInstructions(il, state);
+            il.Emit(System.Reflection.Emit.OpCodes.Br, end);
+            il.MarkLabel(c1);
+            CompileInstructions(il, state);
+            il.MarkLabel(end);
+            return;
+          }
+        case OpCodes.AND: {
+            Label falseBranch = il.DefineLabel();
+            Label end = il.DefineLabel();
+            CompileInstructions(il, state);
+            for (int i = 1; i < nArgs; i++) {
+              il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0); // > 0
+              il.Emit(System.Reflection.Emit.OpCodes.Cgt);
+              il.Emit(System.Reflection.Emit.OpCodes.Brfalse, falseBranch);
+              CompileInstructions(il, state);
+            }
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0); // > 0
+            il.Emit(System.Reflection.Emit.OpCodes.Cgt);
+            il.Emit(System.Reflection.Emit.OpCodes.Brfalse, falseBranch);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // 1
+            il.Emit(System.Reflection.Emit.OpCodes.Br, end);
+            il.MarkLabel(falseBranch);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // -1
+            il.Emit(System.Reflection.Emit.OpCodes.Neg);
+            il.MarkLabel(end);
+            return;
+          }
+        case OpCodes.OR: {
+            Label trueBranch = il.DefineLabel();
+            Label end = il.DefineLabel();
+            Label resultBranch = il.DefineLabel();
+            CompileInstructions(il, state);
+            for (int i = 1; i < nArgs; i++) {
+              Label nextArgBranch = il.DefineLabel();
+              // complex definition because of special properties of NaN  
+              il.Emit(System.Reflection.Emit.OpCodes.Dup);
+              il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0); // <= 0        
+              il.Emit(System.Reflection.Emit.OpCodes.Ble, nextArgBranch);
+              il.Emit(System.Reflection.Emit.OpCodes.Br, resultBranch);
+              il.MarkLabel(nextArgBranch);
+              il.Emit(System.Reflection.Emit.OpCodes.Pop);
+              CompileInstructions(il, state);
+            }
+            il.MarkLabel(resultBranch);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0); // > 0
+            il.Emit(System.Reflection.Emit.OpCodes.Cgt);
+            il.Emit(System.Reflection.Emit.OpCodes.Brtrue, trueBranch);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // -1
+            il.Emit(System.Reflection.Emit.OpCodes.Neg);
+            il.Emit(System.Reflection.Emit.OpCodes.Br, end);
+            il.MarkLabel(trueBranch);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, 1.0); // 1
+            il.MarkLabel(end);
+            return;
+          }
+        case OpCodes.NOT: {
+            CompileInstructions(il, state);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4_0); // > 0
+            il.Emit(System.Reflection.Emit.OpCodes.Cgt);
+            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);
+            il.Emit(System.Reflection.Emit.OpCodes.Neg); // * -1
+            return;
+          }
+        case OpCodes.GT: {
+            CompileInstructions(il, state);
+            CompileInstructions(il, state);
+            il.Emit(System.Reflection.Emit.OpCodes.Cgt); // 1 (>) / 0 (otherwise)
+            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;
+          }
+        case OpCodes.LT: {
+            CompileInstructions(il, state);
+            CompileInstructions(il, state);
+            il.Emit(System.Reflection.Emit.OpCodes.Clt);
+            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;
+          }
+        case OpCodes.TimeLag: {
+            throw new NotImplementedException();
+          }
+        case OpCodes.Integral: {
+            throw new NotImplementedException();
+          }
+
+        //mkommend: derivate calculation taken from: 
+        //http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/smooth-low-noise-differentiators/
+        //one sided smooth differentiatior, N = 4
+        // y' = 1/8h (f_i + 2f_i-1, -2 f_i-3 - f_i-4)
+        case OpCodes.Derivative: {
+            throw new NotImplementedException();
+          }
+        case OpCodes.Call: {
+            throw new NotSupportedException("Automatically defined functions are not supported by the SymbolicDataAnalysisTreeILEmittingInterpreter. Either turn of ADFs or change the interpeter.");
+          }
+        case OpCodes.Arg: {
+            throw new NotSupportedException("Automatically defined functions are not supported by the SymbolicDataAnalysisTreeILEmittingInterpreter. Either turn of ADFs or change the interpeter.");
+          }
+        case OpCodes.Variable: {
+            VariableTreeNode varNode = (VariableTreeNode)currentInstr.dynamicNode;
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.iArg0); // load correct column of the current variable
+            il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // sampleIndex
+            il.Emit(System.Reflection.Emit.OpCodes.Call, listGetValue);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.Weight); // load weight
+            il.Emit(System.Reflection.Emit.OpCodes.Mul);
+            return;
+          }
+        case OpCodes.LagVariable: {
+            LaggedVariableTreeNode varNode = (LaggedVariableTreeNode)currentInstr.dynamicNode;
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_1); // load columns array
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, (int)currentInstr.iArg0); // load correct column of the current variable
+            il.Emit(System.Reflection.Emit.OpCodes.Ldelem_Ref);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_I4, varNode.Lag); // lag
+            il.Emit(System.Reflection.Emit.OpCodes.Ldarg_0); // sampleIndex
+            il.Emit(System.Reflection.Emit.OpCodes.Add); // row = sampleIndex + sampleOffset
+            il.Emit(System.Reflection.Emit.OpCodes.Call, listGetValue);
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, varNode.Weight); // load weight
+            il.Emit(System.Reflection.Emit.OpCodes.Mul);
+            return;
+          }
+        case OpCodes.Constant: {
+            ConstantTreeNode constNode = (ConstantTreeNode)currentInstr.dynamicNode;
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, constNode.Value);
+            return;
+          }
+
+        //mkommend: this symbol uses the logistic function f(x) = 1 / (1 + e^(-alpha * x) ) 
+        //to determine the relative amounts of the true and false branch see http://en.wikipedia.org/wiki/Logistic_function
+        case OpCodes.VariableCondition: {
+            throw new NotImplementedException();
+          }
+        default: throw new NotSupportedException();
+      }
+    }
+
+    private byte MapSymbolToOpCode(ISymbolicExpressionTreeNode treeNode) {
+      if (symbolToOpcode.ContainsKey(treeNode.Symbol.GetType()))
+        return symbolToOpcode[treeNode.Symbol.GetType()];
+      else
+        throw new NotSupportedException("Symbol: " + treeNode.Symbol);
+    }
+
+    // skips a whole branch
+    private void SkipInstructions(InterpreterState state) {
+      int i = 1;
+      while (i > 0) {
+        i += state.NextInstruction().nArguments;
+        i--;
+      }
+    }
+  }
+}
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 6784)
@@ -208,13 +208,13 @@
         if (instr.opCode == OpCodes.Variable) {
           var variableTreeNode = instr.dynamicNode as VariableTreeNode;
-          instr.iArg0 = (ushort)dataset.GetVariableIndex(variableTreeNode.VariableName);
+          instr.iArg0 = dataset.GetReadOnlyDoubleValues(variableTreeNode.VariableName);
           code[i] = instr;
         } else if (instr.opCode == OpCodes.LagVariable) {
-          var variableTreeNode = instr.dynamicNode as LaggedVariableTreeNode;
-          instr.iArg0 = (ushort)dataset.GetVariableIndex(variableTreeNode.VariableName);
+          var laggedVariableTreeNode = instr.dynamicNode as LaggedVariableTreeNode;
+          instr.iArg0 = dataset.GetReadOnlyDoubleValues(laggedVariableTreeNode.VariableName);
           code[i] = instr;
         } else if (instr.opCode == OpCodes.VariableCondition) {
           var variableConditionTreeNode = instr.dynamicNode as VariableConditionTreeNode;
-          instr.iArg0 = (ushort)dataset.GetVariableIndex(variableConditionTreeNode.VariableName);
+          instr.iArg0 = dataset.GetReadOnlyDoubleValues(variableConditionTreeNode.VariableName);
         } else if (instr.opCode == OpCodes.Call) {
           necessaryArgStackSize += instr.nArguments + 1;
@@ -308,17 +308,17 @@
             double result = Evaluate(dataset, ref row, state);
             for (int i = 1; i < currentInstr.nArguments; i++) {
-              if (result <= 0.0) SkipInstructions(state);
+              if (result > 0.0) result = Evaluate(dataset, ref row, state);
               else {
-                result = Evaluate(dataset, ref row, state);
+                SkipInstructions(state);
               }
             }
-            return result <= 0.0 ? -1.0 : 1.0;
+            return result > 0.0 ? 1.0 : -1.0;
           }
         case OpCodes.OR: {
             double result = Evaluate(dataset, ref row, state);
             for (int i = 1; i < currentInstr.nArguments; i++) {
-              if (result > 0.0) SkipInstructions(state);
+              if (result <= 0.0) result = Evaluate(dataset, ref row, state);
               else {
-                result = Evaluate(dataset, ref row, state);
+                SkipInstructions(state);
               }
             }
@@ -390,5 +390,5 @@
             int savedPc = state.ProgramCounter;
             // set pc to start of function  
-            state.ProgramCounter = currentInstr.iArg0;
+            state.ProgramCounter = (ushort)currentInstr.iArg0;
             // evaluate the function
             double v = Evaluate(dataset, ref row, state);
@@ -402,18 +402,18 @@
           }
         case OpCodes.Arg: {
-            return state.GetStackFrameValue(currentInstr.iArg0);
+            return state.GetStackFrameValue((ushort)currentInstr.iArg0);
           }
         case OpCodes.Variable: {
             if (row < 0 || row >= dataset.Rows)
               return double.NaN;
-            var variableTreeNode = currentInstr.dynamicNode as VariableTreeNode;
-            return dataset[row, currentInstr.iArg0] * variableTreeNode.Weight;
+            var variableTreeNode = (VariableTreeNode)currentInstr.dynamicNode;
+            return ((IList<double>)currentInstr.iArg0)[row] * variableTreeNode.Weight;
           }
         case OpCodes.LagVariable: {
-            var laggedVariableTreeNode = currentInstr.dynamicNode as LaggedVariableTreeNode;
+            var laggedVariableTreeNode = (LaggedVariableTreeNode)currentInstr.dynamicNode;
             int actualRow = row + laggedVariableTreeNode.Lag;
             if (actualRow < 0 || actualRow >= dataset.Rows)
               return double.NaN;
-            return dataset[actualRow, currentInstr.iArg0] * laggedVariableTreeNode.Weight;
+            return ((IList<double>)currentInstr.iArg0)[actualRow] * laggedVariableTreeNode.Weight;
           }
         case OpCodes.Constant: {
@@ -428,5 +428,5 @@
               return double.NaN;
             var variableConditionTreeNode = (VariableConditionTreeNode)currentInstr.dynamicNode;
-            double variableValue = dataset[row, currentInstr.iArg0];
+            double variableValue = ((IList<double>)currentInstr.iArg0)[row];
             double x = variableValue - variableConditionTreeNode.Threshold;
             double p = 1 / (1 + Math.Exp(-variableConditionTreeNode.Slope * x));
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplifier.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplifier.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplifier.cs	(revision 6784)
@@ -538,12 +538,4 @@
       } else if (IsExp(node)) {
         return node.GetSubtree(0);
-      } else if (IsMultiplication(node)) {
-        return node.Subtrees.Select(s => MakeLog(s)).Aggregate((x, y) => MakeSum(x, y));
-      } else if (IsDivision(node)) {
-        var subtractionNode = subSymbol.CreateTreeNode();
-        foreach (var subtree in node.Subtrees) {
-          subtractionNode.AddSubtree(MakeLog(subtree));
-        }
-        return subtractionNode;
       } else {
         var logNode = logSymbol.CreateTreeNode();
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tests/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tests/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tests/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs	(revision 6784)
@@ -30,8 +30,4 @@
 
 
-  /// <summary>
-  ///This is a test class for SimpleArithmeticExpressionInterpreter and is intended
-  ///to contain all SimpleArithmeticExpressionInterpreter Unit Tests
-  ///</summary>
   [TestClass()]
   public class SymbolicDataAnalysisExpressionTreeInterpreterTest {
@@ -55,5 +51,22 @@
 
     [TestMethod]
-    public void FullGrammarSimpleArithmeticExpressionInterpreterPerformanceTest() {
+    public void SymbolicDataAnalysisExpressionTreeInterpreterFullGrammarPerformanceTest() {
+      FullGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeInterpreter(), 12.5e6);
+    }
+    [TestMethod]
+    public void SymbolicDataAnalysisExpressionTreeInterpreterArithmeticGrammarPerformanceTest() {
+      FullGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeInterpreter(), 12.5e6);
+    }
+
+    [TestMethod]
+    public void SymbolicDataAnalysisExpressionTreeILEmittingInterpreterFullGrammarPerformanceTest() {
+      FullGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(), 10e6);
+    }
+    [TestMethod]
+    public void SymbolicDataAnalysisExpressionTreeILEmittingInterpreterArithmeticGrammarPerformanceTest() {
+      FullGrammarPerformanceTest(new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter(), 10e6);
+    }
+
+    private void FullGrammarPerformanceTest(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, double nodesPerSecThreshold) {
       var twister = new MersenneTwister(31415);
       var dataset = Util.CreateRandomDataset(twister, Rows, Columns);
@@ -64,15 +77,12 @@
       grammar.MinimumFunctionDefinitions = 0;
       var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 100, 0, 0);
-      double[] estimation = new double[Rows];
       foreach (ISymbolicExpressionTree tree in randomTrees) {
         Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
       }
-      SymbolicDataAnalysisExpressionTreeInterpreter interpreter = new SymbolicDataAnalysisExpressionTreeInterpreter();
       double nodesPerSec = Util.CalculateEvaluatedNodesPerSec(randomTrees, interpreter, dataset, 3);
-      Assert.IsTrue(nodesPerSec > 12.5e6); // evaluated nodes per seconds must be larger than 15mNodes/sec
-    }
-
-    [TestMethod]
-    public void ArithmeticGrammarSimpleArithmeticExpressionInterpreterPerformanceTest() {
+      Assert.IsTrue(nodesPerSec > nodesPerSecThreshold); // evaluated nodes per seconds must be larger than 15mNodes/sec
+    }
+
+    private void ArithmeticGrammarPerformanceTest(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, double nodesPerSecThreshold) {
       var twister = new MersenneTwister(31415);
       var dataset = Util.CreateRandomDataset(twister, Rows, Columns);
@@ -83,11 +93,10 @@
       grammar.MinimumFunctionDefinitions = 0;
       var randomTrees = Util.CreateRandomTrees(twister, dataset, grammar, N, 1, 100, 0, 0);
-      double[] estimation = new double[Rows];
       foreach (SymbolicExpressionTree tree in randomTrees) {
         Util.InitTree(tree, twister, new List<string>(dataset.VariableNames));
       }
-      SymbolicDataAnalysisExpressionTreeInterpreter interpreter = new SymbolicDataAnalysisExpressionTreeInterpreter();
+
       double nodesPerSec = Util.CalculateEvaluatedNodesPerSec(randomTrees, interpreter, dataset, 3);
-      Assert.IsTrue(nodesPerSec > 12.5e6); // evaluated nodes per seconds must be larger than 15mNodes/sec
+      Assert.IsTrue(nodesPerSec > nodesPerSecThreshold); // evaluated nodes per seconds must be larger than 15mNodes/sec
     }
 
@@ -97,6 +106,5 @@
     ///</summary>
     [TestMethod]
-    public void SimpleArithmeticExpressionInterpreterEvaluateTest() {
-
+    public void SymbolicDataAnalysisExpressionTreeInterpreterEvaluateTest() {
       Dataset ds = new Dataset(new string[] { "Y", "A", "B" }, new double[,] {
         { 1.0, 1.0, 1.0 },
@@ -105,6 +113,24 @@
       });
 
-      SymbolicDataAnalysisExpressionTreeInterpreter interpreter = new SymbolicDataAnalysisExpressionTreeInterpreter();
-
+      var interpreter = new SymbolicDataAnalysisExpressionTreeInterpreter();
+      EvaluateTerminals(interpreter, ds);
+      EvaluateOperations(interpreter, ds);
+      EvaluateAdf(interpreter, ds);
+    }
+
+    [TestMethod]
+    public void SymbolicDataAnalysisExpressionILEmittingTreeInterpreterEvaluateTest() {
+      Dataset ds = new Dataset(new string[] { "Y", "A", "B" }, new double[,] {
+        { 1.0, 1.0, 1.0 },
+        { 2.0, 2.0, 2.0 },
+        { 3.0, 1.0, 2.0 }
+      });
+
+      var interpreter = new SymbolicDataAnalysisExpressionTreeILEmittingInterpreter();
+      EvaluateTerminals(interpreter, ds);
+      EvaluateOperations(interpreter, ds);
+    }
+
+    private void EvaluateTerminals(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds) {
       // constants
       Evaluate(interpreter, ds, "(+ 1.5 3.5)", 0, 5.0);
@@ -113,6 +139,46 @@
       Evaluate(interpreter, ds, "(variable 2.0 a)", 0, 2.0);
       Evaluate(interpreter, ds, "(variable 2.0 a)", 1, 4.0);
-
-
+    }
+
+    private void EvaluateAdf(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds) {
+
+      // ADF      
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN 
+                                      (CALL ADF0)) 
+                                    (defun ADF0 1.0))", 1, 1.0);
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN 
+                                      (* (CALL ADF0) (CALL ADF0)))
+                                    (defun ADF0 2.0))", 1, 4.0);
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN 
+                                      (CALL ADF0 2.0 3.0))
+                                    (defun ADF0 
+                                      (+ (ARG 0) (ARG 1))))", 1, 5.0);
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN (CALL ADF1 2.0 3.0))
+                                    (defun ADF0 
+                                      (- (ARG 1) (ARG 0)))
+                                    (defun ADF1
+                                      (+ (CALL ADF0 (ARG 1) (ARG 0))
+                                         (CALL ADF0 (ARG 0) (ARG 1)))))", 1, 0.0);
+      Evaluate(interpreter, ds, @"(PROG 
+                                    (MAIN (CALL ADF1 (variable 2.0 a) 3.0))
+                                    (defun ADF0 
+                                      (- (ARG 1) (ARG 0)))
+                                    (defun ADF1                                                                              
+                                      (CALL ADF0 (ARG 1) (ARG 0))))", 1, 1.0);
+      Evaluate(interpreter, ds,
+               @"(PROG 
+                                    (MAIN (CALL ADF1 (variable 2.0 a) 3.0))
+                                    (defun ADF0 
+                                      (- (ARG 1) (ARG 0)))
+                                    (defun ADF1                                                                              
+                                      (+ (CALL ADF0 (ARG 1) (ARG 0))
+                                         (CALL ADF0 (ARG 0) (ARG 1)))))", 1, 0.0);
+    }
+
+    private void EvaluateOperations(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds) {
       // addition
       Evaluate(interpreter, ds, "(+ (variable 2.0 a ))", 1, 4.0);
@@ -148,5 +214,5 @@
       Evaluate(interpreter, ds, "(> (variable 2.0 a) 1.9)", 0, 1.0);
       Evaluate(interpreter, ds, "(> 1.9 (variable 2.0 a))", 0, -1.0);
-      //Evaluate(interpreter, ds, "(> (sqrt -1.0) (log -1.0))", 0, -1.0); // (> nan nan) should be false
+      Evaluate(interpreter, ds, "(> (log -1.0) (log -1.0))", 0, -1.0); // (> nan nan) should be false
 
       // lt
@@ -155,5 +221,5 @@
       Evaluate(interpreter, ds, "(< (variable 2.0 a) 1.9)", 0, -1.0);
       Evaluate(interpreter, ds, "(< 1.9 (variable 2.0 a))", 0, 1.0);
-      //Evaluate(interpreter, ds, "(< (sqrt -1,0) (log -1,0))", 0, -1.0); // (< nan nan) should be false
+      Evaluate(interpreter, ds, "(< (log -1.0) (log -1.0))", 0, -1.0); // (< nan nan) should be false
 
       // If
@@ -163,5 +229,5 @@
       Evaluate(interpreter, ds, "(if 1.0 2.0 3.0)", 0, 2.0);
       Evaluate(interpreter, ds, "(if 10.0 2.0 3.0)", 0, 2.0);
-      // Evaluate(interpreter, ds, "(if (sqrt -1.0) 2.0 3.0)", 0, 3.0); // if(nan) should return the else branch
+      Evaluate(interpreter, ds, "(if (log -1.0) 2.0 3.0)", 0, 3.0); // if(nan) should return the else branch
 
       // NOT
@@ -171,4 +237,5 @@
       Evaluate(interpreter, ds, "(not 2.0)", 0, -1.0);
       Evaluate(interpreter, ds, "(not 0.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(not (log -1.0))", 0, 1.0);
 
       // AND
@@ -181,4 +248,7 @@
       Evaluate(interpreter, ds, "(and 1.0 2.0 3.0)", 0, 1.0);
       Evaluate(interpreter, ds, "(and 1.0 -2.0 3.0)", 0, -1.0);
+      Evaluate(interpreter, ds, "(and (log -1.0))", 0, -1.0); // (and NaN)
+      Evaluate(interpreter, ds, "(and (log -1.0)  1.0)", 0, -1.0); // (and NaN 1.0)
+
 
       // OR
@@ -190,4 +260,6 @@
       Evaluate(interpreter, ds, "(or -1.0 -2.0 -3.0)", 0, -1.0);
       Evaluate(interpreter, ds, "(or -1.0 -2.0 3.0)", 0, 1.0);
+      Evaluate(interpreter, ds, "(or (log -1.0))", 0, -1.0); // (or NaN)
+      Evaluate(interpreter, ds, "(or (log -1.0)  1.0)", 0, -1.0); // (or NaN 1.0)
 
       // sin, cos, tan
@@ -204,44 +276,28 @@
       Evaluate(interpreter, ds, "(log -3.0)", 0, Math.Log(-3));
 
+      // power
+      Evaluate(interpreter, ds, "(pow 2.0 3.0)", 0, 8.0);
+      Evaluate(interpreter, ds, "(pow 4.0 0.5)", 0, 1.0); // interpreter should round to the nearest integer value value (.5 is rounded to the even number)
+      Evaluate(interpreter, ds, "(pow 4.0 2.5)", 0, 16.0); // interpreter should round to the nearest integer value value (.5 is rounded to the even number)
+      Evaluate(interpreter, ds, "(pow -2.0 3.0)", 0, -8.0);
+      Evaluate(interpreter, ds, "(pow 2.0 -3.0)", 0, 1.0 / 8.0);
+      Evaluate(interpreter, ds, "(pow -2.0 -3.0)", 0, -1.0 / 8.0);
+
+      // root
+      Evaluate(interpreter, ds, "(root 9.0 2.0)", 0, 3.0);
+      Evaluate(interpreter, ds, "(root 27.0 3.0)", 0, 3.0);
+      Evaluate(interpreter, ds, "(root 2.0 -3.0)", 0, Math.Pow(2.0, -1.0 / 3.0));
+
       // mean
       Evaluate(interpreter, ds, "(mean -1.0 1.0 -1.0)", 0, -1.0 / 3.0);
 
-      // ADF      
-      Evaluate(interpreter, ds, @"(PROG 
-                                    (MAIN 
-                                      (CALL ADF0)) 
-                                    (defun ADF0 1.0))", 1, 1.0);
-      Evaluate(interpreter, ds, @"(PROG 
-                                    (MAIN 
-                                      (* (CALL ADF0) (CALL ADF0)))
-                                    (defun ADF0 2.0))", 1, 4.0);
-      Evaluate(interpreter, ds, @"(PROG 
-                                    (MAIN 
-                                      (CALL ADF0 2.0 3.0))
-                                    (defun ADF0 
-                                      (+ (ARG 0) (ARG 1))))", 1, 5.0);
-      Evaluate(interpreter, ds, @"(PROG 
-                                    (MAIN (CALL ADF1 2.0 3.0))
-                                    (defun ADF0 
-                                      (- (ARG 1) (ARG 0)))
-                                    (defun ADF1
-                                      (+ (CALL ADF0 (ARG 1) (ARG 0))
-                                         (CALL ADF0 (ARG 0) (ARG 1)))))", 1, 0.0);
-      Evaluate(interpreter, ds, @"(PROG 
-                                    (MAIN (CALL ADF1 (variable 2.0 a) 3.0))
-                                    (defun ADF0 
-                                      (- (ARG 1) (ARG 0)))
-                                    (defun ADF1                                                                              
-                                      (CALL ADF0 (ARG 1) (ARG 0))))", 1, 1.0);
-      Evaluate(interpreter, ds, @"(PROG 
-                                    (MAIN (CALL ADF1 (variable 2.0 a) 3.0))
-                                    (defun ADF0 
-                                      (- (ARG 1) (ARG 0)))
-                                    (defun ADF1                                                                              
-                                      (+ (CALL ADF0 (ARG 1) (ARG 0))
-                                         (CALL ADF0 (ARG 0) (ARG 1)))))", 1, 0.0);
-    }
-
-    private void Evaluate(SymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds, string expr, int index, double expected) {
+      // lag
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a -1) ", 1, ds.GetDoubleValue("A", 0));
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a -1) ", 2, ds.GetDoubleValue("A", 1));
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a 0) ", 2, ds.GetDoubleValue("A", 2));
+      Evaluate(interpreter, ds, "(lagVariable 1.0 a 1) ", 0, ds.GetDoubleValue("A", 1));
+    }
+
+    private void Evaluate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset ds, string expr, int index, double expected) {
       var importer = new SymbolicExpressionImporter();
       ISymbolicExpressionTree tree = importer.Import(expr);
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tests/SymbolicDataAnalysisExpressionTreeSimplifierTest.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tests/SymbolicDataAnalysisExpressionTreeSimplifierTest.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tests/SymbolicDataAnalysisExpressionTreeSimplifierTest.cs	(revision 6784)
@@ -131,13 +131,13 @@
       }
       {
-        // log transformation
-        var actualTree = simplifier.Simplify(importer.Import("(log (* (variable 2.0 a) (variable 3.0 b)))"));
-        var expectedTree = importer.Import("(+ (log (variable 1.0 a)) (log (variable 1.0 b)) 1.7918)");
-        Assert.AreEqual(formatter.Format(expectedTree), formatter.Format(actualTree));
-      }
-      {
-        // log transformation
-        var actualTree = simplifier.Simplify(importer.Import("(log (/ (variable 2.0 a) (variable 3.0 b)))"));
-        var expectedTree = importer.Import("(- (log (variable 2.0 a)) (log (variable 3.0 b)))");
+        // must not transform logs in this way as we do not know wether both variables are positive
+        var actualTree = simplifier.Simplify(importer.Import("(log (* (variable 1.0 a) (variable 1.0 b)))"));
+        var expectedTree = importer.Import("(log (* (variable 1.0 a) (variable 1.0 b)))");
+        Assert.AreEqual(formatter.Format(expectedTree), formatter.Format(actualTree));
+      }
+      {
+        // must not transform logs in this way as we do not know wether both variables are positive
+        var actualTree = simplifier.Simplify(importer.Import("(log (/ (variable 1.0 a) (variable 1.0 b)))"));
+        var expectedTree = importer.Import("(log (/ (variable 1.0 a) (variable 1.0 b)))");
         Assert.AreEqual(formatter.Format(expectedTree), formatter.Format(actualTree));
       }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tests/SymbolicExpressionImporter.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tests/SymbolicExpressionImporter.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tests/SymbolicExpressionImporter.cs	(revision 6784)
@@ -29,4 +29,5 @@
   internal class SymbolicExpressionImporter {
     private const string VARSTART = "VAR";
+    private const string LAGGEDVARSTART = "LAG";
     private const string DEFUNSTART = "DEFUN";
     private const string ARGSTART = "ARG";
@@ -58,4 +59,5 @@
     Constant constant = new Constant();
     Variable variable = new Variable();
+    LaggedVariable laggedVariable = new LaggedVariable();
     Defun defun = new Defun();
 
@@ -96,4 +98,6 @@
         if (tokens.Peek().StringValue.StartsWith(VARSTART)) {
           tree = ParseVariable(tokens);
+        } else if (tokens.Peek().StringValue.StartsWith(LAGGEDVARSTART)) {
+          tree = ParseLaggedVariable(tokens);
         } else if (tokens.Peek().StringValue.StartsWith(DEFUNSTART)) {
           tree = ParseDefun(tokens);
@@ -157,4 +161,14 @@
     }
 
+    private ISymbolicExpressionTreeNode ParseLaggedVariable(Queue<Token> tokens) {
+      Token varTok = tokens.Dequeue();
+      Debug.Assert(varTok.StringValue == "LAGVARIABLE");
+      LaggedVariableTreeNode t = (LaggedVariableTreeNode)laggedVariable.CreateTreeNode();
+      t.Weight = tokens.Dequeue().DoubleValue;
+      t.VariableName = tokens.Dequeue().StringValue;
+      t.Lag = (int)tokens.Dequeue().DoubleValue;
+      return t;
+    }
+
     private ISymbolicExpressionTreeNode CreateTree(Token token) {
       if (token.Symbol != TokenSymbol.SYMB) throw new FormatException("Expected function symbol, but got: " + token.StringValue);
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.Designer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.Designer.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.Designer.cs	(revision 6784)
@@ -44,5 +44,4 @@
     /// </summary>
     private void InitializeComponent() {
-      this.problemView1 = new HeuristicLab.Optimization.Views.ProblemView();
       this.SamplesComboBox = new System.Windows.Forms.ComboBox();
       this.SuspendLayout();
@@ -56,14 +55,4 @@
       this.matrixView.Location = new System.Drawing.Point(3, 31);
       this.matrixView.Size = new System.Drawing.Size(304, 251);
-      // 
-      // problemView1
-      // 
-      this.problemView1.Caption = "Problem View";
-      this.problemView1.Content = null;
-      this.problemView1.Location = new System.Drawing.Point(1147, 687);
-      this.problemView1.Name = "problemView1";
-      this.problemView1.ReadOnly = false;
-      this.problemView1.Size = new System.Drawing.Size(490, 353);
-      this.problemView1.TabIndex = 1;
       // 
       // SamplesComboBox
@@ -84,8 +73,6 @@
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
       this.Controls.Add(this.SamplesComboBox);
-      this.Controls.Add(this.problemView1);
       this.Name = "ClassificationEnsembleSolutionEstimatedClassValuesView";
       this.Controls.SetChildIndex(this.matrixView, 0);
-      this.Controls.SetChildIndex(this.problemView1, 0);
       this.Controls.SetChildIndex(this.SamplesComboBox, 0);
       this.ResumeLayout(false);
@@ -95,5 +82,4 @@
     #endregion
 
-    private Optimization.Views.ProblemView problemView1;
     private System.Windows.Forms.ComboBox SamplesComboBox;
 
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs	(revision 6784)
@@ -21,4 +21,5 @@
 using System;
 using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
 using System.Windows.Forms;
@@ -33,6 +34,7 @@
     ClassificationSolutionEstimatedClassValuesView {
     private const string RowColumnName = "Row";
-    private const string TargetClassValuesColumnName = "TargetVariable";
-    private const string EstimatedClassValuesColumnName = "EstimatedClassValues";
+    private const string TargetClassValuesColumnName = "Target Variable";
+    private const string EstimatedClassValuesColumnName = "Estimated Class Values";
+    private const string CorrectClassificationColumnName = "Correct Classification";
     private const string ConfidenceColumnName = "Confidence";
 
@@ -51,5 +53,8 @@
       SamplesComboBox.Items.AddRange(new string[] { SamplesComboBoxAllSamples, SamplesComboBoxTrainingSamples, SamplesComboBoxTestSamples });
       SamplesComboBox.SelectedIndex = 0;
+      matrixView.DataGridView.RowPrePaint += new DataGridViewRowPrePaintEventHandler(DataGridView_RowPrePaint);
     }
+
+
 
     private void SamplesComboBox_SelectedIndexChanged(object sender, EventArgs e) {
@@ -92,6 +97,6 @@
       int classValuesCount = Content.ProblemData.ClassValues.Count;
       int modelCount = Content.Model.Models.Count();
-      string[,] values = new string[indizes.Length, 4 + classValuesCount + modelCount];
-      double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable);
+      string[,] values = new string[indizes.Length, 5 + classValuesCount + modelCount];
+      double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
       List<List<double?>> estimatedValuesVector = GetEstimatedValues(SamplesComboBox.SelectedItem.ToString(), indizes,
                                                             Content.ClassificationSolutions);
@@ -102,14 +107,15 @@
         values[i, 1] = target[i].ToString();
         values[i, 2] = estimatedClassValues[i].ToString();
+        values[i, 3] = (target[i] == estimatedClassValues[i]).ToString();
         var groups = estimatedValuesVector[i].GroupBy(x => x).Select(g => new { Key = g.Key, Count = g.Count() }).ToList();
         var estimationCount = groups.Where(g => g.Key != null).Select(g => g.Count).Sum();
-        values[i, 3] = (((double)groups.Where(g => g.Key == estimatedClassValues[i]).Single().Count) / estimationCount).ToString();
+        values[i, 4] = (((double)groups.Where(g => g.Key == estimatedClassValues[i]).Single().Count) / estimationCount).ToString();
         for (int classIndex = 0; classIndex < Content.ProblemData.ClassValues.Count; classIndex++) {
           var group = groups.Where(g => g.Key == Content.ProblemData.ClassValues[classIndex]).SingleOrDefault();
-          if (group == null) values[i, 4 + classIndex] = 0.ToString();
-          else values[i, 4 + classIndex] = group.Count.ToString();
+          if (group == null) values[i, 5 + classIndex] = 0.ToString();
+          else values[i, 5 + classIndex] = group.Count.ToString();
         }
         for (int modelIndex = 0; modelIndex < estimatedValuesVector[i].Count; modelIndex++) {
-          values[i, 4 + classValuesCount + modelIndex] = estimatedValuesVector[i][modelIndex] == null
+          values[i, 5 + classValuesCount + modelIndex] = estimatedValuesVector[i][modelIndex] == null
                                                            ? string.Empty
                                                            : estimatedValuesVector[i][modelIndex].ToString();
@@ -119,5 +125,5 @@
 
       StringMatrix matrix = new StringMatrix(values);
-      List<string> columnNames = new List<string>() { "Id", TargetClassValuesColumnName, EstimatedClassValuesColumnName, ConfidenceColumnName };
+      List<string> columnNames = new List<string>() { "Id", TargetClassValuesColumnName, EstimatedClassValuesColumnName, CorrectClassificationColumnName, ConfidenceColumnName };
       columnNames.AddRange(Content.ProblemData.ClassNames);
       columnNames.AddRange(Content.Model.Models.Select(m => m.Name));
@@ -125,4 +131,5 @@
       matrix.SortableView = true;
       matrixView.Content = matrix;
+      UpdateColoringOfRows();
     }
 
@@ -150,6 +157,25 @@
     }
 
+    private void DataGridView_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) {
+      if (InvokeRequired) {
+        Invoke(new EventHandler<DataGridViewRowPrePaintEventArgs>(DataGridView_RowPrePaint), sender, e);
+        return;
+      }
+      bool correctClassified = bool.Parse(matrixView.DataGridView[3, e.RowIndex].Value.ToString());
+      matrixView.DataGridView.Rows[e.RowIndex].DefaultCellStyle.ForeColor = correctClassified ? Color.MediumSeaGreen : Color.Red;
+    }
 
-
+    private void UpdateColoringOfRows() {
+      if (InvokeRequired) {
+        Invoke((Action)UpdateColoringOfRows);
+        return;
+      }
+      //matrixView.DataGridView.SuspendRepaint();
+      //for (int i = 0; i < matrixView.DataGridView.Rows.Count; i++) {
+      //  bool correctClassified = bool.Parse(matrixView.Content.GetValue(i, 3));
+      //  matrixView.DataGridView.Rows[i].DefaultCellStyle.ForeColor = correctClassified ? Color.MediumSeaGreen : Color.Red;
+      //}
+      //matrixView.DataGridView.ResumeRepaint(true);
+    }
   }
 }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionConfusionMatrixView.cs	(revision 6784)
@@ -114,5 +114,5 @@
         } else throw new InvalidOperationException();
 
-        double[] targetValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(Content.ProblemData.TargetVariable, rows).ToArray();
+        double[] targetValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable, rows).ToArray();
 
         Dictionary<double, int> classValueIndexMapping = new Dictionary<double, int>();
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionEstimatedClassValuesView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionEstimatedClassValuesView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionEstimatedClassValuesView.cs	(revision 6784)
@@ -86,5 +86,5 @@
           string[,] values = new string[Content.ProblemData.Dataset.Rows, 5];
 
-          double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable);
+          double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
           double[] estimated = Content.EstimatedClassValues.ToArray();
           for (int row = 0; row < target.Length; row++) {
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs	(revision 6784)
@@ -107,5 +107,5 @@
 
         double[] estimatedValues = Content.GetEstimatedValues(rows).ToArray();
-        double[] targetClassValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(Content.ProblemData.TargetVariable, rows).ToArray();
+        double[] targetClassValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable, rows).ToArray();
         double minThreshold = estimatedValues.Min();
         double maxThreshold = estimatedValues.Max();
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionEstimatedClassValuesView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionEstimatedClassValuesView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionEstimatedClassValuesView.cs	(revision 6784)
@@ -51,5 +51,5 @@
           string[,] values = new string[Content.ProblemData.Dataset.Rows, 4];
 
-          double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable);
+          double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
           double[] estimatedClassValues = Content.EstimatedClassValues.ToArray();
           double[] estimatedValues = Content.EstimatedValues.ToArray();
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs	(revision 6784)
@@ -32,5 +32,5 @@
 namespace HeuristicLab.Problems.DataAnalysis.Views {
   [View("Classification Threshold")]
-  [Content(typeof(IDiscriminantFunctionClassificationSolution), true)]
+  [Content(typeof(IDiscriminantFunctionClassificationSolution), false)]
   public sealed partial class DiscriminantFunctionClassificationSolutionThresholdView : DataAnalysisSolutionEvaluationView {
     private const double TrainingAxisValue = 0.0;
@@ -135,7 +135,9 @@
     private void FillSeriesWithDataPoints(Series series) {
       List<double> estimatedValues = Content.EstimatedValues.ToList();
+      var targetValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToList();
+
       foreach (int row in Content.ProblemData.TrainingIndizes) {
         double estimatedValue = estimatedValues[row];
-        double targetValue = Content.ProblemData.Dataset[Content.ProblemData.TargetVariable, row];
+        double targetValue = targetValues[row];
         if (targetValue.IsAlmost((double)series.Tag)) {
           double jitterValue = random.NextDouble() * 2.0 - 1.0;
@@ -150,6 +152,6 @@
       foreach (int row in Content.ProblemData.TestIndizes) {
         double estimatedValue = estimatedValues[row];
-        double targetValue = Content.ProblemData.Dataset[Content.ProblemData.TargetVariable, row];
-        if (targetValue == (double)series.Tag) {
+        double targetValue = targetValues[row];
+        if (targetValue.IsAlmost((double)series.Tag)) {
           double jitterValue = random.NextDouble() * 2.0 - 1.0;
           DataPoint point = new DataPoint();
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Clustering/ClusteringSolutionEstimatedClusterView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Clustering/ClusteringSolutionEstimatedClusterView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Clustering/ClusteringSolutionEstimatedClusterView.cs	(revision 6784)
@@ -85,6 +85,5 @@
           int[] clusters = Content.Model.GetClusterValues(Content.ProblemData.Dataset, Enumerable.Range(0, Content.ProblemData.Dataset.Rows)).ToArray();
           var dataset = Content.ProblemData.Dataset;
-          int columns = Content.ProblemData.AllowedInputVariables.Count() + 1;
-          var columnsIndixes = Content.ProblemData.AllowedInputVariables.Select(x => dataset.GetVariableIndex(x)).ToList();
+          int columns = Content.ProblemData.AllowedInputVariables.Count() + 1;          
 
           double[,] values = new double[dataset.Rows, columns];
@@ -93,6 +92,6 @@
 
             int column = 1;
-            foreach (int columnIndex in columnsIndixes) {
-              values[row, column] = dataset[row, columnIndex];
+            foreach (var columnName in Content.ProblemData.AllowedInputVariables) {
+              values[row, column] = dataset.GetDoubleValue(columnName, row);
               column++;
             }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs	(revision 6784)
@@ -139,5 +139,5 @@
         if (residuals[i] > chart.ChartAreas[0].AxisX.Maximum) {
           point.XValue = chart.ChartAreas[0].AxisX.Maximum;
-          point.YValues[0] = ((double)i - 1) / residuals.Count;
+          point.YValues[0] = ((double)i) / residuals.Count;
           point.ToolTip = "Error: " + point.XValue + "\n" + "Samples: " + point.YValues[0];
           series.Points.Add(point);
@@ -146,5 +146,5 @@
 
         point.XValue = residuals[i];
-        point.YValues[0] = ((double)i) / residuals.Count;
+        point.YValues[0] = ((double)i+1) / residuals.Count;
         point.ToolTip = "Error: " + point.XValue + "\n" + "Samples: " + point.YValues[0];
         series.Points.Add(point);
@@ -164,11 +164,11 @@
       switch (cmbSamples.SelectedItem.ToString()) {
         case TrainingSamples:
-          originalValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
+          originalValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
           break;
         case TestSamples:
-          originalValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes);
+          originalValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes);
           break;
         case AllSamples:
-          originalValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable);
+          originalValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable);
           break;
         default:
@@ -197,5 +197,5 @@
 
     protected IEnumerable<double> GetMeanModelEstimatedValues(IEnumerable<double> originalValues) {
-      double averageTrainingTarget = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).Average();
+      double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).Average();
       return Enumerable.Repeat(averageTrainingTarget, originalValues.Count());
     }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionEstimatedValuesView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionEstimatedValuesView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionEstimatedValuesView.cs	(revision 6784)
@@ -88,5 +88,5 @@
           string[,] values = new string[Content.ProblemData.Dataset.Rows, 7];
 
-          double[] target = Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable);
+          double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray();
           var estimated = Content.EstimatedValues.GetEnumerator();
           var estimated_training = Content.EstimatedTrainingValues.GetEnumerator();
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.Designer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.Designer.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.Designer.cs	(revision 6784)
@@ -63,7 +63,10 @@
       this.chart.Size = new System.Drawing.Size(358, 225);
       this.chart.TabIndex = 0;
+      this.chart.CustomizeLegend += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs>(this.chart_CustomizeLegend);
       this.chart.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.Chart_MouseDoubleClick);
+      this.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown);
+      this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove);
       // 
-      // LineChartView
+      // RegressionSolutionLineChartView
       // 
       this.AllowDrop = true;
@@ -71,5 +74,5 @@
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
       this.Controls.Add(this.chart);
-      this.Name = "LineChartView";
+      this.Name = "RegressionSolutionLineChartView";
       this.Size = new System.Drawing.Size(358, 225);
       ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs	(revision 6784)
@@ -20,4 +20,5 @@
 #endregion
 using System;
+using System.Collections.Generic;
 using System.Drawing;
 using System.Linq;
@@ -34,4 +35,5 @@
     private const string ESTIMATEDVALUES_TRAINING_SERIES_NAME = "Estimated Values (training)";
     private const string ESTIMATEDVALUES_TEST_SERIES_NAME = "Estimated Values (test)";
+    private const string ESTIMATEDVALUES_ALL_SERIES_NAME = "Estimated Values (all samples)";
 
     public new IRegressionSolution Content {
@@ -65,20 +67,37 @@
         this.chart.Series[TARGETVARIABLE_SERIES_NAME].ChartType = SeriesChartType.FastLine;
         this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.DataBindXY(Enumerable.Range(0, Content.ProblemData.Dataset.Rows).ToArray(),
-          Content.ProblemData.Dataset.GetVariableValues(Content.ProblemData.TargetVariable));
+          Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray());
 
         this.chart.Series.Add(ESTIMATEDVALUES_TRAINING_SERIES_NAME);
         this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].LegendText = ESTIMATEDVALUES_TRAINING_SERIES_NAME;
         this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].ChartType = SeriesChartType.FastLine;
-        this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TrainingIndizes.ToArray(),
-          Content.EstimatedTrainingValues.ToArray());
-        this.chart.DataManipulator.InsertEmptyPoints(Content.ProblemData.Dataset.Rows, IntervalType.Number, ESTIMATEDVALUES_TRAINING_SERIES_NAME);
+        this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TrainingIndizes.ToArray(), Content.EstimatedTrainingValues.ToArray());
         this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Tag = Content;
+        this.chart.DataManipulator.InsertEmptyPoints(1, IntervalType.Number, ESTIMATEDVALUES_TRAINING_SERIES_NAME);
+        this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.BorderWidth = 0;
+        this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.MarkerStyle = MarkerStyle.None;
+
 
         this.chart.Series.Add(ESTIMATEDVALUES_TEST_SERIES_NAME);
         this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].LegendText = ESTIMATEDVALUES_TEST_SERIES_NAME;
         this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].ChartType = SeriesChartType.FastLine;
-        this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TestIndizes.ToArray(),
-          Content.EstimatedTestValues.ToArray());
+        this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Points.DataBindXY(Content.ProblemData.TestIndizes.ToArray(), Content.EstimatedTestValues.ToArray());
         this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Tag = Content;
+
+
+        int[] allIndizes = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndizes).Except(Content.ProblemData.TestIndizes).ToArray();
+        var estimatedValues = Content.EstimatedValues.ToArray();
+        List<double> allEstimatedValues = allIndizes.Select(index => estimatedValues[index]).ToList();
+
+        this.chart.Series.Add(ESTIMATEDVALUES_ALL_SERIES_NAME);
+        this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].LegendText = ESTIMATEDVALUES_ALL_SERIES_NAME;
+        this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].ChartType = SeriesChartType.FastLine;
+        this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(allIndizes, allEstimatedValues);
+        this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Tag = Content;
+        this.chart.DataManipulator.InsertEmptyPoints(1, IntervalType.Number, ESTIMATEDVALUES_ALL_SERIES_NAME);
+        this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.BorderWidth = 0;
+        this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].EmptyPointStyle.MarkerStyle = MarkerStyle.None;
+        this.ToggleSeriesData(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]);
+
         UpdateCursorInterval();
         this.UpdateStripLines();
@@ -109,36 +128,16 @@
     }
 
-    private void Content_ProblemDataChanged(object sender, EventArgs e) {
-      RedrawChart();
-    }
-
-    private void Content_ModelChanged(object sender, EventArgs e) {
-      UpdateEstimatedValuesLineChart();
-    }
-
     protected override void OnContentChanged() {
       base.OnContentChanged();
       RedrawChart();
     }
-
-    private void UpdateEstimatedValuesLineChart() {
-      if (InvokeRequired) Invoke((Action)UpdateEstimatedValuesLineChart);
-      else {
-        if (this.chart.Series.Count > 0) {
-          Series s = this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME];
-          if (s != null) {
-            s.Points.DataBindXY(Content.ProblemData.TrainingIndizes.ToArray(), Content.EstimatedTrainingValues.ToArray());
-            s.LegendText = ESTIMATEDVALUES_TRAINING_SERIES_NAME;
-          }
-          s = this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME];
-          if (s != null) {
-            s.Points.DataBindXY(Content.ProblemData.TestIndizes.ToArray(), Content.EstimatedTestValues.ToArray());
-            s.LegendText = ESTIMATEDVALUES_TEST_SERIES_NAME;
-          }
-          this.UpdateStripLines();
-          UpdateCursorInterval();
-        }
-      }
-    }
+    private void Content_ProblemDataChanged(object sender, EventArgs e) {
+      RedrawChart();
+    }
+    private void Content_ModelChanged(object sender, EventArgs e) {
+      RedrawChart();
+    }
+
+
 
     private void Chart_MouseDoubleClick(object sender, MouseEventArgs e) {
@@ -201,4 +200,59 @@
       this.chart.ChartAreas[0].AxisX.StripLines.Add(stripLine);
     }
+
+    private void ToggleSeriesData(Series series) {
+      if (series.Points.Count > 0) {  //checks if series is shown
+        if (this.chart.Series.Any(s => s != series && s.Points.Count > 0)) {
+          series.Points.Clear();
+        }
+      } else if (Content != null) {
+        string targetVariableName = Content.ProblemData.TargetVariable;
+
+        IEnumerable<int> indizes = null;
+        IEnumerable<double> predictedValues = null;
+        switch (series.Name) {
+          case ESTIMATEDVALUES_ALL_SERIES_NAME:
+            indizes = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndizes).Except(Content.ProblemData.TestIndizes).ToArray();
+            var estimatedValues = Content.EstimatedValues.ToArray();
+            predictedValues = indizes.Select(index => estimatedValues[index]).ToList();
+            break;
+          case ESTIMATEDVALUES_TRAINING_SERIES_NAME:
+            indizes = Content.ProblemData.TrainingIndizes.ToArray();
+            predictedValues = Content.EstimatedTrainingValues.ToArray();
+            break;
+          case ESTIMATEDVALUES_TEST_SERIES_NAME:
+            indizes = Content.ProblemData.TestIndizes.ToArray();
+            predictedValues = Content.EstimatedTestValues.ToArray();
+            break;
+        }
+        series.Points.DataBindXY(indizes, predictedValues);
+        chart.DataManipulator.InsertEmptyPoints(1, IntervalType.Number, series.Name);
+        chart.Legends[series.Legend].ForeColor = Color.Black;
+        UpdateCursorInterval();
+        chart.Refresh();
+      }
+    }
+
+    private void chart_MouseMove(object sender, MouseEventArgs e) {
+      HitTestResult result = chart.HitTest(e.X, e.Y);
+      if (result.ChartElementType == ChartElementType.LegendItem && result.Series.Name != TARGETVARIABLE_SERIES_NAME)
+        Cursor = Cursors.Hand;
+      else
+        Cursor = Cursors.Default;
+    }
+    private void chart_MouseDown(object sender, MouseEventArgs e) {
+      HitTestResult result = chart.HitTest(e.X, e.Y);
+      if (result.ChartElementType == ChartElementType.LegendItem && result.Series.Name != TARGETVARIABLE_SERIES_NAME) {
+        ToggleSeriesData(result.Series);
+      }
+    }
+
+    private void chart_CustomizeLegend(object sender, CustomizeLegendEventArgs e) {
+      if (chart.Series.Count != 4) return;
+      e.LegendItems[0].Cells[1].ForeColor = this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.Count == 0 ? Color.Gray : Color.Black;
+      e.LegendItems[1].Cells[1].ForeColor = this.chart.Series[ESTIMATEDVALUES_TRAINING_SERIES_NAME].Points.Count == 0 ? Color.Gray : Color.Black;
+      e.LegendItems[2].Cells[1].ForeColor = this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Points.Count == 0 ? Color.Gray : Color.Black;
+      e.LegendItems[3].Cells[1].ForeColor = this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.Count == 0 ? Color.Gray : Color.Black;
+    }
   }
 }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.Designer.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.Designer.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.Designer.cs	(revision 6784)
@@ -64,14 +64,15 @@
       this.chart.Size = new System.Drawing.Size(527, 392);
       this.chart.TabIndex = 1;
+      this.chart.PostPaint += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.ChartPaintEventArgs>(this.chart_PostPaint);
+      this.chart.CustomizeLegend += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs>(this.chart_CustomizeLegend);
+      this.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown);
       this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove);
-      this.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown);
-      this.chart.CustomizeLegend += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs>(chart_CustomizeLegend);
       // 
-      // ScatterPlotView
+      // RegressionSolutionScatterPlotView
       // 
+      this.AllowDrop = true;
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.Controls.Add(this.chart);
-      this.Name = "ScatterPlotView";
-      this.AllowDrop = true;
+      this.Name = "RegressionSolutionScatterPlotView";
       this.Size = new System.Drawing.Size(527, 392);
       ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionScatterPlotView.cs	(revision 6784)
@@ -130,14 +130,14 @@
         if (this.chart.Series[ALL_SERIES].Points.Count > 0)
           this.chart.Series[ALL_SERIES].Points.DataBindXY(Content.EstimatedValues.ToArray(), "",
-            dataset.GetVariableValues(targetVariableName), "");
+            dataset.GetDoubleValues(targetVariableName).ToArray(), "");
         if (this.chart.Series[TRAINING_SERIES].Points.Count > 0)
           this.chart.Series[TRAINING_SERIES].Points.DataBindXY(Content.EstimatedTrainingValues.ToArray(), "",
-            dataset.GetEnumeratedVariableValues(targetVariableName, Content.ProblemData.TrainingIndizes).ToArray(), "");
+            dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TrainingIndizes).ToArray(), "");
         if (this.chart.Series[TEST_SERIES].Points.Count > 0)
           this.chart.Series[TEST_SERIES].Points.DataBindXY(Content.EstimatedTestValues.ToArray(), "",
-           dataset.GetEnumeratedVariableValues(targetVariableName, Content.ProblemData.TestIndizes).ToArray(), "");
-
-        double max = Content.EstimatedTrainingValues.Concat(Content.EstimatedTestValues.Concat(Content.EstimatedValues.Concat(dataset.GetVariableValues(targetVariableName)))).Max();
-        double min = Content.EstimatedTrainingValues.Concat(Content.EstimatedTestValues.Concat(Content.EstimatedValues.Concat(dataset.GetVariableValues(targetVariableName)))).Min();
+           dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TestIndizes).ToArray(), "");
+
+        double max = Content.EstimatedTrainingValues.Concat(Content.EstimatedTestValues.Concat(Content.EstimatedValues.Concat(dataset.GetDoubleValues(targetVariableName)))).Max();
+        double min = Content.EstimatedTrainingValues.Concat(Content.EstimatedTestValues.Concat(Content.EstimatedValues.Concat(dataset.GetDoubleValues(targetVariableName)))).Min();
 
         max = max + 0.2 * Math.Abs(max);
@@ -177,13 +177,13 @@
           case ALL_SERIES:
             predictedValues = Content.EstimatedValues.ToArray();
-            targetValues = Content.ProblemData.Dataset.GetVariableValues(targetVariableName);
+            targetValues = Content.ProblemData.Dataset.GetDoubleValues(targetVariableName).ToArray();
             break;
           case TRAINING_SERIES:
             predictedValues = Content.EstimatedTrainingValues.ToArray();
-            targetValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(targetVariableName, Content.ProblemData.TrainingIndizes).ToArray();
+            targetValues = Content.ProblemData.Dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TrainingIndizes).ToArray();
             break;
           case TEST_SERIES:
             predictedValues = Content.EstimatedTestValues.ToArray();
-            targetValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(targetVariableName, Content.ProblemData.TestIndizes).ToArray();
+            targetValues = Content.ProblemData.Dataset.GetDoubleValues(targetVariableName, Content.ProblemData.TestIndizes).ToArray();
             break;
         }
@@ -219,4 +219,28 @@
       e.LegendItems[2].Cells[1].ForeColor = this.chart.Series[TEST_SERIES].Points.Count == 0 ? Color.Gray : Color.Black;
     }
+
+    private void chart_PostPaint(object sender, ChartPaintEventArgs e) {
+      var chartArea = e.ChartElement as ChartArea;
+      if (chartArea != null) {
+        ChartGraphics chartGraphics = e.ChartGraphics;
+        using (Pen p = new Pen(Color.DarkGray)) {
+          double xmin = chartArea.AxisX.ScaleView.ViewMinimum;
+          double xmax = chartArea.AxisX.ScaleView.ViewMaximum;
+          double ymin = chartArea.AxisY.ScaleView.ViewMinimum;
+          double ymax = chartArea.AxisY.ScaleView.ViewMaximum;
+
+          if (xmin > ymax || ymin > xmax) return;
+
+          PointF start = PointF.Empty;
+          start.X = (float)chartGraphics.GetPositionFromAxis(chartArea.Name, chartArea.AxisX.AxisName, Math.Max(xmin, ymin));
+          start.Y = (float)chartGraphics.GetPositionFromAxis(chartArea.Name, chartArea.AxisY.AxisName, Math.Max(xmin, ymin));
+          PointF end = PointF.Empty;
+          end.X = (float)chartGraphics.GetPositionFromAxis(chartArea.Name, chartArea.AxisX.AxisName, Math.Min(xmax, ymax));
+          end.Y = (float)chartGraphics.GetPositionFromAxis(chartArea.Name, chartArea.AxisY.AxisName, Math.Min(xmax, ymax));
+
+          chartGraphics.Graphics.DrawLine(p, chartGraphics.GetAbsolutePoint(start), chartGraphics.GetAbsolutePoint(end));
+        }
+      }
+    }
   }
 }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClusteringSolutionView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClusteringSolutionView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClusteringSolutionView.cs	(revision 6784)
@@ -21,4 +21,5 @@
 
 using System.Windows.Forms;
+using HeuristicLab.Core;
 using HeuristicLab.MainForm;
 
@@ -39,6 +40,11 @@
     protected override void itemsListView_DragEnter(object sender, DragEventArgs e) {
       validDragOperation = false;
-      if (!ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is ClusteringProblemData)) {
-        validDragOperation = true;
+      if (ReadOnly) return;
+
+      var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+      if (dropData is ClusteringProblemData) validDragOperation = true;
+      else if (dropData is IValueParameter) {
+        var param = (IValueParameter)dropData;
+        if (param.Value is ClusteringProblemData) validDragOperation = true;
       }
     }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs	(revision 6784)
@@ -25,4 +25,5 @@
 using System.Linq;
 using System.Windows.Forms;
+using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
@@ -139,6 +140,11 @@
     protected override void itemsListView_DragEnter(object sender, DragEventArgs e) {
       validDragOperation = false;
-      if (!ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is DataAnalysisProblemData)) {
-        validDragOperation = true;
+      if (ReadOnly) return;
+
+      var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+      if (dropData is DataAnalysisProblemData) validDragOperation = true;
+      else if (dropData is IValueParameter) {
+        var param = (IValueParameter)dropData;
+        if (param.Value is DataAnalysisProblemData) validDragOperation = true;
       }
     }
@@ -146,7 +152,13 @@
     protected override void itemsListView_DragDrop(object sender, DragEventArgs e) {
       if (e.Effect != DragDropEffects.None) {
-        if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is DataAnalysisProblemData) {
-          DataAnalysisProblemData problemData = (DataAnalysisProblemData)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+        var dropData = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
+        if (dropData is DataAnalysisProblemData) {
+          DataAnalysisProblemData problemData = (DataAnalysisProblemData)dropData;
           Content.ProblemData = (DataAnalysisProblemData)problemData.Clone();
+        } else if (dropData is IValueParameter) {
+          var param = (IValueParameter)dropData;
+          DataAnalysisProblemData problemData = param.Value as DataAnalysisProblemData;
+          if (problemData != null)
+            Content.ProblemData = (DataAnalysisProblemData)problemData.Clone();
         }
       }
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/NamedDataAnalysisSolutionView.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/NamedDataAnalysisSolutionView.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/NamedDataAnalysisSolutionView.cs	(revision 6784)
@@ -30,4 +30,7 @@
   [Content(typeof(DataAnalysisSolution), true)]
   public partial class NamedDataAnalysisSolutionView : NamedItemView {
+    private Type contentType;
+    private DataAnalysisSolutionView view;
+
     public NamedDataAnalysisSolutionView() {
       InitializeComponent();
@@ -41,10 +44,16 @@
     protected override void OnContentChanged() {
       base.OnContentChanged();
-      panel.Controls.Clear();
 
-      if (Content != null) {
+      if (Content == null) {
+        panel.Controls.Clear();
+      } else if (Content.GetType() == contentType && view != null) {
+        view.Content = Content;
+      } else {
+        view = null;
+        contentType = Content.GetType();
+        panel.Controls.Clear();
         var viewType = MainFormManager.GetViewTypes(Content.GetType(), true).Where(t => typeof(DataAnalysisSolutionView).IsAssignableFrom(t)).FirstOrDefault();
         if (viewType != null) {
-          var view = (DataAnalysisSolutionView)Activator.CreateInstance(viewType);
+          view = (DataAnalysisSolutionView)Activator.CreateInstance(viewType);
           view.Dock = DockStyle.Fill;
           view.Content = Content;
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs	(revision 6784)
@@ -21,5 +21,7 @@
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using System.Linq;
 using HeuristicLab.Common;
@@ -36,10 +38,9 @@
     private Dataset(Dataset original, Cloner cloner)
       : base(original, cloner) {
-      variableNameToVariableIndexMapping = original.variableNameToVariableIndexMapping;
-      data = original.data;
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new Dataset(this, cloner);
-    }
+      variableValues = new Dictionary<string, IList>(original.variableValues);
+      variableNames = new List<string>(original.variableNames);
+      rows = original.rows;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) { return new Dataset(this, cloner); }
 
     public Dataset()
@@ -47,120 +48,162 @@
       Name = "-";
       VariableNames = Enumerable.Empty<string>();
-      data = new double[0, 0];
-    }
-
-    public Dataset(IEnumerable<string> variableNames, double[,] data)
+      variableValues = new Dictionary<string, IList>();
+      rows = 0;
+    }
+
+    public Dataset(IEnumerable<string> variableNames, IEnumerable<IList> variableValues)
       : base() {
       Name = "-";
-      if (variableNames.Count() != data.GetLength(1)) {
-        throw new ArgumentException("Number of variable names doesn't match the number of columns of data");
-      }
-      this.data = (double[,])data.Clone();
-      VariableNames = variableNames;
-    }
-
-
-    private Dictionary<string, int> variableNameToVariableIndexMapping;
-    private Dictionary<int, string> variableIndexToVariableNameMapping;
+      if (!variableNames.Any()) {
+        this.variableNames = Enumerable.Range(0, variableValues.Count()).Select(x => "Column " + x).ToList();
+      } else if (variableNames.Count() != variableValues.Count()) {
+        throw new ArgumentException("Number of variable names doesn't match the number of columns of variableValues");
+      } else if (!variableValues.All(list => list.Count == variableValues.First().Count)) {
+        throw new ArgumentException("The number of values must be equal for every variable");
+      } else if (variableNames.Distinct().Count() != variableNames.Count()) {
+        var duplicateVariableNames =
+          variableNames.GroupBy(v => v).Where(g => g.Count() > 1).Select(g => g.Key).ToList();
+        string message = "The dataset cannot contain duplicate variables names: " + Environment.NewLine;
+        foreach (var duplicateVariableName in duplicateVariableNames)
+          message += duplicateVariableName + Environment.NewLine;
+        throw new ArgumentException(message);
+      }
+
+      rows = variableValues.First().Count;
+      this.variableNames = new List<string>(variableNames);
+      this.variableValues = new Dictionary<string, IList>();
+      for (int i = 0; i < this.variableNames.Count; i++) {
+        var values = variableValues.ElementAt(i);
+        IList clonedValues = null;
+        if (values is List<double>)
+          clonedValues = new List<double>(values.Cast<double>());
+        else if (values is List<string>)
+          clonedValues = new List<string>(values.Cast<string>());
+        else if (values is List<DateTime>)
+          clonedValues = new List<DateTime>(values.Cast<DateTime>());
+        else {
+          this.variableNames = new List<string>();
+          this.variableValues = new Dictionary<string, IList>();
+          throw new ArgumentException("The variable values must be of type List<double>, List<string> or List<DateTime>");
+        }
+        this.variableValues.Add(this.variableNames[i], clonedValues);
+      }
+    }
+
+    public Dataset(IEnumerable<string> variableNames, double[,] variableValues) {
+      Name = "-";
+      if (variableNames.Count() != variableValues.GetLength(1)) {
+        throw new ArgumentException("Number of variable names doesn't match the number of columns of variableValues");
+      }
+      if (variableNames.Distinct().Count() != variableNames.Count()) {
+        var duplicateVariableNames = variableNames.GroupBy(v => v).Where(g => g.Count() > 1).Select(g => g.Key).ToList();
+        string message = "The dataset cannot contain duplicate variables names: " + Environment.NewLine;
+        foreach (var duplicateVariableName in duplicateVariableNames)
+          message += duplicateVariableName + Environment.NewLine;
+        throw new ArgumentException(message);
+      }
+
+      rows = variableValues.GetLength(0);
+      this.variableNames = new List<string>(variableNames);
+
+      this.variableValues = new Dictionary<string, IList>();
+      for (int col = 0; col < variableValues.GetLength(1); col++) {
+        string columName = this.variableNames[col];
+        var values = new List<double>();
+        for (int row = 0; row < variableValues.GetLength(0); row++) {
+          values.Add(variableValues[row, col]);
+        }
+        this.variableValues.Add(columName, values);
+      }
+    }
+
+    #region Backwards compatible code, remove with 3.5
+    private double[,] storableData;
+    //name alias used to suppport backwards compatibility
+    [Storable(Name = "data", AllowOneWay = true)]
+    private double[,] StorableData { set { storableData = value; } }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (variableValues == null) {
+        rows = storableData.GetLength(0);
+        variableValues = new Dictionary<string, IList>();
+        for (int col = 0; col < storableData.GetLength(1); col++) {
+          string columName = variableNames[col];
+          var values = new List<double>();
+          for (int row = 0; row < storableData.GetLength(0); row++) {
+            values.Add(storableData[row, col]);
+          }
+          variableValues.Add(columName, values);
+        }
+        storableData = null;
+      }
+    }
+    #endregion
+
+    [Storable(Name = "VariableValues")]
+    private Dictionary<string, IList> variableValues;
+
+    private List<string> variableNames;
     [Storable]
     public IEnumerable<string> VariableNames {
-      get {
-        // convert KeyCollection to an array first for persistence
-        return variableNameToVariableIndexMapping.Keys.ToArray();
-      }
+      get { return variableNames; }
       private set {
-        if (variableNameToVariableIndexMapping != null) throw new InvalidOperationException("VariableNames can only be set once.");
-        this.variableNameToVariableIndexMapping = new Dictionary<string, int>();
-        this.variableIndexToVariableNameMapping = new Dictionary<int, string>();
-        int i = 0;
-        foreach (string variableName in value) {
-          this.variableNameToVariableIndexMapping.Add(variableName, i);
-          this.variableIndexToVariableNameMapping.Add(i, variableName);
-          i++;
-        }
-      }
-    }
-
+        if (variableNames != null) throw new InvalidOperationException();
+        variableNames = new List<string>(value);
+      }
+    }
+
+    public IEnumerable<string> DoubleVariables {
+      get { return variableValues.Where(p => p.Value is List<double>).Select(p => p.Key); }
+    }
+
+    public IEnumerable<double> GetDoubleValues(string variableName) {
+      IList list;
+      if (!variableValues.TryGetValue(variableName, out list))
+        throw new ArgumentException("The variable " + variableName + " does not exist in the dataset.");
+      List<double> values = list as List<double>;
+      if (values == null) throw new ArgumentException("The variable " + variableName + " is not a double variable.");
+
+      //mkommend yield return used to enable lazy evaluation
+      foreach (double value in values)
+        yield return value;
+    }
+    public ReadOnlyCollection<double> GetReadOnlyDoubleValues(string variableName) {
+      IList list;
+      if (!variableValues.TryGetValue(variableName, out list))
+        throw new ArgumentException("The variable " + variableName + " does not exist in the dataset.");
+      List<double> values = list as List<double>;
+      if (values == null) throw new ArgumentException("The variable " + variableName + " is not a double variable.");
+      return values.AsReadOnly();
+    }
+    public double GetDoubleValue(string variableName, int row) {
+      IList list;
+      if (!variableValues.TryGetValue(variableName, out list))
+        throw new ArgumentException("The variable " + variableName + " does not exist in the dataset.");
+      List<double> values = list as List<double>;
+      if (values == null) throw new ArgumentException("The variable " + variableName + " is not a double variable.");
+      return values[row];
+    }
+    public IEnumerable<double> GetDoubleValues(string variableName, IEnumerable<int> rows) {
+      IList list;
+      if (!variableValues.TryGetValue(variableName, out list))
+        throw new ArgumentException("The variable " + variableName + " does not exist in the dataset.");
+      List<double> values = list as List<double>;
+      if (values == null) throw new ArgumentException("The varialbe " + variableName + " is not a double variable.");
+
+      foreach (int index in rows)
+        yield return values[index];
+    }
+
+    #region IStringConvertibleMatrix Members
     [Storable]
-    private double[,] data;
-    private double[,] Data {
-      get { return data; }
-    }
-
-    // elementwise access
-    public double this[int rowIndex, int columnIndex] {
-      get { return data[rowIndex, columnIndex]; }
-    }
-    public double this[string variableName, int rowIndex] {
-      get {
-        int columnIndex = GetVariableIndex(variableName);
-        return data[rowIndex, columnIndex];
-      }
-    }
-
-    public double[] GetVariableValues(int variableIndex) {
-      return GetVariableValues(variableIndex, 0, Rows);
-    }
-    public double[] GetVariableValues(string variableName) {
-      return GetVariableValues(GetVariableIndex(variableName), 0, Rows);
-    }
-    public double[] GetVariableValues(int variableIndex, int start, int end) {
-      return GetEnumeratedVariableValues(variableIndex, start, end).ToArray();
-    }
-    public double[] GetVariableValues(string variableName, int start, int end) {
-      return GetVariableValues(GetVariableIndex(variableName), start, end);
-    }
-
-    public IEnumerable<double> GetEnumeratedVariableValues(int variableIndex) {
-      return GetEnumeratedVariableValues(variableIndex, 0, Rows);
-    }
-    public IEnumerable<double> GetEnumeratedVariableValues(int variableIndex, int start, int end) {
-      if (start < 0 || !(start <= end))
-        throw new ArgumentException("Start must be between 0 and end (" + end + ").");
-      if (end > Rows || end < start)
-        throw new ArgumentException("End must be between start (" + start + ") and dataset rows (" + Rows + ").");
-
-      for (int i = start; i < end; i++)
-        yield return data[i, variableIndex];
-    }
-    public IEnumerable<double> GetEnumeratedVariableValues(int variableIndex, IEnumerable<int> rows) {
-      foreach (int row in rows)
-        yield return data[row, variableIndex];
-    }
-
-    public IEnumerable<double> GetEnumeratedVariableValues(string variableName) {
-      return GetEnumeratedVariableValues(GetVariableIndex(variableName), 0, Rows);
-    }
-    public IEnumerable<double> GetEnumeratedVariableValues(string variableName, int start, int end) {
-      return GetEnumeratedVariableValues(GetVariableIndex(variableName), start, end);
-    }
-    public IEnumerable<double> GetEnumeratedVariableValues(string variableName, IEnumerable<int> rows) {
-      return GetEnumeratedVariableValues(GetVariableIndex(variableName), rows);
-    }
-
-    public string GetVariableName(int variableIndex) {
-      try {
-        return variableIndexToVariableNameMapping[variableIndex];
-      }
-      catch (KeyNotFoundException ex) {
-        throw new ArgumentException("The variable index " + variableIndex + " was not found.", ex);
-      }
-    }
-    public int GetVariableIndex(string variableName) {
-      try {
-        return variableNameToVariableIndexMapping[variableName];
-      }
-      catch (KeyNotFoundException ex) {
-        throw new ArgumentException("The variable name " + variableName + " was not found.", ex);
-      }
-    }
-
-    #region IStringConvertibleMatrix Members
+    private int rows;
     public int Rows {
-      get { return data.GetLength(0); }
+      get { return rows; }
       set { throw new NotSupportedException(); }
     }
     public int Columns {
-      get { return data.GetLength(1); }
+      get { return variableNames.Count; }
       set { throw new NotSupportedException(); }
     }
@@ -184,5 +227,5 @@
 
     public string GetValue(int rowIndex, int columnIndex) {
-      return data[rowIndex, columnIndex].ToString();
+      return variableValues[variableNames[columnIndex]][rowIndex].ToString();
     }
     public bool SetValue(string value, int rowIndex, int columnIndex) {
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs	(revision 6784)
@@ -226,5 +226,5 @@
       get {
         if (classValues == null) {
-          classValues = Dataset.GetEnumeratedVariableValues(TargetVariableParameter.Value.Value).Distinct().ToList();
+          classValues = Dataset.GetDoubleValues(TargetVariableParameter.Value.Value).Distinct().ToList();
           classValues.Sort();
         }
@@ -291,6 +291,6 @@
     private static IEnumerable<string> CheckVariablesForPossibleTargetVariables(Dataset dataset) {
       int maxSamples = Math.Min(InspectedRowsToDetermineTargets, dataset.Rows);
-      var validTargetVariables = (from v in dataset.VariableNames
-                                  let distinctValues = dataset.GetEnumeratedVariableValues(v)
+      var validTargetVariables = (from v in dataset.DoubleVariables
+                                  let distinctValues = dataset.GetDoubleValues(v)
                                     .Take(maxSamples)
                                     .Distinct()
@@ -410,5 +410,5 @@
       dataset.Name = Path.GetFileName(fileName);
 
-      ClassificationProblemData problemData = new ClassificationProblemData(dataset, dataset.VariableNames.Skip(1), dataset.VariableNames.First());
+      ClassificationProblemData problemData = new ClassificationProblemData(dataset, dataset.DoubleVariables.Skip(1), dataset.DoubleVariables.First());
       problemData.Name = "Data imported from " + Path.GetFileName(fileName);
       return problemData;
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs	(revision 6784)
@@ -67,7 +67,7 @@
     protected void CalculateResults() {
       double[] estimatedTrainingClassValues = EstimatedTrainingClassValues.ToArray(); // cache values
-      double[] originalTrainingClassValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
+      double[] originalTrainingClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
       double[] estimatedTestClassValues = EstimatedTestClassValues.ToArray(); // cache values
-      double[] originalTestClassValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
+      double[] originalTestClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
 
       OnlineCalculatorError errorState;
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs	(revision 6784)
@@ -103,7 +103,7 @@
     protected void CalculateRegressionResults() {
       double[] estimatedTrainingValues = EstimatedTrainingValues.ToArray(); // cache values
-      double[] originalTrainingValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
+      double[] originalTrainingValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
       double[] estimatedTestValues = EstimatedTestValues.ToArray(); // cache values
-      double[] originalTestValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
+      double[] originalTestValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
 
       OnlineCalculatorError errorState;
@@ -132,5 +132,5 @@
       double[] classValues;
       double[] thresholds;
-      var targetClassValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
+      var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
       AccuracyMaximizationThresholdCalculator.CalculateThresholds(ProblemData, EstimatedTrainingValues, targetClassValues, out classValues, out thresholds);
 
@@ -141,5 +141,5 @@
       double[] classValues;
       double[] thresholds;
-      var targetClassValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
+      var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
       NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(ProblemData, EstimatedTrainingValues, targetClassValues, out classValues, out thresholds);
 
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs	(revision 6784)
@@ -20,12 +20,8 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -103,5 +99,5 @@
       dataset.Name = Path.GetFileName(fileName);
 
-      ClusteringProblemData problemData = new ClusteringProblemData(dataset, dataset.VariableNames);
+      ClusteringProblemData problemData = new ClusteringProblemData(dataset, dataset.DoubleVariables);
       problemData.Name = "Data imported from " + Path.GetFileName(fileName);
       return problemData;
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 6784)
@@ -116,8 +116,8 @@
       if (allowedInputVariables == null) throw new ArgumentNullException("The allowedInputVariables must not be null.");
 
-      if (allowedInputVariables.Except(dataset.VariableNames).Any())
-        throw new ArgumentException("All allowed input variables must be present in the dataset.");
+      if (allowedInputVariables.Except(dataset.DoubleVariables).Any())
+        throw new ArgumentException("All allowed input variables must be present in the dataset and of type double.");
 
-      var inputVariables = new CheckedItemList<StringValue>(dataset.VariableNames.Select(x => new StringValue(x)));
+      var inputVariables = new CheckedItemList<StringValue>(dataset.DoubleVariables.Select(x => new StringValue(x)));
       foreach (StringValue x in inputVariables)
         inputVariables.SetItemCheckedState(x, allowedInputVariables.Contains(x.Value));
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 6784)
@@ -144,5 +144,5 @@
       dataset.Name = Path.GetFileName(fileName);
 
-      RegressionProblemData problemData = new RegressionProblemData(dataset, dataset.VariableNames.Skip(1), dataset.VariableNames.First());
+      RegressionProblemData problemData = new RegressionProblemData(dataset, dataset.DoubleVariables.Skip(1), dataset.DoubleVariables.First());
       problemData.Name = "Data imported from " + Path.GetFileName(fileName);
       return problemData;
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs	(revision 6784)
@@ -127,5 +127,5 @@
         OnlineCalculatorError errorState;
         Add(new Result(TrainingMeanAbsoluteErrorResultName, "Mean of absolute errors of the model on the training partition", new DoubleValue()));
-        double trainingMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes), out errorState);
+        double trainingMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes), out errorState);
         TrainingMeanAbsoluteError = errorState == OnlineCalculatorError.None ? trainingMAE : double.NaN;
       }
@@ -134,5 +134,5 @@
         OnlineCalculatorError errorState;
         Add(new Result(TestMeanAbsoluteErrorResultName, "Mean of absolute errors of the model on the test partition", new DoubleValue()));
-        double testMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes), out errorState);
+        double testMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes), out errorState);
         TestMeanAbsoluteError = errorState == OnlineCalculatorError.None ? testMAE : double.NaN;
       }
@@ -142,7 +142,7 @@
     protected void CalculateResults() {
       double[] estimatedTrainingValues = EstimatedTrainingValues.ToArray(); // cache values
-      double[] originalTrainingValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
+      double[] originalTrainingValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();
       double[] estimatedTestValues = EstimatedTestValues.ToArray(); // cache values
-      double[] originalTestValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
+      double[] originalTestValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();
 
       OnlineCalculatorError errorState;
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/TableFileParser.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/TableFileParser.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/TableFileParser.cs	(revision 6784)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Globalization;
@@ -33,5 +34,5 @@
     private readonly char[] POSSIBLE_SEPARATORS = new char[] { ',', ';', '\t' };
     private Tokenizer tokenizer;
-    private List<List<double>> rowValues;
+    private List<List<object>> rowValues;
 
     private int rows;
@@ -47,6 +48,6 @@
     }
 
-    private double[,] values;
-    public double[,] Values {
+    private List<IList> values;
+    public List<IList> Values {
       get {
         return values;
@@ -69,5 +70,5 @@
 
     public TableFileParser() {
-      rowValues = new List<List<double>>();
+      rowValues = new List<List<object>>();
       variableNames = new List<string>();
     }
@@ -75,8 +76,9 @@
     public void Parse(string fileName) {
       NumberFormatInfo numberFormat;
+      DateTimeFormatInfo dateTimeFormatInfo;
       char separator;
-      DetermineFileFormat(fileName, out numberFormat, out separator);
+      DetermineFileFormat(fileName, out numberFormat, out dateTimeFormatInfo, out separator);
       using (StreamReader reader = new StreamReader(fileName)) {
-        tokenizer = new Tokenizer(reader, numberFormat, separator);
+        tokenizer = new Tokenizer(reader, numberFormat, dateTimeFormatInfo, separator);
         // parse the file
         Parse();
@@ -86,18 +88,41 @@
       rows = rowValues.Count;
       columns = rowValues[0].Count;
-      values = new double[rows, columns];
-
-      int rowIndex = 0;
-      int columnIndex = 0;
-      foreach (List<double> row in rowValues) {
-        columnIndex = 0;
-        foreach (double element in row) {
-          values[rowIndex, columnIndex++] = element;
-        }
-        rowIndex++;
-      }
-    }
-
-    private void DetermineFileFormat(string fileName, out NumberFormatInfo numberFormat, out char separator) {
+      values = new List<IList>();
+
+      //create columns
+      for (int col = 0; col < columns; col++) {
+        var types = rowValues.Select(r => r[col]).Where(v => v != null && v as string != string.Empty).Take(10).Select(v => v.GetType());
+        if (!types.Any()) {
+          values.Add(new List<string>());
+          continue;
+        }
+
+        var columnType = types.GroupBy(v => v).OrderBy(v => v.Count()).Last().Key;
+        if (columnType == typeof(double)) values.Add(new List<double>());
+        else if (columnType == typeof(DateTime)) values.Add(new List<DateTime>());
+        else if (columnType == typeof(string)) values.Add(new List<string>());
+        else throw new InvalidOperationException();
+      }
+
+
+
+      //fill with values
+      foreach (List<object> row in rowValues) {
+        int columnIndex = 0;
+        foreach (object element in row) {
+          if (values[columnIndex] is List<double> && !(element is double))
+            values[columnIndex].Add(double.NaN);
+          else if (values[columnIndex] is List<DateTime> && !(element is DateTime))
+            values[columnIndex].Add(DateTime.MinValue);
+          else if (values[columnIndex] is List<string> && !(element is string))
+            values[columnIndex].Add(string.Empty);
+          else
+            values[columnIndex].Add(element);
+          columnIndex++;
+        }
+      }
+    }
+
+    private void DetermineFileFormat(string fileName, out NumberFormatInfo numberFormat, out DateTimeFormatInfo dateTimeFormatInfo, out char separator) {
       using (StreamReader reader = new StreamReader(fileName)) {
         // skip first line
@@ -123,4 +148,5 @@
         if (OccurrencesOf(charCounts, '.') > 10) {
           numberFormat = NumberFormatInfo.InvariantInfo;
+          dateTimeFormatInfo = DateTimeFormatInfo.InvariantInfo;
           separator = POSSIBLE_SEPARATORS
             .Where(c => OccurrencesOf(charCounts, c) > 10)
@@ -139,4 +165,5 @@
             // English format (only integer values) with ',' as separator
             numberFormat = NumberFormatInfo.InvariantInfo;
+            dateTimeFormatInfo = DateTimeFormatInfo.InvariantInfo;
             separator = ',';
           } else {
@@ -144,4 +171,5 @@
             // German format (real values)
             numberFormat = NumberFormatInfo.GetInstance(new CultureInfo("de-DE"));
+            dateTimeFormatInfo = DateTimeFormatInfo.GetInstance(new CultureInfo("de-DE"));
             separator = POSSIBLE_SEPARATORS
               .Except(disallowedSeparators)
@@ -154,4 +182,5 @@
           // no points and no commas => English format
           numberFormat = NumberFormatInfo.InvariantInfo;
+          dateTimeFormatInfo = DateTimeFormatInfo.InvariantInfo;
           separator = POSSIBLE_SEPARATORS
             .Where(c => OccurrencesOf(charCounts, c) > 10)
@@ -169,5 +198,5 @@
     #region tokenizer
     internal enum TokenTypeEnum {
-      NewLine, Separator, String, Double
+      NewLine, Separator, String, Double, DateTime
     }
 
@@ -176,8 +205,10 @@
       public string stringValue;
       public double doubleValue;
+      public DateTime dateTimeValue;
 
       public Token(TokenTypeEnum type, string value) {
         this.type = type;
         stringValue = value;
+        dateTimeValue = DateTime.MinValue;
         doubleValue = 0.0;
       }
@@ -193,4 +224,5 @@
       private List<Token> tokens;
       private NumberFormatInfo numberFormatInfo;
+      private DateTimeFormatInfo dateTimeFormatInfo;
       private char separator;
       private const string INTERNAL_SEPARATOR = "#";
@@ -218,7 +250,8 @@
       }
 
-      public Tokenizer(StreamReader reader, NumberFormatInfo numberFormatInfo, char separator) {
+      public Tokenizer(StreamReader reader, NumberFormatInfo numberFormatInfo, DateTimeFormatInfo dateTimeFormatInfo, char separator) {
         this.reader = reader;
         this.numberFormatInfo = numberFormatInfo;
+        this.dateTimeFormatInfo = dateTimeFormatInfo;
         this.separator = separator;
         separatorToken = new Token(TokenTypeEnum.Separator, INTERNAL_SEPARATOR);
@@ -264,7 +297,10 @@
           token.type = TokenTypeEnum.Double;
           return token;
-        }
-
-        // couldn't parse the token as an int or float number so return a string token
+        } else if (DateTime.TryParse(strToken, dateTimeFormatInfo, DateTimeStyles.None, out token.dateTimeValue)) {
+          token.type = TokenTypeEnum.DateTime;
+          return token;
+        }
+
+        // couldn't parse the token as an int or float number  or datetime value so return a string token
         return token;
       }
@@ -299,31 +335,38 @@
     private void ParseValues() {
       while (tokenizer.HasNext()) {
-        List<double> row = new List<double>();
-        row.Add(NextValue(tokenizer));
-        while (tokenizer.HasNext() && tokenizer.Peek() == tokenizer.SeparatorToken) {
-          Expect(tokenizer.SeparatorToken);
-          row.Add(NextValue(tokenizer));
-        }
-        Expect(tokenizer.NewlineToken);
-        // all rows have to have the same number of values            
-        // the first row defines how many samples are needed
-        if (rowValues.Count > 0 && rowValues[0].Count != row.Count) {
-          Error("The first row of the dataset has " + rowValues[0].Count + " columns." +
-            "\nLine " + tokenizer.CurrentLineNumber + " has " + row.Count + " columns.", "", tokenizer.CurrentLineNumber);
-        }
-        // add the current row to the collection of rows and start a new row
-        rowValues.Add(row);
-        row = new List<double>();
-      }
-    }
-
-    private double NextValue(Tokenizer tokenizer) {
-      if (tokenizer.Peek() == tokenizer.SeparatorToken || tokenizer.Peek() == tokenizer.NewlineToken) return double.NaN;
+        if (tokenizer.Peek() == tokenizer.NewlineToken) {
+          tokenizer.Next();
+        } else {
+          List<object> row = new List<object>();
+          object value = NextValue(tokenizer);
+          row.Add(value);
+          while (tokenizer.HasNext() && tokenizer.Peek() == tokenizer.SeparatorToken) {
+            Expect(tokenizer.SeparatorToken);
+            row.Add(NextValue(tokenizer));
+          }
+          Expect(tokenizer.NewlineToken);
+          // all rows have to have the same number of values            
+          // the first row defines how many samples are needed
+          if (rowValues.Count > 0 && rowValues[0].Count != row.Count) {
+            Error("The first row of the dataset has " + rowValues[0].Count + " columns." +
+                  "\nLine " + tokenizer.CurrentLineNumber + " has " + row.Count + " columns.", "",
+                  tokenizer.CurrentLineNumber);
+          }
+          rowValues.Add(row);
+        }
+      }
+    }
+
+    private object NextValue(Tokenizer tokenizer) {
+      if (tokenizer.Peek() == tokenizer.SeparatorToken || tokenizer.Peek() == tokenizer.NewlineToken) return string.Empty;
       Token current = tokenizer.Next();
-      if (current.type == TokenTypeEnum.Separator || current.type == TokenTypeEnum.String) {
+      if (current.type == TokenTypeEnum.Separator) {
         return double.NaN;
+      } else if (current.type == TokenTypeEnum.String) {
+        return current.stringValue;
       } else if (current.type == TokenTypeEnum.Double) {
-        // just take the value
         return current.doubleValue;
+      } else if (current.type == TokenTypeEnum.DateTime) {
+        return current.dateTimeValue;
       }
       // found an unexpected token => throw error 
@@ -334,24 +377,23 @@
 
     private void ParseVariableNames() {
-      // if the first line doesn't start with a double value then we assume that the
-      // first line contains variable names
-      if (tokenizer.HasNext() && tokenizer.Peek().type != TokenTypeEnum.Double) {
-
-        List<Token> tokens = new List<Token>();
-        Token valueToken;
+      //if first token is double no variables names are given
+      if (tokenizer.Peek().type == TokenTypeEnum.Double) return;
+
+      // the first line must contain variable names
+      List<Token> tokens = new List<Token>();
+      Token valueToken;
+      valueToken = tokenizer.Next();
+      tokens.Add(valueToken);
+      while (tokenizer.HasNext() && tokenizer.Peek() == tokenizer.SeparatorToken) {
+        Expect(tokenizer.SeparatorToken);
         valueToken = tokenizer.Next();
-        tokens.Add(valueToken);
-        while (tokenizer.HasNext() && tokenizer.Peek() == tokenizer.SeparatorToken) {
-          Expect(tokenizer.SeparatorToken);
-          valueToken = tokenizer.Next();
-          if (valueToken != tokenizer.NewlineToken) {
-            tokens.Add(valueToken);
-          }
-        }
         if (valueToken != tokenizer.NewlineToken) {
-          Expect(tokenizer.NewlineToken);
-        }
-        variableNames = tokens.Select(x => x.stringValue.Trim()).ToList();
-      }
+          tokens.Add(valueToken);
+        }
+      }
+      if (valueToken != tokenizer.NewlineToken) {
+        Expect(tokenizer.NewlineToken);
+      }
+      variableNames = tokens.Select(x => x.stringValue.Trim()).ToList();
     }
 
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Tests/OnlineCalculatorPerformanceTest.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Tests/OnlineCalculatorPerformanceTest.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Tests/OnlineCalculatorPerformanceTest.cs	(revision 6784)
@@ -80,5 +80,5 @@
       watch.Start();
       for (int i = 0; i < Repetitions; i++) {
-        double value = calculateFunc(dataset.GetEnumeratedVariableValues(0), dataset.GetEnumeratedVariableValues(1), out errorState);
+        double value = calculateFunc(dataset.GetDoubleValues("y"), dataset.GetDoubleValues("x0"), out errorState);
       }
       Assert.AreEqual(errorState, OnlineCalculatorError.None);
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Tests/StatisticCalculatorsTest.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Tests/StatisticCalculatorsTest.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Tests/StatisticCalculatorsTest.cs	(revision 6784)
@@ -20,5 +20,4 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -124,5 +123,5 @@
         IEnumerable<double> x = from rows in Enumerable.Range(0, n)
                                 select testData[rows, c1] * c1Scale;
-        IEnumerable<double> y = (new List<double>() { 150494407424305.44 })
+        IEnumerable<double> y = (new List<double>() { 150494407424305.47 })
           .Concat(Enumerable.Repeat(150494407424305.47, n - 1));
         double[] xs = x.ToArray();
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Tests/TableFileParserTest.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Tests/TableFileParserTest.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis/3.4/Tests/TableFileParserTest.cs	(revision 6784)
@@ -21,9 +21,7 @@
 
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
 using System.IO;
 using HeuristicLab.Problems.DataAnalysis;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
 namespace HeuristicLab.Problems.DataAnalysis_3_4.Tests {
 
@@ -46,5 +44,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual(parser.Values[3][0], 3.14);
       }
       finally {
@@ -68,5 +66,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual(parser.Values[3][0], 3.14);
       }
       finally {
@@ -90,5 +88,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual(parser.Values[3][0], 3.14);
       }
       finally {
@@ -113,5 +111,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual(parser.Values[3][0], 3.14);
       }
       finally {
@@ -135,5 +133,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
@@ -157,5 +155,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
@@ -179,5 +177,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
@@ -202,5 +200,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
@@ -225,5 +223,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -248,5 +246,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -270,5 +268,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -292,5 +290,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -314,5 +312,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
@@ -336,5 +334,27 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+    [TestMethod]
+    public void ParseWithEmtpyLines() {
+      string tempFileName = Path.GetTempFileName();
+      WriteToFile(tempFileName,
+"x01\t x02\t x03\t x04" + Environment.NewLine +
+"0\t 0\t 0\t 3" + Environment.NewLine +
+ Environment.NewLine +
+"0\t 0\t 0\t 0" + Environment.NewLine +
+" " + Environment.NewLine +
+"0\t 0\t 0\t 0" + Environment.NewLine +
+"0\t 0\t 0\t 0" + Environment.NewLine + Environment.NewLine);
+      TableFileParser parser = new TableFileParser();
+      try {
+        parser.Parse(tempFileName);
+        Assert.AreEqual(4, parser.Rows);
+        Assert.AreEqual(4, parser.Columns);
       }
       finally {
@@ -358,5 +378,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -380,5 +400,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -402,5 +422,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -424,5 +444,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3.14);
+        Assert.AreEqual((double)parser.Values[3][0], 3.14);
       }
       finally {
@@ -446,5 +466,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
@@ -468,5 +488,5 @@
         Assert.AreEqual(6, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-        Assert.AreEqual(parser.Values[0, 3], 3);
+        Assert.AreEqual((double)parser.Values[3][0], 3);
       }
       finally {
Index: /branches/GP.Grammar.Editor/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/PrinsEncoding.cs
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/PrinsEncoding.cs	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/PrinsEncoding.cs	(revision 6784)
@@ -86,5 +86,5 @@
       V[0] = 0;
       for (int i = 1; i <= cities; i++) {
-        V[i] = int.MaxValue;
+        V[i] = double.MaxValue;
       }
 
Index: /branches/GP.Grammar.Editor/HeuristicLab/3.3/Files.txt
===================================================================
--- /branches/GP.Grammar.Editor/HeuristicLab/3.3/Files.txt	(revision 6783)
+++ /branches/GP.Grammar.Editor/HeuristicLab/3.3/Files.txt	(revision 6784)
@@ -127,2 +127,6 @@
 HeuristicLab.ExtLibs\HeuristicLab.WinFormsUI\2.3.1\HeuristicLab.WinFormsUI-2.3.1:HeuristicLab.WinFormsUI-2.3.1.dll
 HeuristicLab.ExtLibs\HeuristicLab.WinFormsUI\2.3.1\HeuristicLab.WinFormsUI-2.3.1:WeifenLuo.WinFormsUI.Docking License.txt
+
+HeuristicLab.ExtLibs\HeuristicLab.DayView\1.0:HeuristicLab.DayView-1.0.dll
+HeuristicLab.ExtLibs\HeuristicLab.DayView\1.0:Calendar.DayView.dll
+HeuristicLab.ExtLibs\HeuristicLab.DayView\1.0:DayView License.txt
