Index: /branches/ScatterSearch/Build.cmd
===================================================================
--- /branches/ScatterSearch/Build.cmd	(revision 7722)
+++ /branches/ScatterSearch/Build.cmd	(revision 7722)
@@ -0,0 +1,104 @@
+@ECHO OFF
+
+SET CLEANBEFOREBUILD=
+
+SET SELECTED=
+SET CONFIGURATION=
+SET PLATFORM=
+
+IF "%~1"=="" GOTO :prompt_solution
+
+SET SELECTED=%1
+IF NOT EXIST %SELECTED% (
+  ECHO Solution file %SELECTED% could not be found.
+  GOTO :end
+)
+ECHO Building solution %SELECTED% ...
+GOTO :config_selection
+
+:prompt_solution
+SET /A COUNT=0
+FOR /F "tokens=*" %%A IN ('dir /B *.sln') DO (
+  CALL :forloopbody "%%A"
+)
+
+IF "%COUNT%"=="1" (
+  SET SELECTED=%SOLUTIONS.1%
+  ECHO Building %SOLUTIONS.1% as it is the only solution that was found ...
+  GOTO :config_selection
+)
+
+ECHO Found the following solutions:
+FOR /F "tokens=2* delims=.=" %%A IN ('SET SOLUTIONS.') DO ECHO %%A = %%B
+ECHO.
+SET /P SOLUTIONINDEX=Which solution to build? Type the number: 
+
+SET SELECTED=""
+FOR /F "tokens=2* delims=.=" %%A IN ('SET SOLUTIONS.') DO (
+  IF "%%A"=="%SOLUTIONINDEX%" SET SELECTED=%%B
+)
+
+IF %SELECTED%=="" GOTO :eof
+
+:config_selection
+IF "%~2"==""  GOTO :prompt_config
+
+SET CONFIGURATION=%~2
+ECHO Building configuration %CONFIGURATION% ...
+GOTO :platform_selection
+
+:prompt_config
+SET /P CONFIGURATION=Which configuration to build [Release]: 
+IF "%CONFIGURATION%"=="" SET CONFIGURATION=Release
+
+:platform_selection
+IF "%~3"=="" GOTO :prompt_platform
+  
+SET PLATFORM=%~3
+ECHO Building platform %PLATFORM% ...
+GOTO :clean
+
+:prompt_platform
+SET /P PLATFORM=Which platform to build [Any CPU]: 
+IF "%PLATFORM%"=="" SET PLATFORM=Any CPU
+
+:clean
+IF "%~4"=="" GOTO :prompt_clean
+
+SET CLEANBEFOREBUILD=%~4
+GOTO :main
+
+:prompt_clean
+SET /P CLEANBEFOREBUILD=Would you like to clean before building [n]: 
+IF "%CLEANBEFOREBUILD%"=="" SET CLEANBEFOREBUILD=n
+
+:main
+REM First find the path to the msbuild.exe by performing a registry query
+FOR /F "tokens=1,3 delims=	 " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0"') DO (
+  IF "%%A"=="MSBuildToolsPath" SET MSBUILDPATH=%%B)
+
+REM Then execute msbuild to clean and build the solution
+REM Disable that msbuild creates a cache file of the solution
+SET MSBuildUseNoSolutionCache=1
+REM Run msbuild to clean and then build
+IF "%CLEANBEFOREBUILD%" NEQ "n" (
+  ECHO Cleaning ...
+  %MSBUILDPATH%msbuild.exe %SELECTED% /target:Clean /p:Configuration="%CONFIGURATION%",Platform="%PLATFORM%" /m:2 /nologo /verbosity:q /clp:ErrorsOnly
+)
+ECHO Building ...
+%MSBUILDPATH%msbuild.exe %SELECTED% /target:Build /p:Configuration="%CONFIGURATION%",Platform="%PLATFORM%" /m:2 /nologo /verbosity:q /clp:ErrorsOnly
+
+ECHO.
+ECHO DONE.
+
+:end
+
+PAUSE
+
+GOTO :eof
+
+REM This workaround is necessary so that COUNT gets reevaluated
+:forloopbody
+SET /A COUNT+=1
+SET SOLUTIONS.%COUNT%=%1
+GOTO :eof
Index: /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch.sln
===================================================================
--- /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch.sln	(revision 7722)
+++ /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch.sln	(revision 7722)
@@ -0,0 +1,20 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.ScatterSearch-3.3", "HeuristicLab.Algorithms.ScatterSearch\3.3\HeuristicLab.Algorithms.ScatterSearch-3.3.csproj", "{5FEE5DB4-7FD9-4CBD-BEC2-3FEE17B31A94}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{5FEE5DB4-7FD9-4CBD-BEC2-3FEE17B31A94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{5FEE5DB4-7FD9-4CBD-BEC2-3FEE17B31A94}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5FEE5DB4-7FD9-4CBD-BEC2-3FEE17B31A94}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{5FEE5DB4-7FD9-4CBD-BEC2-3FEE17B31A94}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/HeuristicLab.Algorithms.ScatterSearch-3.3.csproj
===================================================================
--- /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/HeuristicLab.Algorithms.ScatterSearch-3.3.csproj	(revision 7722)
+++ /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/HeuristicLab.Algorithms.ScatterSearch-3.3.csproj	(revision 7722)
@@ -0,0 +1,116 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{5FEE5DB4-7FD9-4CBD-BEC2-3FEE17B31A94}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Algorithms.ScatterSearch</RootNamespace>
+    <AssemblyName>HeuristicLab.Algorithms.ScatterSearch-3.3</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="HeuristicLab.Algorithms.LocalSearch-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
+    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
+    <Reference Include="HeuristicLab.Collections-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.BinaryVectorEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
+    <Reference Include="HeuristicLab.Operators-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Operators-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Parameters-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Persistence-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
+    <Reference Include="HeuristicLab.Problems.Knapsack-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
+    <Reference Include="HeuristicLab.Random-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Selection-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+    <Compile Include="ReferenceSetUpdateMethod.cs" />
+    <Compile Include="PopulationRebuildMethod.cs" />
+    <Compile Include="ScatterSearch.cs" />
+    <Compile Include="ScatterSearchMainLoop.cs" />
+    <Compile Include="SolutionCombinationMethod.cs" />
+    <Compile Include="SolutionPoolUpdateMethod.cs" />
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+</PreBuildEvent>
+  </PropertyGroup>
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/Plugin.cs.frame
===================================================================
--- /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/Plugin.cs.frame	(revision 7722)
+++ /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/Plugin.cs.frame	(revision 7722)
@@ -0,0 +1,44 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Algorithms.ScatterSearch {
+  /// <summary>
+  /// Plugin class for HeuristicLab.Algorithms.ScatterSearch plugin.
+  /// </summary>
+  [Plugin("HeuristicLab.Algorithms.ScatterSearch", "3.3.6.$WCREV$")]
+  [PluginFile("HeuristicLab.Algorithms.ScatterSearch-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Random", "3.3")]
+  [PluginDependency("HeuristicLab.Selection", "3.3")]
+  public class HeuristicLabAlgorithmsScatterSearchPlugin : PluginBase {
+  }
+}
Index: /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/PopulationRebuildMethod.cs
===================================================================
--- /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/PopulationRebuildMethod.cs	(revision 7722)
+++ /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/PopulationRebuildMethod.cs	(revision 7722)
@@ -0,0 +1,95 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ScatterSearch {
+  /// <summary>
+  /// An operator that updates a population.
+  /// </summary>
+  [Item("PopulationRebuildMethod", "An operator that rebuilds the population.")]
+  [StorableClass]
+  public sealed class PopulationRebuildMethod : SingleSuccessorOperator {
+    #region Parameter properties
+    private ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter)Parameters["CurrentScope"]; }
+    }
+    public ValueLookupParameter<IntValue> NumberOfHighQualitySolutionsParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["NumberOfHighQualitySolutions"]; }
+    }
+    public ValueLookupParameter<IntValue> ReferenceSetSizeParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["ReferenceSetSize"]; }
+    }
+    #endregion
+
+    #region Properties
+    public IScope CurrentScope {
+      get { return CurrentScopeParameter.ActualValue; }
+    }
+    public IntValue NumberOfHighQualitySolutions {
+      get { return NumberOfHighQualitySolutionsParameter.ActualValue; }
+      set { NumberOfHighQualitySolutionsParameter.ActualValue = value; }
+    }
+    public IntValue ReferenceSetSize {
+      get { return ReferenceSetSizeParameter.ActualValue; }
+      set { ReferenceSetSizeParameter.ActualValue = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private PopulationRebuildMethod(bool deserializing) : base(deserializing) { }
+    private PopulationRebuildMethod(PopulationRebuildMethod original, Cloner cloner) : base(original, cloner) { }
+    public PopulationRebuildMethod() : base() { Initialize(); }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PopulationRebuildMethod(this, cloner);
+    }
+
+    private void Initialize() {
+      #region Create parameters
+      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope to which the new solutions are added as sub-scopes."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfHighQualitySolutions", "The number of high quality solutions that should be added to the reference set."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("ReferenceSetSize", "The size of the reference set."));
+      #endregion
+
+      #region Create operators
+      #endregion
+
+      #region Create operator graph
+      #endregion
+    }
+
+    public override IOperation Apply() {
+      IScope population = CurrentScope.SubScopes[0];
+      IScope refSet = CurrentScope.SubScopes[1];
+      refSet.SubScopes.Replace(refSet.SubScopes.OrderByDescending(r => r.Variables["Quality"].Value)
+                                               .Take(NumberOfHighQualitySolutions.Value).ToList());
+      population.SubScopes.Clear();
+      return base.Apply();
+    }
+  }
+}
Index: /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/Properties/AssemblyInfo.cs.frame	(revision 7722)
+++ /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/Properties/AssemblyInfo.cs.frame	(revision 7722)
@@ -0,0 +1,55 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Algorithms.ScatterSearch")]
+[assembly: AssemblyDescription("HeuristicLab scatter search algorithm")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2012 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("0e5a9ea2-d21b-436f-a034-6f62340476ba")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.6.$WCREV$")]
Index: /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/ReferenceSetUpdateMethod.cs
===================================================================
--- /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/ReferenceSetUpdateMethod.cs	(revision 7722)
+++ /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/ReferenceSetUpdateMethod.cs	(revision 7722)
@@ -0,0 +1,115 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ScatterSearch {
+  /// <summary>
+  /// An operator that updates the reference set.
+  /// </summary>
+  [Item("ReferenceSetUpdateMethod", "An operator that updates the reference set.")]
+  [StorableClass]
+  public sealed class ReferenceSetUpdateMethod : SingleSuccessorOperator {
+    #region Parameter properties
+    private ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter)Parameters["CurrentScope"]; }
+    }
+    public ValueLookupParameter<IntValue> NumberOfHighQualitySolutionsParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["NumberOfHighQualitySolutions"]; }
+    }
+    public ValueLookupParameter<IntValue> ReferenceSetSizeParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["ReferenceSetSize"]; }
+    }
+    #endregion
+
+    #region Properties
+    public IScope CurrentScope {
+      get { return CurrentScopeParameter.ActualValue; }
+    }
+    public IntValue NumberOfHighQualitySolutions {
+      get { return NumberOfHighQualitySolutionsParameter.ActualValue; }
+      set { NumberOfHighQualitySolutionsParameter.ActualValue = value; }
+    }
+    public IntValue ReferenceSetSize {
+      get { return ReferenceSetSizeParameter.ActualValue; }
+      set { ReferenceSetSizeParameter.ActualValue = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private ReferenceSetUpdateMethod(bool deserializing) : base(deserializing) { }
+    private ReferenceSetUpdateMethod(ReferenceSetUpdateMethod original, Cloner cloner) : base(original, cloner) { }
+    public ReferenceSetUpdateMethod() : base() { Initialize(); }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ReferenceSetUpdateMethod(this, cloner);
+    }
+
+    private void Initialize() {
+      #region Create parameters
+      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope to which the new solutions are added as sub-scopes."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfHighQualitySolutions", "The number of high quality solutions that should be added to the reference set."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("ReferenceSetSize", "The size of the reference set."));
+      #endregion
+
+      #region Create operators
+      #endregion
+
+      #region Create operator graph
+      #endregion
+    }
+
+    public override IOperation Apply() {
+      for (int i = 0; i < ReferenceSetSize.Value - NumberOfHighQualitySolutions.Value; i++) {
+        IScope mostDiverseSolution = null;
+        int maxDiversity = 0;
+        foreach (var p in CurrentScope.SubScopes[0].SubScopes) {
+          int diversity = 0;
+          BinaryVector pSol = p.Variables["KnapsackSolution"].Value as BinaryVector;
+          foreach (var r in CurrentScope.SubScopes[1].SubScopes) {
+            BinaryVector rSol = r.Variables["KnapsackSolution"].Value as BinaryVector;
+            if (pSol != null && rSol != null) {
+              diversity += CalculateDiversity(pSol, rSol);
+            }
+            if (mostDiverseSolution == null || diversity > maxDiversity)
+              mostDiverseSolution = p;
+          }
+        }
+        CurrentScope.SubScopes[1].SubScopes.Add(mostDiverseSolution); // Update parent?
+        CurrentScope.SubScopes[0].SubScopes.Remove(mostDiverseSolution); // Update parent?
+      }
+      return base.Apply();
+    }
+
+    private int CalculateDiversity(BinaryVector pSol, BinaryVector rSol) {
+      int diversity = 0;
+      for (int i = 0; i < pSol.Length; i++)
+        if (pSol[i] != rSol[i]) diversity++;
+      return diversity;
+    }
+  }
+}
Index: /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/ScatterSearch.cs
===================================================================
--- /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/ScatterSearch.cs	(revision 7722)
+++ /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/ScatterSearch.cs	(revision 7722)
@@ -0,0 +1,488 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Algorithms.LocalSearch;
+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.Random;
+using HeuristicLab.Selection;
+
+namespace HeuristicLab.Algorithms.ScatterSearch {
+  [Item("Scatter Search", "A scatter search algorithm.")]
+  [Creatable("Algorithms")]
+  [StorableClass]
+  public sealed class ScatterSearch : HeuristicOptimizationEngineAlgorithm, IStorableContent {
+    public string Filename { get; set; }
+
+    #region Problem Properties
+    public override Type ProblemType {
+      get { return typeof(ISingleObjectiveHeuristicOptimizationProblem); }
+    }
+    public new ISingleObjectiveHeuristicOptimizationProblem Problem {
+      get { return (ISingleObjectiveHeuristicOptimizationProblem)base.Problem; }
+      set { base.Problem = value; }
+    }
+    #endregion
+
+    #region Parameter Properties
+    private ValueParameter<MultiAnalyzer> AnalyzerParameter {
+      get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
+    }
+    private ValueParameter<IntValue> MaximumIterationsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaximumIterations"]; }
+    }
+    public ConstrainedValueParameter<ISingleObjectiveMoveEvaluator> MoveEvaluatorParameter {
+      get { return (ConstrainedValueParameter<ISingleObjectiveMoveEvaluator>)Parameters["MoveEvaluator"]; }
+    }
+    public ConstrainedValueParameter<IMoveGenerator> MoveGeneratorParameter {
+      get { return (ConstrainedValueParameter<IMoveGenerator>)Parameters["MoveGenerator"]; }
+    }
+    public ConstrainedValueParameter<IMoveMaker> MoveMakerParameter {
+      get { return (ConstrainedValueParameter<IMoveMaker>)Parameters["MoveMaker"]; }
+    }
+    private ValueParameter<IntValue> NumberOfHighQualitySolutionsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["NumberOfHighQualitySolutions"]; }
+    }
+    private ValueParameter<IntValue> PopulationSizeParameter {
+      get { return (ValueParameter<IntValue>)Parameters["PopulationSize"]; }
+    }
+    private ValueParameter<IntValue> ReferenceSetSizeParameter {
+      get { return (ValueParameter<IntValue>)Parameters["ReferenceSetSize"]; }
+    }
+    private ValueParameter<IntValue> SampleSizeParameter {
+      get { return (ValueParameter<IntValue>)Parameters["SampleSize"]; }
+    }
+    private ValueParameter<IntValue> SeedParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Seed"]; }
+    }
+    private ValueParameter<BoolValue> SetSeedRandomlyParameter {
+      get { return (ValueParameter<BoolValue>)Parameters["SetSeedRandomly"]; }
+    }
+    private RandomCreator RandomCreator {
+      get { return (RandomCreator)OperatorGraph.InitialOperator; }
+    }
+    private SolutionsCreator SolutionsCreator {
+      get { return (SolutionsCreator)RandomCreator.Successor; }
+    }
+    private ScatterSearchMainLoop MainLoop {
+      get { return FindMainLoop(SolutionsCreator.Successor); }
+    }
+    #endregion
+
+    #region Properties
+    public MultiAnalyzer Analyzer {
+      get { return AnalyzerParameter.Value; }
+      set { AnalyzerParameter.Value = value; }
+    }
+    public IntValue MaximumIterations {
+      get { return MaximumIterationsParameter.Value; }
+      set { MaximumIterationsParameter.Value = value; }
+    }
+    public ISingleObjectiveMoveEvaluator MoveEvaluator {
+      get { return MoveEvaluatorParameter.Value; }
+      set { MoveEvaluatorParameter.Value = value; }
+    }
+    public IMoveGenerator MoveGenerator {
+      get { return MoveGeneratorParameter.Value; }
+      set { MoveGeneratorParameter.Value = value; }
+    }
+    public IMoveMaker MoveMaker {
+      get { return MoveMakerParameter.Value; }
+      set { MoveMakerParameter.Value = value; }
+    }
+    public IntValue NumberOfHighQualitySolutions {
+      get { return NumberOfHighQualitySolutionsParameter.Value; }
+      set { NumberOfHighQualitySolutionsParameter.Value = value; }
+    }
+    public IntValue PopulationSize {
+      get { return PopulationSizeParameter.Value; }
+      set { PopulationSizeParameter.Value = value; }
+    }
+    public IntValue ReferenceSetSize {
+      get { return ReferenceSetSizeParameter.Value; }
+      set { ReferenceSetSizeParameter.Value = value; }
+    }
+    public IntValue SampleSize {
+      get { return SampleSizeParameter.Value; }
+      set { SampleSizeParameter.Value = value; }
+    }
+    public IntValue Seed {
+      get { return SeedParameter.Value; }
+      set { SeedParameter.Value = value; }
+    }
+    public BoolValue SetSeedRandomly {
+      get { return SetSeedRandomlyParameter.Value; }
+      set { SetSeedRandomlyParameter.Value = value; }
+    }
+
+    [Storable]
+    private BestAverageWorstQualityAnalyzer moveQualityAnalyzer;
+    #endregion
+
+    [StorableConstructor]
+    private ScatterSearch(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      Initialize();
+    }
+    private ScatterSearch(ScatterSearch original, Cloner cloner)
+      : base(original, cloner) {
+      moveQualityAnalyzer = cloner.Clone(original.moveQualityAnalyzer);
+      Initialize();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ScatterSearch(this, cloner);
+    }
+    public ScatterSearch()
+      : base() {
+      #region Create parameters
+      Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze the solution and moves.", new MultiAnalyzer()));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumIterations", "The maximum number of generations which should be processed.", new IntValue(5)));
+      Parameters.Add(new ConstrainedValueParameter<ISingleObjectiveMoveEvaluator>("MoveEvaluator", "The operator used to evaluate a move."));
+      Parameters.Add(new ConstrainedValueParameter<IMoveGenerator>("MoveGenerator", "The operator used to generate moves to the neighborhood of the current solution."));
+      Parameters.Add(new ConstrainedValueParameter<IMoveMaker>("MoveMaker", "The operator used to perform a move."));
+      Parameters.Add(new ValueParameter<IntValue>("NumberOfHighQualitySolutions", "The number of high quality solutions that should be added to the reference set.", new IntValue(6)));
+      Parameters.Add(new ValueParameter<IntValue>("PopulationSize", "The size of the population.", new IntValue(30)));
+      Parameters.Add(new ValueParameter<IntValue>("ReferenceSetSize", "The size of the reference set.", new IntValue(10)));
+      Parameters.Add(new ValueParameter<IntValue>("SampleSize", "Number of moves that MultiMoveGenerators should create. This is ignored for Exhaustive- and SingleMoveGenerators.", new IntValue(100)));
+      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)));
+      #endregion
+
+      #region Create operators
+      RandomCreator randomCreator = new RandomCreator();
+      SolutionsCreator solutionsCreator = new SolutionsCreator();
+      UniformSubScopesProcessor uniformSubScopesProcessor = new UniformSubScopesProcessor();
+      LocalSearchImprovementOperator localImprovementOperator = new LocalSearchImprovementOperator();
+      BestSelector bestSelector = new BestSelector();
+      VariableCreator variableCreator = new VariableCreator();
+      ResultsCollector resultsCollector = new ResultsCollector();
+      ScatterSearchMainLoop mainLoop = new ScatterSearchMainLoop();
+      #endregion
+
+      #region Create operator graph
+      OperatorGraph.InitialOperator = randomCreator;
+      randomCreator.RandomParameter.ActualName = "Random";
+      randomCreator.SeedParameter.ActualName = SeedParameter.Name;
+      randomCreator.SetSeedRandomlyParameter.ActualName = SetSeedRandomlyParameter.Name;
+      randomCreator.Successor = solutionsCreator;
+
+      solutionsCreator.Name = "DiversificationGenerationMethod";
+      solutionsCreator.NumberOfSolutionsParameter.ActualName = "PopulationSize";
+      solutionsCreator.Successor = uniformSubScopesProcessor;
+
+      uniformSubScopesProcessor.Operator = localImprovementOperator;
+      uniformSubScopesProcessor.Successor = bestSelector;
+
+      localImprovementOperator.Name = "ImprovementMethod";
+      localImprovementOperator.MaximumIterationsParameter.ActualName = MaximumIterationsParameter.Name;
+      localImprovementOperator.SampleSizeParameter.ActualName = SampleSizeParameter.Name;
+      localImprovementOperator.Successor = null;
+
+      bestSelector.NumberOfSelectedSubScopesParameter.ActualName = NumberOfHighQualitySolutionsParameter.Name;
+      bestSelector.CopySelected = new BoolValue(false);
+      bestSelector.Successor = variableCreator;
+
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Iterations", new IntValue(0)));
+      variableCreator.CollectedValues.Add(new ValueParameter<BoolValue>("NewSolutions", new BoolValue(false)));
+      variableCreator.Successor = resultsCollector;
+
+      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Iterations"));
+      resultsCollector.ResultsParameter.ActualName = "Results";
+      resultsCollector.Successor = mainLoop;
+
+      mainLoop.MaximumIterationsParameter.ActualName = MaximumIterationsParameter.Name;
+      mainLoop.RandomParameter.ActualName = randomCreator.RandomParameter.ActualName;
+      mainLoop.ResultsParameter.ActualName = "Results";
+      mainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name;
+      mainLoop.IterationsParameter.ActualName = "Iterations";
+      mainLoop.PopulationSizeParameter.ActualName = PopulationSizeParameter.Name;
+      mainLoop.NumberOfHighQualitySolutionsParameter.ActualName = NumberOfHighQualitySolutionsParameter.Name;
+      mainLoop.Successor = null;
+      #endregion
+
+      moveQualityAnalyzer = new BestAverageWorstQualityAnalyzer();
+      ParameterizeAnalyzers();
+      UpdateAnalyzers();
+
+      Initialize();
+    }
+
+    public override void Prepare() {
+      if (Problem != null && MoveGenerator != null && MoveMaker != null && MoveEvaluator != null)
+        base.Prepare();
+    }
+
+    #region Events
+    protected override void OnProblemChanged() {
+      ParameterizeStochasticOperator(Problem.SolutionCreator);
+      ParameterizeStochasticOperator(Problem.Evaluator);
+      foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
+      foreach (ISingleObjectiveMoveEvaluator op in Problem.Operators.OfType<ISingleObjectiveMoveEvaluator>()) {
+        op.MoveQualityParameter.ActualNameChanged += new EventHandler(MoveEvaluator_MoveQualityParameter_ActualNameChanged);
+      }
+      ParameterizeSolutionsCreator();
+      ParameterizeMainLoop();
+      UpdateMoveGenerator();
+      UpdateMoveParameters();
+      UpdateAnalyzers();
+      ParameterizeMoveGenerators();
+      ParameterizeMoveEvaluators();
+      ParameterizeMoveMakers();
+      ParameterizeAnalyzers();
+      ParameterizeIterationBasedOperators();
+      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      base.OnProblemChanged();
+    }
+
+    protected override void Problem_SolutionCreatorChanged(object sender, EventArgs e) {
+      ParameterizeStochasticOperator(Problem.SolutionCreator);
+      ParameterizeSolutionsCreator();
+      base.Problem_SolutionCreatorChanged(sender, e);
+    }
+
+    protected override void Problem_EvaluatorChanged(object sender, EventArgs e) {
+      ParameterizeStochasticOperator(Problem.Evaluator);
+      ParameterizeSolutionsCreator();
+      ParameterizeMainLoop();
+      ParameterizeMoveEvaluators();
+      ParameterizeMoveMakers();
+      ParameterizeAnalyzers();
+      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      base.Problem_EvaluatorChanged(sender, e);
+    }
+
+    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
+      foreach (IOperator op in Problem.Operators) ParameterizeStochasticOperator(op);
+      // This may seem pointless, but some operators already have the eventhandler registered, others don't
+      // FIXME: Is there another way to solve this problem?
+      foreach (ISingleObjectiveMoveEvaluator op in Problem.Operators.OfType<ISingleObjectiveMoveEvaluator>()) {
+        op.MoveQualityParameter.ActualNameChanged -= new EventHandler(MoveEvaluator_MoveQualityParameter_ActualNameChanged);
+        op.MoveQualityParameter.ActualNameChanged += new EventHandler(MoveEvaluator_MoveQualityParameter_ActualNameChanged);
+      }
+      UpdateMoveGenerator();
+      UpdateMoveParameters();
+      UpdateAnalyzers();
+      ParameterizeMainLoop();
+      ParameterizeMoveGenerators();
+      ParameterizeMoveEvaluators();
+      ParameterizeMoveMakers();
+      ParameterizeAnalyzers();
+      ParameterizeIterationBasedOperators();
+      base.Problem_OperatorsChanged(sender, e);
+    }
+    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeMainLoop();
+      ParameterizeMoveEvaluators();
+      ParameterizeMoveMakers();
+    }
+    private void MoveGeneratorParameter_ValueChanged(object sender, EventArgs e) {
+      UpdateMoveParameters();
+    }
+    private void MoveEvaluatorParameter_ValueChanged(object sender, EventArgs e) {
+      ParameterizeMainLoop();
+      ParameterizeMoveEvaluators();
+      ParameterizeMoveMakers();
+      ParameterizeAnalyzers();
+    }
+    private void MoveEvaluator_MoveQualityParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeMainLoop();
+      ParameterizeMoveEvaluators();
+      ParameterizeMoveMakers();
+      ParameterizeAnalyzers();
+    }
+    #endregion
+
+    #region Helpers
+    private void Initialize() {
+      if (Problem != null) {
+        Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+        foreach (ISingleObjectiveMoveEvaluator op in Problem.Operators.OfType<ISingleObjectiveMoveEvaluator>()) {
+          op.MoveQualityParameter.ActualNameChanged += new EventHandler(MoveEvaluator_MoveQualityParameter_ActualNameChanged);
+        }
+      }
+      MoveGeneratorParameter.ValueChanged += new EventHandler(MoveGeneratorParameter_ValueChanged);
+      MoveEvaluatorParameter.ValueChanged += new EventHandler(MoveEvaluatorParameter_ValueChanged);
+    }
+    private void UpdateMoveGenerator() {
+      IMoveGenerator oldMoveGenerator = MoveGenerator;
+      IMoveGenerator defaultMoveGenerator = Problem.Operators.OfType<IMoveGenerator>().FirstOrDefault();
+      MoveGeneratorParameter.ValidValues.Clear();
+      if (Problem != null) {
+        foreach (IMoveGenerator generator in Problem.Operators.OfType<IMoveGenerator>().OrderBy(x => x.Name))
+          MoveGeneratorParameter.ValidValues.Add(generator);
+      }
+      if (oldMoveGenerator != null) {
+        IMoveGenerator newMoveGenerator = MoveGeneratorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldMoveGenerator.GetType());
+        if (newMoveGenerator != null) MoveGenerator = newMoveGenerator;
+        else oldMoveGenerator = null;
+      }
+      if (oldMoveGenerator == null && defaultMoveGenerator != null)
+        MoveGenerator = defaultMoveGenerator;
+      if (MoveGenerator == null) {
+        ClearMoveParameters();
+      }
+    }
+    private void UpdateMoveParameters() {
+      IMoveMaker oldMoveMaker = MoveMaker;
+      ISingleObjectiveMoveEvaluator oldMoveEvaluator = MoveEvaluator;
+      ClearMoveParameters();
+      if (MoveGenerator != null) {
+        List<Type> moveTypes = MoveGenerator.GetType().GetInterfaces().Where(x => typeof(IMoveOperator).IsAssignableFrom(x)).ToList();
+        foreach (Type type in moveTypes.ToList()) {
+          if (moveTypes.Any(t => t != type && type.IsAssignableFrom(t)))
+            moveTypes.Remove(type);
+        }
+
+        var operators = Problem.Operators.Where(op => moveTypes.Any(m => m.IsInstanceOfType(op))).ToList();
+        IMoveMaker defaultMoveMaker = operators.OfType<IMoveMaker>().FirstOrDefault();
+        ISingleObjectiveMoveEvaluator defaultMoveEvaluator = operators.OfType<ISingleObjectiveMoveEvaluator>().FirstOrDefault();
+        foreach (IMoveMaker moveMaker in operators.OfType<IMoveMaker>().OrderBy(op => op.Name))
+          MoveMakerParameter.ValidValues.Add(moveMaker);
+        foreach (ISingleObjectiveMoveEvaluator moveEvaluator in operators.OfType<ISingleObjectiveMoveEvaluator>().OrderBy(op => op.Name))
+          MoveEvaluatorParameter.ValidValues.Add(moveEvaluator);
+
+        if (oldMoveMaker != null) {
+          IMoveMaker mm = MoveMakerParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldMoveMaker.GetType());
+          if (mm != null) MoveMaker = mm;
+          else oldMoveMaker = null;
+        }
+        if (oldMoveMaker == null && defaultMoveMaker != null)
+          MoveMaker = defaultMoveMaker;
+
+        if (oldMoveEvaluator != null) {
+          ISingleObjectiveMoveEvaluator me = MoveEvaluatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldMoveEvaluator.GetType());
+          if (me != null) MoveEvaluator = me;
+          else oldMoveEvaluator = null;
+        }
+        if (oldMoveEvaluator == null && defaultMoveEvaluator != null)
+          MoveEvaluator = defaultMoveEvaluator;
+      }
+    }
+    private void UpdateAnalyzers() {
+      Analyzer.Operators.Clear();
+      if (Problem != null) {
+        foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>()) {
+          foreach (IScopeTreeLookupParameter param in analyzer.Parameters.OfType<IScopeTreeLookupParameter>())
+            param.Depth = 0;
+          Analyzer.Operators.Add(analyzer, analyzer.EnabledByDefault);
+        }
+      }
+      Analyzer.Operators.Add(moveQualityAnalyzer, moveQualityAnalyzer.EnabledByDefault);
+    }
+    private void ClearMoveParameters() {
+      MoveMakerParameter.ValidValues.Clear();
+      MoveEvaluatorParameter.ValidValues.Clear();
+    }
+    private void ParameterizeSolutionsCreator() {
+      SolutionsCreator.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
+      SolutionsCreator.SolutionCreatorParameter.ActualName = Problem.SolutionCreatorParameter.Name;
+    }
+    private void ParameterizeMainLoop() {
+      if (Problem != null) {
+        //MainLoop.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
+        //MainLoop.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+        //MainLoop.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+      }
+      if (MoveEvaluator != null) ;
+      //MainLoop.MoveQualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName;
+    }
+    private void ParameterizeStochasticOperator(IOperator op) {
+      if (op is IStochasticOperator) {
+        IStochasticOperator stOp = (IStochasticOperator)op;
+        stOp.RandomParameter.ActualName = RandomCreator.RandomParameter.ActualName;
+        stOp.RandomParameter.Hidden = true;
+      }
+    }
+    private void ParameterizeMoveGenerators() {
+      if (Problem != null) {
+        foreach (IMultiMoveGenerator generator in Problem.Operators.OfType<IMultiMoveGenerator>()) {
+          generator.SampleSizeParameter.ActualName = SampleSizeParameter.Name;
+          generator.SampleSizeParameter.Hidden = true;
+        }
+      }
+    }
+    private void ParameterizeMoveEvaluators() {
+      foreach (ISingleObjectiveMoveEvaluator op in Problem.Operators.OfType<ISingleObjectiveMoveEvaluator>()) {
+        op.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        op.QualityParameter.Hidden = true;
+      }
+    }
+    private void ParameterizeMoveMakers() {
+      foreach (IMoveMaker op in Problem.Operators.OfType<IMoveMaker>()) {
+        op.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        op.QualityParameter.Hidden = true;
+        if (MoveEvaluator != null) {
+          op.MoveQualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName;
+          op.MoveQualityParameter.Hidden = true;
+        } else {
+          op.MoveQualityParameter.Hidden = false;
+        }
+      }
+    }
+    private void ParameterizeAnalyzers() {
+      moveQualityAnalyzer.ResultsParameter.ActualName = "Results";
+      moveQualityAnalyzer.ResultsParameter.Hidden = true;
+      if (Problem != null) {
+        moveQualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+        moveQualityAnalyzer.MaximizationParameter.Hidden = true;
+        if (MoveEvaluator != null) {
+          moveQualityAnalyzer.QualityParameter.ActualName = MoveEvaluator.MoveQualityParameter.ActualName;
+          moveQualityAnalyzer.QualityParameter.Hidden = true;
+        } else moveQualityAnalyzer.QualityParameter.Hidden = false;
+        moveQualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
+        moveQualityAnalyzer.BestKnownQualityParameter.Hidden = true;
+      } else {
+        moveQualityAnalyzer.MaximizationParameter.Hidden = false;
+        moveQualityAnalyzer.BestKnownQualityParameter.Hidden = false;
+      }
+    }
+    private void ParameterizeIterationBasedOperators() {
+      if (Problem != null) {
+        foreach (IIterationBasedOperator op in Problem.Operators.OfType<IIterationBasedOperator>()) {
+          op.IterationsParameter.ActualName = "Iterations";
+          op.IterationsParameter.Hidden = true;
+          op.MaximumIterationsParameter.ActualName = MaximumIterationsParameter.Name;
+          op.MaximumIterationsParameter.Hidden = true;
+        }
+      }
+    }
+
+    private ScatterSearchMainLoop FindMainLoop(IOperator start) {
+      IOperator mainLoop = start;
+      while (mainLoop != null && !(mainLoop is ScatterSearchMainLoop))
+        mainLoop = ((SingleSuccessorOperator)mainLoop).Successor;
+      if (mainLoop == null) return null;
+      else return (ScatterSearchMainLoop)mainLoop;
+    }
+    #endregion
+  }
+}
Index: /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/ScatterSearchMainLoop.cs
===================================================================
--- /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/ScatterSearchMainLoop.cs	(revision 7722)
+++ /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/ScatterSearchMainLoop.cs	(revision 7722)
@@ -0,0 +1,262 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Algorithms.LocalSearch;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ScatterSearch {
+  /// <summary>
+  /// An operator which represents a scatter search.
+  /// </summary>
+  [Item("ScatterSearchMainLoop", "An operator which represents the main loop of a scatter search.")]
+  [StorableClass]
+  public sealed class ScatterSearchMainLoop : AlgorithmOperator {
+    #region Parameter properties
+    internal LookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    internal LookupParameter<IntValue> IterationsParameter {
+      get { return (LookupParameter<IntValue>)Parameters["Iterations"]; }
+    }
+    internal LookupParameter<IntValue> MaximumIterationsParameter {
+      get { return (LookupParameter<IntValue>)Parameters["MaximumIterations"]; }
+    }
+    internal LookupParameter<IntValue> SampleSizeParameter {
+      get { return (LookupParameter<IntValue>)Parameters["SampleSize"]; }
+    }
+    internal LookupParameter<IntValue> PopulationSizeParameter {
+      get { return (LookupParameter<IntValue>)Parameters["PopulationSize"]; }
+    }
+    internal LookupParameter<IntValue> ReferenceSetSizeParameter {
+      get { return (LookupParameter<IntValue>)Parameters["ReferenceSetSize"]; }
+    }
+    internal LookupParameter<IntValue> NumberOfHighQualitySolutionsParameter {
+      get { return (LookupParameter<IntValue>)Parameters["NumberOfHighQualitySolutions"]; }
+    }
+    internal LookupParameter<VariableCollection> ResultsParameter {
+      get { return (LookupParameter<VariableCollection>)Parameters["Results"]; }
+    }
+    internal LookupParameter<IMultiAnalyzer> AnalyzerParameter {
+      get { return (LookupParameter<IMultiAnalyzer>)Parameters["Analyzer"]; }
+    }
+    #endregion
+
+    #region Properties
+    public IRandom Random {
+      get { return RandomParameter.ActualValue; }
+      set { RandomParameter.ActualValue = value; }
+    }
+    public IntValue Iterations {
+      get { return IterationsParameter.ActualValue; }
+      set { IterationsParameter.ActualValue = value; }
+    }
+    public IntValue MaximumIterations {
+      get { return MaximumIterationsParameter.ActualValue; }
+      set { MaximumIterationsParameter.ActualValue = value; }
+    }
+    public IntValue SampleSize {
+      get { return SampleSizeParameter.ActualValue; }
+      set { SampleSizeParameter.ActualValue = value; }
+    }
+    public IntValue PopulationSize {
+      get { return PopulationSizeParameter.ActualValue; }
+      set { PopulationSizeParameter.ActualValue = value; }
+    }
+    public IntValue ReferenceSetSize {
+      get { return ReferenceSetSizeParameter.ActualValue; }
+      set { ReferenceSetSizeParameter.ActualValue = value; }
+    }
+    public IntValue NumberOfHighQualitySolutions {
+      get { return NumberOfHighQualitySolutionsParameter.ActualValue; }
+      set { NumberOfHighQualitySolutionsParameter.ActualValue = value; }
+    }
+    public VariableCollection Results {
+      get { return ResultsParameter.ActualValue; }
+      set { ResultsParameter.ActualValue = value; }
+    }
+    public IMultiAnalyzer Analyzer {
+      get { return AnalyzerParameter.ActualValue; }
+      set { AnalyzerParameter.ActualValue = value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private ScatterSearchMainLoop(bool deserializing) : base(deserializing) { }
+    private ScatterSearchMainLoop(ScatterSearchMainLoop original, Cloner cloner) : base(original, cloner) { }
+    public ScatterSearchMainLoop() : base() { Initialize(); }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ScatterSearchMainLoop(this, cloner);
+    }
+
+    private void Initialize() {
+      #region Create parameters
+      Parameters.Add(new LookupParameter<IRandom>("Random", "A pseudo random number generator."));
+      Parameters.Add(new LookupParameter<IntValue>("Iterations", "The number of iterations performed."));
+      Parameters.Add(new LookupParameter<IntValue>("MaximumIterations", "The maximum number of generations which should be processed."));
+      Parameters.Add(new LookupParameter<IntValue>("SampleSize", "Number of moves that MultiMoveGenerators should create. This is ignored for Exhaustive- and SingleMoveGenerators."));
+      Parameters.Add(new LookupParameter<IntValue>("PopulationSize", "The size of the population."));
+      Parameters.Add(new LookupParameter<IntValue>("ReferenceSetSize", "The size of the reference set."));
+      Parameters.Add(new LookupParameter<IntValue>("NumberOfHighQualitySolutions", "The number of high quality solutions that should be added to the reference set."));
+      Parameters.Add(new LookupParameter<IOperator>("SolutionCreator", "The operator which is used to create new solutions."));
+      Parameters.Add(new LookupParameter<IOperator>("Evaluator", "The operator which is used to evaluate new solutions. This operator is executed in parallel, if an engine is used which supports parallelization."));
+      Parameters.Add(new LookupParameter<IOperator>("Improver", "The operator which is used to improve new solutions. This operator is executed in parallelm, if an engine is used which supports parallelization."));
+      Parameters.Add(new LookupParameter<VariableCollection>("Results", "The variable collection where results should be stored."));
+      Parameters.Add(new LookupParameter<IOperator>("MoveGenerator", "The operator that generates the moves."));
+      Parameters.Add(new LookupParameter<IOperator>("MoveMaker", "The operator that performs a move and updates the quality."));
+      Parameters.Add(new LookupParameter<IOperator>("MoveEvaluator", "The operator that evaluates a move."));
+      Parameters.Add(new LookupParameter<IMultiAnalyzer>("Analyzer", "The operator used to analyze the solution and moves."));
+      #endregion
+
+      #region Create operators
+      Assigner assigner1 = new Assigner();
+      Assigner assigner2 = new Assigner();
+      ChildrenCreator childrenCreator = new ChildrenCreator();
+      Comparator iterationsChecker = new Comparator();
+      ConditionalBranch newSolutionsBranch = new ConditionalBranch();
+      ConditionalBranch terminateBranch = new ConditionalBranch();
+      IntCounter interationsCounter = new IntCounter();
+      LocalSearchImprovementOperator localImprovementOperator = new LocalSearchImprovementOperator();
+      Placeholder solutionImprover = new Placeholder();
+      Placeholder solutionEvaluator = new Placeholder();
+      PopulationRebuildMethod populationRebuildMethod = new PopulationRebuildMethod();
+      ResultsCollector resultsCollector = new ResultsCollector();
+      ReferenceSetUpdateMethod referenceSetUpdateMethod = new ReferenceSetUpdateMethod();
+      SolutionCombinationMethod solutionCombinationMethod = new SolutionCombinationMethod();
+      SolutionPoolUpdateMethod solutionPoolUpdateMethod = new SolutionPoolUpdateMethod();
+      SolutionsCreator solutionsCreator = new SolutionsCreator();
+      SubScopesProcessor subScopesProcessor1 = new SubScopesProcessor();
+      SubScopesProcessor subScopesProcessor2 = new SubScopesProcessor();
+      SubScopesProcessor subScopesProcessor3 = new SubScopesProcessor();
+      UniformSubScopesProcessor uniformSubScopesProcessor1 = new UniformSubScopesProcessor();
+      UniformSubScopesProcessor uniformSubScopesProcessor2 = new UniformSubScopesProcessor();
+      UniformSubScopesProcessor uniformSubScopesProcessor3 = new UniformSubScopesProcessor();
+      #endregion
+
+      #region Create operator graph
+      OperatorGraph.InitialOperator = interationsCounter;
+      assigner1.Name = "NewSolutions = true";
+      assigner1.LeftSideParameter.ActualName = "NewSolutions";
+      assigner1.RightSideParameter.Value = new BoolValue(true);
+      assigner1.Successor = newSolutionsBranch;
+
+      assigner2.Name = "NewSolutions = false";
+      assigner2.LeftSideParameter.ActualName = "NewSolutions";
+      assigner2.RightSideParameter.Value = new BoolValue(false);
+      assigner2.Successor = uniformSubScopesProcessor1;
+
+      childrenCreator.Name = "SubsetGenerator";
+      childrenCreator.ParentsPerChildParameter.Value = new IntValue(2);
+      childrenCreator.Successor = assigner2;
+
+      iterationsChecker.Name = "IterationsChecker";
+      iterationsChecker.Comparison.Value = ComparisonType.GreaterOrEqual;
+      iterationsChecker.LeftSideParameter.ActualName = "Iterations";
+      iterationsChecker.RightSideParameter.ActualName = "MaximumIterations";
+      iterationsChecker.ResultParameter.ActualName = "Terminate";
+      iterationsChecker.Successor = terminateBranch;
+
+      localImprovementOperator.Name = "ImprovementMethod";
+      localImprovementOperator.MaximumIterationsParameter.ActualName = MaximumIterationsParameter.Name;
+      localImprovementOperator.SampleSizeParameter.ActualName = SampleSizeParameter.Name;
+      localImprovementOperator.Successor = null;
+
+      newSolutionsBranch.Name = "NewSolutionChecker";
+      newSolutionsBranch.ConditionParameter.ActualName = "NewSolutions";
+      newSolutionsBranch.TrueBranch = subScopesProcessor1;
+      newSolutionsBranch.FalseBranch = populationRebuildMethod;
+      newSolutionsBranch.Successor = null;
+
+      terminateBranch.Name = "TerminateChecker";
+      terminateBranch.ConditionParameter.ActualName = "Terminate";
+      terminateBranch.TrueBranch = new EmptyOperator();
+      terminateBranch.FalseBranch = referenceSetUpdateMethod;
+      terminateBranch.Successor = null;
+
+      interationsCounter.Name = "IterationCounter";
+      interationsCounter.IncrementParameter.Value = new IntValue(1);
+      interationsCounter.ValueParameter.ActualName = "Iterations";
+      interationsCounter.Successor = resultsCollector;
+
+      solutionImprover.Name = "SolutionImprover";
+      solutionImprover.OperatorParameter.ActualName = "LocalImprovementOperator";
+      solutionImprover.Successor = solutionEvaluator;
+
+      solutionEvaluator.Name = "SolutionEvaluator";
+      solutionEvaluator.OperatorParameter.ActualName = "Evaluator";
+      solutionEvaluator.Successor = null;
+
+      populationRebuildMethod.Successor = subScopesProcessor3;
+
+      resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>(IterationsParameter.Name));
+      resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name;
+      resultsCollector.Successor = iterationsChecker;
+
+      referenceSetUpdateMethod.Successor = assigner1;
+
+      solutionCombinationMethod.Successor = subScopesProcessor2;
+
+      solutionsCreator.Name = "DiversificationGenerationMethod";
+      solutionsCreator.NumberOfSolutionsParameter.ActualName = "PopulationSize";
+      solutionsCreator.Successor = uniformSubScopesProcessor3;
+
+      subScopesProcessor1.DepthParameter.Value = new IntValue(1);
+      subScopesProcessor1.Operators.Add(new EmptyOperator());
+      subScopesProcessor1.Operators.Add(childrenCreator);
+      subScopesProcessor1.Successor = newSolutionsBranch;
+
+      subScopesProcessor2.DepthParameter.Value = new IntValue(1);
+      subScopesProcessor2.Operators.Add(new EmptyOperator());
+      subScopesProcessor2.Operators.Add(new EmptyOperator());
+      subScopesProcessor2.Operators.Add(uniformSubScopesProcessor2);
+      subScopesProcessor2.Successor = null;
+
+      subScopesProcessor3.DepthParameter.Value = new IntValue(1);
+      subScopesProcessor3.Operators.Add(solutionsCreator);
+      subScopesProcessor3.Operators.Add(new EmptyOperator());
+      subScopesProcessor3.Successor = interationsCounter;
+
+      uniformSubScopesProcessor1.DepthParameter.Value = new IntValue(1);
+      uniformSubScopesProcessor1.Operator = solutionCombinationMethod;
+      uniformSubScopesProcessor1.Successor = solutionPoolUpdateMethod;
+
+      uniformSubScopesProcessor2.DepthParameter.Value = new IntValue(1);
+      uniformSubScopesProcessor2.Operator = solutionImprover;
+      uniformSubScopesProcessor2.Successor = null;
+
+      uniformSubScopesProcessor3.DepthParameter.Value = new IntValue(1);
+      uniformSubScopesProcessor3.Operator = localImprovementOperator;
+      uniformSubScopesProcessor3.Successor = null;
+      #endregion
+    }
+
+    public override IOperation Apply() {
+      return base.Apply();
+    }
+  }
+}
Index: /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/SolutionCombinationMethod.cs
===================================================================
--- /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/SolutionCombinationMethod.cs	(revision 7722)
+++ /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/SolutionCombinationMethod.cs	(revision 7722)
@@ -0,0 +1,93 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ScatterSearch {
+  /// <summary>
+  /// An operator that combines solutions to three trial solutions.
+  /// </summary>
+  [Item("SolutionCombinationMethod", "An operator that combines solutions to three trial solutions.")]
+  [StorableClass]
+  public sealed class SolutionCombinationMethod : SingleSuccessorOperator {
+    #region Parameter properties
+    private ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter)Parameters["CurrentScope"]; }
+    }
+    #endregion
+
+    #region Properties
+    public IScope CurrentScope {
+      get { return CurrentScopeParameter.ActualValue; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SolutionCombinationMethod(bool deserializing) : base(deserializing) { }
+    private SolutionCombinationMethod(SolutionCombinationMethod original, Cloner cloner) : base(original, cloner) { }
+    public SolutionCombinationMethod() : base() { Initialize(); }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SolutionCombinationMethod(this, cloner);
+    }
+
+    private void Initialize() {
+      #region Create parameters
+      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope to which the new solutions are added as sub-scopes."));
+      #endregion
+
+      #region Create operators
+      #endregion
+
+      #region Create operator graph
+      #endregion
+    }
+
+    public override IOperation Apply() {
+      IScope mother = CurrentScope.SubScopes[0];
+      IScope father = CurrentScope.SubScopes[1];
+      if (mother != null && father != null) {
+        BinaryVector motherSolution = mother.Variables["KnapsackSolution"].Value as BinaryVector;
+        BinaryVector fatherSolution = father.Variables["KnapsackSolution"].Value as BinaryVector;
+        int stepSize = motherSolution.Length / 3;
+        IVariable[] children = {
+          new Variable("KnapsackSolution", new BinaryVector(motherSolution.Take(stepSize).Concat(motherSolution.Skip(stepSize).Take(stepSize)).Concat(fatherSolution.Skip(2 * stepSize)).ToArray())),
+          new Variable("KnapsackSolution", new BinaryVector(motherSolution.Take(stepSize).Concat(fatherSolution.Skip(stepSize).Take(stepSize)).Concat(motherSolution.Skip(2 * stepSize)).ToArray())),
+          new Variable("KnapsackSolution", new BinaryVector(fatherSolution.Take(stepSize).Concat(motherSolution.Skip(stepSize).Take(stepSize)).Concat(motherSolution.Skip(2 * stepSize)).ToArray())),
+        };
+        IScope offspring = new Scope("Offspring");
+        foreach (var child in children) {
+          IScope solution = new Scope();
+          solution.Variables.Add(child);
+          offspring.SubScopes.Add(solution);
+        }
+        CurrentScope.SubScopes.Add(offspring);
+      }
+      return base.Apply();
+    }
+  }
+}
Index: /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/SolutionPoolUpdateMethod.cs
===================================================================
--- /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/SolutionPoolUpdateMethod.cs	(revision 7722)
+++ /branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/SolutionPoolUpdateMethod.cs	(revision 7722)
@@ -0,0 +1,94 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ScatterSearch {
+  /// <summary>
+  /// An operator that updates the solution pool.
+  /// </summary>
+  [Item("SolutionPoolUpdateMethod", "An operator that updates the solution pool.")]
+  [StorableClass]
+  public sealed class SolutionPoolUpdateMethod : SingleSuccessorOperator {
+    #region Parameter properties
+    private ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter)Parameters["CurrentScope"]; }
+    }
+    private ValueLookupParameter<BoolValue> NewSolutionsParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["NewSolutions"]; }
+    }
+    #endregion
+
+    #region Properties
+    public IScope CurrentScope {
+      get { return CurrentScopeParameter.ActualValue; }
+    }
+    public BoolValue NewSolutions {
+      get { return NewSolutionsParameter.ActualValue; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SolutionPoolUpdateMethod(bool deserializing) : base(deserializing) { }
+    private SolutionPoolUpdateMethod(SolutionPoolUpdateMethod original, Cloner cloner) : base(original, cloner) { }
+    public SolutionPoolUpdateMethod() : base() { Initialize(); }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SolutionPoolUpdateMethod(this, cloner);
+    }
+
+    private void Initialize() {
+      #region Create parameters
+      Parameters.Add(new ValueLookupParameter<BoolValue>("NewSolutions", "Indicates if new solutions have been found."));
+      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope to which the new solutions are added as sub-scopes."));
+      #endregion
+
+      #region Create operators
+      #endregion
+
+      #region Create operator graph
+      #endregion
+    }
+
+    public override IOperation Apply() {
+      IScope parents = new Scope("Parents");
+      IScope offspring = new Scope("Offspring");
+      foreach (var scope in CurrentScope.SubScopes) {
+        parents.SubScopes.AddRange(scope.SubScopes.Take(scope.SubScopes.Count - 1));
+        offspring.SubScopes.AddRange(scope.SubScopes.Last().SubScopes);
+      }
+      CurrentScope.SubScopes.Clear();
+      CurrentScope.SubScopes.AddRange(parents.SubScopes.OrderByDescending(o => o.Variables["Quality"].Value));
+      if ((offspring.SubScopes.OrderByDescending(o => o.Variables["Quality"].Value).First().Variables["Quality"].Value as DoubleValue).Value
+          > (parents.SubScopes.OrderByDescending(o => o.Variables["Quality"].Value).First().Variables["Quality"].Value as DoubleValue).Value) {
+        CurrentScope.SubScopes.Replace(CurrentScope.SubScopes.Union(offspring.SubScopes).OrderByDescending(o => o.Variables["Quality"].Value).Take(10));
+        NewSolutions.Value = true;
+      }
+      return base.Apply();
+    }
+  }
+}
Index: /branches/ScatterSearch/PreBuildEvent.cmd
===================================================================
--- /branches/ScatterSearch/PreBuildEvent.cmd	(revision 7722)
+++ /branches/ScatterSearch/PreBuildEvent.cmd	(revision 7722)
@@ -0,0 +1,2 @@
+IF EXIST "%ProjectDir%\Properties\AssemblyInfo.cs.frame" SubWCRev "%ProjectDir%\" "%ProjectDir%\Properties\AssemblyInfo.cs.frame" "%ProjectDir%\Properties\AssemblyInfo.cs"
+IF EXIST "%ProjectDir%\Plugin.cs.frame" SubWCRev "%ProjectDir%\" "%ProjectDir%\Plugin.cs.frame" "%ProjectDir%\Plugin.cs"
