Index: /branches/HLScript/HeuristicLab 3.3.sln
===================================================================
--- /branches/HLScript/HeuristicLab 3.3.sln	(revision 10357)
+++ /branches/HLScript/HeuristicLab 3.3.sln	(revision 10358)
@@ -112,6 +112,8 @@
 		{AB687BBE-1BFE-476B-906D-44237135431D} = {AB687BBE-1BFE-476B-906D-44237135431D}
 		{66D249C3-A01D-42A8-82A2-919BC8EC3D83} = {66D249C3-A01D-42A8-82A2-919BC8EC3D83}
+		{21977CC3-1757-4B3B-87BD-FF817AAA900F} = {21977CC3-1757-4B3B-87BD-FF817AAA900F}
 		{E4CFB0C3-0589-4893-B38E-8BEDF885C765} = {E4CFB0C3-0589-4893-B38E-8BEDF885C765}
 		{E6CB1FC5-78EC-4EB8-BF12-35303C36F962} = {E6CB1FC5-78EC-4EB8-BF12-35303C36F962}
+		{0C2917C8-7AA8-4E18-800A-C4D064F992ED} = {0C2917C8-7AA8-4E18-800A-C4D064F992ED}
 		{79271BC8-4446-40E2-BB89-9BE4E17174FE} = {79271BC8-4446-40E2-BB89-9BE4E17174FE}
 		{7A2531CE-3F7C-4F13-BCCA-ED6DC27A7086} = {7A2531CE-3F7C-4F13-BCCA-ED6DC27A7086}
@@ -1862,26 +1864,18 @@
 		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Debug|x64.ActiveCfg = Debug|x64
-		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Debug|x64.Build.0 = Debug|x64
-		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Debug|x86.ActiveCfg = Debug|x86
-		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Debug|x86.Build.0 = Debug|x86
+		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Release|Any CPU.Build.0 = Release|Any CPU
-		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Release|x64.ActiveCfg = Release|x64
-		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Release|x64.Build.0 = Release|x64
-		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Release|x86.ActiveCfg = Release|x86
-		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Release|x86.Build.0 = Release|x86
+		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Release|x64.ActiveCfg = Release|Any CPU
+		{21977CC3-1757-4B3B-87BD-FF817AAA900F}.Release|x86.ActiveCfg = Release|Any CPU
 		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Debug|x64.ActiveCfg = Debug|x64
-		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Debug|x64.Build.0 = Debug|x64
-		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Debug|x86.ActiveCfg = Debug|x86
-		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Debug|x86.Build.0 = Debug|x86
+		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Release|Any CPU.Build.0 = Release|Any CPU
-		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Release|x64.ActiveCfg = Release|x64
-		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Release|x64.Build.0 = Release|x64
-		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Release|x86.ActiveCfg = Release|x86
-		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Release|x86.Build.0 = Release|x86
+		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Release|x64.ActiveCfg = Release|Any CPU
+		{0C2917C8-7AA8-4E18-800A-C4D064F992ED}.Release|x86.ActiveCfg = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: /branches/HLScript/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SuccessfulOffspringAnalysis/SuccessfulOffspringAnalyzer.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SuccessfulOffspringAnalysis/SuccessfulOffspringAnalyzer.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SuccessfulOffspringAnalysis/SuccessfulOffspringAnalyzer.cs	(revision 10358)
@@ -81,4 +81,7 @@
       Parameters.Add(new LookupParameter<ResultCollection>("SuccessfulOffspringAnalysis", "The successful offspring analysis which is created."));
       Parameters.Add(new ValueParameter<IntValue>("Depth", "The depth of the individuals in the scope tree.", new IntValue(1)));
+
+      CollectedValuesParameter.Value.Add(new StringValue("SelectedCrossoverOperator"));
+      CollectedValuesParameter.Value.Add(new StringValue("SelectedManipulationOperator"));
     }
 
@@ -110,57 +113,59 @@
         }
 
