Index: /branches/IslandALPS/IslandALPS/3.3/GroupedLayerOperator.cs
===================================================================
--- /branches/IslandALPS/IslandALPS/3.3/GroupedLayerOperator.cs	(revision 13595)
+++ /branches/IslandALPS/IslandALPS/3.3/GroupedLayerOperator.cs	(revision 13595)
@@ -0,0 +1,133 @@
+﻿using System.Linq;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.IslandALPS {
+  /// <summary>
+  ///   An Operator which creates a Subscope and then copies the layers from each island grouped by Layernumber into the new
+  ///   scope. Then the operator executes the specified Operator on each group and afterwards deletes the created scope.
+  ///   G        newScope - G
+  ///   /|\          /\     /|\
+  ///   I I I  =>    L1 L2  I I I
+  ///   / \                 / \
+  ///   L1  L2              L1 L2
+  /// </summary>
+  [Item("GroupedLayerOperator", "")]
+  [StorableClass]
+  public class GroupedLayerOperator : InstrumentedOperator {
+    [StorableConstructor]
+    public GroupedLayerOperator(bool deserializing) : base(deserializing) {}
+
+    public GroupedLayerOperator(GroupedLayerOperator original, Cloner cloner) : base(original, cloner) {}
+
+    public GroupedLayerOperator() {
+      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the operator gets executed."));
+      Parameters.Add(new OperatorParameter("Operator", "The operator which should be applied on all grouped scopes."));
+      //add results colletion to save the list of group result in
+    }
+
+    private ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter) Parameters["CurrentScope"]; }
+    }
+
+    private OperatorParameter OperatorParameter {
+      get { return (OperatorParameter) Parameters["Operator"]; }
+    }
+
+    public IScope CurrentScope {
+      get { return CurrentScopeParameter.ActualValue; }
+    }
+
+    public IOperator Operator {
+      get { return OperatorParameter.Value; }
+      set { OperatorParameter.Value = value; }
+    }
+
+    private IScope GroupScope {
+      get {
+        if (CurrentScope.Variables.ContainsKey("GroupScope")) {
+          return CurrentScope.Variables["GroupScope"].Value as IScope;
+        }
+        var scope = new Scope();
+        CurrentScope.Variables.Add(new Variable("GroupScope", scope));
+        return scope;
+      }
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GroupedLayerOperator(this, cloner);
+    }
+
+    public override IOperation InstrumentedApply() {
+      //create the subscope where the individuals get copied to.
+      var scope = GroupScope;
+      //descend to find the scope with individuals to copy
+      foreach (var islandScope in CurrentScope.SubScopes) {
+        var numScope = 0;
+        foreach (var layerScope in islandScope.SubScopes) {
+          //copy the individuals to the apropriate group (based on order in the ScopeTree, e.g. first layer into first group)
+          IScope analyzerScope;
+          if (scope.SubScopes.Count <= numScope) {
+            if (!scope.SubScopes.Any()) {
+              analyzerScope = new Scope();
+              var rc = new ResultCollection();
+              analyzerScope.Variables.Add(new Variable("GroupResults", rc));
+              analyzerScope.Variables.Add(new Variable("LayerNumber", new IntValue(numScope)));
+            }
+            else {
+              analyzerScope = scope.SubScopes.First().Clone() as IScope;
+              var rc = (ResultCollection) analyzerScope.Variables["GroupResults"].Value;
+              ClearHistoryRecursively(rc);
+              analyzerScope.Variables["LayerNumber"].Value = new IntValue(numScope);
+              //TODO: let a result collector update the lookups ?
+            }
+
+            scope.SubScopes.Add(analyzerScope);
+          }
+          else {
+            analyzerScope = scope.SubScopes[numScope];
+          }
+          //delete old individuals
+          analyzerScope.SubScopes.Clear();
+          foreach (var individual in layerScope.SubScopes) {
+            analyzerScope.SubScopes.Add(individual.Clone() as IScope);
+          }
+          numScope++;
+        }
+      }
+
+      //execute the operator on each grouped scope
+      var next = new OperationCollection(base.InstrumentedApply());
+      foreach (var scopeGroup in scope.SubScopes) {
+        var inner = new OperationCollection();
+        inner.Add(ExecutionContext.CreateOperation(Operator, scopeGroup));
+        next.Insert(0, inner);
+      }
+
+
+      return next;
+    }
+
+    //TODO: Copied from ResultsHistoryWiper, When integrate create static apply method and delete this
+    private static void ClearHistoryRecursively(ResultCollection results) {
+      var values = results.Select(r => r.Value);
+
+      // Reset all values within results in results
+      foreach (var resultsCollection in values.OfType<ResultCollection>())
+        ClearHistoryRecursively(resultsCollection);
+
+      // Reset values
+      foreach (var dataTable in values.OfType<DataTable>()) {
+        foreach (var row in dataTable.Rows)
+          for (var i = 0; i < row.Values.Count; i++)
+            row.Values[i] = double.NaN;
+      }
+    }
+  }
+}
Index: /branches/IslandALPS/IslandALPS/3.3/HeuristicLab.Algorithms.IslandALPS-3.3.csproj
===================================================================
--- /branches/IslandALPS/IslandALPS/3.3/HeuristicLab.Algorithms.IslandALPS-3.3.csproj	(revision 13594)
+++ /branches/IslandALPS/IslandALPS/3.3/HeuristicLab.Algorithms.IslandALPS-3.3.csproj	(revision 13595)
@@ -105,8 +105,10 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="ResultsExtractor.cs" />
     <Compile Include="IslandALPSAlgorithm.cs" />
     <Compile Include="IslandALPSAlgorthmsMainLoop.cs" />
     <Compile Include="Plugin.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="GroupedLayerOperator.cs" />
   </ItemGroup>
   <ItemGroup>
