Index: /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/AlgorithmBase.cs
===================================================================
--- /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/AlgorithmBase.cs	(revision 1235)
+++ /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/AlgorithmBase.cs	(revision 1236)
@@ -245,4 +245,5 @@
       BestAverageWorstQualityCalculator validationQualityCalculator = new BestAverageWorstQualityCalculator();
       validationQualityCalculator.Name = "ValidationQualityCalculator";
+      validationQualityCalculator.GetVariableInfo("Quality").ActualName = "ValidationQuality";
       validationQualityCalculator.GetVariableInfo("BestQuality").ActualName = "BestValidationQuality";
       validationQualityCalculator.GetVariableInfo("AverageQuality").ActualName = "AverageValidationQuality";
@@ -261,5 +262,5 @@
       QualityLogger qualityLogger = new QualityLogger();
       QualityLogger validationQualityLogger = new QualityLogger();
-      validationQualityCalculator.Name = "ValidationQualityLogger";
+      validationQualityLogger.Name = "ValidationQualityLogger";
       validationQualityLogger.GetVariableInfo("Quality").ActualName = "ValidationQuality";
       validationQualityLogger.GetVariableInfo("QualityLog").ActualName = "ValidationQualityLog";
@@ -330,5 +331,5 @@
     }
 
-    internal  virtual IOperator CreateChildCreater() {
+    internal virtual IOperator CreateChildCreater() {
       CombinedOperator childCreater = new CombinedOperator();
       childCreater.Name = "Create children";
Index: /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/OffSpringSelectionGpEditor.cs
===================================================================
--- /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/OffSpringSelectionGpEditor.cs	(revision 1235)
+++ /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/OffSpringSelectionGpEditor.cs	(revision 1236)
@@ -129,4 +129,5 @@
         executeButton.Enabled = true;
         abortButton.Enabled = false;
+        resetButton.Enabled = true;
       }
     }