-        //create a data table containing the collected values
-        ResultCollection successfulOffspringAnalysis;
+        if (counts.Count > 0) {
+          //create a data table containing the collected values
+          ResultCollection successfulOffspringAnalysis;
 
-        if (SuccessfulOffspringAnalysisParameter.ActualValue == null) {
-          successfulOffspringAnalysis = new ResultCollection();
-          SuccessfulOffspringAnalysisParameter.ActualValue = successfulOffspringAnalysis;
-        } else {
-          successfulOffspringAnalysis = SuccessfulOffspringAnalysisParameter.ActualValue;
-        }
-
-        string resultKey = "SuccessfulOffspringAnalyzer Results";
-        if (!results.ContainsKey(resultKey)) {
-          results.Add(new Result(resultKey, successfulOffspringAnalysis));
-        } else {
-          results[resultKey].Value = successfulOffspringAnalysis;
-        }
-
-        DataTable successProgressAnalysis;
-        if (!successfulOffspringAnalysis.ContainsKey(collected.Value)) {
-          successProgressAnalysis = new DataTable();
-          successProgressAnalysis.Name = collected.Value;
-          successfulOffspringAnalysis.Add(new Result(collected.Value, successProgressAnalysis));
-        } else {
-          successProgressAnalysis = successfulOffspringAnalysis[collected.Value].Value as DataTable;
-        }
-
-        int successfulCount = 0;
-        foreach (string key in counts.Keys) {
-          successfulCount += counts[key];
-        }
-
-        foreach (String value in counts.Keys) {
-          DataRow row;
-          if (!successProgressAnalysis.Rows.ContainsKey(value)) {
-            row = new DataRow(value);
-            int iterations = GenerationsParameter.ActualValue.Value;
-
-            //fill up all values seen the first time
-            for (int i = 1; i < iterations; i++)
-              row.Values.Add(0);
-
-            successProgressAnalysis.Rows.Add(row);
+          if (SuccessfulOffspringAnalysisParameter.ActualValue == null) {
+            successfulOffspringAnalysis = new ResultCollection();
+            SuccessfulOffspringAnalysisParameter.ActualValue = successfulOffspringAnalysis;
           } else {
-            row = successProgressAnalysis.Rows[value];
+            successfulOffspringAnalysis = SuccessfulOffspringAnalysisParameter.ActualValue;
           }
 
-          row.Values.Add(counts[value] / (double)successfulCount);
-        }
+          string resultKey = "SuccessfulOffspringAnalyzer Results";
+          if (!results.ContainsKey(resultKey)) {
+            results.Add(new Result(resultKey, successfulOffspringAnalysis));
+          } else {
+            results[resultKey].Value = successfulOffspringAnalysis;
+          }
 
-        //fill up all values that are not present in the current generation
-        foreach (DataRow row in successProgressAnalysis.Rows) {
-          if (!counts.ContainsKey(row.Name))
-            row.Values.Add(0);
+          DataTable successProgressAnalysis;
+          if (!successfulOffspringAnalysis.ContainsKey(collected.Value)) {
+            successProgressAnalysis = new DataTable();
+            successProgressAnalysis.Name = collected.Value;
+            successfulOffspringAnalysis.Add(new Result(collected.Value, successProgressAnalysis));
+          } else {
+            successProgressAnalysis = successfulOffspringAnalysis[collected.Value].Value as DataTable;
+          }
+
+          int successfulCount = 0;
+          foreach (string key in counts.Keys) {
+            successfulCount += counts[key];
+          }
+
+          foreach (String value in counts.Keys) {
+            DataRow row;
+            if (!successProgressAnalysis.Rows.ContainsKey(value)) {
+              row = new DataRow(value);
+              int iterations = GenerationsParameter.ActualValue.Value;
+
+              //fill up all values seen the first time
+              for (int i = 1; i < iterations; i++)
+                row.Values.Add(0);
+
+              successProgressAnalysis.Rows.Add(row);
+            } else {
+              row = successProgressAnalysis.Rows[value];
+            }
+
+            row.Values.Add(counts[value] / (double)successfulCount);
+          }
+
+          //fill up all values that are not present in the current generation
+          foreach (DataRow row in successProgressAnalysis.Rows) {
+            if (!counts.ContainsKey(row.Name))
+              row.Values.Add(0);
+          }
         }
       }
Index: /branches/HLScript/HeuristicLab.CodeEditor/3.3/CodeEditor.cs
===================================================================
--- /branches/HLScript/HeuristicLab.CodeEditor/3.3/CodeEditor.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.CodeEditor/3.3/CodeEditor.cs	(revision 10358)
@@ -306,19 +306,19 @@
     public void AddAssembly(Assembly a) {
       ShowMessage("Loading " + a.GetName().Name + "...");
-      if (assemblies.Contains(a))
-        return;
-      var reference = projectContentRegistry.GetProjectContentForReference(a.GetName().Name, a.Location);
-      projectContent.AddReferencedContent(reference);
-      assemblies.Add(a);
+      if (!assemblies.Contains(a)) {
+        var reference = projectContentRegistry.GetProjectContentForReference(a.GetName().Name, a.Location);
+        projectContent.AddReferencedContent(reference);
+        assemblies.Add(a);
+      }
       ShowMessage("Ready");
     }
     public void RemoveAssembly(Assembly a) {
       ShowMessage("Unloading " + a.GetName().Name + "...");
-      if (!assemblies.Contains(a))
-        return;
-      var content = projectContentRegistry.GetExistingProjectContent(a.Location);
-      if (content != null) {
-        projectContent.ReferencedContents.Remove(content);
-        projectContentRegistry.UnloadProjectContent(content);
+      if (assemblies.Contains(a)) {
+        var content = projectContentRegistry.GetExistingProjectContent(a.Location);
+        if (content != null) {
+          projectContent.ReferencedContents.Remove(content);
+          projectContentRegistry.UnloadProjectContent(content);
+        }
       }
       ShowMessage("Ready");
Index: /branches/HLScript/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/MultiBinaryVectorCrossover.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/MultiBinaryVectorCrossover.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/MultiBinaryVectorCrossover.cs	(revision 10358)
@@ -64,4 +64,6 @@
           Operators.Add((IBinaryVectorCrossover)Activator.CreateInstance(type), true);
       }
+
+      SelectedOperatorParameter.ActualName = "SelectedCrossoverOperator";
     }
 
Index: /branches/HLScript/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/MultiIntegerVectorCrossover.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/MultiIntegerVectorCrossover.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/MultiIntegerVectorCrossover.cs	(revision 10358)
@@ -70,4 +70,6 @@
           Operators.Add((IIntegerVectorCrossover)Activator.CreateInstance(type), true);
       }
+
+      SelectedOperatorParameter.ActualName = "SelectedCrossoverOperator";
     }
 
Index: /branches/HLScript/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/MultiPermutationCrossover.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/MultiPermutationCrossover.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/MultiPermutationCrossover.cs	(revision 10358)
@@ -64,4 +64,6 @@
           Operators.Add((IPermutationCrossover)Activator.CreateInstance(type), true);
       }
+
+      SelectedOperatorParameter.ActualName = "SelectedCrossoverOperator";
     }
 
Index: /branches/HLScript/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/MultiPermutationManipulator.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/MultiPermutationManipulator.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/MultiPermutationManipulator.cs	(revision 10358)
@@ -57,4 +57,6 @@
           Operators.Add((IPermutationManipulator)Activator.CreateInstance(type), true);
       }
+
+      SelectedOperatorParameter.ActualName = "SelectedManipulationOperator";
     }
 