Index: /branches/IslandALPS/IslandALPS/3.3/IslandALPSAlgorithm.cs
===================================================================
--- /branches/IslandALPS/IslandALPS/3.3/IslandALPSAlgorithm.cs	(revision 13594)
+++ /branches/IslandALPS/IslandALPS/3.3/IslandALPSAlgorithm.cs	(revision 13595)
@@ -62,4 +62,7 @@
       get { return (IValueParameter<MultiAnalyzer>)Parameters["LayerAnalyzer"]; }
     }
+    private IValueParameter<MultiAnalyzer> GroupAnalyzerParameter {
+      get { return (IValueParameter<MultiAnalyzer>)Parameters["GroupAnalyzer"]; }
+    }
     private IValueParameter<BoolValue> PlusSelectionParameter {
       get { return (IValueParameter<BoolValue>)Parameters["PlusSelection"]; }
@@ -149,4 +152,8 @@
       set { LayerAnalyzerParameter.Value = value; }
     }
+    public MultiAnalyzer GroupAnalyzer {
+      get { return GroupAnalyzerParameter.Value; }
+      set { GroupAnalyzerParameter.Value = value; }
+    }
     public ISelector Selector {
       get { return SelectorParameter.Value; }
@@ -224,4 +231,5 @@
     [Storable] private readonly BestAverageWorstQualityAnalyzer islandQualityAnalyzer;
     [Storable] private readonly BestAverageWorstQualityAnalyzer layerQualityAnalyzer;
+    [Storable] private readonly BestAverageWorstQualityAnalyzer groupQualityAnalyzer;
 
     #endregion
@@ -246,4 +254,5 @@
       islandQualityAnalyzer = cloner.Clone(original.islandQualityAnalyzer);
       layerQualityAnalyzer = cloner.Clone(original.layerQualityAnalyzer);
+      groupQualityAnalyzer = cloner.Clone(original.groupQualityAnalyzer);
       //terminator
       generationsTerminator = cloner.Clone(original.generationsTerminator);
@@ -266,4 +275,5 @@
       Parameters.Add(new ValueParameter<IntValue>("NumberOfLayers", "", new IntValue(10)));
       Parameters.Add(new ValueParameter<MultiAnalyzer>("LayerAnalyzer", "The operator used to analyze each layer.", new MultiAnalyzer()));
+      Parameters.Add(new ValueParameter<MultiAnalyzer>("GroupAnalyzer", "The operator used to analyze each layergroup.", new MultiAnalyzer()));
       Parameters.Add(new ValueParameter<BoolValue>("PlusSelection", "Include the parents in the selection of the invividuals for the next generation.", new BoolValue(false)));
 
@@ -334,4 +344,5 @@
       islandQualityAnalyzer = new BestAverageWorstQualityAnalyzer();
       layerQualityAnalyzer = new BestAverageWorstQualityAnalyzer();
+      groupQualityAnalyzer = new BestAverageWorstQualityAnalyzer();
       #endregion
 
@@ -519,11 +530,12 @@
       LayerAnalyzer.Operators.Clear();
       IslandAnalyzer.Operators.Clear();
+      GroupAnalyzer.Operators.Clear();
       Analyzer.Operators.Clear();
 
       //add analyzer
+      GroupAnalyzer.Operators.Add(groupQualityAnalyzer, groupQualityAnalyzer.EnabledByDefault);
       LayerAnalyzer.Operators.Add(layerQualityAnalyzer, layerQualityAnalyzer.EnabledByDefault);
       IslandAnalyzer.Operators.Add(islandQualityAnalyzer, islandQualityAnalyzer.EnabledByDefault);
       Analyzer.Operators.Add(qualityAnalyzer, qualityAnalyzer.EnabledByDefault);
-
       //depth for each analyzer gets set when added
       if (Problem != null) {
@@ -532,4 +544,5 @@
           IslandAnalyzer.Operators.Add((IAnalyzer)analyzer.Clone(),false);
           LayerAnalyzer.Operators.Add((IAnalyzer)analyzer.Clone(), false);
+          GroupAnalyzer.Operators.Add((IAnalyzer) analyzer.Clone(),false);
         }
       }
