Index: trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.csproj	(revision 3478)
+++ trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.csproj	(revision 3479)
@@ -80,7 +80,9 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="SASEGASA.cs" />
+    <Compile Include="SASEGASAMainLoop.cs" />
     <Compile Include="HeuristicLabAlgorithmsOffspringSelectionGeneticAlgorithmPlugin.cs" />
-    <Compile Include="OffspringSelectionIslandGeneticAlgorithm.cs" />
-    <Compile Include="OffspringSelectionIslandGeneticAlgorithmMainLoop.cs" />
+    <Compile Include="IslandOffspringSelectionGeneticAlgorithm.cs" />
+    <Compile Include="IslandOffspringSelectionGeneticAlgorithmMainLoop.cs" />
     <Compile Include="OffspringSelectionGeneticAlgorithm.cs" />
     <Compile Include="OffspringSelectionGeneticAlgorithmMainLoop.cs" />
Index: trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs	(revision 3479)
+++ trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs	(revision 3479)
@@ -0,0 +1,588 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.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;
+using HeuristicLab.Selection;
+
+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 : EngineAlgorithm {
+
+    #region Problem Properties
+    public override Type ProblemType {
+      get { return typeof(ISingleObjectiveProblem); }
+    }
+    public new ISingleObjectiveProblem Problem {
+      get { return (ISingleObjectiveProblem)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"]; }
+    }
+    private ConstrainedValueParameter<IMigrator> MigratorParameter {
+      get { return (ConstrainedValueParameter<IMigrator>)Parameters["Migrator"]; }
+    }
+    private ConstrainedValueParameter<ISelector> EmigrantsSelectorParameter {
+      get { return (ConstrainedValueParameter<ISelector>)Parameters["EmigrantsSelector"]; }
+    }
+    private ConstrainedValueParameter<ISelector> ImmigrationSelectorParameter {
+      get { return (ConstrainedValueParameter<ISelector>)Parameters["ImmigrationSelector"]; }
+    }
+    private ValueParameter<IntValue> PopulationSizeParameter {
+      get { return (ValueParameter<IntValue>)Parameters["PopulationSize"]; }
+    }
+    private ValueParameter<IntValue> MaximumMigrationsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaximumMigrations"]; }
+    }
+    private ConstrainedValueParameter<ISelector> SelectorParameter {
+      get { return (ConstrainedValueParameter<ISelector>)Parameters["Selector"]; }
+    }
+    private ConstrainedValueParameter<ICrossover> CrossoverParameter {
+      get { return (ConstrainedValueParameter<ICrossover>)Parameters["Crossover"]; }
+    }
+    private ValueParameter<PercentValue> MutationProbabilityParameter {
+      get { return (ValueParameter<PercentValue>)Parameters["MutationProbability"]; }
+    }
+    private OptionalConstrainedValueParameter<IManipulator> MutatorParameter {
+      get { return (OptionalConstrainedValueParameter<IManipulator>)Parameters["Mutator"]; }
+    }
+    private ValueParameter<IntValue> ElitesParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Elites"]; }
+    }
+    private ValueParameter<BoolValue> ParallelParameter {
+      get { return (ValueParameter<BoolValue>)Parameters["Parallel"]; }
+    }
+    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"]; }
+    }
+    private OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier> ComparisonFactorModifierParameter {
+      get { return (OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>)Parameters["ComparisonFactorModifier"]; }
+    }
+    private ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; }
+    }
+    private ValueLookupParameter<BoolValue> OffspringSelectionBeforeMutationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
+    }
+    #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 ISelector ImmigrationSelector {
+      get { return ImmigrationSelectorParameter.Value; }
+      set { ImmigrationSelectorParameter.Value = value; }
+    }
+    public IntValue PopulationSize {
+      get { return PopulationSizeParameter.Value; }
+      set { PopulationSizeParameter.Value = value; }
+    }
+    public IntValue MaximumMigrations {
+      get { return MaximumMigrationsParameter.Value; }
+      set { MaximumMigrationsParameter.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 BoolValue Parallel {
+      get { return ParallelParameter.Value; }
+      set { ParallelParameter.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; }
+    }
+    private 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; }
+    }
+    private List<ISelector> selectors;
+    private IEnumerable<ISelector> Selectors {
+      get { return selectors; }
+    }
+    private List<IDiscreteDoubleValueModifier> comparisonFactorModifiers;
+    private List<ISelector> emigrantsSelectors;
+    private List<ISelector> immigrationSelectors;
+    private List<IMigrator> migrators;
+    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 (IslandOffspringSelectionGeneticAlgorithmMainLoop)IslandProcessor.Successor; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private IslandOffspringSelectionGeneticAlgorithm(bool deserializing) : base(deserializing) { }
+    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<ISelector>("ImmigrationSelector", "Selects the population from the unification of the original population and 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>("MaximumMigrations", "The maximum number of migrations that should occur.", 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<BoolValue>("Parallel", "True if the islands should be run in parallel (also requires a parallel engine)", new BoolValue(false)));
+      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)));
+
+      RandomCreator randomCreator = new RandomCreator();
+      SubScopesCreator populationCreator = new SubScopesCreator();
+      UniformSubScopesProcessor ussp1 = new UniformSubScopesProcessor();
+      SolutionsCreator solutionsCreator = new SolutionsCreator();
+      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.Parallel = null;
+      ussp1.ParallelParameter.ActualName = ParallelParameter.Name;
+      ussp1.Operator = solutionsCreator;
+      ussp1.Successor = mainLoop;
+
+      solutionsCreator.NumberOfSolutionsParameter.ActualName = PopulationSizeParameter.Name;
+      solutionsCreator.Successor = null;
+
+      mainLoop.EmigrantsSelectorParameter.ActualName = EmigrantsSelectorParameter.Name;
+      mainLoop.ImmigrationSelectorParameter.ActualName = ImmigrationSelectorParameter.Name;
+      mainLoop.MaximumMigrationsParameter.ActualName = MaximumMigrationsParameter.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.ComparisonFactorLowerBoundParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
+      mainLoop.ComparisonFactorModifierParameter.ActualName = ComparisonFactorModifierParameter.Name;
+      mainLoop.ComparisonFactorUpperBoundParameter.ActualName = ComparisonFactorUpperBoundParameter.Name;
+      mainLoop.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
+      mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
+
+      mainLoop.Successor = null;
+
+      Initialize();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      IslandOffspringSelectionGeneticAlgorithm clone = (IslandOffspringSelectionGeneticAlgorithm)base.Clone(cloner);
+      clone.Initialize();
+      return clone;
+    }
+
+    public override void Prepare() {
+      if (Problem != null) base.Prepare();
+    }
+
+    #region Events
+    protected override void OnProblemChanged() {
+      ParameterizeStochasticOperator(Problem.SolutionCreator);
+      ParameterizeStochasticOperator(Problem.Evaluator);
+      ParameterizeStochasticOperator(Problem.Visualizer);
+      foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
+      ParameterizeSolutionsCreator();
+      ParameterizeMainLoop();
+      ParameterizeSelectors();
+      UpdateCrossovers();
+      UpdateMutators();
+      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      if (Problem.Visualizer != null) Problem.Visualizer.VisualizationParameter.ActualNameChanged += new EventHandler(Visualizer_VisualizationParameter_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();
+      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      base.Problem_EvaluatorChanged(sender, e);
+    }
+    protected override void Problem_VisualizerChanged(object sender, EventArgs e) {
+      ParameterizeStochasticOperator(Problem.Visualizer);
+      ParameterizeMainLoop();
+      if (Problem.Visualizer != null) Problem.Visualizer.VisualizationParameter.ActualNameChanged += new EventHandler(Visualizer_VisualizationParameter_ActualNameChanged);
+      base.Problem_VisualizerChanged(sender, e);
+    }
+    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
+      foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
+      UpdateCrossovers();
+      UpdateMutators();
+      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();
+    }
+    private void Visualizer_VisualizationParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeMainLoop();
+    }
+    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) {
+      MaximumMigrations.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
+    [StorableHook(HookType.AfterDeserialization)]
+    private void Initialize() {
+      InitializeSelectors();
+      UpdateSelectors();
+      InitializeComparisonFactorModifiers();
+      UpdateComparisonFactorModifiers();
+      InitializeMigrators();
+      UpdateMigrators();
+      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);
+      MaximumMigrationsParameter.ValueChanged += new EventHandler(MaximumMigrationsParameter_ValueChanged);
+      MaximumMigrations.ValueChanged += new EventHandler(MaximumMigrations_ValueChanged);
+      if (Problem != null) {
+        UpdateCrossovers();
+        UpdateMutators();
+        Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+        if (Problem.Visualizer != null) Problem.Visualizer.VisualizationParameter.ActualNameChanged += new EventHandler(Visualizer_VisualizationParameter_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.VisualizerParameter.ActualName = Problem.VisualizerParameter.Name;
+      if (Problem.Visualizer != null)
+        MainLoop.VisualizationParameter.ActualName = Problem.Visualizer.VisualizationParameter.ActualName;
+    }
+    private void ParameterizeStochasticOperator(IOperator op) {
+      if (op is IStochasticOperator)
+        ((IStochasticOperator)op).RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
+    }
+    private void InitializeSelectors() {
+      selectors = new List<ISelector>();
+      selectors.AddRange(ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name));
+      emigrantsSelectors = new List<ISelector>();
+      emigrantsSelectors.AddRange(ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name));
+      immigrationSelectors = new List<ISelector>();
+      immigrationSelectors.AddRange(ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name));
+      ParameterizeSelectors();
+    }
+    private void InitializeComparisonFactorModifiers() {
+      comparisonFactorModifiers = new List<IDiscreteDoubleValueModifier>();
+      comparisonFactorModifiers.AddRange(ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name));
+      ParameterizeComparisonFactorModifiers();
+    }
+    private void InitializeMigrators() {
+      migrators = new List<IMigrator>();
+      migrators.AddRange(ApplicationManager.Manager.GetInstances<IMigrator>().OrderBy(x => x.Name));
+      UpdateMigrators();
+    }
+    private void ParameterizeSelectors() {
+      foreach (ISelector selector in Selectors) {
+        selector.CopySelected = new BoolValue(true);
+        selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(2 * (PopulationSize.Value - Elites.Value));
+        ParameterizeStochasticOperator(selector);
+      }
+      foreach (ISelector selector in emigrantsSelectors) {
+        selector.CopySelected = new BoolValue(true);
+        selector.NumberOfSelectedSubScopesParameter.Value = new IntValue((int)Math.Ceiling(PopulationSize.Value * MigrationRate.Value));
+        ParameterizeStochasticOperator(selector);
+      }
+      foreach (ISelector selector in immigrationSelectors) {
+        selector.CopySelected = new BoolValue(false);
+        selector.NumberOfSelectedSubScopesParameter.Value = PopulationSize;
+        ParameterizeStochasticOperator(selector);
+      }
+      if (Problem != null) {
+        foreach (ISingleObjectiveSelector selector in Selectors.OfType<ISingleObjectiveSelector>()) {
+          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        }
+        foreach (ISingleObjectiveSelector selector in emigrantsSelectors.OfType<ISingleObjectiveSelector>()) {
+          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        }
+        foreach (ISingleObjectiveSelector selector in immigrationSelectors.OfType<ISingleObjectiveSelector>()) {
+          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        }
+      }
+    }
+    private void ParameterizeComparisonFactorModifiers() {
+      foreach (IDiscreteDoubleValueModifier modifier in comparisonFactorModifiers) {
+        modifier.IndexParameter.ActualName = "Generations";
+        modifier.EndIndexParameter.Value = new IntValue(MigrationInterval.Value * MaximumMigrations.Value);
+        modifier.EndValueParameter.ActualName = ComparisonFactorUpperBoundParameter.Name;
+        modifier.StartIndexParameter.Value = new IntValue(0);
+        modifier.StartValueParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
+        modifier.ValueParameter.ActualName = "ComparisonFactor";
+      }
+    }
+    private void UpdateSelectors() {
+      ISelector oldSelector = SelectorParameter.Value;
+      SelectorParameter.ValidValues.Clear();
+      foreach (ISelector selector in Selectors.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;
+
+      if (oldSelector != null) {
+        ISelector selector = SelectorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldSelector.GetType());
+        if (selector != null) SelectorParameter.Value = selector;
+      }
+
+      oldSelector = EmigrantsSelector;
+      EmigrantsSelectorParameter.ValidValues.Clear();
+      foreach (ISelector selector in emigrantsSelectors)
+        EmigrantsSelectorParameter.ValidValues.Add(selector);
+      if (oldSelector != null) {
+        ISelector selector = EmigrantsSelectorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldSelector.GetType());
+        if (selector != null) EmigrantsSelectorParameter.Value = selector;
+      }
+
+      oldSelector = ImmigrationSelectorParameter.Value;
+      ImmigrationSelectorParameter.ValidValues.Clear();
+      foreach (ISelector selector in immigrationSelectors)
+        ImmigrationSelectorParameter.ValidValues.Add(selector);
+      if (oldSelector != null) {
+        ISelector selector = ImmigrationSelectorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldSelector.GetType());
+        if (selector != null) ImmigrationSelectorParameter.Value = selector;
+      }
+    }
+    private void UpdateComparisonFactorModifiers() {
+      IDiscreteDoubleValueModifier oldModifier = ComparisonFactorModifier;
+
+      ComparisonFactorModifierParameter.ValidValues.Clear();
+      foreach (IDiscreteDoubleValueModifier modifier in comparisonFactorModifiers)
+        ComparisonFactorModifierParameter.ValidValues.Add(modifier);
+
+      if (oldModifier != null) {
+        IDiscreteDoubleValueModifier mod = ComparisonFactorModifierParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldModifier.GetType());
+        if (mod != null) ComparisonFactorModifierParameter.Value = mod;
+      }
+    }
+    private void UpdateMigrators() {
+      IMigrator oldMigrator = Migrator;
+      MigratorParameter.ValidValues.Clear();
+      foreach (IMigrator migrator in migrators)
+        MigratorParameter.ValidValues.Add(migrator);
+      if (oldMigrator != null) {
+        IMigrator migrator = MigratorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldMigrator.GetType());
+        if (migrator != null) MigratorParameter.Value = migrator;
+      } else if (MigratorParameter.ValidValues.Count > 0) MigratorParameter.Value = MigratorParameter.ValidValues.First();
+    }
+    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;
+      }
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 3479)
+++ trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 3479)
@@ -0,0 +1,347 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Selection;
+
+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 SubScopesLookupParameter<DoubleValue> QualityParameter {
+      get { return (SubScopesLookupParameter<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> ImmigrationSelectorParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["ImmigrationSelector"]; }
+    }
+    public ValueLookupParameter<IntValue> PopulationSizeParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["PopulationSize"]; }
+    }
+    public ValueLookupParameter<IntValue> MaximumMigrationsParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["MaximumMigrations"]; }
+    }
+    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 ValueLookupParameter<DoubleValue> ComparisonFactorLowerBoundParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorLowerBound"]; }
+    }
+    public ValueLookupParameter<DoubleValue> ComparisonFactorUpperBoundParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorUpperBound"]; }
+    }
+    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"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private IslandOffspringSelectionGeneticAlgorithmMainLoop(bool deserializing) : base() { }
+    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 SubScopesLookupParameter<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>("ImmigrationSelector", "Selects the population from the unification of the original population and the immigrants."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("PopulationSize", "The size of the population of solutions."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumMigrations", "The maximum number of migrations after which the operator should terminate."));
+      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."));
+      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 ValueLookupParameter<DoubleValue>("ComparisonFactorLowerBound", "The lower bound of the comparison factor (start)."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorUpperBound", "The upper bound of the comparison factor (end)."));
+      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."));
+      #endregion
+
+      #region Create operators
+      VariableCreator variableCreator = new VariableCreator();
+      UniformSubScopesProcessor ussp0 = new UniformSubScopesProcessor();
+      VariableCreator islandVariableCreator = new VariableCreator();
+      Assigner islandVariableAssigner = new Assigner();
+      BestQualityMemorizer bestQualityMemorizer1 = new BestQualityMemorizer();
+      BestAverageWorstQualityCalculator bestAverageWorstQualityCalculator1 = new BestAverageWorstQualityCalculator();
+      BestQualityMemorizer bestQualityMemorizer2 = new BestQualityMemorizer();
+      BestAverageWorstQualityCalculator bestAverageWorstQualityCalculator2 = new BestAverageWorstQualityCalculator();
+      DataTableValuesCollector dataTableValuesCollector1 = new DataTableValuesCollector();
+      QualityDifferenceCalculator qualityDifferenceCalculator1 = new QualityDifferenceCalculator();
+      ResultsCollector resultsCollector = new ResultsCollector();
+      UniformSubScopesProcessor ussp1 = new UniformSubScopesProcessor();
+      OffspringSelectionGeneticAlgorithmMainLoop mainLoop = new OffspringSelectionGeneticAlgorithmMainLoop();
+      Placeholder emigrantsSelector = new Placeholder();
+      Placeholder migrator = new Placeholder();
+      UniformSubScopesProcessor ussp2 = new UniformSubScopesProcessor();
+      IntCounter maximumGenerationsCounter = new IntCounter();
+      MergingReducer mergingReducer = new MergingReducer();
+      Placeholder immigrationSelector = new Placeholder();
+      RightReducer rightReducer = new RightReducer();
+      IntCounter migrationsCounter = new IntCounter();
+      Comparator maxMigrationsComparator = new Comparator();
+      BestQualityMemorizer bestQualityMemorizer3 = new BestQualityMemorizer();
+      BestAverageWorstQualityCalculator bestAverageWorstQualityCalculator3 = new BestAverageWorstQualityCalculator();
+      DataTableValuesCollector dataTableValuesCollector2 = new DataTableValuesCollector();
+      QualityDifferenceCalculator qualityDifferenceCalculator2 = new QualityDifferenceCalculator();
+      ConditionalBranch migrationTerminationCondition = new ConditionalBranch();
+
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Migrations", new IntValue(0)));
+      
+      islandVariableCreator.CollectedValues.Add(new ValueParameter<ResultCollection>("IslandResults", new ResultCollection()));
+
+      islandVariableAssigner.LeftSideParameter.ActualName = "MaximumGenerations";
+      islandVariableAssigner.RightSideParameter.ActualName = "MigrationInterval";
+
+      bestQualityMemorizer1.BestQualityParameter.ActualName = "BestQuality";
+      bestQualityMemorizer1.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      bestQualityMemorizer1.QualityParameter.ActualName = QualityParameter.Name;
+
+      bestAverageWorstQualityCalculator1.AverageQualityParameter.ActualName = "CurrentAverageQuality";
+      bestAverageWorstQualityCalculator1.BestQualityParameter.ActualName = "CurrentBestQuality";
+      bestAverageWorstQualityCalculator1.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      bestAverageWorstQualityCalculator1.QualityParameter.ActualName = QualityParameter.Name;
+      bestAverageWorstQualityCalculator1.WorstQualityParameter.ActualName = "CurrentWorstQuality";
+
+      bestQualityMemorizer2.BestQualityParameter.ActualName = "BestQuality";
+      bestQualityMemorizer2.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      bestQualityMemorizer2.QualityParameter.ActualName = "BestQuality";
+
+      bestAverageWorstQualityCalculator2.AverageQualityParameter.ActualName = "CurrentAverageBestQuality";
+      bestAverageWorstQualityCalculator2.BestQualityParameter.ActualName = "CurrentBestBestQuality";
+      bestAverageWorstQualityCalculator2.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      bestAverageWorstQualityCalculator2.QualityParameter.ActualName = "CurrentBestQuality";
+      bestAverageWorstQualityCalculator2.WorstQualityParameter.ActualName = "CurrentWorstBestQuality";
+
+      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
+      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
+      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
+      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
+      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
+      dataTableValuesCollector1.DataTableParameter.ActualName = "BestQualities";
+
+      qualityDifferenceCalculator1.AbsoluteDifferenceParameter.ActualName = "AbsoluteDifferenceBestKnownToBest";
+      qualityDifferenceCalculator1.FirstQualityParameter.ActualName = BestKnownQualityParameter.Name;
+      qualityDifferenceCalculator1.RelativeDifferenceParameter.ActualName = "RelativeDifferenceBestKnownToBest";
+      qualityDifferenceCalculator1.SecondQualityParameter.ActualName = "BestQuality";
+
+      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Migrations"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Absolute Difference of Best Known Quality to Best Quality", null, "AbsoluteDifferenceBestKnownToBest"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Relative Difference of Best Known Quality to Best Quality", null, "RelativeDifferenceBestKnownToBest"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>("BestQualities"));
+      resultsCollector.CollectedValues.Add(new SubScopesLookupParameter<ResultCollection>("IslandResults", "Result set for each island"));
+      resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name;
+
+      mainLoop.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name;
+      mainLoop.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      mainLoop.QualityParameter.ActualName = QualityParameter.Name;
+      mainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
+      mainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name;
+      mainLoop.ElitesParameter.ActualName = ElitesParameter.Name;
+      mainLoop.MaximumGenerationsParameter.ActualName = "MaximumGenerations";
+      mainLoop.MutatorParameter.ActualName = MutatorParameter.Name;
+      mainLoop.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
+      mainLoop.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
+      mainLoop.RandomParameter.ActualName = RandomParameter.Name;
+      mainLoop.ResultsParameter.ActualName = "IslandResults";
+      mainLoop.VisualizerParameter.ActualName = VisualizerParameter.Name;
+      mainLoop.VisualizationParameter.ActualName = VisualizationParameter.Name;
+      mainLoop.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
+      mainLoop.ComparisonFactorLowerBoundParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
+      mainLoop.ComparisonFactorModifierParameter.ActualName = ComparisonFactorModifierParameter.Name;
+      mainLoop.ComparisonFactorUpperBoundParameter.ActualName = ComparisonFactorUpperBoundParameter.Name;
+      mainLoop.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
+      mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
+
+      maximumGenerationsCounter.ValueParameter.ActualName = "MaximumGenerations";
+      maximumGenerationsCounter.Increment = null;
+      maximumGenerationsCounter.IncrementParameter.ActualName = "MigrationInterval";
+
+      emigrantsSelector.Name = "Emigrants Selector (placeholder)";
+      emigrantsSelector.OperatorParameter.ActualName = EmigrantsSelectorParameter.Name;
+
+      migrator.Name = "Migrator (placeholder)";
+      migrator.OperatorParameter.ActualName = MigratorParameter.Name;
+
+      immigrationSelector.Name = "Immigration Selector (placeholder)";
+      immigrationSelector.OperatorParameter.ActualName = ImmigrationSelectorParameter.Name;
+
+      migrationsCounter.Name = "Migrations + 1";
+      migrationsCounter.IncrementParameter.Value = new IntValue(1);
+      migrationsCounter.ValueParameter.ActualName = "Migrations";
+
+      maxMigrationsComparator.Name = "Migrations >= MaximumMigration ?";
+      maxMigrationsComparator.LeftSideParameter.ActualName = "Migrations";
+      maxMigrationsComparator.RightSideParameter.ActualName = MaximumMigrationsParameter.Name;
+      maxMigrationsComparator.Comparison.Value = ComparisonType.GreaterOrEqual;
+      maxMigrationsComparator.ResultParameter.ActualName = "MigrationTerminate";
+
+      bestQualityMemorizer3.BestQualityParameter.ActualName = "BestQuality";
+      bestQualityMemorizer3.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      bestQualityMemorizer3.QualityParameter.ActualName = "BestQuality";
+
+      bestAverageWorstQualityCalculator3.AverageQualityParameter.ActualName = "CurrentAverageBestQuality";
+      bestAverageWorstQualityCalculator3.BestQualityParameter.ActualName = "CurrentBestBestQuality";
+      bestAverageWorstQualityCalculator3.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      bestAverageWorstQualityCalculator3.QualityParameter.ActualName = "CurrentBestQuality";
+      bestAverageWorstQualityCalculator3.WorstQualityParameter.ActualName = "CurrentWorstBestQuality";
+
+      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
+      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
+      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
+      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
+      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
+      dataTableValuesCollector2.DataTableParameter.ActualName = "BestQualities";
+
+      qualityDifferenceCalculator2.AbsoluteDifferenceParameter.ActualName = "AbsoluteDifferenceBestKnownToBest";
+      qualityDifferenceCalculator2.FirstQualityParameter.ActualName = BestKnownQualityParameter.Name;
+      qualityDifferenceCalculator2.RelativeDifferenceParameter.ActualName = "RelativeDifferenceBestKnownToBest";
+      qualityDifferenceCalculator2.SecondQualityParameter.ActualName = "BestQuality";
+
+      migrationTerminationCondition.ConditionParameter.ActualName = "MigrationTerminate";
+      #endregion
+
+      #region Create operator graph
+      OperatorGraph.InitialOperator = variableCreator;
+      variableCreator.Successor = ussp0;
+      ussp0.Operator = islandVariableCreator;
+      ussp0.Successor = bestQualityMemorizer2;
+      islandVariableCreator.Successor = islandVariableAssigner;
+      islandVariableAssigner.Successor = bestQualityMemorizer1;
+      bestQualityMemorizer1.Successor = bestAverageWorstQualityCalculator1;
+      bestQualityMemorizer2.Successor = bestAverageWorstQualityCalculator2;
+      bestAverageWorstQualityCalculator2.Successor = dataTableValuesCollector1;
+      dataTableValuesCollector1.Successor = qualityDifferenceCalculator1;
+      qualityDifferenceCalculator1.Successor = resultsCollector;
+      resultsCollector.Successor = ussp1;
+      ussp1.Operator = mainLoop;
+      ussp1.Successor = migrator;
+      mainLoop.Successor = maximumGenerationsCounter;
+      maximumGenerationsCounter.Successor = emigrantsSelector;
+      emigrantsSelector.Successor = null;
+      migrator.Successor = ussp2;
+      ussp2.Operator = mergingReducer;
+      ussp2.Successor = migrationsCounter;
+      mergingReducer.Successor = immigrationSelector;
+      immigrationSelector.Successor = rightReducer;
+      rightReducer.Successor = null;
+      migrationsCounter.Successor = maxMigrationsComparator;
+      maxMigrationsComparator.Successor = bestQualityMemorizer3;
+      bestQualityMemorizer3.Successor = bestAverageWorstQualityCalculator3;
+      bestAverageWorstQualityCalculator3.Successor = dataTableValuesCollector2;
+      dataTableValuesCollector2.Successor = qualityDifferenceCalculator2;
+      qualityDifferenceCalculator2.Successor = migrationTerminationCondition;
+      migrationTerminationCondition.FalseBranch = ussp1;
+      migrationTerminationCondition.TrueBranch = null;
+      migrationTerminationCondition.Successor = null;
+      #endregion
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs	(revision 3478)
+++ trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs	(revision 3479)
@@ -212,5 +212,4 @@
       solutionsCreator.Successor = mainLoop;
 
-      mainLoop.PopulationSizeParameter.ActualName = PopulationSizeParameter.Name;
       mainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
       mainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name;
@@ -285,9 +284,7 @@
     private void PopulationSizeParameter_ValueChanged(object sender, EventArgs e) {
       PopulationSize.ValueChanged += new EventHandler(PopulationSize_ValueChanged);
-      MainLoop.PopulationSizeParameter.Value = new IntValue(PopulationSize.Value - Elites.Value);
       ParameterizeSelectors();
     }
     private void PopulationSize_ValueChanged(object sender, EventArgs e) {
-      MainLoop.PopulationSizeParameter.Value = new IntValue(PopulationSize.Value - Elites.Value);
       ParameterizeSelectors();
     }
Index: trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 3478)
+++ trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithmMainLoop.cs	(revision 3479)
@@ -43,7 +43,4 @@
       get { return (ValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
     }
-    public ValueLookupParameter<IntValue> PopulationSizeParameter {
-      get { return (ValueLookupParameter<IntValue>)Parameters["PopulationSize"]; }
-    }
     public SubScopesLookupParameter<DoubleValue> QualityParameter {
       get { return (SubScopesLookupParameter<DoubleValue>)Parameters["Quality"]; }
@@ -113,5 +110,4 @@
       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 ValueLookupParameter<IntValue>("PopulationSize", "The size of the population."));
       Parameters.Add(new SubScopesLookupParameter<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."));
@@ -189,5 +185,5 @@
       initializationBranch.ConditionParameter.ActualName = "IsInitialized";
 
-      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0)));
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Generations", new IntValue(0))); // this variable is referenced in SASEGASAMainLoop, do not change!
       variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("EvaluatedSolutions", new IntValue(0)));
       variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("SelectionPressure", new DoubleValue(0)));