Index: /branches/HLScript/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/MultiRealVectorCrossover.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/MultiRealVectorCrossover.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/MultiRealVectorCrossover.cs	(revision 10358)
@@ -70,4 +70,6 @@
           Operators.Add((IRealVectorCrossover)Activator.CreateInstance(type), true);
       }
+
+      SelectedOperatorParameter.ActualName = "SelectedCrossoverOperator";
     }
 
Index: /branches/HLScript/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/MultiRealVectorManipulator.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/MultiRealVectorManipulator.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/MultiRealVectorManipulator.cs	(revision 10358)
@@ -62,4 +62,6 @@
       Operators.Add(new PolynomialOnePositionManipulator());
       Operators.Add(new UniformOnePositionManipulator());
+
+      SelectedOperatorParameter.ActualName = "SelectedManipulationOperator";
     }
 
Index: /branches/HLScript/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs	(revision 10358)
@@ -106,4 +106,6 @@
       Operators = checkedItemList.AsReadOnly();
       Operators_ItemsAdded(this, new CollectionItemsChangedEventArgs<IndexedItem<ISymbolicExpressionTreeManipulator>>(Operators.CheckedItems));
+
+      SelectedOperatorParameter.ActualName = "SelectedManipulationOperator";
     }
 
Index: /branches/HLScript/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs	(revision 10358)
@@ -83,4 +83,6 @@
       Operators = checkedItemList.AsReadOnly();
       Operators_ItemsAdded(this, new CollectionItemsChangedEventArgs<IndexedItem<ISymbolicExpressionTreeManipulator>>(Operators.CheckedItems));
+
+      SelectedOperatorParameter.ActualName = "SelectedManipulationOperator";
     }
 
Index: /branches/HLScript/HeuristicLab.HLScript.Views/3.3/HLScriptView.Designer.cs
===================================================================
--- /branches/HLScript/HeuristicLab.HLScript.Views/3.3/HLScriptView.Designer.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.HLScript.Views/3.3/HLScriptView.Designer.cs	(revision 10358)
@@ -45,9 +45,7 @@
     /// </summary>
     private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
       this.compilationLabel = new System.Windows.Forms.Label();
       this.showCodeButton = new System.Windows.Forms.Button();
       this.startStopButton = new System.Windows.Forms.Button();
-      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
       this.errorListView = new System.Windows.Forms.ListView();
       this.categoryColumnHeader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@@ -63,6 +61,7 @@
       this.outputTabPage = new System.Windows.Forms.TabPage();
       this.outputTextBox = new System.Windows.Forms.TextBox();
+      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
       this.variableStoreView = new HeuristicLab.HLScript.Views.VariableStoreView();
-      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
       this.splitContainer1.Panel1.SuspendLayout();
@@ -78,9 +77,20 @@
       this.SuspendLayout();
       // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      this.nameTextBox.Location = new System.Drawing.Point(60, 0);
+      this.nameTextBox.Size = new System.Drawing.Size(750, 20);
+      // 
+      // infoLabel
+      // 
+      this.infoLabel.Location = new System.Drawing.Point(816, 4);
+      // 
       // compilationLabel
       // 
       this.compilationLabel.AutoSize = true;
       this.compilationLabel.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
-      this.compilationLabel.Location = new System.Drawing.Point(63, 9);
+      this.compilationLabel.Location = new System.Drawing.Point(63, 32);
       this.compilationLabel.Name = "compilationLabel";
       this.compilationLabel.Size = new System.Drawing.Size(69, 13);
@@ -91,5 +101,5 @@
       // 
       this.showCodeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PrintPreview;
-      this.showCodeButton.Location = new System.Drawing.Point(33, 3);
+      this.showCodeButton.Location = new System.Drawing.Point(33, 26);
       this.showCodeButton.Name = "showCodeButton";
       this.showCodeButton.Size = new System.Drawing.Size(24, 24);
@@ -103,5 +113,5 @@
       // 
       this.startStopButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Play;
-      this.startStopButton.Location = new System.Drawing.Point(3, 3);
+      this.startStopButton.Location = new System.Drawing.Point(3, 26);
       this.startStopButton.Name = "startStopButton";
       this.startStopButton.Size = new System.Drawing.Size(24, 24);
@@ -126,5 +136,5 @@
       this.errorListView.Location = new System.Drawing.Point(3, 3);
       this.errorListView.Name = "errorListView";
-      this.errorListView.Size = new System.Drawing.Size(623, 83);
+      this.errorListView.Size = new System.Drawing.Size(623, 79);
       this.errorListView.TabIndex = 0;
       this.errorListView.UseCompatibleStateImageBehavior = false;
@@ -161,5 +171,5 @@
       this.codeEditor.Name = "codeEditor";
       this.codeEditor.Prefix = "";
-      this.codeEditor.Size = new System.Drawing.Size(637, 447);
+      this.codeEditor.Size = new System.Drawing.Size(637, 428);
       this.codeEditor.Suffix = "";
       this.codeEditor.TabIndex = 0;
@@ -169,8 +179,8 @@
       // splitContainer1
       // 
-      this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-            | System.Windows.Forms.AnchorStyles.Left)
+      this.splitContainer1.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.splitContainer1.Location = new System.Drawing.Point(3, 33);
+      this.splitContainer1.Location = new System.Drawing.Point(3, 56);
       this.splitContainer1.Name = "splitContainer1";
       // 
@@ -183,5 +193,5 @@
       this.splitContainer1.Panel2.Controls.Add(this.variableStoreView);
       this.splitContainer1.Panel2.Controls.Add(this.viewHost);
-      this.splitContainer1.Size = new System.Drawing.Size(829, 566);
+      this.splitContainer1.Size = new System.Drawing.Size(829, 543);
       this.splitContainer1.SplitterDistance = 637;
       this.splitContainer1.TabIndex = 7;