@@ -576,4 +589,5 @@
       IslandAnalyzer.Operators.ItemsAdded += IslandAnalyzerOperators_ItemsAdded;
       LayerAnalyzer.Operators.ItemsAdded += LayerAnalyzerOperators_ItemsAdded;
+      GroupAnalyzer.Operators.ItemsAdded += GroupAnalyzerOperators_ItemsAdded;
 
       if (Problem != null) {
@@ -589,4 +603,18 @@
       NumberOfLayers.ValueChanged += NumberOfLayers_ValueChanged;
 
+    }
+
+    private void GroupAnalyzerOperators_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<IAnalyzer>> e) {
+      foreach (var analyzer in e.Items) {
+        IParameter resultParameter;
+        if (analyzer.Value.Parameters.TryGetValue("Results", out resultParameter)) {
+          var lookupParameter = resultParameter as ILookupParameter;
+          if (lookupParameter != null)
+            lookupParameter.ActualName = "GroupResults";
+        }
+        foreach (var parameter in analyzer.Value.Parameters.OfType<IScopeTreeLookupParameter>()) {
+          parameter.Depth = 1;
+        }
+      }
     }
 
@@ -685,5 +713,5 @@
 
       MainLoop.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
-      MainLoop.LayerEvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions";
+      MainLoop.LayerEvaluatedSolutionsParameter.ActualName = "LayerEvaluatedSolutions";
 
       MainLoop.PlusSelectionParameter.ActualName = PlusSelectionParameter.Name;
@@ -700,4 +728,10 @@
       MainLoop.TerminatorParameter.ActualName = TerminatorParameter.Name;
 
+      MainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name;
+      MainLoop.LayerAnalyzerParameter.ActualName = LayerAnalyzerParameter.Name;
+      MainLoop.IslandAnalyzerParameter.ActualName = IslandAnalyzerParameter.Name;
+      MainLoop.GroupAnalyzerParameter.ActualName = GroupAnalyzerParameter.Name;
+
+
       MainLoop.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
       MainLoop.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
@@ -735,27 +769,23 @@
       qualityAnalyzer.ResultsParameter.ActualName = "Results";
       qualityAnalyzer.ResultsParameter.Hidden = true;
