Index: branches/QAPAlgorithms/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/BestQAPSolutionAnalyzer.cs
===================================================================
--- branches/QAPAlgorithms/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/BestQAPSolutionAnalyzer.cs	(revision 6350)
+++ branches/QAPAlgorithms/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/BestQAPSolutionAnalyzer.cs	(revision 6569)
@@ -61,6 +61,6 @@
       get { return (LookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
     }
-    public LookupParameter<ItemList<Permutation>> BestKnownSolutionsParameter {
-      get { return (LookupParameter<ItemList<Permutation>>)Parameters["BestKnownSolutions"]; }
+    public LookupParameter<ItemSet<Permutation>> BestKnownSolutionsParameter {
+      get { return (LookupParameter<ItemSet<Permutation>>)Parameters["BestKnownSolutions"]; }
     }
     public LookupParameter<Permutation> BestKnownSolutionParameter {
@@ -84,5 +84,5 @@
       Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best QAP solution should be stored."));
       Parameters.Add(new LookupParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this QAP instance."));
-      Parameters.Add(new LookupParameter<ItemList<Permutation>>("BestKnownSolutions", "The best known solutions (there may be multiple) of this QAP instance."));
+      Parameters.Add(new LookupParameter<ItemSet<Permutation>>("BestKnownSolutions", "The best known solutions (there may be multiple) of this QAP instance."));
       Parameters.Add(new LookupParameter<Permutation>("BestKnownSolution", "The best known solution of this QAP instance."));
     }
@@ -93,5 +93,9 @@
       #region Backwards compatible code, remove with 3.4
       if (!Parameters.ContainsKey("BestKnownSolutions")) {
-        Parameters.Add(new LookupParameter<ItemList<Permutation>>("BestKnownSolutions", "The best known solutions of this QAP instance."));
+        Parameters.Add(new LookupParameter<ItemSet<Permutation>>("BestKnownSolutions", "The best known solutions of this QAP instance."));
+      } else if (Parameters["BestKnownSolutions"].GetType().Equals(typeof(LookupParameter<ItemList<Permutation>>))) {
+        string actualName = (Parameters["BestKnownSolutions"] as LookupParameter<ItemList<Permutation>>).ActualName;
+        Parameters.Remove("BestKnownSolutions");
+        Parameters.Add(new LookupParameter<ItemSet<Permutation>>("BestKnownSolutions", "The best known solutions of this QAP instance.", actualName));
       }
       #endregion
@@ -117,5 +121,5 @@
         BestKnownQualityParameter.ActualValue = new DoubleValue(qualities[i].Value);
         BestKnownSolutionParameter.ActualValue = (Permutation)permutations[i].Clone();
-        BestKnownSolutionsParameter.ActualValue = new ItemList<Permutation>();
+        BestKnownSolutionsParameter.ActualValue = new ItemSet<Permutation>(new PermutationEqualityComparer());
         BestKnownSolutionsParameter.ActualValue.Add((Permutation)permutations[i].Clone());
       } else if (bestKnownQuality.Value == qualities[i].Value) {
@@ -125,18 +129,10 @@
           BestKnownSolutionParameter.ActualValue = (Permutation)permutations[i].Clone();
         if (BestKnownSolutionsParameter.ActualValue == null)
-          BestKnownSolutionsParameter.ActualValue = new ItemList<Permutation>();
-        PermutationEqualityComparer comparer = new PermutationEqualityComparer();
+          BestKnownSolutionsParameter.ActualValue = new ItemSet<Permutation>(new PermutationEqualityComparer());
         foreach (var k in sorted) { // for each solution that we found check if it is in the pool of best-knowns
           if (!max && k.Value > qualities[i].Value
             || max && k.Value < qualities[i].Value) break; // stop when we reached a solution worse than the best-known quality
           Permutation p = permutations[k.index];
-          bool alreadyPresent = false;
-          foreach (Permutation p2 in BestKnownSolutionsParameter.ActualValue) {
-            if (comparer.Equals(p, p2)) {
-              alreadyPresent = true;
-              break;
-            }
-          }
-          if (!alreadyPresent)
+          if (!BestKnownSolutionsParameter.ActualValue.Contains(p))
             BestKnownSolutionsParameter.ActualValue.Add((Permutation)permutations[k.index].Clone());
         }
