Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/AlgorithmBehaviorUnitTests.csproj
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/AlgorithmBehaviorUnitTests.csproj	(revision 9723)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/AlgorithmBehaviorUnitTests.csproj	(revision 9723)
@@ -0,0 +1,114 @@
+﻿<?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>
+    <ProjectGuid>{8EFDEA16-A348-401F-82FC-C7E08FDA1C5A}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>AlgorithmBehaviorUnitTests</RootNamespace>
+    <AssemblyName>AlgorithmBehaviorUnitTests</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
+    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+    <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
+    <IsCodedUITest>False</IsCodedUITest>
+    <TestProjectType>UnitTest</TestProjectType>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</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>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <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.PermutationEncoding-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Random-3.3">
+      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+  </ItemGroup>
+  <Choose>
+    <When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
+      <ItemGroup>
+        <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+      </ItemGroup>
+    </When>
+    <Otherwise>
+      <ItemGroup>
+        <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
+      </ItemGroup>
+    </Otherwise>
+  </Choose>
+  <ItemGroup>
+    <Compile Include="UnitTest1.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views\3.3\HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views-3.3.csproj">
+      <Project>{4b306883-eb5b-4de0-a5e1-b6bfd8a2e4d4}</Project>
+      <Name>HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Analysis.AlgorithmBehavior.Analyzers\3.3\HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj">
+      <Project>{2533d1f9-f7f6-46cb-90d2-76d254e38dee}</Project>
+      <Name>HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Choose>
+    <When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
+      <ItemGroup>
+        <Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+          <Private>False</Private>
+        </Reference>
+        <Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+          <Private>False</Private>
+        </Reference>
+        <Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+          <Private>False</Private>
+        </Reference>
+        <Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+          <Private>False</Private>
+        </Reference>
+      </ItemGroup>
+    </When>
+  </Choose>
+  <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/Properties/AssemblyInfo.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/Properties/AssemblyInfo.cs	(revision 9723)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/Properties/AssemblyInfo.cs	(revision 9723)
@@ -0,0 +1,36 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("AlgorithmBehaviorUnitTests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("AlgorithmBehaviorUnitTests")]
+[assembly: AssemblyCopyright("Copyright ©  2013")]
+[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("180c2c4d-1276-400a-98a3-7aada64f0dab")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/UnitTest1.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/UnitTest1.cs	(revision 9723)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/UnitTest1.cs	(revision 9723)
@@ -0,0 +1,22 @@
+﻿using HeuristicLab.Analysis.AlgorithmBehavior.Analyzers;
+using HeuristicLab.Encodings.PermutationEncoding;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace AlgorithmBehaviorUnitTests {
+  [TestClass]
+  public class UnitTest1 {
+    [TestMethod]
+    public void TestPermutationWrapper() {
+      var rand = new HeuristicLab.Random.FastRandom();
+      var permutation1 = new Permutation(PermutationTypes.RelativeUndirected, 3000, rand);
+      var permutation2 = new Permutation(PermutationTypes.RelativeUndirected, 3000, rand);
+
+      PermutationWrapper wrapper = new PermutationWrapper();
+      wrapper.StorePartialPermutation(permutation1, permutation2);
+
+      var newPermutation2 = wrapper.GetPermutation();
+      PermutationEqualityComparer comp = new PermutationEqualityComparer();
+      Assert.IsTrue(comp.Equals(permutation2, newPermutation2));
+    }
+  }
+}
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj	(revision 9722)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj	(revision 9723)
@@ -113,6 +113,8 @@
     <Compile Include="CombinedOperators\QAPAfterMutationCombinedOperator.cs" />
     <Compile Include="CombinedOperators\QAPAfterCrossoverCombinedOperator.cs" />
+    <Compile Include="SolutionsCaching\SolutionCachingAnalyzer.cs" />
     <Compile Include="SolutionsCaching\PermutationSolutionDictionary.cs" />
     <Compile Include="SolutionsCaching\PermutationWrapper.cs" />
+    <Compile Include="SolutionsCaching\PermutationWrapperEqualityComparer.cs" />
     <Compile Include="SolutionsCaching\SolutionDictionary.cs" />
     <Compile Include="SelectionPressureAnalyzer.cs" />
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationSolutionDictionary.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationSolutionDictionary.cs	(revision 9722)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationSolutionDictionary.cs	(revision 9723)
@@ -22,12 +22,23 @@
 using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers {
+  [Item("PermutationSolutionDictionary", "Stores permutations generated by an algorithm.")]
+  [StorableClass]
   public class PermutationSolutionDictionary<TKey, TValue> : SolutionDictionary<TKey, TValue>
     where TKey : PermutationWrapper {
 
     public PermutationSolutionDictionary() {
-      solutionDictionary = new Dictionary<TKey, List<TValue>>();
+      solutionDictionary = new Dictionary<TKey, List<TValue>>(new PermutationWrapperEqualityComparer());
+    }
+
+    [StorableConstructor]
+    protected PermutationSolutionDictionary(bool deserializing) : base(deserializing) { }
+    protected PermutationSolutionDictionary(PermutationSolutionDictionary<TKey, TValue> original, Cloner cloner)
+      : base(original, cloner) {
     }
 
@@ -51,5 +62,5 @@
         Permutation pr = p.GetPermutation();
         int diffs = CountDiffs(permutation, pr);
-        if (min < diffs) {
+        if (diffs < min) {
           result = pr;
           min = diffs;
@@ -62,4 +73,5 @@
     private int CountDiffs(Permutation x, Permutation y) {
       int result = 0;
+      // yes we ignore path encoding at the moment
       for (int i = 0; i < x.Length; i++) {
         if (x[i] != y[i]) result++;
@@ -67,4 +79,8 @@
       return result;
     }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PermutationSolutionDictionary<TKey, TValue>(this, cloner);
+    }
   }
 }
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationWrapper.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationWrapper.cs	(revision 9722)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationWrapper.cs	(revision 9723)
@@ -22,12 +22,19 @@
 using System.Collections.Generic;
 using HeuristicLab.Common;
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers {
   public enum ElementType { Complete, Diff };
 
-  public class PermutationWrapper {
+  [Item("PermutationWrapper", "Wrapper for permutations. Can either store a permutation or a diff.")]
+  [StorableClass]
+  public class PermutationWrapper : Item {
+    [Storable]
     public ElementType ElementType { get; set; }
+    [Storable]
     public Permutation Permutation { get; set; }
+    [Storable]
     public List<int> Diffs { get; set; }
 
@@ -36,4 +43,18 @@
       Diffs = new List<int>();
       Permutation = p;
+    }
+
+    public PermutationWrapper() {
+      ElementType = ElementType.Complete;
+      Diffs = new List<int>();
+    }
+
+    [StorableConstructor]
+    protected PermutationWrapper(bool deserializing) : base(deserializing) { }
+    protected PermutationWrapper(PermutationWrapper original, Cloner cloner)
+      : base(original, cloner) {
+      this.ElementType = original.ElementType;
+      this.Diffs = new List<int>(original.Diffs);
+      this.Permutation = (Permutation)original.Permutation.Clone(cloner);
     }
 
@@ -52,4 +73,5 @@
     }
 
+    //supports efficient diffs up to a permutation length of 30000
     public void StorePartialPermutation(Permutation original, Permutation newPermutation) {
       ElementType = ElementType.Diff;
@@ -70,4 +92,8 @@
       Permutation = original;
     }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PermutationWrapper(this, cloner);
+    }
   }
 }
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationWrapperEqualityComparer.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationWrapperEqualityComparer.cs	(revision 9723)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationWrapperEqualityComparer.cs	(revision 9723)
@@ -0,0 +1,39 @@
+﻿#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.Collections.Generic;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers {
+  [NonDiscoverableType]
+  public class PermutationWrapperEqualityComparer : EqualityComparer<PermutationWrapper> {
+    PermutationEqualityComparer peComp = new PermutationEqualityComparer();
+
+    public override bool Equals(PermutationWrapper x, PermutationWrapper y) {
+      return peComp.Equals(x.GetPermutation(), y.GetPermutation());
+    }
+
+    public override int GetHashCode(PermutationWrapper obj) {
+      return peComp.GetHashCode(obj.GetPermutation());
+    }
+  }
+}
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/SolutionCachingAnalyzer.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/SolutionCachingAnalyzer.cs	(revision 9723)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/SolutionCachingAnalyzer.cs	(revision 9723)
@@ -0,0 +1,99 @@
+﻿#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.PermutationEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers {
+  [Item("SolutionCachingAnalyzer", "An operator that records solutions.")]
+  [StorableClass]
+  public class SolutionCachingAnalyzer : SingleSuccessorOperator, IAnalyzer {
+    private const string ResultsParameterName = "Results";
+    //TODO: this should be a stateful item!
+    #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<Permutation> SolutionParameter {
+      get { return (ScopeTreeLookupParameter<Permutation>)Parameters["Solution"]; }
+    }
+    #endregion
+
+    #region Properties
+    public ResultCollection Results {
+      get { return ResultsParameter.ActualValue; }
+    }
+
+    [Storable]
+    private PermutationSolutionDictionary<PermutationWrapper, int> solDict;
+    #endregion
+
+    [StorableConstructor]
+    private SolutionCachingAnalyzer(bool deserializing) : base(deserializing) { }
+
+    private SolutionCachingAnalyzer(SolutionCachingAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+      this.solDict = (PermutationSolutionDictionary<PermutationWrapper, int>)original.solDict.Clone(cloner);
+    }
+
+    public SolutionCachingAnalyzer()
+      : 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<Permutation>("Solution", "The solutions that should be stored.", "TSPTour", 1));
+      solDict = new PermutationSolutionDictionary<PermutationWrapper, int>();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SolutionCachingAnalyzer(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      ItemArray<Permutation> solutions = SolutionParameter.ActualValue;
+
+      foreach (var sol in solutions) {
+        solDict.Add(new PermutationWrapper(sol), GenerationsParameter.ActualValue.Value);
+      }
+
+      if (!ResultsParameter.ActualValue.ContainsKey("SolutionCache")) {
+        ResultsParameter.ActualValue.Add(new Result("SolutionCache", solDict));
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/SolutionDictionary.cs
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/SolutionDictionary.cs	(revision 9722)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/SolutionDictionary.cs	(revision 9723)
@@ -21,11 +21,26 @@
 
 using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers {
-  public abstract class SolutionDictionary<TKey, TValue> {
+  [Item("SolutionDictionary", "Stores solutions generated by an algorithm.")]
+  [StorableClass]
+  [NonDiscoverableType]
+  public abstract class SolutionDictionary<TKey, TValue> : Item {
+    [Storable]
     protected Dictionary<TKey, List<TValue>> solutionDictionary;
 
     public SolutionDictionary() {
       solutionDictionary = new Dictionary<TKey, List<TValue>>();
+    }
+
+    [StorableConstructor]
+    protected SolutionDictionary(bool deserializing) : base(deserializing) { }
+    protected SolutionDictionary(SolutionDictionary<TKey, TValue> original, Cloner cloner)
+      : base(original, cloner) {
+      this.solutionDictionary = new Dictionary<TKey, List<TValue>>(original.solutionDictionary);
     }
 
@@ -39,5 +54,6 @@
 
       if (ContainsKey(key)) {
-        solutionDictionary[key].Add(value);
+        if (!solutionDictionary[key].Contains(value))
+          solutionDictionary[key].Add(value);
       } else {
         InsertKeyValue(key, value);
Index: /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.sln
===================================================================
--- /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.sln	(revision 9722)
+++ /branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.sln	(revision 9723)
@@ -14,4 +14,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.ESLimitedGA-3.3", "HeuristicLab.Algorithms.ESLimitedGA\3.3\HeuristicLab.Algorithms.ESLimitedGA-3.3.csproj", "{A51DA44F-CB35-4F6F-99F5-2A2E904AB93B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlgorithmBehaviorUnitTests", "AlgorithmBehaviorUnitTests\AlgorithmBehaviorUnitTests.csproj", "{8EFDEA16-A348-401F-82FC-C7E08FDA1C5A}"
 EndProject
 Global
@@ -53,4 +55,12 @@
 		{A51DA44F-CB35-4F6F-99F5-2A2E904AB93B}.Release|x86.ActiveCfg = Release|x86
 		{A51DA44F-CB35-4F6F-99F5-2A2E904AB93B}.Release|x86.Build.0 = Release|x86
+		{8EFDEA16-A348-401F-82FC-C7E08FDA1C5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{8EFDEA16-A348-401F-82FC-C7E08FDA1C5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{8EFDEA16-A348-401F-82FC-C7E08FDA1C5A}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{8EFDEA16-A348-401F-82FC-C7E08FDA1C5A}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{8EFDEA16-A348-401F-82FC-C7E08FDA1C5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{8EFDEA16-A348-401F-82FC-C7E08FDA1C5A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{8EFDEA16-A348-401F-82FC-C7E08FDA1C5A}.Release|x64.ActiveCfg = Release|Any CPU
+		{8EFDEA16-A348-401F-82FC-C7E08FDA1C5A}.Release|x86.ActiveCfg = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