-     
+
+      groupQualityAnalyzer.ResultsParameter.ActualName = "GroupResults";
+      groupQualityAnalyzer.ResultsParameter.Hidden = true;
 
       if (Problem != null) {
-
-        layerQualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
-        layerQualityAnalyzer.MaximizationParameter.Hidden = true;
-        layerQualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
-        layerQualityAnalyzer.QualityParameter.Hidden = true;
-        layerQualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
-        layerQualityAnalyzer.BestKnownQualityParameter.Hidden = true;
-        islandQualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
-        islandQualityAnalyzer.MaximizationParameter.Hidden = true;
-        islandQualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
-        islandQualityAnalyzer.QualityParameter.Hidden = true;
-        islandQualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
-        islandQualityAnalyzer.BestKnownQualityParameter.Hidden = true;
-        qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
-        qualityAnalyzer.MaximizationParameter.Hidden = true;
-        qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
-        qualityAnalyzer.QualityParameter.Hidden = true;
-        qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
-        qualityAnalyzer.BestKnownQualityParameter.Hidden = true;
-      }
+        SetAnalyzerParameter(layerQualityAnalyzer);
+        SetAnalyzerParameter(islandQualityAnalyzer);
+        SetAnalyzerParameter(qualityAnalyzer);
+        SetAnalyzerParameter(groupQualityAnalyzer);
+      }
+    }
+
+    private void SetAnalyzerParameter(BestAverageWorstQualityAnalyzer analyzer) {
+      analyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+      analyzer.MaximizationParameter.Hidden = true;
+      analyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+      analyzer.QualityParameter.Hidden = true;
+      analyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
+      analyzer.BestKnownQualityParameter.Hidden = true;
     }
 
Index: /branches/IslandALPS/IslandALPS/3.3/IslandALPSAlgorthmsMainLoop.cs
===================================================================
--- /branches/IslandALPS/IslandALPS/3.3/IslandALPSAlgorthmsMainLoop.cs	(revision 13594)
+++ /branches/IslandALPS/IslandALPS/3.3/IslandALPSAlgorthmsMainLoop.cs	(revision 13595)
@@ -80,4 +80,9 @@
       get { return (ValueLookupParameter<IOperator>)Parameters["LayerAnalyzer"]; }
     }
+
+    public ValueLookupParameter<IOperator> GroupAnalyzerParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["GroupAnalyzer"]; }
+    }
+
     public LookupParameter<IntValue> LayerEvaluatedSolutionsParameter {
       get { return (LookupParameter<IntValue>)Parameters["LayerEvaluatedSolutions"]; }
@@ -196,4 +201,6 @@
       Parameters.Add(new ValueLookupParameter<IOperator>("IslandAnalyzer", "The operator used to analyze each island."));
       Parameters.Add(new ValueLookupParameter<IOperator>("LayerAnalyzer", "The operator used to analyze each Layer."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("GroupAnalyzer", "The operator used to analyze each Layergroup."));
+
       Parameters.Add(new LookupParameter<IntValue>("LayerEvaluatedSolutions", "The number of times a solution has been evaluated."));
       Parameters.Add(new LookupParameter<IntValue>("IslandGenerations", "The number of generations calculated on one island."));
@@ -208,4 +215,5 @@
       var islandVarCreatorUssp = new UniformSubScopesProcessor();
       var islandVariableCreator = new VariableCreator() {Name = "Initialize Results"};
+      var groupVariableCreator = new VariableCreator() {Name = "Initialize Group Results"};
 
       var layerUssp = new UniformSubScopesProcessor();
@@ -221,5 +229,5 @@
       var initIslandEvaluationsAss = new Assigner() {Name = "Init Island Evaluations"};
 
-      var incrementGenerationDr = new IntCounter(){ Name = "Increment Generations" };
+      var incrementGenerationDr = new DataReducer() { Name = "Increment Generations" };
       var incrementEvaluatedSolutionDr = new DataReducer() { Name = "Increment Evaluated Solutions" };
       //TODO: increase migration count + migrate
@@ -234,9 +242,23 @@
       var layerResultsCollector = new ResultsCollector() {Name = "Collect Additional Infos"};
       var islandAnalyzerPlaceholder = new Placeholder() { Name = "Island Analyzer (Placeholder)" };
+      var islandResultsCollector = new ResultsCollector() { Name = "Collect layer results into IslandResults" };
+
       var globalAnalyzerPlacerholder = new Placeholder() { Name = "Global Analyzer (Placeholder)" };
+
+      var groupingOperator = new GroupedLayerOperator() {Name = "Grouped Analyzer"};
+      var groupAnalyzer = new Placeholder() {Name = "Group Analyzer (Placeholder)"};
+      var groupResultsExtractor = new ResultsExtractor() {Name = "Collect group results into variable"};
+      var groupResultsCollector = new ResultsCollector() {Name = "Collect group results into into global results"};
+
 
       var matingPoolCreator = new MatingPoolCreator();
       var matingPoolUssp = new UniformSubScopesProcessor() {Name = "Process Mating Pools"};
       var alpsMainOperator =new AlpsGeneticAlgorithmMainOperator();
+
+      var incrementIslandGeneration = new IntCounter() {Name = "incrementIslandGeneration" };
+      var setIslandEvaluatedSolutions = new DataReducer() {Name = "Set IslandEvaluatedSolutions" };
+
+      var migrateComparator = new Comparator();
+      var migrateCondBranch = new ConditionalBranch() {Name = "Migrate?"};
 
       var terminator = new TerminationOperator();
@@ -245,5 +267,5 @@
       globalVariableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Migrations",new IntValue(0)));
 
-      islandVariableCreator.CollectedValues.Add(new ValueParameter<IntValue>("IslandGenerations", new IntValue(0)));
+      islandVariableCreator.CollectedValues.Add(new ValueParameter<IntValue>(IslandGenerations.Name, new IntValue(0)));
       islandVariableCreator.CollectedValues.Add(new ValueParameter<IntValue>("OpenLayers", new IntValue(1)));
       islandVariableCreator.CollectedValues.Add(new ValueParameter<ResultCollection>("IslandResults"));
@@ -252,13 +274,13 @@
       layerVariableCreator.CollectedValues.Add(new ValueParameter<ResultCollection>("LayerResults"));
 
+      groupVariableCreator.CollectedValues.Add((new ValueParameter<ResultCollection>("GroupResults")));
+      //TODO: groupAnalyze
       initLayerAnalyzerPlaceholder.OperatorParameter.ActualName = LayerAnalyzerParameter.Name;
-
       initIslandAnalyzerPlaceholder.OperatorParameter.ActualName = IslandAnalyzerParameter.Name;
-
       initGlobalAnalyzerPlacerholder.OperatorParameter.ActualName = AnalyzerParameter.Name;
 
       resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Generations"));
       resultsCollector.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("IslandResults","","IslandResults"));
-      resultsCollector.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("LayerResults","","LayerResults",2));
+      resultsCollector.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("GroupResults","","GroupResults"));
       resultsCollector.CopyValue = new BoolValue(false);
 