@@ -201,6 +211,6 @@
       // 
       this.splitContainer2.Panel2.Controls.Add(this.tabControl1);
-      this.splitContainer2.Size = new System.Drawing.Size(637, 566);
-      this.splitContainer2.SplitterDistance = 447;
+      this.splitContainer2.Size = new System.Drawing.Size(637, 543);
+      this.splitContainer2.SplitterDistance = 428;
       this.splitContainer2.TabIndex = 5;
       // 
@@ -213,5 +223,5 @@
       this.tabControl1.Name = "tabControl1";
       this.tabControl1.SelectedIndex = 0;
-      this.tabControl1.Size = new System.Drawing.Size(637, 115);
+      this.tabControl1.Size = new System.Drawing.Size(637, 111);
       this.tabControl1.TabIndex = 1;
       // 
@@ -222,5 +232,5 @@
       this.errorListTabPage.Name = "errorListTabPage";
       this.errorListTabPage.Padding = new System.Windows.Forms.Padding(3);
-      this.errorListTabPage.Size = new System.Drawing.Size(629, 89);
+      this.errorListTabPage.Size = new System.Drawing.Size(629, 85);
       this.errorListTabPage.TabIndex = 0;
       this.errorListTabPage.Text = "Error List";
@@ -233,5 +243,5 @@
       this.outputTabPage.Name = "outputTabPage";
       this.outputTabPage.Padding = new System.Windows.Forms.Padding(3);
-      this.outputTabPage.Size = new System.Drawing.Size(629, 89);
+      this.outputTabPage.Size = new System.Drawing.Size(629, 85);
       this.outputTabPage.TabIndex = 1;
       this.outputTabPage.Text = "Output";
@@ -247,18 +257,7 @@
       this.outputTextBox.ReadOnly = true;
       this.outputTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
-      this.outputTextBox.Size = new System.Drawing.Size(623, 83);
+      this.outputTextBox.Size = new System.Drawing.Size(623, 79);
       this.outputTextBox.TabIndex = 0;
       this.outputTextBox.WordWrap = false;
-      // 
-      // variableStoreView
-      // 
-      this.variableStoreView.Caption = "ItemCollection View";
-      this.variableStoreView.Content = null;
-      this.variableStoreView.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.variableStoreView.Location = new System.Drawing.Point(0, 0);
-      this.variableStoreView.Name = "variableStoreView";
-      this.variableStoreView.ReadOnly = false;
-      this.variableStoreView.Size = new System.Drawing.Size(188, 566);
-      this.variableStoreView.TabIndex = 0;
       // 
       // viewHost
@@ -271,8 +270,19 @@
       this.viewHost.Name = "viewHost";
       this.viewHost.ReadOnly = false;
-      this.viewHost.Size = new System.Drawing.Size(188, 566);
+      this.viewHost.Size = new System.Drawing.Size(188, 543);
       this.viewHost.TabIndex = 0;
       this.viewHost.ViewsLabelVisible = true;
       this.viewHost.ViewType = null;
+      // 
+      // variableStoreView
+      // 
+      this.variableStoreView.Caption = "ItemCollection View";
+      this.variableStoreView.Content = null;
+      this.variableStoreView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.variableStoreView.Location = new System.Drawing.Point(0, 0);
+      this.variableStoreView.Name = "variableStoreView";
+      this.variableStoreView.ReadOnly = false;
+      this.variableStoreView.Size = new System.Drawing.Size(188, 543);
+      this.variableStoreView.TabIndex = 0;
       // 
       // HLScriptView
@@ -285,4 +295,12 @@
       this.Name = "HLScriptView";
       this.Size = new System.Drawing.Size(835, 602);
