Index: /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.csproj
===================================================================
--- /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.csproj	(revision 9065)
+++ /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.csproj	(revision 9065)
@@ -0,0 +1,233 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" 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>{F409DD9E-1E9C-4EB1-AA3A-9F6E987C6E58}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm</RootNamespace>
+    <AssemblyName>HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <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="OffspringSelectionGeneticAlgorithmMainLoop.cs" />
+    <Compile Include="Plugin.cs" />
+    <Compile Include="SASEGASA.cs" />
+    <Compile Include="SASEGASAMainLoop.cs" />
+    <Compile Include="IslandOffspringSelectionGeneticAlgorithm.cs" />
+    <Compile Include="IslandOffspringSelectionGeneticAlgorithmMainLoop.cs" />
+    <Compile Include="OffspringSelectionGeneticAlgorithm.cs" />
+    <Compile Include="OffspringSelectionGeneticAlgorithmMainOperator.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="SuccessfulOffspringAnalysis\SuccessfulOffspringAnalyzer.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
+      <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
+      <Name>HeuristicLab.Analysis-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
+      <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
+      <Name>HeuristicLab.Optimization.Operators-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
+      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
+      <Name>HeuristicLab.Parameters-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
+      <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
+      <Name>HeuristicLab.Random-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Selection\3.3\HeuristicLab.Selection-3.3.csproj">
+      <Project>{2C36CD4F-E5F5-43A4-801A-201EA895FE17}</Project>
+      <Name>HeuristicLab.Selection-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </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 Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+</PreBuildEvent>
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+export ProjectDir=$(ProjectDir)
+export SolutionDir=$(SolutionDir)
+
+$SolutionDir/PreBuildEvent.sh
+</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
===================================================================
--- /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs	(revision 9065)
+++ /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs	(revision 9065)
@@ -0,0 +1,647 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Linq;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
+  /// <summary>
+  /// An offspring selection island genetic algorithm.
+  /// </summary>
+  [Item("Island Offspring Selection Genetic Algorithm", "An island offspring selection genetic algorithm.")]
+  [Creatable("Algorithms")]
+  [StorableClass]
+  public sealed class IslandOffspringSelectionGeneticAlgorithm : HeuristicOptimizationEngineAlgorithm, IStorableContent {
+    public string Filename { get; set; }
+
+    #region Problem Properties
+    public override Type ProblemType {
+      get { return typeof(ISingleObjectiveHeuristicOptimizationProblem); }
+    }
+    public new ISingleObjectiveHeuristicOptimizationProblem Problem {
+      get { return (ISingleObjectiveHeuristicOptimizationProblem)base.Problem; }
+      set { base.Problem = value; }
+    }
+    #endregion
+
+    #region Parameter Properties
+    private ValueParameter<IntValue> SeedParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Seed"]; }
+    }
+    private ValueParameter<BoolValue> SetSeedRandomlyParameter {
+      get { return (ValueParameter<BoolValue>)Parameters["SetSeedRandomly"]; }
+    }
+    private ValueParameter<IntValue> NumberOfIslandsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["NumberOfIslands"]; }
+    }
+    private ValueParameter<IntValue> MigrationIntervalParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MigrationInterval"]; }
+    }
+    private ValueParameter<PercentValue> MigrationRateParameter {
+      get { return (ValueParameter<PercentValue>)Parameters["MigrationRate"]; }
+    }
+    public IConstrainedValueParameter<IMigrator> MigratorParameter {
+      get { return (IConstrainedValueParameter<IMigrator>)Parameters["Migrator"]; }
+    }
+    public IConstrainedValueParameter<ISelector> EmigrantsSelectorParameter {
+      get { return (IConstrainedValueParameter<ISelector>)Parameters["EmigrantsSelector"]; }
+    }
+    public IConstrainedValueParameter<IReplacer> ImmigrationReplacerParameter {
+      get { return (IConstrainedValueParameter<IReplacer>)Parameters["ImmigrationReplacer"]; }
+    }
+    private ValueParameter<IntValue> PopulationSizeParameter {
+      get { return (ValueParameter<IntValue>)Parameters["PopulationSize"]; }
+    }
+    private ValueParameter<IntValue> MaximumGenerationsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaximumGenerations"]; }
+    }
+    public IConstrainedValueParameter<ISelector> SelectorParameter {
+      get { return (IConstrainedValueParameter<ISelector>)Parameters["Selector"]; }
+    }
+    public IConstrainedValueParameter<ICrossover> CrossoverParameter {
+      get { return (IConstrainedValueParameter<ICrossover>)Parameters["Crossover"]; }
+    }
+    private ValueParameter<PercentValue> MutationProbabilityParameter {
+      get { return (ValueParameter<PercentValue>)Parameters["MutationProbability"]; }
+    }
+    public IConstrainedValueParameter<IManipulator> MutatorParameter {
+      get { return (IConstrainedValueParameter<IManipulator>)Parameters["Mutator"]; }
+    }
+    private ValueParameter<IntValue> ElitesParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Elites"]; }
+    }
+    private ValueLookupParameter<DoubleValue> SuccessRatioParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["SuccessRatio"]; }
+    }
+    private ValueLookupParameter<DoubleValue> ComparisonFactorLowerBoundParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorLowerBound"]; }
+    }
+    private ValueLookupParameter<DoubleValue> ComparisonFactorUpperBoundParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorUpperBound"]; }
+    }
+    public IConstrainedValueParameter<IDiscreteDoubleValueModifier> ComparisonFactorModifierParameter {
+      get { return (IConstrainedValueParameter<IDiscreteDoubleValueModifier>)Parameters["ComparisonFactorModifier"]; }
+    }
+    private ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; }
+    }
+    private ValueLookupParameter<BoolValue> OffspringSelectionBeforeMutationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
+    }
+    private ValueLookupParameter<IntValue> SelectedParentsParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["SelectedParents"]; }
+    }
+    private ValueParameter<MultiAnalyzer> AnalyzerParameter {
+      get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
+    }
+    private ValueParameter<MultiAnalyzer> IslandAnalyzerParameter {
+      get { return (ValueParameter<MultiAnalyzer>)Parameters["IslandAnalyzer"]; }
+    }
+    private ValueParameter<IntValue> MaximumEvaluatedSolutionsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaximumEvaluatedSolutions"]; }
+    }
+    #endregion
+
+    #region Properties
+    public IntValue Seed {
+      get { return SeedParameter.Value; }
+      set { SeedParameter.Value = value; }
+    }
+    public BoolValue SetSeedRandomly {
+      get { return SetSeedRandomlyParameter.Value; }
+      set { SetSeedRandomlyParameter.Value = value; }
+    }
+    public IntValue NumberOfIslands {
+      get { return NumberOfIslandsParameter.Value; }
+      set { NumberOfIslandsParameter.Value = value; }
+    }
+    public IntValue MigrationInterval {
+      get { return MigrationIntervalParameter.Value; }
+      set { MigrationIntervalParameter.Value = value; }
+    }
+    public PercentValue MigrationRate {
+      get { return MigrationRateParameter.Value; }
+      set { MigrationRateParameter.Value = value; }
+    }
+    public IMigrator Migrator {
+      get { return MigratorParameter.Value; }
+      set { MigratorParameter.Value = value; }
+    }
+    public ISelector EmigrantsSelector {
+      get { return EmigrantsSelectorParameter.Value; }
+      set { EmigrantsSelectorParameter.Value = value; }
+    }
+    public IReplacer ImmigrationReplacer {
+      get { return ImmigrationReplacerParameter.Value; }
+      set { ImmigrationReplacerParameter.Value = value; }
+    }
+    public IntValue PopulationSize {
+      get { return PopulationSizeParameter.Value; }
+      set { PopulationSizeParameter.Value = value; }
+    }
+    public IntValue MaximumGenerations {
+      get { return MaximumGenerationsParameter.Value; }
+      set { MaximumGenerationsParameter.Value = value; }
+    }
+    public ISelector Selector {
+      get { return SelectorParameter.Value; }
+      set { SelectorParameter.Value = value; }
+    }
+    public ICrossover Crossover {
+      get { return CrossoverParameter.Value; }
+      set { CrossoverParameter.Value = value; }
+    }
+    public PercentValue MutationProbability {
+      get { return MutationProbabilityParameter.Value; }
+      set { MutationProbabilityParameter.Value = value; }
+    }
+    public IManipulator Mutator {
+      get { return MutatorParameter.Value; }
+      set { MutatorParameter.Value = value; }
+    }
+    public IntValue Elites {
+      get { return ElitesParameter.Value; }
+      set { ElitesParameter.Value = value; }
+    }
+    private DoubleValue SuccessRatio {
+      get { return SuccessRatioParameter.Value; }
+      set { SuccessRatioParameter.Value = value; }
+    }
+    private DoubleValue ComparisonFactorLowerBound {
+      get { return ComparisonFactorLowerBoundParameter.Value; }
+      set { ComparisonFactorLowerBoundParameter.Value = value; }
+    }
+    private DoubleValue ComparisonFactorUpperBound {
+      get { return ComparisonFactorUpperBoundParameter.Value; }
+      set { ComparisonFactorUpperBoundParameter.Value = value; }
+    }
+    public IDiscreteDoubleValueModifier ComparisonFactorModifier {
+      get { return ComparisonFactorModifierParameter.Value; }
+      set { ComparisonFactorModifierParameter.Value = value; }
+    }
+    private DoubleValue MaximumSelectionPressure {
+      get { return MaximumSelectionPressureParameter.Value; }
+      set { MaximumSelectionPressureParameter.Value = value; }
+    }
+    private BoolValue OffspringSelectionBeforeMutation {
+      get { return OffspringSelectionBeforeMutationParameter.Value; }
+      set { OffspringSelectionBeforeMutationParameter.Value = value; }
+    }
+    public MultiAnalyzer Analyzer {
+      get { return AnalyzerParameter.Value; }
+      set { AnalyzerParameter.Value = value; }
+    }
+    public MultiAnalyzer IslandAnalyzer {
+      get { return IslandAnalyzerParameter.Value; }
+      set { IslandAnalyzerParameter.Value = value; }
+    }
+    public IntValue MaximumEvaluatedSolutions {
+      get { return MaximumEvaluatedSolutionsParameter.Value; }
+      set { MaximumEvaluatedSolutionsParameter.Value = value; }
+    }
+    private RandomCreator RandomCreator {
+      get { return (RandomCreator)OperatorGraph.InitialOperator; }
+    }
+    private UniformSubScopesProcessor IslandProcessor {
+      get { return ((RandomCreator.Successor as SubScopesCreator).Successor as UniformSubScopesProcessor); }
+    }
+    private SolutionsCreator SolutionsCreator {
+      get { return (SolutionsCreator)IslandProcessor.Operator; }
+    }
+    private IslandOffspringSelectionGeneticAlgorithmMainLoop MainLoop {
+      get { return FindMainLoop(IslandProcessor.Successor); }
+    }
+    [Storable]
+    private BestAverageWorstQualityAnalyzer islandQualityAnalyzer;
+    [Storable]
+    private BestAverageWorstQualityAnalyzer qualityAnalyzer;
+    [Storable]
+    private ValueAnalyzer islandSelectionPressureAnalyzer;
+    [Storable]
+    private ValueAnalyzer selectionPressureAnalyzer;
+    [Storable]
+    private SuccessfulOffspringAnalyzer successfulOffspringAnalyzer;
+    #endregion
+
+    [StorableConstructor]
+    private IslandOffspringSelectionGeneticAlgorithm(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      #region Backwards Compatibility
+      if (successfulOffspringAnalyzer == null)
+        successfulOffspringAnalyzer = new SuccessfulOffspringAnalyzer();
+      #endregion
+
+      Initialize();
+    }
+    private IslandOffspringSelectionGeneticAlgorithm(IslandOffspringSelectionGeneticAlgorithm original, Cloner cloner)
+      : base(original, cloner) {
+      islandQualityAnalyzer = cloner.Clone(original.islandQualityAnalyzer);
+      qualityAnalyzer = cloner.Clone(original.qualityAnalyzer);
+      islandSelectionPressureAnalyzer = cloner.Clone(original.islandSelectionPressureAnalyzer);
+      selectionPressureAnalyzer = cloner.Clone(original.selectionPressureAnalyzer);
+      successfulOffspringAnalyzer = cloner.Clone(original.successfulOffspringAnalyzer);
+      Initialize();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new IslandOffspringSelectionGeneticAlgorithm(this, cloner);
+    }
+    public IslandOffspringSelectionGeneticAlgorithm()
+      : base() {
+      Parameters.Add(new ValueParameter<IntValue>("Seed", "The random seed used to initialize the new pseudo random number generator.", new IntValue(0)));
+      Parameters.Add(new ValueParameter<BoolValue>("SetSeedRandomly", "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true)));
+      Parameters.Add(new ValueParameter<IntValue>("NumberOfIslands", "The number of islands.", new IntValue(5)));
+      Parameters.Add(new ValueParameter<IntValue>("MigrationInterval", "The number of generations that should pass between migration phases.", new IntValue(20)));
+      Parameters.Add(new ValueParameter<PercentValue>("MigrationRate", "The proportion of individuals that should migrate between the islands.", new PercentValue(0.15)));
+      Parameters.Add(new ConstrainedValueParameter<IMigrator>("Migrator", "The migration strategy."));
+      Parameters.Add(new ConstrainedValueParameter<ISelector>("EmigrantsSelector", "Selects the individuals that will be migrated."));
+      Parameters.Add(new ConstrainedValueParameter<IReplacer>("ImmigrationReplacer", "Replaces part of the original population with the immigrants."));
+      Parameters.Add(new ValueParameter<IntValue>("PopulationSize", "The size of the population of solutions of each island.", new IntValue(100)));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumGenerations", "The maximum number of generations that should be processed.", new IntValue(100)));
+      Parameters.Add(new ConstrainedValueParameter<ISelector>("Selector", "The operator used to select solutions for reproduction."));
+      Parameters.Add(new ConstrainedValueParameter<ICrossover>("Crossover", "The operator used to cross solutions."));
+      Parameters.Add(new ValueParameter<PercentValue>("MutationProbability", "The probability that the mutation operator is applied on a solution.", new PercentValue(0.05)));
+      Parameters.Add(new OptionalConstrainedValueParameter<IManipulator>("Mutator", "The operator used to mutate solutions."));
+      Parameters.Add(new ValueParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation.", new IntValue(1)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful to total children that should be achieved.", new DoubleValue(1)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorLowerBound", "The lower bound of the comparison factor (start).", new DoubleValue(0)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorUpperBound", "The upper bound of the comparison factor (end).", new DoubleValue(1)));
+      Parameters.Add(new OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>("ComparisonFactorModifier", "The operator used to modify the comparison factor.", new ItemSet<IDiscreteDoubleValueModifier>(new IDiscreteDoubleValueModifier[] { new LinearDiscreteDoubleValueModifier() }), new LinearDiscreteDoubleValueModifier()));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure that terminates the algorithm.", new DoubleValue(100)));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation.", new BoolValue(false)));
+      Parameters.Add(new ValueLookupParameter<IntValue>("SelectedParents", "How much parents should be selected each time the offspring selection step is performed until the population is filled. This parameter should be about the same or twice the size of PopulationSize for smaller problems, and less for large problems.", new IntValue(200)));
+      Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze the islands.", new MultiAnalyzer()));
+      Parameters.Add(new ValueParameter<MultiAnalyzer>("IslandAnalyzer", "The operator used to analyze each island.", new MultiAnalyzer()));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumEvaluatedSolutions", "The maximum number of evaluated solutions (approximately).", new IntValue(int.MaxValue)));
+
+      RandomCreator randomCreator = new RandomCreator();
+      SubScopesCreator populationCreator = new SubScopesCreator();
+      UniformSubScopesProcessor ussp1 = new UniformSubScopesProcessor();
+      SolutionsCreator solutionsCreator = new SolutionsCreator();
+      VariableCreator variableCreator = new VariableCreator();
+      UniformSubScopesProcessor ussp2 = new UniformSubScopesProcessor();
+      SubScopesCounter subScopesCounter = new SubScopesCounter();
+      ResultsCollector resultsCollector = new ResultsCollector();
+      IslandOffspringSelectionGeneticAlgorithmMainLoop mainLoop = new IslandOffspringSelectionGeneticAlgorithmMainLoop();
+      OperatorGraph.InitialOperator = randomCreator;
+
+      randomCreator.RandomParameter.ActualName = "Random";
+      randomCreator.SeedParameter.ActualName = SeedParameter.Name;
+      randomCreator.SeedParameter.Value = null;
+      randomCreator.SetSeedRandomlyParameter.ActualName = SetSeedRandomlyParameter.Name;
+      randomCreator.SetSeedRandomlyParameter.Value = null;
+      randomCreator.Successor = populationCreator;
+
+      populationCreator.NumberOfSubScopesParameter.ActualName = NumberOfIslandsParameter.Name;
+      populationCreator.Successor = ussp1;
+
+      ussp1.Operator = solutionsCreator;
+      ussp1.Successor = variableCreator;
+
+      solutionsCreator.NumberOfSolutionsParameter.ActualName = PopulationSizeParameter.Name;
+      solutionsCreator.Successor = null;
+
+      variableCreator.Name = "Initialize EvaluatedSolutions";
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("EvaluatedSolutions", new IntValue()));
+      variableCreator.Successor = ussp2;
+
+      ussp2.Operator = subScopesCounter;
+      ussp2.Successor = resultsCollector;
+
+      subScopesCounter.Name = "Increment EvaluatedSolutions";
+      subScopesCounter.ValueParameter.ActualName = "EvaluatedSolutions";
+
+      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", "", "EvaluatedSolutions"));
+      resultsCollector.ResultsParameter.ActualName = "Results";
+      resultsCollector.Successor = mainLoop;
+
+      mainLoop.EmigrantsSelectorParameter.ActualName = EmigrantsSelectorParameter.Name;
+      mainLoop.ImmigrationReplacerParameter.ActualName = ImmigrationReplacerParameter.Name;
+      mainLoop.MaximumGenerationsParameter.ActualName = MaximumGenerationsParameter.Name;
+      mainLoop.MigrationIntervalParameter.ActualName = MigrationIntervalParameter.Name;
+      mainLoop.MigrationRateParameter.ActualName = MigrationRateParameter.Name;
+      mainLoop.MigratorParameter.ActualName = MigratorParameter.Name;
+      mainLoop.NumberOfIslandsParameter.ActualName = NumberOfIslandsParameter.Name;
+      mainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
+      mainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name;
+      mainLoop.ElitesParameter.ActualName = ElitesParameter.Name;
+      mainLoop.MutatorParameter.ActualName = MutatorParameter.Name;
+      mainLoop.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
+      mainLoop.RandomParameter.ActualName = randomCreator.RandomParameter.ActualName;
+      mainLoop.ResultsParameter.ActualName = "Results";
+      mainLoop.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
+      mainLoop.ComparisonFactorParameter.ActualName = "ComparisonFactor";
+      mainLoop.ComparisonFactorStartParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
+      mainLoop.ComparisonFactorModifierParameter.ActualName = ComparisonFactorModifierParameter.Name;
+      mainLoop.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
+      mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
+      mainLoop.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions";
+      mainLoop.Successor = null;
+
+      foreach (ISelector selector in ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name))
+        SelectorParameter.ValidValues.Add(selector);
+      ISelector proportionalSelector = SelectorParameter.ValidValues.FirstOrDefault(x => x.GetType().Name.Equals("ProportionalSelector"));
+      if (proportionalSelector != null) SelectorParameter.Value = proportionalSelector;
+
+      foreach (ISelector selector in ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name))
+        EmigrantsSelectorParameter.ValidValues.Add(selector);
+
+      foreach (IReplacer replacer in ApplicationManager.Manager.GetInstances<IReplacer>().OrderBy(x => x.Name))
+        ImmigrationReplacerParameter.ValidValues.Add(replacer);
+
+      ParameterizeSelectors();
+
+      foreach (IMigrator migrator in ApplicationManager.Manager.GetInstances<IMigrator>().OrderBy(x => x.Name))
+        MigratorParameter.ValidValues.Add(migrator);
+
+      foreach (IDiscreteDoubleValueModifier modifier in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name))
+        ComparisonFactorModifierParameter.ValidValues.Add(modifier);
+      IDiscreteDoubleValueModifier linearModifier = ComparisonFactorModifierParameter.ValidValues.FirstOrDefault(x => x.GetType().Name.Equals("LinearDiscreteDoubleValueModifier"));
+      if (linearModifier != null) ComparisonFactorModifierParameter.Value = linearModifier;
+      ParameterizeComparisonFactorModifiers();
+
+      qualityAnalyzer = new BestAverageWorstQualityAnalyzer();
+      islandQualityAnalyzer = new BestAverageWorstQualityAnalyzer();
+      selectionPressureAnalyzer = new ValueAnalyzer();
+      islandSelectionPressureAnalyzer = new ValueAnalyzer();
+      successfulOffspringAnalyzer = new SuccessfulOffspringAnalyzer();
+      ParameterizeAnalyzers();
+      UpdateAnalyzers();
+
+      Initialize();
+    }
+    public override void Prepare() {
+      if (Problem != null) base.Prepare();
+    }
+
+    #region Events
+    protected override void OnProblemChanged() {
+      ParameterizeStochasticOperator(Problem.SolutionCreator);
+      ParameterizeStochasticOperator(Problem.Evaluator);
+      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
+      ParameterizeSolutionsCreator();
+      ParameterizeMainLoop();
+      ParameterizeSelectors();
+      ParameterizeAnalyzers();
+      ParameterizeIterationBasedOperators();
+      UpdateCrossovers();
+      UpdateMutators();
+      UpdateAnalyzers();
+      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      base.OnProblemChanged();
+    }
+
+    protected override void Problem_SolutionCreatorChanged(object sender, EventArgs e) {
+      ParameterizeStochasticOperator(Problem.SolutionCreator);
+      ParameterizeSolutionsCreator();
+      base.Problem_SolutionCreatorChanged(sender, e);
+    }
+    protected override void Problem_EvaluatorChanged(object sender, EventArgs e) {
+      ParameterizeStochasticOperator(Problem.Evaluator);
+      ParameterizeSolutionsCreator();
+      ParameterizeMainLoop();
+      ParameterizeSelectors();
+      ParameterizeAnalyzers();
+      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      base.Problem_EvaluatorChanged(sender, e);
+    }
+    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
+      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
+      ParameterizeIterationBasedOperators();
+      UpdateCrossovers();
+      UpdateMutators();
+      UpdateAnalyzers();
+      base.Problem_OperatorsChanged(sender, e);
+    }
+    private void ElitesParameter_ValueChanged(object sender, EventArgs e) {
+      Elites.ValueChanged += new EventHandler(Elites_ValueChanged);
+      ParameterizeSelectors();
+    }
+    private void Elites_ValueChanged(object sender, EventArgs e) {
+      ParameterizeSelectors();
+    }
+    private void PopulationSizeParameter_ValueChanged(object sender, EventArgs e) {
+      NumberOfIslands.ValueChanged += new EventHandler(PopulationSize_ValueChanged);
+      ParameterizeSelectors();
+    }
+    private void PopulationSize_ValueChanged(object sender, EventArgs e) {
+      ParameterizeSelectors();
+    }
+    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeMainLoop();
+      ParameterizeSelectors();
+      ParameterizeAnalyzers();
+    }
+    private void MigrationRateParameter_ValueChanged(object sender, EventArgs e) {
+      MigrationRate.ValueChanged += new EventHandler(MigrationRate_ValueChanged);
+      ParameterizeSelectors();
+    }
+    private void MigrationRate_ValueChanged(object sender, EventArgs e) {
+      ParameterizeSelectors();
+    }
+    private void MaximumMigrationsParameter_ValueChanged(object sender, EventArgs e) {
+      MaximumGenerations.ValueChanged += new EventHandler(MaximumMigrations_ValueChanged);
+      ParameterizeComparisonFactorModifiers();
+    }
+    private void MaximumMigrations_ValueChanged(object sender, EventArgs e) {
+      ParameterizeComparisonFactorModifiers();
+    }
+    private void MigrationIntervalParameter_ValueChanged(object sender, EventArgs e) {
+      MigrationInterval.ValueChanged += new EventHandler(MigrationInterval_ValueChanged);
+      ParameterizeComparisonFactorModifiers();
+    }
+    private void MigrationInterval_ValueChanged(object sender, EventArgs e) {
+      ParameterizeComparisonFactorModifiers();
+    }
+    #endregion
+
+    #region Helpers
+    private void Initialize() {
+      PopulationSizeParameter.ValueChanged += new EventHandler(PopulationSizeParameter_ValueChanged);
+      PopulationSize.ValueChanged += new EventHandler(PopulationSize_ValueChanged);
+      MigrationRateParameter.ValueChanged += new EventHandler(MigrationRateParameter_ValueChanged);
+      MigrationRate.ValueChanged += new EventHandler(MigrationRate_ValueChanged);
+      ElitesParameter.ValueChanged += new EventHandler(ElitesParameter_ValueChanged);
+      Elites.ValueChanged += new EventHandler(Elites_ValueChanged);
+      MigrationIntervalParameter.ValueChanged += new EventHandler(MigrationIntervalParameter_ValueChanged);
+      MigrationInterval.ValueChanged += new EventHandler(MigrationInterval_ValueChanged);
+      MaximumGenerationsParameter.ValueChanged += new EventHandler(MaximumMigrationsParameter_ValueChanged);
+      MaximumGenerations.ValueChanged += new EventHandler(MaximumMigrations_ValueChanged);
+      if (Problem != null) {
+        Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      }
+    }
+    private void ParameterizeSolutionsCreator() {
+      SolutionsCreator.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
+      SolutionsCreator.SolutionCreatorParameter.ActualName = Problem.SolutionCreatorParameter.Name;
+    }
+    private void ParameterizeMainLoop() {
+      MainLoop.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
+      MainLoop.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
+      MainLoop.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+      MainLoop.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+    }
+    private void ParameterizeStochasticOperator(IOperator op) {
+      if (op is IStochasticOperator)
+        ((IStochasticOperator)op).RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
+    }
+    private void ParameterizeSelectors() {
+      foreach (ISelector selector in SelectorParameter.ValidValues) {
+        selector.CopySelected = new BoolValue(true);
+        selector.NumberOfSelectedSubScopesParameter.Value = null;
+        selector.NumberOfSelectedSubScopesParameter.ActualName = SelectedParentsParameter.Name;
+        ParameterizeStochasticOperator(selector);
+      }
+      foreach (ISelector selector in EmigrantsSelectorParameter.ValidValues) {
+        selector.CopySelected = new BoolValue(true);
+        selector.NumberOfSelectedSubScopesParameter.Value = new IntValue((int)Math.Ceiling(PopulationSize.Value * MigrationRate.Value));
+        ParameterizeStochasticOperator(selector);
+      }
+      foreach (IReplacer selector in ImmigrationReplacerParameter.ValidValues) {
+        ParameterizeStochasticOperator(selector);
+      }
+      if (Problem != null) {
+        foreach (ISingleObjectiveSelector selector in SelectorParameter.ValidValues.OfType<ISingleObjectiveSelector>()) {
+          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        }
+        foreach (ISingleObjectiveSelector selector in EmigrantsSelectorParameter.ValidValues.OfType<ISingleObjectiveSelector>()) {
+          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        }
+        foreach (ISingleObjectiveReplacer replacer in ImmigrationReplacerParameter.ValidValues.OfType<ISingleObjectiveReplacer>()) {
+          replacer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+          replacer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        }
+      }
+    }
+    private void ParameterizeAnalyzers() {
+      islandQualityAnalyzer.ResultsParameter.ActualName = "Results";
+      islandQualityAnalyzer.QualityParameter.Depth = 1;
+      qualityAnalyzer.ResultsParameter.ActualName = "Results";
+      qualityAnalyzer.QualityParameter.Depth = 2;
+
+      islandSelectionPressureAnalyzer.ResultsParameter.ActualName = "Results";
+      islandSelectionPressureAnalyzer.Name = "SelectionPressure Analyzer";
+      islandSelectionPressureAnalyzer.ValueParameter.Depth = 0;
+      islandSelectionPressureAnalyzer.ValueParameter.ActualName = "SelectionPressure";
+      islandSelectionPressureAnalyzer.ValuesParameter.ActualName = "Selection Pressure History";
+
+      selectionPressureAnalyzer.ResultsParameter.ActualName = "Results";
+      selectionPressureAnalyzer.Name = "SelectionPressure Analyzer";
+      selectionPressureAnalyzer.ValueParameter.Depth = 1;
+      selectionPressureAnalyzer.ValueParameter.ActualName = "SelectionPressure";
+      selectionPressureAnalyzer.ValuesParameter.ActualName = "Selection Pressure History";
+
+      successfulOffspringAnalyzer.ResultsParameter.ActualName = "Results";
+      successfulOffspringAnalyzer.GenerationsParameter.ActualName = "Generations";
+      successfulOffspringAnalyzer.SuccessfulOffspringFlagParameter.Value.Value = "SuccessfulOffspring";
+      successfulOffspringAnalyzer.DepthParameter.Value = new IntValue(2);
+
+      if (Problem != null) {
+        islandQualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+        islandQualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        islandQualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
+
+        qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+        qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
+      }
+    }
+    private void ParameterizeComparisonFactorModifiers() {
+      foreach (IDiscreteDoubleValueModifier modifier in ComparisonFactorModifierParameter.ValidValues) {
+        modifier.IndexParameter.ActualName = "Generations";
+        modifier.EndIndexParameter.Value = new IntValue(MigrationInterval.Value * MaximumGenerations.Value);
+        modifier.EndValueParameter.ActualName = ComparisonFactorUpperBoundParameter.Name;
+        modifier.StartIndexParameter.Value = new IntValue(0);
+        modifier.StartValueParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
+        modifier.ValueParameter.ActualName = "ComparisonFactor";
+      }
+    }
+    private void ParameterizeIterationBasedOperators() {
+      if (Problem != null) {
+        foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) {
+          op.IterationsParameter.ActualName = "Generations";
+          op.MaximumIterationsParameter.ActualName = MaximumGenerationsParameter.Name;
+        }
+      }
+    }
+    private void UpdateCrossovers() {
+      ICrossover oldCrossover = CrossoverParameter.Value;
+      ICrossover defaultCrossover = Problem.Operators.OfType<ICrossover>().FirstOrDefault();
+      CrossoverParameter.ValidValues.Clear();
+      foreach (ICrossover crossover in Problem.Operators.OfType<ICrossover>().OrderBy(x => x.Name))
+        CrossoverParameter.ValidValues.Add(crossover);
+      if (oldCrossover != null) {
+        ICrossover crossover = CrossoverParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldCrossover.GetType());
+        if (crossover != null) CrossoverParameter.Value = crossover;
+        else oldCrossover = null;
+      }
+      if (oldCrossover == null && defaultCrossover != null)
+        CrossoverParameter.Value = defaultCrossover;
+    }
+    private void UpdateMutators() {
+      IManipulator oldMutator = MutatorParameter.Value;
+      MutatorParameter.ValidValues.Clear();
+      foreach (IManipulator mutator in Problem.Operators.OfType<IManipulator>().OrderBy(x => x.Name))
+        MutatorParameter.ValidValues.Add(mutator);
+      if (oldMutator != null) {
+        IManipulator mutator = MutatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldMutator.GetType());
+        if (mutator != null) MutatorParameter.Value = mutator;
+      }
+    }
+    private void UpdateAnalyzers() {
+      IslandAnalyzer.Operators.Clear();
+      Analyzer.Operators.Clear();
+      IslandAnalyzer.Operators.Add(islandQualityAnalyzer, islandQualityAnalyzer.EnabledByDefault);
+      IslandAnalyzer.Operators.Add(islandSelectionPressureAnalyzer, islandSelectionPressureAnalyzer.EnabledByDefault);
+      if (Problem != null) {
+        foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>()) {
+          foreach (IScopeTreeLookupParameter param in analyzer.Parameters.OfType<IScopeTreeLookupParameter>())
+            param.Depth = 2;
+          Analyzer.Operators.Add(analyzer, analyzer.EnabledByDefault);
+        }
+      }
+      Analyzer.Operators.Add(qualityAnalyzer, qualityAnalyzer.EnabledByDefault);
+      Analyzer.Operators.Add(selectionPressureAnalyzer, selectionPressureAnalyzer.EnabledByDefault);
+      Analyzer.Operators.Add(successfulOffspringAnalyzer, successfulOffspringAnalyzer.EnabledByDefault);
+    }
+    private IslandOffspringSelectionGeneticAlgorithmMainLoop FindMainLoop(IOperator start) {
+      IOperator mainLoop = start;
+      while (mainLoop != null && !(mainLoop is IslandOffspringSelectionGeneticAlgorithmMainLoop))
+        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
+      if (mainLoop == null) return null;
+      else return (IslandOffspringSelectionGeneticAlgorithmMainLoop)mainLoop;
+    }
+    #endregion
+  }
+}
Index: /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs
===================================================================
--- /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 9065)
+++ /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 9065)
@@ -0,0 +1,422 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
+  /// <summary>
+  /// An island offspring selection genetic algorithm main loop operator.
+  /// </summary>
+  [Item("IslandOffspringSelectionGeneticAlgorithmMainLoop", "An island offspring selection genetic algorithm main loop operator.")]
+  [StorableClass]
+  public sealed class IslandOffspringSelectionGeneticAlgorithmMainLoop : AlgorithmOperator {
+    #region Parameter Properties
+    public ValueLookupParameter<IRandom> RandomParameter {
+      get { return (ValueLookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public ValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ValueLookupParameter<DoubleValue> BestKnownQualityParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
+    }
+    public ValueLookupParameter<IntValue> NumberOfIslandsParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["NumberOfIslands"]; }
+    }
+    public ValueLookupParameter<IntValue> MigrationIntervalParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["MigrationInterval"]; }
+    }
+    public ValueLookupParameter<PercentValue> MigrationRateParameter {
+      get { return (ValueLookupParameter<PercentValue>)Parameters["MigrationRate"]; }
+    }
+    public ValueLookupParameter<IOperator> MigratorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Migrator"]; }
+    }
+    public ValueLookupParameter<IOperator> EmigrantsSelectorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["EmigrantsSelector"]; }
+    }
+    public ValueLookupParameter<IOperator> ImmigrationReplacerParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["ImmigrationReplacer"]; }
+    }
+    public ValueLookupParameter<IntValue> PopulationSizeParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["PopulationSize"]; }
+    }
+    public ValueLookupParameter<IntValue> MaximumGenerationsParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["MaximumGenerations"]; }
+    }
+    public ValueLookupParameter<IOperator> SelectorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Selector"]; }
+    }
+    public ValueLookupParameter<IOperator> CrossoverParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Crossover"]; }
+    }
+    public ValueLookupParameter<PercentValue> MutationProbabilityParameter {
+      get { return (ValueLookupParameter<PercentValue>)Parameters["MutationProbability"]; }
+    }
+    public ValueLookupParameter<IOperator> MutatorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Mutator"]; }
+    }
+    public ValueLookupParameter<IOperator> EvaluatorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Evaluator"]; }
+    }
+    public ValueLookupParameter<IntValue> ElitesParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["Elites"]; }
+    }
+    public ValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+    public ValueLookupParameter<IOperator> VisualizerParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Visualizer"]; }
+    }
+    public LookupParameter<IItem> VisualizationParameter {
+      get { return (LookupParameter<IItem>)Parameters["Visualization"]; }
+    }
+    public ValueLookupParameter<DoubleValue> SuccessRatioParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["SuccessRatio"]; }
+    }
+    public LookupParameter<DoubleValue> ComparisonFactorParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["ComparisonFactor"]; }
+    }
+    public ValueLookupParameter<DoubleValue> ComparisonFactorStartParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorStart"]; }
+    }
+    public ValueLookupParameter<IOperator> ComparisonFactorModifierParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["ComparisonFactorModifier"]; }
+    }
+    public ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; }
+    }
+    public ValueLookupParameter<BoolValue> OffspringSelectionBeforeMutationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
+    }
+    public ValueLookupParameter<IOperator> AnalyzerParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Analyzer"]; }
+    }
+    public ValueLookupParameter<IOperator> IslandAnalyzerParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["IslandAnalyzer"]; }
+    }
+    public LookupParameter<IntValue> EvaluatedSolutionsParameter {
+      get { return (LookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private IslandOffspringSelectionGeneticAlgorithmMainLoop(bool deserializing) : base(deserializing) { }
+    private IslandOffspringSelectionGeneticAlgorithmMainLoop(IslandOffspringSelectionGeneticAlgorithmMainLoop original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new IslandOffspringSelectionGeneticAlgorithmMainLoop(this, cloner);
+    }
+    public IslandOffspringSelectionGeneticAlgorithmMainLoop()
+      : base() {
+      #region Create parameters
+      Parameters.Add(new ValueLookupParameter<IRandom>("Random", "A pseudo random number generator."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The value which represents the quality of a solution."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("BestKnownQuality", "The best known quality value found so far."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfIslands", "The number of islands."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("MigrationInterval", "The number of generations that should pass between migration phases."));
+      Parameters.Add(new ValueLookupParameter<PercentValue>("MigrationRate", "The proportion of individuals that should migrate between the islands."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Migrator", "The migration strategy."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("EmigrantsSelector", "Selects the individuals that will be migrated."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("ImmigrationReplacer", "Replaces part of the original population with the immigrants."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("PopulationSize", "The size of the population of solutions."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumGenerations", "The maximum number of generations that should be processed."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Selector", "The operator used to select solutions for reproduction."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Crossover", "The operator used to cross solutions."));
+      Parameters.Add(new ValueLookupParameter<PercentValue>("MutationProbability", "The probability that the mutation operator is applied on a solution."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Mutator", "The operator used to mutate solutions."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator", "The operator used to evaluate solutions. This operator is executed in parallel, if an engine is used which supports parallelization."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The results collection to store the results."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Visualizer", "The operator used to visualize solutions."));
+      Parameters.Add(new LookupParameter<IItem>("Visualization", "The item which represents the visualization of solutions."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful to total children that should be achieved."));
+      Parameters.Add(new LookupParameter<DoubleValue>("ComparisonFactor", "The comparison factor is used to determine whether the offspring should be compared to the better parent, the worse parent or a quality value linearly interpolated between them. It is in the range [0;1]."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorStart", "The initial value for the comparison factor."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("ComparisonFactorModifier", "The operator used to modify the comparison factor."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure that terminates the algorithm."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Analyzer", "The operator used to the analyze the islands."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("IslandAnalyzer", "The operator used to analyze each island."));
+      Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of times solutions have been evaluated."));
+      #endregion
+
+      #region Create operators
+      VariableCreator variableCreator = new VariableCreator();
+      UniformSubScopesProcessor uniformSubScopesProcessor0 = new UniformSubScopesProcessor();
+      VariableCreator islandVariableCreator = new VariableCreator();
+      Placeholder islandAnalyzer1 = new Placeholder();
+      ResultsCollector islandResultsCollector1 = new ResultsCollector();
+      Assigner comparisonFactorInitializer = new Assigner();
+      Placeholder analyzer1 = new Placeholder();
+      ResultsCollector resultsCollector1 = new ResultsCollector();
+      UniformSubScopesProcessor uniformSubScopesProcessor1 = new UniformSubScopesProcessor();
+      ConditionalBranch islandTerminatedBySelectionPressure1 = new ConditionalBranch();
+      OffspringSelectionGeneticAlgorithmMainOperator mainOperator = new OffspringSelectionGeneticAlgorithmMainOperator();
+      Placeholder islandAnalyzer2 = new Placeholder();
+      ResultsCollector islandResultsCollector2 = new ResultsCollector();
+      Comparator islandSelectionPressureComparator = new Comparator();
+      ConditionalBranch islandTerminatedBySelectionPressure2 = new ConditionalBranch();
+      IntCounter terminatedIslandsCounter = new IntCounter();
+      IntCounter generationsCounter = new IntCounter();
+      IntCounter generationsSinceLastMigrationCounter = new IntCounter();
+      Comparator migrationComparator = new Comparator();
+      ConditionalBranch migrationBranch = new ConditionalBranch();
+      Assigner resetTerminatedIslandsAssigner = new Assigner();
+      Assigner resetGenerationsSinceLastMigrationAssigner = new Assigner();
+      IntCounter migrationsCounter = new IntCounter();
+      UniformSubScopesProcessor uniformSubScopesProcessor2 = new UniformSubScopesProcessor();
+      Assigner reviveIslandAssigner = new Assigner();
+      Placeholder emigrantsSelector = new Placeholder();
+      Placeholder migrator = new Placeholder();
+      UniformSubScopesProcessor uniformSubScopesProcessor3 = new UniformSubScopesProcessor();
+      Placeholder immigrationReplacer = new Placeholder();
+      Comparator generationsComparator = new Comparator();
+      Comparator terminatedIslandsComparator = new Comparator();
+      Comparator maxEvaluatedSolutionsComparator = new Comparator();
+      Placeholder comparisonFactorModifier = new Placeholder();
+      Placeholder analyzer2 = new Placeholder();
+      ConditionalBranch generationsTerminationCondition = new ConditionalBranch();
+      ConditionalBranch terminatedIslandsCondition = new ConditionalBranch();
+      ConditionalBranch evaluatedSolutionsTerminationCondition = new ConditionalBranch();
+
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Migrations", new IntValue(0)));
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Class IslandOffspringSelectionGeneticAlgorithm expects this to be called Generations
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("GenerationsSinceLastMigration", new IntValue(0)));
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("TerminatedIslands", new IntValue(0)));
+
+      islandVariableCreator.CollectedValues.Add(new ValueParameter<ResultCollection>(ResultsParameter.Name, new ResultCollection()));
+      islandVariableCreator.CollectedValues.Add(new ValueParameter<BoolValue>("TerminateSelectionPressure", new BoolValue(false)));
+      islandVariableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("SelectionPressure", new DoubleValue(0)));
+
+      islandAnalyzer1.Name = "Island Analyzer (placeholder)";
+      islandAnalyzer1.OperatorParameter.ActualName = IslandAnalyzerParameter.Name;
+
+      islandResultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Selection Pressure", "Displays the rising selection pressure during a generation.", "SelectionPressure"));
+      islandResultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Success Ratio", "Indicates how many successful children were already found during a generation (relative to the population size).", "CurrentSuccessRatio"));
+      islandResultsCollector1.ResultsParameter.ActualName = ResultsParameter.Name;
+
+      comparisonFactorInitializer.Name = "Initialize Comparison Factor";
+      comparisonFactorInitializer.LeftSideParameter.ActualName = ComparisonFactorParameter.Name;
+      comparisonFactorInitializer.RightSideParameter.ActualName = ComparisonFactorStartParameter.Name;
+
+      analyzer1.Name = "Analyzer (placeholder)";
+      analyzer1.OperatorParameter.ActualName = AnalyzerParameter.Name;
+
+      resultsCollector1.CopyValue = new BoolValue(false);
+      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Migrations"));
+      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Generations"));
+      resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Comparison Factor", null, ComparisonFactorParameter.Name));
+      resultsCollector1.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("IslandResults", "Result set for each island", ResultsParameter.Name));
+      resultsCollector1.ResultsParameter.ActualName = ResultsParameter.Name;
+
+      islandTerminatedBySelectionPressure1.Name = "Island Terminated ?";
+      islandTerminatedBySelectionPressure1.ConditionParameter.ActualName = "TerminateSelectionPressure";
+
+      mainOperator.ComparisonFactorParameter.ActualName = ComparisonFactorParameter.Name;
+      mainOperator.CrossoverParameter.ActualName = CrossoverParameter.Name;
+      mainOperator.CurrentSuccessRatioParameter.ActualName = "CurrentSuccessRatio";
+      mainOperator.ElitesParameter.ActualName = ElitesParameter.Name;
+      mainOperator.EvaluatedSolutionsParameter.ActualName = EvaluatedSolutionsParameter.Name;
+      mainOperator.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
+      mainOperator.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      mainOperator.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
+      mainOperator.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
+      mainOperator.MutatorParameter.ActualName = MutatorParameter.Name;
+      mainOperator.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
+      mainOperator.QualityParameter.ActualName = QualityParameter.Name;
+      mainOperator.RandomParameter.ActualName = RandomParameter.Name;
+      mainOperator.SelectionPressureParameter.ActualName = "SelectionPressure";
+      mainOperator.SelectorParameter.ActualName = SelectorParameter.Name;
+      mainOperator.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
+
+      islandAnalyzer2.Name = "Island Analyzer (placeholder)";
+      islandAnalyzer2.OperatorParameter.ActualName = IslandAnalyzerParameter.Name;
+
+      islandResultsCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Selection Pressure", "Displays the rising selection pressure during a generation.", "SelectionPressure"));
+      islandResultsCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Success Ratio", "Indicates how many successful children were already found during a generation (relative to the population size).", "CurrentSuccessRatio"));
+      islandResultsCollector2.ResultsParameter.ActualName = "Results";
+
+      islandSelectionPressureComparator.Name = "SelectionPressure >= MaximumSelectionPressure ?";
+      islandSelectionPressureComparator.LeftSideParameter.ActualName = "SelectionPressure";
+      islandSelectionPressureComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
+      islandSelectionPressureComparator.RightSideParameter.ActualName = MaximumSelectionPressureParameter.Name;
+      islandSelectionPressureComparator.ResultParameter.ActualName = "TerminateSelectionPressure";
+
+      islandTerminatedBySelectionPressure2.Name = "Island Terminated ?";
+      islandTerminatedBySelectionPressure2.ConditionParameter.ActualName = "TerminateSelectionPressure";
+
+      terminatedIslandsCounter.Name = "TerminatedIslands + 1";
+      terminatedIslandsCounter.ValueParameter.ActualName = "TerminatedIslands";
+      terminatedIslandsCounter.Increment = new IntValue(1);
+
+      generationsCounter.Name = "Generations + 1";
+      generationsCounter.ValueParameter.ActualName = "Generations";
+      generationsCounter.Increment = new IntValue(1);
+
+      generationsSinceLastMigrationCounter.Name = "GenerationsSinceLastMigration + 1";
+      generationsSinceLastMigrationCounter.ValueParameter.ActualName = "GenerationsSinceLastMigration";
+      generationsSinceLastMigrationCounter.Increment = new IntValue(1);
+
+      migrationComparator.Name = "GenerationsSinceLastMigration = MigrationInterval ?";
+      migrationComparator.LeftSideParameter.ActualName = "GenerationsSinceLastMigration";
+      migrationComparator.Comparison = new Comparison(ComparisonType.Equal);
+      migrationComparator.RightSideParameter.ActualName = MigrationIntervalParameter.Name;
+      migrationComparator.ResultParameter.ActualName = "Migrate";
+
+      migrationBranch.Name = "Migrate?";
+      migrationBranch.ConditionParameter.ActualName = "Migrate";
+
+      resetTerminatedIslandsAssigner.Name = "Reset TerminatedIslands";
+      resetTerminatedIslandsAssigner.LeftSideParameter.ActualName = "TerminatedIslands";
+      resetTerminatedIslandsAssigner.RightSideParameter.Value = new IntValue(0);
+
+      resetGenerationsSinceLastMigrationAssigner.Name = "Reset GenerationsSinceLastMigration";
+      resetGenerationsSinceLastMigrationAssigner.LeftSideParameter.ActualName = "GenerationsSinceLastMigration";
+      resetGenerationsSinceLastMigrationAssigner.RightSideParameter.Value = new IntValue(0);
+
+      migrationsCounter.Name = "Migrations + 1";
+      migrationsCounter.IncrementParameter.Value = new IntValue(1);
+      migrationsCounter.ValueParameter.ActualName = "Migrations";
+
+      reviveIslandAssigner.Name = "Revive Island";
+      reviveIslandAssigner.LeftSideParameter.ActualName = "TerminateSelectionPressure";
+      reviveIslandAssigner.RightSideParameter.Value = new BoolValue(false);
+
+      emigrantsSelector.Name = "Emigrants Selector (placeholder)";
+      emigrantsSelector.OperatorParameter.ActualName = EmigrantsSelectorParameter.Name;
+
+      migrator.Name = "Migrator (placeholder)";
+      migrator.OperatorParameter.ActualName = MigratorParameter.Name;
+
+      immigrationReplacer.Name = "Immigration Replacer (placeholder)";
+      immigrationReplacer.OperatorParameter.ActualName = ImmigrationReplacerParameter.Name;
+
+      generationsComparator.Name = "Generations >= MaximumGenerations ?";
+      generationsComparator.LeftSideParameter.ActualName = "Generations";
+      generationsComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
+      generationsComparator.RightSideParameter.ActualName = MaximumGenerationsParameter.Name;
+      generationsComparator.ResultParameter.ActualName = "TerminateGenerations";
+
+      terminatedIslandsComparator.Name = "All Islands terminated ?";
+      terminatedIslandsComparator.LeftSideParameter.ActualName = "TerminatedIslands";
+      terminatedIslandsComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
+      terminatedIslandsComparator.RightSideParameter.ActualName = NumberOfIslandsParameter.Name;
+      terminatedIslandsComparator.ResultParameter.ActualName = "TerminateTerminatedIslands";
+
+      maxEvaluatedSolutionsComparator.Name = "EvaluatedSolutions >= MaximumEvaluatedSolutions ?";
+      maxEvaluatedSolutionsComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
+      maxEvaluatedSolutionsComparator.LeftSideParameter.ActualName = EvaluatedSolutionsParameter.Name;
+      maxEvaluatedSolutionsComparator.ResultParameter.ActualName = "TerminateEvaluatedSolutions";
+      maxEvaluatedSolutionsComparator.RightSideParameter.ActualName = "MaximumEvaluatedSolutions";
+
+      comparisonFactorModifier.Name = "Update Comparison Factor (Placeholder)";
+      comparisonFactorModifier.OperatorParameter.ActualName = ComparisonFactorModifierParameter.Name;
+
+      analyzer2.Name = "Analyzer (placeholder)";
+      analyzer2.OperatorParameter.ActualName = AnalyzerParameter.Name;
+
+      generationsTerminationCondition.Name = "Terminate (MaxGenerations) ?";
+      generationsTerminationCondition.ConditionParameter.ActualName = "TerminateGenerations";
+
+      terminatedIslandsCondition.Name = "Terminate (TerminatedIslands) ?";
+      terminatedIslandsCondition.ConditionParameter.ActualName = "TerminateTerminatedIslands";
+
+      evaluatedSolutionsTerminationCondition.Name = "Terminate (EvaluatedSolutions) ?";
+      evaluatedSolutionsTerminationCondition.ConditionParameter.ActualName = "TerminateEvaluatedSolutions";
+      #endregion
+
+      #region Create operator graph
+      OperatorGraph.InitialOperator = variableCreator;
+      variableCreator.Successor = uniformSubScopesProcessor0;
+      uniformSubScopesProcessor0.Operator = islandVariableCreator;
+      uniformSubScopesProcessor0.Successor = comparisonFactorInitializer;
+      islandVariableCreator.Successor = islandAnalyzer1;
+      islandAnalyzer1.Successor = islandResultsCollector1;
+      islandResultsCollector1.Successor = null;
+      comparisonFactorInitializer.Successor = analyzer1;
+      analyzer1.Successor = resultsCollector1;
+      resultsCollector1.Successor = uniformSubScopesProcessor1;
+      uniformSubScopesProcessor1.Operator = islandTerminatedBySelectionPressure1;
+      uniformSubScopesProcessor1.Successor = generationsCounter;
+      islandTerminatedBySelectionPressure1.TrueBranch = null;
+      islandTerminatedBySelectionPressure1.FalseBranch = mainOperator;
+      islandTerminatedBySelectionPressure1.Successor = null;
+      mainOperator.Successor = islandAnalyzer2;
+      islandAnalyzer2.Successor = islandResultsCollector2;
+      islandResultsCollector2.Successor = islandSelectionPressureComparator;
+      islandSelectionPressureComparator.Successor = islandTerminatedBySelectionPressure2;
+      islandTerminatedBySelectionPressure2.TrueBranch = terminatedIslandsCounter;
+      islandTerminatedBySelectionPressure2.FalseBranch = null;
+      islandTerminatedBySelectionPressure2.Successor = null;
+      generationsCounter.Successor = generationsSinceLastMigrationCounter;
+      generationsSinceLastMigrationCounter.Successor = migrationComparator;
+      migrationComparator.Successor = migrationBranch;
+      migrationBranch.TrueBranch = resetTerminatedIslandsAssigner;
+      migrationBranch.FalseBranch = null;
+      migrationBranch.Successor = generationsComparator;
+      resetTerminatedIslandsAssigner.Successor = resetGenerationsSinceLastMigrationAssigner;
+      resetGenerationsSinceLastMigrationAssigner.Successor = migrationsCounter;
+      migrationsCounter.Successor = uniformSubScopesProcessor2;
+      uniformSubScopesProcessor2.Operator = reviveIslandAssigner;
+      uniformSubScopesProcessor2.Successor = migrator;
+      reviveIslandAssigner.Successor = emigrantsSelector;
+      emigrantsSelector.Successor = null;
+      migrator.Successor = uniformSubScopesProcessor3;
+      uniformSubScopesProcessor3.Operator = immigrationReplacer;
+      uniformSubScopesProcessor3.Successor = null;
+      immigrationReplacer.Successor = null;
+      generationsComparator.Successor = terminatedIslandsComparator;
+      terminatedIslandsComparator.Successor = maxEvaluatedSolutionsComparator;
+      maxEvaluatedSolutionsComparator.Successor = comparisonFactorModifier;
+      comparisonFactorModifier.Successor = analyzer2;
+      analyzer2.Successor = generationsTerminationCondition;
+      generationsTerminationCondition.TrueBranch = null;
+      generationsTerminationCondition.FalseBranch = terminatedIslandsCondition;
+      generationsTerminationCondition.Successor = null;
+      terminatedIslandsCondition.TrueBranch = null;
+      terminatedIslandsCondition.FalseBranch = evaluatedSolutionsTerminationCondition;
+      terminatedIslandsCondition.Successor = null;
+      evaluatedSolutionsTerminationCondition.TrueBranch = null;
+      evaluatedSolutionsTerminationCondition.FalseBranch = uniformSubScopesProcessor1;
+      evaluatedSolutionsTerminationCondition.Successor = null;
+      #endregion
+    }
+
+    public override IOperation Apply() {
+      if (CrossoverParameter.ActualValue == null)
+        return null;
+      return base.Apply();
+    }
+  }
+}
Index: /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs
===================================================================
--- /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs	(revision 9065)
+++ /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs	(revision 9065)
@@ -0,0 +1,494 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Linq;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
+  /// <summary>
+  /// An offspring selection genetic algorithm.
+  /// </summary>
+  [Item("Offspring Selection Genetic Algorithm", "An offspring selection genetic algorithm (Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications. CRC Press).")]
+  [Creatable("Algorithms")]
+  [StorableClass]
+  public sealed class OffspringSelectionGeneticAlgorithm : HeuristicOptimizationEngineAlgorithm, IStorableContent {
+    public string Filename { get; set; }
+
+    #region Problem Properties
+    public override Type ProblemType {
+      get { return typeof(ISingleObjectiveHeuristicOptimizationProblem); }
+    }
+    public new ISingleObjectiveHeuristicOptimizationProblem Problem {
+      get { return (ISingleObjectiveHeuristicOptimizationProblem)base.Problem; }
+      set { base.Problem = value; }
+    }
+    #endregion
+
+    #region Parameter Properties
+    private ValueParameter<IntValue> SeedParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Seed"]; }
+    }
+    private ValueParameter<BoolValue> SetSeedRandomlyParameter {
+      get { return (ValueParameter<BoolValue>)Parameters["SetSeedRandomly"]; }
+    }
+    private ValueParameter<IntValue> PopulationSizeParameter {
+      get { return (ValueParameter<IntValue>)Parameters["PopulationSize"]; }
+    }
+    public IConstrainedValueParameter<ISelector> SelectorParameter {
+      get { return (IConstrainedValueParameter<ISelector>)Parameters["Selector"]; }
+    }
+    public IConstrainedValueParameter<ICrossover> CrossoverParameter {
+      get { return (IConstrainedValueParameter<ICrossover>)Parameters["Crossover"]; }
+    }
+    private ValueParameter<PercentValue> MutationProbabilityParameter {
+      get { return (ValueParameter<PercentValue>)Parameters["MutationProbability"]; }
+    }
+    public IConstrainedValueParameter<IManipulator> MutatorParameter {
+      get { return (IConstrainedValueParameter<IManipulator>)Parameters["Mutator"]; }
+    }
+    private ValueParameter<IntValue> ElitesParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Elites"]; }
+    }
+    private ValueParameter<IntValue> MaximumGenerationsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaximumGenerations"]; }
+    }
+    private ValueLookupParameter<DoubleValue> SuccessRatioParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["SuccessRatio"]; }
+    }
+    private ValueLookupParameter<DoubleValue> ComparisonFactorLowerBoundParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorLowerBound"]; }
+    }
+    private ValueLookupParameter<DoubleValue> ComparisonFactorUpperBoundParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorUpperBound"]; }
+    }
+    public IConstrainedValueParameter<IDiscreteDoubleValueModifier> ComparisonFactorModifierParameter {
+      get { return (IConstrainedValueParameter<IDiscreteDoubleValueModifier>)Parameters["ComparisonFactorModifier"]; }
+    }
+    private ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; }
+    }
+    private ValueLookupParameter<BoolValue> OffspringSelectionBeforeMutationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
+    }
+    private ValueLookupParameter<IntValue> SelectedParentsParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["SelectedParents"]; }
+    }
+    private ValueParameter<MultiAnalyzer> AnalyzerParameter {
+      get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
+    }
+    private ValueParameter<IntValue> MaximumEvaluatedSolutionsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaximumEvaluatedSolutions"]; }
+    }
+    #endregion
+
+    #region Properties
+    public IntValue Seed {
+      get { return SeedParameter.Value; }
+      set { SeedParameter.Value = value; }
+    }
+    public BoolValue SetSeedRandomly {
+      get { return SetSeedRandomlyParameter.Value; }
+      set { SetSeedRandomlyParameter.Value = value; }
+    }
+    public IntValue PopulationSize {
+      get { return PopulationSizeParameter.Value; }
+      set { PopulationSizeParameter.Value = value; }
+    }
+    public ISelector Selector {
+      get { return SelectorParameter.Value; }
+      set { SelectorParameter.Value = value; }
+    }
+    public ICrossover Crossover {
+      get { return CrossoverParameter.Value; }
+      set { CrossoverParameter.Value = value; }
+    }
+    public PercentValue MutationProbability {
+      get { return MutationProbabilityParameter.Value; }
+      set { MutationProbabilityParameter.Value = value; }
+    }
+    public IManipulator Mutator {
+      get { return MutatorParameter.Value; }
+      set { MutatorParameter.Value = value; }
+    }
+    public IntValue Elites {
+      get { return ElitesParameter.Value; }
+      set { ElitesParameter.Value = value; }
+    }
+    public IntValue MaximumGenerations {
+      get { return MaximumGenerationsParameter.Value; }
+      set { MaximumGenerationsParameter.Value = value; }
+    }
+    public DoubleValue SuccessRatio {
+      get { return SuccessRatioParameter.Value; }
+      set { SuccessRatioParameter.Value = value; }
+    }
+    public DoubleValue ComparisonFactorLowerBound {
+      get { return ComparisonFactorLowerBoundParameter.Value; }
+      set { ComparisonFactorLowerBoundParameter.Value = value; }
+    }
+    public DoubleValue ComparisonFactorUpperBound {
+      get { return ComparisonFactorUpperBoundParameter.Value; }
+      set { ComparisonFactorUpperBoundParameter.Value = value; }
+    }
+    public IDiscreteDoubleValueModifier ComparisonFactorModifier {
+      get { return ComparisonFactorModifierParameter.Value; }
+      set { ComparisonFactorModifierParameter.Value = value; }
+    }
+    public DoubleValue MaximumSelectionPressure {
+      get { return MaximumSelectionPressureParameter.Value; }
+      set { MaximumSelectionPressureParameter.Value = value; }
+    }
+    public BoolValue OffspringSelectionBeforeMutation {
+      get { return OffspringSelectionBeforeMutationParameter.Value; }
+      set { OffspringSelectionBeforeMutationParameter.Value = value; }
+    }
+    public IntValue SelectedParents {
+      get { return SelectedParentsParameter.Value; }
+      set { SelectedParentsParameter.Value = value; }
+    }
+    public MultiAnalyzer Analyzer {
+      get { return AnalyzerParameter.Value; }
+      set { AnalyzerParameter.Value = value; }
+    }
+    public IntValue MaximumEvaluatedSolutions {
+      get { return MaximumEvaluatedSolutionsParameter.Value; }
+      set { MaximumEvaluatedSolutionsParameter.Value = value; }
+    }
+    private RandomCreator RandomCreator {
+      get { return (RandomCreator)OperatorGraph.InitialOperator; }
+    }
+    private SolutionsCreator SolutionsCreator {
+      get { return (SolutionsCreator)RandomCreator.Successor; }
+    }
+    private OffspringSelectionGeneticAlgorithmMainLoop MainLoop {
+      get { return FindMainLoop(SolutionsCreator.Successor); }
+    }
+    [Storable]
+    private BestAverageWorstQualityAnalyzer qualityAnalyzer;
+    [Storable]
+    private ValueAnalyzer selectionPressureAnalyzer;
+    [Storable]
+    private SuccessfulOffspringAnalyzer successfulOffspringAnalyzer;
+    #endregion
+
+    [StorableConstructor]
+    private OffspringSelectionGeneticAlgorithm(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      #region Backwards Compatibility
+      if (successfulOffspringAnalyzer == null)
+        successfulOffspringAnalyzer = new SuccessfulOffspringAnalyzer();
+      #endregion
+
+      Initialize();
+    }
+    private OffspringSelectionGeneticAlgorithm(OffspringSelectionGeneticAlgorithm original, Cloner cloner)
+      : base(original, cloner) {
+      qualityAnalyzer = cloner.Clone(original.qualityAnalyzer);
+      selectionPressureAnalyzer = cloner.Clone(original.selectionPressureAnalyzer);
+      successfulOffspringAnalyzer = cloner.Clone(original.successfulOffspringAnalyzer);
+      Initialize();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OffspringSelectionGeneticAlgorithm(this, cloner);
+    }
+    public OffspringSelectionGeneticAlgorithm()
+      : base() {
+      Parameters.Add(new ValueParameter<IntValue>("Seed", "The random seed used to initialize the new pseudo random number generator.", new IntValue(0)));
+      Parameters.Add(new ValueParameter<BoolValue>("SetSeedRandomly", "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true)));
+      Parameters.Add(new ValueParameter<IntValue>("PopulationSize", "The size of the population of solutions.", new IntValue(100)));
+      Parameters.Add(new ConstrainedValueParameter<ISelector>("Selector", "The operator used to select solutions for reproduction."));
+      Parameters.Add(new ConstrainedValueParameter<ICrossover>("Crossover", "The operator used to cross solutions."));
+      Parameters.Add(new ValueParameter<PercentValue>("MutationProbability", "The probability that the mutation operator is applied on a solution.", new PercentValue(0.05)));
+      Parameters.Add(new OptionalConstrainedValueParameter<IManipulator>("Mutator", "The operator used to mutate solutions."));
+      Parameters.Add(new ValueParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation.", new IntValue(1)));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumGenerations", "The maximum number of generations which should be processed.", new IntValue(1000)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful to total children that should be achieved.", new DoubleValue(1)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorLowerBound", "The lower bound of the comparison factor (start).", new DoubleValue(0)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorUpperBound", "The upper bound of the comparison factor (end).", new DoubleValue(1)));
+      Parameters.Add(new OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>("ComparisonFactorModifier", "The operator used to modify the comparison factor.", new ItemSet<IDiscreteDoubleValueModifier>(new IDiscreteDoubleValueModifier[] { new LinearDiscreteDoubleValueModifier() }), new LinearDiscreteDoubleValueModifier()));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure that terminates the algorithm.", new DoubleValue(100)));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation.", new BoolValue(false)));
+      Parameters.Add(new ValueLookupParameter<IntValue>("SelectedParents", "How much parents should be selected each time the offspring selection step is performed until the population is filled. This parameter should be about the same or twice the size of PopulationSize for smaller problems, and less for large problems.", new IntValue(200)));
+      Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer()));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumEvaluatedSolutions", "The maximum number of evaluated solutions (approximately).", new IntValue(int.MaxValue)));
+
+      RandomCreator randomCreator = new RandomCreator();
+      SolutionsCreator solutionsCreator = new SolutionsCreator();
+      SubScopesCounter subScopesCounter = new SubScopesCounter();
+      ResultsCollector resultsCollector = new ResultsCollector();
+      OffspringSelectionGeneticAlgorithmMainLoop mainLoop = new OffspringSelectionGeneticAlgorithmMainLoop();
+      OperatorGraph.InitialOperator = randomCreator;
+
+      randomCreator.RandomParameter.ActualName = "Random";
+      randomCreator.SeedParameter.ActualName = SeedParameter.Name;
+      randomCreator.SeedParameter.Value = null;
+      randomCreator.SetSeedRandomlyParameter.ActualName = SetSeedRandomlyParameter.Name;
+      randomCreator.SetSeedRandomlyParameter.Value = null;
+      randomCreator.Successor = solutionsCreator;
+
+      solutionsCreator.NumberOfSolutionsParameter.ActualName = PopulationSizeParameter.Name;
+      solutionsCreator.Successor = subScopesCounter;
+
+      subScopesCounter.Name = "Initialize EvaluatedSolutions";
+      subScopesCounter.ValueParameter.ActualName = "EvaluatedSolutions";
+      subScopesCounter.Successor = resultsCollector;
+
+      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", "", "EvaluatedSolutions"));
+      resultsCollector.ResultsParameter.ActualName = "Results";
+      resultsCollector.Successor = mainLoop;
+
+      mainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name;
+      mainLoop.ComparisonFactorModifierParameter.ActualName = ComparisonFactorModifierParameter.Name;
+      mainLoop.ComparisonFactorParameter.ActualName = "ComparisonFactor";
+      mainLoop.ComparisonFactorStartParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
+      mainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name;
+      mainLoop.ElitesParameter.ActualName = ElitesParameter.Name;
+      mainLoop.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions";
+      mainLoop.MaximumGenerationsParameter.ActualName = MaximumGenerationsParameter.Name;
+      mainLoop.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
+      mainLoop.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
+      mainLoop.MutatorParameter.ActualName = MutatorParameter.Name;
+      mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
+      mainLoop.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
+      mainLoop.ResultsParameter.ActualName = "Results";
+      mainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
+      mainLoop.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
+
+      foreach (ISelector selector in ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name))
+        SelectorParameter.ValidValues.Add(selector);
+      ISelector proportionalSelector = SelectorParameter.ValidValues.FirstOrDefault(x => x.GetType().Name.Equals("ProportionalSelector"));
+      if (proportionalSelector != null) SelectorParameter.Value = proportionalSelector;
+      ParameterizeSelectors();
+
+      foreach (IDiscreteDoubleValueModifier modifier in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name))
+        ComparisonFactorModifierParameter.ValidValues.Add(modifier);
+      IDiscreteDoubleValueModifier linearModifier = ComparisonFactorModifierParameter.ValidValues.FirstOrDefault(x => x.GetType().Name.Equals("LinearDiscreteDoubleValueModifier"));
+      if (linearModifier != null) ComparisonFactorModifierParameter.Value = linearModifier;
+      ParameterizeComparisonFactorModifiers();
+
+      qualityAnalyzer = new BestAverageWorstQualityAnalyzer();
+      selectionPressureAnalyzer = new ValueAnalyzer();
+      successfulOffspringAnalyzer = new SuccessfulOffspringAnalyzer();
+      ParameterizeAnalyzers();
+      UpdateAnalyzers();
+
+      Initialize();
+    }
+
+
+
+    public override void Prepare() {
+      if (Problem != null) base.Prepare();
+    }
+
+    #region Events
+    protected override void OnProblemChanged() {
+      ParameterizeStochasticOperator(Problem.SolutionCreator);
+      ParameterizeStochasticOperator(Problem.Evaluator);
+      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
+      ParameterizeSolutionsCreator();
+      ParameterizMainLoop();
+      ParameterizeSelectors();
+      ParameterizeAnalyzers();
+      ParameterizeIterationBasedOperators();
+      UpdateCrossovers();
+      UpdateMutators();
+      UpdateAnalyzers();
+      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      base.OnProblemChanged();
+    }
+
+    protected override void Problem_SolutionCreatorChanged(object sender, EventArgs e) {
+      ParameterizeStochasticOperator(Problem.SolutionCreator);
+      ParameterizeSolutionsCreator();
+      base.Problem_SolutionCreatorChanged(sender, e);
+    }
+    protected override void Problem_EvaluatorChanged(object sender, EventArgs e) {
+      ParameterizeStochasticOperator(Problem.Evaluator);
+      ParameterizeSolutionsCreator();
+      ParameterizMainLoop();
+      ParameterizeSelectors();
+      ParameterizeAnalyzers();
+      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      base.Problem_EvaluatorChanged(sender, e);
+    }
+    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
+      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
+      ParameterizeIterationBasedOperators();
+      UpdateCrossovers();
+      UpdateMutators();
+      UpdateAnalyzers();
+      base.Problem_OperatorsChanged(sender, e);
+    }
+    private void ElitesParameter_ValueChanged(object sender, EventArgs e) {
+      Elites.ValueChanged += new EventHandler(Elites_ValueChanged);
+      ParameterizeSelectors();
+    }
+    private void Elites_ValueChanged(object sender, EventArgs e) {
+      ParameterizeSelectors();
+    }
+    private void PopulationSizeParameter_ValueChanged(object sender, EventArgs e) {
+      PopulationSize.ValueChanged += new EventHandler(PopulationSize_ValueChanged);
+      ParameterizeSelectors();
+    }
+    private void PopulationSize_ValueChanged(object sender, EventArgs e) {
+      ParameterizeSelectors();
+    }
+    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizMainLoop();
+      ParameterizeSelectors();
+      ParameterizeAnalyzers();
+    }
+    #endregion
+
+    #region Helpers
+    private void Initialize() {
+      PopulationSizeParameter.ValueChanged += new EventHandler(PopulationSizeParameter_ValueChanged);
+      PopulationSize.ValueChanged += new EventHandler(PopulationSize_ValueChanged);
+      ElitesParameter.ValueChanged += new EventHandler(ElitesParameter_ValueChanged);
+      Elites.ValueChanged += new EventHandler(Elites_ValueChanged);
+      if (Problem != null) {
+        Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      }
+    }
+    private void ParameterizeSolutionsCreator() {
+      SolutionsCreator.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
+      SolutionsCreator.SolutionCreatorParameter.ActualName = Problem.SolutionCreatorParameter.Name;
+    }
+    private void ParameterizMainLoop() {
+      MainLoop.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
+      MainLoop.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+      MainLoop.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+    }
+    private void ParameterizeStochasticOperator(IOperator op) {
+      if (op is IStochasticOperator)
+        ((IStochasticOperator)op).RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
+    }
+    private void ParameterizeSelectors() {
+      foreach (ISelector selector in SelectorParameter.ValidValues) {
+        selector.CopySelected = new BoolValue(true);
+        selector.NumberOfSelectedSubScopesParameter.Value = null;
+        selector.NumberOfSelectedSubScopesParameter.ActualName = SelectedParentsParameter.Name;
+        ParameterizeStochasticOperator(selector);
+      }
+      if (Problem != null) {
+        foreach (ISingleObjectiveSelector selector in SelectorParameter.ValidValues.OfType<ISingleObjectiveSelector>()) {
+          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        }
+      }
+    }
+    private void ParameterizeAnalyzers() {
+      qualityAnalyzer.ResultsParameter.ActualName = "Results";
+      selectionPressureAnalyzer.Name = "SelectionPressure Analyzer";
+      selectionPressureAnalyzer.ResultsParameter.ActualName = "Results";
+      selectionPressureAnalyzer.ValueParameter.ActualName = "SelectionPressure";
+      selectionPressureAnalyzer.ValueParameter.Depth = 0;
+      selectionPressureAnalyzer.ValuesParameter.ActualName = "Selection Pressure History";
+      successfulOffspringAnalyzer.ResultsParameter.ActualName = "Results";
+      successfulOffspringAnalyzer.GenerationsParameter.ActualName = "Generations";
+      successfulOffspringAnalyzer.SuccessfulOffspringFlagParameter.Value.Value = "SuccessfulOffspring";
+      successfulOffspringAnalyzer.DepthParameter.Value = new IntValue(1);
+      if (Problem != null) {
+        qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+        qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
+      }
+    }
+    private void ParameterizeComparisonFactorModifiers() {
+      foreach (IDiscreteDoubleValueModifier modifier in ComparisonFactorModifierParameter.ValidValues) {
+        modifier.IndexParameter.ActualName = "Generations";
+        modifier.EndIndexParameter.ActualName = MaximumGenerationsParameter.Name;
+        modifier.EndValueParameter.ActualName = ComparisonFactorUpperBoundParameter.Name;
+        modifier.StartIndexParameter.Value = new IntValue(0);
+        modifier.StartValueParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
+        modifier.ValueParameter.ActualName = "ComparisonFactor";
+      }
+    }
+    private void ParameterizeIterationBasedOperators() {
+      if (Problem != null) {
+        foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) {
+          op.IterationsParameter.ActualName = "Generations";
+          op.MaximumIterationsParameter.ActualName = MaximumGenerationsParameter.Name;
+        }
+      }
+    }
+    private void UpdateCrossovers() {
+      ICrossover oldCrossover = CrossoverParameter.Value;
+      CrossoverParameter.ValidValues.Clear();
+      ICrossover defaultCrossover = Problem.Operators.OfType<ICrossover>().FirstOrDefault();
+
+      foreach (ICrossover crossover in Problem.Operators.OfType<ICrossover>().OrderBy(x => x.Name))
+        CrossoverParameter.ValidValues.Add(crossover);
+
+      if (oldCrossover != null) {
+        ICrossover crossover = CrossoverParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldCrossover.GetType());
+        if (crossover != null) CrossoverParameter.Value = crossover;
+        else oldCrossover = null;
+      }
+      if (oldCrossover == null && defaultCrossover != null)
+        CrossoverParameter.Value = defaultCrossover;
+    }
+    private void UpdateMutators() {
+      IManipulator oldMutator = MutatorParameter.Value;
+      MutatorParameter.ValidValues.Clear();
+      foreach (IManipulator mutator in Problem.Operators.OfType<IManipulator>().OrderBy(x => x.Name))
+        MutatorParameter.ValidValues.Add(mutator);
+      if (oldMutator != null) {
+        IManipulator mutator = MutatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldMutator.GetType());
+        if (mutator != null) MutatorParameter.Value = mutator;
+      }
+    }
+    private void UpdateAnalyzers() {
+      Analyzer.Operators.Clear();
+      if (Problem != null) {
+        foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>()) {
+          foreach (IScopeTreeLookupParameter param in analyzer.Parameters.OfType<IScopeTreeLookupParameter>())
+            param.Depth = 1;
+          Analyzer.Operators.Add(analyzer, analyzer.EnabledByDefault);
+        }
+      }
+      Analyzer.Operators.Add(qualityAnalyzer, qualityAnalyzer.EnabledByDefault);
+      Analyzer.Operators.Add(selectionPressureAnalyzer, selectionPressureAnalyzer.EnabledByDefault);
+      Analyzer.Operators.Add(successfulOffspringAnalyzer, successfulOffspringAnalyzer.EnabledByDefault);
+    }
+    private OffspringSelectionGeneticAlgorithmMainLoop FindMainLoop(IOperator start) {
+      IOperator mainLoop = start;
+      while (mainLoop != null && !(mainLoop is OffspringSelectionGeneticAlgorithmMainLoop))
+        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
+      if (mainLoop == null) return null;
+      else return (OffspringSelectionGeneticAlgorithmMainLoop)mainLoop;
+    }
+    #endregion
+  }
+}
Index: /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs
===================================================================
--- /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 9065)
+++ /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 9065)
@@ -0,0 +1,244 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
+  /// <summary>
+  /// An operator which represents the main loop of an offspring selection genetic algorithm.
+  /// </summary>
+  [Item("OffspringSelectionGeneticAlgorithmMainLoop", "An operator which represents the main loop of an offspring selection genetic algorithm.")]
+  [StorableClass]
+  public sealed class OffspringSelectionGeneticAlgorithmMainLoop : AlgorithmOperator {
+    #region Parameter properties
+    public ValueLookupParameter<IRandom> RandomParameter {
+      get { return (ValueLookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public ValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ValueLookupParameter<IOperator> SelectorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Selector"]; }
+    }
+    public ValueLookupParameter<IOperator> CrossoverParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Crossover"]; }
+    }
+    public ValueLookupParameter<PercentValue> MutationProbabilityParameter {
+      get { return (ValueLookupParameter<PercentValue>)Parameters["MutationProbability"]; }
+    }
+    public ValueLookupParameter<IOperator> MutatorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Mutator"]; }
+    }
+    public ValueLookupParameter<IOperator> EvaluatorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Evaluator"]; }
+    }
+    public ValueLookupParameter<IntValue> ElitesParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["Elites"]; }
+    }
+    public ValueLookupParameter<IntValue> MaximumGenerationsParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["MaximumGenerations"]; }
+    }
+    public ValueLookupParameter<VariableCollection> ResultsParameter {
+      get { return (ValueLookupParameter<VariableCollection>)Parameters["Results"]; }
+    }
+    public ValueLookupParameter<IOperator> AnalyzerParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Analyzer"]; }
+    }
+    public ValueLookupParameter<DoubleValue> SuccessRatioParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["SuccessRatio"]; }
+    }
+    public LookupParameter<DoubleValue> ComparisonFactorParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["ComparisonFactor"]; }
+    }
+    public ValueLookupParameter<DoubleValue> ComparisonFactorStartParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorStart"]; }
+    }
+    public ValueLookupParameter<IOperator> ComparisonFactorModifierParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["ComparisonFactorModifier"]; }
+    }
+    public ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; }
+    }
+    public ValueLookupParameter<BoolValue> OffspringSelectionBeforeMutationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
+    }
+    public LookupParameter<IntValue> EvaluatedSolutionsParameter {
+      get { return (LookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private OffspringSelectionGeneticAlgorithmMainLoop(bool deserializing) : base(deserializing) { }
+    private OffspringSelectionGeneticAlgorithmMainLoop(OffspringSelectionGeneticAlgorithmMainLoop original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OffspringSelectionGeneticAlgorithmMainLoop(this, cloner);
+    }
+    public OffspringSelectionGeneticAlgorithmMainLoop()
+      : base() {
+      Initialize();
+    }
+
+    private void Initialize() {
+      #region Create parameters
+      Parameters.Add(new ValueLookupParameter<IRandom>("Random", "A pseudo random number generator."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The value which represents the quality of a solution."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("BestKnownQuality", "The best known quality value found so far."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Selector", "The operator used to select solutions for reproduction."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Crossover", "The operator used to cross solutions."));
+      Parameters.Add(new ValueLookupParameter<PercentValue>("MutationProbability", "The probability that the mutation operator is applied on a solution."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Mutator", "The operator used to mutate solutions."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator", "The operator used to evaluate solutions. This operator is executed in parallel, if an engine is used which supports parallelization."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumGenerations", "The maximum number of generations which should be processed."));
+      Parameters.Add(new ValueLookupParameter<VariableCollection>("Results", "The variable collection where results should be stored."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Analyzer", "The operator used to analyze each generation."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful to total children that should be achieved."));
+      Parameters.Add(new LookupParameter<DoubleValue>("ComparisonFactor", "The comparison factor is used to determine whether the offspring should be compared to the better parent, the worse parent or a quality value linearly interpolated between them. It is in the range [0;1]."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorStart", "The initial value for the comparison factor."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("ComparisonFactorModifier", "The operator used to modify the comparison factor."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure that terminates the algorithm."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation."));
+      Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of times solutions have been evaluated."));
+      #endregion
+
+      #region Create operators
+      VariableCreator variableCreator = new VariableCreator();
+      Assigner comparisonFactorInitializer = new Assigner();
+      Placeholder analyzer1 = new Placeholder();
+      ResultsCollector resultsCollector1 = new ResultsCollector();
+      OffspringSelectionGeneticAlgorithmMainOperator mainOperator = new OffspringSelectionGeneticAlgorithmMainOperator();
+      IntCounter generationsCounter = new IntCounter();
+      Comparator maxGenerationsComparator = new Comparator();
+      Comparator maxSelectionPressureComparator = new Comparator();
+      Comparator maxEvaluatedSolutionsComparator = new Comparator();
+      Placeholder comparisonFactorModifier = new Placeholder();
+      Placeholder analyzer2 = new Placeholder();
+      ConditionalBranch conditionalBranch1 = new ConditionalBranch();
+      ConditionalBranch conditionalBranch2 = new ConditionalBranch();
+      ConditionalBranch conditionalBranch3 = new ConditionalBranch();
+
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Class OffspringSelectionGeneticAlgorithm expects this to be called Generations
+      variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("SelectionPressure", new DoubleValue(0)));
+      variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("CurrentSuccessRatio", new DoubleValue(0)));
+
+      comparisonFactorInitializer.Name = "Initialize ComparisonFactor (placeholder)";
+      comparisonFactorInitializer.LeftSideParameter.ActualName = ComparisonFactorParameter.Name;
+      comparisonFactorInitializer.RightSideParameter.ActualName = ComparisonFactorStartParameter.Name;
+
+      analyzer1.Name = "Analyzer (placeholder)";
+      analyzer1.OperatorParameter.ActualName = AnalyzerParameter.Name;
+
+      resultsCollector1.CopyValue = new BoolValue(false);
+      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Generations"));
+      resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Comparison Factor", null, ComparisonFactorParameter.Name));
+      resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Selection Pressure", "Displays the rising selection pressure during a generation.", "SelectionPressure"));
+      resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Success Ratio", "Indicates how many successful children were already found during a generation (relative to the population size).", "CurrentSuccessRatio"));
+      resultsCollector1.ResultsParameter.ActualName = ResultsParameter.Name;
+
+      mainOperator.ComparisonFactorParameter.ActualName = ComparisonFactorParameter.Name;
+      mainOperator.CrossoverParameter.ActualName = CrossoverParameter.Name;
+      mainOperator.CurrentSuccessRatioParameter.ActualName = "CurrentSuccessRatio";
+      mainOperator.ElitesParameter.ActualName = ElitesParameter.Name;
+      mainOperator.EvaluatedSolutionsParameter.ActualName = EvaluatedSolutionsParameter.Name;
+      mainOperator.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
+      mainOperator.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      mainOperator.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
+      mainOperator.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
+      mainOperator.MutatorParameter.ActualName = MutatorParameter.Name;
+      mainOperator.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
+      mainOperator.QualityParameter.ActualName = QualityParameter.Name;
+      mainOperator.RandomParameter.ActualName = RandomParameter.Name;
+      mainOperator.SelectionPressureParameter.ActualName = "SelectionPressure";
+      mainOperator.SelectorParameter.ActualName = SelectorParameter.Name;
+      mainOperator.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
+
+      generationsCounter.Increment = new IntValue(1);
+      generationsCounter.ValueParameter.ActualName = "Generations";
+
+      maxGenerationsComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
+      maxGenerationsComparator.LeftSideParameter.ActualName = "Generations";
+      maxGenerationsComparator.ResultParameter.ActualName = "TerminateMaximumGenerations";
+      maxGenerationsComparator.RightSideParameter.ActualName = MaximumGenerationsParameter.Name;
+
+      maxSelectionPressureComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
+      maxSelectionPressureComparator.LeftSideParameter.ActualName = "SelectionPressure";
+      maxSelectionPressureComparator.ResultParameter.ActualName = "TerminateSelectionPressure";
+      maxSelectionPressureComparator.RightSideParameter.ActualName = MaximumSelectionPressureParameter.Name;
+
+      maxEvaluatedSolutionsComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
+      maxEvaluatedSolutionsComparator.LeftSideParameter.ActualName = EvaluatedSolutionsParameter.Name;
+      maxEvaluatedSolutionsComparator.ResultParameter.ActualName = "TerminateEvaluatedSolutions";
+      maxEvaluatedSolutionsComparator.RightSideParameter.ActualName = "MaximumEvaluatedSolutions";
+
+      comparisonFactorModifier.Name = "Update ComparisonFactor (placeholder)";
+      comparisonFactorModifier.OperatorParameter.ActualName = ComparisonFactorModifierParameter.Name;
+
+      analyzer2.Name = "Analyzer (placeholder)";
+      analyzer2.OperatorParameter.ActualName = AnalyzerParameter.Name;
+
+      conditionalBranch1.Name = "MaximumSelectionPressure reached?";
+      conditionalBranch1.ConditionParameter.ActualName = "TerminateSelectionPressure";
+
+      conditionalBranch2.Name = "MaximumGenerations reached?";
+      conditionalBranch2.ConditionParameter.ActualName = "TerminateMaximumGenerations";
+
+      conditionalBranch3.Name = "MaximumEvaluatedSolutions reached?";
+      conditionalBranch3.ConditionParameter.ActualName = "TerminateEvaluatedSolutions";
+      #endregion
+
+      #region Create operator graph
+      OperatorGraph.InitialOperator = variableCreator;
+      variableCreator.Successor = comparisonFactorInitializer;
+      comparisonFactorInitializer.Successor = analyzer1;
+      analyzer1.Successor = resultsCollector1;
+      resultsCollector1.Successor = mainOperator;
+      mainOperator.Successor = generationsCounter;
+      generationsCounter.Successor = maxGenerationsComparator;
+      maxGenerationsComparator.Successor = maxSelectionPressureComparator;
+      maxSelectionPressureComparator.Successor = maxEvaluatedSolutionsComparator;
+      maxEvaluatedSolutionsComparator.Successor = comparisonFactorModifier;
+      comparisonFactorModifier.Successor = analyzer2;
+      analyzer2.Successor = conditionalBranch1;
+      conditionalBranch1.FalseBranch = conditionalBranch2;
+      conditionalBranch1.TrueBranch = null;
+      conditionalBranch1.Successor = null;
+      conditionalBranch2.FalseBranch = conditionalBranch3;
+      conditionalBranch2.TrueBranch = null;
+      conditionalBranch2.Successor = null;
+      conditionalBranch3.FalseBranch = mainOperator;
+      conditionalBranch3.TrueBranch = null;
+      conditionalBranch3.Successor = null;
+      #endregion
+    }
+  }
+}
Index: /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainOperator.cs
===================================================================
--- /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainOperator.cs	(revision 9065)
+++ /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainOperator.cs	(revision 9065)
@@ -0,0 +1,325 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Selection;
+
+namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
+  /// <summary>
+  /// An operator which represents the main loop of an offspring selection genetic algorithm.
+  /// </summary>
+  [Item("OffspringSelectionGeneticAlgorithmMainOperator", "An operator that represents the core of an offspring selection genetic algorithm.")]
+  [StorableClass]
+  public sealed class OffspringSelectionGeneticAlgorithmMainOperator : AlgorithmOperator {
+    #region Parameter properties
+    public ValueLookupParameter<IRandom> RandomParameter {
+      get { return (ValueLookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public ValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ValueLookupParameter<IOperator> SelectorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Selector"]; }
+    }
+    public ValueLookupParameter<IOperator> CrossoverParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Crossover"]; }
+    }
+    public ValueLookupParameter<PercentValue> MutationProbabilityParameter {
+      get { return (ValueLookupParameter<PercentValue>)Parameters["MutationProbability"]; }
+    }
+    public ValueLookupParameter<IOperator> MutatorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Mutator"]; }
+    }
+    public ValueLookupParameter<IOperator> EvaluatorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Evaluator"]; }
+    }
+    public LookupParameter<IntValue> EvaluatedSolutionsParameter {
+      get { return (LookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; }
+    }
+    public ValueLookupParameter<IntValue> ElitesParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["Elites"]; }
+    }
+    public LookupParameter<DoubleValue> ComparisonFactorParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["ComparisonFactor"]; }
+    }
+    public LookupParameter<DoubleValue> CurrentSuccessRatioParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["CurrentSuccessRatio"]; }
+    }
+    public ValueLookupParameter<DoubleValue> SuccessRatioParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["SuccessRatio"]; }
+    }
+    public LookupParameter<DoubleValue> SelectionPressureParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["SelectionPressure"]; }
+    }
+    public ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; }
+    }
+    public ValueLookupParameter<BoolValue> OffspringSelectionBeforeMutationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private OffspringSelectionGeneticAlgorithmMainOperator(bool deserializing) : base(deserializing) { }
+    private OffspringSelectionGeneticAlgorithmMainOperator(OffspringSelectionGeneticAlgorithmMainOperator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OffspringSelectionGeneticAlgorithmMainOperator(this, cloner);
+    }
+    public OffspringSelectionGeneticAlgorithmMainOperator()
+      : base() {
+      Initialize();
+    }
+
+    private void Initialize() {
+      #region Create parameters
+      Parameters.Add(new ValueLookupParameter<IRandom>("Random", "A pseudo random number generator."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The value which represents the quality of a solution."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Selector", "The operator used to select solutions for reproduction."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Crossover", "The operator used to cross solutions."));
+      Parameters.Add(new ValueLookupParameter<PercentValue>("MutationProbability", "The probability that the mutation operator is applied on a solution."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Mutator", "The operator used to mutate solutions."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator", "The operator used to evaluate solutions. This operator is executed in parallel, if an engine is used which supports parallelization."));
+      Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of evaluated solutions."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation."));
+      Parameters.Add(new LookupParameter<DoubleValue>("ComparisonFactor", "The comparison factor is used to determine whether the offspring should be compared to the better parent, the worse parent or a quality value linearly interpolated between them. It is in the range [0;1]."));
+      Parameters.Add(new LookupParameter<DoubleValue>("CurrentSuccessRatio", "The current success ratio."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful to total children that should be achieved."));
+      Parameters.Add(new LookupParameter<DoubleValue>("SelectionPressure", "The actual selection pressure."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure that terminates the algorithm."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation."));
+      #endregion
+
+      #region Create operators
+      Placeholder selector = new Placeholder();
+      SubScopesProcessor subScopesProcessor1 = new SubScopesProcessor();
+      ChildrenCreator childrenCreator = new ChildrenCreator();
+      ConditionalBranch osBeforeMutationBranch = new ConditionalBranch();
+      UniformSubScopesProcessor uniformSubScopesProcessor1 = new UniformSubScopesProcessor();
+      Placeholder crossover1 = new Placeholder();
+      UniformSubScopesProcessor uniformSubScopesProcessor2 = new UniformSubScopesProcessor();
+      Placeholder evaluator1 = new Placeholder();
+      SubScopesCounter subScopesCounter1 = new SubScopesCounter();
+      WeightedParentsQualityComparator qualityComparer1 = new WeightedParentsQualityComparator();
+      SubScopesRemover subScopesRemover1 = new SubScopesRemover();
+      UniformSubScopesProcessor uniformSubScopesProcessor3 = new UniformSubScopesProcessor();
+      StochasticBranch mutationBranch1 = new StochasticBranch();
+      Placeholder mutator1 = new Placeholder();
+      VariableCreator variableCreator1 = new VariableCreator();
+      VariableCreator variableCreator2 = new VariableCreator();
+      ConditionalSelector conditionalSelector = new ConditionalSelector();
+      SubScopesProcessor subScopesProcessor2 = new SubScopesProcessor();
+      UniformSubScopesProcessor uniformSubScopesProcessor4 = new UniformSubScopesProcessor();
+      Placeholder evaluator2 = new Placeholder();
+      SubScopesCounter subScopesCounter2 = new SubScopesCounter();
+      MergingReducer mergingReducer1 = new MergingReducer();
+      UniformSubScopesProcessor uniformSubScopesProcessor5 = new UniformSubScopesProcessor();
+      Placeholder crossover2 = new Placeholder();
+      StochasticBranch mutationBranch2 = new StochasticBranch();
+      Placeholder mutator2 = new Placeholder();
+      UniformSubScopesProcessor uniformSubScopesProcessor6 = new UniformSubScopesProcessor();
+      Placeholder evaluator3 = new Placeholder();
+      SubScopesCounter subScopesCounter3 = new SubScopesCounter();
+      WeightedParentsQualityComparator qualityComparer2 = new WeightedParentsQualityComparator();
+      SubScopesRemover subScopesRemover2 = new SubScopesRemover();
+      OffspringSelector offspringSelector = new OffspringSelector();
+      SubScopesProcessor subScopesProcessor3 = new SubScopesProcessor();
+      BestSelector bestSelector = new BestSelector();
+      WorstSelector worstSelector = new WorstSelector();
+      RightReducer rightReducer = new RightReducer();
+      LeftReducer leftReducer = new LeftReducer();
+      MergingReducer mergingReducer2 = new MergingReducer();
+
+      selector.Name = "Selector (placeholder)";
+      selector.OperatorParameter.ActualName = SelectorParameter.Name;
+
+      childrenCreator.ParentsPerChild = new IntValue(2);
+
+      osBeforeMutationBranch.Name = "Apply OS before mutation?";
+      osBeforeMutationBranch.ConditionParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
+
+      crossover1.Name = "Crossover (placeholder)";
+      crossover1.OperatorParameter.ActualName = CrossoverParameter.Name;
+
+      uniformSubScopesProcessor2.Parallel.Value = true;
+
+      evaluator1.Name = "Evaluator (placeholder)";
+      evaluator1.OperatorParameter.ActualName = EvaluatorParameter.Name;
+
+      subScopesCounter1.Name = "Increment EvaluatedSolutions";
+      subScopesCounter1.ValueParameter.ActualName = EvaluatedSolutionsParameter.Name;
+
+      qualityComparer1.ComparisonFactorParameter.ActualName = ComparisonFactorParameter.Name;
+      qualityComparer1.LeftSideParameter.ActualName = QualityParameter.Name;
+      qualityComparer1.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      qualityComparer1.RightSideParameter.ActualName = QualityParameter.Name;
+      qualityComparer1.ResultParameter.ActualName = "SuccessfulOffspring";
+
+      subScopesRemover1.RemoveAllSubScopes = true;
+
+      mutationBranch1.ProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
+      mutationBranch1.RandomParameter.ActualName = RandomParameter.Name;
+
+      mutator1.Name = "Mutator (placeholder)";
+      mutator1.OperatorParameter.ActualName = MutatorParameter.Name;
+
+      variableCreator1.Name = "MutatedOffspring = true";
+      variableCreator1.CollectedValues.Add(new ValueParameter<BoolValue>("MutatedOffspring", null, new BoolValue(true), false));
+
+      variableCreator2.Name = "MutatedOffspring = false";
+      variableCreator2.CollectedValues.Add(new ValueParameter<BoolValue>("MutatedOffspring", null, new BoolValue(false), false));
+
+      conditionalSelector.ConditionParameter.ActualName = "MutatedOffspring";
+      conditionalSelector.ConditionParameter.Depth = 1;
+      conditionalSelector.CopySelected.Value = false;
+
+      uniformSubScopesProcessor4.Parallel.Value = true;
+
+      evaluator2.Name = "Evaluator (placeholder)";
+      evaluator2.OperatorParameter.ActualName = EvaluatorParameter.Name;
+
+      subScopesCounter2.Name = "Increment EvaluatedSolutions";
+      subScopesCounter2.ValueParameter.ActualName = EvaluatedSolutionsParameter.Name;
+
+      crossover2.Name = "Crossover (placeholder)";
+      crossover2.OperatorParameter.ActualName = CrossoverParameter.Name;
+
+      mutationBranch2.ProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
+      mutationBranch2.RandomParameter.ActualName = RandomParameter.Name;
+
+      mutator2.Name = "Mutator (placeholder)";
+      mutator2.OperatorParameter.ActualName = MutatorParameter.Name;
+
+      uniformSubScopesProcessor6.Parallel.Value = true;
+
+      evaluator3.Name = "Evaluator (placeholder)";
+      evaluator3.OperatorParameter.ActualName = EvaluatorParameter.Name;
+
+      subScopesCounter3.Name = "Increment EvaluatedSolutions";
+      subScopesCounter3.ValueParameter.ActualName = EvaluatedSolutionsParameter.Name;
+
+      qualityComparer2.ComparisonFactorParameter.ActualName = ComparisonFactorParameter.Name;
+      qualityComparer2.LeftSideParameter.ActualName = QualityParameter.Name;
+      qualityComparer2.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      qualityComparer2.RightSideParameter.ActualName = QualityParameter.Name;
+      qualityComparer2.ResultParameter.ActualName = "SuccessfulOffspring";
+
+      subScopesRemover2.RemoveAllSubScopes = true;
+
+      offspringSelector.CurrentSuccessRatioParameter.ActualName = CurrentSuccessRatioParameter.Name;
+      offspringSelector.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
+      offspringSelector.SelectionPressureParameter.ActualName = SelectionPressureParameter.Name;
+      offspringSelector.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
+      offspringSelector.OffspringPopulationParameter.ActualName = "OffspringPopulation";
+      offspringSelector.OffspringPopulationWinnersParameter.ActualName = "OffspringPopulationWinners";
+      offspringSelector.SuccessfulOffspringParameter.ActualName = "SuccessfulOffspring";
+
+      bestSelector.CopySelected = new BoolValue(false);
+      bestSelector.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      bestSelector.NumberOfSelectedSubScopesParameter.ActualName = ElitesParameter.Name;
+      bestSelector.QualityParameter.ActualName = QualityParameter.Name;
+
+      worstSelector.CopySelected = new BoolValue(false);
+      worstSelector.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      worstSelector.NumberOfSelectedSubScopesParameter.ActualName = ElitesParameter.Name;
+      worstSelector.QualityParameter.ActualName = QualityParameter.Name;
+      #endregion
+
+      #region Create operator graph
+      OperatorGraph.InitialOperator = selector;
+      selector.Successor = subScopesProcessor1;
+      subScopesProcessor1.Operators.Add(new EmptyOperator());
+      subScopesProcessor1.Operators.Add(childrenCreator);
+      subScopesProcessor1.Successor = offspringSelector;
+      childrenCreator.Successor = osBeforeMutationBranch;
+      osBeforeMutationBranch.TrueBranch = uniformSubScopesProcessor1;
+      osBeforeMutationBranch.FalseBranch = uniformSubScopesProcessor5;
+      osBeforeMutationBranch.Successor = null;
+      uniformSubScopesProcessor1.Operator = crossover1;
+      uniformSubScopesProcessor1.Successor = uniformSubScopesProcessor2;
+      crossover1.Successor = null;
+      uniformSubScopesProcessor2.Operator = evaluator1;
+      uniformSubScopesProcessor2.Successor = subScopesCounter1;
+      evaluator1.Successor = qualityComparer1;
+      qualityComparer1.Successor = subScopesRemover1;
+      subScopesRemover1.Successor = null;
+      subScopesCounter1.Successor = uniformSubScopesProcessor3;
+      uniformSubScopesProcessor3.Operator = mutationBranch1;
+      uniformSubScopesProcessor3.Successor = conditionalSelector;
+      mutationBranch1.FirstBranch = mutator1;
+      mutationBranch1.SecondBranch = variableCreator2;
+      mutationBranch1.Successor = null;
+      mutator1.Successor = variableCreator1;
+      variableCreator1.Successor = null;
+      variableCreator2.Successor = null;
+      conditionalSelector.Successor = subScopesProcessor2;
+      subScopesProcessor2.Operators.Add(new EmptyOperator());
+      subScopesProcessor2.Operators.Add(uniformSubScopesProcessor4);
+      subScopesProcessor2.Successor = mergingReducer1;
+      uniformSubScopesProcessor4.Operator = evaluator2;
+      uniformSubScopesProcessor4.Successor = subScopesCounter2;
+      evaluator2.Successor = null;
+      subScopesCounter2.Successor = null;
+      mergingReducer1.Successor = null;
+      uniformSubScopesProcessor5.Operator = crossover2;
+      uniformSubScopesProcessor5.Successor = uniformSubScopesProcessor6;
+      crossover2.Successor = mutationBranch2;
+      mutationBranch2.FirstBranch = mutator2;
+      mutationBranch2.SecondBranch = null;
+      mutationBranch2.Successor = null;
+      mutator2.Successor = null;
+      uniformSubScopesProcessor6.Operator = evaluator3;
+      uniformSubScopesProcessor6.Successor = subScopesCounter3;
+      evaluator3.Successor = qualityComparer2;
+      qualityComparer2.Successor = subScopesRemover2;
+      subScopesRemover2.Successor = null;
+      subScopesCounter3.Successor = null;
+      offspringSelector.OffspringCreator = selector;
+      offspringSelector.Successor = subScopesProcessor3;
+      subScopesProcessor3.Operators.Add(bestSelector);
+      subScopesProcessor3.Operators.Add(worstSelector);
+      subScopesProcessor3.Successor = mergingReducer2;
+      bestSelector.Successor = rightReducer;
+      rightReducer.Successor = null;
+      worstSelector.Successor = leftReducer;
+      leftReducer.Successor = null;
+      mergingReducer2.Successor = null;
+      #endregion
+    }
+
+    public override IOperation Apply() {
+      if (CrossoverParameter.ActualValue == null)
+        return null;
+      return base.Apply();
+    }
+  }
+}
Index: /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/Plugin.cs.frame
===================================================================
--- /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/Plugin.cs.frame	(revision 9065)
+++ /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/Plugin.cs.frame	(revision 9065)
@@ -0,0 +1,44 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
+  /// <summary>
+  /// Plugin class for HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm plugin.
+  /// </summary>
+  [Plugin("HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm", "3.3.7.$WCREV$")]
+  [PluginFile("HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "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.Selection", "3.3")]
+  public class HeuristicLabAlgorithmsOffspringSelectionGeneticAlgorithmPlugin : PluginBase {
+  }
+}
Index: /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/Properties/AssemblyInfo.cs.frame	(revision 9065)
+++ /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/Properties/AssemblyInfo.cs.frame	(revision 9065)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.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("HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm")]
+[assembly: AssemblyDescription("HeuristicLab offspring selection genetic algorithm")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2012 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("9983dbc5-e457-4d90-9f21-ff6a623f8e5c")]
+
+// 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.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.7.$WCREV$")]
Index: /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs
===================================================================
--- /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs	(revision 9065)
+++ /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs	(revision 9065)
@@ -0,0 +1,581 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Linq;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
+  /// <summary>
+  /// The self-adaptive segregative genetic algorithm with simulated annealing aspects (Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications. CRC Press).
+  /// </summary>
+  [Item("SASEGASA", "The self-adaptive segregative genetic algorithm with simulated annealing aspects (Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications. CRC Press).")]
+  [Creatable("Algorithms")]
+  [StorableClass]
+  public sealed class SASEGASA : HeuristicOptimizationEngineAlgorithm, IStorableContent {
+    public string Filename { get; set; }
+
+    #region Problem Properties
+    public override Type ProblemType {
+      get { return typeof(ISingleObjectiveHeuristicOptimizationProblem); }
+    }
+    public new ISingleObjectiveHeuristicOptimizationProblem Problem {
+      get { return (ISingleObjectiveHeuristicOptimizationProblem)base.Problem; }
+      set { base.Problem = value; }
+    }
+    #endregion
+
+    #region Parameter Properties
+    private ValueParameter<IntValue> SeedParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Seed"]; }
+    }
+    private ValueParameter<BoolValue> SetSeedRandomlyParameter {
+      get { return (ValueParameter<BoolValue>)Parameters["SetSeedRandomly"]; }
+    }
+    private ValueParameter<IntValue> NumberOfVillagesParameter {
+      get { return (ValueParameter<IntValue>)Parameters["NumberOfVillages"]; }
+    }
+    private ValueParameter<IntValue> PopulationSizeParameter {
+      get { return (ValueParameter<IntValue>)Parameters["PopulationSize"]; }
+    }
+    private ValueParameter<IntValue> MaximumGenerationsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaximumGenerations"]; }
+    }
+    public IConstrainedValueParameter<ISelector> SelectorParameter {
+      get { return (IConstrainedValueParameter<ISelector>)Parameters["Selector"]; }
+    }
+    public IConstrainedValueParameter<ICrossover> CrossoverParameter {
+      get { return (IConstrainedValueParameter<ICrossover>)Parameters["Crossover"]; }
+    }
+    private ValueParameter<PercentValue> MutationProbabilityParameter {
+      get { return (ValueParameter<PercentValue>)Parameters["MutationProbability"]; }
+    }
+    public IConstrainedValueParameter<IManipulator> MutatorParameter {
+      get { return (IConstrainedValueParameter<IManipulator>)Parameters["Mutator"]; }
+    }
+    private ValueParameter<IntValue> ElitesParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Elites"]; }
+    }
+    private ValueLookupParameter<DoubleValue> SuccessRatioParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["SuccessRatio"]; }
+    }
+    private ValueLookupParameter<DoubleValue> ComparisonFactorLowerBoundParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorLowerBound"]; }
+    }
+    private ValueLookupParameter<DoubleValue> ComparisonFactorUpperBoundParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorUpperBound"]; }
+    }
+    public IConstrainedValueParameter<IDiscreteDoubleValueModifier> ComparisonFactorModifierParameter {
+      get { return (IConstrainedValueParameter<IDiscreteDoubleValueModifier>)Parameters["ComparisonFactorModifier"]; }
+    }
+    private ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; }
+    }
+    private ValueLookupParameter<DoubleValue> FinalMaximumSelectionPressureParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["FinalMaximumSelectionPressure"]; }
+    }
+    private ValueLookupParameter<BoolValue> OffspringSelectionBeforeMutationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
+    }
+    private ValueLookupParameter<IntValue> SelectedParentsParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["SelectedParents"]; }
+    }
+    private ValueParameter<MultiAnalyzer> AnalyzerParameter {
+      get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
+    }
+    private ValueParameter<MultiAnalyzer> VillageAnalyzerParameter {
+      get { return (ValueParameter<MultiAnalyzer>)Parameters["VillageAnalyzer"]; }
+    }
+    private ValueParameter<IntValue> MaximumEvaluatedSolutionsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaximumEvaluatedSolutions"]; }
+    }
+    #endregion
+
+    #region Properties
+    public IntValue Seed {
+      get { return SeedParameter.Value; }
+      set { SeedParameter.Value = value; }
+    }
+    public BoolValue SetSeedRandomly {
+      get { return SetSeedRandomlyParameter.Value; }
+      set { SetSeedRandomlyParameter.Value = value; }
+    }
+    public IntValue NumberOfVillages {
+      get { return NumberOfVillagesParameter.Value; }
+      set { NumberOfVillagesParameter.Value = value; }
+    }
+    public IntValue PopulationSize {
+      get { return PopulationSizeParameter.Value; }
+      set { PopulationSizeParameter.Value = value; }
+    }
+    public IntValue MaximumGenerations {
+      get { return MaximumGenerationsParameter.Value; }
+      set { MaximumGenerationsParameter.Value = value; }
+    }
+    public ISelector Selector {
+      get { return SelectorParameter.Value; }
+      set { SelectorParameter.Value = value; }
+    }
+    public ICrossover Crossover {
+      get { return CrossoverParameter.Value; }
+      set { CrossoverParameter.Value = value; }
+    }
+    public PercentValue MutationProbability {
+      get { return MutationProbabilityParameter.Value; }
+      set { MutationProbabilityParameter.Value = value; }
+    }
+    public IManipulator Mutator {
+      get { return MutatorParameter.Value; }
+      set { MutatorParameter.Value = value; }
+    }
+    public IntValue Elites {
+      get { return ElitesParameter.Value; }
+      set { ElitesParameter.Value = value; }
+    }
+    public DoubleValue SuccessRatio {
+      get { return SuccessRatioParameter.Value; }
+      set { SuccessRatioParameter.Value = value; }
+    }
+    public DoubleValue ComparisonFactorLowerBound {
+      get { return ComparisonFactorLowerBoundParameter.Value; }
+      set { ComparisonFactorLowerBoundParameter.Value = value; }
+    }
+    public DoubleValue ComparisonFactorUpperBound {
+      get { return ComparisonFactorUpperBoundParameter.Value; }
+      set { ComparisonFactorUpperBoundParameter.Value = value; }
+    }
+    public IDiscreteDoubleValueModifier ComparisonFactorModifier {
+      get { return ComparisonFactorModifierParameter.Value; }
+      set { ComparisonFactorModifierParameter.Value = value; }
+    }
+    public DoubleValue MaximumSelectionPressure {
+      get { return MaximumSelectionPressureParameter.Value; }
+      set { MaximumSelectionPressureParameter.Value = value; }
+    }
+    public DoubleValue FinalMaximumSelectionPressure {
+      get { return FinalMaximumSelectionPressureParameter.Value; }
+      set { FinalMaximumSelectionPressureParameter.Value = value; }
+    }
+    public BoolValue OffspringSelectionBeforeMutation {
+      get { return OffspringSelectionBeforeMutationParameter.Value; }
+      set { OffspringSelectionBeforeMutationParameter.Value = value; }
+    }
+    public IntValue SelectedParents {
+      get { return SelectedParentsParameter.Value; }
+      set { SelectedParentsParameter.Value = value; }
+    }
+    public MultiAnalyzer Analyzer {
+      get { return AnalyzerParameter.Value; }
+      set { AnalyzerParameter.Value = value; }
+    }
+    public MultiAnalyzer VillageAnalyzer {
+      get { return VillageAnalyzerParameter.Value; }
+      set { VillageAnalyzerParameter.Value = value; }
+    }
+    public IntValue MaximumEvaluatedSolutions {
+      get { return MaximumEvaluatedSolutionsParameter.Value; }
+      set { MaximumEvaluatedSolutionsParameter.Value = value; }
+    }
+    private RandomCreator RandomCreator {
+      get { return (RandomCreator)OperatorGraph.InitialOperator; }
+    }
+    private UniformSubScopesProcessor VillageProcessor {
+      get { return ((RandomCreator.Successor as SubScopesCreator).Successor as UniformSubScopesProcessor); }
+    }
+    private SolutionsCreator SolutionsCreator {
+      get { return (SolutionsCreator)VillageProcessor.Operator; }
+    }
+    private SASEGASAMainLoop MainLoop {
+      get { return FindMainLoop(VillageProcessor.Successor); }
+    }
+    [Storable]
+    private BestAverageWorstQualityAnalyzer villageQualityAnalyzer;
+    [Storable]
+    private BestAverageWorstQualityAnalyzer qualityAnalyzer;
+    [Storable]
+    private ValueAnalyzer villageSelectionPressureAnalyzer;
+    [Storable]
+    private ValueAnalyzer selectionPressureAnalyzer;
+    [Storable]
+    private SuccessfulOffspringAnalyzer successfulOffspringAnalyzer;
+    #endregion
+
+    [StorableConstructor]
+    private SASEGASA(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      #region Backwards Compatibility
+      if (successfulOffspringAnalyzer == null)
+        successfulOffspringAnalyzer = new SuccessfulOffspringAnalyzer();
+      #endregion
+
+      Initialize();
+    }
+    private SASEGASA(SASEGASA original, Cloner cloner)
+      : base(original, cloner) {
+      qualityAnalyzer = cloner.Clone(original.qualityAnalyzer);
+      villageQualityAnalyzer = cloner.Clone(original.villageQualityAnalyzer);
+      selectionPressureAnalyzer = cloner.Clone(original.selectionPressureAnalyzer);
+      villageSelectionPressureAnalyzer = cloner.Clone(original.villageSelectionPressureAnalyzer);
+      successfulOffspringAnalyzer = cloner.Clone(original.successfulOffspringAnalyzer);
+      Initialize();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SASEGASA(this, cloner);
+    }
+    public SASEGASA()
+      : base() {
+      Parameters.Add(new ValueParameter<IntValue>("Seed", "The random seed used to initialize the new pseudo random number generator.", new IntValue(0)));
+      Parameters.Add(new ValueParameter<BoolValue>("SetSeedRandomly", "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true)));
+      Parameters.Add(new ValueParameter<IntValue>("NumberOfVillages", "The initial number of villages.", new IntValue(10)));
+      Parameters.Add(new ValueParameter<IntValue>("PopulationSize", "The size of the population of solutions.", new IntValue(100)));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumGenerations", "The maximum number of generations that should be processed.", new IntValue(1000)));
+      Parameters.Add(new ConstrainedValueParameter<ISelector>("Selector", "The operator used to select solutions for reproduction."));
+      Parameters.Add(new ConstrainedValueParameter<ICrossover>("Crossover", "The operator used to cross solutions."));
+      Parameters.Add(new ValueParameter<PercentValue>("MutationProbability", "The probability that the mutation operator is applied on a solution.", new PercentValue(0.05)));
+      Parameters.Add(new OptionalConstrainedValueParameter<IManipulator>("Mutator", "The operator used to mutate solutions."));
+      Parameters.Add(new ValueParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation.", new IntValue(1)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful to total children that should be achieved.", new DoubleValue(1)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorLowerBound", "The lower bound of the comparison factor (start).", new DoubleValue(0.3)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorUpperBound", "The upper bound of the comparison factor (end).", new DoubleValue(0.7)));
+      Parameters.Add(new OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>("ComparisonFactorModifier", "The operator used to modify the comparison factor.", new ItemSet<IDiscreteDoubleValueModifier>(new IDiscreteDoubleValueModifier[] { new LinearDiscreteDoubleValueModifier() }), new LinearDiscreteDoubleValueModifier()));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure that terminates the algorithm.", new DoubleValue(100)));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("FinalMaximumSelectionPressure", "The maximum selection pressure used when there is only one village left.", new DoubleValue(100)));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation.", new BoolValue(false)));
+      Parameters.Add(new ValueLookupParameter<IntValue>("SelectedParents", "How much parents should be selected each time the offspring selection step is performed until the population is filled. This parameter should be about the same or twice the size of PopulationSize for smaller problems, and less for large problems.", new IntValue(200)));
+      Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze the villages.", new MultiAnalyzer()));
+      Parameters.Add(new ValueParameter<MultiAnalyzer>("VillageAnalyzer", "The operator used to analyze each village.", new MultiAnalyzer()));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumEvaluatedSolutions", "The maximum number of evaluated solutions (approximately).", new IntValue(int.MaxValue)));
+
+      RandomCreator randomCreator = new RandomCreator();
+      SubScopesCreator populationCreator = new SubScopesCreator();
+      UniformSubScopesProcessor ussp1 = new UniformSubScopesProcessor();
+      SolutionsCreator solutionsCreator = new SolutionsCreator();
+      VariableCreator variableCreator = new VariableCreator();
+      UniformSubScopesProcessor ussp2 = new UniformSubScopesProcessor();
+      SubScopesCounter subScopesCounter = new SubScopesCounter();
+      ResultsCollector resultsCollector = new ResultsCollector();
+      SASEGASAMainLoop mainLoop = new SASEGASAMainLoop();
+      OperatorGraph.InitialOperator = randomCreator;
+
+      randomCreator.RandomParameter.ActualName = "Random";
+      randomCreator.SeedParameter.ActualName = SeedParameter.Name;
+      randomCreator.SeedParameter.Value = null;
+      randomCreator.SetSeedRandomlyParameter.ActualName = SetSeedRandomlyParameter.Name;
+      randomCreator.SetSeedRandomlyParameter.Value = null;
+      randomCreator.Successor = populationCreator;
+
+      populationCreator.NumberOfSubScopesParameter.ActualName = NumberOfVillagesParameter.Name;
+      populationCreator.Successor = ussp1;
+
+      ussp1.Operator = solutionsCreator;
+      ussp1.Successor = variableCreator;
+
+      solutionsCreator.NumberOfSolutionsParameter.ActualName = PopulationSizeParameter.Name;
+      solutionsCreator.Successor = null;
+
+      variableCreator.Name = "Initialize EvaluatedSolutions";
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("EvaluatedSolutions", new IntValue()));
+      variableCreator.Successor = ussp2;
+
+      ussp2.Operator = subScopesCounter;
+      ussp2.Successor = resultsCollector;
+
+      subScopesCounter.Name = "Increment EvaluatedSolutions";
+      subScopesCounter.ValueParameter.ActualName = "EvaluatedSolutions";
+
+      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", "", "EvaluatedSolutions"));
+      resultsCollector.ResultsParameter.ActualName = "Results";
+      resultsCollector.Successor = mainLoop;
+
+      mainLoop.NumberOfVillagesParameter.ActualName = NumberOfVillagesParameter.Name;
+      mainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
+      mainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name;
+      mainLoop.ElitesParameter.ActualName = ElitesParameter.Name;
+      mainLoop.MutatorParameter.ActualName = MutatorParameter.Name;
+      mainLoop.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
+      mainLoop.RandomParameter.ActualName = randomCreator.RandomParameter.ActualName;
+      mainLoop.ResultsParameter.ActualName = "Results";
+      mainLoop.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
+      mainLoop.ComparisonFactorStartParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
+      mainLoop.ComparisonFactorModifierParameter.ActualName = ComparisonFactorModifierParameter.Name;
+      mainLoop.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
+      mainLoop.FinalMaximumSelectionPressureParameter.ActualName = FinalMaximumSelectionPressureParameter.Name;
+      mainLoop.MaximumGenerationsParameter.ActualName = MaximumGenerationsParameter.Name;
+      mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
+      mainLoop.EvaluatedSolutionsParameter.ActualName = "EvaluatedSolutions";
+      mainLoop.Successor = null;
+
+      foreach (ISelector selector in ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name))
+        SelectorParameter.ValidValues.Add(selector);
+      ISelector proportionalSelector = SelectorParameter.ValidValues.FirstOrDefault(x => x.GetType().Name.Equals("ProportionalSelector"));
+      if (proportionalSelector != null) SelectorParameter.Value = proportionalSelector;
+
+      ParameterizeSelectors();
+
+      foreach (IDiscreteDoubleValueModifier modifier in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name))
+        ComparisonFactorModifierParameter.ValidValues.Add(modifier);
+      IDiscreteDoubleValueModifier linearModifier = ComparisonFactorModifierParameter.ValidValues.FirstOrDefault(x => x.GetType().Name.Equals("LinearDiscreteDoubleValueModifier"));
+      if (linearModifier != null) ComparisonFactorModifierParameter.Value = linearModifier;
+      ParameterizeComparisonFactorModifiers();
+
+      qualityAnalyzer = new BestAverageWorstQualityAnalyzer();
+      villageQualityAnalyzer = new BestAverageWorstQualityAnalyzer();
+      selectionPressureAnalyzer = new ValueAnalyzer();
+      villageSelectionPressureAnalyzer = new ValueAnalyzer();
+      successfulOffspringAnalyzer = new SuccessfulOffspringAnalyzer();
+      ParameterizeAnalyzers();
+      UpdateAnalyzers();
+
+      Initialize();
+    }
+
+    public override void Prepare() {
+      if (Problem != null) base.Prepare();
+    }
+
+    #region Events
+    protected override void OnProblemChanged() {
+      ParameterizeStochasticOperator(Problem.SolutionCreator);
+      ParameterizeStochasticOperator(Problem.Evaluator);
+      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
+      ParameterizeSolutionsCreator();
+      ParameterizeMainLoop();
+      ParameterizeSelectors();
+      ParameterizeAnalyzers();
+      ParameterizeIterationBasedOperators();
+      UpdateCrossovers();
+      UpdateMutators();
+      UpdateAnalyzers();
+      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      base.OnProblemChanged();
+    }
+
+    protected override void Problem_SolutionCreatorChanged(object sender, EventArgs e) {
+      ParameterizeStochasticOperator(Problem.SolutionCreator);
+      ParameterizeSolutionsCreator();
+      base.Problem_SolutionCreatorChanged(sender, e);
+    }
+    protected override void Problem_EvaluatorChanged(object sender, EventArgs e) {
+      ParameterizeStochasticOperator(Problem.Evaluator);
+      ParameterizeSolutionsCreator();
+      ParameterizeMainLoop();
+      ParameterizeSelectors();
+      ParameterizeAnalyzers();
+      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      base.Problem_EvaluatorChanged(sender, e);
+    }
+    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
+      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
+      ParameterizeIterationBasedOperators();
+      UpdateCrossovers();
+      UpdateMutators();
+      UpdateAnalyzers();
+      base.Problem_OperatorsChanged(sender, e);
+    }
+    private void ElitesParameter_ValueChanged(object sender, EventArgs e) {
+      Elites.ValueChanged += new EventHandler(Elites_ValueChanged);
+      ParameterizeSelectors();
+    }
+    private void Elites_ValueChanged(object sender, EventArgs e) {
+      ParameterizeSelectors();
+    }
+    private void PopulationSizeParameter_ValueChanged(object sender, EventArgs e) {
+      NumberOfVillages.ValueChanged += new EventHandler(PopulationSize_ValueChanged);
+      ParameterizeSelectors();
+    }
+    private void PopulationSize_ValueChanged(object sender, EventArgs e) {
+      ParameterizeSelectors();
+    }
+    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeMainLoop();
+      ParameterizeSelectors();
+      ParameterizeAnalyzers();
+    }
+    private void MaximumGenerationsParameter_ValueChanged(object sender, EventArgs e) {
+      MaximumGenerations.ValueChanged += new EventHandler(MaximumGenerations_ValueChanged);
+      MaximumGenerations_ValueChanged(sender, e);
+    }
+    private void MaximumGenerations_ValueChanged(object sender, EventArgs e) {
+      if (MaximumGenerations.Value < NumberOfVillages.Value) NumberOfVillages.Value = MaximumGenerations.Value;
+      ParameterizeMainLoop();
+    }
+    private void NumberOfVillagesParameter_ValueChanged(object sender, EventArgs e) {
+      NumberOfVillages.ValueChanged += new EventHandler(NumberOfVillages_ValueChanged);
+      NumberOfVillages_ValueChanged(sender, e);
+    }
+    private void NumberOfVillages_ValueChanged(object sender, EventArgs e) {
+      if (NumberOfVillages.Value > MaximumGenerations.Value) MaximumGenerations.Value = NumberOfVillages.Value;
+      ParameterizeComparisonFactorModifiers();
+      ParameterizeMainLoop();
+    }
+    #endregion
+
+    #region Helpers
+    private void Initialize() {
+      NumberOfVillagesParameter.ValueChanged += new EventHandler(NumberOfVillagesParameter_ValueChanged);
+      NumberOfVillages.ValueChanged += new EventHandler(NumberOfVillages_ValueChanged);
+      PopulationSizeParameter.ValueChanged += new EventHandler(PopulationSizeParameter_ValueChanged);
+      PopulationSize.ValueChanged += new EventHandler(PopulationSize_ValueChanged);
+      ElitesParameter.ValueChanged += new EventHandler(ElitesParameter_ValueChanged);
+      Elites.ValueChanged += new EventHandler(Elites_ValueChanged);
+      MaximumGenerationsParameter.ValueChanged += new EventHandler(MaximumGenerationsParameter_ValueChanged);
+      MaximumGenerations.ValueChanged += new EventHandler(MaximumGenerations_ValueChanged);
+      if (Problem != null) {
+        Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      }
+    }
+    private void ParameterizeSolutionsCreator() {
+      SolutionsCreator.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
+      SolutionsCreator.SolutionCreatorParameter.ActualName = Problem.SolutionCreatorParameter.Name;
+    }
+    private void ParameterizeMainLoop() {
+      MainLoop.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
+      MainLoop.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
+      MainLoop.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+      MainLoop.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+      MainLoop.MigrationIntervalParameter.Value = new IntValue(MaximumGenerations.Value / NumberOfVillages.Value);
+    }
+    private void ParameterizeStochasticOperator(IOperator op) {
+      if (op is IStochasticOperator)
+        ((IStochasticOperator)op).RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
+    }
+    private void ParameterizeSelectors() {
+      foreach (ISelector selector in SelectorParameter.ValidValues) {
+        selector.CopySelected = new BoolValue(true);
+        selector.NumberOfSelectedSubScopesParameter.Value = null;
+        selector.NumberOfSelectedSubScopesParameter.ActualName = SelectedParentsParameter.Name;
+        ParameterizeStochasticOperator(selector);
+      }
+      if (Problem != null) {
+        foreach (ISingleObjectiveSelector selector in SelectorParameter.ValidValues.OfType<ISingleObjectiveSelector>()) {
+          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        }
+      }
+    }
+    private void ParameterizeAnalyzers() {
+      villageQualityAnalyzer.ResultsParameter.ActualName = "Results";
+      villageQualityAnalyzer.QualityParameter.Depth = 1;
+      qualityAnalyzer.ResultsParameter.ActualName = "Results";
+      qualityAnalyzer.QualityParameter.Depth = 2;
+
+      villageSelectionPressureAnalyzer.ResultsParameter.ActualName = "Results";
+      villageSelectionPressureAnalyzer.Name = "SelectionPressure Analyzer";
+      villageSelectionPressureAnalyzer.ValueParameter.Depth = 0;
+      villageSelectionPressureAnalyzer.ValueParameter.ActualName = "SelectionPressure";
+      villageSelectionPressureAnalyzer.ValuesParameter.ActualName = "Selection Pressure History";
+
+      selectionPressureAnalyzer.ResultsParameter.ActualName = "Results";
+      selectionPressureAnalyzer.Name = "SelectionPressure Analyzer";
+      selectionPressureAnalyzer.ValueParameter.Depth = 1;
+      selectionPressureAnalyzer.ValueParameter.ActualName = "SelectionPressure";
+      selectionPressureAnalyzer.ValuesParameter.ActualName = "Selection Pressure History";
+
+      successfulOffspringAnalyzer.ResultsParameter.ActualName = "Results";
+      successfulOffspringAnalyzer.GenerationsParameter.ActualName = "Generations";
+      successfulOffspringAnalyzer.SuccessfulOffspringFlagParameter.Value.Value = "SuccessfulOffspring";
+      successfulOffspringAnalyzer.DepthParameter.Value = new IntValue(2);
+
+      if (Problem != null) {
+        villageQualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+        villageQualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        villageQualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
+
+        qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+        qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
+      }
+    }
+    private void ParameterizeComparisonFactorModifiers() {
+      foreach (IDiscreteDoubleValueModifier modifier in ComparisonFactorModifierParameter.ValidValues) {
+        modifier.IndexParameter.ActualName = "Reunifications";
+        modifier.StartIndexParameter.Value = new IntValue(0);
+        modifier.StartValueParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
+        modifier.EndIndexParameter.Value = new IntValue(NumberOfVillages.Value - 1);
+        modifier.EndValueParameter.ActualName = ComparisonFactorUpperBoundParameter.Name;
+        modifier.ValueParameter.ActualName = "ComparisonFactor";
+      }
+    }
+    private void ParameterizeIterationBasedOperators() {
+      if (Problem != null) {
+        foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) {
+          op.IterationsParameter.ActualName = "Generations";
+          op.MaximumIterationsParameter.ActualName = MaximumGenerationsParameter.Name;
+        }
+      }
+    }
+    private void UpdateCrossovers() {
+      ICrossover oldCrossover = CrossoverParameter.Value;
+      CrossoverParameter.ValidValues.Clear();
+      foreach (ICrossover crossover in Problem.Operators.OfType<ICrossover>().OrderBy(x => x.Name))
+        CrossoverParameter.ValidValues.Add(crossover);
+      if (oldCrossover != null) {
+        ICrossover crossover = CrossoverParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldCrossover.GetType());
+        if (crossover != null) CrossoverParameter.Value = crossover;
+      }
+    }
+    private void UpdateMutators() {
+      IManipulator oldMutator = MutatorParameter.Value;
+      MutatorParameter.ValidValues.Clear();
+      foreach (IManipulator mutator in Problem.Operators.OfType<IManipulator>().OrderBy(x => x.Name))
+        MutatorParameter.ValidValues.Add(mutator);
+      if (oldMutator != null) {
+        IManipulator mutator = MutatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldMutator.GetType());
+        if (mutator != null) MutatorParameter.Value = mutator;
+      }
+    }
+    private void UpdateAnalyzers() {
+      VillageAnalyzer.Operators.Clear();
+      Analyzer.Operators.Clear();
+      VillageAnalyzer.Operators.Add(villageQualityAnalyzer, villageQualityAnalyzer.EnabledByDefault);
+      VillageAnalyzer.Operators.Add(villageSelectionPressureAnalyzer, villageSelectionPressureAnalyzer.EnabledByDefault);
+      if (Problem != null) {
+        foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>()) {
+          foreach (IScopeTreeLookupParameter param in analyzer.Parameters.OfType<IScopeTreeLookupParameter>())
+            param.Depth = 2;
+          Analyzer.Operators.Add(analyzer, analyzer.EnabledByDefault);
+        }
+      }
+      Analyzer.Operators.Add(qualityAnalyzer, qualityAnalyzer.EnabledByDefault);
+      Analyzer.Operators.Add(selectionPressureAnalyzer, selectionPressureAnalyzer.EnabledByDefault);
+      Analyzer.Operators.Add(successfulOffspringAnalyzer, successfulOffspringAnalyzer.EnabledByDefault);
+    }
+    private SASEGASAMainLoop FindMainLoop(IOperator start) {
+      IOperator mainLoop = start;
+      while (mainLoop != null && !(mainLoop is SASEGASAMainLoop))
+        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
+      if (mainLoop == null) return null;
+      else return (SASEGASAMainLoop)mainLoop;
+    }
+    #endregion
+  }
+}
Index: /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs
===================================================================
--- /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs	(revision 9065)
+++ /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs	(revision 9065)
@@ -0,0 +1,432 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
+  /// <summary>
+  /// A SASEGASA main loop operator.
+  /// </summary>
+  [Item("SASEGASAMainLoop", "A SASEGASA main loop operator.")]
+  [StorableClass]
+  public sealed class SASEGASAMainLoop : AlgorithmOperator {
+    #region Parameter Properties
+    public ValueLookupParameter<IRandom> RandomParameter {
+      get { return (ValueLookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public ValueLookupParameter<IntValue> NumberOfVillagesParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["NumberOfVillages"]; }
+    }
+    public ValueLookupParameter<IntValue> MigrationIntervalParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["MigrationInterval"]; }
+    }
+    public ValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ValueLookupParameter<DoubleValue> BestKnownQualityParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
+    }
+    public ValueLookupParameter<IOperator> SelectorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Selector"]; }
+    }
+    public ValueLookupParameter<IOperator> CrossoverParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Crossover"]; }
+    }
+    public ValueLookupParameter<PercentValue> MutationProbabilityParameter {
+      get { return (ValueLookupParameter<PercentValue>)Parameters["MutationProbability"]; }
+    }
+    public ValueLookupParameter<IOperator> MutatorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Mutator"]; }
+    }
+    public ValueLookupParameter<IOperator> EvaluatorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Evaluator"]; }
+    }
+    public ValueLookupParameter<IntValue> ElitesParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["Elites"]; }
+    }
+    public ValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+    public ValueLookupParameter<IOperator> AnalyzerParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["Analyzer"]; }
+    }
+    public ValueLookupParameter<IOperator> VillageAnalyzerParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["VillageAnalyzer"]; }
+    }
+    public ValueLookupParameter<DoubleValue> SuccessRatioParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["SuccessRatio"]; }
+    }
+    public LookupParameter<DoubleValue> ComparisonFactorParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["ComparisonFactor"]; }
+    }
+    public ValueLookupParameter<DoubleValue> ComparisonFactorStartParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorStart"]; }
+    }
+    public ValueLookupParameter<IOperator> ComparisonFactorModifierParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["ComparisonFactorModifier"]; }
+    }
+    public ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; }
+    }
+    public ValueLookupParameter<DoubleValue> FinalMaximumSelectionPressureParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["FinalMaximumSelectionPressure"]; }
+    }
+    public ValueLookupParameter<IntValue> MaximumGenerationsParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["MaximumGenerations"]; }
+    }
+    public ValueLookupParameter<BoolValue> OffspringSelectionBeforeMutationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
+    }
+    public LookupParameter<IntValue> EvaluatedSolutionsParameter {
+      get { return (LookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SASEGASAMainLoop(bool deserializing) : base(deserializing) { }
+    private SASEGASAMainLoop(SASEGASAMainLoop original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SASEGASAMainLoop(this, cloner);
+    }
+    public SASEGASAMainLoop()
+      : base() {
+      #region Create parameters
+      Parameters.Add(new ValueLookupParameter<IRandom>("Random", "A pseudo random number generator."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The value which represents the quality of a solution."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("BestKnownQuality", "The best known quality value found so far."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfVillages", "The initial number of villages."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("MigrationInterval", "The fixed period after which migration occurs."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Selector", "The operator used to select solutions for reproduction."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Crossover", "The operator used to cross solutions."));
+      Parameters.Add(new ValueLookupParameter<PercentValue>("MutationProbability", "The probability that the mutation operator is applied on a solution."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Mutator", "The operator used to mutate solutions."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Evaluator", "The operator used to evaluate solutions. This operator is executed in parallel, if an engine is used which supports parallelization."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("Elites", "The numer of elite solutions which are kept in each generation."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The results collection to store the results."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("Analyzer", "The operator used to the analyze the villages."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("VillageAnalyzer", "The operator used to analyze each village."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful to total children that should be achieved."));
+      Parameters.Add(new LookupParameter<DoubleValue>("ComparisonFactor", "The comparison factor is used to determine whether the offspring should be compared to the better parent, the worse parent or a quality value linearly interpolated between them. It is in the range [0;1]."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorStart", "The lower bound of the comparison factor (start)."));
+      Parameters.Add(new ValueLookupParameter<IOperator>("ComparisonFactorModifier", "The operator used to modify the comparison factor."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure that terminates the algorithm."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("FinalMaximumSelectionPressure", "The maximum selection pressure used when there is only one village left."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumGenerations", "The maximum genreation that terminates the algorithm."));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation."));
+      Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of times solutions have been evaluated."));
+      #endregion
+
+      #region Create operators
+      VariableCreator variableCreator = new VariableCreator();
+      Assigner maxSelPressAssigner = new Assigner();
+      Assigner villageCountAssigner = new Assigner();
+      Assigner comparisonFactorInitializer = new Assigner();
+      UniformSubScopesProcessor uniformSubScopesProcessor0 = new UniformSubScopesProcessor();
+      VariableCreator villageVariableCreator = new VariableCreator();
+      Placeholder villageAnalyzer1 = new Placeholder();
+      ResultsCollector villageResultsCollector1 = new ResultsCollector();
+      Placeholder analyzer1 = new Placeholder();
+      ResultsCollector resultsCollector1 = new ResultsCollector();
+      UniformSubScopesProcessor uniformSubScopesProcessor1 = new UniformSubScopesProcessor();
+      ConditionalBranch villageTerminatedBySelectionPressure1 = new ConditionalBranch();
+      OffspringSelectionGeneticAlgorithmMainOperator mainOperator = new OffspringSelectionGeneticAlgorithmMainOperator();
+      Placeholder villageAnalyzer2 = new Placeholder();
+      ResultsCollector villageResultsCollector2 = new ResultsCollector();
+      Comparator villageSelectionPressureComparator = new Comparator();
+      ConditionalBranch villageTerminatedBySelectionPressure2 = new ConditionalBranch();
+      IntCounter terminatedVillagesCounter = new IntCounter();
+      IntCounter generationsCounter = new IntCounter();
+      IntCounter generationsSinceLastReunificationCounter = new IntCounter();
+      Comparator reunificationComparator1 = new Comparator();
+      ConditionalBranch reunificationConditionalBranch1 = new ConditionalBranch();
+      Comparator reunificationComparator2 = new Comparator();
+      ConditionalBranch reunificationConditionalBranch2 = new ConditionalBranch();
+      Comparator reunificationComparator3 = new Comparator();
+      ConditionalBranch reunificationConditionalBranch3 = new ConditionalBranch();
+      Assigner resetTerminatedVillagesAssigner = new Assigner();
+      Assigner resetGenerationsSinceLastReunificationAssigner = new Assigner();
+      SASEGASAReunificator reunificator = new SASEGASAReunificator();
+      IntCounter reunificationCounter = new IntCounter();
+      Placeholder comparisonFactorModifier = new Placeholder();
+      UniformSubScopesProcessor uniformSubScopesProcessor2 = new UniformSubScopesProcessor();
+      Assigner villageReviver = new Assigner();
+      Comparator villageCountComparator = new Comparator();
+      ConditionalBranch villageCountConditionalBranch = new ConditionalBranch();
+      Assigner finalMaxSelPressAssigner = new Assigner();
+      Comparator maximumGenerationsComparator = new Comparator();
+      Comparator maximumEvaluatedSolutionsComparator = new Comparator();
+      Placeholder analyzer2 = new Placeholder();
+      ConditionalBranch terminationCondition = new ConditionalBranch();
+      ConditionalBranch maximumGenerationsTerminationCondition = new ConditionalBranch();
+      ConditionalBranch maximumEvaluatedSolutionsTerminationCondition = new ConditionalBranch();
+
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Reunifications", new IntValue(0)));
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // Class SASEGASA expects this to be called Generations
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("GenerationsSinceLastReunification", new IntValue(0)));
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("TerminatedVillages", new IntValue(0)));
+
+      villageCountAssigner.LeftSideParameter.ActualName = "VillageCount";
+      villageCountAssigner.RightSideParameter.ActualName = NumberOfVillagesParameter.Name;
+
+      maxSelPressAssigner.LeftSideParameter.ActualName = "CurrentMaximumSelectionPressure";
+      maxSelPressAssigner.RightSideParameter.ActualName = MaximumSelectionPressureParameter.Name;
+
+      comparisonFactorInitializer.LeftSideParameter.ActualName = ComparisonFactorParameter.Name;
+      comparisonFactorInitializer.RightSideParameter.ActualName = ComparisonFactorStartParameter.Name;
+
+      villageVariableCreator.CollectedValues.Add(new ValueParameter<ResultCollection>("Results", new ResultCollection()));
+      villageVariableCreator.CollectedValues.Add(new ValueParameter<BoolValue>("TerminateSelectionPressure", new BoolValue(false)));
+      villageVariableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("SelectionPressure", new DoubleValue(0)));
+      villageVariableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("CurrentSuccessRatio", new DoubleValue(0)));
+
+      villageAnalyzer1.Name = "Village Analyzer (placeholder)";
+      villageAnalyzer1.OperatorParameter.ActualName = VillageAnalyzerParameter.Name;
+
+      villageResultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Success Ratio", "Indicates how many successful children were already found during a generation (relative to the population size).", "CurrentSuccessRatio"));
+      villageResultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Selection Pressure", "Displays the rising selection pressure during a generation.", "SelectionPressure"));
+      villageResultsCollector1.ResultsParameter.ActualName = "Results";
+
+      analyzer1.Name = "Analyzer (placeholder)";
+      analyzer1.OperatorParameter.ActualName = AnalyzerParameter.Name;
+
+      resultsCollector1.CopyValue = new BoolValue(false);
+      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Generations"));
+      resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("ComparisonFactor", null, ComparisonFactorParameter.Name));
+      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Terminated Villages", null, "TerminatedVillages"));
+      resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Total Active Villages", null, "VillageCount"));
+      resultsCollector1.CollectedValues.Add(new ScopeTreeLookupParameter<ResultCollection>("VillageResults", "Result set for each village", "Results"));
+      resultsCollector1.ResultsParameter.ActualName = ResultsParameter.Name;
+
+      villageTerminatedBySelectionPressure1.Name = "Village Terminated ?";
+      villageTerminatedBySelectionPressure1.ConditionParameter.ActualName = "TerminateSelectionPressure";
+
+      mainOperator.ComparisonFactorParameter.ActualName = ComparisonFactorParameter.Name;
+      mainOperator.CrossoverParameter.ActualName = CrossoverParameter.Name;
+      mainOperator.CurrentSuccessRatioParameter.ActualName = "CurrentSuccessRatio";
+      mainOperator.ElitesParameter.ActualName = ElitesParameter.Name;
+      mainOperator.EvaluatedSolutionsParameter.ActualName = EvaluatedSolutionsParameter.Name;
+      mainOperator.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
+      mainOperator.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      mainOperator.MaximumSelectionPressureParameter.ActualName = "CurrentMaximumSelectionPressure";
+      mainOperator.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
+      mainOperator.MutatorParameter.ActualName = MutatorParameter.Name;
+      mainOperator.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
+      mainOperator.QualityParameter.ActualName = QualityParameter.Name;
+      mainOperator.RandomParameter.ActualName = RandomParameter.Name;
+      mainOperator.SelectionPressureParameter.ActualName = "SelectionPressure";
+      mainOperator.SelectorParameter.ActualName = SelectorParameter.Name;
+      mainOperator.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
+
+      villageAnalyzer2.Name = "Village Analyzer (placeholder)";
+      villageAnalyzer2.OperatorParameter.ActualName = VillageAnalyzerParameter.Name;
+
+      villageResultsCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Success Ratio", "Indicates how many successful children were already found during a generation (relative to the population size).", "CurrentSuccessRatio"));
+      villageResultsCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Selection Pressure", "Displays the rising selection pressure during a generation.", "SelectionPressure"));
+      villageResultsCollector2.ResultsParameter.ActualName = "Results";
+
+      villageSelectionPressureComparator.Name = "SelectionPressure >= MaximumSelectionPressure ?";
+      villageSelectionPressureComparator.LeftSideParameter.ActualName = "SelectionPressure";
+      villageSelectionPressureComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
+      villageSelectionPressureComparator.RightSideParameter.ActualName = MaximumSelectionPressureParameter.Name;
+      villageSelectionPressureComparator.ResultParameter.ActualName = "TerminateSelectionPressure";
+
+      villageTerminatedBySelectionPressure2.Name = "Village Terminated ?";
+      villageTerminatedBySelectionPressure2.ConditionParameter.ActualName = "TerminateSelectionPressure";
+
+      terminatedVillagesCounter.Name = "TerminatedVillages + 1";
+      terminatedVillagesCounter.ValueParameter.ActualName = "TerminatedVillages";
+      terminatedVillagesCounter.Increment = new IntValue(1);
+
+      generationsCounter.Name = "Generations + 1";
+      generationsCounter.ValueParameter.ActualName = "Generations";
+      generationsCounter.Increment = new IntValue(1);
+
+      generationsSinceLastReunificationCounter.Name = "GenerationsSinceLastReunification + 1";
+      generationsSinceLastReunificationCounter.ValueParameter.ActualName = "GenerationsSinceLastReunification";
+      generationsSinceLastReunificationCounter.Increment = new IntValue(1);
+
+      reunificationComparator1.Name = "TerminatedVillages = VillageCount ?";
+      reunificationComparator1.LeftSideParameter.ActualName = "TerminatedVillages";
+      reunificationComparator1.Comparison = new Comparison(ComparisonType.Equal);
+      reunificationComparator1.RightSideParameter.ActualName = "VillageCount";
+      reunificationComparator1.ResultParameter.ActualName = "Reunificate";
+
+      reunificationConditionalBranch1.Name = "Reunificate ?";
+      reunificationConditionalBranch1.ConditionParameter.ActualName = "Reunificate";
+
+      reunificationComparator2.Name = "GenerationsSinceLastReunification = MigrationInterval ?";
+      reunificationComparator2.LeftSideParameter.ActualName = "GenerationsSinceLastReunification";
+      reunificationComparator2.Comparison = new Comparison(ComparisonType.Equal);
+      reunificationComparator2.RightSideParameter.ActualName = "MigrationInterval";
+      reunificationComparator2.ResultParameter.ActualName = "Reunificate";
+
+      reunificationConditionalBranch2.Name = "Reunificate ?";
+      reunificationConditionalBranch2.ConditionParameter.ActualName = "Reunificate";
+
+      // if there's just one village left and we're getting to this point SASEGASA terminates
+      reunificationComparator3.Name = "VillageCount <= 1 ?";
+      reunificationComparator3.LeftSideParameter.ActualName = "VillageCount";
+      reunificationComparator3.RightSideParameter.Value = new IntValue(1);
+      reunificationComparator3.Comparison.Value = ComparisonType.LessOrEqual;
+      reunificationComparator3.ResultParameter.ActualName = "TerminateSASEGASA";
+
+      reunificationConditionalBranch3.Name = "Skip reunification?";
+      reunificationConditionalBranch3.ConditionParameter.ActualName = "TerminateSASEGASA";
+
+      resetTerminatedVillagesAssigner.Name = "Reset TerminatedVillages";
+      resetTerminatedVillagesAssigner.LeftSideParameter.ActualName = "TerminatedVillages";
+      resetTerminatedVillagesAssigner.RightSideParameter.Value = new IntValue(0);
+
+      resetGenerationsSinceLastReunificationAssigner.Name = "Reset GenerationsSinceLastReunification";
+      resetGenerationsSinceLastReunificationAssigner.LeftSideParameter.ActualName = "GenerationsSinceLastReunification";
+      resetGenerationsSinceLastReunificationAssigner.RightSideParameter.Value = new IntValue(0);
+
+      reunificator.VillageCountParameter.ActualName = "VillageCount";
+
+      reunificationCounter.ValueParameter.ActualName = "Reunifications"; // this variable is referenced in SASEGASA, do not change!
+      reunificationCounter.IncrementParameter.Value = new IntValue(1);
+
+      comparisonFactorModifier.Name = "Update comparison factor (placeholder)";
+      comparisonFactorModifier.OperatorParameter.ActualName = ComparisonFactorModifierParameter.Name;
+
+      villageReviver.Name = "Village Reviver";
+      villageReviver.LeftSideParameter.ActualName = "TerminateSelectionPressure";
+      villageReviver.RightSideParameter.Value = new BoolValue(false);
+
+      villageCountComparator.Name = "VillageCount == 1 ?";
+      villageCountComparator.LeftSideParameter.ActualName = "VillageCount";
+      villageCountComparator.RightSideParameter.Value = new IntValue(1);
+      villageCountComparator.Comparison.Value = ComparisonType.Equal;
+      villageCountComparator.ResultParameter.ActualName = "ChangeMaxSelPress";
+
+      villageCountConditionalBranch.Name = "Change max selection pressure?";
+      villageCountConditionalBranch.ConditionParameter.ActualName = "ChangeMaxSelPress";
+
+      finalMaxSelPressAssigner.LeftSideParameter.ActualName = "CurrentMaximumSelectionPressure";
+      finalMaxSelPressAssigner.RightSideParameter.ActualName = FinalMaximumSelectionPressureParameter.Name;
+
+      // if Generations is reaching MaximumGenerations we're also terminating
+      maximumGenerationsComparator.LeftSideParameter.ActualName = "Generations";
+      maximumGenerationsComparator.RightSideParameter.ActualName = MaximumGenerationsParameter.Name;
+      maximumGenerationsComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
+      maximumGenerationsComparator.ResultParameter.ActualName = "TerminateMaximumGenerations";
+
+      maximumEvaluatedSolutionsComparator.Name = "EvaluatedSolutions >= MaximumEvaluatedSolutions";
+      maximumEvaluatedSolutionsComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
+      maximumEvaluatedSolutionsComparator.LeftSideParameter.ActualName = EvaluatedSolutionsParameter.Name;
+      maximumEvaluatedSolutionsComparator.ResultParameter.ActualName = "TerminateEvaluatedSolutions";
+      maximumEvaluatedSolutionsComparator.RightSideParameter.ActualName = "MaximumEvaluatedSolutions";
+
+      analyzer2.Name = "Analyzer (placeholder)";
+      analyzer2.OperatorParameter.ActualName = AnalyzerParameter.Name;
+
+      terminationCondition.ConditionParameter.ActualName = "TerminateSASEGASA";
+      maximumGenerationsTerminationCondition.ConditionParameter.ActualName = "TerminateMaximumGenerations";
+      maximumEvaluatedSolutionsTerminationCondition.ConditionParameter.ActualName = "TerminateEvaluatedSolutions";
+      #endregion
+
+      #region Create operator graph
+      OperatorGraph.InitialOperator = variableCreator;
+      variableCreator.Successor = maxSelPressAssigner;
+      maxSelPressAssigner.Successor = villageCountAssigner;
+      villageCountAssigner.Successor = comparisonFactorInitializer;
+      comparisonFactorInitializer.Successor = uniformSubScopesProcessor0;
+      uniformSubScopesProcessor0.Operator = villageVariableCreator;
+      uniformSubScopesProcessor0.Successor = analyzer1;
+      villageVariableCreator.Successor = villageAnalyzer1;
+      villageAnalyzer1.Successor = villageResultsCollector1;
+      analyzer1.Successor = resultsCollector1;
+      resultsCollector1.Successor = uniformSubScopesProcessor1;
+      uniformSubScopesProcessor1.Operator = villageTerminatedBySelectionPressure1;
+      uniformSubScopesProcessor1.Successor = generationsCounter;
+      villageTerminatedBySelectionPressure1.TrueBranch = null;
+      villageTerminatedBySelectionPressure1.FalseBranch = mainOperator;
+      villageTerminatedBySelectionPressure1.Successor = null;
+      mainOperator.Successor = villageAnalyzer2;
+      villageAnalyzer2.Successor = villageResultsCollector2;
+      villageResultsCollector2.Successor = villageSelectionPressureComparator;
+      villageSelectionPressureComparator.Successor = villageTerminatedBySelectionPressure2;
+      villageTerminatedBySelectionPressure2.TrueBranch = terminatedVillagesCounter;
+      villageTerminatedBySelectionPressure2.FalseBranch = null;
+      villageTerminatedBySelectionPressure2.Successor = null;
+      terminatedVillagesCounter.Successor = null;
+      generationsCounter.Successor = generationsSinceLastReunificationCounter;
+      generationsSinceLastReunificationCounter.Successor = reunificationComparator1;
+      reunificationComparator1.Successor = reunificationConditionalBranch1;
+      reunificationConditionalBranch1.TrueBranch = reunificationComparator3;
+      reunificationConditionalBranch1.FalseBranch = reunificationComparator2;
+      reunificationConditionalBranch1.Successor = maximumGenerationsComparator;
+      reunificationComparator2.Successor = reunificationConditionalBranch2;
+      reunificationConditionalBranch2.TrueBranch = reunificationComparator3;
+      reunificationConditionalBranch2.FalseBranch = null;
+      reunificationConditionalBranch2.Successor = null;
+      reunificationComparator3.Successor = reunificationConditionalBranch3;
+      reunificationConditionalBranch3.TrueBranch = null;
+      reunificationConditionalBranch3.FalseBranch = resetTerminatedVillagesAssigner;
+      reunificationConditionalBranch3.Successor = null;
+      resetTerminatedVillagesAssigner.Successor = resetGenerationsSinceLastReunificationAssigner;
+      resetGenerationsSinceLastReunificationAssigner.Successor = reunificator;
+      reunificator.Successor = reunificationCounter;
+      reunificationCounter.Successor = comparisonFactorModifier;
+      comparisonFactorModifier.Successor = uniformSubScopesProcessor2;
+      uniformSubScopesProcessor2.Operator = villageReviver;
+      uniformSubScopesProcessor2.Successor = villageCountComparator;
+      villageReviver.Successor = null;
+      villageCountComparator.Successor = villageCountConditionalBranch;
+      villageCountConditionalBranch.TrueBranch = finalMaxSelPressAssigner;
+      villageCountConditionalBranch.FalseBranch = null;
+      villageCountConditionalBranch.Successor = null;
+      finalMaxSelPressAssigner.Successor = null;
+      maximumGenerationsComparator.Successor = maximumEvaluatedSolutionsComparator;
+      maximumEvaluatedSolutionsComparator.Successor = analyzer2;
+      analyzer2.Successor = terminationCondition;
+      terminationCondition.TrueBranch = null;
+      terminationCondition.FalseBranch = maximumGenerationsTerminationCondition;
+      terminationCondition.Successor = null;
+      maximumGenerationsTerminationCondition.TrueBranch = null;
+      maximumGenerationsTerminationCondition.FalseBranch = maximumEvaluatedSolutionsTerminationCondition;
+      maximumGenerationsTerminationCondition.Successor = null;
+      maximumEvaluatedSolutionsTerminationCondition.TrueBranch = null;
+      maximumEvaluatedSolutionsTerminationCondition.FalseBranch = uniformSubScopesProcessor1;
+      maximumEvaluatedSolutionsTerminationCondition.Successor = null;
+      #endregion
+    }
+
+    public override IOperation Apply() {
+      if (CrossoverParameter.ActualValue == null)
+        return null;
+      return base.Apply();
+    }
+  }
+}
Index: /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SuccessfulOffspringAnalysis/SuccessfulOffspringAnalyzer.cs
===================================================================
--- /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SuccessfulOffspringAnalysis/SuccessfulOffspringAnalyzer.cs	(revision 9065)
+++ /branches/DataAnalysis.IslandAlgorithms/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SuccessfulOffspringAnalysis/SuccessfulOffspringAnalyzer.cs	(revision 9065)
@@ -0,0 +1,171 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.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.OffspringSelectionGeneticAlgorithm {
+  /// <summary>
+  /// An operator for analyzing the solution diversity in a population.
+  /// </summary>
+  [Item("SuccessfulOffspringAnalyzer", "An operator for analyzing certain properties in the successful offspring. The properties to be analyzed can be specified in the CollectedValues parameter.")]
+  [StorableClass]
+  public sealed class SuccessfulOffspringAnalyzer : SingleSuccessorOperator, IAnalyzer {
+    public bool EnabledByDefault {
+      get { return false; }
+    }
+
+    public ValueParameter<StringValue> SuccessfulOffspringFlagParameter {
+      get { return (ValueParameter<StringValue>)Parameters["SuccessfulOffspringFlag"]; }
+    }
+
+    public ValueParameter<ItemCollection<StringValue>> CollectedValuesParameter {
+      get { return (ValueParameter<ItemCollection<StringValue>>)Parameters["CollectedValues"]; }
+    }
+
+    public ValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+
+    public LookupParameter<ResultCollection> SuccessfulOffspringAnalysisParameter {
+      get { return (LookupParameter<ResultCollection>)Parameters["SuccessfulOffspringAnalysis"]; }
+    }
+
+    public ILookupParameter<IntValue> GenerationsParameter {
+      get { return (LookupParameter<IntValue>)Parameters["Generations"]; }
+    }
+
+    public ValueParameter<IntValue> DepthParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Depth"]; }
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SuccessfulOffspringAnalyzer(this, cloner);
+    }
+    [StorableConstructor]
+    private SuccessfulOffspringAnalyzer(bool deserializing) : base(deserializing) { }
+    private SuccessfulOffspringAnalyzer(SuccessfulOffspringAnalyzer original, Cloner cloner) : base(original, cloner) { }
+    public SuccessfulOffspringAnalyzer()
+      : base() {
+      Parameters.Add(new ValueParameter<StringValue>("SuccessfulOffspringFlag", "The name of the flag which indicates if the individual was successful.", new StringValue("SuccessfulOffspring")));
+      Parameters.Add(new ValueParameter<ItemCollection<StringValue>>("CollectedValues", "The properties of the successful offspring that should be collected.", new ItemCollection<StringValue>()));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the succedd progress analysis results should be stored."));
+      Parameters.Add(new LookupParameter<IntValue>("Generations", "The current number of generations."));
+      Parameters.Add(new LookupParameter<ResultCollection>("SuccessfulOffspringAnalysis", "The successful offspring analysis which is created."));
+      Parameters.Add(new ValueParameter<IntValue>("Depth", "The depth of the individuals in the scope tree.", new IntValue(1)));
+    }
+
+    public override IOperation Apply() {
+      ResultCollection results = ResultsParameter.ActualValue;
+
+      List<IScope> scopes = new List<IScope>() { ExecutionContext.Scope };
+      for (int i = 0; i < DepthParameter.Value.Value; i++)
+        scopes = scopes.Select(x => (IEnumerable<IScope>)x.SubScopes).Aggregate((a, b) => a.Concat(b)).ToList();
+
+      ItemCollection<StringValue> collectedValues = CollectedValuesParameter.Value;
+      foreach (StringValue collected in collectedValues) {
+        //collect the values of the successful offspring
+        Dictionary<String, int> counts = new Dictionary<String, int>();
+        for (int i = 0; i < scopes.Count; i++) {
+          IScope child = scopes[i];
+          string successfulOffspringFlag = SuccessfulOffspringFlagParameter.Value.Value;
+          if (child.Variables.ContainsKey(collected.Value) &&
+              child.Variables.ContainsKey(successfulOffspringFlag) &&
+              (child.Variables[successfulOffspringFlag].Value is BoolValue) &&
+              (child.Variables[successfulOffspringFlag].Value as BoolValue).Value) {
+            String key = child.Variables[collected.Value].Value.ToString();
+
+            if (!counts.ContainsKey(key))
+              counts.Add(key, 1);
+            else
+              counts[key]++;
+          }
+        }
+
+        //create a data table containing the collected values
+        ResultCollection successfulOffspringAnalysis;
+
+        if (SuccessfulOffspringAnalysisParameter.ActualValue == null) {
+          successfulOffspringAnalysis = new ResultCollection();
+          SuccessfulOffspringAnalysisParameter.ActualValue = successfulOffspringAnalysis;
+        } else {
+          successfulOffspringAnalysis = SuccessfulOffspringAnalysisParameter.ActualValue;
+        }
+
+        string resultKey = "SuccessfulOffspringAnalyzer Results";
+        if (!results.ContainsKey(resultKey)) {
+          results.Add(new Result(resultKey, successfulOffspringAnalysis));
+        } else {
+          results[resultKey].Value = successfulOffspringAnalysis;
+        }
+
+        DataTable successProgressAnalysis;
+        if (!successfulOffspringAnalysis.ContainsKey(collected.Value)) {
+          successProgressAnalysis = new DataTable();
+          successProgressAnalysis.Name = collected.Value;
+          successfulOffspringAnalysis.Add(new Result(collected.Value, successProgressAnalysis));
+        } else {
+          successProgressAnalysis = successfulOffspringAnalysis[collected.Value].Value as DataTable;
+        }
+
+        int successfulCount = 0;
+        foreach (string key in counts.Keys) {
+          successfulCount += counts[key];
+        }
+
+        foreach (String value in counts.Keys) {
+          DataRow row;
+          if (!successProgressAnalysis.Rows.ContainsKey(value)) {
+            row = new DataRow(value);
+            int iterations = GenerationsParameter.ActualValue.Value;
+
+            //fill up all values seen the first time
+            for (int i = 1; i < iterations; i++)
+              row.Values.Add(0);
+
+            successProgressAnalysis.Rows.Add(row);
+          } else {
+            row = successProgressAnalysis.Rows[value];
+          }
+
+          row.Values.Add(counts[value] / (double)successfulCount);
+        }
+
+        //fill up all values that are not present in the current generation
+        foreach (DataRow row in successProgressAnalysis.Rows) {
+          if (!counts.ContainsKey(row.Name))
+            row.Values.Add(0);
+        }
+      }
+
+      return base.Apply();
+    }
+  }
+}