@@ -269,18 +291,40 @@
       initIslandEvaluationsAss.RightSideParameter.Value = new IntValue(0);
 
-      incrementGenerationDr.ValueParameter.ActualName = "Generations";
-      incrementGenerationDr.Increment = new IntValue(1);
-
-      incrementEvaluatedSolutionDr.ParameterToReduce.ActualName = LayerEvaluatedSolutionsParameter.Name;
+      incrementGenerationDr.TargetParameter.ActualName = "Generations";
+      incrementGenerationDr.ParameterToReduce.ActualName = IslandGenerations.Name;
+      incrementGenerationDr.TargetOperation.Value = new ReductionOperation(ReductionOperations.Sum);
+      incrementGenerationDr.ReductionOperation.Value = new ReductionOperation(ReductionOperations.Min);
+
+      incrementEvaluatedSolutionDr.ParameterToReduce.ActualName = IslandEvaluatedSolutions.Name;
       incrementEvaluatedSolutionDr.TargetParameter.ActualName = EvaluatedSolutions.Name;
       incrementEvaluatedSolutionDr.ReductionOperation.Value = new ReductionOperation(ReductionOperations.Sum);
       incrementEvaluatedSolutionDr.TargetOperation.Value = new ReductionOperation(ReductionOperations.Sum);
 
+      incrementIslandGeneration.ValueParameter.ActualName = IslandGenerations.Name;
+      setIslandEvaluatedSolutions.ParameterToReduce.ActualName = LayerEvaluatedSolutionsParameter.Name;
+      setIslandEvaluatedSolutions.ReductionOperation.Value = new ReductionOperation(ReductionOperations.Sum);
+      setIslandEvaluatedSolutions.TargetOperation.Value = new ReductionOperation(ReductionOperations.Assign);
+      setIslandEvaluatedSolutions.TargetParameter.ActualName = IslandEvaluatedSolutions.Name;
+
+      migrateComparator.Comparison.Value = ComparisonType.GreaterOrEqual;
+      migrateComparator.LeftSideParameter.ActualName = IslandGenerations.Name;
+      migrateComparator.RightSideParameter.ActualName = MigrationIntervalParameter.Name;
+      migrateComparator.ResultParameter.ActualName = "Migrate";
+
+      migrateCondBranch.ConditionParameter.ActualName = "Migrate";
+
+      groupAnalyzer.OperatorParameter.ActualName = GroupAnalyzerParameter.Name;
       layerAnalyzerPlaceholder.OperatorParameter.ActualName = LayerAnalyzerParameter.Name;
       layerResultsCollector.ResultsParameter.ActualName = "LayerResults";
       layerResultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Layer"));
       islandAnalyzerPlaceholder.OperatorParameter.ActualName = IslandAnalyzerParameter.Name;
