Index: /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/AlgorithmBase.cs
===================================================================
--- /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/AlgorithmBase.cs	(revision 1230)
+++ /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/AlgorithmBase.cs	(revision 1231)
@@ -36,12 +36,12 @@
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public abstract class AlgorithmBase : ItemBase, IEditable {
+  public abstract class AlgorithmBase : ItemBase {
     private DoubleData mutationRate = new DoubleData();
-    public double MutationRate {
+    public virtual double MutationRate {
       get { return mutationRate.Data; }
       set { mutationRate.Data = value; }
     }
     private IntData populationSize = new IntData();
-    public int PopulationSize {
+    public virtual int PopulationSize {
       get { return populationSize.Data; }
       set {
@@ -51,5 +51,5 @@
 
     private BoolData setSeedRandomly = new BoolData();
-    public bool SetSeedRandomly {
+    public virtual bool SetSeedRandomly {
       get { return setSeedRandomly.Data; }
       set { setSeedRandomly.Data = value; }
@@ -57,10 +57,10 @@
 
     private IntData seed = new IntData();
-    public int Seed {
+    public virtual int Seed {
       get { return seed.Data; }
       set { seed.Data = value; }
     }
 
-    public IOperator ProblemInjector {
+    public virtual IOperator ProblemInjector {
       get { return algorithm.SubOperators[0]; }
       set {
@@ -72,5 +72,5 @@
 
     private IntData elites = new IntData();
-    public int Elites {
+    public virtual int Elites {
       get { return elites.Data; }
       set { elites.Data = value; }
@@ -78,5 +78,5 @@
 
     private int maxTreeSize = 50;
-    public int MaxTreeSize {
+    public virtual int MaxTreeSize {
       get { return maxTreeSize; }
       set { maxTreeSize = value; }
@@ -84,13 +84,17 @@
 
     private int maxTreeHeight = 8;
-    public int MaxTreeHeight {
+    public virtual int MaxTreeHeight {
       get { return maxTreeHeight; }
       set { maxTreeHeight = value; }
     }
 
+    private IntData parents = new IntData();
+    public virtual int Parents {
+      get { return parents.Data; }
+      protected set { parents.Data = value; }
+    }
+
     private double punishmentFactor = 10.0;
     private bool useEstimatedTargetValue = false;
-    private double fullTreeShakingFactor = 0.1;
-    private double onepointShakingFactor = 1.0;
     private IOperator algorithm;
 
@@ -98,12 +102,8 @@
     public IEngine Engine {
       get { return engine; }
+      protected set { engine = (SequentialEngine.SequentialEngine)value; }
     }
 
     public AlgorithmBase() {
-      PopulationSize = 10000;
-      MutationRate = 0.15;
-      Elites = 1;
-      MaxTreeSize = 100;
-      MaxTreeHeight = 10;
       engine = new SequentialEngine.SequentialEngine();
       CombinedOperator algo = CreateAlgorithm();
@@ -112,5 +112,5 @@
     }
 
-    virtual CombinedOperator CreateAlgorithm() {
+    internal virtual CombinedOperator CreateAlgorithm() {
       CombinedOperator algo = new CombinedOperator();
       algo.Name = "GP";
@@ -166,11 +166,11 @@
     internal abstract IOperator CreateSelector();
 
-    abstract IOperator CreateCrossover();
-
-    abstract IOperator CreateTreeCreator();
-
-    abstract IOperator CreateFunctionLibraryInjector();
-
-    virtual IOperator CreateGlobalInjector() {
+    internal abstract IOperator CreateCrossover();
+
+    internal abstract IOperator CreateTreeCreator();
+
+    internal abstract IOperator CreateFunctionLibraryInjector();
+
+    internal virtual IOperator CreateGlobalInjector() {
       VariableInjector injector = new VariableInjector();
       injector.Name = "Global Injector";
@@ -184,4 +184,5 @@
       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("Parents", parents));
       injector.AddVariable(new HeuristicLab.Core.Variable("PunishmentFactor", new DoubleData(punishmentFactor)));
       injector.AddVariable(new HeuristicLab.Core.Variable("UseEstimatedTargetValue", new BoolData(useEstimatedTargetValue)));
@@ -189,7 +190,7 @@
     }
 
-    abstract IOperator CreateManipulator();
-
-    virtual IOperator CreateInitialization() {
+    internal abstract IOperator CreateManipulator();
+
+    internal virtual IOperator CreateInitialization() {
       CombinedOperator init = new CombinedOperator();
       init.Name = "Initialization";
@@ -230,5 +231,5 @@
     }
 
-    virtual IOperator CreateMainLoop() {
+    internal virtual IOperator CreateMainLoop() {
       CombinedOperator main = new CombinedOperator();
       SequentialProcessor seq = new SequentialProcessor();
@@ -291,9 +292,9 @@
     }
 
-    virtual IOperator CreateBestSolutionProcessor() {
+    internal virtual IOperator CreateBestSolutionProcessor() {
       return new EmptyOperator();
     }
 
-    private virtual IOperator CreateReplacement() {
+    internal virtual IOperator CreateReplacement() {
       CombinedOperator replacement = new CombinedOperator();
       replacement.Name = "Replacement";
@@ -329,5 +330,5 @@
     }
 
-    private virtual IOperator CreateChildCreater() {
+    internal  virtual IOperator CreateChildCreater() {
       CombinedOperator childCreater = new CombinedOperator();
       childCreater.Name = "Create children";
@@ -403,8 +404,7 @@
       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>();
+      parents = vi.GetVariable("Parents").GetValue<IntData>();
     }
     #endregion
Index: /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/StandardGP.cs
===================================================================
--- /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/StandardGP.cs	(revision 1230)
+++ /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/StandardGP.cs	(revision 1231)
@@ -36,5 +36,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public class StandardGP : AlgorithmBase {
+  public class StandardGP : AlgorithmBase, IEditable {
 
     private IntData maxGenerations = new IntData();
@@ -50,5 +50,28 @@
     }
 
-    public StandardGP() : base() {
+    private DoubleData fullTreeShakingFactor = new DoubleData();
+    public double FullTreeShakingFactor {
+      get { return fullTreeShakingFactor.Data; }
+      set { fullTreeShakingFactor.Data = value; }
+    }
+
+    private DoubleData onepointShakingFactor = new DoubleData();
+    public double OnePointShakingFactor {
+      get { return onepointShakingFactor.Data; }
+      set { onepointShakingFactor.Data = value; }
+    }
+
+    public override int PopulationSize {
+      get {
+        return base.PopulationSize;
+      }
+      set {
+        base.PopulationSize = value;
+        Parents = 2 * value;
+      }
+    }
+
+    public StandardGP()
+      : base() {
       PopulationSize = 10000;
       MaxGenerations = 100;
@@ -58,11 +81,14 @@
       MaxTreeSize = 100;
       MaxTreeHeight = 10;
-      engine = new SequentialEngine.SequentialEngine();
+      FullTreeShakingFactor = 0.1;
+      OnePointShakingFactor = 1.0;
+
+      Engine = new SequentialEngine.SequentialEngine();
       IOperator algo = CreateAlgorithm();
-      engine.OperatorGraph.AddOperator(algo);
-      engine.OperatorGraph.InitialOperator = algo;
-    }
-
-    override IOperator CreateSelector()  {
+      Engine.OperatorGraph.AddOperator(algo);
+      Engine.OperatorGraph.InitialOperator = algo;
+    }
+
+    internal override IOperator CreateSelector() {
       TournamentSelector selector = new TournamentSelector();
       selector.Name = "Selector";
@@ -74,6 +100,12 @@
     }
 
-
-    override IOperator CreateCrossover() {
+    internal override IOperator CreateGlobalInjector() {
+      VariableInjector globalInjector = (VariableInjector)base.CreateGlobalInjector();
+      globalInjector.AddVariable(new HeuristicLab.Core.Variable("TournamentSize", tournamentSize));
+      globalInjector.AddVariable(new HeuristicLab.Core.Variable("MaxGenerations", maxGenerations));
+      return globalInjector;
+    }
+
+    internal override IOperator CreateCrossover() {
       StandardCrossOver crossover = new StandardCrossOver();
       crossover.Name = "Crossover";
@@ -82,18 +114,18 @@
     }
 
-    override IOperator CreateTreeCreator() {
+    internal override IOperator CreateTreeCreator() {
       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)));
+      treeCreator.AddVariable(new HeuristicLab.Core.Variable("MinTreeSize", new IntData(30)));
       return treeCreator;
     }
 
-    override IOperator CreateFunctionLibraryInjector() {
+    internal override IOperator CreateFunctionLibraryInjector() {
       return new FunctionLibraryInjector();
     }
 
-    override IOperator CreateManipulator()  {
+    internal override IOperator CreateManipulator() {
       CombinedOperator manipulator = new CombinedOperator();
       manipulator.Name = "Manipulator";
@@ -102,10 +134,10 @@
       fullTreeShaker.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
       fullTreeShaker.GetVariableInfo("ShakingFactor").Local = true;
-      fullTreeShaker.AddVariable(new HeuristicLab.Core.Variable("ShakingFactor", new DoubleData(fullTreeShakingFactor)));
+      fullTreeShaker.AddVariable(new HeuristicLab.Core.Variable("ShakingFactor", 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)));
+      onepointShaker.AddVariable(new HeuristicLab.Core.Variable("ShakingFactor", onepointShakingFactor));
       ChangeNodeTypeManipulation changeNodeTypeManipulation = new ChangeNodeTypeManipulation();
       changeNodeTypeManipulation.GetVariableInfo("OperatorLibrary").ActualName = "FunctionLibrary";
@@ -137,5 +169,5 @@
     }
 
-    override IOperator CreateBestSolutionProcessor() {
+    internal override IOperator CreateBestSolutionProcessor() {
       SequentialProcessor bestSolutionProcessor = new SequentialProcessor();
       MeanAbsolutePercentageErrorEvaluator trainingMapeEvaluator = new MeanAbsolutePercentageErrorEvaluator();
@@ -162,215 +194,4 @@
     }
 
-    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);
@@ -384,5 +205,5 @@
       StandardGP clone = new StandardGP();
       clonedObjects.Add(Guid, clone);
-      clone.engine = (SequentialEngine.SequentialEngine)Auxiliary.Clone(Engine, clonedObjects);
+      clone.Engine = (SequentialEngine.SequentialEngine)Auxiliary.Clone(Engine, clonedObjects);
       return clone;
     }
@@ -392,16 +213,11 @@
       CombinedOperator co1 = (CombinedOperator)Engine.OperatorGraph.InitialOperator;
       // SequentialProcessor in SGA
-      algorithm = (SequentialProcessor)co1.OperatorGraph.InitialOperator;
+      SequentialProcessor 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>();
+      tournamentSize = vi.GetVariable("TournamentSize").GetValue<IntData>();
     }
     #endregion
@@ -415,5 +231,5 @@
     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
       base.Populate(node, restoredObjects);
-      engine = (SequentialEngine.SequentialEngine)PersistenceManager.Restore(node.SelectSingleNode("Engine"), restoredObjects);
+      Engine = (SequentialEngine.SequentialEngine)PersistenceManager.Restore(node.SelectSingleNode("Engine"), restoredObjects);
       SetReferences();
     }
Index: /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/StandardGpEditor.cs
===================================================================
--- /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/StandardGpEditor.cs	(revision 1230)
+++ /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/StandardGpEditor.cs	(revision 1231)
@@ -128,4 +128,5 @@
         executeButton.Enabled = true;
         abortButton.Enabled = false;
+        resetButton.Enabled = true;
       }
     }
Index: /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.sln
===================================================================
--- /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.sln	(revision 1230)
+++ /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.sln	(revision 1231)
@@ -515,4 +515,5 @@
 		{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}.Debug|x86.Build.0 = Debug|x86
 		{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}.GP Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}.GP Debug|Any CPU.Build.0 = Debug|Any CPU
 		{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}.GP Debug|x86.ActiveCfg = Debug|x86
 		{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}.GP Debug|x86.Build.0 = Debug|x86