@@ -196,5 +192,5 @@
       variableCreator.CollectedValues.Add(new ValueParameter<BoolValue>("IsInitialized", new BoolValue(true)));
 
-      variableAssigner.LeftSideParameter.ActualName = "ComparisonFactor";
+      variableAssigner.LeftSideParameter.ActualName = "ComparisonFactor"; // this variable is referenced in SASEGASA, OffspringSelectionGeneticAlgorithm, do not change!
       variableAssigner.RightSideParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
 
@@ -313,5 +309,4 @@
       offspringSelector.LuckyLosersParameter.ActualName = "OSLuckyLosers";
       offspringSelector.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
-      offspringSelector.PopulationSizeParameter.ActualName = PopulationSizeParameter.Name;
       offspringSelector.SelectionPressureParameter.ActualName = "SelectionPressure";
       offspringSelector.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
@@ -382,5 +377,5 @@
 
       conditionalBranch2.Name = "MaximumGenerations reached?";
-      conditionalBranch2.ConditionParameter.ActualName = "TerminateMaximumGenerations";
+      conditionalBranch2.ConditionParameter.ActualName = "TerminateMaximumGenerations"; // this variable is referenced in SASEGASAMainLoop, do not change!
       #endregion
 
Index: trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionIslandGeneticAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionIslandGeneticAlgorithm.cs	(revision 3478)
+++ 	(revision )
@@ -1,588 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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.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;
-using HeuristicLab.Selection;
-
-namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
-  /// <summary>
-  /// An offspring selection island genetic algorithm.
-  /// </summary>
-  [Item("Offspring Selection Island Genetic Algorithm", "An offspring selection island genetic algorithm.")]
-  [Creatable("Algorithms")]
-  [StorableClass]
-  public sealed class OffspringSelectionIslandGeneticAlgorithm : EngineAlgorithm {
-
-    #region Problem Properties
-    public override Type ProblemType {
-      get { return typeof(ISingleObjectiveProblem); }
-    }
-    public new ISingleObjectiveProblem Problem {
-      get { return (ISingleObjectiveProblem)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"]; }
-    }
-    private ConstrainedValueParameter<IMigrator> MigratorParameter {
-      get { return (ConstrainedValueParameter<IMigrator>)Parameters["Migrator"]; }
-    }
-    private ConstrainedValueParameter<ISelector> EmigrantsSelectorParameter {
-      get { return (ConstrainedValueParameter<ISelector>)Parameters["EmigrantsSelector"]; }
-    }
-    private ConstrainedValueParameter<ISelector> ImmigrationSelectorParameter {
-      get { return (ConstrainedValueParameter<ISelector>)Parameters["ImmigrationSelector"]; }
-    }
-    private ValueParameter<IntValue> PopulationSizeParameter {
-      get { return (ValueParameter<IntValue>)Parameters["PopulationSize"]; }
-    }
-    private ValueParameter<IntValue> MaximumMigrationsParameter {
-      get { return (ValueParameter<IntValue>)Parameters["MaximumMigrations"]; }
-    }
-    private ConstrainedValueParameter<ISelector> SelectorParameter {
-      get { return (ConstrainedValueParameter<ISelector>)Parameters["Selector"]; }
-    }
-    private ConstrainedValueParameter<ICrossover> CrossoverParameter {
-      get { return (ConstrainedValueParameter<ICrossover>)Parameters["Crossover"]; }
-    }
-    private ValueParameter<PercentValue> MutationProbabilityParameter {
-      get { return (ValueParameter<PercentValue>)Parameters["MutationProbability"]; }
-    }
-    private OptionalConstrainedValueParameter<IManipulator> MutatorParameter {
-      get { return (OptionalConstrainedValueParameter<IManipulator>)Parameters["Mutator"]; }
-    }
-    private ValueParameter<IntValue> ElitesParameter {
-      get { return (ValueParameter<IntValue>)Parameters["Elites"]; }
-    }
-    private ValueParameter<BoolValue> ParallelParameter {
-      get { return (ValueParameter<BoolValue>)Parameters["Parallel"]; }
-    }
-    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"]; }
-    }
-    private OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier> ComparisonFactorModifierParameter {
-      get { return (OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>)Parameters["ComparisonFactorModifier"]; }
-    }
-    private ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
-      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; }
-    }
-    private ValueLookupParameter<BoolValue> OffspringSelectionBeforeMutationParameter {
-      get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
-    }
-    #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 ISelector ImmigrationSelector {
-      get { return ImmigrationSelectorParameter.Value; }
-      set { ImmigrationSelectorParameter.Value = value; }
-    }
-    public IntValue PopulationSize {
-      get { return PopulationSizeParameter.Value; }
-      set { PopulationSizeParameter.Value = value; }
-    }
-    public IntValue MaximumMigrations {
-      get { return MaximumMigrationsParameter.Value; }
-      set { MaximumMigrationsParameter.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 BoolValue Parallel {
-      get { return ParallelParameter.Value; }
-      set { ParallelParameter.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; }
-    }
-    private 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; }
-    }
-    private List<ISelector> selectors;
-    private IEnumerable<ISelector> Selectors {
-      get { return selectors; }
-    }
-    private List<IDiscreteDoubleValueModifier> comparisonFactorModifiers;
-    private List<ISelector> emigrantsSelectors;
-    private List<ISelector> immigrationSelectors;
-    private List<IMigrator> migrators;
-    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 OffspringSelectionIslandGeneticAlgorithmMainLoop MainLoop {
-      get { return (OffspringSelectionIslandGeneticAlgorithmMainLoop)IslandProcessor.Successor; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    private OffspringSelectionIslandGeneticAlgorithm(bool deserializing) : base(deserializing) { }
-    public OffspringSelectionIslandGeneticAlgorithm()
-      : 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<ISelector>("ImmigrationSelector", "Selects the population from the unification of the original population and the immigrants."));
-      Parameters.Add(new ValueParameter<IntValue>("PopulationSize", "The size of the population of solutions.", new IntValue(100)));
-      Parameters.Add(new ValueParameter<IntValue>("MaximumMigrations", "The maximum number of migrations that should occur.", 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<BoolValue>("Parallel", "True if the islands should be run in parallel (also requires a parallel engine)", new BoolValue(false)));
-      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)));
-
-      RandomCreator randomCreator = new RandomCreator();
-      SubScopesCreator populationCreator = new SubScopesCreator();
-      UniformSubScopesProcessor ussp1 = new UniformSubScopesProcessor();
-      SolutionsCreator solutionsCreator = new SolutionsCreator();
-      OffspringSelectionIslandGeneticAlgorithmMainLoop mainLoop = new OffspringSelectionIslandGeneticAlgorithmMainLoop();
-      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.Parallel = null;
-      ussp1.ParallelParameter.ActualName = ParallelParameter.Name;
-      ussp1.Operator = solutionsCreator;
-      ussp1.Successor = mainLoop;
-
-      solutionsCreator.NumberOfSolutionsParameter.ActualName = PopulationSizeParameter.Name;
-      solutionsCreator.Successor = null;
-
-      mainLoop.EmigrantsSelectorParameter.ActualName = EmigrantsSelectorParameter.Name;
-      mainLoop.ImmigrationSelectorParameter.ActualName = ImmigrationSelectorParameter.Name;
-      mainLoop.MaximumMigrationsParameter.ActualName = MaximumMigrationsParameter.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.ComparisonFactorLowerBoundParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
-      mainLoop.ComparisonFactorModifierParameter.ActualName = ComparisonFactorModifierParameter.Name;
-      mainLoop.ComparisonFactorUpperBoundParameter.ActualName = ComparisonFactorUpperBoundParameter.Name;
-      mainLoop.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
-      mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
-
-      mainLoop.Successor = null;
-
-      Initialize();
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      OffspringSelectionIslandGeneticAlgorithm clone = (OffspringSelectionIslandGeneticAlgorithm)base.Clone(cloner);
-      clone.Initialize();
-      return clone;
-    }
-
-    public override void Prepare() {
-      if (Problem != null) base.Prepare();
-    }
-
-    #region Events
-    protected override void OnProblemChanged() {
-      ParameterizeStochasticOperator(Problem.SolutionCreator);
-      ParameterizeStochasticOperator(Problem.Evaluator);
-      ParameterizeStochasticOperator(Problem.Visualizer);
-      foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
-      ParameterizeSolutionsCreator();
-      ParameterizeMainLoop();
-      ParameterizeSelectors();
-      UpdateCrossovers();
-      UpdateMutators();
-      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
-      if (Problem.Visualizer != null) Problem.Visualizer.VisualizationParameter.ActualNameChanged += new EventHandler(Visualizer_VisualizationParameter_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();
-      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
-      base.Problem_EvaluatorChanged(sender, e);
-    }
-    protected override void Problem_VisualizerChanged(object sender, EventArgs e) {
-      ParameterizeStochasticOperator(Problem.Visualizer);
-      ParameterizeMainLoop();
-      if (Problem.Visualizer != null) Problem.Visualizer.VisualizationParameter.ActualNameChanged += new EventHandler(Visualizer_VisualizationParameter_ActualNameChanged);
-      base.Problem_VisualizerChanged(sender, e);
-    }
-    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
-      foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
-      UpdateCrossovers();
-      UpdateMutators();
-      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();
-    }
-    private void Visualizer_VisualizationParameter_ActualNameChanged(object sender, EventArgs e) {
-      ParameterizeMainLoop();
-    }
-    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) {
-      MaximumMigrations.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
-    [StorableHook(HookType.AfterDeserialization)]
-    private void Initialize() {
-      InitializeSelectors();
-      UpdateSelectors();
-      InitializeComparisonFactorModifiers();
-      UpdateComparisonFactorModifiers();
-      InitializeMigrators();
-      UpdateMigrators();
-      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);
-      MaximumMigrationsParameter.ValueChanged += new EventHandler(MaximumMigrationsParameter_ValueChanged);
-      MaximumMigrations.ValueChanged += new EventHandler(MaximumMigrations_ValueChanged);
-      if (Problem != null) {
-        UpdateCrossovers();
-        UpdateMutators();
-        Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
-        if (Problem.Visualizer != null) Problem.Visualizer.VisualizationParameter.ActualNameChanged += new EventHandler(Visualizer_VisualizationParameter_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.VisualizerParameter.ActualName = Problem.VisualizerParameter.Name;
-      if (Problem.Visualizer != null)
-        MainLoop.VisualizationParameter.ActualName = Problem.Visualizer.VisualizationParameter.ActualName;
-    }
-    private void ParameterizeStochasticOperator(IOperator op) {
-      if (op is IStochasticOperator)
-        ((IStochasticOperator)op).RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
-    }
-    private void InitializeSelectors() {
-      selectors = new List<ISelector>();
-      selectors.AddRange(ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name));
-      emigrantsSelectors = new List<ISelector>();
-      emigrantsSelectors.AddRange(ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name));
-      immigrationSelectors = new List<ISelector>();
-      immigrationSelectors.AddRange(ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name));
-      ParameterizeSelectors();
-    }
-    private void InitializeComparisonFactorModifiers() {
-      comparisonFactorModifiers = new List<IDiscreteDoubleValueModifier>();
-      comparisonFactorModifiers.AddRange(ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name));
-      ParameterizeComparisonFactorModifiers();
-    }
-    private void InitializeMigrators() {
-      migrators = new List<IMigrator>();
-      migrators.AddRange(ApplicationManager.Manager.GetInstances<IMigrator>().OrderBy(x => x.Name));
-      UpdateMigrators();
-    }
-    private void ParameterizeSelectors() {
-      foreach (ISelector selector in Selectors) {
-        selector.CopySelected = new BoolValue(true);
-        selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(2 * (PopulationSize.Value - Elites.Value));
-        ParameterizeStochasticOperator(selector);
-      }
-      foreach (ISelector selector in emigrantsSelectors) {
-        selector.CopySelected = new BoolValue(true);
-        selector.NumberOfSelectedSubScopesParameter.Value = new IntValue((int)Math.Ceiling(PopulationSize.Value * MigrationRate.Value));
-        ParameterizeStochasticOperator(selector);
-      }
-      foreach (ISelector selector in immigrationSelectors) {
-        selector.CopySelected = new BoolValue(false);
-        selector.NumberOfSelectedSubScopesParameter.Value = PopulationSize;
-        ParameterizeStochasticOperator(selector);
-      }
-      if (Problem != null) {
-        foreach (ISingleObjectiveSelector selector in Selectors.OfType<ISingleObjectiveSelector>()) {
-          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
-          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
-        }
-        foreach (ISingleObjectiveSelector selector in emigrantsSelectors.OfType<ISingleObjectiveSelector>()) {
-          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
-          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
-        }
-        foreach (ISingleObjectiveSelector selector in immigrationSelectors.OfType<ISingleObjectiveSelector>()) {
-          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
-          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
-        }
-      }
-    }
-    private void ParameterizeComparisonFactorModifiers() {
-      foreach (IDiscreteDoubleValueModifier modifier in comparisonFactorModifiers) {
-        modifier.IndexParameter.ActualName = "Generations";
-        modifier.EndIndexParameter.Value = new IntValue(MigrationInterval.Value * MaximumMigrations.Value);
-        modifier.EndValueParameter.ActualName = ComparisonFactorUpperBoundParameter.Name;
-        modifier.StartIndexParameter.Value = new IntValue(0);
-        modifier.StartValueParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
-        modifier.ValueParameter.ActualName = "ComparisonFactor";
-      }
-    }
-    private void UpdateSelectors() {
-      ISelector oldSelector = SelectorParameter.Value;
-      SelectorParameter.ValidValues.Clear();
-      foreach (ISelector selector in Selectors.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;
-
-      if (oldSelector != null) {
-        ISelector selector = SelectorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldSelector.GetType());
-        if (selector != null) SelectorParameter.Value = selector;
-      }
-
-      oldSelector = EmigrantsSelector;
-      EmigrantsSelectorParameter.ValidValues.Clear();
-      foreach (ISelector selector in emigrantsSelectors)
-        EmigrantsSelectorParameter.ValidValues.Add(selector);
-      if (oldSelector != null) {
-        ISelector selector = EmigrantsSelectorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldSelector.GetType());
-        if (selector != null) EmigrantsSelectorParameter.Value = selector;
-      }
-
-      oldSelector = ImmigrationSelectorParameter.Value;
-      ImmigrationSelectorParameter.ValidValues.Clear();
-      foreach (ISelector selector in immigrationSelectors)
-        ImmigrationSelectorParameter.ValidValues.Add(selector);
-      if (oldSelector != null) {
-        ISelector selector = ImmigrationSelectorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldSelector.GetType());
-        if (selector != null) ImmigrationSelectorParameter.Value = selector;
-      }
-    }
-    private void UpdateComparisonFactorModifiers() {
-      IDiscreteDoubleValueModifier oldModifier = ComparisonFactorModifier;
-
-      ComparisonFactorModifierParameter.ValidValues.Clear();
-      foreach (IDiscreteDoubleValueModifier modifier in comparisonFactorModifiers)
-        ComparisonFactorModifierParameter.ValidValues.Add(modifier);
-
-      if (oldModifier != null) {
-        IDiscreteDoubleValueModifier mod = ComparisonFactorModifierParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldModifier.GetType());
-        if (mod != null) ComparisonFactorModifierParameter.Value = mod;
-      }
-    }
-    private void UpdateMigrators() {
-      IMigrator oldMigrator = Migrator;
-      MigratorParameter.ValidValues.Clear();
-      foreach (IMigrator migrator in migrators)
-        MigratorParameter.ValidValues.Add(migrator);
-      if (oldMigrator != null) {
-        IMigrator migrator = MigratorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldMigrator.GetType());
-        if (migrator != null) MigratorParameter.Value = migrator;
-      } else if (MigratorParameter.ValidValues.Count > 0) MigratorParameter.Value = MigratorParameter.ValidValues.First();
-    }
-    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;
-      }
-    }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionIslandGeneticAlgorithmMainLoop.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionIslandGeneticAlgorithmMainLoop.cs	(revision 3478)
+++ 	(revision )
@@ -1,347 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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.Optimization.Operators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Selection;
-
-namespace HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm {
-  /// <summary>
-  /// An offspring selection island genetic algorithm main loop operator.
-  /// </summary>
-  [Item("OffspringSelectionIslandGeneticAlgorithmMainLoop", "An offspring selection island genetic algorithm main loop operator.")]
-  [StorableClass]
-  public sealed class OffspringSelectionIslandGeneticAlgorithmMainLoop : 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 SubScopesLookupParameter<DoubleValue> QualityParameter {
-      get { return (SubScopesLookupParameter<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> ImmigrationSelectorParameter {
-      get { return (ValueLookupParameter<IOperator>)Parameters["ImmigrationSelector"]; }
-    }
-    public ValueLookupParameter<IntValue> PopulationSizeParameter {
-      get { return (ValueLookupParameter<IntValue>)Parameters["PopulationSize"]; }
-    }
-    public ValueLookupParameter<IntValue> MaximumMigrationsParameter {
-      get { return (ValueLookupParameter<IntValue>)Parameters["MaximumMigrations"]; }
-    }
-    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 ValueLookupParameter<DoubleValue> ComparisonFactorLowerBoundParameter {
-      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorLowerBound"]; }
-    }
-    public ValueLookupParameter<DoubleValue> ComparisonFactorUpperBoundParameter {
-      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorUpperBound"]; }
-    }
-    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"]; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    private OffspringSelectionIslandGeneticAlgorithmMainLoop(bool deserializing) : base() { }
-    public OffspringSelectionIslandGeneticAlgorithmMainLoop()
-      : 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 SubScopesLookupParameter<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>("ImmigrationSelector", "Selects the population from the unification of the original population and the immigrants."));
-      Parameters.Add(new ValueLookupParameter<IntValue>("PopulationSize", "The size of the population of solutions."));
-      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumMigrations", "The maximum number of migrations after which the operator should terminate."));
-      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."));
-      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 ValueLookupParameter<DoubleValue>("ComparisonFactorLowerBound", "The lower bound of the comparison factor (start)."));
-      Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorUpperBound", "The upper bound of the comparison factor (end)."));
-      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."));
-      #endregion
-
-      #region Create operators
-      VariableCreator variableCreator = new VariableCreator();
-      UniformSubScopesProcessor ussp0 = new UniformSubScopesProcessor();
-      VariableCreator islandVariableCreator = new VariableCreator();
-      Assigner islandVariableAssigner = new Assigner();
-      BestQualityMemorizer bestQualityMemorizer1 = new BestQualityMemorizer();
-      BestAverageWorstQualityCalculator bestAverageWorstQualityCalculator1 = new BestAverageWorstQualityCalculator();
-      BestQualityMemorizer bestQualityMemorizer2 = new BestQualityMemorizer();
-      BestAverageWorstQualityCalculator bestAverageWorstQualityCalculator2 = new BestAverageWorstQualityCalculator();
-      DataTableValuesCollector dataTableValuesCollector1 = new DataTableValuesCollector();
-      QualityDifferenceCalculator qualityDifferenceCalculator1 = new QualityDifferenceCalculator();
-      ResultsCollector resultsCollector = new ResultsCollector();
-      UniformSubScopesProcessor ussp1 = new UniformSubScopesProcessor();
-      OffspringSelectionGeneticAlgorithmMainLoop mainLoop = new OffspringSelectionGeneticAlgorithmMainLoop();
-      Placeholder emigrantsSelector = new Placeholder();
-      Placeholder migrator = new Placeholder();
-      UniformSubScopesProcessor ussp2 = new UniformSubScopesProcessor();
-      IntCounter maximumGenerationsCounter = new IntCounter();
-      MergingReducer mergingReducer = new MergingReducer();
-      Placeholder immigrationSelector = new Placeholder();
-      RightReducer rightReducer = new RightReducer();
-      IntCounter migrationsCounter = new IntCounter();
-      Comparator maxMigrationsComparator = new Comparator();
-      BestQualityMemorizer bestQualityMemorizer3 = new BestQualityMemorizer();
-      BestAverageWorstQualityCalculator bestAverageWorstQualityCalculator3 = new BestAverageWorstQualityCalculator();
-      DataTableValuesCollector dataTableValuesCollector2 = new DataTableValuesCollector();
-      QualityDifferenceCalculator qualityDifferenceCalculator2 = new QualityDifferenceCalculator();
-      ConditionalBranch migrationTerminationCondition = new ConditionalBranch();
-
-      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Migrations", new IntValue(0)));
-      
-      islandVariableCreator.CollectedValues.Add(new ValueParameter<ResultCollection>("IslandResults", new ResultCollection()));
-
-      islandVariableAssigner.LeftSideParameter.ActualName = "MaximumGenerations";
-      islandVariableAssigner.RightSideParameter.ActualName = "MigrationInterval";
-
-      bestQualityMemorizer1.BestQualityParameter.ActualName = "BestQuality";
-      bestQualityMemorizer1.MaximizationParameter.ActualName = MaximizationParameter.Name;
-      bestQualityMemorizer1.QualityParameter.ActualName = QualityParameter.Name;
-
-      bestAverageWorstQualityCalculator1.AverageQualityParameter.ActualName = "CurrentAverageQuality";
-      bestAverageWorstQualityCalculator1.BestQualityParameter.ActualName = "CurrentBestQuality";
-      bestAverageWorstQualityCalculator1.MaximizationParameter.ActualName = MaximizationParameter.Name;
-      bestAverageWorstQualityCalculator1.QualityParameter.ActualName = QualityParameter.Name;
-      bestAverageWorstQualityCalculator1.WorstQualityParameter.ActualName = "CurrentWorstQuality";
-
-      bestQualityMemorizer2.BestQualityParameter.ActualName = "BestQuality";
-      bestQualityMemorizer2.MaximizationParameter.ActualName = MaximizationParameter.Name;
-      bestQualityMemorizer2.QualityParameter.ActualName = "BestQuality";
-
-      bestAverageWorstQualityCalculator2.AverageQualityParameter.ActualName = "CurrentAverageBestQuality";
-      bestAverageWorstQualityCalculator2.BestQualityParameter.ActualName = "CurrentBestBestQuality";
-      bestAverageWorstQualityCalculator2.MaximizationParameter.ActualName = MaximizationParameter.Name;
-      bestAverageWorstQualityCalculator2.QualityParameter.ActualName = "CurrentBestQuality";
-      bestAverageWorstQualityCalculator2.WorstQualityParameter.ActualName = "CurrentWorstBestQuality";
-
-      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
-      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
-      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
-      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
-      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
-      dataTableValuesCollector1.DataTableParameter.ActualName = "BestQualities";
-
-      qualityDifferenceCalculator1.AbsoluteDifferenceParameter.ActualName = "AbsoluteDifferenceBestKnownToBest";
-      qualityDifferenceCalculator1.FirstQualityParameter.ActualName = BestKnownQualityParameter.Name;
-      qualityDifferenceCalculator1.RelativeDifferenceParameter.ActualName = "RelativeDifferenceBestKnownToBest";
-      qualityDifferenceCalculator1.SecondQualityParameter.ActualName = "BestQuality";
-
-      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Migrations"));
-      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
-      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
-      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
-      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
-      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
-      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Absolute Difference of Best Known Quality to Best Quality", null, "AbsoluteDifferenceBestKnownToBest"));
-      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Relative Difference of Best Known Quality to Best Quality", null, "RelativeDifferenceBestKnownToBest"));
-      resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>("BestQualities"));
-      resultsCollector.CollectedValues.Add(new SubScopesLookupParameter<ResultCollection>("IslandResults", "Result set for each island"));
-      resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name;
-
-      mainLoop.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name;
-      mainLoop.MaximizationParameter.ActualName = MaximizationParameter.Name;
-      mainLoop.QualityParameter.ActualName = QualityParameter.Name;
-      mainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
-      mainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name;
-      mainLoop.ElitesParameter.ActualName = ElitesParameter.Name;
-      mainLoop.MaximumGenerationsParameter.ActualName = "MaximumGenerations";
-      mainLoop.MutatorParameter.ActualName = MutatorParameter.Name;
-      mainLoop.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
-      mainLoop.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
-      mainLoop.RandomParameter.ActualName = RandomParameter.Name;
-      mainLoop.ResultsParameter.ActualName = "IslandResults";
-      mainLoop.VisualizerParameter.ActualName = VisualizerParameter.Name;
-      mainLoop.VisualizationParameter.ActualName = VisualizationParameter.Name;
-      mainLoop.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
-      mainLoop.ComparisonFactorLowerBoundParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
-      mainLoop.ComparisonFactorModifierParameter.ActualName = ComparisonFactorModifierParameter.Name;
-      mainLoop.ComparisonFactorUpperBoundParameter.ActualName = ComparisonFactorUpperBoundParameter.Name;
-      mainLoop.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
-      mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
-
-      maximumGenerationsCounter.ValueParameter.ActualName = "MaximumGenerations";
-      maximumGenerationsCounter.Increment = null;
-      maximumGenerationsCounter.IncrementParameter.ActualName = "MigrationInterval";
-
-      emigrantsSelector.Name = "Emigrants Selector (placeholder)";
-      emigrantsSelector.OperatorParameter.ActualName = EmigrantsSelectorParameter.Name;
-
-      migrator.Name = "Migrator (placeholder)";
-      migrator.OperatorParameter.ActualName = MigratorParameter.Name;
-
-      immigrationSelector.Name = "Immigration Selector (placeholder)";
-      immigrationSelector.OperatorParameter.ActualName = ImmigrationSelectorParameter.Name;
-
-      migrationsCounter.Name = "Migrations + 1";
-      migrationsCounter.IncrementParameter.Value = new IntValue(1);
-      migrationsCounter.ValueParameter.ActualName = "Migrations";
-
-      maxMigrationsComparator.Name = "Migrations >= MaximumMigration ?";
-      maxMigrationsComparator.LeftSideParameter.ActualName = "Migrations";
-      maxMigrationsComparator.RightSideParameter.ActualName = MaximumMigrationsParameter.Name;
-      maxMigrationsComparator.Comparison.Value = ComparisonType.GreaterOrEqual;
-      maxMigrationsComparator.ResultParameter.ActualName = "MigrationTerminate";
-
-      bestQualityMemorizer3.BestQualityParameter.ActualName = "BestQuality";
-      bestQualityMemorizer3.MaximizationParameter.ActualName = MaximizationParameter.Name;
-      bestQualityMemorizer3.QualityParameter.ActualName = "BestQuality";
-
-      bestAverageWorstQualityCalculator3.AverageQualityParameter.ActualName = "CurrentAverageBestQuality";
-      bestAverageWorstQualityCalculator3.BestQualityParameter.ActualName = "CurrentBestBestQuality";
-      bestAverageWorstQualityCalculator3.MaximizationParameter.ActualName = MaximizationParameter.Name;
-      bestAverageWorstQualityCalculator3.QualityParameter.ActualName = "CurrentBestQuality";
-      bestAverageWorstQualityCalculator3.WorstQualityParameter.ActualName = "CurrentWorstBestQuality";
-
-      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
-      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
-      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
-      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
-      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
-      dataTableValuesCollector2.DataTableParameter.ActualName = "BestQualities";
-
-      qualityDifferenceCalculator2.AbsoluteDifferenceParameter.ActualName = "AbsoluteDifferenceBestKnownToBest";
-      qualityDifferenceCalculator2.FirstQualityParameter.ActualName = BestKnownQualityParameter.Name;
-      qualityDifferenceCalculator2.RelativeDifferenceParameter.ActualName = "RelativeDifferenceBestKnownToBest";
-      qualityDifferenceCalculator2.SecondQualityParameter.ActualName = "BestQuality";
-
-      migrationTerminationCondition.ConditionParameter.ActualName = "MigrationTerminate";
-      #endregion
-
-      #region Create operator graph
-      OperatorGraph.InitialOperator = variableCreator;
-      variableCreator.Successor = ussp0;
-      ussp0.Operator = islandVariableCreator;
-      ussp0.Successor = bestQualityMemorizer2;
-      islandVariableCreator.Successor = islandVariableAssigner;
-      islandVariableAssigner.Successor = bestQualityMemorizer1;
-      bestQualityMemorizer1.Successor = bestAverageWorstQualityCalculator1;
-      bestQualityMemorizer2.Successor = bestAverageWorstQualityCalculator2;
-      bestAverageWorstQualityCalculator2.Successor = dataTableValuesCollector1;
-      dataTableValuesCollector1.Successor = qualityDifferenceCalculator1;
-      qualityDifferenceCalculator1.Successor = resultsCollector;
-      resultsCollector.Successor = ussp1;
-      ussp1.Operator = mainLoop;
-      ussp1.Successor = migrator;
-      mainLoop.Successor = maximumGenerationsCounter;
-      maximumGenerationsCounter.Successor = emigrantsSelector;
-      emigrantsSelector.Successor = null;
-      migrator.Successor = ussp2;
-      ussp2.Operator = mergingReducer;
-      ussp2.Successor = migrationsCounter;
-      mergingReducer.Successor = immigrationSelector;
-      immigrationSelector.Successor = rightReducer;
-      rightReducer.Successor = null;
-      migrationsCounter.Successor = maxMigrationsComparator;
-      maxMigrationsComparator.Successor = bestQualityMemorizer3;
-      bestQualityMemorizer3.Successor = bestAverageWorstQualityCalculator3;
-      bestAverageWorstQualityCalculator3.Successor = dataTableValuesCollector2;
-      dataTableValuesCollector2.Successor = qualityDifferenceCalculator2;
-      qualityDifferenceCalculator2.Successor = migrationTerminationCondition;
-      migrationTerminationCondition.FalseBranch = ussp1;
-      migrationTerminationCondition.TrueBranch = null;
-      migrationTerminationCondition.Successor = null;
-      #endregion
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs	(revision 3479)
+++ trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs	(revision 3479)
@@ -0,0 +1,478 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.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;
+using HeuristicLab.Selection;
+
+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 : EngineAlgorithm {
+
+    #region Problem Properties
+    public override Type ProblemType {
+      get { return typeof(ISingleObjectiveProblem); }
+    }
+    public new ISingleObjectiveProblem Problem {
+      get { return (ISingleObjectiveProblem)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"]; }
+    }
+    private ConstrainedValueParameter<ISelector> SelectorParameter {
+      get { return (ConstrainedValueParameter<ISelector>)Parameters["Selector"]; }
+    }
+    private ConstrainedValueParameter<ICrossover> CrossoverParameter {
+      get { return (ConstrainedValueParameter<ICrossover>)Parameters["Crossover"]; }
+    }
+    private ValueParameter<PercentValue> MutationProbabilityParameter {
+      get { return (ValueParameter<PercentValue>)Parameters["MutationProbability"]; }
+    }
+    private OptionalConstrainedValueParameter<IManipulator> MutatorParameter {
+      get { return (OptionalConstrainedValueParameter<IManipulator>)Parameters["Mutator"]; }
+    }
+    private ValueParameter<IntValue> ElitesParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Elites"]; }
+    }
+    private ValueParameter<BoolValue> ParallelParameter {
+      get { return (ValueParameter<BoolValue>)Parameters["Parallel"]; }
+    }
+    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"]; }
+    }
+    private OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier> ComparisonFactorModifierParameter {
+      get { return (OptionalConstrainedValueParameter<IDiscreteDoubleValueModifier>)Parameters["ComparisonFactorModifier"]; }
+    }
+    private ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; }
+    }
+    private ValueLookupParameter<BoolValue> OffspringSelectionBeforeMutationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
+    }
+    #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 BoolValue Parallel {
+      get { return ParallelParameter.Value; }
+      set { ParallelParameter.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; }
+    }
+    private 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; }
+    }
+    private List<ISelector> selectors;
+    private IEnumerable<ISelector> Selectors {
+      get { return selectors; }
+    }
+    private List<IDiscreteDoubleValueModifier> comparisonFactorModifiers;
+    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 (SASEGASAMainLoop)VillageProcessor.Successor; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SASEGASA(bool deserializing) : base(deserializing) { }
+    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 ValueParameter<BoolValue>("Parallel", "True if the villages should be run in parallel (also requires a parallel engine)", new BoolValue(false)));
+      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<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation.", new BoolValue(false)));
+
+      RandomCreator randomCreator = new RandomCreator();
+      SubScopesCreator populationCreator = new SubScopesCreator();
+      UniformSubScopesProcessor ussp1 = new UniformSubScopesProcessor();
+      SolutionsCreator solutionsCreator = new SolutionsCreator();
+      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.Parallel = null;
+      ussp1.ParallelParameter.ActualName = ParallelParameter.Name;
+      ussp1.Operator = solutionsCreator;
+      ussp1.Successor = mainLoop;
+
+      solutionsCreator.NumberOfSolutionsParameter.ActualName = PopulationSizeParameter.Name;
+      solutionsCreator.Successor = null;
+
+
+      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.ComparisonFactorLowerBoundParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
+      mainLoop.ComparisonFactorModifierParameter.ActualName = ComparisonFactorModifierParameter.Name;
+      mainLoop.ComparisonFactorUpperBoundParameter.ActualName = ComparisonFactorUpperBoundParameter.Name;
+      mainLoop.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
+      mainLoop.MaximumGenerationsParameter.ActualName = MaximumGenerationsParameter.Name;
+      mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
+      mainLoop.Successor = null;
+
+      Initialize();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      SASEGASA clone = (SASEGASA)base.Clone(cloner);
+      clone.Initialize();
+      return clone;
+    }
+
+    public override void Prepare() {
+      if (Problem != null) base.Prepare();
+    }
+
+    #region Events
+    protected override void OnProblemChanged() {
+      ParameterizeStochasticOperator(Problem.SolutionCreator);
+      ParameterizeStochasticOperator(Problem.Evaluator);
+      ParameterizeStochasticOperator(Problem.Visualizer);
+      foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
+      ParameterizeSolutionsCreator();
+      ParameterizeMainLoop();
+      ParameterizeSelectors();
+      UpdateCrossovers();
+      UpdateMutators();
+      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      if (Problem.Visualizer != null) Problem.Visualizer.VisualizationParameter.ActualNameChanged += new EventHandler(Visualizer_VisualizationParameter_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();
+      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      base.Problem_EvaluatorChanged(sender, e);
+    }
+    protected override void Problem_VisualizerChanged(object sender, EventArgs e) {
+      ParameterizeStochasticOperator(Problem.Visualizer);
+      ParameterizeMainLoop();
+      if (Problem.Visualizer != null) Problem.Visualizer.VisualizationParameter.ActualNameChanged += new EventHandler(Visualizer_VisualizationParameter_ActualNameChanged);
+      base.Problem_VisualizerChanged(sender, e);
+    }
+    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
+      foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
+      UpdateCrossovers();
+      UpdateMutators();
+      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();
+    }
+    private void Visualizer_VisualizationParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeMainLoop();
+    }
+    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
+    [StorableHook(HookType.AfterDeserialization)]
+    private void Initialize() {
+      InitializeSelectors();
+      UpdateSelectors();
+      InitializeComparisonFactorModifiers();
+      UpdateComparisonFactorModifiers();
+      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) {
+        UpdateCrossovers();
+        UpdateMutators();
+        Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+        if (Problem.Visualizer != null) Problem.Visualizer.VisualizationParameter.ActualNameChanged += new EventHandler(Visualizer_VisualizationParameter_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.VisualizerParameter.ActualName = Problem.VisualizerParameter.Name;
+      MainLoop.MigrationIntervalParameter.Value = new IntValue(MaximumGenerations.Value / NumberOfVillages.Value);
+      if (Problem.Visualizer != null)
+        MainLoop.VisualizationParameter.ActualName = Problem.Visualizer.VisualizationParameter.ActualName;
+    }
+    private void ParameterizeStochasticOperator(IOperator op) {
+      if (op is IStochasticOperator)
+        ((IStochasticOperator)op).RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
+    }
+    private void InitializeSelectors() {
+      selectors = new List<ISelector>();
+      selectors.AddRange(ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name));
+      ParameterizeSelectors();
+    }
+    private void InitializeComparisonFactorModifiers() {
+      comparisonFactorModifiers = new List<IDiscreteDoubleValueModifier>();
+      comparisonFactorModifiers.AddRange(ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name));
+      ParameterizeComparisonFactorModifiers();
+    }
+    private void ParameterizeSelectors() {
+      foreach (ISelector selector in Selectors) {
+        selector.CopySelected = new BoolValue(true);
+        selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(2 * (PopulationSize.Value - Elites.Value));
+        ParameterizeStochasticOperator(selector);
+      }
+      if (Problem != null) {
+        foreach (ISingleObjectiveSelector selector in Selectors.OfType<ISingleObjectiveSelector>()) {
+          selector.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+          selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        }
+      }
+    }
+    private void ParameterizeComparisonFactorModifiers() {
+      foreach (IDiscreteDoubleValueModifier modifier in comparisonFactorModifiers) {
+        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 UpdateSelectors() {
+      ISelector oldSelector = SelectorParameter.Value;
+      SelectorParameter.ValidValues.Clear();
+      foreach (ISelector selector in Selectors.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;
+
+      if (oldSelector != null) {
+        ISelector selector = SelectorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldSelector.GetType());
+        if (selector != null) SelectorParameter.Value = selector;
+      }
+    }
+    private void UpdateComparisonFactorModifiers() {
+      IDiscreteDoubleValueModifier oldModifier = ComparisonFactorModifier;
+
+      ComparisonFactorModifierParameter.ValidValues.Clear();
+      foreach (IDiscreteDoubleValueModifier modifier in comparisonFactorModifiers)
+        ComparisonFactorModifierParameter.ValidValues.Add(modifier);
+
+      if (oldModifier != null) {
+        IDiscreteDoubleValueModifier mod = ComparisonFactorModifierParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldModifier.GetType());
+        if (mod != null) ComparisonFactorModifierParameter.Value = mod;
+      }
+    }
+    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;
+      }
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs	(revision 3479)
+++ trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs	(revision 3479)
@@ -0,0 +1,386 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Selection;
+
+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 SubScopesLookupParameter<DoubleValue> QualityParameter {
+      get { return (SubScopesLookupParameter<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> 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 ValueLookupParameter<DoubleValue> ComparisonFactorLowerBoundParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorLowerBound"]; }
+    }
+    public ValueLookupParameter<DoubleValue> ComparisonFactorUpperBoundParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["ComparisonFactorUpperBound"]; }
+    }
+    public ValueLookupParameter<IOperator> ComparisonFactorModifierParameter {
+      get { return (ValueLookupParameter<IOperator>)Parameters["ComparisonFactorModifier"]; }
+    }
+    public ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
+      get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; }
+    }
+    public ValueLookupParameter<IntValue> MaximumGenerationsParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["MaximumGenerations"]; }
+    }
+    public ValueLookupParameter<BoolValue> OffspringSelectionBeforeMutationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SASEGASAMainLoop(bool deserializing) : base() { }
+    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 SubScopesLookupParameter<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."));
+      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 ValueLookupParameter<DoubleValue>("ComparisonFactorLowerBound", "The lower bound of the comparison factor (start)."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>("ComparisonFactorUpperBound", "The upper bound of the comparison factor (end)."));
+      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<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."));
+      #endregion
+
+      #region Create operators
+      VariableCreator variableCreator = new VariableCreator();
+      Assigner villageCountAssigner = new Assigner();
+      Assigner comparisonFactorInitializer = new Assigner();
+      UniformSubScopesProcessor ussp0 = new UniformSubScopesProcessor();
+      VariableCreator islandVariableCreator = new VariableCreator();
+      Assigner islandVariableAssigner = new Assigner();
+      BestQualityMemorizer bestQualityMemorizer1 = new BestQualityMemorizer();
+      BestAverageWorstQualityCalculator bestAverageWorstQualityCalculator1 = new BestAverageWorstQualityCalculator();
+      BestQualityMemorizer bestQualityMemorizer2 = new BestQualityMemorizer();
+      BestAverageWorstQualityCalculator bestAverageWorstQualityCalculator2 = new BestAverageWorstQualityCalculator();
+      DataTableValuesCollector dataTableValuesCollector1 = new DataTableValuesCollector();
+      DataTableValuesCollector selPressValuesCollector1 = new DataTableValuesCollector();
+      QualityDifferenceCalculator qualityDifferenceCalculator1 = new QualityDifferenceCalculator();
+      ResultsCollector resultsCollector = new ResultsCollector();
+      UniformSubScopesProcessor ussp1 = new UniformSubScopesProcessor();
+      OffspringSelectionGeneticAlgorithmMainLoop mainLoop = new OffspringSelectionGeneticAlgorithmMainLoop();
+      UniformSubScopesProcessor ussp2 = new UniformSubScopesProcessor();
+      Comparator sasegasaGenVillageGenComparator = new Comparator();
+      ConditionalBranch sasegasaGenerationsUpdateBranch = new ConditionalBranch();
+      Assigner sasegasaGenerationsUpdater = new Assigner();
+      ConditionalBranch villageMaximumGenerationsConditionalBranch = new ConditionalBranch();
+      IntCounter villageMaximumGenerationsCounter = new IntCounter();
+      Comparator villageCountComparator = new Comparator();
+      ConditionalBranch villageTerminationCondition0 = new ConditionalBranch();
+      SASEGASAReunificator reunificator = new SASEGASAReunificator();
+      IntCounter reunificationCounter = new IntCounter();
+      Placeholder comparisonFactorModifier = new Placeholder();
+      Comparator maximumGenerationsComparator = new Comparator();
+      BestQualityMemorizer bestQualityMemorizer3 = new BestQualityMemorizer();
+      BestAverageWorstQualityCalculator bestAverageWorstQualityCalculator3 = new BestAverageWorstQualityCalculator();
+      DataTableValuesCollector dataTableValuesCollector2 = new DataTableValuesCollector();
+      DataTableValuesCollector selPressValuesCollector2 = new DataTableValuesCollector();
+      QualityDifferenceCalculator qualityDifferenceCalculator2 = new QualityDifferenceCalculator();
+      ConditionalBranch villagesTerminationCondition = new ConditionalBranch();
+      ConditionalBranch maximumGenerationsTerminationCondition = new ConditionalBranch();
+
+      // The generations of SASEGASA progress with the generations of its villages
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("SASEGASAGenerations", new IntValue(0)));
+
+      villageCountAssigner.LeftSideParameter.ActualName = "VillageCount";
+      villageCountAssigner.RightSideParameter.ActualName = NumberOfVillagesParameter.Name;
+
+      comparisonFactorInitializer.LeftSideParameter.ActualName = "ComparisonFactor";
+      comparisonFactorInitializer.RightSideParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
+
+      islandVariableCreator.CollectedValues.Add(new ValueParameter<ResultCollection>("VillageResults", new ResultCollection()));
+      islandVariableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("SelectionPressure", new DoubleValue(0)));
+
+      islandVariableAssigner.LeftSideParameter.ActualName = "VillageMaximumGenerations";
+      islandVariableAssigner.RightSideParameter.ActualName = MigrationIntervalParameter.Name;
+
+      bestQualityMemorizer1.BestQualityParameter.ActualName = "BestQuality";
+      bestQualityMemorizer1.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      bestQualityMemorizer1.QualityParameter.ActualName = QualityParameter.Name;
+
+      bestAverageWorstQualityCalculator1.AverageQualityParameter.ActualName = "CurrentAverageQuality";
+      bestAverageWorstQualityCalculator1.BestQualityParameter.ActualName = "CurrentBestQuality";
+      bestAverageWorstQualityCalculator1.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      bestAverageWorstQualityCalculator1.QualityParameter.ActualName = QualityParameter.Name;
+      bestAverageWorstQualityCalculator1.WorstQualityParameter.ActualName = "CurrentWorstQuality";
+
+      bestQualityMemorizer2.BestQualityParameter.ActualName = "BestQuality";
+      bestQualityMemorizer2.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      bestQualityMemorizer2.QualityParameter.ActualName = "BestQuality";
+
+      bestAverageWorstQualityCalculator2.AverageQualityParameter.ActualName = "CurrentAverageBestQuality";
+      bestAverageWorstQualityCalculator2.BestQualityParameter.ActualName = "CurrentBestBestQuality";
+      bestAverageWorstQualityCalculator2.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      bestAverageWorstQualityCalculator2.QualityParameter.ActualName = "CurrentBestQuality";
+      bestAverageWorstQualityCalculator2.WorstQualityParameter.ActualName = "CurrentWorstBestQuality";
+
+      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
+      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
+      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
+      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
+      dataTableValuesCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
+      dataTableValuesCollector1.DataTableParameter.ActualName = "BestQualities";
+
+      selPressValuesCollector1.CollectedValues.Add(new SubScopesLookupParameter<DoubleValue>("Selection Pressure Village", null, "SelectionPressure"));
+      selPressValuesCollector1.DataTableParameter.ActualName = "VillagesSelectionPressures";
+
+      qualityDifferenceCalculator1.AbsoluteDifferenceParameter.ActualName = "AbsoluteDifferenceBestKnownToBest";
+      qualityDifferenceCalculator1.FirstQualityParameter.ActualName = BestKnownQualityParameter.Name;
+      qualityDifferenceCalculator1.RelativeDifferenceParameter.ActualName = "RelativeDifferenceBestKnownToBest";
+      qualityDifferenceCalculator1.SecondQualityParameter.ActualName = "BestQuality";
+
+      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Generations", null, "SASEGASAGenerations"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Current Villages", null, "VillageCount"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Absolute Difference of Best Known Quality to Best Quality", null, "AbsoluteDifferenceBestKnownToBest"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Relative Difference of Best Known Quality to Best Quality", null, "RelativeDifferenceBestKnownToBest"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>("BestQualities"));
+      resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>("VillagesSelectionPressures"));
+      resultsCollector.CollectedValues.Add(new SubScopesLookupParameter<ResultCollection>("VillageResults", "Result set for each village"));
+      resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name;
+
+      mainLoop.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name;
+      mainLoop.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      mainLoop.QualityParameter.ActualName = QualityParameter.Name;
+      mainLoop.SelectorParameter.ActualName = SelectorParameter.Name;
+      mainLoop.CrossoverParameter.ActualName = CrossoverParameter.Name;
+      mainLoop.ElitesParameter.ActualName = ElitesParameter.Name;
+      mainLoop.MaximumGenerationsParameter.ActualName = "VillageMaximumGenerations";
+      mainLoop.MutatorParameter.ActualName = MutatorParameter.Name;
+      mainLoop.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
+      mainLoop.MutationProbabilityParameter.ActualName = MutationProbabilityParameter.Name;
+      mainLoop.RandomParameter.ActualName = RandomParameter.Name;
+      mainLoop.ResultsParameter.ActualName = "VillageResults";
+      mainLoop.VisualizerParameter.ActualName = VisualizerParameter.Name;
+      mainLoop.VisualizationParameter.ActualName = VisualizationParameter.Name;
+      mainLoop.SuccessRatioParameter.ActualName = SuccessRatioParameter.Name;
+      mainLoop.ComparisonFactorLowerBoundParameter.ActualName = ComparisonFactorLowerBoundParameter.Name;
+      mainLoop.ComparisonFactorModifierParameter.Value = new EmptyOperator(); // comparison factor is modified here
+      mainLoop.ComparisonFactorUpperBoundParameter.ActualName = ComparisonFactorUpperBoundParameter.Name;
+      mainLoop.MaximumSelectionPressureParameter.ActualName = MaximumSelectionPressureParameter.Name;
+      mainLoop.OffspringSelectionBeforeMutationParameter.ActualName = OffspringSelectionBeforeMutationParameter.Name;
+
+      // SASEGASAGenerations is the maximum of all village generations
+      sasegasaGenVillageGenComparator.LeftSideParameter.ActualName = "SASEGASAGenerations";
+      sasegasaGenVillageGenComparator.RightSideParameter.ActualName = "Generations";
+      sasegasaGenVillageGenComparator.Comparison = new Comparison(ComparisonType.Less);
+      sasegasaGenVillageGenComparator.ResultParameter.ActualName = "UpdateSASEGASAGenerations";
+
+      sasegasaGenerationsUpdateBranch.ConditionParameter.ActualName = "UpdateSASEGASAGenerations";
+
+      sasegasaGenerationsUpdater.LeftSideParameter.ActualName = "SASEGASAGenerations";
+      sasegasaGenerationsUpdater.RightSideParameter.ActualName = "Generations";
+
+      // check if the village has terminated due to reaching maximum generations (in that case we need to increase maximum generations by the migration interval)
+      villageMaximumGenerationsConditionalBranch.ConditionParameter.ActualName = "TerminateMaximumGenerations";
+
+      // if the village terminated because of maximum generations (inter-migration period) its maximum generations are updated
+      villageMaximumGenerationsCounter.ValueParameter.ActualName = "VillageMaximumGenerations";
+      villageMaximumGenerationsCounter.Increment = null;
+      villageMaximumGenerationsCounter.IncrementParameter.ActualName = "MigrationInterval";
+
+      // if there's just one island left and we're getting to this point SASEGASA terminates
+      villageCountComparator.Name = "VillageCount <= 1 ?";
+      villageCountComparator.LeftSideParameter.ActualName = "VillageCount";
+      villageCountComparator.RightSideParameter.Value = new IntValue(1);
+      villageCountComparator.Comparison.Value = ComparisonType.LessOrEqual;
+      villageCountComparator.ResultParameter.ActualName = "TerminateVillages";
+
+      villageTerminationCondition0.Name = "Skip reunification?";
+      villageTerminationCondition0.ConditionParameter.ActualName = "TerminateVillages";
+
+      reunificator.VillageCountParameter.ActualName = "VillageCount";
+
+      reunificationCounter.ValueParameter.ActualName = "Reunifications"; // this variable is referenced in SASEGASA, do not change!
+      reunificationCounter.IncrementParameter.Value = new IntValue(1);
+
+      comparisonFactorModifier.OperatorParameter.ActualName = ComparisonFactorModifierParameter.Name;
+
+      // if SASEGASAGenerations is reaching MaximumGenerations we're also terminating
+      maximumGenerationsComparator.LeftSideParameter.ActualName = "SASEGASAGenerations";
+      maximumGenerationsComparator.RightSideParameter.ActualName = MaximumGenerationsParameter.Name;
+      maximumGenerationsComparator.Comparison = new Comparison(ComparisonType.GreaterOrEqual);
+      maximumGenerationsComparator.ResultParameter.ActualName = "TerminateMaximumGenerations";
+
+      bestQualityMemorizer3.BestQualityParameter.ActualName = "BestQuality";
+      bestQualityMemorizer3.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      bestQualityMemorizer3.QualityParameter.ActualName = "BestQuality";
+
+      bestAverageWorstQualityCalculator3.AverageQualityParameter.ActualName = "CurrentAverageBestQuality";
+      bestAverageWorstQualityCalculator3.BestQualityParameter.ActualName = "CurrentBestBestQuality";
+      bestAverageWorstQualityCalculator3.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      bestAverageWorstQualityCalculator3.QualityParameter.ActualName = "CurrentBestQuality";
+      bestAverageWorstQualityCalculator3.WorstQualityParameter.ActualName = "CurrentWorstBestQuality";
+
+      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best BestQuality", null, "CurrentBestBestQuality"));
+      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average BestQuality", null, "CurrentAverageBestQuality"));
+      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst BestQuality", null, "CurrentWorstBestQuality"));
+      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));
+      dataTableValuesCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, BestKnownQualityParameter.Name));
+      dataTableValuesCollector2.DataTableParameter.ActualName = "BestQualities";
+
+      selPressValuesCollector2.CollectedValues.Add(new SubScopesLookupParameter<DoubleValue>("Selection Pressure Village", null, "SelectionPressure"));
+      selPressValuesCollector2.DataTableParameter.ActualName = "VillagesSelectionPressures";
+
+      qualityDifferenceCalculator2.AbsoluteDifferenceParameter.ActualName = "AbsoluteDifferenceBestKnownToBest";
+      qualityDifferenceCalculator2.FirstQualityParameter.ActualName = BestKnownQualityParameter.Name;
+      qualityDifferenceCalculator2.RelativeDifferenceParameter.ActualName = "RelativeDifferenceBestKnownToBest";
+      qualityDifferenceCalculator2.SecondQualityParameter.ActualName = "BestQuality";
+
+      villagesTerminationCondition.ConditionParameter.ActualName = "TerminateVillages";
+      villageMaximumGenerationsConditionalBranch.ConditionParameter.ActualName = "TerminateMaximumGenerations";
+      #endregion
+
+      #region Create operator graph
+      OperatorGraph.InitialOperator = variableCreator;
+      variableCreator.Successor = villageCountAssigner;
+      villageCountAssigner.Successor = comparisonFactorInitializer;
+      comparisonFactorInitializer.Successor = ussp0;
+      ussp0.Operator = islandVariableCreator;
+      ussp0.Successor = bestQualityMemorizer2;
+      islandVariableCreator.Successor = islandVariableAssigner;
+      islandVariableAssigner.Successor = bestQualityMemorizer1;
+      bestQualityMemorizer1.Successor = bestAverageWorstQualityCalculator1;
+      bestQualityMemorizer2.Successor = bestAverageWorstQualityCalculator2;
+      bestAverageWorstQualityCalculator2.Successor = dataTableValuesCollector1;
+      dataTableValuesCollector1.Successor = selPressValuesCollector1;
+      selPressValuesCollector1.Successor = qualityDifferenceCalculator1;
+      qualityDifferenceCalculator1.Successor = resultsCollector;
+      resultsCollector.Successor = ussp1;
+      ussp1.Operator = mainLoop;
+      ussp1.Successor = ussp2;
+      mainLoop.Successor = sasegasaGenVillageGenComparator;
+      sasegasaGenVillageGenComparator.Successor = sasegasaGenerationsUpdateBranch;
+      sasegasaGenerationsUpdateBranch.TrueBranch = sasegasaGenerationsUpdater;
+      sasegasaGenerationsUpdateBranch.FalseBranch = null;
+      sasegasaGenerationsUpdateBranch.Successor = null;
+      ussp2.Operator = villageMaximumGenerationsConditionalBranch;
+      ussp2.Successor = villageCountComparator;
+      villageMaximumGenerationsConditionalBranch.TrueBranch = villageMaximumGenerationsCounter;
+      villageMaximumGenerationsConditionalBranch.FalseBranch = null;
+      villageMaximumGenerationsConditionalBranch.Successor = null;
+      villageMaximumGenerationsCounter.Successor = null;
+      villageCountComparator.Successor = villageTerminationCondition0;
+      villageTerminationCondition0.TrueBranch = null;
+      villageTerminationCondition0.FalseBranch = reunificator;
+      villageTerminationCondition0.Successor = maximumGenerationsComparator;
+      reunificator.Successor = reunificationCounter;
+      reunificationCounter.Successor = comparisonFactorModifier;
+      comparisonFactorModifier.Successor = null;
+      maximumGenerationsComparator.Successor = bestQualityMemorizer3;
+      bestQualityMemorizer3.Successor = bestAverageWorstQualityCalculator3;
+      bestAverageWorstQualityCalculator3.Successor = dataTableValuesCollector2;
+      dataTableValuesCollector2.Successor = selPressValuesCollector2;
+      selPressValuesCollector2.Successor = qualityDifferenceCalculator2;
+      qualityDifferenceCalculator2.Successor = villagesTerminationCondition;
+      villagesTerminationCondition.FalseBranch = maximumGenerationsTerminationCondition;
+      villagesTerminationCondition.TrueBranch = null;
+      villagesTerminationCondition.Successor = null;
+      maximumGenerationsTerminationCondition.FalseBranch = ussp1;
+      maximumGenerationsTerminationCondition.TrueBranch = null;
+      maximumGenerationsTerminationCondition.Successor = null;
+      #endregion
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Analysis/3.3/DataTableValuesCollector.cs
===================================================================
--- trunk/sources/HeuristicLab.Analysis/3.3/DataTableValuesCollector.cs	(revision 3478)
+++ trunk/sources/HeuristicLab.Analysis/3.3/DataTableValuesCollector.cs	(revision 3479)
@@ -52,15 +52,38 @@
 
       foreach (IParameter param in CollectedValues) {
-        DoubleValue data = param.ActualValue as DoubleValue;
-        if (data == null) data = new DoubleValue(double.NaN);
-
-        DataRow row;
-        table.Rows.TryGetValue(param.Name, out row);
-        if (row == null) {
-          row = new DataRow(param.Name, param.Description);
-          row.Values.Add(data.Value);
-          table.Rows.Add(row);
+        if (param.ActualValue is DoubleValue) {
+          DoubleValue data = param.ActualValue as DoubleValue;
+          DataRow row;
+          table.Rows.TryGetValue(param.Name, out row);
+          if (row == null) {
+            row = new DataRow(param.Name, param.Description);
+            row.Values.Add(data.Value);
+            table.Rows.Add(row);
+          } else {
+            row.Values.Add(data.Value);
+          }
+        } else if (param.ActualValue is ItemArray<DoubleValue>) {
+          ItemArray<DoubleValue> dataArray = param.ActualValue as ItemArray<DoubleValue>;
+          DataRow row;
+          for (int i = 0; i < dataArray.Length; i++) {
+            table.Rows.TryGetValue(param.Name + i.ToString(), out row);
+            if (row == null) {
+              row = new DataRow(param.Name + i.ToString(), param.Description);
+              row.Values.Add(dataArray[i].Value);
+              table.Rows.Add(row);
+            } else {
+              row.Values.Add(dataArray[i].Value);
+            }
+          }
         } else {
-          row.Values.Add(data.Value);
+          DataRow row;
+          table.Rows.TryGetValue(param.Name, out row);
+          if (row == null) {
+            row = new DataRow(param.Name, param.Description);
+            row.Values.Add(double.NaN);
+            table.Rows.Add(row);
+          } else {
+            row.Values.Add(double.NaN);
+          }
         }
       }
Index: trunk/sources/HeuristicLab.Optimization.Operators/3.3/SASEGASAReunificator.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Operators/3.3/SASEGASAReunificator.cs	(revision 3478)
+++ trunk/sources/HeuristicLab.Optimization.Operators/3.3/SASEGASAReunificator.cs	(revision 3479)
@@ -26,4 +26,6 @@
 using HeuristicLab.Operators;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Optimization.Operators {
@@ -32,28 +34,36 @@
   /// scopes by 1 and uniformly partitions the sub sub scopes again, maintaining the order.
   /// </summary>
-  /*[Item("SASEGASAReunificator", "This operator merges the villages in a migration phase and redistributes the individuals. It is implemented as described in Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications, CRC Press.")]
+  [Item("SASEGASAReunificator", "This operator merges the villages in a migration phase and redistributes the individuals. It is implemented as described in Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications, CRC Press.")]
   [StorableClass]
   public class SASEGASAReunificator : SingleSuccessorOperator, IMigrator {
 
+    public LookupParameter<IntValue> VillageCountParameter {
+      get { return (LookupParameter<IntValue>)Parameters["VillageCount"]; }
+    }
+
+    public SASEGASAReunificator()
+      : base() {
+      Parameters.Add(new LookupParameter<IntValue>("VillageCount", "The number of villages left after the reunification."));
+    }
     /// <summary>
     /// Joins all sub sub scopes of the given <paramref name="scope"/>, reduces the number of sub 
     /// scopes by 1 and uniformly partitions the sub sub scopes again, maintaining the order.
     /// </summary>
-    /// <exception cref="InvalidOperationException">Thrown when only 0 or 1 sub scope is available.</exception>
+    /// <exception cref="InvalidOperationException">Thrown when there are less than 2 sub-scopes available or when VillageCount does not equal the number of sub-scopes.</exception>
     /// <param name="scope">The current scope whose sub scopes to reduce.</param>
     /// <returns><c>null</c>.</returns>
     public override IOperation Apply() {
       IScope scope = ExecutionContext.Scope;
-      int villageCount = scope.SubScopes.Count;
+      if (VillageCountParameter.ActualValue == null) VillageCountParameter.ActualValue = new IntValue(scope.SubScopes.Count);
+      int villageCount = VillageCountParameter.ActualValue.Value;
       if (villageCount <= 1)
-        throw new InvalidOperationException("SASEGASA reunification requires 2 or more sub-scopes");
+        throw new InvalidOperationException(Name + ": Reunification requires 2 or more sub-scopes");
+      if (villageCount != scope.SubScopes.Count)
+        throw new InvalidOperationException(Name + ": VillageCount does not equal the number of sub-scopes");
 
       // get all villages
-      IList<IScope> population = new List<IScope>();
+      List<IScope> population = new List<IScope>();
       for (int i = 0; i < villageCount; i++) {
-        while (scope.SubScopes[i].SubScopes[0].SubScopes.Count > 0) {
-          population.Add(scope.SubScopes[i].SubScopes[0].SubScopes[0]);
-          scope.SubScopes[i].SubScopes.Remove(scope.SubScopes[i].SubScopes[0].SubScopes[0]);
-        }
+        population.AddRange(scope.SubScopes[i].SubScopes);
         scope.SubScopes[i].SubScopes.Clear();
       }
@@ -64,20 +74,16 @@
       int populationPerVillage = population.Count / villageCount;
       for (int i = 0; i < villageCount; i++) {
-        scope.SubScopes[i].SubScopes.Add(new Scope());
-        scope.SubScopes[i].SubScopes.Add(new Scope());
-        for (int j = 0; j < populationPerVillage; j++) {
-          scope.SubScopes[i].SubScopes[1].SubScopes.Add(population[0]);
-          population.RemoveAt(0);
-        }
+        scope.SubScopes[i].SubScopes.AddRange(population.GetRange(0, populationPerVillage));
+        population.RemoveRange(0, populationPerVillage);
       }
 
       // add remaining sub-sub-scopes to last sub-scope
-      while (population.Count > 0) {
-        scope.SubScopes[scope.SubScopes.Count - 1].SubScopes[1].SubScopes.Add(population[0]);
-        population.RemoveAt(0);
-      }
+      scope.SubScopes[scope.SubScopes.Count - 1].SubScopes.AddRange(population);
+      population.Clear();
+
+      VillageCountParameter.ActualValue.Value = villageCount;
 
       return base.Apply();
     }
-  }*/
+  }
 }