+      islandResultsCollector.ResultsParameter.ActualName = "IslandResults";
+      islandResultsCollector.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("LayerResults"));
       globalAnalyzerPlacerholder.OperatorParameter.ActualName = AnalyzerParameter.Name;
 
+      //TODO: implement check for grouped layer analyzer
+      groupResultsExtractor.SourceNameParameter.Value = new StringValue("GroupScope");
+      groupResultsExtractor.TargetNameParameter.Value = new StringValue("GroupResults");
+      groupResultsCollector.CollectedValues.Add(new LookupParameter<ItemArray<ResultCollection>>("GroupResults"));
       matingPoolCreator.MatingPoolRangeParameter.ActualName = MatingPoolRangeParameter.Name; 
 
@@ -328,10 +372,23 @@
       layerAnalyzerPlaceholder.Successor = layerResultsCollector;
       layerResultsCollector.Successor = null;
+
       analyzeLayerUssp.Successor = islandAnalyzerPlaceholder;
-      islandAnalyzerPlaceholder.Successor = null;
+      islandAnalyzerPlaceholder.Successor = islandResultsCollector;
+      islandResultsCollector.Successor = setIslandEvaluatedSolutions;
+      setIslandEvaluatedSolutions.Successor = incrementIslandGeneration;
+      incrementIslandGeneration.Successor = migrateComparator;
+      migrateComparator.Successor = migrateCondBranch;
+      migrateCondBranch.FalseBranch = matingPoolCreator;
+      migrateCondBranch.TrueBranch = null;
+
       processIslandsUssp.Successor = incrementGenerationDr;
       incrementGenerationDr.Successor = incrementEvaluatedSolutionDr;
       incrementEvaluatedSolutionDr.Successor = globalAnalyzerPlacerholder;
-      globalAnalyzerPlacerholder.Successor = terminator;
+      globalAnalyzerPlacerholder.Successor = groupingOperator;
+      groupingOperator.Operator = groupAnalyzer;
+      groupAnalyzer.Successor = null;
+      groupingOperator.Successor = groupResultsExtractor;
+      groupResultsExtractor.Successor = groupResultsCollector;
+      groupResultsCollector.Successor = terminator;
       terminator.ContinueBranch = processIslandsUssp;
 
@@ -454,14 +511,9 @@
       createChildrenViaCrossover.Successor = incrEvaluatedSolutionsForNewLayer;
 
-      incrEvaluatedSolutionsForNewLayer.ValueParameter.ActualName = EvaluatedSolutions.Name;
+      incrEvaluatedSolutionsForNewLayer.ValueParameter.ActualName = LayerEvaluatedSolutionsParameter.Name;
       incrEvaluatedSolutionsForNewLayer.AccumulateParameter.Value = new BoolValue(true);
 
       incrOpenLayers.ValueParameter.ActualName = "OpenLayers";
       incrOpenLayers.Increment = new IntValue(1);
-      //incrOpenLayers.Successor = newLayerResultsCollector;
-
-      //newLayerResultsCollector.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("LayerResults", "Result set for each layer", "LayerResults"));
-      //newLayerResultsCollector.CopyValue = new BoolValue(false);
-      //newLayerResultsCollector.Successor = null;
 
       return layerOpener;
@@ -494,5 +546,5 @@
       initializeAge.CollectedValues.Add(new ValueParameter<DoubleValue>(AgeParameter.Name, new DoubleValue(0)));
 
-      incrEvaluatedSolutionsAfterReseeding.ValueParameter.ActualName = EvaluatedSolutions.Name;
+      incrEvaluatedSolutionsAfterReseeding.ValueParameter.ActualName = LayerEvaluatedSolutionsParameter.Name;
       incrEvaluatedSolutionsAfterReseeding.AccumulateParameter.Value = new BoolValue(true);
 
