Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.sln
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.sln	(revision 10008)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.sln	(revision 10023)
@@ -19,4 +19,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Visualization", "Visualization\Visualization.csproj", "{E968DFEC-F612-4898-B92A-00A45E2DEE85}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Analysis.SolutionCaching-3.3", "HeuristicLab.Analysis.SolutionCaching\3.3\HeuristicLab.Analysis.SolutionCaching-3.3.csproj", "{A05AA272-14EC-4422-AC70-C9CA42164441}"
 EndProject
 Global
@@ -82,4 +84,12 @@
 		{E968DFEC-F612-4898-B92A-00A45E2DEE85}.Release|x64.ActiveCfg = Release|Any CPU
 		{E968DFEC-F612-4898-B92A-00A45E2DEE85}.Release|x86.ActiveCfg = Release|Any CPU
+		{A05AA272-14EC-4422-AC70-C9CA42164441}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A05AA272-14EC-4422-AC70-C9CA42164441}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A05AA272-14EC-4422-AC70-C9CA42164441}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{A05AA272-14EC-4422-AC70-C9CA42164441}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{A05AA272-14EC-4422-AC70-C9CA42164441}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A05AA272-14EC-4422-AC70-C9CA42164441}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A05AA272-14EC-4422-AC70-C9CA42164441}.Release|x64.ActiveCfg = Release|Any CPU
+		{A05AA272-14EC-4422-AC70-C9CA42164441}.Release|x86.ActiveCfg = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/HeuristicLab.Analysis.SolutionCaching-3.3.csproj
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/HeuristicLab.Analysis.SolutionCaching-3.3.csproj	(revision 10023)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/HeuristicLab.Analysis.SolutionCaching-3.3.csproj	(revision 10023)
@@ -0,0 +1,156 @@
+﻿<?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>{A05AA272-14EC-4422-AC70-C9CA42164441}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Analysis.SolutionCaching</RootNamespace>
+    <AssemblyName>HeuristicLab.Analysis.SolutionCaching-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>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</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="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\ALGLIB-3.7.0.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Algorithms.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.DataAnalysis-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Collections-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.RealVectorEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.RealVectorEncoding-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Parameters-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Persistence-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="RealVectorEncoding\RealVectorEqualityComparer.cs" />
+    <Compile Include="RealVectorEncoding\RealVectorSolutionCache.cs" />
+    <Compile Include="RealVectorEncoding\RealVectorSolutionCachingAnalyzer.cs" />
+    <Compile Include="RealVectorEncoding\RealVectorSolutionInformation.cs" />
+    <Compile Include="SolutionCache.cs" />
+    <Compile Include="SolutionInformation.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+  </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/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/Plugin.cs.frame
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/Plugin.cs.frame	(revision 10023)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/Plugin.cs.frame	(revision 10023)
@@ -0,0 +1,41 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.Analysis.SolutionCaching {
+  [Plugin("HeuristicLab.Analysis.SolutionCaching", "Provides analyzers for tracking the behavior of GAs.", "3.3.8.$WCREV$")]
+  [PluginFile("HeuristicLab.Analysis.SolutionCaching-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Analysis", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.PermutationEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.RealVectorEncoding", "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")]
+  public class HeuristicLabAnalysisSolutionCachingPlugin : PluginBase {
+  }
+}
Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/Properties/AssemblyInfo.cs.frame	(revision 10023)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/Properties/AssemblyInfo.cs.frame	(revision 10023)
@@ -0,0 +1,56 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Analysis.AlgorithmBehavior.Analyzers")]
+[assembly: AssemblyDescription("Provides analyzers for tracking the behavior of GAs.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2013 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("410e1c1e-c991-49cd-843d-35a741927e4d")]
+
+// 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.8.$WCREV$")]
Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RealVectorEncoding/RealVectorEqualityComparer.cs
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RealVectorEncoding/RealVectorEqualityComparer.cs	(revision 10023)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RealVectorEncoding/RealVectorEqualityComparer.cs	(revision 10023)
@@ -0,0 +1,52 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.Collections.Generic;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Analysis.SolutionCaching.RealVectorEncoding {
+  [NonDiscoverableType]
+  [StorableClass]
+  public class RealVectorEqualityComparer : EqualityComparer<RealVector> {
+    public RealVectorEqualityComparer() { }
+    [StorableConstructor]
+    protected RealVectorEqualityComparer(bool deserializing) { }
+
+    public override bool Equals(RealVector x, RealVector y) {
+      for (int i = 0; i < x.Length; i++) {
+        if (x[i] != y[i]) return false;
+      }
+      return true;
+    }
+
+    public override int GetHashCode(RealVector obj) {
+      //compute FNV hash
+      int h = 216613626;
+
+      for (int i = 0; i < obj.Length; i++) {
+        h = (h * 16777619) ^ obj[i].GetHashCode();
+      }
+      return h;
+    }
+  }
+}
Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RealVectorEncoding/RealVectorSolutionCache.cs
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RealVectorEncoding/RealVectorSolutionCache.cs	(revision 10023)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RealVectorEncoding/RealVectorSolutionCache.cs	(revision 10023)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Analysis.SolutionCaching.RealVectorEncoding {
+  [Item("RealVectorSolutionCache", "Stores RealVector solutions generated by an algorithm.")]
+  [StorableClass]
+  public class RealVectorSolutionCache : SolutionCache<RealVector, RealVectorSolutionInformation> {
+    [StorableConstructor]
+    protected RealVectorSolutionCache(bool deserializing) : base(deserializing) { }
+    protected RealVectorSolutionCache(RealVectorSolutionCache original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public RealVectorSolutionCache() : base() { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RealVectorSolutionCache(this, cloner);
+    }
+
+    protected override void InitializeSolutionDictionary() {
+      solutionDictionary = new Dictionary<RealVector, List<RealVectorSolutionInformation>>(new RealVectorEqualityComparer());
+    }
+  }
+}
Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RealVectorEncoding/RealVectorSolutionCachingAnalyzer.cs
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RealVectorEncoding/RealVectorSolutionCachingAnalyzer.cs	(revision 10023)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RealVectorEncoding/RealVectorSolutionCachingAnalyzer.cs	(revision 10023)
@@ -0,0 +1,100 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.RealVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Analysis.SolutionCaching.RealVectorEncoding {
+  [Item("RealVectorSolutionCachingAnalyzer", "An operator that records all RealVector solutions every generation for GAs.")]
+  [StorableClass]
+  public class RealVectorSolutionCachingAnalyzer : SingleSuccessorOperator, IAnalyzer {
+    private const string ResultsParameterName = "Results";
+
+    #region IAnalyzer Members
+    public bool EnabledByDefault {
+      get { return false; }
+    }
+    #endregion
+
+    #region Parameter properties
+    public ILookupParameter<ResultCollection> ResultsParameter {
+      get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
+    }
+    public ILookupParameter<IntValue> GenerationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Generations"]; }
+    }
+    public ScopeTreeLookupParameter<RealVector> SolutionParameter {
+      get { return (ScopeTreeLookupParameter<RealVector>)Parameters["Solution"]; }
+    }
+    #endregion
+
+    #region Properties
+    public ResultCollection Results {
+      get { return ResultsParameter.ActualValue; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private RealVectorSolutionCachingAnalyzer(bool deserializing) : base(deserializing) { }
+
+    private RealVectorSolutionCachingAnalyzer(RealVectorSolutionCachingAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public RealVectorSolutionCachingAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The results collection where the analysis values should be stored."));
+      Parameters.Add(new LookupParameter<IntValue>("Generations", "Nr of generations."));
+      Parameters.Add(new ScopeTreeLookupParameter<RealVector>("Solution", "The solutions that should be stored.", "Point", 1));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RealVectorSolutionCachingAnalyzer(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      ItemArray<RealVector> solutions = SolutionParameter.ActualValue;
+      RealVectorSolutionCache solDict;
+
+      if (!Results.ContainsKey("SolutionCache")) {
+        solDict = new RealVectorSolutionCache();
+        Results.Add(new Result("SolutionCache", solDict));
+      } else {
+        solDict = (RealVectorSolutionCache)Results["SolutionCache"].Value;
+      }
+
+      foreach (var sol in solutions) {
+        RealVectorSolutionInformation info = new RealVectorSolutionInformation();
+        info.Generation = GenerationsParameter.ActualValue.Value;
+        info.ProducedBy = ProducedBy.CrossoverAndMutation;
+
+        solDict.Add((RealVector)sol.Clone(new Cloner()), info);
+      }
+      return base.Apply();
+    }
+  }
+}
Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RealVectorEncoding/RealVectorSolutionInformation.cs
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RealVectorEncoding/RealVectorSolutionInformation.cs	(revision 10023)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/RealVectorEncoding/RealVectorSolutionInformation.cs	(revision 10023)
@@ -0,0 +1,62 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Analysis.SolutionCaching.RealVectorEncoding {
+  [Item("RealVectorSolutionInformation", "Stores meta-information about a real vector solution.")]
+  [StorableClass]
+  public class RealVectorSolutionInformation : SolutionInformation<Encodings.RealVectorEncoding.RealVector> {
+    public RealVectorSolutionInformation() {
+      ParentList = new List<RealVector>();
+    }
+    [StorableConstructor]
+    protected RealVectorSolutionInformation(bool deserializing) : base(deserializing) { }
+
+    protected RealVectorSolutionInformation(RealVectorSolutionInformation original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RealVectorSolutionInformation(this, cloner);
+    }
+
+    public override int GetHashCode() {
+      //use rotating hash, should be enough
+      //see: http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx
+      var pweq = new RealVectorEqualityComparer();
+      int h = 0;
+
+      h = (h << 4) ^ (h >> 28) ^ ProducedBy.GetHashCode();
+      h = (h << 4) ^ (h >> 28) ^ Generation.GetHashCode();
+
+      if (ParentList != null) {
+        foreach (var parent in ParentList) {
+          h = (h << 4) ^ (h >> 28) ^ pweq.GetHashCode(parent);
+        }
+      }
+      return h;
+    }
+  }
+}
Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/SolutionCache.cs
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/SolutionCache.cs	(revision 10023)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/SolutionCache.cs	(revision 10023)
@@ -0,0 +1,86 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Analysis.SolutionCaching {
+  [Item("SolutionCache", "Stores solutions generated by an algorithm.")]
+  [StorableClass]
+  [NonDiscoverableType]
+  public abstract class SolutionCache<TKey, TValue> : Item
+    where TKey : Item
+    where TValue : Item {
+
+    [Storable]
+    protected Dictionary<TKey, List<TValue>> solutionDictionary;
+
+    public Dictionary<TKey, List<TValue>> SolutionDictionary {
+      get { return solutionDictionary; }
+    }
+
+    public SolutionCache() {
+      InitializeSolutionDictionary();
+    }
+
+    [StorableConstructor]
+    protected SolutionCache(bool deserializing) : base(deserializing) { }
+    protected SolutionCache(SolutionCache<TKey, TValue> original, Cloner cloner)
+      : base(original, cloner) {
+      InitializeSolutionDictionary();
+
+      foreach (KeyValuePair<TKey, List<TValue>> keyValuePair in solutionDictionary) {
+        List<TValue> lst = new List<TValue>();
+        foreach (TValue value in keyValuePair.Value) {
+          lst.Add((TValue)value.Clone(new Cloner()));
+        }
+        this.solutionDictionary.Add((TKey)keyValuePair.Key.Clone(new Cloner()), lst);
+      }
+    }
+
+    protected virtual void InitializeSolutionDictionary() {
+      solutionDictionary = new Dictionary<TKey, List<TValue>>();
+    }
+
+    public virtual void Add(TKey key, TValue value) {
+      if (ContainsKey(key)) {
+        if (!solutionDictionary[key].Contains(value)) {
+          solutionDictionary[key].Add(value);
+        }
+      } else {
+        List<TValue> lst = new List<TValue>();
+        lst.Add(value);
+        solutionDictionary.Add(key, lst);
+      }
+    }
+
+    public virtual bool ContainsKey(TKey key) {
+      return solutionDictionary.ContainsKey(key);
+    }
+
+    public virtual int Size() {
+      return solutionDictionary.Count;
+    }
+  }
+}
Index: branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/SolutionInformation.cs
===================================================================
--- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/SolutionInformation.cs	(revision 10023)
+++ branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching/3.3/SolutionInformation.cs	(revision 10023)
@@ -0,0 +1,74 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Analysis.SolutionCaching {
+  public enum ProducedBy { Crossover, Mutation, CrossoverAndMutation, Move, Other };
+
+  [Item("SolutionInformation", "Stores meta-information about a solution.")]
+  [StorableClass]
+  public class SolutionInformation<T> : Item {
+    [Storable]
+    public ProducedBy ProducedBy { get; set; }
+    [Storable]
+    public List<T> ParentList { get; set; }
+    [Storable]
+    public int Generation { get; set; }
+
+    public SolutionInformation() { }
+
+    [StorableConstructor]
+    protected SolutionInformation(bool deserializing) : base(deserializing) { }
+    protected SolutionInformation(SolutionInformation<T> original, Cloner cloner)
+      : base(original, cloner) {
+      this.ProducedBy = original.ProducedBy;
+      this.ParentList = new List<T>(original.ParentList);
+      this.Generation = original.Generation;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SolutionInformation<T>(this, cloner);
+    }
+
+    public override bool Equals(object obj) {
+      SolutionInformation<T> pi = obj as SolutionInformation<T>;
+      if (pi == null) return false;
+
+      if (ProducedBy == pi.ProducedBy && Generation == pi.Generation) {
+        if (pi.ParentList == null && ParentList == null) return true;
+        if (pi.ParentList != null && ParentList == null ||
+          pi.ParentList == null && ParentList != null) return false;
+        if (pi.ParentList.Count != ParentList.Count) return false;
+
+        foreach (var p in ParentList) {
+          if (!pi.ParentList.Contains(p)) return false;
+        }
+        return true;
+      } else {
+        return false;
+      }
+    }
+  }
+}