+      this.Controls.SetChildIndex(this.showCodeButton, 0);
+      this.Controls.SetChildIndex(this.compilationLabel, 0);
+      this.Controls.SetChildIndex(this.startStopButton, 0);
+      this.Controls.SetChildIndex(this.splitContainer1, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
       this.splitContainer1.Panel1.ResumeLayout(false);
       this.splitContainer1.Panel2.ResumeLayout(false);
@@ -307,5 +325,4 @@
     private System.Windows.Forms.Label compilationLabel;
     private System.Windows.Forms.Button startStopButton;
-    private System.Windows.Forms.ToolTip toolTip;
     private System.Windows.Forms.ListView errorListView;
     private System.Windows.Forms.ColumnHeader descriptionColumnHeader;
Index: /branches/HLScript/HeuristicLab.HLScript.Views/3.3/HLScriptView.cs
===================================================================
--- /branches/HLScript/HeuristicLab.HLScript.Views/3.3/HLScriptView.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.HLScript.Views/3.3/HLScriptView.cs	(revision 10358)
@@ -36,5 +36,5 @@
   [View("HLScript View")]
   [Content(typeof(HLScript), true)]
-  public partial class HLScriptView : ItemView {
+  public partial class HLScriptView : NamedItemView {
     private bool running;
 
@@ -69,9 +69,9 @@
     }
     private void Content_ScriptExecutionStarted(object sender, EventArgs e) {
-      ReadOnly = true;
+      Locked = true;
       startStopButton.Image = VSImageLibrary.Stop;
     }
     private void Content_ScriptExecutionFinished(object sender, EventArgs e) {
-      ReadOnly = false;
+      Locked = false;
       startStopButton.Image = VSImageLibrary.Play;
       running = false;
@@ -92,4 +92,6 @@
       } else {
         codeEditor.UserCode = Content.Code;
+        foreach (var asm in Content.GetAssemblies())
+          codeEditor.AddAssembly(asm);
         variableStoreView.Content = Content.VariableStore;
         if (Content.CompileErrors == null) {
@@ -108,7 +110,7 @@
     protected override void SetEnabledStateOfControls() {
       base.SetEnabledStateOfControls();
-      startStopButton.Enabled = Content != null;
+      startStopButton.Enabled = Content != null && !Locked;
       showCodeButton.Enabled = Content != null && !string.IsNullOrEmpty(Content.CompilationUnitCode);
-      codeEditor.Enabled = Content != null && !ReadOnly;
+      codeEditor.Enabled = Content != null && !Locked && !ReadOnly;
     }
 
@@ -137,5 +139,5 @@
     protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
       if (keyData == Keys.F5) {
-        if (Content == null || ReadOnly)
+        if (Content == null || Locked)
           return base.ProcessCmdKey(ref msg, keyData);
         outputTextBox.Clear();
@@ -144,4 +146,5 @@
           outputTextBox.Clear();
           Content.Execute();
+          running = true;
         }
         return true;
@@ -156,4 +159,5 @@
     private bool Compile() {
       ReadOnly = true;
+      Locked = true;
       errorListView.Items.Clear();
       outputTextBox.Clear();
@@ -170,4 +174,5 @@
         OnContentChanged();
         ReadOnly = false;
+        Locked = false;
       }
     }
Index: /branches/HLScript/HeuristicLab.HLScript.Views/3.3/HeuristicLab.HLScript.Views-3.3.csproj
===================================================================
--- /branches/HLScript/HeuristicLab.HLScript.Views/3.3/HeuristicLab.HLScript.Views-3.3.csproj	(revision 10357)
+++ /branches/HLScript/HeuristicLab.HLScript.Views/3.3/HeuristicLab.HLScript.Views-3.3.csproj	(revision 10358)
@@ -115,4 +115,9 @@
       <Private>False</Private>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
       <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project>
Index: /branches/HLScript/HeuristicLab.HLScript.Views/3.3/Plugin.cs.frame
===================================================================
--- /branches/HLScript/HeuristicLab.HLScript.Views/3.3/Plugin.cs.frame	(revision 10357)
+++ /branches/HLScript/HeuristicLab.HLScript.Views/3.3/Plugin.cs.frame	(revision 10358)
@@ -34,4 +34,5 @@
   [PluginDependency("HeuristicLab.MainForm", "3.3")]
   [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
   public class HeuristicLabHLScriptViewsPlugin : PluginBase {
   }
Index: /branches/HLScript/HeuristicLab.HLScript.Views/3.3/VariableStoreView.Designer.cs
===================================================================
--- /branches/HLScript/HeuristicLab.HLScript.Views/3.3/VariableStoreView.Designer.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.HLScript.Views/3.3/VariableStoreView.Designer.cs	(revision 10358)
@@ -61,4 +61,5 @@
             this.valueColumnHeader,
             this.typeColumnHeader});
+      this.variableListView.FullRowSelect = true;
       this.variableListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
       this.variableListView.HideSelection = false;
Index: /branches/HLScript/HeuristicLab.HLScript.Views/3.3/VariableStoreView.cs
===================================================================
--- /branches/HLScript/HeuristicLab.HLScript.Views/3.3/VariableStoreView.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.HLScript.Views/3.3/VariableStoreView.cs	(revision 10358)
@@ -23,4 +23,5 @@
 using System.Collections;
 using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
 using System.Windows.Forms;
@@ -31,4 +32,6 @@
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.Persistence.Core;
+using HeuristicLab.Persistence.Default.Xml;
 using HeuristicLab.PluginInfrastructure;
 
@@ -53,4 +56,9 @@
       InitializeComponent();
       itemListViewItemMapping = new Dictionary<string, ListViewItem>();
+      variableListView.SmallImageList.Images.AddRange(new Image[] {
+        HeuristicLab.Common.Resources.VSImageLibrary.Error,
+        HeuristicLab.Common.Resources.VSImageLibrary.Object,
+        HeuristicLab.Common.Resources.VSImageLibrary.Nothing
+      });
     }
 
@@ -101,8 +109,8 @@
         variableListView.Enabled = false;
       } else {
-        addButton.Enabled = /*!Content.IsReadOnly &&*/ !ReadOnly;
+        addButton.Enabled = !Locked && !ReadOnly;
         sortAscendingButton.Enabled = variableListView.Items.Count > 1;
         sortDescendingButton.Enabled = variableListView.Items.Count > 1;
-        removeButton.Enabled = /*!Content.IsReadOnly &&*/ !ReadOnly && variableListView.SelectedItems.Count > 0;
+        removeButton.Enabled = !Locked && !ReadOnly && variableListView.SelectedItems.Count > 0;
         variableListView.Enabled = true;
       }
@@ -130,7 +138,9 @@
       string value = (variable.Value ?? "null").ToString();
       string type = variable.Value == null ? "null" : variable.Value.GetType().ToString();
-      var listViewItem = new ListViewItem(new[] { variable.Key, value, type }) { ToolTipText = GetToolTipText(variable), Tag = variable };
-      variableListView.SmallImageList.Images.Add(HeuristicLab.Common.Resources.VSImageLibrary.Object);
-      listViewItem.ImageIndex = variableListView.SmallImageList.Images.Count - 1;
+      bool serializable = IsSerializable(variable);
+      var listViewItem = new ListViewItem(new[] { variable.Key, value, type }) { ToolTipText = GetToolTipText(variable, serializable), Tag = variable };
+      if (serializable) {
+        listViewItem.ImageIndex = variable.Value == null ? 2 : 1;
+      } else listViewItem.ImageIndex = 0;
       variableListView.Items.Add(listViewItem);
       itemListViewItemMapping[variable.Key] = listViewItem;
@@ -160,7 +170,11 @@
         string value = (variable.Value ?? "null").ToString();
         string type = variable.Value == null ? "null" : variable.Value.GetType().ToString();