Index: /branches/IslandALPS/IslandALPS/3.3/Plugin.cs
===================================================================
--- /branches/IslandALPS/IslandALPS/3.3/Plugin.cs	(revision 13595)
+++ /branches/IslandALPS/IslandALPS/3.3/Plugin.cs	(revision 13595)
@@ -0,0 +1,20 @@
+﻿using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Algorithms.IslandALPS {
+
+  [Plugin("HeuristicLab.Algorithms.IslandALPS", "Coarse grained version of ALPS.", "3.3.0.0")]
+  [PluginFile("HeuristicLab.Algorithms.IslandALPS-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Random", "3.3")]
+  [PluginDependency("HeuristicLab.Algorithms.ALPS", "3.3")]
+  public class HeuristicLabAlgorithmsIslandALPSPlugin : PluginBase {
+  }
+}
Index: /branches/IslandALPS/IslandALPS/3.3/Properties/AssemblyInfo.cs
===================================================================
--- /branches/IslandALPS/IslandALPS/3.3/Properties/AssemblyInfo.cs	(revision 13595)
+++ /branches/IslandALPS/IslandALPS/3.3/Properties/AssemblyInfo.cs	(revision 13595)
@@ -0,0 +1,36 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("IslandALPS")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HEAL")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("")]
+[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("6773cd7d-de39-4003-a2f9-fd3752abff8d")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.0.0")]
Index: /branches/IslandALPS/IslandALPS/3.3/ResultsExtractor.cs
===================================================================
--- /branches/IslandALPS/IslandALPS/3.3/ResultsExtractor.cs	(revision 13595)
+++ /branches/IslandALPS/IslandALPS/3.3/ResultsExtractor.cs	(revision 13595)
@@ -0,0 +1,68 @@
+﻿using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.IslandALPS {
+  /// <summary>
+  ///   Extracts values from a scope into the current scope
+  /// </summary>
+  [Item("ResultsExtractor", "Extracts values from a scope into the current scope")]
+  [StorableClass]
+  public class ResultsExtractor : InstrumentedOperator {
+    [StorableConstructor]
+    public ResultsExtractor(bool deserializing) : base(deserializing) {}
+
+    public ResultsExtractor(ResultsExtractor original, Cloner cloner) : base(original, cloner) {}
+
+    public ResultsExtractor() {
+      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the operator gets executed."));
+      Parameters.Add(new ValueLookupParameter<StringValue>("SourceName", "The Scope where the variable is."));
+      Parameters.Add(new ValueParameter<StringValue>("TargetName", "The name of the ResultCollection.", new StringValue("Results")));
+    }
+
+    public ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter) Parameters["CurrentScope"]; }
+    }
+
+    public ValueLookupParameter<StringValue> SourceNameParameter {
+      get { return (ValueLookupParameter<StringValue>) Parameters["SourceName"]; }
+      set { Parameters["SourceName"].ActualValue = value; }
+    }
+
+    public ValueParameter<StringValue> TargetNameParameter {
+      get { return (ValueParameter<StringValue>) Parameters["TargetName"]; }
+      set { Parameters["TargetName"].ActualValue = value; }
+    }
+
+    private IScope CurrentScope {
+      get { return CurrentScopeParameter.ActualValue; }
+    }
+
+    private IScope SourceScope {
+      get { return (IScope) CurrentScope.Variables[SourceNameParameter.Value.Value].Value; }
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ResultsExtractor(this, cloner);
+    }
+
+    public override IOperation InstrumentedApply() {
+      var list = new List<ResultCollection>();
+      var key = TargetNameParameter.Value.Value;
+      for (var index = 0; index < SourceScope.SubScopes.Count; index++) {
+        var subScope = SourceScope.SubScopes[index];
+        if (subScope.Variables.ContainsKey(key))
+          list.Add(subScope.Variables[key].Value as ResultCollection);
+      }
+      if (!CurrentScope.Variables.ContainsKey(key))
+        CurrentScope.Variables.Add(new Variable(key));
+      CurrentScope.Variables[key].Value = new ItemArray<ResultCollection>(list);
+      return base.InstrumentedApply();
+    }
+  }
+}
