Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Addition.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Addition.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Addition.cs	(revision 1297)
@@ -0,0 +1,50 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Constraints;
+using System.Linq;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Addition : FunctionBase {
+    public override string Description {
+      get {
+        return @"Returns the sum of all sub-tree results.
+    (+ 3) => 3
+    (+ 2 3) => 5
+    (+ 3 4 5) => 12";
+      }
+    }
+
+    public Addition()
+      : base() {
+      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
+      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+      AddConstraint(new SubOperatorTypeConstraint(1));
+      AddConstraint(new SubOperatorTypeConstraint(2));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/And.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/And.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/And.cs	(revision 1297)
@@ -0,0 +1,46 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Constraints;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class And : FunctionBase {
+    public override string Description {
+      get {
+        return @"Logical AND operation. Only defined for sub-tree-results 0.0 and 1.0.
+AND is a special form, sub-trees are evaluated from the first to the last. Evaluation is 
+stopped as soon as one of the sub-trees evaluates to 0.0 (false).";
+      }
+    }
+
+    public And()
+      : base() {
+      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+      AddConstraint(new SubOperatorTypeConstraint(1));
+      AddConstraint(new SubOperatorTypeConstraint(2));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Average.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Average.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Average.cs	(revision 1297)
@@ -0,0 +1,44 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Constraints;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Average : FunctionBase {
+    public override string Description {
+      get {
+        return @"Returns the average (arithmetic mean) of all sub-tree results.";
+      }
+    }
+
+    public Average()
+      : base() {
+      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+      AddConstraint(new SubOperatorTypeConstraint(1));
+      AddConstraint(new SubOperatorTypeConstraint(2));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/BakedTreeEvaluator.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/BakedTreeEvaluator.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/BakedTreeEvaluator.cs	(revision 1297)
@@ -0,0 +1,314 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using System.Xml;
+using System.Diagnostics;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  /// <summary>
+  /// Evaluates FunctionTrees recursively by interpretation of the function symbols in each node.
+  /// Not thread-safe!
+  /// </summary>
+  public class BakedTreeEvaluator {
+    private const double EPSILON = 1.0e-7;
+    private double estimatedValueMax;
+    private double estimatedValueMin;
+
+    private class Instr {
+      public double d_arg0;
+      public short i_arg0;
+      public short i_arg1;
+      public byte arity;
+      public byte symbol;
+      public ushort exprLength;
+      public IFunction function;
+    }
+
+    private Instr[] codeArr;
+    private int PC;
+    private Dataset dataset;
+    private int sampleIndex;
+
+    public void ResetEvaluator(BakedFunctionTree functionTree, Dataset dataset, int targetVariable, int start, int end, double punishmentFactor) {
+      this.dataset = dataset;
+      double maximumPunishment = punishmentFactor * dataset.GetRange(targetVariable);
+
+      // get the mean of the values of the target variable to determine the max and min bounds of the estimated value
+      double targetMean = dataset.GetMean(targetVariable, start, end - 1);
+      estimatedValueMin = targetMean - maximumPunishment;
+      estimatedValueMax = targetMean + maximumPunishment;
+
+      List<LightWeightFunction> linearRepresentation = functionTree.LinearRepresentation;
+      codeArr = new Instr[linearRepresentation.Count];
+      int i = 0;
+      foreach (LightWeightFunction f in linearRepresentation) {
+        codeArr[i++] = TranslateToInstr(f);
+      }
+      exprIndex = 0;
+      ushort exprLength;
+      bool constExpr;
+      PatchExpressionLengthsAndConstants(0, out constExpr, out exprLength);
+    }
+
+    ushort exprIndex;
+    private void PatchExpressionLengthsAndConstants(ushort index, out bool constExpr, out ushort exprLength) {
+      exprLength = 1;
+      if (codeArr[index].arity == 0) {
+        // when no children then it's a constant expression only if the terminal is a constant
+        constExpr = codeArr[index].symbol == EvaluatorSymbolTable.CONSTANT;
+      } else {
+        constExpr = true; // when there are children it's a constant expression if all children are constant;
+      }
+      for (int i = 0; i < codeArr[index].arity; i++) {
+        exprIndex++;
+        ushort branchLength;
+        bool branchConstExpr;
+        PatchExpressionLengthsAndConstants(exprIndex, out branchConstExpr, out branchLength);
+        exprLength += branchLength;
+        constExpr &= branchConstExpr;
+      }
+
+      if (constExpr) {
+        PC = index;
+        codeArr[index].d_arg0 = EvaluateBakedCode();
+        codeArr[index].symbol = EvaluatorSymbolTable.CONSTANT;
+      }
+      codeArr[index].exprLength = exprLength;
+    }
+
+    private Instr TranslateToInstr(LightWeightFunction f) {
+      Instr instr = new Instr();
+      instr.arity = f.arity;
+      instr.symbol = EvaluatorSymbolTable.MapFunction(f.functionType);
+      switch (instr.symbol) {
+        case EvaluatorSymbolTable.DIFFERENTIAL:
+        case EvaluatorSymbolTable.VARIABLE: {
+            instr.i_arg0 = (short)f.data[0]; // var
+            instr.d_arg0 = f.data[1]; // weight
+            instr.i_arg1 = (short)f.data[2]; // sample-offset
+            instr.exprLength = 1;
+            break;
+          }
+        case EvaluatorSymbolTable.CONSTANT: {
+            instr.d_arg0 = f.data[0]; // value
+            instr.exprLength = 1;
+            break;
+          }
+        case EvaluatorSymbolTable.UNKNOWN: {
+            instr.function = f.functionType;
+            instr.exprLength = 1;
+            break;
+          }
+      }
+      return instr;
+    }
+
+    public double Evaluate(int sampleIndex) {
+      PC = 0;
+      this.sampleIndex = sampleIndex;
+
+      double estimated = EvaluateBakedCode();
+      if (double.IsNaN(estimated) || double.IsInfinity(estimated)) {
+        estimated = estimatedValueMax;
+      } else if (estimated > estimatedValueMax) {
+        estimated = estimatedValueMax;
+      } else if (estimated < estimatedValueMin) {
+        estimated = estimatedValueMin;
+      }
+      return estimated;
+    }
+
+    // skips a whole branch
+    private void SkipBakedCode() {
+      PC += codeArr[PC].exprLength;
+    }
+
+    private double EvaluateBakedCode() {
+      Instr currInstr = codeArr[PC++];
+      switch (currInstr.symbol) {
+        case EvaluatorSymbolTable.VARIABLE: {
+            int row = sampleIndex + currInstr.i_arg1;
+            if (row < 0 || row >= dataset.Rows) return double.NaN;
+            else return currInstr.d_arg0 * dataset.GetValue(row, currInstr.i_arg0);
+          }
+        case EvaluatorSymbolTable.CONSTANT: {
+            PC += currInstr.exprLength - 1;
+            return currInstr.d_arg0;
+          }
+        case EvaluatorSymbolTable.DIFFERENTIAL: {
+            int row = sampleIndex + currInstr.i_arg1;
+            if (row < 0 || row >= dataset.Rows) return double.NaN;
+            else if (row < 1) return 0.0;
+            else {
+              double prevValue = dataset.GetValue(row - 1, currInstr.i_arg0);
+              if (double.IsNaN(prevValue) || double.IsInfinity(prevValue)) return 0.0;
+              else return currInstr.d_arg0 * (dataset.GetValue(row, currInstr.i_arg0) - prevValue);
+            }
+          }
+        case EvaluatorSymbolTable.MULTIPLICATION: {
+            double result = EvaluateBakedCode();
+            for (int i = 1; i < currInstr.arity; i++) {
+              result *= EvaluateBakedCode();
+            }
+            return result;
+          }
+        case EvaluatorSymbolTable.ADDITION: {
+            double sum = EvaluateBakedCode();
+            for (int i = 1; i < currInstr.arity; i++) {
+              sum += EvaluateBakedCode();
+            }
+            return sum;
+          }
+        case EvaluatorSymbolTable.SUBTRACTION: {
+            if (currInstr.arity == 1) {
+              return -EvaluateBakedCode();
+            } else {
+              double result = EvaluateBakedCode();
+              for (int i = 1; i < currInstr.arity; i++) {
+                result -= EvaluateBakedCode();
+              }
+              return result;
+            }
+          }
+        case EvaluatorSymbolTable.DIVISION: {
+            double result;
+            if (currInstr.arity == 1) {
+              result = 1.0 / EvaluateBakedCode();
+            } else {
+              result = EvaluateBakedCode();
+              for (int i = 1; i < currInstr.arity; i++) {
+                result /= EvaluateBakedCode();
+              }
+            }
+            if (double.IsInfinity(result)) return 0.0;
+            else return result;
+          }
+        case EvaluatorSymbolTable.AVERAGE: {
+            double sum = EvaluateBakedCode();
+            for (int i = 1; i < currInstr.arity; i++) {
+              sum += EvaluateBakedCode();
+            }
+            return sum / currInstr.arity;
+          }
+        case EvaluatorSymbolTable.COSINUS: {
+            return Math.Cos(EvaluateBakedCode());
+          }
+        case EvaluatorSymbolTable.SINUS: {
+            return Math.Sin(EvaluateBakedCode());
+          }
+        case EvaluatorSymbolTable.EXP: {
+            return Math.Exp(EvaluateBakedCode());
+          }
+        case EvaluatorSymbolTable.LOG: {
+            return Math.Log(EvaluateBakedCode());
+          }
+        case EvaluatorSymbolTable.POWER: {
+            double x = EvaluateBakedCode();
+            double p = EvaluateBakedCode();
+            return Math.Pow(x, p);
+          }
+        case EvaluatorSymbolTable.SIGNUM: {
+            double value = EvaluateBakedCode();
+            if (double.IsNaN(value)) return double.NaN;
+            else return Math.Sign(value);
+          }
+        case EvaluatorSymbolTable.SQRT: {
+            return Math.Sqrt(EvaluateBakedCode());
+          }
+        case EvaluatorSymbolTable.TANGENS: {
+            return Math.Tan(EvaluateBakedCode());
+          }
+        case EvaluatorSymbolTable.AND: { // only defined for inputs 1 and 0
+            double result = EvaluateBakedCode();
+            for (int i = 1; i < currInstr.arity; i++) {
+              if (result == 0.0) SkipBakedCode();
+              else {
+                result = EvaluateBakedCode();
+              }
+              Debug.Assert(result == 0.0 || result == 1.0);
+            }
+            return result;
+          }
+        case EvaluatorSymbolTable.EQU: {
+            double x = EvaluateBakedCode();
+            double y = EvaluateBakedCode();
+            if (Math.Abs(x - y) < EPSILON) return 1.0; else return 0.0;
+          }
+        case EvaluatorSymbolTable.GT: {
+            double x = EvaluateBakedCode();
+            double y = EvaluateBakedCode();
+            if (x > y) return 1.0;
+            else return 0.0;
+          }
+        case EvaluatorSymbolTable.IFTE: { // only defined for condition 0 or 1
+            double condition = EvaluateBakedCode();
+            Debug.Assert(condition == 0.0 || condition == 1.0);
+            double result;
+            if (condition == 0.0) {
+              result = EvaluateBakedCode(); SkipBakedCode();
+            } else {
+              SkipBakedCode(); result = EvaluateBakedCode();
+            }
+            return result;
+          }
+        case EvaluatorSymbolTable.LT: {
+            double x = EvaluateBakedCode();
+            double y = EvaluateBakedCode();
+            if (x < y) return 1.0;
+            else return 0.0;
+          }
+        case EvaluatorSymbolTable.NOT: { // only defined for inputs 0 or 1
+            double result = EvaluateBakedCode();
+            Debug.Assert(result == 0.0 || result == 1.0);
+            return Math.Abs(result - 1.0);
+          }
+        case EvaluatorSymbolTable.OR: { // only defined for inputs 0 or 1
+            double result = EvaluateBakedCode();
+            for (int i = 1; i < currInstr.arity; i++) {
+              if (result > 0.0) SkipBakedCode();
+              else {
+                result = EvaluateBakedCode();
+                Debug.Assert(result == 0.0 || result == 1.0);
+              }
+            }
+            return result;
+          }
+        case EvaluatorSymbolTable.XOR: { // only defined for inputs 0 or 1
+            double x = EvaluateBakedCode();
+            double y = EvaluateBakedCode();
+            return Math.Abs(x - y);
+          }
+        case EvaluatorSymbolTable.UNKNOWN: { // evaluate functions which are not statically defined directly
+            return currInstr.function.Apply();
+          }
+        default: {
+            throw new NotImplementedException();
+          }
+      }
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Constant.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Constant.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Constant.cs	(revision 1297)
@@ -0,0 +1,93 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Data;
+using HeuristicLab.Core;
+using System.Xml;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+using HeuristicLab.Operators;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Constant : FunctionBase {
+    public const string VALUE = "Value";
+
+    public override string Description {
+      get { return "Returns the value of local variable 'Value'."; }
+    }
+
+    public Constant()
+      : base() {
+      AddVariableInfo(new VariableInfo(VALUE, "The constant value", typeof(ConstrainedDoubleData), VariableKind.None));
+      GetVariableInfo(VALUE).Local = true;
+
+      ConstrainedDoubleData valueData = new ConstrainedDoubleData();
+      // initialize a default range for the contant value
+      valueData.AddConstraint(new DoubleBoundedConstraint(-20.0, 20.0));
+      HeuristicLab.Core.Variable value = new HeuristicLab.Core.Variable(VALUE, valueData);
+      AddVariable(value);
+
+      SetupInitialization();
+      SetupManipulation();
+
+      // constant can't have suboperators
+      AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));
+    }
+
+    private void SetupInitialization() {
+      // initialization operator
+      AddVariableInfo(new VariableInfo(INITIALIZATION, "Initialization operator-graph for constants", typeof(IOperatorGraph), VariableKind.None));
+      GetVariableInfo(INITIALIZATION).Local = false;
+      CombinedOperator combinedOp = new CombinedOperator();
+      SequentialProcessor initSeq = new SequentialProcessor();
+      UniformRandomizer randomizer = new UniformRandomizer();
+      randomizer.Min = -20.0;
+      randomizer.Max = 20.0;
+
+      combinedOp.OperatorGraph.AddOperator(initSeq);
+      combinedOp.OperatorGraph.AddOperator(randomizer);
+      combinedOp.OperatorGraph.InitialOperator = initSeq;
+      initSeq.AddSubOperator(randomizer);
+      AddVariable(new HeuristicLab.Core.Variable(INITIALIZATION, combinedOp));
+    }
+
+    private void SetupManipulation() {
+      // manipulation operator
+      AddVariableInfo(new VariableInfo(MANIPULATION, "Manipulation operator-graph for constants", typeof(IOperatorGraph), VariableKind.None));
+      GetVariableInfo(MANIPULATION).Local = false;
+      CombinedOperator combinedOp = new CombinedOperator();
+      SequentialProcessor manipulationSeq = new SequentialProcessor();
+      NormalRandomAdder valueAdder = new NormalRandomAdder();
+      valueAdder.Mu = 0.0;
+      valueAdder.Sigma = 0.1;
+
+      combinedOp.OperatorGraph.AddOperator(manipulationSeq);
+      combinedOp.OperatorGraph.AddOperator(valueAdder);
+      combinedOp.OperatorGraph.InitialOperator = manipulationSeq;
+      manipulationSeq.AddSubOperator(valueAdder);
+      AddVariable(new HeuristicLab.Core.Variable(MANIPULATION, combinedOp));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Cosinus.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Cosinus.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Cosinus.cs	(revision 1297)
@@ -0,0 +1,43 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Cosinus : FunctionBase {
+    public override string Description {
+      get { return "Returns the cosinus of the first sub-tree."; }
+    }
+
+    public Cosinus()
+      : base() {
+      // must have exactly one subfunction
+      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Differential.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Differential.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Differential.cs	(revision 1297)
@@ -0,0 +1,46 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Data;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+using HeuristicLab.Operators;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Differential : Variable {
+
+    public override string Description {
+      get {
+        return @"Differential returns the difference between the value of a variable at t and t-1. The weight is a coefficient that is multiplied to the the difference.";
+      }
+    }
+
+    public Differential()
+      : base() {
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Division.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Division.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Division.cs	(revision 1297)
@@ -0,0 +1,57 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Constraints;
+using System.Linq;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Division : FunctionBase {
+    private const double EPSILON = 10.0E-20; // if any divisor is < EPSILON return 0
+
+    public override string Description {
+      get {
+        return @"Protected division
+Divides the result of the first sub-tree by the results of the following sub-tree.
+In case one of the divisors is 0 returns 0.
+    (/ 3) => 1/3
+    (/ 2 3) => 2/3
+    (/ 3 4 5) => 3/20
+    (/ 2 0 4) => 0
+";
+      }
+    }
+
+    public Division()
+      : base() {
+      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
+      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+      AddConstraint(new SubOperatorTypeConstraint(1));
+      AddConstraint(new SubOperatorTypeConstraint(2));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Equal.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Equal.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Equal.cs	(revision 1297)
@@ -0,0 +1,44 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Equal : FunctionBase {
+    public override string Description {
+      get {
+        return @"Equal condition. Returns 1.0 if both sub-trees evaluate to the same value and 0.0 if they differ.";
+      }
+    }
+
+    public Equal()
+      : base() {
+      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+      AddConstraint(new SubOperatorTypeConstraint(1));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/CoefficientOfDeterminationEvaluator.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/CoefficientOfDeterminationEvaluator.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/CoefficientOfDeterminationEvaluator.cs	(revision 1297)
@@ -0,0 +1,78 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class CoefficientOfDeterminationEvaluator : GPEvaluatorBase {
+    public override string Description {
+      get {
+        return @"Evaluates 'FunctionTree' for all samples of 'Dataset' and calculates
+the 'coefficient of determination' of estimated values vs. real values of 'TargetVariable'.";
+      }
+    }
+
+    public CoefficientOfDeterminationEvaluator()
+      : base() {
+      AddVariableInfo(new VariableInfo("R2", "The coefficient of determination of the model", typeof(DoubleData), VariableKind.New));
+    }
+
+    public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
+      double errorsSquaredSum = 0.0;
+      double originalDeviationTotalSumOfSquares = 0.0;
+      double targetMean = dataset.GetMean(targetVariable, start, end);
+      for (int sample = start; sample < end; sample++) {
+        double estimated = evaluator.Evaluate(sample);
+        double original = dataset.GetValue(sample, targetVariable);
+        if (updateTargetValues) {
+          dataset.SetValue(sample, targetVariable, estimated);
+        }
+        if (!double.IsNaN(original) && !double.IsInfinity(original)) {
+          double error = estimated - original;
+          errorsSquaredSum += error * error;
+
+          double origDeviation = original - targetMean;
+          originalDeviationTotalSumOfSquares += origDeviation * origDeviation;
+        }
+      }
+
+      double quality = 1 - errorsSquaredSum / originalDeviationTotalSumOfSquares;
+      if (quality > 1)
+        throw new InvalidProgramException();
+      if (double.IsNaN(quality) || double.IsInfinity(quality))
+        quality = double.MaxValue;
+
+      DoubleData r2 = GetVariableValue<DoubleData>("R2", scope, false, false);
+      if (r2 == null) {
+        r2 = new DoubleData();
+        scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("R2"), r2));
+      }
+
+      r2.Data = quality;
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/EarlyStoppingMeanSquaredErrorEvaluator.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/EarlyStoppingMeanSquaredErrorEvaluator.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/EarlyStoppingMeanSquaredErrorEvaluator.cs	(revision 1297)
@@ -0,0 +1,80 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class EarlyStoppingMeanSquaredErrorEvaluator : MeanSquaredErrorEvaluator {
+    public override string Description {
+      get {
+        return @"Evaluates 'FunctionTree' for all samples of the dataset and calculates the mean-squared-error
+for the estimated values vs. the real values of 'TargetVariable'.
+This operator stops the computation as soon as an upper limit for the mean-squared-error is reached.";
+      }
+    }
+
+    public EarlyStoppingMeanSquaredErrorEvaluator()
+      : base() {
+      AddVariableInfo(new VariableInfo("QualityLimit", "The upper limit of the MSE which is used as early stopping criterion.", typeof(DoubleData), VariableKind.In));
+    }
+
+    // evaluates the function-tree for the given target-variable and the whole dataset and returns the MSE
+    public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
+      double qualityLimit = GetVariableValue<DoubleData>("QualityLimit", scope, false).Data;
+      DoubleData mse = GetVariableValue<DoubleData>("MSE", scope, false, false);
+      if (mse == null) {
+        mse = new DoubleData();
+        scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("MSE"), mse));
+      }
+
+      double errorsSquaredSum = 0;
+      int rows = end - start;
+      for (int sample = start; sample < end; sample++) {
+        double estimated = evaluator.Evaluate(sample);
+        double original = dataset.GetValue(sample, targetVariable);
+        if (updateTargetValues) {
+          dataset.SetValue(sample, targetVariable, estimated);
+        }
+        if (!double.IsNaN(original) && !double.IsInfinity(original)) {
+          double error = estimated - original;
+          errorsSquaredSum += error * error;
+        }
+        // check the limit and stop as soon as we hit the limit
+        if (errorsSquaredSum / rows >= qualityLimit) {
+          mse.Data = errorsSquaredSum / (sample - start + 1); // return estimated MSE (when the remaining errors are on average the same)
+          return;
+        }
+      }
+      errorsSquaredSum /= rows;
+      if (double.IsNaN(errorsSquaredSum) || double.IsInfinity(errorsSquaredSum)) {
+        errorsSquaredSum = double.MaxValue;
+      }
+
+      mse.Data = errorsSquaredSum;
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/GPEvaluatorBase.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/GPEvaluatorBase.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/GPEvaluatorBase.cs	(revision 1297)
@@ -0,0 +1,87 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public abstract class GPEvaluatorBase : OperatorBase {
+    public GPEvaluatorBase()
+      : base() {
+      AddVariableInfo(new VariableInfo("FunctionTree", "The function tree that should be evaluated", typeof(IFunctionTree), VariableKind.In));
+      AddVariableInfo(new VariableInfo("TreeSize", "Size (number of nodes) of the tree to evaluate", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("Dataset", "Dataset with all samples on which to apply the function", typeof(Dataset), VariableKind.In));
+      AddVariableInfo(new VariableInfo("TargetVariable", "Index of the column of the dataset that holds the target variable", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("PunishmentFactor", "Punishment factor for invalid estimations", typeof(DoubleData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("TotalEvaluatedNodes", "Number of evaluated nodes", typeof(DoubleData), VariableKind.In | VariableKind.Out));
+      AddVariableInfo(new VariableInfo("SamplesStart", "Start index of samples in dataset to evaluate", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("SamplesEnd", "End index of samples in dataset to evaluate", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("UseEstimatedTargetValue", "Wether to use the original (measured) or the estimated (calculated) value for the targat variable when doing autoregressive modelling", typeof(BoolData), VariableKind.In));
+    }
+
+    public override IOperation Apply(IScope scope) {
+      // get all variable values
+      int targetVariable = GetVariableValue<IntData>("TargetVariable", scope, true).Data;
+      Dataset dataset = GetVariableValue<Dataset>("Dataset", scope, true);
+      BakedFunctionTree functionTree = GetVariableValue<BakedFunctionTree>("FunctionTree", scope, true);
+      double punishmentFactor = GetVariableValue<DoubleData>("PunishmentFactor", scope, true).Data;
+      int treeSize = scope.GetVariableValue<IntData>("TreeSize", false).Data;
+      double totalEvaluatedNodes = scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data;
+      int start = GetVariableValue<IntData>("SamplesStart", scope, true).Data;
+      int end = GetVariableValue<IntData>("SamplesEnd", scope, true).Data;
+      bool useEstimatedValues = GetVariableValue<BoolData>("UseEstimatedTargetValue", scope, true).Data;
+      double[] backupValues = null;
+      // prepare for autoregressive modelling by saving the original values of the target-variable to a backup array
+      if (useEstimatedValues &&
+        (backupValues == null || backupValues.Length != end - start)) {
+        backupValues = new double[end - start];
+        for (int i = start; i < end; i++) {
+          backupValues[i - start] = dataset.GetValue(i, targetVariable);
+        }
+      }
+
+      // initialize and reset the evaluator
+      BakedTreeEvaluator evaluator = new BakedTreeEvaluator();
+      evaluator.ResetEvaluator(functionTree, dataset, targetVariable, start, end, punishmentFactor);
+
+      Evaluate(scope, evaluator, dataset, targetVariable, start, end, useEstimatedValues);
+
+      // restore the values of the target variable from the backup array if necessary
+      if (useEstimatedValues) {
+        for (int i = start; i < end; i++) {
+          dataset.SetValue(i, targetVariable, backupValues[i - start]);
+        }
+      }
+
+      // update the value of total evaluated nodes
+      scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data = totalEvaluatedNodes + treeSize * (end - start);
+      return null;
+    }
+
+    public abstract void Evaluate(IScope scope, BakedTreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues);
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/MeanAbsolutePercentageErrorEvaluator.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/MeanAbsolutePercentageErrorEvaluator.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/MeanAbsolutePercentageErrorEvaluator.cs	(revision 1297)
@@ -0,0 +1,76 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class MeanAbsolutePercentageErrorEvaluator : GPEvaluatorBase {
+    public override string Description {
+      get {
+        return @"Evaluates 'FunctionTree' for all samples of 'Dataset' and calculates
+the 'mean absolute percentage error (scale invariant)' of estimated values vs. real values of 'TargetVariable'.";
+      }
+    }
+
+    public MeanAbsolutePercentageErrorEvaluator()
+      : base() {
+      AddVariableInfo(new VariableInfo("MAPE", "The mean absolute percentage error of the model", typeof(DoubleData), VariableKind.New));
+    }
+
+    public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
+      double errorsSum = 0.0;
+      int n = 0;
+      for (int sample = start; sample < end; sample++) {
+        double estimated = evaluator.Evaluate(sample);
+        double original = dataset.GetValue(sample, targetVariable);
+
+        if (updateTargetValues) {
+          dataset.SetValue(sample, targetVariable, estimated);
+        }
+
+        if (!double.IsNaN(original) && !double.IsInfinity(original) && original != 0.0) {
+          double percent_error = Math.Abs((estimated - original) / original);
+          errorsSum += percent_error;
+          n++;
+        }
+      }
+      double quality = errorsSum / n;
+      if (double.IsNaN(quality) || double.IsInfinity(quality))
+        quality = double.MaxValue;
+
+      // create a variable for the MAPE
+      DoubleData mape = GetVariableValue<DoubleData>("MAPE", scope, false, false);
+      if (mape == null) {
+        mape = new DoubleData();
+        scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("MAPE"), mape));
+      }
+
+      mape.Data = quality;
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/MeanSquaredErrorEvaluator.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/MeanSquaredErrorEvaluator.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/MeanSquaredErrorEvaluator.cs	(revision 1297)
@@ -0,0 +1,73 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class MeanSquaredErrorEvaluator : GPEvaluatorBase {
+    public override string Description {
+      get {
+        return @"Evaluates 'FunctionTree' for all samples of 'DataSet' and calculates the mean-squared-error
+for the estimated values vs. the real values of 'TargetVariable'.";
+      }
+    }
+
+    public MeanSquaredErrorEvaluator()
+      : base() {
+      AddVariableInfo(new VariableInfo("MSE", "The mean squared error of the model", typeof(DoubleData), VariableKind.New));
+    }
+
+    public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
+      double errorsSquaredSum = 0;
+      for (int sample = start; sample < end; sample++) {
+        double original = dataset.GetValue(sample, targetVariable);
+        double estimated = evaluator.Evaluate(sample);
+        if (updateTargetValues) {
+          dataset.SetValue(sample, targetVariable, estimated);
+        }
+        if (!double.IsNaN(original) && !double.IsInfinity(original)) {
+          double error = estimated - original;
+          errorsSquaredSum += error * error;
+        }
+      }
+
+      errorsSquaredSum /= (end - start);
+      if (double.IsNaN(errorsSquaredSum) || double.IsInfinity(errorsSquaredSum)) {
+        errorsSquaredSum = double.MaxValue;
+      }
+
+      DoubleData mse = GetVariableValue<DoubleData>("MSE", scope, false, false);
+      if (mse == null) {
+        mse = new DoubleData();
+        scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("MSE"), mse));
+      }
+
+      mse.Data = errorsSquaredSum;
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/SimpleEvaluator.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/SimpleEvaluator.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/SimpleEvaluator.cs	(revision 1297)
@@ -0,0 +1,63 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class SimpleEvaluator : GPEvaluatorBase {
+    public SimpleEvaluator()
+      : base() {
+      AddVariableInfo(new VariableInfo("Values", "The values of the target variable as predicted by the model and the original value of the target variable", typeof(ItemList), VariableKind.New | VariableKind.Out));
+    }
+
+    public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
+      ItemList values = GetVariableValue<ItemList>("Values", scope, false, false);
+      if (values == null) {
+        values = new ItemList();
+        IVariableInfo info = GetVariableInfo("Values");
+        if (info.Local)
+          AddVariable(new HeuristicLab.Core.Variable(info.ActualName, values));
+        else
+          scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(info.FormalName), values));
+      }
+      values.Clear();
+
+      for (int sample = start; sample < end; sample++) {
+        ItemList row = new ItemList();
+        double estimated = evaluator.Evaluate(sample);
+        double original = dataset.GetValue(sample, targetVariable);
+        if (updateTargetValues) {
+          dataset.SetValue(sample, targetVariable, estimated);
+        }
+        row.Add(new DoubleData(estimated));
+        row.Add(new DoubleData(original));
+        values.Add(row);
+      }
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/UncertainMeanSquaredErrorEvaluator.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/UncertainMeanSquaredErrorEvaluator.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/UncertainMeanSquaredErrorEvaluator.cs	(revision 1297)
@@ -0,0 +1,119 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.DataAnalysis;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class UncertainMeanSquaredErrorEvaluator : MeanSquaredErrorEvaluator {
+    public override string Description {
+      get {
+        return @"Evaluates 'FunctionTree' for all samples of the dataset and calculates the mean-squared-error
+for the estimated values vs. the real values of 'TargetVariable'.
+This operator stops the computation as soon as an upper limit for the mean-squared-error is reached.";
+      }
+    }
+
+    public UncertainMeanSquaredErrorEvaluator()
+      : base() {
+      AddVariableInfo(new VariableInfo("Random", "", typeof(MersenneTwister), VariableKind.In));
+      AddVariableInfo(new VariableInfo("MinEvaluatedSamples", "", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("QualityLimit", "The upper limit of the MSE which is used as early stopping criterion.", typeof(DoubleData), VariableKind.In));
+      AddVariableInfo(new VariableInfo("ConfidenceBounds", "Confidence bounds of the calculated MSE", typeof(DoubleData), VariableKind.New | VariableKind.Out));
+      AddVariableInfo(new VariableInfo("ActuallyEvaluatedSamples", "", typeof(IntData), VariableKind.New | VariableKind.Out));
+    }
+
+    // evaluates the function-tree for the given target-variable and the whole dataset and returns the MSE
+    public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
+      double qualityLimit = GetVariableValue<DoubleData>("QualityLimit", scope, false).Data;
+      int minSamples = GetVariableValue<IntData>("MinEvaluatedSamples", scope, true).Data;
+      MersenneTwister mt = GetVariableValue<MersenneTwister>("Random", scope, true);
+      DoubleData mse = GetVariableValue<DoubleData>("MSE", scope, false, false);
+      if (mse == null) {
+        mse = new DoubleData();
+        scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("MSE"), mse));
+      }
+      DoubleData confidenceBounds = GetVariableValue<DoubleData>("ConfidenceBounds", scope, false, false);
+      if (confidenceBounds == null) {
+        confidenceBounds = new DoubleData();
+        scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("ConfidenceBounds"), confidenceBounds));
+      }
+      IntData evaluatedSamples = GetVariableValue<IntData>("ActuallyEvaluatedSamples", scope, false, false);
+      if (evaluatedSamples == null) {
+        evaluatedSamples = new IntData();
+        scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("ActuallyEvaluatedSamples"), evaluatedSamples));
+      }
+
+      int rows = end - start;
+      double mean = 0;
+      double stdDev = 0;
+      double confidenceInterval = 0;
+      double m2 = 0;
+      int[] indexes = InitIndexes(mt, start, end);
+      int n = 0;
+      for (int sample = 0; sample < rows; sample++) {
+        double estimated = evaluator.Evaluate(indexes[sample]);
+        double original = dataset.GetValue(indexes[sample], targetVariable);
+        if (!double.IsNaN(original) && !double.IsInfinity(original)) {
+          n++;
+          double error = estimated - original;
+          double squaredError = error * error;
+          double delta = squaredError - mean;
+          mean = mean + delta / n;
+          m2 = m2 + delta * (squaredError - mean);
+
+          if (n > minSamples && n % minSamples == 0) {
+            stdDev = Math.Sqrt(Math.Sqrt(m2 / (n - 1)));
+            confidenceInterval = 2.364 * stdDev / Math.Sqrt(n);
+            if (qualityLimit < mean - confidenceInterval || qualityLimit > mean + confidenceInterval) {
+              break;
+            }
+          }
+        }
+      }
+
+      evaluatedSamples.Data = n;
+      mse.Data = mean;
+      stdDev = Math.Sqrt(Math.Sqrt(m2 / (n - 1)));
+      confidenceBounds.Data = 2.364 * stdDev / Math.Sqrt(n);
+    }
+
+    private int[] InitIndexes(MersenneTwister mt, int start, int end) {
+      int n = end - start;
+      int[] indexes = new int[n];
+      for (int i = 0; i < n; i++) indexes[i] = i + start;
+      for (int i = 0; i < n - 1; i++) {
+        int j = mt.Next(i, n);
+        int tmp = indexes[j];
+        indexes[j] = indexes[i];
+        indexes[i] = tmp;
+      }
+      return indexes;
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/VarianceAccountedForEvaluator.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/VarianceAccountedForEvaluator.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Evaluators/VarianceAccountedForEvaluator.cs	(revision 1297)
@@ -0,0 +1,86 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class VarianceAccountedForEvaluator : GPEvaluatorBase {
+    public override string Description {
+      get {
+        return @"Evaluates 'FunctionTree' for all samples of 'DataSet' and calculates 
+the variance-accounted-for quality measure for the estimated values vs. the real values of 'TargetVariable'.
+
+The Variance Accounted For (VAF) function is computed as
+VAF(y,y') = ( 1 - var(y-y')/var(y) )
+where y' denotes the predicted / modelled values for y and var(x) the variance of a signal x.";
+      }
+    }
+
+    /// <summary>
+    /// The Variance Accounted For (VAF) function calculates is computed as
+    /// VAF(y,y') = ( 1 - var(y-y')/var(y) )
+    /// where y' denotes the predicted / modelled values for y and var(x) the variance of a signal x.
+    /// </summary>
+    public VarianceAccountedForEvaluator()
+      : base() {
+      AddVariableInfo(new VariableInfo("VAF", "The variance-accounted-for quality of the model", typeof(DoubleData), VariableKind.New));
+
+    }
+
+    public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
+      int nSamples = end - start;
+      double[] errors = new double[nSamples];
+      double[] originalTargetVariableValues = new double[nSamples];
+      for (int sample = start; sample < end; sample++) {
+        double estimated = evaluator.Evaluate(sample);
+        double original = dataset.GetValue(sample, targetVariable);
+        if (updateTargetValues) {
+          dataset.SetValue(sample, targetVariable, estimated);
+        }
+        if (!double.IsNaN(original) && !double.IsInfinity(original)) {
+          errors[sample - start] = original - estimated;
+          originalTargetVariableValues[sample - start] = original;
+        }
+      }
+      double errorsVariance = Statistics.Variance(errors);
+      double originalsVariance = Statistics.Variance(originalTargetVariableValues);
+      double quality = 1 - errorsVariance / originalsVariance;
+
+      if (double.IsNaN(quality) || double.IsInfinity(quality)) {
+        quality = double.MaxValue;
+      }
+      DoubleData vaf = GetVariableValue<DoubleData>("VAF", scope, false, false);
+      if (vaf == null) {
+        vaf = new DoubleData();
+        scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("VAF"), vaf));
+      }
+
+      vaf.Data = quality;
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Exponential.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Exponential.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Exponential.cs	(revision 1297)
@@ -0,0 +1,43 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Exponential : FunctionBase {
+    public override string Description {
+      get { return "Returns returns exponential of the first sub-tree (power(e, x))."; }
+    }
+
+    public Exponential()
+      : base() {
+      // must have exactly one sub-operator
+      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/FunctionLibraryInjector.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/FunctionLibraryInjector.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/FunctionLibraryInjector.cs	(revision 1297)
@@ -0,0 +1,205 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using System.Xml;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.DataAnalysis;
+using HeuristicLab.Constraints;
+using StructId = HeuristicLab.GP.StructureIdentification;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class FunctionLibraryInjector : OperatorBase {
+    private const string TARGETVARIABLE = "TargetVariable";
+    private const string ALLOWEDFEATURES = "AllowedFeatures";
+    private const string FUNCTIONLIBRARY = "FunctionLibrary";
+
+    public override string Description {
+      get { return @"Injects a default function library for regression and classification problems."; }
+    }
+
+    public FunctionLibraryInjector()
+      : base() {
+      AddVariableInfo(new VariableInfo(TARGETVARIABLE, "The target variable", typeof(IntData), VariableKind.In));
+      AddVariableInfo(new VariableInfo(ALLOWEDFEATURES, "List of indexes of allowed features", typeof(ItemList<IntData>), VariableKind.In));
+      AddVariableInfo(new VariableInfo(FUNCTIONLIBRARY, "Preconfigured default operator library", typeof(GPOperatorLibrary), VariableKind.New));
+    }
+
+    public override IOperation Apply(IScope scope) {
+      StructId.Variable variable;
+      GPOperatorLibrary operatorLibrary;
+
+      ItemList<IntData> allowedFeatures = GetVariableValue<ItemList<IntData>>(ALLOWEDFEATURES, scope, true);
+      int targetVariable = GetVariableValue<IntData>(TARGETVARIABLE, scope, true).Data;
+
+      // remove the target-variable in case it occures in allowed features
+      List<IntData> ts = allowedFeatures.FindAll(d => d.Data == targetVariable);
+      foreach (IntData t in ts) allowedFeatures.Remove(t);
+
+      variable = new StructId.Variable();
+      StructId.Constant constant = new StructId.Constant();
+
+      StructId.Addition addition = new StructId.Addition();
+      StructId.And and = new StructId.And();
+      StructId.Average average = new StructId.Average();
+      StructId.Cosinus cosinus = new StructId.Cosinus();
+      StructId.Division division = new StructId.Division();
+      StructId.Equal equal = new StructId.Equal();
+      StructId.Exponential exponential = new StructId.Exponential();
+      StructId.GreaterThan greaterThan = new StructId.GreaterThan();
+      StructId.IfThenElse ifThenElse = new StructId.IfThenElse();
+      StructId.LessThan lessThan = new StructId.LessThan();
+      StructId.Logarithm logarithm = new StructId.Logarithm();
+      StructId.Multiplication multiplication = new StructId.Multiplication();
+      StructId.Not not = new StructId.Not();
+      StructId.Or or = new StructId.Or();
+      StructId.Power power = new StructId.Power();
+      StructId.Signum signum = new StructId.Signum();
+      StructId.Sinus sinus = new StructId.Sinus();
+      StructId.Sqrt sqrt = new StructId.Sqrt();
+      StructId.Subtraction subtraction = new StructId.Subtraction();
+      StructId.Tangens tangens = new StructId.Tangens();
+      StructId.Xor xor = new StructId.Xor();
+
+      IFunction[] booleanFunctions = new IFunction[] {
+        and,
+        equal,
+        greaterThan,
+        lessThan,
+        not,
+        or,
+        xor 
+      };
+      IFunction[] doubleFunctions = new IFunction[] {
+        variable,
+        constant,
+        addition,
+        average,
+        cosinus,
+        division,
+        exponential,
+        ifThenElse,
+        logarithm,
+        multiplication,
+        power,
+        signum,
+        sinus,
+        sqrt,
+        subtraction,
+        tangens
+      };
+
+      SetAllowedSubOperators(and, booleanFunctions);
+      SetAllowedSubOperators(equal, doubleFunctions);
+      SetAllowedSubOperators(greaterThan, doubleFunctions);
+      SetAllowedSubOperators(lessThan, doubleFunctions);
+      SetAllowedSubOperators(not, booleanFunctions);
+      SetAllowedSubOperators(or, booleanFunctions);
+      SetAllowedSubOperators(xor, booleanFunctions);
+      SetAllowedSubOperators(addition, doubleFunctions);
+      SetAllowedSubOperators(average, doubleFunctions);
+      SetAllowedSubOperators(cosinus, doubleFunctions);
+      SetAllowedSubOperators(division, doubleFunctions);
+      SetAllowedSubOperators(exponential, doubleFunctions);
+      SetAllowedSubOperators(ifThenElse, 0, booleanFunctions);
+      SetAllowedSubOperators(ifThenElse, 1, doubleFunctions);
+      SetAllowedSubOperators(ifThenElse, 2, doubleFunctions);
+      SetAllowedSubOperators(logarithm, doubleFunctions);
+      SetAllowedSubOperators(multiplication, doubleFunctions);
+      SetAllowedSubOperators(power, doubleFunctions);
+      SetAllowedSubOperators(signum, doubleFunctions);
+      SetAllowedSubOperators(sinus, doubleFunctions);
+      SetAllowedSubOperators(sqrt, doubleFunctions);
+      SetAllowedSubOperators(subtraction, doubleFunctions);
+      SetAllowedSubOperators(tangens, doubleFunctions);
+
+      operatorLibrary = new GPOperatorLibrary();
+      operatorLibrary.GPOperatorGroup.AddOperator(variable);
+      operatorLibrary.GPOperatorGroup.AddOperator(constant);
+      operatorLibrary.GPOperatorGroup.AddOperator(addition);
+      operatorLibrary.GPOperatorGroup.AddOperator(average);
+      operatorLibrary.GPOperatorGroup.AddOperator(and);
+      operatorLibrary.GPOperatorGroup.AddOperator(cosinus);
+      operatorLibrary.GPOperatorGroup.AddOperator(division);
+      operatorLibrary.GPOperatorGroup.AddOperator(equal);
+      operatorLibrary.GPOperatorGroup.AddOperator(exponential);
+      operatorLibrary.GPOperatorGroup.AddOperator(greaterThan);
+      operatorLibrary.GPOperatorGroup.AddOperator(ifThenElse);
+      operatorLibrary.GPOperatorGroup.AddOperator(lessThan);
+      operatorLibrary.GPOperatorGroup.AddOperator(logarithm);
+      operatorLibrary.GPOperatorGroup.AddOperator(multiplication);
+      operatorLibrary.GPOperatorGroup.AddOperator(not);
+      operatorLibrary.GPOperatorGroup.AddOperator(power);
+      operatorLibrary.GPOperatorGroup.AddOperator(or);
+      operatorLibrary.GPOperatorGroup.AddOperator(signum);
+      operatorLibrary.GPOperatorGroup.AddOperator(sinus);
+      operatorLibrary.GPOperatorGroup.AddOperator(sqrt);
+      operatorLibrary.GPOperatorGroup.AddOperator(subtraction);
+      operatorLibrary.GPOperatorGroup.AddOperator(tangens);
+      operatorLibrary.GPOperatorGroup.AddOperator(xor);
+
+      int[] allowedIndexes = new int[allowedFeatures.Count];
+      for (int i = 0; i < allowedIndexes.Length; i++) {
+        allowedIndexes[i] = allowedFeatures[i].Data;
+      }
+
+      variable.SetConstraints(allowedIndexes, 0, 0);
+
+      scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName(FUNCTIONLIBRARY), operatorLibrary));
+      return null;
+    }
+
+    private void SetAllowedSubOperators(IFunction f, IFunction[] gs) {
+      foreach (IConstraint c in f.Constraints) {
+        if (c is SubOperatorTypeConstraint) {
+          SubOperatorTypeConstraint typeConstraint = c as SubOperatorTypeConstraint;
+          typeConstraint.Clear();
+          foreach (IFunction g in gs) {
+            typeConstraint.AddOperator(g);
+          }
+        } else if (c is AllSubOperatorsTypeConstraint) {
+          AllSubOperatorsTypeConstraint typeConstraint = c as AllSubOperatorsTypeConstraint;
+          typeConstraint.Clear();
+          foreach (IFunction g in gs) {
+            typeConstraint.AddOperator(g);
+          }
+        }
+      }
+    }
+
+    private void SetAllowedSubOperators(IFunction f, int p, IFunction[] gs) {
+      foreach (IConstraint c in f.Constraints) {
+        if (c is SubOperatorTypeConstraint) {
+          SubOperatorTypeConstraint typeConstraint = c as SubOperatorTypeConstraint;
+          if (typeConstraint.SubOperatorIndex.Data == p) {
+            typeConstraint.Clear();
+            foreach (IFunction g in gs) {
+              typeConstraint.AddOperator(g);
+            }
+          }
+        }
+      }
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/GreaterThan.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/GreaterThan.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/GreaterThan.cs	(revision 1297)
@@ -0,0 +1,43 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Constraints;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class GreaterThan : FunctionBase {
+    public override string Description {
+      get {
+        return @"Greater-than condition. Returns 1.0 if the value of the first sub-tree is greater than the value of the second sub-tree and 0.0 otherwise.";
+      }
+    }
+
+    public GreaterThan()
+      : base() {
+      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+      AddConstraint(new SubOperatorTypeConstraint(1));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/HeuristicLab.GP.StructureIdentification.csproj
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/HeuristicLab.GP.StructureIdentification.csproj	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/HeuristicLab.GP.StructureIdentification.csproj	(revision 1297)
@@ -0,0 +1,216 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" 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>{74223A32-C726-4978-BE78-37113A18373C}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.GP.StructureIdentification</RootNamespace>
+    <AssemblyName>HeuristicLab.GP.StructureIdentification-3.2</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </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>
+  </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>
+  </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>
+  </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>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <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="Addition.cs" />
+    <Compile Include="And.cs" />
+    <Compile Include="Average.cs" />
+    <Compile Include="BakedTreeEvaluator.cs" />
+    <Compile Include="Constant.cs" />
+    <Compile Include="FunctionLibraryInjector.cs" />
+    <Compile Include="OffspringSelectionGP.cs" />
+    <Compile Include="OffSpringSelectionGpEditor.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="OffSpringSelectionGpEditor.Designer.cs">
+      <DependentUpon>OffSpringSelectionGpEditor.cs</DependentUpon>
+    </Compile>
+    <Compile Include="StandardGpEditor.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="StandardGpEditor.Designer.cs">
+      <DependentUpon>StandardGpEditor.cs</DependentUpon>
+    </Compile>
+    <Compile Include="StandardGP.cs" />
+    <Compile Include="Cosinus.cs" />
+    <Compile Include="Differential.cs" />
+    <Compile Include="Division.cs" />
+    <Compile Include="Equal.cs" />
+    <Compile Include="Evaluators\CoefficientOfDeterminationEvaluator.cs" />
+    <Compile Include="Evaluators\UncertainMeanSquaredErrorEvaluator.cs" />
+    <Compile Include="Evaluators\EarlyStoppingMeanSquaredErrorEvaluator.cs" />
+    <Compile Include="Evaluators\GPEvaluatorBase.cs" />
+    <Compile Include="Evaluators\MeanAbsolutePercentageErrorEvaluator.cs" />
+    <Compile Include="Evaluators\MeanSquaredErrorEvaluator.cs" />
+    <Compile Include="Evaluators\SimpleEvaluator.cs" />
+    <Compile Include="Evaluators\VarianceAccountedForEvaluator.cs" />
+    <Compile Include="Exponential.cs" />
+    <Compile Include="GreaterThan.cs" />
+    <Compile Include="HeuristicLabGPStructureIdentificationPlugin.cs" />
+    <Compile Include="IfThenElse.cs" />
+    <Compile Include="LessThan.cs" />
+    <Compile Include="Logarithm.cs" />
+    <Compile Include="ModelAnalyzerExporter.cs" />
+    <Compile Include="Multiplication.cs" />
+    <Compile Include="Not.cs" />
+    <Compile Include="Or.cs" />
+    <Compile Include="Power.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Signum.cs" />
+    <Compile Include="Sinus.cs" />
+    <Compile Include="Sqrt.cs" />
+    <Compile Include="StructIdProblemInjector.cs" />
+    <Compile Include="StructIdProblemInjectorView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="StructIdProblemInjectorView.Designer.cs">
+      <DependentUpon>StructIdProblemInjectorView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Subtraction.cs" />
+    <Compile Include="SymbolicExpressionExporter.cs" />
+    <Compile Include="SymbolTable.cs" />
+    <Compile Include="Tangens.cs" />
+    <Compile Include="Variable.cs" />
+    <Compile Include="Xor.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\HeuristicLab.Constraints\HeuristicLab.Constraints.csproj">
+      <Project>{FCD62C6F-4793-4593-AE9A-0BDCA256EE99}</Project>
+      <Name>HeuristicLab.Constraints</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Core\HeuristicLab.Core.csproj">
+      <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
+      <Name>HeuristicLab.Core</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.DataAnalysis\HeuristicLab.DataAnalysis.csproj">
+      <Project>{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}</Project>
+      <Name>HeuristicLab.DataAnalysis</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Data\HeuristicLab.Data.csproj">
+      <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project>
+      <Name>HeuristicLab.Data</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.GP\HeuristicLab.GP.csproj">
+      <Project>{1F1CF3ED-374C-4288-995B-93F6B872F571}</Project>
+      <Name>HeuristicLab.GP</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Logging\HeuristicLab.Logging.csproj">
+      <Project>{4095C92C-5A4C-44BC-9963-5F384CF5CC3F}</Project>
+      <Name>HeuristicLab.Logging</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Operators.Programmable\HeuristicLab.Operators.Programmable.csproj">
+      <Project>{E3CCBFC6-900C-41B6-AFB8-6646DB097435}</Project>
+      <Name>HeuristicLab.Operators.Programmable</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Operators\HeuristicLab.Operators.csproj">
+      <Project>{A9983BA2-B3B2-475E-8E2C-62050B71D1C5}</Project>
+      <Name>HeuristicLab.Operators</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Random\HeuristicLab.Random.csproj">
+      <Project>{47019A74-F7F7-482E-83AA-D3F4F777E879}</Project>
+      <Name>HeuristicLab.Random</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Selection.OffspringSelection\HeuristicLab.Selection.OffspringSelection.csproj">
+      <Project>{205898D3-2717-4686-AF17-52409B7EC0C6}</Project>
+      <Name>HeuristicLab.Selection.OffspringSelection</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Selection\HeuristicLab.Selection.csproj">
+      <Project>{F7CF0571-25CB-43D5-8443-0843A1E2861A}</Project>
+      <Name>HeuristicLab.Selection</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.SequentialEngine\HeuristicLab.SequentialEngine.csproj">
+      <Project>{B4BE8E53-BA06-4237-9A01-24255F880201}</Project>
+      <Name>HeuristicLab.SequentialEngine</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="OffSpringSelectionGpEditor.resx">
+      <DependentUpon>OffSpringSelectionGpEditor.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="StandardGpEditor.resx">
+      <DependentUpon>StandardGpEditor.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="StructIdProblemInjectorView.resx">
+      <DependentUpon>StructIdProblemInjectorView.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </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>
+</Project>
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/HeuristicLabGPStructureIdentificationPlugin.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/HeuristicLabGPStructureIdentificationPlugin.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/HeuristicLabGPStructureIdentificationPlugin.cs	(revision 1297)
@@ -0,0 +1,39 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  [ClassInfo(Name = "HeuristicLab.GP.StructureIdentification-3.2")]
+  [PluginFile(Filename = "HeuristicLab.GP.StructureIdentification-3.2.dll", Filetype = PluginFileType.Assembly)]
+  [Dependency(Dependency = "HeuristicLab.Constraints-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Core-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Data-3.2")]
+  [Dependency(Dependency = "HeuristicLab.DataAnalysis-3.2")]
+  [Dependency(Dependency = "HeuristicLab.GP-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Operators-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Random-3.2")]
+  public class HeuristicLabGPStructureIdentificationPlugin : PluginBase {
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/IfThenElse.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/IfThenElse.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/IfThenElse.cs	(revision 1297)
@@ -0,0 +1,46 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class IfThenElse : FunctionBase {
+    public override string Description {
+      get {
+        return @"Returns the result of the second sub-tree if the first sub-tree evaluates to a value < 0.5 and the result
+of the third sub-tree if the first sub-tree evaluates to >= 0.5.";
+      }
+    }
+
+    public IfThenElse()
+      : base() {
+      AddConstraint(new NumberOfSubOperatorsConstraint(3, 3));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+      AddConstraint(new SubOperatorTypeConstraint(1));
+      AddConstraint(new SubOperatorTypeConstraint(2));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/LessThan.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/LessThan.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/LessThan.cs	(revision 1297)
@@ -0,0 +1,44 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class LessThan : FunctionBase {
+    public override string Description {
+      get {
+        return @"Less-than condition. Returns 1.0 if the value of the first sub-tree is less than the value of the second sub-tree and 0.0 otherwise.";
+      }
+    }
+
+    public LessThan()
+      : base() {
+      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+      AddConstraint(new SubOperatorTypeConstraint(1));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Logarithm.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Logarithm.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Logarithm.cs	(revision 1297)
@@ -0,0 +1,43 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Logarithm : FunctionBase {
+    public override string Description {
+      get { return "Returns the natural (base e) logarithm of the first sub-tree."; }
+    }
+
+    public Logarithm()
+      : base() {
+      // must have exactly 1 suboperator
+      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/ModelAnalyzerExporter.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/ModelAnalyzerExporter.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/ModelAnalyzerExporter.cs	(revision 1297)
@@ -0,0 +1,221 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class ModelAnalyzerExporter : IFunctionTreeExporter, IFunctionTreeNameGenerator {
+    #region IFunctionTreeExporter Members
+
+    public string Name {
+      get {
+        return "HL2 ModelAnalyzer Exporter";
+      }
+    }
+
+    public bool TryExport(IFunctionTree tree, out string exported) {
+      try {
+        exported = Export(tree);
+        return true;
+      } catch(UnknownFunctionException) {
+        exported = "";
+        return false;
+      }
+    }
+
+    public string Export(IFunctionTree tree) {
+      string result = ExportFunction(tree.Function, tree);
+      result += "(\n";
+      foreach(IFunctionTree subTree in tree.SubTrees) {
+        result += Export(subTree);
+        result += ";\n";
+      }
+      result = result.TrimEnd(';', '\n');
+      if(tree.SubTrees.Count > 0) result += ")";
+      return result;
+    }
+
+    #endregion
+
+    private string ExportFunction(IFunction function, IFunctionTree tree) {
+      // this is smelly, if there is a cleaner way to have a 'dynamic' visitor 
+      // please let me know! (gkronber 14.10.2008)
+      if(function is Addition) return ((Addition)function).ExportToHL2(tree);
+      if(function is And) return ((And)function).ExportToHL2(tree);
+      if(function is Average) return ((Average)function).ExportToHL2(tree);
+      if(function is Constant) return ((Constant)function).ExportToHL2(tree);
+      if(function is Cosinus) return ((Cosinus)function).ExportToHL2(tree);
+      if(function is Differential) return ((Differential)function).ExportToHL2(tree);
+      if(function is Division) return ((Division)function).ExportToHL2(tree);
+      if(function is Equal) return ((Equal)function).ExportToHL2(tree);
+      if(function is Exponential) return ((Exponential)function).ExportToHL2(tree);
+      if(function is GreaterThan) return ((GreaterThan)function).ExportToHL2(tree);
+      if(function is IfThenElse) return ((IfThenElse)function).ExportToHL2(tree);
+      if(function is LessThan) return ((LessThan)function).ExportToHL2(tree);
+      if(function is Logarithm) return ((Logarithm)function).ExportToHL2(tree);
+      if(function is Multiplication) return ((Multiplication)function).ExportToHL2(tree);
+      if(function is Not) return ((Not)function).ExportToHL2(tree);
+      if(function is Or) return ((Or)function).ExportToHL2(tree);
+      if(function is Power) return ((Power)function).ExportToHL2(tree);
+      if(function is Signum) return ((Signum)function).ExportToHL2(tree);
+      if(function is Sinus) return ((Sinus)function).ExportToHL2(tree);
+      if(function is Sqrt) return ((Sqrt)function).ExportToHL2(tree);
+      if(function is Subtraction) return ((Subtraction)function).ExportToHL2(tree);
+      if(function is Tangens) return ((Tangens)function).ExportToHL2(tree);
+      if(function is Variable) return ((Variable)function).ExportToHL2(tree);
+      if(function is Xor) return ((Xor)function).ExportToHL2(tree);
+      throw new UnknownFunctionException(function.Name);
+    }
+
+    #region IFunctionTreeNameGenerator Members
+
+    string IFunctionTreeNameGenerator.Name {
+      get { return "HL2 Representation"; }
+    }
+
+    public string GetName(IFunctionTree tree) {
+      string name = "";
+      try {
+        name = ExportFunction(tree.Function, tree);
+      } catch(UnknownFunctionException) {
+        name = "N/A";
+      }
+      return name;
+    }
+
+    #endregion
+  }
+
+  internal static class HL2ExporterExtensions {
+    private static string GetHL2FunctionName(string name) {
+      return "[F]" + name ;
+    }
+
+    public static string ExportToHL2(this Addition addition, IFunctionTree tree) {
+      return GetHL2FunctionName("Addition[0]");
+    }
+
+    public static string ExportToHL2(this Constant constant, IFunctionTree tree) {
+      double value = ((ConstrainedDoubleData)tree.GetLocalVariable(Constant.VALUE).Value).Data;
+      return "[T]Constant(" + value.ToString("r") + ";0;0)";
+    }
+
+    public static string ExportToHL2(this Cosinus cosinus, IFunctionTree tree) {
+      return GetHL2FunctionName("Trigonometrics[1]");
+    }
+
+    public static string ExportToHL2(this Differential differential, IFunctionTree tree) {
+      double weight = ((ConstrainedDoubleData)tree.GetLocalVariable(Differential.WEIGHT).Value).Data;
+      double index = ((ConstrainedIntData)tree.GetLocalVariable(Differential.INDEX).Value).Data;
+      double offset = ((ConstrainedIntData)tree.GetLocalVariable(Differential.OFFSET).Value).Data;
+
+      return "[T]Differential(" + weight.ToString("r") + ";" + index + ";" + -offset + ")";
+    }
+
+    public static string ExportToHL2(this Division division, IFunctionTree tree) {
+      return GetHL2FunctionName("Division[0]");
+    }
+
+    public static string ExportToHL2(this Exponential exponential, IFunctionTree tree) {
+      return GetHL2FunctionName("Exponential[0]");
+    }
+
+    public static string ExportToHL2(this Logarithm logarithm, IFunctionTree tree) {
+      return GetHL2FunctionName("Logarithm[0]");
+    }
+
+    public static string ExportToHL2(this Multiplication multiplication, IFunctionTree tree) {
+      return GetHL2FunctionName("Multiplication[0]");
+    }
+
+    public static string ExportToHL2(this Power power, IFunctionTree tree) {
+      return GetHL2FunctionName("Power[0]");
+    }
+
+    public static string ExportToHL2(this Signum signum, IFunctionTree tree) {
+      return GetHL2FunctionName("Signum[0]");
+    }
+
+    public static string ExportToHL2(this Sinus sinus, IFunctionTree tree) {
+      return GetHL2FunctionName("Trigonometrics[0]");
+    }
+
+    public static string ExportToHL2(this Sqrt sqrt, IFunctionTree tree) {
+      return GetHL2FunctionName("Sqrt[0]");
+    }
+
+    public static string ExportToHL2(this Subtraction substraction, IFunctionTree tree) {
+      return GetHL2FunctionName("Subtraction[0]");
+    }
+
+    public static string ExportToHL2(this Tangens tangens, IFunctionTree tree) {
+      return GetHL2FunctionName("Trigonometrics[2]");
+    }
+
+    public static string ExportToHL2(this Variable variable, IFunctionTree tree) {
+      double weight = ((ConstrainedDoubleData)tree.GetLocalVariable(Variable.WEIGHT).Value).Data;
+      double index = ((ConstrainedIntData)tree.GetLocalVariable(Variable.INDEX).Value).Data;
+      double offset = ((ConstrainedIntData)tree.GetLocalVariable(Variable.OFFSET).Value).Data;
+
+      return "[T]Variable(" + weight.ToString("r") + ";" + index + ";" + -offset + ")";
+    }
+
+    public static string ExportToHL2(this And and, IFunctionTree tree) {
+      return GetHL2FunctionName("Logical[0]");
+    }
+
+    public static string ExportToHL2(this Average average, IFunctionTree tree) {
+      return GetHL2FunctionName("Average[0]");
+    }
+
+    public static string ExportToHL2(this IfThenElse ifThenElse, IFunctionTree tree) {
+      return GetHL2FunctionName("Conditional[0]");
+    }
+
+    public static string ExportToHL2(this Not not, IFunctionTree tree) {
+      return GetHL2FunctionName("Logical[2]");
+    }
+
+    public static string ExportToHL2(this Or or, IFunctionTree tree) {
+      return GetHL2FunctionName("Logical[1]");
+    }
+
+    public static string ExportToHL2(this Xor xor, IFunctionTree tree) {
+      return GetHL2FunctionName("Logical[3]");
+    }
+
+    public static string ExportToHL2(this Equal equal, IFunctionTree tree) {
+      return GetHL2FunctionName("Boolean[2]");
+    }
+
+    public static string ExportToHL2(this LessThan lessThan, IFunctionTree tree) {
+      return GetHL2FunctionName("Boolean[0]");
+    }
+
+    public static string ExportToHL2(this GreaterThan greaterThan, IFunctionTree tree) {
+      return GetHL2FunctionName("Boolean[4]");
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Multiplication.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Multiplication.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Multiplication.cs	(revision 1297)
@@ -0,0 +1,51 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Constraints;
+using System.Linq;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Multiplication : FunctionBase {
+    public override string Description {
+      get {
+        return @"Returns the product of the results of all sub-tree.
+  (* 3) => 3
+  (* 2 3) => 6
+  (* 3 4 5) => 60";
+      }
+    }
+
+    public Multiplication()
+      : base() {
+      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
+      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+      AddConstraint(new SubOperatorTypeConstraint(1));
+      AddConstraint(new SubOperatorTypeConstraint(2));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Not.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Not.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Not.cs	(revision 1297)
@@ -0,0 +1,43 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Not : FunctionBase {
+    public override string Description {
+      get {
+        return @"Logical NOT operation. Only defined for sub-tree-results 0.0 and 1.0.";
+      }
+    }
+
+    public Not()
+      : base() {
+      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/OffSpringSelectionGpEditor.Designer.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/OffSpringSelectionGpEditor.Designer.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/OffSpringSelectionGpEditor.Designer.cs	(revision 1297)
@@ -0,0 +1,403 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.GP.StructureIdentification {
+  partial class OffspringSelectionGpEditor {
+    /// <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 (chooseOperatorDialog != null) chooseOperatorDialog.Dispose();
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.executeButton = new System.Windows.Forms.Button();
+      this.tabControl = new System.Windows.Forms.TabControl();
+      this.parametersTabPage = new System.Windows.Forms.TabPage();
+      this.viewProblemInitializationButton = new System.Windows.Forms.Button();
+      this.setProblemInitializationButton = new System.Windows.Forms.Button();
+      this.problemInitializationTextBox = new System.Windows.Forms.TextBox();
+      this.setRandomSeedRandomlyCheckBox = new System.Windows.Forms.CheckBox();
+      this.elitesTextBox = new System.Windows.Forms.TextBox();
+      this.problemInitializationLabel = new System.Windows.Forms.Label();
+      this.elitesLabel = new System.Windows.Forms.Label();
+      this.mutationRateTextBox = new System.Windows.Forms.TextBox();
+      this.mutationRateLabel = new System.Windows.Forms.Label();
+      this.maximumGenerationsTextBox = new System.Windows.Forms.TextBox();
+      this.maximumGenerationsLabel = new System.Windows.Forms.Label();
+      this.randomSeedTextBox = new System.Windows.Forms.TextBox();
+      this.populationSizeTextBox = new System.Windows.Forms.TextBox();
+      this.setRandomSeedRandomlyLabel = new System.Windows.Forms.Label();
+      this.randomSeedLabel = new System.Windows.Forms.Label();
+      this.populationSizeLabel = new System.Windows.Forms.Label();
+      this.scopesTabPage = new System.Windows.Forms.TabPage();
+      this.scopeView = new HeuristicLab.Core.ScopeView();
+      this.abortButton = new System.Windows.Forms.Button();
+      this.resetButton = new System.Windows.Forms.Button();
+      this.cloneEngineButton = new System.Windows.Forms.Button();
+      this.selectionPressureTextBox = new System.Windows.Forms.TextBox();
+      this.selectionPressureLabel = new System.Windows.Forms.Label();
+      this.tabControl.SuspendLayout();
+      this.parametersTabPage.SuspendLayout();
+      this.scopesTabPage.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // executeButton
+      // 
+      this.executeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.executeButton.Location = new System.Drawing.Point(0, 396);
+      this.executeButton.Name = "executeButton";
+      this.executeButton.Size = new System.Drawing.Size(75, 23);
+      this.executeButton.TabIndex = 1;
+      this.executeButton.Text = "&Execute";
+      this.executeButton.UseVisualStyleBackColor = true;
+      this.executeButton.Click += new System.EventHandler(this.executeButton_Click);
+      // 
+      // tabControl
+      // 
+      this.tabControl.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.tabControl.Controls.Add(this.parametersTabPage);
+      this.tabControl.Controls.Add(this.scopesTabPage);
+      this.tabControl.Location = new System.Drawing.Point(0, 0);
+      this.tabControl.Name = "tabControl";
+      this.tabControl.SelectedIndex = 0;
+      this.tabControl.Size = new System.Drawing.Size(526, 390);
+      this.tabControl.TabIndex = 0;
+      // 
+      // parametersTabPage
+      // 
+      this.parametersTabPage.Controls.Add(this.selectionPressureTextBox);
+      this.parametersTabPage.Controls.Add(this.selectionPressureLabel);
+      this.parametersTabPage.Controls.Add(this.viewProblemInitializationButton);
+      this.parametersTabPage.Controls.Add(this.setProblemInitializationButton);
+      this.parametersTabPage.Controls.Add(this.problemInitializationTextBox);
+      this.parametersTabPage.Controls.Add(this.setRandomSeedRandomlyCheckBox);
+      this.parametersTabPage.Controls.Add(this.elitesTextBox);
+      this.parametersTabPage.Controls.Add(this.problemInitializationLabel);
+      this.parametersTabPage.Controls.Add(this.elitesLabel);
+      this.parametersTabPage.Controls.Add(this.mutationRateTextBox);
+      this.parametersTabPage.Controls.Add(this.mutationRateLabel);
+      this.parametersTabPage.Controls.Add(this.maximumGenerationsTextBox);
+      this.parametersTabPage.Controls.Add(this.maximumGenerationsLabel);
+      this.parametersTabPage.Controls.Add(this.randomSeedTextBox);
+      this.parametersTabPage.Controls.Add(this.populationSizeTextBox);
+      this.parametersTabPage.Controls.Add(this.setRandomSeedRandomlyLabel);
+      this.parametersTabPage.Controls.Add(this.randomSeedLabel);
+      this.parametersTabPage.Controls.Add(this.populationSizeLabel);
+      this.parametersTabPage.Location = new System.Drawing.Point(4, 22);
+      this.parametersTabPage.Name = "parametersTabPage";
+      this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.parametersTabPage.Size = new System.Drawing.Size(518, 364);
+      this.parametersTabPage.TabIndex = 0;
+      this.parametersTabPage.Text = "Parameters";
+      this.parametersTabPage.UseVisualStyleBackColor = true;
+      // 
+      // viewProblemInitializationButton
+      // 
+      this.viewProblemInitializationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.viewProblemInitializationButton.Location = new System.Drawing.Point(410, 241);
+      this.viewProblemInitializationButton.Name = "viewProblemInitializationButton";
+      this.viewProblemInitializationButton.Size = new System.Drawing.Size(53, 20);
+      this.viewProblemInitializationButton.TabIndex = 14;
+      this.viewProblemInitializationButton.Text = "View...";
+      this.viewProblemInitializationButton.UseVisualStyleBackColor = true;
+      this.viewProblemInitializationButton.Click += new System.EventHandler(this.viewProblemInjectorButton_Click);
+      // 
+      // setProblemInitializationButton
+      // 
+      this.setProblemInitializationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.setProblemInitializationButton.Location = new System.Drawing.Point(469, 241);
+      this.setProblemInitializationButton.Name = "setProblemInitializationButton";
+      this.setProblemInitializationButton.Size = new System.Drawing.Size(43, 20);
+      this.setProblemInitializationButton.TabIndex = 15;
+      this.setProblemInitializationButton.Text = "Set...";
+      this.setProblemInitializationButton.UseVisualStyleBackColor = true;
+      this.setProblemInitializationButton.Click += new System.EventHandler(this.setProblemInitializationButton_Click);
+      // 
+      // problemInitializationTextBox
+      // 
+      this.problemInitializationTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.problemInitializationTextBox.Location = new System.Drawing.Point(218, 241);
+      this.problemInitializationTextBox.Name = "problemInitializationTextBox";
+      this.problemInitializationTextBox.ReadOnly = true;
+      this.problemInitializationTextBox.Size = new System.Drawing.Size(186, 20);
+      this.problemInitializationTextBox.TabIndex = 13;
+      // 
+      // setRandomSeedRandomlyCheckBox
+      // 
+      this.setRandomSeedRandomlyCheckBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.setRandomSeedRandomlyCheckBox.AutoSize = true;
+      this.setRandomSeedRandomlyCheckBox.Location = new System.Drawing.Point(218, 6);
+      this.setRandomSeedRandomlyCheckBox.Name = "setRandomSeedRandomlyCheckBox";
+      this.setRandomSeedRandomlyCheckBox.Size = new System.Drawing.Size(15, 14);
+      this.setRandomSeedRandomlyCheckBox.TabIndex = 1;
+      this.setRandomSeedRandomlyCheckBox.UseVisualStyleBackColor = true;
+      // 
+      // elitesTextBox
+      // 
+      this.elitesTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.elitesTextBox.Location = new System.Drawing.Point(218, 182);
+      this.elitesTextBox.Name = "elitesTextBox";
+      this.elitesTextBox.Size = new System.Drawing.Size(186, 20);
+      this.elitesTextBox.TabIndex = 11;
+      // 
+      // problemInitializationLabel
+      // 
+      this.problemInitializationLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.problemInitializationLabel.AutoSize = true;
+      this.problemInitializationLabel.Location = new System.Drawing.Point(65, 244);
+      this.problemInitializationLabel.Name = "problemInitializationLabel";
+      this.problemInitializationLabel.Size = new System.Drawing.Size(105, 13);
+      this.problemInitializationLabel.TabIndex = 12;
+      this.problemInitializationLabel.Text = "&Problem Initialization:";
+      // 
+      // elitesLabel
+      // 
+      this.elitesLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.elitesLabel.AutoSize = true;
+      this.elitesLabel.Location = new System.Drawing.Point(66, 185);
+      this.elitesLabel.Name = "elitesLabel";
+      this.elitesLabel.Size = new System.Drawing.Size(35, 13);
+      this.elitesLabel.TabIndex = 10;
+      this.elitesLabel.Text = "&Elites:";
+      // 
+      // mutationRateTextBox
+      // 
+      this.mutationRateTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.mutationRateTextBox.Location = new System.Drawing.Point(218, 156);
+      this.mutationRateTextBox.Name = "mutationRateTextBox";
+      this.mutationRateTextBox.Size = new System.Drawing.Size(186, 20);
+      this.mutationRateTextBox.TabIndex = 9;
+      // 
+      // mutationRateLabel
+      // 
+      this.mutationRateLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.mutationRateLabel.AutoSize = true;
+      this.mutationRateLabel.Location = new System.Drawing.Point(66, 159);
+      this.mutationRateLabel.Name = "mutationRateLabel";
+      this.mutationRateLabel.Size = new System.Drawing.Size(77, 13);
+      this.mutationRateLabel.TabIndex = 8;
+      this.mutationRateLabel.Text = "&Mutation Rate:";
+      // 
+      // maximumGenerationsTextBox
+      // 
+      this.maximumGenerationsTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.maximumGenerationsTextBox.Location = new System.Drawing.Point(218, 104);
+      this.maximumGenerationsTextBox.Name = "maximumGenerationsTextBox";
+      this.maximumGenerationsTextBox.Size = new System.Drawing.Size(186, 20);
+      this.maximumGenerationsTextBox.TabIndex = 7;
+      // 
+      // maximumGenerationsLabel
+      // 
+      this.maximumGenerationsLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.maximumGenerationsLabel.AutoSize = true;
+      this.maximumGenerationsLabel.Location = new System.Drawing.Point(65, 107);
+      this.maximumGenerationsLabel.Name = "maximumGenerationsLabel";
+      this.maximumGenerationsLabel.Size = new System.Drawing.Size(114, 13);
+      this.maximumGenerationsLabel.TabIndex = 6;
+      this.maximumGenerationsLabel.Text = "Maximum &Generations:";
+      // 
+      // randomSeedTextBox
+      // 
+      this.randomSeedTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.randomSeedTextBox.Location = new System.Drawing.Point(218, 26);
+      this.randomSeedTextBox.Name = "randomSeedTextBox";
+      this.randomSeedTextBox.Size = new System.Drawing.Size(186, 20);
+      this.randomSeedTextBox.TabIndex = 3;
+      // 
+      // populationSizeTextBox
+      // 
+      this.populationSizeTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.populationSizeTextBox.Location = new System.Drawing.Point(218, 78);
+      this.populationSizeTextBox.Name = "populationSizeTextBox";
+      this.populationSizeTextBox.Size = new System.Drawing.Size(186, 20);
+      this.populationSizeTextBox.TabIndex = 5;
+      // 
+      // setRandomSeedRandomlyLabel
+      // 
+      this.setRandomSeedRandomlyLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.setRandomSeedRandomlyLabel.AutoSize = true;
+      this.setRandomSeedRandomlyLabel.Location = new System.Drawing.Point(65, 6);
+      this.setRandomSeedRandomlyLabel.Name = "setRandomSeedRandomlyLabel";
+      this.setRandomSeedRandomlyLabel.Size = new System.Drawing.Size(147, 13);
+      this.setRandomSeedRandomlyLabel.TabIndex = 0;
+      this.setRandomSeedRandomlyLabel.Text = "Set &Random Seed Randomly:";
+      // 
+      // randomSeedLabel
+      // 
+      this.randomSeedLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.randomSeedLabel.AutoSize = true;
+      this.randomSeedLabel.Location = new System.Drawing.Point(65, 29);
+      this.randomSeedLabel.Name = "randomSeedLabel";
+      this.randomSeedLabel.Size = new System.Drawing.Size(78, 13);
+      this.randomSeedLabel.TabIndex = 2;
+      this.randomSeedLabel.Text = "&Random Seed:";
+      // 
+      // populationSizeLabel
+      // 
+      this.populationSizeLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.populationSizeLabel.AutoSize = true;
+      this.populationSizeLabel.Location = new System.Drawing.Point(65, 81);
+      this.populationSizeLabel.Name = "populationSizeLabel";
+      this.populationSizeLabel.Size = new System.Drawing.Size(83, 13);
+      this.populationSizeLabel.TabIndex = 4;
+      this.populationSizeLabel.Text = "&Population Size:";
+      // 
+      // scopesTabPage
+      // 
+      this.scopesTabPage.Controls.Add(this.scopeView);
+      this.scopesTabPage.Location = new System.Drawing.Point(4, 22);
+      this.scopesTabPage.Name = "scopesTabPage";
+      this.scopesTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.scopesTabPage.Size = new System.Drawing.Size(518, 364);
+      this.scopesTabPage.TabIndex = 2;
+      this.scopesTabPage.Text = "Scopes";
+      this.scopesTabPage.UseVisualStyleBackColor = true;
+      // 
+      // scopeView
+      // 
+      this.scopeView.Caption = "Scope";
+      this.scopeView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.scopeView.Location = new System.Drawing.Point(3, 3);
+      this.scopeView.Name = "scopeView";
+      this.scopeView.Scope = null;
+      this.scopeView.Size = new System.Drawing.Size(512, 358);
+      this.scopeView.TabIndex = 0;
+      // 
+      // abortButton
+      // 
+      this.abortButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.abortButton.Enabled = false;
+      this.abortButton.Location = new System.Drawing.Point(81, 396);
+      this.abortButton.Name = "abortButton";
+      this.abortButton.Size = new System.Drawing.Size(75, 23);
+      this.abortButton.TabIndex = 2;
+      this.abortButton.Text = "&Abort";
+      this.abortButton.UseVisualStyleBackColor = true;
+      this.abortButton.Click += new System.EventHandler(this.abortButton_Click);
+      // 
+      // resetButton
+      // 
+      this.resetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.resetButton.Location = new System.Drawing.Point(162, 396);
+      this.resetButton.Name = "resetButton";
+      this.resetButton.Size = new System.Drawing.Size(75, 23);
+      this.resetButton.TabIndex = 3;
+      this.resetButton.Text = "&Reset";
+      this.resetButton.UseVisualStyleBackColor = true;
+      this.resetButton.Click += new System.EventHandler(this.resetButton_Click);
+      // 
+      // cloneEngineButton
+      // 
+      this.cloneEngineButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.cloneEngineButton.Location = new System.Drawing.Point(420, 396);
+      this.cloneEngineButton.Name = "cloneEngineButton";
+      this.cloneEngineButton.Size = new System.Drawing.Size(106, 23);
+      this.cloneEngineButton.TabIndex = 4;
+      this.cloneEngineButton.Text = "&Clone Engine...";
+      this.cloneEngineButton.UseVisualStyleBackColor = true;
+      this.cloneEngineButton.Click += new System.EventHandler(this.cloneEngineButton_Click);
+      // 
+      // selectionPressureTextBox
+      // 
+      this.selectionPressureTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.selectionPressureTextBox.Location = new System.Drawing.Point(218, 130);
+      this.selectionPressureTextBox.Name = "selectionPressureTextBox";
+      this.selectionPressureTextBox.Size = new System.Drawing.Size(186, 20);
+      this.selectionPressureTextBox.TabIndex = 17;
+      // 
+      // selectionPressureLabel
+      // 
+      this.selectionPressureLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.selectionPressureLabel.AutoSize = true;
+      this.selectionPressureLabel.Location = new System.Drawing.Point(65, 133);
+      this.selectionPressureLabel.Name = "selectionPressureLabel";
+      this.selectionPressureLabel.Size = new System.Drawing.Size(145, 13);
+      this.selectionPressureLabel.TabIndex = 16;
+      this.selectionPressureLabel.Text = "Maximum &Selection Pressure:";
+      // 
+      // OffspringSelectionGpEditor
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.tabControl);
+      this.Controls.Add(this.cloneEngineButton);
+      this.Controls.Add(this.resetButton);
+      this.Controls.Add(this.abortButton);
+      this.Controls.Add(this.executeButton);
+      this.Name = "OffspringSelectionGpEditor";
+      this.Size = new System.Drawing.Size(526, 419);
+      this.tabControl.ResumeLayout(false);
+      this.parametersTabPage.ResumeLayout(false);
+      this.parametersTabPage.PerformLayout();
+      this.scopesTabPage.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Button executeButton;
+    private System.Windows.Forms.TabControl tabControl;
+    private System.Windows.Forms.TabPage parametersTabPage;
+    private System.Windows.Forms.Button abortButton;
+    private System.Windows.Forms.Button resetButton;
+    private System.Windows.Forms.TextBox mutationRateTextBox;
+    private System.Windows.Forms.Label mutationRateLabel;
+    private System.Windows.Forms.TextBox populationSizeTextBox;
+    private System.Windows.Forms.Label populationSizeLabel;
+    private System.Windows.Forms.TabPage scopesTabPage;
+    private System.Windows.Forms.TextBox maximumGenerationsTextBox;
+    private System.Windows.Forms.Label maximumGenerationsLabel;
+    private System.Windows.Forms.TextBox elitesTextBox;
+    private System.Windows.Forms.Label elitesLabel;
+    private System.Windows.Forms.TextBox randomSeedTextBox;
+    private System.Windows.Forms.Label setRandomSeedRandomlyLabel;
+    private System.Windows.Forms.Label randomSeedLabel;
+    private System.Windows.Forms.CheckBox setRandomSeedRandomlyCheckBox;
+    private System.Windows.Forms.Label problemInitializationLabel;
+    private System.Windows.Forms.Button cloneEngineButton;
+    private System.Windows.Forms.TextBox problemInitializationTextBox;
+    private System.Windows.Forms.Button setProblemInitializationButton;
+    private HeuristicLab.Core.ScopeView scopeView;
+    private System.Windows.Forms.Button viewProblemInitializationButton;
+    private System.Windows.Forms.TextBox selectionPressureTextBox;
+    private System.Windows.Forms.Label selectionPressureLabel;
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/OffSpringSelectionGpEditor.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/OffSpringSelectionGpEditor.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/OffSpringSelectionGpEditor.cs	(revision 1297)
@@ -0,0 +1,135 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public partial class OffspringSelectionGpEditor : EditorBase {
+    private ChooseOperatorDialog chooseOperatorDialog;
+
+    public OffspringSelectionGP OffspringSelectionGP {
+      get { return (OffspringSelectionGP)Item; }
+      set { base.Item = value; }
+    }
+
+    public OffspringSelectionGpEditor() {
+      InitializeComponent();
+    }
+    public OffspringSelectionGpEditor(OffspringSelectionGP osgp)
+      : this() {
+      OffspringSelectionGP = osgp;
+    }
+
+    protected override void RemoveItemEvents() {
+      OffspringSelectionGP.Engine.ExceptionOccurred -= new EventHandler<ExceptionEventArgs>(Engine_ExceptionOccurred);
+      OffspringSelectionGP.Engine.Finished -= new EventHandler(Engine_Finished);
+      scopeView.Scope = null;
+      base.RemoveItemEvents();
+    }
+    protected override void AddItemEvents() {
+      base.AddItemEvents();
+      OffspringSelectionGP.Engine.ExceptionOccurred += new EventHandler<ExceptionEventArgs>(Engine_ExceptionOccurred);
+      OffspringSelectionGP.Engine.Finished += new EventHandler(Engine_Finished);
+      SetDataBinding();
+      scopeView.Scope = OffspringSelectionGP.Engine.GlobalScope;
+    }
+
+    protected override void UpdateControls() {
+      base.UpdateControls();
+      if (OffspringSelectionGP == null) {
+        tabControl.Enabled = false;
+      } else {
+        tabControl.Enabled = true;
+        problemInitializationTextBox.Text = OffspringSelectionGP.ProblemInjector.GetType().Name;
+      }
+    }
+
+    private void SetDataBinding() {
+      setRandomSeedRandomlyCheckBox.DataBindings.Add("Checked", OffspringSelectionGP, "SetSeedRandomly");
+      randomSeedTextBox.DataBindings.Add("Text", OffspringSelectionGP, "Seed");
+      populationSizeTextBox.DataBindings.Add("Text", OffspringSelectionGP, "PopulationSize");
+      maximumGenerationsTextBox.DataBindings.Add("Text", OffspringSelectionGP, "MaxGenerations");
+      selectionPressureTextBox.DataBindings.Add("Text", OffspringSelectionGP, "SelectionPressureLimit");
+      mutationRateTextBox.DataBindings.Add("Text", OffspringSelectionGP, "MutationRate");
+      elitesTextBox.DataBindings.Add("Text", OffspringSelectionGP, "Elites");
+    }
+
+    #region Button Events
+    private void viewProblemInjectorButton_Click(object sender, EventArgs e) {
+      IView view = OffspringSelectionGP.ProblemInjector.CreateView();
+      if(view != null)
+        PluginManager.ControlManager.ShowControl(view);
+    }
+
+    private void setProblemInitializationButton_Click(object sender, EventArgs e) {
+      if (chooseOperatorDialog == null) chooseOperatorDialog = new ChooseOperatorDialog();
+      if (chooseOperatorDialog.ShowDialog(this) == DialogResult.OK) {
+        OffspringSelectionGP.ProblemInjector = chooseOperatorDialog.Operator;
+        problemInitializationTextBox.Text = OffspringSelectionGP.ProblemInjector.GetType().Name;
+      }
+    }
+    private void executeButton_Click(object sender, EventArgs e) {
+      executeButton.Enabled = false;
+      abortButton.Enabled = true;
+      resetButton.Enabled = false;
+      OffspringSelectionGP.Engine.Execute();
+    }
+    private void abortButton_Click(object sender, EventArgs e) {
+      OffspringSelectionGP.Engine.Abort();
+    }
+    private void resetButton_Click(object sender, EventArgs e) {
+      OffspringSelectionGP.Engine.Reset();
+    }
+    private void cloneEngineButton_Click(object sender, EventArgs e) {
+      IEngine clone = (IEngine)OffspringSelectionGP.Engine.Clone();
+      IEditor editor = ((IEditable)clone).CreateEditor();
+      PluginManager.ControlManager.ShowControl(editor);
+    }
+    #endregion
+
+    #region Engine Events
+    private delegate void OnExceptionEventDelegate(object sender, ExceptionEventArgs e);
+    private void Engine_ExceptionOccurred(object sender, ExceptionEventArgs e) {
+      if (InvokeRequired)
+        Invoke(new OnExceptionEventDelegate(Engine_ExceptionOccurred), sender, e);
+      else
+        Auxiliary.ShowErrorMessageBox(e.Exception);
+    }
+    private void Engine_Finished(object sender, EventArgs e) {
+      if(InvokeRequired)
+        Invoke((EventHandler)Engine_Finished, sender, e);
+      else {
+        scopeView.Refresh();
+        executeButton.Enabled = true;
+        abortButton.Enabled = false;
+      }
+    }
+    #endregion
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/OffSpringSelectionGpEditor.resx
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/OffSpringSelectionGpEditor.resx	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/OffSpringSelectionGpEditor.resx	(revision 1297)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/OffspringSelectionGP.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/OffspringSelectionGP.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/OffspringSelectionGP.cs	(revision 1297)
@@ -0,0 +1,575 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using System.Xml;
+using System.Diagnostics;
+using HeuristicLab.DataAnalysis;
+using HeuristicLab.Operators;
+using HeuristicLab.Random;
+using HeuristicLab.Selection;
+using HeuristicLab.Logging;
+using HeuristicLab.Data;
+using HeuristicLab.Operators.Programmable;
+using HeuristicLab.Selection.OffspringSelection;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class OffspringSelectionGP : ItemBase, IEditable {
+    private IntData maxGenerations = new IntData();
+    public int MaxGenerations {
+      get { return maxGenerations.Data; }
+      set { maxGenerations.Data = value; }
+    }
+
+    private DoubleData mutationRate = new DoubleData();
+    public double MutationRate {
+      get { return mutationRate.Data; }
+      set { mutationRate.Data = value; }
+    }
+
+    private IntData parents = new IntData();
+    private IntData populationSize = new IntData();
+    public int PopulationSize {
+      get { return populationSize.Data; }
+      set {
+        populationSize.Data = value;
+      }
+    }
+
+    private BoolData setSeedRandomly = new BoolData();
+    public bool SetSeedRandomly {
+      get { return setSeedRandomly.Data; }
+      set { setSeedRandomly.Data = value; }
+    }
+
+    private IntData seed = new IntData();
+    public int Seed {
+      get { return seed.Data; }
+      set { seed.Data = value; }
+    }
+
+    public IOperator ProblemInjector {
+      get { return algorithm.SubOperators[0]; }
+      set {
+        value.Name = "ProblemInjector";
+        algorithm.RemoveSubOperator(0);
+        algorithm.AddSubOperator(value, 0);
+      }
+    }
+
+    private IntData elites = new IntData();
+    public int Elites {
+      get { return elites.Data; }
+      set { elites.Data = value; }
+    }
+
+    private IntData maxTreeSize = new IntData();
+    public int MaxTreeSize {
+      get { return maxTreeSize.Data; }
+      set { maxTreeSize.Data = value; }
+    }
+
+    private IntData maxTreeHeight = new IntData();
+    public int MaxTreeHeight {
+      get { return maxTreeHeight.Data; }
+      set { maxTreeHeight.Data = value; }
+    }
+
+    private DoubleData selectionPressureLimit = new DoubleData();
+    public double SelectionPressureLimit {
+      get { return selectionPressureLimit.Data; }
+      set { selectionPressureLimit.Data = value; }
+    }
+
+    private DoubleData comparisonFactor = new DoubleData();
+    public double ComparisonFactor {
+      get { return comparisonFactor.Data; }
+      set { comparisonFactor.Data = value; }
+    }
+
+    private DoubleData successRatioLimit = new DoubleData();
+    public double SuccessRatioLimit {
+      get { return successRatioLimit.Data; }
+      set { successRatioLimit.Data = value; }
+    }
+
+    private double punishmentFactor = 10.0;
+    private bool useEstimatedTargetValue = false;
+    private double fullTreeShakingFactor = 0.1;
+    private double onepointShakingFactor = 1.0;
+    private IOperator algorithm;
+
+    private SequentialEngine.SequentialEngine engine;
+    public IEngine Engine {
+      get { return engine; }
+    }
+
+    public OffspringSelectionGP() {
+      PopulationSize = 1000;
+      parents.Data = 20;
+      MaxGenerations = 100;
+      MutationRate = 0.15;
+      Elites = 1;
+      SelectionPressureLimit = 300;
+      ComparisonFactor = 1.0;
+      SuccessRatioLimit = 1.0;
+      MaxTreeHeight = 10;
+      MaxTreeSize = 100;
+      engine = new SequentialEngine.SequentialEngine();
+      CombinedOperator algo = CreateAlgorithm();
+      engine.OperatorGraph.AddOperator(algo);
+      engine.OperatorGraph.InitialOperator = algo;
+    }
+
+    private CombinedOperator CreateAlgorithm() {
+      CombinedOperator algo = new CombinedOperator();
+      algo.Name = "OffspringSelectionGP";
+      SequentialProcessor seq = new SequentialProcessor();
+      EmptyOperator problemInjectorPlaceholder = new EmptyOperator();
+      RandomInjector randomInjector = new RandomInjector();
+      randomInjector.GetVariable("SetSeedRandomly").Value = setSeedRandomly;
+      randomInjector.GetVariable("Seed").Value = seed;
+      randomInjector.Name = "Random Injector";
+      VariableInjector globalInjector = CreateGlobalInjector();
+      CombinedOperator initialization = CreateInitialization();
+      initialization.Name = "Initialization";
+      FunctionLibraryInjector funLibInjector = new FunctionLibraryInjector();
+      CombinedOperator mainLoop = CreateMainLoop();
+      mainLoop.Name = "Main loop";
+
+      ProbabilisticTreeCreator treeCreator = new ProbabilisticTreeCreator();
+      treeCreator.Name = "Tree generator";
+      treeCreator.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      treeCreator.GetVariableInfo("MinTreeSize").Local = true;
+      treeCreator.AddVariable(new HeuristicLab.Core.Variable("MinTreeSize", new IntData(3)));
+      MeanSquaredErrorEvaluator evaluator = new MeanSquaredErrorEvaluator();
+      evaluator.GetVariableInfo("MSE").ActualName = "Quality";
+      evaluator.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";
+      evaluator.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";
+      evaluator.Name = "Evaluator";
+      StandardCrossOver crossover = new StandardCrossOver();
+      crossover.Name = "Crossover";
+      crossover.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      CombinedOperator manipulator = CreateManipulator();
+      manipulator.Name = "Manipulator";
+      CombinedOperator selector = CreateSelector();
+      selector.Name = "Selector";
+      LeftReducer cleanUp = new LeftReducer();
+
+      seq.AddSubOperator(problemInjectorPlaceholder);
+      seq.AddSubOperator(randomInjector);
+      seq.AddSubOperator(globalInjector);
+      seq.AddSubOperator(funLibInjector);
+      seq.AddSubOperator(initialization);
+      seq.AddSubOperator(mainLoop);
+      seq.AddSubOperator(cleanUp);
+
+      initialization.AddSubOperator(treeCreator);
+      initialization.AddSubOperator(evaluator);
+
+      mainLoop.AddSubOperator(selector);
+      mainLoop.AddSubOperator(crossover);
+      mainLoop.AddSubOperator(manipulator);
+      mainLoop.AddSubOperator(evaluator);
+      algo.OperatorGraph.AddOperator(seq);
+      algo.OperatorGraph.InitialOperator = seq;
+      this.algorithm = seq;
+      return algo;
+    }
+
+    private VariableInjector CreateGlobalInjector() {
+      VariableInjector injector = new VariableInjector();
+      injector.Name = "Global Injector";
+      injector.AddVariable(new HeuristicLab.Core.Variable("ComparisonFactor", comparisonFactor));
+      injector.AddVariable(new HeuristicLab.Core.Variable("Elites", elites));
+      injector.AddVariable(new HeuristicLab.Core.Variable("EvaluatedSolutions", new IntData(0)));
+      injector.AddVariable(new HeuristicLab.Core.Variable("Generations", new IntData(0)));
+      injector.AddVariable(new HeuristicLab.Core.Variable("Maximization", new BoolData(false)));
+      injector.AddVariable(new HeuristicLab.Core.Variable("MaxGenerations", maxGenerations));
+      injector.AddVariable(new HeuristicLab.Core.Variable("MaxTreeHeight", maxTreeHeight));
+      injector.AddVariable(new HeuristicLab.Core.Variable("MaxTreeSize", maxTreeSize));
+      injector.AddVariable(new HeuristicLab.Core.Variable("MutationRate", mutationRate));
+      injector.AddVariable(new HeuristicLab.Core.Variable("Parents", parents));
+      injector.AddVariable(new HeuristicLab.Core.Variable("PopulationSize", populationSize));
+      injector.AddVariable(new HeuristicLab.Core.Variable("PunishmentFactor", new DoubleData(punishmentFactor)));
+      injector.AddVariable(new HeuristicLab.Core.Variable("SelectionPressureLimit", selectionPressureLimit));
+      injector.AddVariable(new HeuristicLab.Core.Variable("SuccessRatioLimit", successRatioLimit));
+      injector.AddVariable(new HeuristicLab.Core.Variable("TotalEvaluatedNodes", new DoubleData(0)));
+      injector.AddVariable(new HeuristicLab.Core.Variable("UseEstimatedTargetValue", new BoolData(useEstimatedTargetValue)));
+      return injector;
+    }
+
+    private CombinedOperator CreateManipulator() {
+      CombinedOperator manipulator = new CombinedOperator();
+      StochasticMultiBranch multibranch = new StochasticMultiBranch();
+      FullTreeShaker fullTreeShaker = new FullTreeShaker();
+      fullTreeShaker.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      fullTreeShaker.GetVariableInfo("ShakingFactor").Local = true;
+      fullTreeShaker.AddVariable(new HeuristicLab.Core.Variable("ShakingFactor", new DoubleData(fullTreeShakingFactor)));
+
+      OnePointShaker onepointShaker = new OnePointShaker();
+      onepointShaker.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      onepointShaker.GetVariableInfo("ShakingFactor").Local = true;
+      onepointShaker.AddVariable(new HeuristicLab.Core.Variable("ShakingFactor", new DoubleData(onepointShakingFactor)));
+      ChangeNodeTypeManipulation changeNodeTypeManipulation = new ChangeNodeTypeManipulation();
+      changeNodeTypeManipulation.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      CutOutNodeManipulation cutOutNodeManipulation = new CutOutNodeManipulation();
+      cutOutNodeManipulation.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      DeleteSubTreeManipulation deleteSubTreeManipulation = new DeleteSubTreeManipulation();
+      deleteSubTreeManipulation.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      SubstituteSubTreeManipulation substituteSubTreeManipulation = new SubstituteSubTreeManipulation();
+      substituteSubTreeManipulation.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+
+      IOperator[] manipulators = new IOperator[] {
+        onepointShaker, fullTreeShaker,
+        changeNodeTypeManipulation,
+        cutOutNodeManipulation,
+        deleteSubTreeManipulation,
+        substituteSubTreeManipulation};
+
+      DoubleArrayData probabilities = new DoubleArrayData(new double[manipulators.Length]);
+      for (int i = 0; i < manipulators.Length; i++) {
+        probabilities.Data[i] = 1.0;
+        multibranch.AddSubOperator(manipulators[i]);
+      }
+      multibranch.GetVariableInfo("Probabilities").Local = true;
+      multibranch.AddVariable(new HeuristicLab.Core.Variable("Probabilities", probabilities));
+
+      manipulator.OperatorGraph.AddOperator(multibranch);
+      manipulator.OperatorGraph.InitialOperator = multibranch;
+      return manipulator;
+    }
+
+    private CombinedOperator CreateInitialization() {
+      CombinedOperator init = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      SubScopesCreater subScopesCreater = new SubScopesCreater();
+      subScopesCreater.GetVariableInfo("SubScopes").ActualName = "PopulationSize";
+      UniformSequentialSubScopesProcessor subScopesProc = new UniformSequentialSubScopesProcessor();
+      SequentialProcessor individualSeq = new SequentialProcessor();
+      OperatorExtractor treeCreater = new OperatorExtractor();
+      treeCreater.Name = "Tree generator (extr.)";
+      treeCreater.GetVariableInfo("Operator").ActualName = "Tree generator";
+      OperatorExtractor evaluator = new OperatorExtractor();
+      evaluator.Name = "Evaluator (extr.)";
+      evaluator.GetVariableInfo("Operator").ActualName = "Evaluator";
+      MeanSquaredErrorEvaluator validationEvaluator = new MeanSquaredErrorEvaluator();
+      validationEvaluator.GetVariableInfo("MSE").ActualName = "ValidationQuality";
+      validationEvaluator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
+      validationEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
+      Counter evalCounter = new Counter();
+      evalCounter.GetVariableInfo("Value").ActualName = "EvaluatedSolutions";
+      Sorter sorter = new Sorter();
+      sorter.GetVariableInfo("Descending").ActualName = "Maximization";
+      sorter.GetVariableInfo("Value").ActualName = "Quality";
+      seq.AddSubOperator(subScopesCreater);
+      seq.AddSubOperator(subScopesProc);
+      seq.AddSubOperator(sorter);
+      subScopesProc.AddSubOperator(individualSeq);
+      individualSeq.AddSubOperator(treeCreater);
+      individualSeq.AddSubOperator(evaluator);
+      individualSeq.AddSubOperator(validationEvaluator);
+      individualSeq.AddSubOperator(evalCounter);
+
+      init.OperatorGraph.AddOperator(seq);
+      init.OperatorGraph.InitialOperator = seq;
+      return init;
+    }
+
+    private CombinedOperator CreateSelector() {
+      CombinedOperator selector = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      seq.Name = "Selector";
+      EmptyOperator emptyOp = new EmptyOperator();
+      ProportionalSelector femaleSelector = new ProportionalSelector();
+      femaleSelector.GetVariableInfo("Selected").ActualName = "Parents";
+      femaleSelector.GetVariableValue<BoolData>("CopySelected", null, false).Data = true;
+
+      RandomSelector maleSelector = new RandomSelector();
+      maleSelector.GetVariableInfo("Selected").ActualName = "Parents";
+      maleSelector.GetVariableValue<BoolData>("CopySelected", null, false).Data = true;
+      SequentialSubScopesProcessor seqSubScopesProc = new SequentialSubScopesProcessor();
+      RightChildReducer rightChildReducer = new RightChildReducer();
+      SubScopesMixer mixer = new SubScopesMixer();
+
+      seqSubScopesProc.AddSubOperator(femaleSelector);
+      seqSubScopesProc.AddSubOperator(emptyOp);
+
+      seq.AddSubOperator(maleSelector);
+      seq.AddSubOperator(seqSubScopesProc);
+      seq.AddSubOperator(rightChildReducer);
+      seq.AddSubOperator(mixer);
+
+      selector.OperatorGraph.AddOperator(seq);
+      selector.OperatorGraph.InitialOperator = seq;
+      return selector;
+    }
+
+    private CombinedOperator CreateMainLoop() {
+      CombinedOperator main = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      SequentialProcessor offspringSelectionSeq = new SequentialProcessor();
+      SequentialSubScopesProcessor subScopesProc = new SequentialSubScopesProcessor();
+      EmptyOperator emptyOp = new EmptyOperator();
+      OffspringSelector offspringSelector = new OffspringSelector();
+
+      OperatorExtractor selector = new OperatorExtractor();
+      selector.Name = "Selector (extr.)";
+      selector.GetVariableInfo("Operator").ActualName = "Selector";
+
+      CombinedOperator childCreater = CreateChildCreater();
+      childCreater.Name = "Create children";
+      CombinedOperator replacement = CreateReplacement();
+      replacement.Name = "Replacement";
+      BestSolutionStorer solutionStorer = CreateBestSolutionStorer();
+      BestAverageWorstQualityCalculator qualityCalculator = new BestAverageWorstQualityCalculator();
+      BestAverageWorstQualityCalculator validationQualityCalculator = new BestAverageWorstQualityCalculator();
+      validationQualityCalculator.Name = "ValidationQualityCalculator";
+      validationQualityCalculator.GetVariableInfo("BestQuality").ActualName = "BestValidationQuality";
+      validationQualityCalculator.GetVariableInfo("AverageQuality").ActualName = "AverageValidationQuality";
+      validationQualityCalculator.GetVariableInfo("WorstQuality").ActualName = "WorstValidationQuality";
+      DataCollector collector = new DataCollector();
+      ItemList<StringData> names = collector.GetVariable("VariableNames").GetValue<ItemList<StringData>>();
+      names.Add(new StringData("BestQuality"));
+      names.Add(new StringData("AverageQuality"));
+      names.Add(new StringData("WorstQuality"));
+      names.Add(new StringData("BestValidationQuality"));
+      names.Add(new StringData("AverageValidationQuality"));
+      names.Add(new StringData("WorstValidationQuality"));
+      LinechartInjector lineChartInjector = new LinechartInjector();
+      lineChartInjector.GetVariableInfo("Linechart").ActualName = "Quality Linechart";
+      lineChartInjector.GetVariable("NumberOfLines").GetValue<IntData>().Data = 6;
+      QualityLogger qualityLogger = new QualityLogger();
+      QualityLogger validationQualityLogger = new QualityLogger();
+      validationQualityCalculator.Name = "ValidationQualityLogger";
+      validationQualityLogger.GetVariableInfo("Quality").ActualName = "ValidationQuality";
+      validationQualityLogger.GetVariableInfo("QualityLog").ActualName = "ValidationQualityLog";
+      Counter counter = new Counter();
+      counter.GetVariableInfo("Value").ActualName = "Generations";
+      LessThanComparator selPresComparator = new LessThanComparator();
+      selPresComparator.GetVariableInfo("LeftSide").ActualName = "SelectionPressure";
+      selPresComparator.GetVariableInfo("RightSide").ActualName = "SelectionPressureLimit";
+      selPresComparator.GetVariableInfo("Result").ActualName = "SelectionPressureCondition";
+      LessThanComparator generationsComparator = new LessThanComparator();
+      generationsComparator.GetVariableInfo("LeftSide").ActualName = "Generations";
+      generationsComparator.GetVariableInfo("RightSide").ActualName = "MaxGenerations";
+      generationsComparator.GetVariableInfo("Result").ActualName = "GenerationsCondition";
+      ConditionalBranch selPresCondition = new ConditionalBranch();
+      selPresCondition.GetVariableInfo("Condition").ActualName = "SelectionPressureCondition";
+      ConditionalBranch generationsCondition = new ConditionalBranch();
+      generationsCondition.GetVariableInfo("Condition").ActualName = "GenerationsCondition";
+
+      subScopesProc.AddSubOperator(emptyOp);
+      subScopesProc.AddSubOperator(childCreater);
+
+      offspringSelector.AddSubOperator(offspringSelectionSeq);
+
+      offspringSelectionSeq.AddSubOperator(selector);
+      offspringSelectionSeq.AddSubOperator(subScopesProc);
+      offspringSelectionSeq.AddSubOperator(offspringSelector);
+
+      seq.AddSubOperator(offspringSelectionSeq);
+      seq.AddSubOperator(replacement);
+      seq.AddSubOperator(solutionStorer);
+      seq.AddSubOperator(qualityCalculator);
+      seq.AddSubOperator(validationQualityCalculator);
+      seq.AddSubOperator(collector);
+      seq.AddSubOperator(lineChartInjector);
+      seq.AddSubOperator(qualityLogger);
+      seq.AddSubOperator(validationQualityLogger);
+      seq.AddSubOperator(counter);
+      seq.AddSubOperator(selPresComparator);
+      seq.AddSubOperator(generationsComparator);
+      seq.AddSubOperator(selPresCondition);
+      selPresCondition.AddSubOperator(generationsCondition);
+      generationsCondition.AddSubOperator(seq);
+
+      main.OperatorGraph.AddOperator(seq);
+      main.OperatorGraph.InitialOperator = seq;
+      return main;
+    }
+
+    private BestSolutionStorer CreateBestSolutionStorer() {
+      BestSolutionStorer solutionStorer = new BestSolutionStorer();
+      solutionStorer.GetVariableInfo("Quality").ActualName = "ValidationQuality";
+      solutionStorer.GetVariableInfo("BestSolution").ActualName = "BestValidationSolution";
+      SequentialProcessor bestSolutionProcessor = new SequentialProcessor();
+      MeanAbsolutePercentageErrorEvaluator trainingMapeEvaluator = new MeanAbsolutePercentageErrorEvaluator();
+      trainingMapeEvaluator.Name = "TrainingMapeEvaluator";
+      trainingMapeEvaluator.GetVariableInfo("MAPE").ActualName = "TrainingMAPE";
+      trainingMapeEvaluator.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";
+      trainingMapeEvaluator.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";
+      MeanAbsolutePercentageErrorEvaluator validationMapeEvaluator = new MeanAbsolutePercentageErrorEvaluator();
+      validationMapeEvaluator.Name = "ValidationMapeEvaluator";
+      validationMapeEvaluator.GetVariableInfo("MAPE").ActualName = "ValidationMAPE";
+      validationMapeEvaluator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
+      validationMapeEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
+      ProgrammableOperator progOperator = new ProgrammableOperator();
+      progOperator.RemoveVariableInfo("Result");
+      progOperator.AddVariableInfo(new HeuristicLab.Core.VariableInfo("EvaluatedSolutions", "", typeof(IntData), VariableKind.In));
+      progOperator.AddVariableInfo(new HeuristicLab.Core.VariableInfo("SelectionPressure", "", typeof(DoubleData), VariableKind.In));
+      progOperator.Code = @"
+int evalSolutions = EvaluatedSolutions.Data;
+double selectionPressure = SelectionPressure.Data;
+scope.AddVariable(new Variable(""EvaluatedSolutions"", new IntData(evalSolutions)));
+scope.AddVariable(new Variable(""SelectionPressure"", new DoubleData(selectionPressure)));
+";
+      solutionStorer.AddSubOperator(bestSolutionProcessor);
+      bestSolutionProcessor.AddSubOperator(trainingMapeEvaluator);
+      bestSolutionProcessor.AddSubOperator(validationMapeEvaluator);
+      bestSolutionProcessor.AddSubOperator(progOperator);
+      return solutionStorer;
+    }
+
+    private CombinedOperator CreateReplacement() {
+      CombinedOperator replacement = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      SequentialSubScopesProcessor seqScopeProc = new SequentialSubScopesProcessor();
+      SequentialProcessor selectedProc = new SequentialProcessor();
+      LeftSelector leftSelector = new LeftSelector();
+      leftSelector.GetVariableInfo("Selected").ActualName = "Elites";
+      RightReducer rightReducer = new RightReducer();
+
+      SequentialProcessor remainingProc = new SequentialProcessor();
+      RightSelector rightSelector = new RightSelector();
+      rightSelector.GetVariableInfo("Selected").ActualName = "Elites";
+      LeftReducer leftReducer = new LeftReducer();
+      MergingReducer mergingReducer = new MergingReducer();
+      Sorter sorter = new Sorter();
+      sorter.GetVariableInfo("Descending").ActualName = "Maximization";
+      sorter.GetVariableInfo("Value").ActualName = "Quality";
+
+      seq.AddSubOperator(seqScopeProc);
+      seqScopeProc.AddSubOperator(selectedProc);
+      selectedProc.AddSubOperator(leftSelector);
+      selectedProc.AddSubOperator(rightReducer);
+
+      seqScopeProc.AddSubOperator(remainingProc);
+      remainingProc.AddSubOperator(rightSelector);
+      remainingProc.AddSubOperator(leftReducer);
+      seq.AddSubOperator(mergingReducer);
+      seq.AddSubOperator(sorter);
+      replacement.OperatorGraph.AddOperator(seq);
+      replacement.OperatorGraph.InitialOperator = seq;
+      return replacement;
+    }
+
+    private CombinedOperator CreateChildCreater() {
+      CombinedOperator childCreater = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      OffspringAnalyzer analyzer = new OffspringAnalyzer();
+      analyzer.GetVariableInfo("ComparisonFactor").Local = false;
+      analyzer.RemoveVariable("ComparisonFactor");
+      SequentialProcessor selectedProc = new SequentialProcessor();
+      OperatorExtractor crossover = new OperatorExtractor();
+      crossover.Name = "Crossover (extr.)";
+      crossover.GetVariableInfo("Operator").ActualName = "Crossover";
+      UniformSequentialSubScopesProcessor individualProc = new UniformSequentialSubScopesProcessor();
+      SequentialProcessor individualSeqProc = new SequentialProcessor();
+      StochasticBranch cond = new StochasticBranch();
+      cond.GetVariableInfo("Probability").ActualName = "MutationRate";
+      OperatorExtractor manipulator = new OperatorExtractor();
+      manipulator.Name = "Manipulator (extr.)";
+      manipulator.GetVariableInfo("Operator").ActualName = "Manipulator";
+      OperatorExtractor evaluator = new OperatorExtractor();
+      evaluator.Name = "Evaluator (extr.)";
+      evaluator.GetVariableInfo("Operator").ActualName = "Evaluator";
+      MeanSquaredErrorEvaluator validationEvaluator = new MeanSquaredErrorEvaluator();
+      validationEvaluator.GetVariableInfo("MSE").ActualName = "ValidationQuality";
+      validationEvaluator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
+      validationEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
+      Counter evalCounter = new Counter();
+      evalCounter.GetVariableInfo("Value").ActualName = "EvaluatedSolutions";
+
+      Sorter sorter = new Sorter();
+      sorter.GetVariableInfo("Descending").ActualName = "Maximization";
+      sorter.GetVariableInfo("Value").ActualName = "Quality";
+      seq.AddSubOperator(analyzer);
+      analyzer.AddSubOperator(selectedProc);
+      selectedProc.AddSubOperator(crossover);
+      selectedProc.AddSubOperator(individualProc);
+      individualProc.AddSubOperator(individualSeqProc);
+      individualSeqProc.AddSubOperator(cond);
+      cond.AddSubOperator(manipulator);
+      individualSeqProc.AddSubOperator(evaluator);
+      individualSeqProc.AddSubOperator(validationEvaluator);
+      individualSeqProc.AddSubOperator(evalCounter);
+      seq.AddSubOperator(sorter);
+
+      childCreater.OperatorGraph.AddOperator(seq);
+      childCreater.OperatorGraph.InitialOperator = seq;
+      return childCreater;
+    }
+
+    public IEditor CreateEditor() {
+      return new OffspringSelectionGpEditor(this);
+    }
+
+    public override IView CreateView() {
+      return new OffspringSelectionGpEditor(this);
+    }
+
+    public override object Clone(IDictionary<Guid, object> clonedObjects) {
+      OffspringSelectionGP clone = new OffspringSelectionGP();
+      clonedObjects.Add(Guid, clone);
+      clone.engine = (SequentialEngine.SequentialEngine)Auxiliary.Clone(Engine, clonedObjects);
+      return clone;
+    }
+    #region SetReferences Method
+    private void SetReferences() {
+      // SGA
+      CombinedOperator co1 = (CombinedOperator)Engine.OperatorGraph.InitialOperator;
+      // SequentialProcessor in SGA
+      algorithm = (SequentialProcessor)co1.OperatorGraph.InitialOperator;
+      // RandomInjector
+      RandomInjector ri = (RandomInjector)algorithm.SubOperators[1];
+      setSeedRandomly = ri.GetVariable("SetSeedRandomly").GetValue<BoolData>();
+      seed = ri.GetVariable("Seed").GetValue<IntData>();
+      // VariableInjector
+      VariableInjector vi = (VariableInjector)algorithm.SubOperators[2];
+      populationSize = vi.GetVariable("PopulationSize").GetValue<IntData>();
+      parents = vi.GetVariable("Parents").GetValue<IntData>();
+      maxGenerations = vi.GetVariable("MaxGenerations").GetValue<IntData>();
+      mutationRate = vi.GetVariable("MutationRate").GetValue<DoubleData>();
+      elites = vi.GetVariable("Elites").GetValue<IntData>();
+      maxTreeSize = vi.GetVariable("MaxTreeSize").GetValue<IntData>();
+      maxTreeHeight = vi.GetVariable("MaxTreeHeight").GetValue<IntData>();
+    }
+    #endregion
+
+    #region Persistence Methods
+    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
+      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
+      node.AppendChild(PersistenceManager.Persist("Engine", Engine, document, persistedObjects));
+      return node;
+    }
+    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
+      base.Populate(node, restoredObjects);
+      engine = (SequentialEngine.SequentialEngine)PersistenceManager.Restore(node.SelectSingleNode("Engine"), restoredObjects);
+      SetReferences();
+    }
+    #endregion
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Or.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Or.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Or.cs	(revision 1297)
@@ -0,0 +1,46 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Or : FunctionBase {
+    public override string Description {
+      get {
+        return @"Logical OR operation. Only defined for sub-tree-results 0.0 and 1.0.
+Special form, evaluation stops at first sub-tree that evaluates to 1.0 (true).";
+      }
+    }
+
+    public Or()
+      : base() {
+      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+      AddConstraint(new SubOperatorTypeConstraint(1));
+      AddConstraint(new SubOperatorTypeConstraint(2));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Power.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Power.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Power.cs	(revision 1297)
@@ -0,0 +1,44 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Power : FunctionBase {
+    public override string Description {
+      get { return "Returns the result of the first sub-tree to the power of the second sub-tree (power(x, y))."; }
+    }
+
+    public Power()
+      : base() {
+      // must have exactly 2 suboperators base ^ exponent
+      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+      AddConstraint(new SubOperatorTypeConstraint(1));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Properties/AssemblyInfo.frame
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Properties/AssemblyInfo.frame	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Properties/AssemblyInfo.frame	(revision 1297)
@@ -0,0 +1,58 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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;
+using HeuristicLab.PluginInfrastructure;
+
+// 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.GP.StructureIdentification")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2008 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("863021a4-3cde-48be-8af6-dac1077f5fb5")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyFileVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyBuildDate("$WCNOW$")]
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Signum.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Signum.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Signum.cs	(revision 1297)
@@ -0,0 +1,43 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Signum : FunctionBase {
+    public override string Description {
+      get { return "Returns the signum of the first sub-tree."; }
+    }
+
+    public Signum()
+      : base() {
+      // must have exactly 1 suboperator
+      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Sinus.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Sinus.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Sinus.cs	(revision 1297)
@@ -0,0 +1,43 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Sinus : FunctionBase {
+    public override string Description {
+      get { return "Returns the sinus of the first sub-tree."; }
+    }
+
+    public Sinus()
+      : base() {
+      // must have exactly 1 suboperator
+      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Sqrt.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Sqrt.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Sqrt.cs	(revision 1297)
@@ -0,0 +1,43 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Sqrt : FunctionBase {
+    public override string Description {
+      get { return "Returns the square root of the first sub-tree."; }
+    }
+
+    public Sqrt()
+      : base() {
+      // must have exactly 1 suboperator
+      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StandardGP.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StandardGP.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StandardGP.cs	(revision 1297)
@@ -0,0 +1,507 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using System.Xml;
+using System.Diagnostics;
+using HeuristicLab.DataAnalysis;
+using HeuristicLab.Operators;
+using HeuristicLab.Random;
+using HeuristicLab.Selection;
+using HeuristicLab.Logging;
+using HeuristicLab.Data;
+using HeuristicLab.Operators.Programmable;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class StandardGP : ItemBase, IEditable {
+    private IntData maxGenerations = new IntData();
+    public int MaxGenerations {
+      get { return maxGenerations.Data; }
+      set { maxGenerations.Data = value; }
+    }
+
+    private IntData tournamentSize = new IntData();
+    public int TournamentSize {
+      get { return tournamentSize.Data; }
+      set { tournamentSize.Data = value; }
+    }
+    private DoubleData mutationRate = new DoubleData();
+    public double MutationRate {
+      get { return mutationRate.Data; }
+      set { mutationRate.Data = value; }
+    }
+    private IntData parents = new IntData();
+    private IntData populationSize = new IntData();
+    public int PopulationSize {
+      get { return populationSize.Data; }
+      set {
+        populationSize.Data = value;
+        parents.Data = value * 2;
+      }
+    }
+
+    private BoolData setSeedRandomly = new BoolData();
+    public bool SetSeedRandomly {
+      get { return setSeedRandomly.Data; }
+      set { setSeedRandomly.Data = value; }
+    }
+
+    private IntData seed = new IntData();
+    public int Seed {
+      get { return seed.Data; }
+      set { seed.Data = value; }
+    }
+
+    public IOperator ProblemInjector {
+      get { return algorithm.SubOperators[0]; }
+      set {
+        value.Name = "ProblemInjector";
+        algorithm.RemoveSubOperator(0);
+        algorithm.AddSubOperator(value, 0);
+      }
+    }
+
+    private IntData elites = new IntData();
+    public int Elites {
+      get { return elites.Data; }
+      set { elites.Data = value; }
+    }
+
+    private int maxTreeSize = 50;
+    public int MaxTreeSize {
+      get { return maxTreeSize; }
+      set { maxTreeSize = value; }
+    }
+
+    private int maxTreeHeight = 8;
+    public int MaxTreeHeight {
+      get { return maxTreeHeight; }
+      set { maxTreeHeight = value; }
+    }
+    private double punishmentFactor = 10.0;
+    private bool useEstimatedTargetValue = false;
+    private double fullTreeShakingFactor = 0.1;
+    private double onepointShakingFactor = 1.0;
+    private IOperator algorithm;
+
+    private SequentialEngine.SequentialEngine engine;
+    public IEngine Engine {
+      get { return engine; }
+    }
+
+    public StandardGP() {
+      PopulationSize = 10000;
+      MaxGenerations = 100;
+      TournamentSize = 7;
+      MutationRate = 0.15;
+      Elites = 1;
+      MaxTreeSize = 100;
+      MaxTreeHeight = 10;
+      engine = new SequentialEngine.SequentialEngine();
+      CombinedOperator algo = CreateAlgorithm();
+      engine.OperatorGraph.AddOperator(algo);
+      engine.OperatorGraph.InitialOperator = algo;
+    }
+
+    private CombinedOperator CreateAlgorithm() {
+      CombinedOperator algo = new CombinedOperator();
+      algo.Name = "StandardGP";
+      SequentialProcessor seq = new SequentialProcessor();
+      EmptyOperator problemInjectorPlaceholder = new EmptyOperator();
+      RandomInjector randomInjector = new RandomInjector();
+      randomInjector.GetVariable("SetSeedRandomly").Value = setSeedRandomly;
+      randomInjector.GetVariable("Seed").Value = seed;
+      randomInjector.Name = "Random Injector";
+      VariableInjector globalInjector = CreateGlobalInjector();
+      CombinedOperator initialization = CreateInitialization();
+      initialization.Name = "Initialization";
+      FunctionLibraryInjector funLibInjector = new FunctionLibraryInjector();
+      CombinedOperator mainLoop = CreateMainLoop();
+      mainLoop.Name = "Main loop";
+
+      ProbabilisticTreeCreator treeCreator = new ProbabilisticTreeCreator();
+      treeCreator.Name = "Tree generator";
+      treeCreator.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      treeCreator.GetVariableInfo("MinTreeSize").Local = true;
+      treeCreator.AddVariable(new HeuristicLab.Core.Variable("MinTreeSize", new IntData(3)));
+      MeanSquaredErrorEvaluator evaluator = new MeanSquaredErrorEvaluator();
+      evaluator.GetVariableInfo("MSE").ActualName = "Quality";
+      evaluator.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";
+      evaluator.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";
+      evaluator.Name = "Evaluator";
+      StandardCrossOver crossover = new StandardCrossOver();
+      crossover.Name = "Crossover";
+      crossover.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      CombinedOperator manipulator = CreateManipulator();
+      manipulator.Name = "Manipulator";
+      TournamentSelector selector = new TournamentSelector();
+      selector.Name = "Selector";
+      selector.GetVariableInfo("Selected").ActualName = "Parents";
+      selector.GetVariableInfo("GroupSize").Local = false;
+      selector.RemoveVariable("GroupSize");
+      selector.GetVariableInfo("GroupSize").ActualName = "TournamentSize";
+      LeftReducer cleanUp = new LeftReducer();
+
+      seq.AddSubOperator(problemInjectorPlaceholder);
+      seq.AddSubOperator(randomInjector);
+      seq.AddSubOperator(globalInjector);
+      seq.AddSubOperator(funLibInjector);
+      seq.AddSubOperator(initialization);
+      seq.AddSubOperator(mainLoop);
+      seq.AddSubOperator(cleanUp);
+
+      initialization.AddSubOperator(treeCreator);
+      initialization.AddSubOperator(evaluator);
+
+      mainLoop.AddSubOperator(selector);
+      mainLoop.AddSubOperator(crossover);
+      mainLoop.AddSubOperator(manipulator);
+      mainLoop.AddSubOperator(evaluator);
+      algo.OperatorGraph.AddOperator(seq);
+      algo.OperatorGraph.InitialOperator = seq;
+      this.algorithm = seq;
+      return algo;
+    }
+
+    private VariableInjector CreateGlobalInjector() {
+      VariableInjector injector = new VariableInjector();
+      injector.Name = "Global Injector";
+      injector.AddVariable(new HeuristicLab.Core.Variable("Generations", new IntData(0)));
+      injector.AddVariable(new HeuristicLab.Core.Variable("MaxGenerations", maxGenerations));
+      injector.AddVariable(new HeuristicLab.Core.Variable("MutationRate", mutationRate));
+      injector.AddVariable(new HeuristicLab.Core.Variable("PopulationSize", populationSize));
+      injector.AddVariable(new HeuristicLab.Core.Variable("Parents", parents));
+      injector.AddVariable(new HeuristicLab.Core.Variable("Elites", elites));
+      injector.AddVariable(new HeuristicLab.Core.Variable("TournamentSize", tournamentSize));
+      injector.AddVariable(new HeuristicLab.Core.Variable("Maximization", new BoolData(false)));
+      injector.AddVariable(new HeuristicLab.Core.Variable("MaxTreeHeight", new IntData(maxTreeHeight)));
+      injector.AddVariable(new HeuristicLab.Core.Variable("MaxTreeSize", new IntData(maxTreeSize)));
+      injector.AddVariable(new HeuristicLab.Core.Variable("EvaluatedSolutions", new IntData(0)));
+      injector.AddVariable(new HeuristicLab.Core.Variable("TotalEvaluatedNodes", new DoubleData(0)));
+      injector.AddVariable(new HeuristicLab.Core.Variable("PunishmentFactor", new DoubleData(punishmentFactor)));
+      injector.AddVariable(new HeuristicLab.Core.Variable("UseEstimatedTargetValue", new BoolData(useEstimatedTargetValue)));
+      return injector;
+    }
+
+    private CombinedOperator CreateManipulator() {
+      CombinedOperator manipulator = new CombinedOperator();
+      StochasticMultiBranch multibranch = new StochasticMultiBranch();
+      FullTreeShaker fullTreeShaker = new FullTreeShaker();
+      fullTreeShaker.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      fullTreeShaker.GetVariableInfo("ShakingFactor").Local = true;
+      fullTreeShaker.AddVariable(new HeuristicLab.Core.Variable("ShakingFactor", new DoubleData(fullTreeShakingFactor)));
+
+      OnePointShaker onepointShaker = new OnePointShaker();
+      onepointShaker.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      onepointShaker.GetVariableInfo("ShakingFactor").Local = true;
+      onepointShaker.AddVariable(new HeuristicLab.Core.Variable("ShakingFactor", new DoubleData(onepointShakingFactor)));
+      ChangeNodeTypeManipulation changeNodeTypeManipulation = new ChangeNodeTypeManipulation();
+      changeNodeTypeManipulation.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      CutOutNodeManipulation cutOutNodeManipulation = new CutOutNodeManipulation();
+      cutOutNodeManipulation.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      DeleteSubTreeManipulation deleteSubTreeManipulation = new DeleteSubTreeManipulation();
+      deleteSubTreeManipulation.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+      SubstituteSubTreeManipulation substituteSubTreeManipulation = new SubstituteSubTreeManipulation();
+      substituteSubTreeManipulation.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
+
+      IOperator[] manipulators = new IOperator[] {
+        onepointShaker, fullTreeShaker,
+        changeNodeTypeManipulation,
+        cutOutNodeManipulation,
+        deleteSubTreeManipulation,
+        substituteSubTreeManipulation};
+
+      DoubleArrayData probabilities = new DoubleArrayData(new double[manipulators.Length]);
+      for (int i = 0; i < manipulators.Length; i++) {
+        probabilities.Data[i] = 1.0;
+        multibranch.AddSubOperator(manipulators[i]);
+      }
+      multibranch.GetVariableInfo("Probabilities").Local = true;
+      multibranch.AddVariable(new HeuristicLab.Core.Variable("Probabilities", probabilities));
+
+      manipulator.OperatorGraph.AddOperator(multibranch);
+      manipulator.OperatorGraph.InitialOperator = multibranch;
+      return manipulator;
+    }
+
+    private CombinedOperator CreateInitialization() {
+      CombinedOperator init = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      SubScopesCreater subScopesCreater = new SubScopesCreater();
+      subScopesCreater.GetVariableInfo("SubScopes").ActualName = "PopulationSize";
+      UniformSequentialSubScopesProcessor subScopesProc = new UniformSequentialSubScopesProcessor();
+      SequentialProcessor individualSeq = new SequentialProcessor();
+      OperatorExtractor treeCreater = new OperatorExtractor();
+      treeCreater.Name = "Tree generator (extr.)";
+      treeCreater.GetVariableInfo("Operator").ActualName = "Tree generator";
+      OperatorExtractor evaluator = new OperatorExtractor();
+      evaluator.Name = "Evaluator (extr.)";
+      evaluator.GetVariableInfo("Operator").ActualName = "Evaluator";
+      MeanSquaredErrorEvaluator validationEvaluator = new MeanSquaredErrorEvaluator();
+      validationEvaluator.GetVariableInfo("MSE").ActualName = "ValidationQuality";
+      validationEvaluator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
+      validationEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
+      Counter evalCounter = new Counter();
+      evalCounter.GetVariableInfo("Value").ActualName = "EvaluatedSolutions";
+      Sorter sorter = new Sorter();
+      sorter.GetVariableInfo("Descending").ActualName = "Maximization";
+      sorter.GetVariableInfo("Value").ActualName = "Quality";
+
+      seq.AddSubOperator(subScopesCreater);
+      seq.AddSubOperator(subScopesProc);
+      seq.AddSubOperator(sorter);
+
+      subScopesProc.AddSubOperator(individualSeq);
+      individualSeq.AddSubOperator(treeCreater);
+      individualSeq.AddSubOperator(evaluator);
+      individualSeq.AddSubOperator(validationEvaluator);
+      individualSeq.AddSubOperator(evalCounter);
+
+      init.OperatorGraph.AddOperator(seq);
+      init.OperatorGraph.InitialOperator = seq;
+      return init;
+    }
+
+    private CombinedOperator CreateMainLoop() {
+      CombinedOperator main = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      CombinedOperator childCreater = CreateChildCreater();
+      childCreater.Name = "Create children";
+      CombinedOperator replacement = CreateReplacement();
+      replacement.Name = "Replacement";
+      BestSolutionStorer solutionStorer = CreateBestSolutionStorer();
+      BestAverageWorstQualityCalculator qualityCalculator = new BestAverageWorstQualityCalculator();
+      BestAverageWorstQualityCalculator validationQualityCalculator = new BestAverageWorstQualityCalculator();
+      validationQualityCalculator.Name = "ValidationQualityCalculator";
+      validationQualityCalculator.GetVariableInfo("BestQuality").ActualName = "BestValidationQuality";
+      validationQualityCalculator.GetVariableInfo("AverageQuality").ActualName = "AverageValidationQuality";
+      validationQualityCalculator.GetVariableInfo("WorstQuality").ActualName = "WorstValidationQuality";
+      DataCollector collector = new DataCollector();
+      ItemList<StringData> names = collector.GetVariable("VariableNames").GetValue<ItemList<StringData>>();
+      names.Add(new StringData("BestQuality"));
+      names.Add(new StringData("AverageQuality"));
+      names.Add(new StringData("WorstQuality"));
+      names.Add(new StringData("BestValidationQuality"));
+      names.Add(new StringData("AverageValidationQuality"));
+      names.Add(new StringData("WorstValidationQuality"));
+      LinechartInjector lineChartInjector = new LinechartInjector();
+      lineChartInjector.GetVariableInfo("Linechart").ActualName = "Quality Linechart";
+      lineChartInjector.GetVariable("NumberOfLines").GetValue<IntData>().Data = 6;
+      QualityLogger qualityLogger = new QualityLogger();
+      QualityLogger validationQualityLogger = new QualityLogger();
+      validationQualityCalculator.Name = "ValidationQualityLogger";
+      validationQualityLogger.GetVariableInfo("Quality").ActualName = "ValidationQuality";
+      validationQualityLogger.GetVariableInfo("QualityLog").ActualName = "ValidationQualityLog";
+      Counter counter = new Counter();
+      counter.GetVariableInfo("Value").ActualName = "Generations";
+      LessThanComparator comparator = new LessThanComparator();
+      comparator.GetVariableInfo("LeftSide").ActualName = "Generations";
+      comparator.GetVariableInfo("RightSide").ActualName = "MaxGenerations";
+      comparator.GetVariableInfo("Result").ActualName = "GenerationsCondition";
+      ConditionalBranch cond = new ConditionalBranch();
+      cond.GetVariableInfo("Condition").ActualName = "GenerationsCondition";
+
+      seq.AddSubOperator(childCreater);
+      seq.AddSubOperator(replacement);
+      seq.AddSubOperator(solutionStorer);
+      seq.AddSubOperator(qualityCalculator);
+      seq.AddSubOperator(validationQualityCalculator);
+      seq.AddSubOperator(collector);
+      seq.AddSubOperator(lineChartInjector);
+      seq.AddSubOperator(qualityLogger);
+      seq.AddSubOperator(validationQualityLogger);
+      seq.AddSubOperator(counter);
+      seq.AddSubOperator(comparator);
+      seq.AddSubOperator(cond);
+      cond.AddSubOperator(seq);
+
+      main.OperatorGraph.AddOperator(seq);
+      main.OperatorGraph.InitialOperator = seq;
+      return main;
+    }
+
+    private BestSolutionStorer CreateBestSolutionStorer() {
+      BestSolutionStorer solutionStorer = new BestSolutionStorer();
+      solutionStorer.GetVariableInfo("Quality").ActualName = "ValidationQuality";
+      solutionStorer.GetVariableInfo("BestSolution").ActualName = "BestValidationSolution";
+      SequentialProcessor bestSolutionProcessor = new SequentialProcessor();
+      MeanAbsolutePercentageErrorEvaluator trainingMapeEvaluator = new MeanAbsolutePercentageErrorEvaluator();
+      trainingMapeEvaluator.Name = "TrainingMapeEvaluator";
+      trainingMapeEvaluator.GetVariableInfo("MAPE").ActualName = "TrainingMAPE";
+      trainingMapeEvaluator.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";
+      trainingMapeEvaluator.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";
+      MeanAbsolutePercentageErrorEvaluator validationMapeEvaluator = new MeanAbsolutePercentageErrorEvaluator();
+      validationMapeEvaluator.Name = "ValidationMapeEvaluator";
+      validationMapeEvaluator.GetVariableInfo("MAPE").ActualName = "ValidationMAPE";
+      validationMapeEvaluator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
+      validationMapeEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
+      ProgrammableOperator progOperator = new ProgrammableOperator();
+      progOperator.RemoveVariableInfo("Result");
+      progOperator.AddVariableInfo(new HeuristicLab.Core.VariableInfo("EvaluatedSolutions", "", typeof(IntData), VariableKind.In));
+      progOperator.Code = @"
+int evalSolutions = EvaluatedSolutions.Data;
+scope.AddVariable(new Variable(""EvaluatedSolutions"", new IntData(evalSolutions)));
+";
+      solutionStorer.AddSubOperator(bestSolutionProcessor);
+      bestSolutionProcessor.AddSubOperator(trainingMapeEvaluator);
+      bestSolutionProcessor.AddSubOperator(validationMapeEvaluator);
+      bestSolutionProcessor.AddSubOperator(progOperator);
+      return solutionStorer;
+    }
+
+    private CombinedOperator CreateReplacement() {
+      CombinedOperator replacement = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      SequentialSubScopesProcessor seqScopeProc = new SequentialSubScopesProcessor();
+      SequentialProcessor selectedProc = new SequentialProcessor();
+      LeftSelector leftSelector = new LeftSelector();
+      leftSelector.GetVariableInfo("Selected").ActualName = "Elites";
+      RightReducer rightReducer = new RightReducer();
+
+      SequentialProcessor remainingProc = new SequentialProcessor();
+      RightSelector rightSelector = new RightSelector();
+      rightSelector.GetVariableInfo("Selected").ActualName = "Elites";
+      LeftReducer leftReducer = new LeftReducer();
+      MergingReducer mergingReducer = new MergingReducer();
+      Sorter sorter = new Sorter();
+      sorter.GetVariableInfo("Descending").ActualName = "Maximization";
+      sorter.GetVariableInfo("Value").ActualName = "Quality";
+
+      seq.AddSubOperator(seqScopeProc);
+      seqScopeProc.AddSubOperator(selectedProc);
+      selectedProc.AddSubOperator(leftSelector);
+      selectedProc.AddSubOperator(rightReducer);
+
+      seqScopeProc.AddSubOperator(remainingProc);
+      remainingProc.AddSubOperator(rightSelector);
+      remainingProc.AddSubOperator(leftReducer);
+      seq.AddSubOperator(mergingReducer);
+      seq.AddSubOperator(sorter);
+      replacement.OperatorGraph.AddOperator(seq);
+      replacement.OperatorGraph.InitialOperator = seq;
+      return replacement;
+    }
+
+    private CombinedOperator CreateChildCreater() {
+      CombinedOperator childCreater = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      OperatorExtractor selector = new OperatorExtractor();
+      selector.Name = "Selector (extr.)";
+      selector.GetVariableInfo("Operator").ActualName = "Selector";
+      SequentialSubScopesProcessor seqScopesProc = new SequentialSubScopesProcessor();
+      EmptyOperator emptyOpt = new EmptyOperator();
+      SequentialProcessor selectedProc = new SequentialProcessor();
+      OperatorExtractor crossover = new OperatorExtractor();
+      crossover.Name = "Crossover (extr.)";
+      crossover.GetVariableInfo("Operator").ActualName = "Crossover";
+      UniformSequentialSubScopesProcessor individualProc = new UniformSequentialSubScopesProcessor();
+      SequentialProcessor individualSeqProc = new SequentialProcessor();
+      StochasticBranch cond = new StochasticBranch();
+      cond.GetVariableInfo("Probability").ActualName = "MutationRate";
+      OperatorExtractor manipulator = new OperatorExtractor();
+      manipulator.Name = "Manipulator (extr.)";
+      manipulator.GetVariableInfo("Operator").ActualName = "Manipulator";
+      OperatorExtractor evaluator = new OperatorExtractor();
+      evaluator.Name = "Evaluator (extr.)";
+      evaluator.GetVariableInfo("Operator").ActualName = "Evaluator";
+      MeanSquaredErrorEvaluator validationEvaluator = new MeanSquaredErrorEvaluator();
+      validationEvaluator.GetVariableInfo("MSE").ActualName = "ValidationQuality";
+      validationEvaluator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
+      validationEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
+      Counter evalCounter = new Counter();
+      evalCounter.GetVariableInfo("Value").ActualName = "EvaluatedSolutions";
+
+      Sorter sorter = new Sorter();
+      sorter.GetVariableInfo("Descending").ActualName = "Maximization";
+      sorter.GetVariableInfo("Value").ActualName = "Quality";
+
+
+      seq.AddSubOperator(selector);
+      seq.AddSubOperator(seqScopesProc);
+      seqScopesProc.AddSubOperator(emptyOpt);
+      seqScopesProc.AddSubOperator(selectedProc);
+      selectedProc.AddSubOperator(crossover);
+      selectedProc.AddSubOperator(individualProc);
+      individualProc.AddSubOperator(individualSeqProc);
+      individualSeqProc.AddSubOperator(cond);
+      cond.AddSubOperator(manipulator);
+      individualSeqProc.AddSubOperator(evaluator);
+      individualSeqProc.AddSubOperator(validationEvaluator);
+      individualSeqProc.AddSubOperator(evalCounter);
+      selectedProc.AddSubOperator(sorter);
+
+      childCreater.OperatorGraph.AddOperator(seq);
+      childCreater.OperatorGraph.InitialOperator = seq;
+      return childCreater;
+    }
+
+    public IEditor CreateEditor() {
+      return new StandardGpEditor(this);
+    }
+
+    public override IView CreateView() {
+      return new StandardGpEditor(this);
+    }
+
+    public override object Clone(IDictionary<Guid, object> clonedObjects) {
+      StandardGP clone = new StandardGP();
+      clonedObjects.Add(Guid, clone);
+      clone.engine = (SequentialEngine.SequentialEngine)Auxiliary.Clone(Engine, clonedObjects);
+      return clone;
+    }
+    #region SetReferences Method
+    private void SetReferences() {
+      // SGA
+      CombinedOperator co1 = (CombinedOperator)Engine.OperatorGraph.InitialOperator;
+      // SequentialProcessor in SGA
+      algorithm = (SequentialProcessor)co1.OperatorGraph.InitialOperator;
+      // RandomInjector
+      RandomInjector ri = (RandomInjector)algorithm.SubOperators[1];
+      setSeedRandomly = ri.GetVariable("SetSeedRandomly").GetValue<BoolData>();
+      seed = ri.GetVariable("Seed").GetValue<IntData>();
+      // VariableInjector
+      VariableInjector vi = (VariableInjector)algorithm.SubOperators[2];
+      populationSize = vi.GetVariable("PopulationSize").GetValue<IntData>();
+      parents = vi.GetVariable("Parents").GetValue<IntData>();
+      maxGenerations = vi.GetVariable("MaxGenerations").GetValue<IntData>();
+      mutationRate = vi.GetVariable("MutationRate").GetValue<DoubleData>();
+      elites = vi.GetVariable("Elites").GetValue<IntData>();
+    }
+    #endregion
+
+    #region Persistence Methods
+    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
+      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
+      node.AppendChild(PersistenceManager.Persist("Engine", Engine, document, persistedObjects));
+      return node;
+    }
+    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
+      base.Populate(node, restoredObjects);
+      engine = (SequentialEngine.SequentialEngine)PersistenceManager.Restore(node.SelectSingleNode("Engine"), restoredObjects);
+      SetReferences();
+    }
+    #endregion
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StandardGpEditor.Designer.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StandardGpEditor.Designer.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StandardGpEditor.Designer.cs	(revision 1297)
@@ -0,0 +1,379 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.GP.StructureIdentification {
+  partial class StandardGpEditor {
+    /// <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 (chooseOperatorDialog != null) chooseOperatorDialog.Dispose();
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.executeButton = new System.Windows.Forms.Button();
+      this.tabControl = new System.Windows.Forms.TabControl();
+      this.parametersTabPage = new System.Windows.Forms.TabPage();
+      this.viewProblemInitializationButton = new System.Windows.Forms.Button();
+      this.setProblemInitializationButton = new System.Windows.Forms.Button();
+      this.problemInitializationTextBox = new System.Windows.Forms.TextBox();
+      this.setRandomSeedRandomlyCheckBox = new System.Windows.Forms.CheckBox();
+      this.elitesTextBox = new System.Windows.Forms.TextBox();
+      this.problemInitializationLabel = new System.Windows.Forms.Label();
+      this.elitesLabel = new System.Windows.Forms.Label();
+      this.mutationRateTextBox = new System.Windows.Forms.TextBox();
+      this.mutationRateLabel = new System.Windows.Forms.Label();
+      this.maximumGenerationsTextBox = new System.Windows.Forms.TextBox();
+      this.maximumGenerationsLabel = new System.Windows.Forms.Label();
+      this.randomSeedTextBox = new System.Windows.Forms.TextBox();
+      this.populationSizeTextBox = new System.Windows.Forms.TextBox();
+      this.setRandomSeedRandomlyLabel = new System.Windows.Forms.Label();
+      this.randomSeedLabel = new System.Windows.Forms.Label();
+      this.populationSizeLabel = new System.Windows.Forms.Label();
+      this.scopesTabPage = new System.Windows.Forms.TabPage();
+      this.scopeView = new HeuristicLab.Core.ScopeView();
+      this.abortButton = new System.Windows.Forms.Button();
+      this.resetButton = new System.Windows.Forms.Button();
+      this.cloneEngineButton = new System.Windows.Forms.Button();
+      this.tabControl.SuspendLayout();
+      this.parametersTabPage.SuspendLayout();
+      this.scopesTabPage.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // executeButton
+      // 
+      this.executeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.executeButton.Location = new System.Drawing.Point(0, 396);
+      this.executeButton.Name = "executeButton";
+      this.executeButton.Size = new System.Drawing.Size(75, 23);
+      this.executeButton.TabIndex = 1;
+      this.executeButton.Text = "&Execute";
+      this.executeButton.UseVisualStyleBackColor = true;
+      this.executeButton.Click += new System.EventHandler(this.executeButton_Click);
+      // 
+      // tabControl
+      // 
+      this.tabControl.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.tabControl.Controls.Add(this.parametersTabPage);
+      this.tabControl.Controls.Add(this.scopesTabPage);
+      this.tabControl.Location = new System.Drawing.Point(0, 0);
+      this.tabControl.Name = "tabControl";
+      this.tabControl.SelectedIndex = 0;
+      this.tabControl.Size = new System.Drawing.Size(526, 390);
+      this.tabControl.TabIndex = 0;
+      // 
+      // parametersTabPage
+      // 
+      this.parametersTabPage.Controls.Add(this.viewProblemInitializationButton);
+      this.parametersTabPage.Controls.Add(this.setProblemInitializationButton);
+      this.parametersTabPage.Controls.Add(this.problemInitializationTextBox);
+      this.parametersTabPage.Controls.Add(this.setRandomSeedRandomlyCheckBox);
+      this.parametersTabPage.Controls.Add(this.elitesTextBox);
+      this.parametersTabPage.Controls.Add(this.problemInitializationLabel);
+      this.parametersTabPage.Controls.Add(this.elitesLabel);
+      this.parametersTabPage.Controls.Add(this.mutationRateTextBox);
+      this.parametersTabPage.Controls.Add(this.mutationRateLabel);
+      this.parametersTabPage.Controls.Add(this.maximumGenerationsTextBox);
+      this.parametersTabPage.Controls.Add(this.maximumGenerationsLabel);
+      this.parametersTabPage.Controls.Add(this.randomSeedTextBox);
+      this.parametersTabPage.Controls.Add(this.populationSizeTextBox);
+      this.parametersTabPage.Controls.Add(this.setRandomSeedRandomlyLabel);
+      this.parametersTabPage.Controls.Add(this.randomSeedLabel);
+      this.parametersTabPage.Controls.Add(this.populationSizeLabel);
+      this.parametersTabPage.Location = new System.Drawing.Point(4, 22);
+      this.parametersTabPage.Name = "parametersTabPage";
+      this.parametersTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.parametersTabPage.Size = new System.Drawing.Size(518, 364);
+      this.parametersTabPage.TabIndex = 0;
+      this.parametersTabPage.Text = "Parameters";
+      this.parametersTabPage.UseVisualStyleBackColor = true;
+      // 
+      // viewProblemInitializationButton
+      // 
+      this.viewProblemInitializationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.viewProblemInitializationButton.Location = new System.Drawing.Point(410, 208);
+      this.viewProblemInitializationButton.Name = "viewProblemInitializationButton";
+      this.viewProblemInitializationButton.Size = new System.Drawing.Size(53, 20);
+      this.viewProblemInitializationButton.TabIndex = 14;
+      this.viewProblemInitializationButton.Text = "View...";
+      this.viewProblemInitializationButton.UseVisualStyleBackColor = true;
+      this.viewProblemInitializationButton.Click += new System.EventHandler(this.viewProblemInjectorButton_Click);
+      // 
+      // setProblemInitializationButton
+      // 
+      this.setProblemInitializationButton.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.setProblemInitializationButton.Location = new System.Drawing.Point(469, 208);
+      this.setProblemInitializationButton.Name = "setProblemInitializationButton";
+      this.setProblemInitializationButton.Size = new System.Drawing.Size(43, 20);
+      this.setProblemInitializationButton.TabIndex = 15;
+      this.setProblemInitializationButton.Text = "Set...";
+      this.setProblemInitializationButton.UseVisualStyleBackColor = true;
+      this.setProblemInitializationButton.Click += new System.EventHandler(this.setProblemInitializationButton_Click);
+      // 
+      // problemInitializationTextBox
+      // 
+      this.problemInitializationTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.problemInitializationTextBox.Location = new System.Drawing.Point(218, 208);
+      this.problemInitializationTextBox.Name = "problemInitializationTextBox";
+      this.problemInitializationTextBox.ReadOnly = true;
+      this.problemInitializationTextBox.Size = new System.Drawing.Size(186, 20);
+      this.problemInitializationTextBox.TabIndex = 13;
+      // 
+      // setRandomSeedRandomlyCheckBox
+      // 
+      this.setRandomSeedRandomlyCheckBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.setRandomSeedRandomlyCheckBox.AutoSize = true;
+      this.setRandomSeedRandomlyCheckBox.Location = new System.Drawing.Point(218, 6);
+      this.setRandomSeedRandomlyCheckBox.Name = "setRandomSeedRandomlyCheckBox";
+      this.setRandomSeedRandomlyCheckBox.Size = new System.Drawing.Size(15, 14);
+      this.setRandomSeedRandomlyCheckBox.TabIndex = 1;
+      this.setRandomSeedRandomlyCheckBox.UseVisualStyleBackColor = true;
+      // 
+      // elitesTextBox
+      // 
+      this.elitesTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.elitesTextBox.Location = new System.Drawing.Point(218, 156);
+      this.elitesTextBox.Name = "elitesTextBox";
+      this.elitesTextBox.Size = new System.Drawing.Size(186, 20);
+      this.elitesTextBox.TabIndex = 11;
+      // 
+      // problemInitializationLabel
+      // 
+      this.problemInitializationLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.problemInitializationLabel.AutoSize = true;
+      this.problemInitializationLabel.Location = new System.Drawing.Point(65, 211);
+      this.problemInitializationLabel.Name = "problemInitializationLabel";
+      this.problemInitializationLabel.Size = new System.Drawing.Size(105, 13);
+      this.problemInitializationLabel.TabIndex = 12;
+      this.problemInitializationLabel.Text = "&Problem Initialization:";
+      // 
+      // elitesLabel
+      // 
+      this.elitesLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.elitesLabel.AutoSize = true;
+      this.elitesLabel.Location = new System.Drawing.Point(65, 159);
+      this.elitesLabel.Name = "elitesLabel";
+      this.elitesLabel.Size = new System.Drawing.Size(35, 13);
+      this.elitesLabel.TabIndex = 10;
+      this.elitesLabel.Text = "&Elites:";
+      // 
+      // mutationRateTextBox
+      // 
+      this.mutationRateTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.mutationRateTextBox.Location = new System.Drawing.Point(218, 130);
+      this.mutationRateTextBox.Name = "mutationRateTextBox";
+      this.mutationRateTextBox.Size = new System.Drawing.Size(186, 20);
+      this.mutationRateTextBox.TabIndex = 9;
+      // 
+      // mutationRateLabel
+      // 
+      this.mutationRateLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.mutationRateLabel.AutoSize = true;
+      this.mutationRateLabel.Location = new System.Drawing.Point(65, 133);
+      this.mutationRateLabel.Name = "mutationRateLabel";
+      this.mutationRateLabel.Size = new System.Drawing.Size(77, 13);
+      this.mutationRateLabel.TabIndex = 8;
+      this.mutationRateLabel.Text = "&Mutation Rate:";
+      // 
+      // maximumGenerationsTextBox
+      // 
+      this.maximumGenerationsTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.maximumGenerationsTextBox.Location = new System.Drawing.Point(218, 104);
+      this.maximumGenerationsTextBox.Name = "maximumGenerationsTextBox";
+      this.maximumGenerationsTextBox.Size = new System.Drawing.Size(186, 20);
+      this.maximumGenerationsTextBox.TabIndex = 7;
+      // 
+      // maximumGenerationsLabel
+      // 
+      this.maximumGenerationsLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.maximumGenerationsLabel.AutoSize = true;
+      this.maximumGenerationsLabel.Location = new System.Drawing.Point(65, 107);
+      this.maximumGenerationsLabel.Name = "maximumGenerationsLabel";
+      this.maximumGenerationsLabel.Size = new System.Drawing.Size(114, 13);
+      this.maximumGenerationsLabel.TabIndex = 6;
+      this.maximumGenerationsLabel.Text = "Maximum &Generations:";
+      // 
+      // randomSeedTextBox
+      // 
+      this.randomSeedTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.randomSeedTextBox.Location = new System.Drawing.Point(218, 26);
+      this.randomSeedTextBox.Name = "randomSeedTextBox";
+      this.randomSeedTextBox.Size = new System.Drawing.Size(186, 20);
+      this.randomSeedTextBox.TabIndex = 3;
+      // 
+      // populationSizeTextBox
+      // 
+      this.populationSizeTextBox.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.populationSizeTextBox.Location = new System.Drawing.Point(218, 78);
+      this.populationSizeTextBox.Name = "populationSizeTextBox";
+      this.populationSizeTextBox.Size = new System.Drawing.Size(186, 20);
+      this.populationSizeTextBox.TabIndex = 5;
+      // 
+      // setRandomSeedRandomlyLabel
+      // 
+      this.setRandomSeedRandomlyLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.setRandomSeedRandomlyLabel.AutoSize = true;
+      this.setRandomSeedRandomlyLabel.Location = new System.Drawing.Point(65, 6);
+      this.setRandomSeedRandomlyLabel.Name = "setRandomSeedRandomlyLabel";
+      this.setRandomSeedRandomlyLabel.Size = new System.Drawing.Size(147, 13);
+      this.setRandomSeedRandomlyLabel.TabIndex = 0;
+      this.setRandomSeedRandomlyLabel.Text = "Set &Random Seed Randomly:";
+      // 
+      // randomSeedLabel
+      // 
+      this.randomSeedLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.randomSeedLabel.AutoSize = true;
+      this.randomSeedLabel.Location = new System.Drawing.Point(65, 29);
+      this.randomSeedLabel.Name = "randomSeedLabel";
+      this.randomSeedLabel.Size = new System.Drawing.Size(78, 13);
+      this.randomSeedLabel.TabIndex = 2;
+      this.randomSeedLabel.Text = "&Random Seed:";
+      // 
+      // populationSizeLabel
+      // 
+      this.populationSizeLabel.Anchor = System.Windows.Forms.AnchorStyles.None;
+      this.populationSizeLabel.AutoSize = true;
+      this.populationSizeLabel.Location = new System.Drawing.Point(65, 81);
+      this.populationSizeLabel.Name = "populationSizeLabel";
+      this.populationSizeLabel.Size = new System.Drawing.Size(83, 13);
+      this.populationSizeLabel.TabIndex = 4;
+      this.populationSizeLabel.Text = "&Population Size:";
+      // 
+      // scopesTabPage
+      // 
+      this.scopesTabPage.Controls.Add(this.scopeView);
+      this.scopesTabPage.Location = new System.Drawing.Point(4, 22);
+      this.scopesTabPage.Name = "scopesTabPage";
+      this.scopesTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.scopesTabPage.Size = new System.Drawing.Size(518, 364);
+      this.scopesTabPage.TabIndex = 2;
+      this.scopesTabPage.Text = "Scopes";
+      this.scopesTabPage.UseVisualStyleBackColor = true;
+      // 
+      // scopeView
+      // 
+      this.scopeView.Caption = "Scope";
+      this.scopeView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.scopeView.Location = new System.Drawing.Point(3, 3);
+      this.scopeView.Name = "scopeView";
+      this.scopeView.Scope = null;
+      this.scopeView.Size = new System.Drawing.Size(512, 358);
+      this.scopeView.TabIndex = 0;
+      // 
+      // abortButton
+      // 
+      this.abortButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.abortButton.Enabled = false;
+      this.abortButton.Location = new System.Drawing.Point(81, 396);
+      this.abortButton.Name = "abortButton";
+      this.abortButton.Size = new System.Drawing.Size(75, 23);
+      this.abortButton.TabIndex = 2;
+      this.abortButton.Text = "&Abort";
+      this.abortButton.UseVisualStyleBackColor = true;
+      this.abortButton.Click += new System.EventHandler(this.abortButton_Click);
+      // 
+      // resetButton
+      // 
+      this.resetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.resetButton.Location = new System.Drawing.Point(162, 396);
+      this.resetButton.Name = "resetButton";
+      this.resetButton.Size = new System.Drawing.Size(75, 23);
+      this.resetButton.TabIndex = 3;
+      this.resetButton.Text = "&Reset";
+      this.resetButton.UseVisualStyleBackColor = true;
+      this.resetButton.Click += new System.EventHandler(this.resetButton_Click);
+      // 
+      // cloneEngineButton
+      // 
+      this.cloneEngineButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.cloneEngineButton.Location = new System.Drawing.Point(420, 396);
+      this.cloneEngineButton.Name = "cloneEngineButton";
+      this.cloneEngineButton.Size = new System.Drawing.Size(106, 23);
+      this.cloneEngineButton.TabIndex = 4;
+      this.cloneEngineButton.Text = "&Clone Engine...";
+      this.cloneEngineButton.UseVisualStyleBackColor = true;
+      this.cloneEngineButton.Click += new System.EventHandler(this.cloneEngineButton_Click);
+      // 
+      // StandardGpEditor
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.tabControl);
+      this.Controls.Add(this.cloneEngineButton);
+      this.Controls.Add(this.resetButton);
+      this.Controls.Add(this.abortButton);
+      this.Controls.Add(this.executeButton);
+      this.Name = "StandardGpEditor";
+      this.Size = new System.Drawing.Size(526, 419);
+      this.tabControl.ResumeLayout(false);
+      this.parametersTabPage.ResumeLayout(false);
+      this.parametersTabPage.PerformLayout();
+      this.scopesTabPage.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Button executeButton;
+    private System.Windows.Forms.TabControl tabControl;
+    private System.Windows.Forms.TabPage parametersTabPage;
+    private System.Windows.Forms.Button abortButton;
+    private System.Windows.Forms.Button resetButton;
+    private System.Windows.Forms.TextBox mutationRateTextBox;
+    private System.Windows.Forms.Label mutationRateLabel;
+    private System.Windows.Forms.TextBox populationSizeTextBox;
+    private System.Windows.Forms.Label populationSizeLabel;
+    private System.Windows.Forms.TabPage scopesTabPage;
+    private System.Windows.Forms.TextBox maximumGenerationsTextBox;
+    private System.Windows.Forms.Label maximumGenerationsLabel;
+    private System.Windows.Forms.TextBox elitesTextBox;
+    private System.Windows.Forms.Label elitesLabel;
+    private System.Windows.Forms.TextBox randomSeedTextBox;
+    private System.Windows.Forms.Label setRandomSeedRandomlyLabel;
+    private System.Windows.Forms.Label randomSeedLabel;
+    private System.Windows.Forms.CheckBox setRandomSeedRandomlyCheckBox;
+    private System.Windows.Forms.Label problemInitializationLabel;
+    private System.Windows.Forms.Button cloneEngineButton;
+    private System.Windows.Forms.TextBox problemInitializationTextBox;
+    private System.Windows.Forms.Button setProblemInitializationButton;
+    private HeuristicLab.Core.ScopeView scopeView;
+    private System.Windows.Forms.Button viewProblemInitializationButton;
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StandardGpEditor.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StandardGpEditor.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StandardGpEditor.cs	(revision 1297)
@@ -0,0 +1,136 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public partial class StandardGpEditor : EditorBase {
+    private ChooseOperatorDialog chooseOperatorDialog;
+
+    public StandardGP StandardGP {
+      get { return (StandardGP)Item; }
+      set { base.Item = value; }
+    }
+
+    public StandardGpEditor() {
+      InitializeComponent();
+    }
+    public StandardGpEditor(StandardGP sgp)
+      : this() {
+      StandardGP = sgp;
+    }
+
+    protected override void RemoveItemEvents() {
+      StandardGP.Engine.ExceptionOccurred -= new EventHandler<ExceptionEventArgs>(Engine_ExceptionOccurred);
+      StandardGP.Engine.Finished -= new EventHandler(Engine_Finished);
+      scopeView.Scope = null;
+      base.RemoveItemEvents();
+    }
+    protected override void AddItemEvents() {
+      base.AddItemEvents();
+      StandardGP.Engine.ExceptionOccurred += new EventHandler<ExceptionEventArgs>(Engine_ExceptionOccurred);
+      StandardGP.Engine.Finished += new EventHandler(Engine_Finished);
+      SetDataBinding();
+      scopeView.Scope = StandardGP.Engine.GlobalScope;
+    }
+
+    protected override void UpdateControls() {
+      base.UpdateControls();
+      if(StandardGP == null) {
+        tabControl.Enabled = false;
+      } else {
+        tabControl.Enabled = true;
+        problemInitializationTextBox.Text = StandardGP.ProblemInjector.GetType().Name;
+      }
+    }
+
+    private void SetDataBinding() {
+      setRandomSeedRandomlyCheckBox.DataBindings.Add("Checked", StandardGP, "SetSeedRandomly");
+      randomSeedTextBox.DataBindings.Add("Text", StandardGP, "Seed");
+      populationSizeTextBox.DataBindings.Add("Text", StandardGP, "PopulationSize");
+      maximumGenerationsTextBox.DataBindings.Add("Text", StandardGP, "MaxGenerations");
+      mutationRateTextBox.DataBindings.Add("Text", StandardGP, "MutationRate");
+      elitesTextBox.DataBindings.Add("Text", StandardGP, "Elites");
+    }
+
+    #region Button Events
+    private void viewProblemInjectorButton_Click(object sender, EventArgs e) {
+      IView view = StandardGP.ProblemInjector.CreateView();
+      if(view != null)
+        PluginManager.ControlManager.ShowControl(view);
+    }
+
+    private void setProblemInitializationButton_Click(object sender, EventArgs e) {
+      if (chooseOperatorDialog == null) chooseOperatorDialog = new ChooseOperatorDialog();
+      if (chooseOperatorDialog.ShowDialog(this) == DialogResult.OK) {
+        StandardGP.ProblemInjector = chooseOperatorDialog.Operator;
+        problemInitializationTextBox.Text = StandardGP.ProblemInjector.GetType().Name;
+      }
+    }
+    private void executeButton_Click(object sender, EventArgs e) {
+      executeButton.Enabled = false;
+      abortButton.Enabled = true;
+      resetButton.Enabled = false;
+      StandardGP.Engine.Execute();
+    }
+    private void abortButton_Click(object sender, EventArgs e) {
+      StandardGP.Engine.Abort();
+    }
+    private void resetButton_Click(object sender, EventArgs e) {
+      StandardGP.Engine.Reset();
+    }
+    private void cloneEngineButton_Click(object sender, EventArgs e) {
+      IEngine clone = (IEngine)StandardGP.Engine.Clone();
+      IEditor editor = ((IEditable)clone).CreateEditor();
+      PluginManager.ControlManager.ShowControl(editor);
+    }
+    #endregion
+
+    #region Engine Events
+    private delegate void OnExceptionEventDelegate(object sender, ExceptionEventArgs e);
+    private void Engine_ExceptionOccurred(object sender, ExceptionEventArgs e) {
+      if (InvokeRequired)
+        Invoke(new OnExceptionEventDelegate(Engine_ExceptionOccurred), sender, e);
+      else
+        Auxiliary.ShowErrorMessageBox(e.Exception);
+    }
+    private void Engine_Finished(object sender, EventArgs e) {
+      if(InvokeRequired)
+        Invoke((EventHandler)Engine_Finished, sender, e);
+      else {
+        scopeView.Refresh();
+        executeButton.Enabled = true;
+        abortButton.Enabled = false;
+      }
+    }
+    #endregion
+
+
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StandardGpEditor.resx
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StandardGpEditor.resx	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StandardGpEditor.resx	(revision 1297)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StructIdProblemInjector.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StructIdProblemInjector.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StructIdProblemInjector.cs	(revision 1297)
@@ -0,0 +1,90 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using System.Xml;
+using Core = HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class StructIdProblemInjector : Core.OperatorBase {
+    public override string Description {
+      get { return @"Injects the necessary variables for a structure identification problem."; }
+    }
+
+    public StructIdProblemInjector()
+      : base() {
+      AddVariableInfo(new Core.VariableInfo("Dataset", "Dataset", typeof(Dataset), Core.VariableKind.New));
+      GetVariableInfo("Dataset").Local = true;
+      AddVariable(new Core.Variable("Dataset", new Dataset()));
+
+      AddVariableInfo(new Core.VariableInfo("TargetVariable", "TargetVariable", typeof(IntData), Core.VariableKind.New));
+      GetVariableInfo("TargetVariable").Local = true;
+      AddVariable(new Core.Variable("TargetVariable", new IntData()));
+
+      AddVariableInfo(new Core.VariableInfo("AllowedFeatures", "Indexes of allowed input variables", typeof(ItemList<IntData>), Core.VariableKind.New));
+      GetVariableInfo("AllowedFeatures").Local = true;
+      AddVariable(new Core.Variable("AllowedFeatures", new ItemList<IntData>()));
+
+      AddVariableInfo(new Core.VariableInfo("TrainingSamplesStart", "TrainingSamplesStart", typeof(IntData), Core.VariableKind.New));
+      GetVariableInfo("TrainingSamplesStart").Local = true;
+      AddVariable(new Core.Variable("TrainingSamplesStart", new IntData()));
+
+      AddVariableInfo(new Core.VariableInfo("TrainingSamplesEnd", "TrainingSamplesEnd", typeof(IntData), Core.VariableKind.New));
+      GetVariableInfo("TrainingSamplesEnd").Local = true;
+      AddVariable(new Core.Variable("TrainingSamplesEnd", new IntData()));
+
+      AddVariableInfo(new Core.VariableInfo("ValidationSamplesStart", "ValidationSamplesStart", typeof(IntData), Core.VariableKind.New));
+      GetVariableInfo("ValidationSamplesStart").Local = true;
+      AddVariable(new Core.Variable("ValidationSamplesStart", new IntData()));
+
+      AddVariableInfo(new Core.VariableInfo("ValidationSamplesEnd", "ValidationSamplesEnd", typeof(IntData), Core.VariableKind.New));
+      GetVariableInfo("ValidationSamplesEnd").Local = true;
+      AddVariable(new Core.Variable("ValidationSamplesEnd", new IntData()));
+
+      AddVariableInfo(new Core.VariableInfo("TestSamplesStart", "TestSamplesStart", typeof(IntData), Core.VariableKind.New));
+      GetVariableInfo("TestSamplesStart").Local = true;
+      AddVariable(new Core.Variable("TestSamplesStart", new IntData()));
+
+      AddVariableInfo(new Core.VariableInfo("TestSamplesEnd", "TestSamplesEnd", typeof(IntData), Core.VariableKind.New));
+      GetVariableInfo("TestSamplesEnd").Local = true;
+      AddVariable(new Core.Variable("TestSamplesEnd", new IntData()));
+    }
+
+    public override Core.IView CreateView() {
+      return new StructIdProblemInjectorView(this);
+    }
+
+    public override Core.IOperation Apply(Core.IScope scope) {
+      foreach(Core.VariableInfo info in VariableInfos) {
+        if(info.Local) {
+          Core.IVariable var = GetVariable(info.FormalName);
+          if(var != null) scope.AddVariable(new Core.Variable(info.ActualName, (Core.IItem)var.Value.Clone()));
+        }
+      }
+      return null;
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StructIdProblemInjectorView.Designer.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StructIdProblemInjectorView.Designer.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StructIdProblemInjectorView.Designer.cs	(revision 1297)
@@ -0,0 +1,213 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.GP.StructureIdentification {
+  partial class StructIdProblemInjectorView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.importInstanceButton = new System.Windows.Forms.Button();
+      this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
+      this.tabControl = new System.Windows.Forms.TabControl();
+      this.dataTabPage = new System.Windows.Forms.TabPage();
+      this.datasetView = new HeuristicLab.DataAnalysis.DatasetView();
+      this.variableInfosTabPage = new System.Windows.Forms.TabPage();
+      this.operatorBaseVariableInfosView = new HeuristicLab.Core.OperatorBaseVariableInfosView();
+      this.tabPage1 = new System.Windows.Forms.TabPage();
+      this.variablesView = new HeuristicLab.Core.OperatorBaseVariablesView();
+      this.descriptionTabPage = new System.Windows.Forms.TabPage();
+      this.operatorBaseDescriptionView = new HeuristicLab.Core.OperatorBaseDescriptionView();
+      this.tabControl.SuspendLayout();
+      this.dataTabPage.SuspendLayout();
+      this.variableInfosTabPage.SuspendLayout();
+      this.tabPage1.SuspendLayout();
+      this.descriptionTabPage.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // importInstanceButton
+      // 
+      this.importInstanceButton.Location = new System.Drawing.Point(6, 6);
+      this.importInstanceButton.Name = "importInstanceButton";
+      this.importInstanceButton.Size = new System.Drawing.Size(129, 21);
+      this.importInstanceButton.TabIndex = 6;
+      this.importInstanceButton.Text = "&Import...";
+      this.importInstanceButton.UseVisualStyleBackColor = true;
+      this.importInstanceButton.Click += new System.EventHandler(this.importInstanceButton_Click);
+      // 
+      // openFileDialog
+      // 
+      this.openFileDialog.DefaultExt = "txt";
+      this.openFileDialog.FileName = "txt";
+      this.openFileDialog.Filter = "Text files|*.txt|All files|*.*";
+      this.openFileDialog.Title = "Import StructId File";
+      // 
+      // tabControl
+      // 
+      this.tabControl.Controls.Add(this.dataTabPage);
+      this.tabControl.Controls.Add(this.variableInfosTabPage);
+      this.tabControl.Controls.Add(this.tabPage1);
+      this.tabControl.Controls.Add(this.descriptionTabPage);
+      this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.tabControl.Location = new System.Drawing.Point(0, 0);
+      this.tabControl.Name = "tabControl";
+      this.tabControl.SelectedIndex = 0;
+      this.tabControl.Size = new System.Drawing.Size(507, 451);
+      this.tabControl.TabIndex = 0;
+      // 
+      // dataTabPage
+      // 
+      this.dataTabPage.Controls.Add(this.datasetView);
+      this.dataTabPage.Controls.Add(this.importInstanceButton);
+      this.dataTabPage.Location = new System.Drawing.Point(4, 22);
+      this.dataTabPage.Name = "dataTabPage";
+      this.dataTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.dataTabPage.Size = new System.Drawing.Size(499, 425);
+      this.dataTabPage.TabIndex = 0;
+      this.dataTabPage.Text = "Data";
+      this.dataTabPage.UseVisualStyleBackColor = true;
+      // 
+      // datasetView
+      // 
+      this.datasetView.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.datasetView.Caption = "Editor";
+      this.datasetView.Dataset = null;
+      this.datasetView.Filename = null;
+      this.datasetView.Location = new System.Drawing.Point(6, 33);
+      this.datasetView.Name = "datasetView";
+      this.datasetView.Size = new System.Drawing.Size(487, 386);
+      this.datasetView.TabIndex = 7;
+      // 
+      // variableInfosTabPage
+      // 
+      this.variableInfosTabPage.Controls.Add(this.operatorBaseVariableInfosView);
+      this.variableInfosTabPage.Location = new System.Drawing.Point(4, 22);
+      this.variableInfosTabPage.Name = "variableInfosTabPage";
+      this.variableInfosTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.variableInfosTabPage.Size = new System.Drawing.Size(499, 425);
+      this.variableInfosTabPage.TabIndex = 1;
+      this.variableInfosTabPage.Text = "Variable Infos";
+      this.variableInfosTabPage.UseVisualStyleBackColor = true;
+      // 
+      // operatorBaseVariableInfosView
+      // 
+      this.operatorBaseVariableInfosView.Caption = "Operator";
+      this.operatorBaseVariableInfosView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.operatorBaseVariableInfosView.Location = new System.Drawing.Point(3, 3);
+      this.operatorBaseVariableInfosView.Name = "operatorBaseVariableInfosView";
+      this.operatorBaseVariableInfosView.Operator = null;
+      this.operatorBaseVariableInfosView.Size = new System.Drawing.Size(493, 419);
+      this.operatorBaseVariableInfosView.TabIndex = 0;
+      // 
+      // tabPage1
+      // 
+      this.tabPage1.Controls.Add(this.variablesView);
+      this.tabPage1.Location = new System.Drawing.Point(4, 22);
+      this.tabPage1.Name = "tabPage1";
+      this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
+      this.tabPage1.Size = new System.Drawing.Size(499, 425);
+      this.tabPage1.TabIndex = 3;
+      this.tabPage1.Text = "Variables";
+      this.tabPage1.UseVisualStyleBackColor = true;
+      // 
+      // variablesView
+      // 
+      this.variablesView.Caption = "Operator";
+      this.variablesView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.variablesView.Location = new System.Drawing.Point(3, 3);
+      this.variablesView.Name = "variablesView";
+      this.variablesView.Operator = null;
+      this.variablesView.Size = new System.Drawing.Size(493, 419);
+      this.variablesView.TabIndex = 0;
+      // 
+      // descriptionTabPage
+      // 
+      this.descriptionTabPage.Controls.Add(this.operatorBaseDescriptionView);
+      this.descriptionTabPage.Location = new System.Drawing.Point(4, 22);
+      this.descriptionTabPage.Name = "descriptionTabPage";
+      this.descriptionTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.descriptionTabPage.Size = new System.Drawing.Size(499, 425);
+      this.descriptionTabPage.TabIndex = 2;
+      this.descriptionTabPage.Text = "Description";
+      this.descriptionTabPage.UseVisualStyleBackColor = true;
+      // 
+      // operatorBaseDescriptionView
+      // 
+      this.operatorBaseDescriptionView.Caption = "Operator";
+      this.operatorBaseDescriptionView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.operatorBaseDescriptionView.Location = new System.Drawing.Point(3, 3);
+      this.operatorBaseDescriptionView.Name = "operatorBaseDescriptionView";
+      this.operatorBaseDescriptionView.Operator = null;
+      this.operatorBaseDescriptionView.Size = new System.Drawing.Size(493, 419);
+      this.operatorBaseDescriptionView.TabIndex = 0;
+      // 
+      // StructIdProblemInjectorView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.tabControl);
+      this.Name = "StructIdProblemInjectorView";
+      this.Size = new System.Drawing.Size(507, 451);
+      this.tabControl.ResumeLayout(false);
+      this.dataTabPage.ResumeLayout(false);
+      this.variableInfosTabPage.ResumeLayout(false);
+      this.tabPage1.ResumeLayout(false);
+      this.descriptionTabPage.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Button importInstanceButton;
+    private System.Windows.Forms.OpenFileDialog openFileDialog;
+    private System.Windows.Forms.TabControl tabControl;
+    private System.Windows.Forms.TabPage dataTabPage;
+    private System.Windows.Forms.TabPage variableInfosTabPage;
+    private HeuristicLab.Core.OperatorBaseVariableInfosView operatorBaseVariableInfosView;
+    private System.Windows.Forms.TabPage descriptionTabPage;
+    private HeuristicLab.Core.OperatorBaseDescriptionView operatorBaseDescriptionView;
+    private System.Windows.Forms.TabPage tabPage1;
+    private HeuristicLab.Core.OperatorBaseVariablesView variablesView;
+    private HeuristicLab.DataAnalysis.DatasetView datasetView;
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StructIdProblemInjectorView.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StructIdProblemInjectorView.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StructIdProblemInjectorView.cs	(revision 1297)
@@ -0,0 +1,158 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public partial class StructIdProblemInjectorView : ViewBase {
+    public StructIdProblemInjector StructIdProblemInjector {
+      get { return (StructIdProblemInjector)Item; }
+      set { base.Item = value; }
+    }
+
+    public StructIdProblemInjectorView()
+      : base() {
+      InitializeComponent();
+    }
+    public StructIdProblemInjectorView(StructIdProblemInjector structIdProblemInjector)
+      : this() {
+      StructIdProblemInjector = structIdProblemInjector;
+      variablesView.Operator = structIdProblemInjector;
+      variablesView.Update();
+    }
+
+    protected override void RemoveItemEvents() {
+      operatorBaseVariableInfosView.Operator = null;
+      operatorBaseDescriptionView.Operator = null;
+      base.RemoveItemEvents();
+    }
+    protected override void AddItemEvents() {
+      base.AddItemEvents();
+      operatorBaseVariableInfosView.Operator = StructIdProblemInjector;
+      operatorBaseDescriptionView.Operator = StructIdProblemInjector;
+    }
+
+    protected override void UpdateControls() {
+      base.UpdateControls();
+      if (StructIdProblemInjector == null) {
+        importInstanceButton.Enabled = false;
+      } else {
+        Dataset dataset = (Dataset)StructIdProblemInjector.GetVariable("Dataset").Value;
+        datasetView.Dataset = dataset;
+        importInstanceButton.Enabled = true;
+      }
+    }
+
+    private void importInstanceButton_Click(object sender, EventArgs e) {
+      if (openFileDialog.ShowDialog(this) == DialogResult.OK) {
+        DatasetParser parser = new DatasetParser();
+        bool success = false;
+        try {
+          try {
+            parser.Import(openFileDialog.FileName, true);
+            success = true;
+          }
+          catch (DataFormatException ex) {
+            ShowWarningMessageBox(ex);
+            // not possible to parse strictly => clear and try to parse non-strict
+            parser.Reset();
+            parser.Import(openFileDialog.FileName, false);
+            success = true;
+          }
+        }
+        catch (DataFormatException ex) {
+          // if the non-strict parsing also failed then show the exception
+          ShowErrorMessageBox(ex);
+        }
+        if (success) {
+          Dataset dataset = (Dataset)StructIdProblemInjector.GetVariable("Dataset").Value;
+          dataset.Rows = parser.Rows;
+          dataset.Columns = parser.Columns;
+          for (int i = 0; i < parser.VariableNames.Length; i++) {
+            dataset.SetVariableName(i, parser.VariableNames[i]);
+          }
+          dataset.Name = parser.ProblemName;
+          dataset.Samples = new double[dataset.Rows * dataset.Columns];
+          Array.Copy(parser.Samples, dataset.Samples, dataset.Columns * dataset.Rows);
+          TrySetVariable("TrainingSamplesStart", parser.TrainingSamplesStart);
+          TrySetVariable("TrainingSamplesStart", parser.TrainingSamplesStart);
+          TrySetVariable("TrainingSamplesEnd", parser.TrainingSamplesEnd);
+          TrySetVariable("ValidationSamplesStart", parser.ValidationSamplesStart);
+          TrySetVariable("ValidationSamplesEnd", parser.ValidationSamplesEnd);
+          TrySetVariable("TestSamplesStart", parser.TestSamplesStart);
+          TrySetVariable("TestSamplesEnd", parser.TestSamplesEnd);
+          TrySetVariable("TargetVariable", parser.TargetVariable);
+
+          IVariable var = StructIdProblemInjector.GetVariable("AllowedFeatures");
+          if (var != null) {
+            ItemList<IntData> allowedFeatures = (ItemList<IntData>)var.Value;
+            allowedFeatures.Clear();
+            List<int> nonInputVariables = parser.NonInputVariables;
+            for (int i = 0; i < dataset.Columns; i++) {
+              if (!nonInputVariables.Contains(i)) allowedFeatures.Add(new IntData(i));
+            }
+          }
+          Refresh();
+        }
+      }
+    }
+
+    private void TrySetVariable(string name, int value) {
+      IVariable var = StructIdProblemInjector.GetVariable(name);
+      if (var != null) {
+        ((IntData)var.Value).Data = value;
+      }
+    }
+
+    private void ShowWarningMessageBox(Exception ex) {
+      MessageBox.Show(ex.Message,
+                      "Warning - " + ex.GetType().Name,
+                      MessageBoxButtons.OK,
+                      MessageBoxIcon.Warning);
+    }
+    private void ShowErrorMessageBox(Exception ex) {
+      MessageBox.Show(BuildErrorMessage(ex),
+                      "Error - " + ex.GetType().Name,
+                      MessageBoxButtons.OK,
+                      MessageBoxIcon.Error);
+    }
+    private string BuildErrorMessage(Exception ex) {
+      StringBuilder sb = new StringBuilder();
+      sb.Append("Sorry, but something went wrong!\n\n" + ex.Message + "\n\n" + ex.StackTrace);
+
+      while (ex.InnerException != null) {
+        ex = ex.InnerException;
+        sb.Append("\n\n-----\n\n" + ex.Message + "\n\n" + ex.StackTrace);
+      }
+      return sb.ToString();
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StructIdProblemInjectorView.resx
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StructIdProblemInjectorView.resx	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/StructIdProblemInjectorView.resx	(revision 1297)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Subtraction.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Subtraction.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Subtraction.cs	(revision 1297)
@@ -0,0 +1,51 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Constraints;
+using System.Linq;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Subtraction : FunctionBase {
+    public override string Description {
+      get {
+        return @"Subtracts the results of sub-tree 2..n from the result of the first sub-tree.
+    (- 3) => -3
+    (- 2 3) => -1
+    (- 3 4 5) => -6";
+      }
+    }
+
+    public Subtraction()
+      : base() {
+      // 2 - 3 seems like an reasonable defaut (used for +,-,*,/) (discussion with swinkler and maffenze)
+      AddConstraint(new NumberOfSubOperatorsConstraint(2, 3));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+      AddConstraint(new SubOperatorTypeConstraint(1));
+      AddConstraint(new SubOperatorTypeConstraint(2));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/SymbolTable.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/SymbolTable.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/SymbolTable.cs	(revision 1297)
@@ -0,0 +1,93 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using System.Xml;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  class EvaluatorSymbolTable : StorableBase {
+    public const byte ADDITION = 1;
+    public const byte AND = 2;
+    public const byte AVERAGE = 3;
+    public const byte CONSTANT = 4;
+    public const byte COSINUS = 5;
+    public const byte DIFFERENTIAL = 25;
+    public const byte DIVISION = 6;
+    public const byte EQU = 7;
+    public const byte EXP = 8;
+    public const byte GT = 9;
+    public const byte IFTE = 10;
+    public const byte LT = 11;
+    public const byte LOG = 12;
+    public const byte MULTIPLICATION = 13;
+    public const byte NOT = 14;
+    public const byte OR = 15;
+    public const byte POWER = 16;
+    public const byte SIGNUM = 17;
+    public const byte SINUS = 18;
+    public const byte SQRT = 19;
+    public const byte SUBTRACTION = 20;
+    public const byte TANGENS = 21;
+    public const byte VARIABLE = 22;
+    public const byte XOR = 23;
+    public const byte UNKNOWN = 24;
+
+    private static Dictionary<Type, byte> staticTypes = new Dictionary<Type, byte>();
+
+    // needs to be public for persistence mechanism (Activator.CreateInstance needs empty constructor)
+    static EvaluatorSymbolTable() {
+      staticTypes = new Dictionary<Type, byte>();
+      staticTypes[typeof(Addition)] = ADDITION;
+      staticTypes[typeof(And)] = AND;
+      staticTypes[typeof(Average)] = AVERAGE;
+      staticTypes[typeof(Constant)] = CONSTANT;
+      staticTypes[typeof(Cosinus)] = COSINUS;
+      staticTypes[typeof(Division)] = DIVISION;
+      staticTypes[typeof(Equal)] = EQU;
+      staticTypes[typeof(Exponential)] = EXP;
+      staticTypes[typeof(GreaterThan)] = GT;
+      staticTypes[typeof(IfThenElse)] = IFTE;
+      staticTypes[typeof(LessThan)] = LT;
+      staticTypes[typeof(Logarithm)] = LOG;
+      staticTypes[typeof(Multiplication)] = MULTIPLICATION;
+      staticTypes[typeof(Not)] = NOT;
+      staticTypes[typeof(Or)] = OR;
+      staticTypes[typeof(Power)] = POWER;
+      staticTypes[typeof(Signum)] = SIGNUM;
+      staticTypes[typeof(Sinus)] = SINUS;
+      staticTypes[typeof(Sqrt)] = SQRT;
+      staticTypes[typeof(Subtraction)] = SUBTRACTION;
+      staticTypes[typeof(Tangens)] = TANGENS;
+      staticTypes[typeof(Variable)] = VARIABLE;
+      staticTypes[typeof(Xor)] = XOR;
+      staticTypes[typeof(Differential)] = DIFFERENTIAL;
+    }
+
+    internal static byte MapFunction(IFunction function) {
+      if(staticTypes.ContainsKey(function.GetType())) return staticTypes[function.GetType()];
+      else return UNKNOWN;
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/SymbolicExpressionExporter.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/SymbolicExpressionExporter.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/SymbolicExpressionExporter.cs	(revision 1297)
@@ -0,0 +1,219 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class SymbolicExpressionExporter : IFunctionTreeExporter, IFunctionTreeNameGenerator {
+    private StringBuilder builder;
+    private string currentIndent;
+
+    #region IFunctionTreeExporter Members
+
+    public string Name {
+      get { return "Symbolic Expression Exporter"; }
+    }
+
+
+    public string Export(IFunctionTree tree) {
+      builder = new StringBuilder();
+      currentIndent = "";
+      BuildExportString(tree);
+      return builder.ToString();
+    }
+
+    public bool TryExport(IFunctionTree tree, out string exported) {
+      try {
+        exported = Export(tree);
+        return true;
+      } catch(UnknownFunctionException) {
+        exported = "";
+        return false;
+      }
+    }
+
+    private void BuildExportString(IFunctionTree tree) {
+      builder.Append(currentIndent);
+      builder.Append("(" + ExportFunction(tree.Function, tree) + " ");
+      currentIndent += "  ";
+      foreach(IFunctionTree subTree in tree.SubTrees) {
+        builder.Append("\n");
+        BuildExportString(subTree);
+      }
+      if(tree.SubTrees.Count > 0) builder.Append(")");
+      currentIndent = currentIndent.Remove(0, 2);
+    }
+
+    private string ExportFunction(IFunction function, IFunctionTree tree) {
+      // this is smelly, if there is a cleaner way to have a 'dynamic' visitor 
+      // please let me know! (gkronber 14.10.2008)
+      if(function is Addition) return ((Addition)function).ExportToScheme();
+      if(function is And) return ((And)function).ExportToScheme();
+      if(function is Average) return ((Average)function).ExportToScheme();
+      if(function is Constant) return ((Constant)function).ExportToScheme(tree);
+      if(function is Cosinus) return ((Cosinus)function).ExportToScheme();
+      if(function is Differential) return ((Differential)function).ExportToScheme(tree);
+      if(function is Division) return ((Division)function).ExportToScheme();
+      if(function is Equal) return ((Equal)function).ExportToScheme();
+      if(function is Exponential) return ((Exponential)function).ExportToScheme();
+      if(function is GreaterThan) return ((GreaterThan)function).ExportToScheme();
+      if(function is IfThenElse) return ((IfThenElse)function).ExportToScheme();
+      if(function is LessThan) return ((LessThan)function).ExportToScheme();
+      if(function is Logarithm) return ((Logarithm)function).ExportToScheme();
+      if(function is Multiplication) return ((Multiplication)function).ExportToScheme();
+      if(function is Not) return ((Not)function).ExportToScheme();
+      if(function is Or) return ((Or)function).ExportToScheme();
+      if(function is Power) return ((Power)function).ExportToScheme();
+      if(function is Signum) return ((Signum)function).ExportToScheme();
+      if(function is Sinus) return ((Sinus)function).ExportToScheme();
+      if(function is Sqrt) return ((Sqrt)function).ExportToScheme();
+      if(function is Subtraction) return ((Subtraction)function).ExportToScheme();
+      if(function is Tangens) return ((Tangens)function).ExportToScheme();
+      if(function is Variable) return ((Variable)function).ExportToScheme(tree);
+      if(function is Xor) return ((Xor)function).ExportToScheme();
+      throw new UnknownFunctionException(function.Name);
+    }
+
+
+    #endregion
+
+    #region IFunctionTreeNameGenerator Members
+
+    string IFunctionTreeNameGenerator.Name {
+      get { return "Symbolic Expression"; }
+    }
+
+    public string GetName(IFunctionTree tree) {
+      string name = "";
+      try {
+        name = ExportFunction(tree.Function, tree);
+      } catch(UnknownFunctionException) {
+        name = "N/A";
+      }
+      return name;
+    }
+
+    #endregion
+  }
+
+  internal static class SchemeExporterExtensions {
+    public static string ExportToScheme(this Addition addition) {
+      return "+";
+    }
+
+    public static string ExportToScheme(this Constant constant, IFunctionTree tree) {
+      return tree.GetLocalVariable(Constant.VALUE).Value.ToString();
+    }
+
+    public static string ExportToScheme(this Cosinus cosinus) {
+      return "cos";
+    }
+
+    public static string ExportToScheme(this Division division) {
+      return "/";
+    }
+
+    public static string ExportToScheme(this Exponential exponential) {
+      return "exp";
+    }
+
+    public static string ExportToScheme(this Logarithm logarithm) {
+      return "log";
+    }
+
+    public static string ExportToScheme(this Multiplication multiplication) {
+      return "*";
+    }
+
+    public static string ExportToScheme(this Power power) {
+      return "expt";
+    }
+
+    public static string ExportToScheme(this Signum signum) {
+      return "sign";
+    }
+
+    public static string ExportToScheme(this Sinus sinus) {
+      return "sin";
+    }
+
+    public static string ExportToScheme(this Sqrt sqrt) {
+      return "sqrt";
+    }
+
+    public static string ExportToScheme(this Subtraction subtraction) {
+      return "-";
+    }
+
+    public static string ExportToScheme(this Tangens tangens) {
+      return "tan";
+    }
+
+    public static string ExportToScheme(this Variable variable, IFunctionTree tree) {
+      return "(variable " + tree.GetLocalVariable(Variable.WEIGHT).Value + " " +
+        tree.GetLocalVariable(Variable.INDEX).Value + " " + tree.GetLocalVariable(Variable.OFFSET).Value + ")";
+    }
+    public static string ExportToScheme(this Differential differential, IFunctionTree tree) {
+      return "(differential " + tree.GetLocalVariable(Differential.WEIGHT).Value + " " +
+        tree.GetLocalVariable(Differential.INDEX).Value + " " + tree.GetLocalVariable(Differential.OFFSET).Value + ")";
+    }
+
+    public static string ExportToScheme(this And and) {
+      return "and";
+    }
+
+    public static string ExportToScheme(this Average average) {
+      return "mean";
+    }
+
+    public static string ExportToScheme(this IfThenElse ifThenElse) {
+      return "if";
+    }
+
+    public static string ExportToScheme(this Not not) {
+      return "not";
+    }
+
+    public static string ExportToScheme(this Or or) {
+      return "or";
+    }
+
+    public static string ExportToScheme(this Xor xor) {
+      return "xor";
+    }
+
+    public static string ExportToScheme(this Equal equal) {
+      return "equ";
+    }
+
+    public static string ExportToScheme(this LessThan lessThan) {
+      return "<";
+    }
+
+    public static string ExportToScheme(this GreaterThan greaterThan) {
+      return ">";
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Tangens.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Tangens.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Tangens.cs	(revision 1297)
@@ -0,0 +1,43 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Tangens : FunctionBase {
+    public override string Description {
+      get { return "Returns the tangens of the first sub-tree."; }
+    }
+
+    public Tangens()
+      : base() {
+      // must have exactly one suboperator
+      AddConstraint(new NumberOfSubOperatorsConstraint(1, 1));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Variable.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Variable.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Variable.cs	(revision 1297)
@@ -0,0 +1,210 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using System.Diagnostics;
+using HeuristicLab.Data;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+using HeuristicLab.Random;
+using HeuristicLab.Operators;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public class Variable : FunctionBase {
+
+    public const string WEIGHT = "Weight";
+    public const string OFFSET = "SampleOffset";
+    public const string INDEX = "Variable";
+
+    private int minIndex;
+    private int maxIndex;
+    private int minOffset;
+    private int maxOffset;
+
+    public override string Description {
+      get {
+        return @"Variable reads a value from a dataset, multiplies that value with a given factor and returns the result.
+The variable 'SampleOffset' can be used to read a value from previous or following rows.
+The index of the row that is actually read is SampleIndex+SampleOffset).";
+      }
+    }
+
+    public Variable()
+      : base() {
+      AddVariableInfo(new VariableInfo(INDEX, "Index of the variable in the dataset representing this feature", typeof(ConstrainedIntData), VariableKind.None));
+      GetVariableInfo(INDEX).Local = true;
+      AddVariableInfo(new VariableInfo(WEIGHT, "Weight is multiplied to the feature value", typeof(ConstrainedDoubleData), VariableKind.None));
+      GetVariableInfo(WEIGHT).Local = true;
+      AddVariableInfo(new VariableInfo(OFFSET, "SampleOffset is added to the sample index", typeof(ConstrainedIntData), VariableKind.None));
+      GetVariableInfo(OFFSET).Local = true;
+      AddVariableInfo(new VariableInfo(INITIALIZATION, "Initialization operator for variables", typeof(CombinedOperator), VariableKind.None));
+      GetVariableInfo(INITIALIZATION).Local = false;
+      AddVariableInfo(new VariableInfo(MANIPULATION, "Manipulation operator for variables", typeof(CombinedOperator), VariableKind.None));
+      GetVariableInfo(MANIPULATION).Local = false;
+
+      ConstrainedDoubleData weight = new ConstrainedDoubleData();
+      // initialize a totally arbitrary range for the weight = [-20.0, 20.0]
+      weight.AddConstraint(new DoubleBoundedConstraint(-20.0, 20.0));
+      AddVariable(new HeuristicLab.Core.Variable(WEIGHT, weight));
+
+      ConstrainedIntData variable = new ConstrainedIntData();
+      AddVariable(new HeuristicLab.Core.Variable(INDEX, variable));
+      minIndex = 0; maxIndex = 100;
+
+      ConstrainedIntData sampleOffset = new ConstrainedIntData();
+      AddVariable(new HeuristicLab.Core.Variable(OFFSET, sampleOffset));
+
+      SetupInitialization();
+      SetupManipulation();
+
+      // variable can't have suboperators
+      AddConstraint(new NumberOfSubOperatorsConstraint(0, 0));
+    }
+
+    private void SetupInitialization() {
+      CombinedOperator combinedOp = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      UniformRandomizer indexRandomizer = new UniformRandomizer();
+      indexRandomizer.Min = minIndex;
+      indexRandomizer.Max = maxIndex + 1; // uniform randomizer generates numbers in the range [min, max[
+      indexRandomizer.GetVariableInfo("Value").ActualName = INDEX;
+      indexRandomizer.Name = "Index Randomizer";
+      NormalRandomizer weightRandomizer = new NormalRandomizer();
+      weightRandomizer.Mu = 1.0;
+      weightRandomizer.Sigma = 1.0;
+      weightRandomizer.GetVariableInfo("Value").ActualName = WEIGHT;
+      weightRandomizer.Name = "Weight Randomizer";
+      UniformRandomizer offsetRandomizer = new UniformRandomizer();
+      offsetRandomizer.Min = minOffset;
+      offsetRandomizer.Max = maxOffset + 1;
+      offsetRandomizer.GetVariableInfo("Value").ActualName = OFFSET;
+      offsetRandomizer.Name = "Offset Randomizer";
+
+      combinedOp.OperatorGraph.AddOperator(seq);
+      combinedOp.OperatorGraph.AddOperator(indexRandomizer);
+      combinedOp.OperatorGraph.AddOperator(weightRandomizer);
+      combinedOp.OperatorGraph.AddOperator(offsetRandomizer);
+      combinedOp.OperatorGraph.InitialOperator = seq;
+      seq.AddSubOperator(indexRandomizer);
+      seq.AddSubOperator(weightRandomizer);
+      seq.AddSubOperator(offsetRandomizer);
+      HeuristicLab.Core.IVariable initOp = GetVariable(INITIALIZATION);
+      if(initOp == null) {
+        AddVariable(new HeuristicLab.Core.Variable(INITIALIZATION, combinedOp));
+      } else {
+        initOp.Value = combinedOp;
+      }
+    }
+
+    private void SetupManipulation() {
+      // manipulation operator
+      CombinedOperator combinedOp = new CombinedOperator();
+      SequentialProcessor seq = new SequentialProcessor();
+      UniformRandomizer indexRandomizer = new UniformRandomizer();
+      indexRandomizer.Min = minIndex;
+      indexRandomizer.Max = maxIndex + 1;
+      indexRandomizer.GetVariableInfo("Value").ActualName = INDEX;
+      indexRandomizer.Name = "Index Randomizer";
+      NormalRandomAdder weightRandomAdder = new NormalRandomAdder();
+      weightRandomAdder.Mu = 0.0;
+      weightRandomAdder.Sigma = 0.1;
+      weightRandomAdder.GetVariableInfo("Value").ActualName = WEIGHT;
+      weightRandomAdder.Name = "Weight Adder";
+      NormalRandomAdder offsetRandomAdder = new NormalRandomAdder();
+      offsetRandomAdder.Mu = 0.0;
+      offsetRandomAdder.Sigma = 1.0;
+      offsetRandomAdder.GetVariableInfo("Value").ActualName = OFFSET;
+      offsetRandomAdder.Name = "Offset Adder";
+
+      combinedOp.OperatorGraph.AddOperator(seq);
+      combinedOp.OperatorGraph.AddOperator(indexRandomizer);
+      combinedOp.OperatorGraph.AddOperator(weightRandomAdder);
+      combinedOp.OperatorGraph.AddOperator(offsetRandomAdder);
+      combinedOp.OperatorGraph.InitialOperator = seq;
+      seq.AddSubOperator(indexRandomizer);
+      seq.AddSubOperator(weightRandomAdder);
+      seq.AddSubOperator(offsetRandomAdder);
+      HeuristicLab.Core.IVariable manipulationOp = GetVariable(MANIPULATION);
+      if(manipulationOp == null) {
+        AddVariable(new HeuristicLab.Core.Variable(MANIPULATION, combinedOp));
+      } else {
+        manipulationOp.Value = combinedOp;
+      }
+    }
+
+    public void SetConstraints(int[] allowedIndexes, int minSampleOffset, int maxSampleOffset) {
+      ConstrainedIntData offset = GetVariableValue<ConstrainedIntData>(OFFSET, null, false);
+      IntBoundedConstraint rangeConstraint = new IntBoundedConstraint();
+      this.minOffset = minSampleOffset;
+      this.maxOffset = maxSampleOffset;
+      rangeConstraint.LowerBound = minSampleOffset;
+      rangeConstraint.LowerBoundEnabled = true;
+      rangeConstraint.LowerBoundIncluded = true;
+      rangeConstraint.UpperBound = maxSampleOffset;
+      rangeConstraint.UpperBoundEnabled = true;
+      rangeConstraint.UpperBoundIncluded = true;
+      offset.AddConstraint(rangeConstraint);
+
+      ConstrainedIntData index = GetVariableValue<ConstrainedIntData>(INDEX, null, false);
+      Array.Sort(allowedIndexes);
+      minIndex = allowedIndexes[0]; maxIndex = allowedIndexes[allowedIndexes.Length - 1];
+      List<IConstraint> constraints = new List<IConstraint>();
+      int start = allowedIndexes[0];
+      int prev = start;
+      for(int i = 1; i < allowedIndexes.Length; i++) {
+        if(allowedIndexes[i] != prev + 1) {
+          IntBoundedConstraint lastRange = new IntBoundedConstraint();
+          lastRange.LowerBound = start;
+          lastRange.LowerBoundEnabled = true;
+          lastRange.LowerBoundIncluded = true;
+          lastRange.UpperBound = prev;
+          lastRange.UpperBoundEnabled = true;
+          lastRange.UpperBoundIncluded = true;
+          constraints.Add(lastRange);
+          start = allowedIndexes[i];
+          prev = start;
+        }
+        prev = allowedIndexes[i];
+      }
+      IntBoundedConstraint range = new IntBoundedConstraint();
+      range.LowerBound = start;
+      range.LowerBoundEnabled = true;
+      range.LowerBoundIncluded = true;
+      range.UpperBound = prev;
+      range.UpperBoundEnabled = true;
+      range.UpperBoundIncluded = true;
+      constraints.Add(range);
+      if(constraints.Count > 1) {
+        OrConstraint or = new OrConstraint();
+        foreach(IConstraint c in constraints) or.Clauses.Add(c);
+        index.AddConstraint(or);
+      } else {
+        index.AddConstraint(constraints[0]);
+      }
+
+      SetupInitialization();
+      SetupManipulation();
+    }
+  }
+}
Index: branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Xor.cs
===================================================================
--- branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Xor.cs	(revision 1297)
+++ branches/plugins/HeuristicLab.GP.StructureIdentification/3.2/Xor.cs	(revision 1297)
@@ -0,0 +1,44 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Constraints;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.GP.StructureIdentification {
+  public sealed class Xor : FunctionBase {
+    public override string Description {
+      get {
+        return @"Logical XOR operation. Only defined for sub-tree-results 0.0 and 1.0.";
+      }
+    }
+
+    public Xor()
+      : base() {
+      AddConstraint(new NumberOfSubOperatorsConstraint(2, 2));
+      AddConstraint(new SubOperatorTypeConstraint(0));
+      AddConstraint(new SubOperatorTypeConstraint(1));
+    }
+  }
+}