+        bool serializable = IsSerializable(variable);
+        if (serializable) {
+          listViewItem.ImageIndex = variable.Value == null ? 2 : 1;
+        } else listViewItem.ImageIndex = 0;
         listViewItem.SubItems[1].Text = value;
         listViewItem.SubItems[2].Text = type;
-        listViewItem.ToolTipText = GetToolTipText(variable);
+        listViewItem.ToolTipText = GetToolTipText(variable, serializable);
         listViewItem.Tag = variable;
       } else throw new ArgumentException("A variable with the specified name does not exist.", "variable");
@@ -169,10 +183,10 @@
     #region ListView Events
     protected virtual void variableListView_SelectedIndexChanged(object sender, EventArgs e) {
-      removeButton.Enabled = (Content != null) /*&& !Content.IsReadOnly*/ && !ReadOnly && variableListView.SelectedItems.Count > 0;
+      removeButton.Enabled = (Content != null) && !Locked && !ReadOnly && variableListView.SelectedItems.Count > 0;
       AdjustListViewColumnSizes();
     }
     protected virtual void variableListView_KeyDown(object sender, KeyEventArgs e) {
       if (e.KeyCode == Keys.Delete) {
-        if ((variableListView.SelectedItems.Count > 0) /*&& !Content.IsReadOnly*/ && !ReadOnly) {
+        if ((variableListView.SelectedItems.Count > 0) && !Locked && !ReadOnly) {
           foreach (ListViewItem item in variableListView.SelectedItems)
             Content.Remove(item.Text);
@@ -207,5 +221,5 @@
           if (items.Count == 1) data.SetData(HeuristicLab.Common.Constants.DragDropDataFormat, items[0]);
           else data.SetData(HeuristicLab.Common.Constants.DragDropDataFormat, items);
-          if (/*Content.IsReadOnly ||*/ ReadOnly) {
+          if (ReadOnly) {
             DoDragDrop(data, DragDropEffects.Copy | DragDropEffects.Link);
           } else {
@@ -220,7 +234,7 @@
     protected virtual void variableListView_DragEnter(object sender, DragEventArgs e) {
       validDragOperation = false;
-      if (/*!Content.IsReadOnly &&*/ !ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is object)) {
+      if (!Locked && !ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is object)) {
         validDragOperation = true;
-      } else if (/*!Content.IsReadOnly &&*/ !ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable)) {
+      } else if (!Locked && !ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable)) {
         validDragOperation = true;
         IEnumerable items = (IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
@@ -361,5 +375,5 @@
           item.SubItems[1].Text = value;
           item.SubItems[2].Text = variable.Value.Value.GetType().ToString();
-          item.ToolTipText = GetToolTipText(variable.Value);
+          item.ToolTipText = GetToolTipText(variable.Value, item.ImageIndex == 0);
           return;
         }
@@ -382,20 +396,31 @@
     protected virtual void RebuildImageList() {
       variableListView.SmallImageList.Images.Clear();
+      variableListView.SmallImageList.Images.AddRange(new Image[] {
+        HeuristicLab.Common.Resources.VSImageLibrary.Error,
+        HeuristicLab.Common.Resources.VSImageLibrary.Object,
+        HeuristicLab.Common.Resources.VSImageLibrary.Nothing
+      });
       foreach (ListViewItem listViewItem in variableListView.Items) {
-        object item = listViewItem.Tag as object;
-        variableListView.SmallImageList.Images.Add(item == null ? HeuristicLab.Common.Resources.VSImageLibrary.Nothing : HeuristicLab.Common.Resources.VSImageLibrary.Object);//item.ItemImage);
-        listViewItem.ImageIndex = variableListView.SmallImageList.Images.Count - 1;
-      }
-    }
-
-    private string GetToolTipText(KeyValuePair<string, object> variable) {
+        var variable = (KeyValuePair<string, object>)listViewItem.Tag;
+        bool serializable = IsSerializable(variable);
+        if (serializable) {
+          listViewItem.ImageIndex = variable.Value == null ? 2 : 1;
+        } else listViewItem.ImageIndex = 0;
+      }
+    }
+
+    private string GetToolTipText(KeyValuePair<string, object> variable, bool serializable) {
       if (string.IsNullOrEmpty(variable.Key)) throw new ArgumentException("The variable must have a name.", "variable");
       string value = (variable.Value ?? "null").ToString();
+      string type = variable.Value == null ? "null" : variable.Value.GetType().ToString();
       string[] lines = {
         "Name: " + variable.Key,
         "Value: " + value,
-        "Type: " + variable.Value.GetType()
+        "Type: " + type
       };
-      return string.Join(Environment.NewLine, lines);
+      string toolTipText = string.Join(Environment.NewLine, lines);
+      if (!serializable)
+        toolTipText += Environment.NewLine + "CAUTION: Type is not serializable!";
+      return toolTipText;
     }
 
@@ -411,4 +436,13 @@
       return defaultName;
     }
+
+    private bool IsSerializable(KeyValuePair<string, object> variable) {
+      var ser = new Serializer(variable, ConfigurationService.Instance.GetDefaultConfig(new XmlFormat()), "ROOT", true);
+      try {
+        return ser.Count() > 0;
+      } catch (PersistenceException) {
+        return false;
+      }
+    }
     #endregion
   }
Index: /branches/HLScript/HeuristicLab.HLScript/3.3/HLScript.cs
===================================================================
--- /branches/HLScript/HeuristicLab.HLScript/3.3/HLScript.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.HLScript/3.3/HLScript.cs	(revision 10358)
@@ -17,5 +17,5 @@
 
 namespace HeuristicLab.HLScript {
-  [Item("HLScript", "A HeuristicLab script.")]
+  [Item("HL Script", "A HeuristicLab script.")]
   [Creatable("Scripts")]
   [StorableClass]
@@ -84,6 +84,5 @@
       : base(original, cloner) {
       code = original.code;
-      //      variableStore = cloner.Clone(original.variableStore);
-      //      compiledHLScript = cloner.Clone(original.compiledHLScript)
+      variableStore = new VariableStore();
       compilationUnitCode = original.compilationUnitCode;
       if (original.compileErrors != null)
@@ -92,12 +91,6 @@
 
     public HLScript()
-      : base("HLS") {
+      : base("HL Script", "A HeuristicLab script.") {
       code = CodeTemplate;
-      variableStore = new VariableStore();
-    }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      compiledHLScript = null;
       variableStore = new VariableStore();
     }
@@ -172,4 +165,20 @@
     }
 
+    public IEnumerable<Assembly> GetAssemblies() {
+      var assemblies = new List<Assembly>();
+      foreach (var a in AppDomain.CurrentDomain.GetAssemblies()) {
+        try {
+          if (File.Exists(a.Location)) assemblies.Add(a);
+        } catch (NotSupportedException) {
+          // NotSupportedException is thrown while accessing 
+          // the Location property of the anonymously hosted
+          // dynamic methods assembly, which is related to
+          // LINQ queries
+        }
+      }
+      assemblies.Add(typeof(Microsoft.CSharp.RuntimeBinder.Binder).Assembly); // for dlr functionality
+      return assemblies;
+    }
+
     private readonly Regex LineSplitter = new Regex(@"\r\n|\r|\n");
     private readonly Regex SafeTypeNameCharRegex = new Regex("[_a-zA-Z0-9]+");
@@ -177,4 +186,5 @@
     private readonly Regex NamespaceDeclarationRegex = new Regex(@"using\s+(@?[a-z_A-Z]\w+(?:\s*\.\s*@?[a-z_A-Z]\w*)*)\s*;");
     private readonly Regex NamespaceRegex = new Regex(@"(@?[a-z_A-Z]\w+(?:\s*\.\s*@?[a-z_A-Z]\w*)*)");
+    private readonly Regex CommentRegex = new Regex(@"((/\*)[^/]+(\*/))|(//.*)");
 
     private CodeCompileUnit CreateCompilationUnit() {
@@ -191,5 +201,5 @@
 
     private IEnumerable<string> GetNamespaces() {
-      var strings = NamespaceDeclarationRegex.Matches(code)
+      var strings = NamespaceDeclarationRegex.Matches(CommentRegex.Replace(code, string.Empty))
                                              .Cast<Match>()
                                              .Select(m => m.Value);
@@ -207,20 +217,4 @@
           yield return trimmedLine;
       }
-    }
-
-    private IEnumerable<Assembly> GetAssemblies() {
-      var assemblies = new List<Assembly>();
-      foreach (var a in AppDomain.CurrentDomain.GetAssemblies()) {
-        try {
-          if (File.Exists(a.Location)) assemblies.Add(a);
-        } catch (NotSupportedException) {
-          // NotSupportedException is thrown while accessing 
-          // the Location property of the anonymously hosted
-          // dynamic methods assembly, which is related to
-          // LINQ queries
-        }
-      }
-      assemblies.Add(typeof(Microsoft.CSharp.RuntimeBinder.Binder).Assembly); // for dlr functionality
-      return assemblies;
     }
 
Index: /branches/HLScript/HeuristicLab.HLScript/3.3/HLScriptGeneration.cs
===================================================================
--- /branches/HLScript/HeuristicLab.HLScript/3.3/HLScriptGeneration.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.HLScript/3.3/HLScriptGeneration.cs	(revision 10358)
@@ -8,5 +8,14 @@
 namespace HeuristicLab.HLScript {
   public abstract class HLScriptGeneration {
-    protected static dynamic vars;
+    protected dynamic vars;
+
+    private readonly EventWriter console;
+    protected EventWriter Console {
+      get { return console; }
+    }
+
+    protected HLScriptGeneration() {
+      console = new EventWriter(this);
+    }
 
     public abstract void Main();
@@ -14,12 +23,10 @@
     private void Execute(VariableStore variableStore) {
       vars = new Variables(variableStore);
-      using (new EventWriter(this)) {
-        try {
-          Main();
-        } catch (ThreadAbortException) {
-        } catch (Exception e) {
-          Console.WriteLine("---");
-          Console.WriteLine(e);
-        }
+      try {
+        Main();
+      } catch (ThreadAbortException) {
+      } catch (Exception e) {
+        Console.WriteLine("---");
+        Console.WriteLine(e);
       }
     }
@@ -48,14 +55,9 @@
     }
 
-    private class EventWriter : TextWriter {
-      private readonly TextWriter consoleOut;
+    protected class EventWriter : TextWriter {
       private readonly HLScriptGeneration hlsg;
-      private bool disposed;
 
       public EventWriter(HLScriptGeneration hlsg) {
         this.hlsg = hlsg;
-        consoleOut = Console.Out;
-        Console.SetOut(this);
-        disposed = false;
       }
 
@@ -106,10 +108,4 @@
       #endregion
       #endregion
-
-      protected override void Dispose(bool disposing) {
-        if (!disposed && disposing)
-          Console.SetOut(consoleOut);
-        disposed = true;
-      }
     }
   }
Index: /branches/HLScript/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
===================================================================
--- /branches/HLScript/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 10358)
@@ -120,4 +120,5 @@
     <Compile Include="Plugin.cs" />
     <Compile Include="SingleObjective\ConstantOptimizationAnalyzer.cs" />
+    <Compile Include="SingleObjective\Evaluators\SymbolicRegressionMeanRelativeErrorEvaluator.cs" />
     <Compile Include="SingleObjective\SymbolicRegressionSingleObjectiveValidationParetoBestSolutionAnalyzer.cs" />
     <Compile Include="SingleObjective\SymbolicRegressionSingleObjectiveTrainingParetoBestSolutionAnalyzer.cs" />
Index: /branches/HLScript/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionMeanRelativeErrorEvaluator.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionMeanRelativeErrorEvaluator.cs	(revision 10358)
+++ /branches/HLScript/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionMeanRelativeErrorEvaluator.cs	(revision 10358)
@@ -0,0 +1,88 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
+  [Item("Mean relative error Evaluator", "Evaluator for symbolic regression models that calculates the mean relative error avg(|y'-y| / |y|+1)." +
+                                         "The +1 is necessary to handle data with the value of 0.0 correctly. " +
+                                         "Notice: Linear scaling is ignored for this evaluator.")]
+  [StorableClass]
+  public class SymbolicRegressionMeanRelativeErrorEvaluator : SymbolicRegressionSingleObjectiveEvaluator {
+    public override bool Maximization { get { return false; } }
+    [StorableConstructor]
+    protected SymbolicRegressionMeanRelativeErrorEvaluator(bool deserializing) : base(deserializing) { }
+    protected SymbolicRegressionMeanRelativeErrorEvaluator(SymbolicRegressionMeanRelativeErrorEvaluator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicRegressionMeanRelativeErrorEvaluator(this, cloner);
+    }
+    public SymbolicRegressionMeanRelativeErrorEvaluator() : base() { }
+
+    public override IOperation InstrumentedApply() {
+      var solution = SymbolicExpressionTreeParameter.ActualValue;
+      IEnumerable<int> rows = GenerateRowsToEvaluate();
+
+      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows, ApplyLinearScalingParameter.ActualValue.Value);
+      QualityParameter.ActualValue = new DoubleValue(quality);
+
+      return base.InstrumentedApply();
+    }
+
+    public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows, bool applyLinearScaling) {
+      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
+      IEnumerable<double> targetValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
+      IEnumerable<double> boundedEstimatedValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
+
+      var relResiduals = boundedEstimatedValues.Zip(targetValues, (e, t) => Math.Abs(t - e) / (Math.Abs(t) + 1.0));
+
+      OnlineCalculatorError errorState;
+      OnlineCalculatorError varErrorState;
+      double mre;
+      double variance;
+      OnlineMeanAndVarianceCalculator.Calculate(relResiduals, out mre, out variance, out errorState, out varErrorState);
+      if (errorState != OnlineCalculatorError.None) return double.NaN;
+      return mre;
+    }
+
+    public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IRegressionProblemData problemData, IEnumerable<int> rows) {
+      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
+      EstimationLimitsParameter.ExecutionContext = context;
+      ApplyLinearScalingParameter.ExecutionContext = context;
+
+      double mre = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, ApplyLinearScalingParameter.ActualValue.Value);
+
+      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
+      EstimationLimitsParameter.ExecutionContext = null;
+      ApplyLinearScalingParameter.ExecutionContext = null;
+
+      return mre;
+    }
+  }
+}
Index: /branches/HLScript/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/MultiSymbolicDataAnalysisExpressionCrossover.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/MultiSymbolicDataAnalysisExpressionCrossover.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/MultiSymbolicDataAnalysisExpressionCrossover.cs	(revision 10358)
@@ -109,4 +109,6 @@
       InitializeOperators();
       name = "MultiSymbolicDataAnalysisExpressionCrossover";