Index: /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/OffspringSelectionGP.cs
===================================================================
--- /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/OffspringSelectionGP.cs	(revision 1235)
+++ /branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP.StructureIdentification/OffspringSelectionGP.cs	(revision 1236)
@@ -39,10 +39,4 @@
   public class OffspringSelectionGP : StandardGP {
 
-    private IntData maxEvaluatedSolutions = new IntData();
-    public int MaxEvaluatedSolutions {
-      get { return maxEvaluatedSolutions.Data; }
-      set { maxEvaluatedSolutions.Data = value; }
-    }
-
     private DoubleData selectionPressureLimit = new DoubleData();
     public double SelectionPressureLimit {
@@ -66,5 +60,5 @@
       PopulationSize = 1000;
       Parents = 20;
-      MaxEvaluatedSolutions = 1000000;
+      MaxGenerations = 300;
       SelectionPressureLimit = 300;
       ComparisonFactor = 1.0;
@@ -75,6 +69,4 @@
       VariableInjector injector = (VariableInjector)base.CreateGlobalInjector();
       injector.RemoveVariable("TournamentSize");
-      injector.RemoveVariable("MaxGenerations");
-      injector.AddVariable(new HeuristicLab.Core.Variable("MaxEvaluatedSolutions", maxEvaluatedSolutions));
       injector.AddVariable(new HeuristicLab.Core.Variable("ComparisonFactor", comparisonFactor));
       injector.AddVariable(new HeuristicLab.Core.Variable("SelectionPressureLimit", selectionPressureLimit));
@@ -113,86 +105,76 @@
     }
 
-    internal override IOperator CreateMainLoop() {
-      CombinedOperator main = new CombinedOperator();
+    internal override IOperator CreateChildCreater() {
+      CombinedOperator childCreater = new CombinedOperator();
+      childCreater.Name = "Create children";
       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";
-
-      IOperator childCreater = CreateChildCreater();
-      childCreater.Name = "Create children";
-      IOperator replacement = CreateReplacement();
-      replacement.Name = "Replacement";
-      IOperator solutionStorer = CreateBestSolutionProcessor();
-      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 = "EvaluatedSolutions";
-      generationsComparator.GetVariableInfo("RightSide").ActualName = "MaxEvaluatedSolutions";
-      generationsComparator.GetVariableInfo("Result").ActualName = "EvaluatedSolutionsCondition";
-      ConditionalBranch selPresCondition = new ConditionalBranch();
-      selPresCondition.GetVariableInfo("Condition").ActualName = "SelectionPressureCondition";
-      ConditionalBranch generationsCondition = new ConditionalBranch();
-      generationsCondition.GetVariableInfo("Condition").ActualName = "EvaluatedSolutionsCondition";
-
-      subScopesProc.AddSubOperator(emptyOp);
-      subScopesProc.AddSubOperator(childCreater);
-
+      SequentialSubScopesProcessor seqSubScopesProc = new SequentialSubScopesProcessor();
+      EmptyOperator emptyOp = new EmptyOperator();
+      OffspringSelector offspringSelector = new OffspringSelector();
+      OffspringAnalyzer offspringAnalyzer = new OffspringAnalyzer();
+      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";
+      Counter evalCounter = new Counter();
+      evalCounter.GetVariableInfo("Value").ActualName = "EvaluatedSolutions";
+
+      Sorter sorter = new Sorter();
+      sorter.GetVariableInfo("Descending").ActualName = "Maximization";
+      sorter.GetVariableInfo("Value").ActualName = "Quality";
+
+      UniformSequentialSubScopesProcessor validationEvaluator = new UniformSequentialSubScopesProcessor();
+      MeanSquaredErrorEvaluator validationQualityEvaluator = new MeanSquaredErrorEvaluator();
+      validationQualityEvaluator.Name = "ValidationMeanSquaredErrorEvaluator";
+      validationQualityEvaluator.GetVariableInfo("MSE").ActualName = "ValidationQuality";
+      validationQualityEvaluator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart";
+      validationQualityEvaluator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd";
+
+      seqSubScopesProc.AddSubOperator(emptyOp);
+      seqSubScopesProc.AddSubOperator(offspringAnalyzer);
+
+      seq.AddSubOperator(offspringSelectionSeq);
+      offspringSelectionSeq.AddSubOperator(selector);
+      offspringSelectionSeq.AddSubOperator(seqSubScopesProc);
+      offspringSelectionSeq.AddSubOperator(offspringSelector);
       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;
+      offspringAnalyzer.AddSubOperator(selectedProc);
+      selectedProc.AddSubOperator(crossover);
+      selectedProc.AddSubOperator(individualProc);
+      individualProc.AddSubOperator(individualSeqProc);
+      individualSeqProc.AddSubOperator(cond);
+      cond.AddSubOperator(manipulator);
+      individualSeqProc.AddSubOperator(evaluator);
+      individualSeqProc.AddSubOperator(evalCounter);
+
+      SequentialSubScopesProcessor seqSubScopesProc2 = new SequentialSubScopesProcessor();
+      seq.AddSubOperator(seqSubScopesProc2);
+      seqSubScopesProc2.AddSubOperator(emptyOp);
+
+      SequentialProcessor newGenProc = new SequentialProcessor();
+      newGenProc.AddSubOperator(sorter);
+      newGenProc.AddSubOperator(validationEvaluator);
+      seqSubScopesProc2.AddSubOperator(newGenProc);
+
+      validationEvaluator.AddSubOperator(validationQualityEvaluator);
+
+      childCreater.OperatorGraph.AddOperator(seq);
+      childCreater.OperatorGraph.InitialOperator = seq;
+      return childCreater;
     }
 
@@ -223,5 +205,4 @@
       // VariableInjector
       VariableInjector vi = (VariableInjector)algorithm.SubOperators[2];
-      maxEvaluatedSolutions = vi.GetVariable("MaxEvaluatedSolutions").GetValue<IntData>();
       selectionPressureLimit = vi.GetVariable("SelectionPressureLimit").GetValue<DoubleData>();
       successRatioLimit = vi.GetVariable("SuccessRatioLimit").GetValue<DoubleData>();