Index: trunk/sources/HeuristicLab.Parameters/3.3/SubScopesLookupParameter.cs
===================================================================
--- trunk/sources/HeuristicLab.Parameters/3.3/SubScopesLookupParameter.cs	(revision 3478)
+++ trunk/sources/HeuristicLab.Parameters/3.3/SubScopesLookupParameter.cs	(revision 3479)
@@ -35,4 +35,5 @@
     public SubScopesLookupParameter(string name) : base(name) { }
     public SubScopesLookupParameter(string name, string description) : base(name, description) { }
+    public SubScopesLookupParameter(string name, string description, string actualName) : base(name, description, actualName) { }
 
     protected override IItem GetActualValue() {
Index: trunk/sources/HeuristicLab.Selection/3.3/OffspringSelector.cs
===================================================================
--- trunk/sources/HeuristicLab.Selection/3.3/OffspringSelector.cs	(revision 3478)
+++ trunk/sources/HeuristicLab.Selection/3.3/OffspringSelector.cs	(revision 3479)
@@ -34,7 +34,4 @@
   public class OffspringSelector : SingleSuccessorOperator {
 
-    public ValueLookupParameter<IntValue> PopulationSizeParameter {
-      get { return (ValueLookupParameter<IntValue>)Parameters["PopulationSize"]; }
-    }
     public ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
       get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; }
@@ -66,5 +63,4 @@
     public OffspringSelector()
       : base() {
-      Parameters.Add(new ValueLookupParameter<IntValue>("PopulationSize", "The number of offspring to create."));
       Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure which prematurely terminates the offspring selection step."));
       Parameters.Add(new ValueLookupParameter<DoubleValue>("SuccessRatio", "The ratio of successful offspring that has to be produced."));
@@ -77,5 +73,4 @@
 
     public override IOperation Apply() {
-      int populationSize = PopulationSizeParameter.ActualValue.Value;
       double maxSelPress = MaximumSelectionPressureParameter.ActualValue.Value;
       double successRatio = SuccessRatioParameter.ActualValue.Value;
@@ -83,4 +78,5 @@
       IScope parents = scope.SubScopes[0];
       IScope children = scope.SubScopes[1];
+      int populationSize = parents.SubScopes.Count;
 
       // retrieve actual selection pressure and success ratio