+
+      SelectedOperatorParameter.ActualName = "SelectedCrossoverOperator";
     }
 
Index: /branches/HLScript/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Crossovers/BiasedMultiVRPSolutionCrossover.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Crossovers/BiasedMultiVRPSolutionCrossover.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Crossovers/BiasedMultiVRPSolutionCrossover.cs	(revision 10358)
@@ -67,4 +67,6 @@
       Parameters.Add(new ValueParameter<DoubleValue>("LowerBound", "The depth of the individuals in the scope tree.", new DoubleValue(0.01)));
       Parameters.Add(new ValueParameter<IntValue>("Depth", "The depth of the individuals in the scope tree.", new IntValue(1)));
+
+      SelectedOperatorParameter.ActualName = "SelectedCrossoverOperator";
     }
 
Index: /branches/HLScript/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Crossovers/MultiVRPSolutionCrossover.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Crossovers/MultiVRPSolutionCrossover.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Crossovers/MultiVRPSolutionCrossover.cs	(revision 10358)
@@ -67,4 +67,6 @@
       Parameters.Add(new LookupParameter<IVRPEncoding>("Child", "The child permutation resulting from the crossover."));
       ChildParameter.ActualName = "VRPTours";
+
+      SelectedOperatorParameter.ActualName = "SelectedCrossoverOperator";
     }
 
Index: /branches/HLScript/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Manipulators/BiasedMultiVRPSolutionManipulator.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Manipulators/BiasedMultiVRPSolutionManipulator.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Manipulators/BiasedMultiVRPSolutionManipulator.cs	(revision 10358)
@@ -67,4 +67,6 @@
       Parameters.Add(new ValueParameter<DoubleValue>("LowerBound", "The depth of the individuals in the scope tree.", new DoubleValue(0.01)));
       Parameters.Add(new ValueParameter<IntValue>("Depth", "The depth of the individuals in the scope tree.", new IntValue(1)));
+
+      SelectedOperatorParameter.ActualName = "SelectedManipulationOperator";
     }
 
Index: /branches/HLScript/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Manipulators/MultiVRPSolutionManipulator.cs
===================================================================
--- /branches/HLScript/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Manipulators/MultiVRPSolutionManipulator.cs	(revision 10357)
+++ /branches/HLScript/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Manipulators/MultiVRPSolutionManipulator.cs	(revision 10358)
@@ -59,4 +59,6 @@
       Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance"));
       Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours to be manipulated."));
+
+      SelectedOperatorParameter.ActualName = "SelectedManipulationOperator";
     }
 
