Index: trunk/sources/HeuristicLab.Core/3.3/Collections/ItemSet.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Collections/ItemSet.cs	(revision 6524)
+++ trunk/sources/HeuristicLab.Core/3.3/Collections/ItemSet.cs	(revision 6525)
@@ -54,4 +54,6 @@
     public ItemSet() : base() { }
     public ItemSet(IEnumerable<T> collection) : base(collection) { }
+    public ItemSet(IEqualityComparer<T> comparer) : base(comparer) { }
+    public ItemSet(IEnumerable<T> collection, IEqualityComparer<T> comparer) : base(collection, comparer) { }
 
     public object Clone() {
Index: trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/BestQAPSolutionAnalyzer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/BestQAPSolutionAnalyzer.cs	(revision 6524)
+++ trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/BestQAPSolutionAnalyzer.cs	(revision 6525)
@@ -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."));
     }
@@ -117,5 +117,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 +125,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());
         }
Index: trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs	(revision 6524)
+++ trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs	(revision 6525)
@@ -49,6 +49,6 @@
 
     #region Parameter Properties
-    public IValueParameter<ItemList<Permutation>> BestKnownSolutionsParameter {
-      get { return (IValueParameter<ItemList<Permutation>>)Parameters["BestKnownSolutions"]; }
+    public IValueParameter<ItemSet<Permutation>> BestKnownSolutionsParameter {
+      get { return (IValueParameter<ItemSet<Permutation>>)Parameters["BestKnownSolutions"]; }
     }
     public IValueParameter<Permutation> BestKnownSolutionParameter {
@@ -64,5 +64,5 @@
 
     #region Properties
-    public ItemList<Permutation> BestKnownSolutions {
+    public ItemSet<Permutation> BestKnownSolutions {
       get { return BestKnownSolutionsParameter.Value; }
       set { BestKnownSolutionsParameter.Value = value; }
@@ -113,5 +113,5 @@
     public QuadraticAssignmentProblem()
       : base(new QAPEvaluator(), new RandomPermutationCreator()) {
-      Parameters.Add(new OptionalValueParameter<ItemList<Permutation>>("BestKnownSolutions", "The list of best known solutions which is updated whenever a new better solution is found or may be the optimal solution if it is known beforehand.", null));
+      Parameters.Add(new OptionalValueParameter<ItemSet<Permutation>>("BestKnownSolutions", "The list of best known solutions which is updated whenever a new better solution is found or may be the optimal solution if it is known beforehand.", null));
       Parameters.Add(new OptionalValueParameter<Permutation>("BestKnownSolution", "The best known solution which is updated whenever a new better solution is found or may be the optimal solution if it is known beforehand.", null));
       Parameters.Add(new ValueParameter<DoubleMatrix>("Weights", "The strength of the connection between the facilities.", new DoubleMatrix(5, 5)));
@@ -152,20 +152,14 @@
       // BackwardsCompatibility3.3
       #region Backwards compatible code, remove with 3.4
-      /*if (Parameters.ContainsKey("BestKnownSolution")) {
-        Permutation solution = ((IValueParameter<Permutation>)Parameters["BestKnownSolution"]).Value;
-        Parameters.Remove("BestKnownSolution");
-        Parameters.Add(new OptionalValueParameter<ItemList<Permutation>>("BestKnownSolutions", "The list of best known solutions which is updated whenever a new better solution is found or may be the optimal solution if it is known beforehand.", null));
-        if (solution != null) {
-          BestKnownSolutions = new ItemList<Permutation>();
-          BestKnownSolutions.Add(solution);
-        }
-      }*/
       if (!Parameters.ContainsKey("BestKnownSolutions")) {
-        Parameters.Add(new OptionalValueParameter<ItemList<Permutation>>("BestKnownSolutions", "The list of best known solutions which is updated whenever a new better solution is found or may be the optimal solution if it is known beforehand.", null));
+        Parameters.Add(new OptionalValueParameter<ItemSet<Permutation>>("BestKnownSolutions", "The list of best known solutions which is updated whenever a new better solution is found or may be the optimal solution if it is known beforehand.", null));
+      } else if (Parameters["BestKnownSolutions"].GetType().Equals(typeof(OptionalValueParameter<ItemList<Permutation>>))) {
+        ItemList<Permutation> list = ((OptionalValueParameter<ItemList<Permutation>>)Parameters["BestKnownSolutions"]).Value;
+        Parameters.Add(new OptionalValueParameter<ItemSet<Permutation>>("BestKnownSolutions", "The list of best known solutions which is updated whenever a new better solution is found or may be the optimal solution if it is known beforehand.", new ItemSet<Permutation>(list)));
       }
       if (Parameters.ContainsKey("DistanceMatrix")) {
-        DoubleMatrix bla = ((ValueParameter<DoubleMatrix>)Parameters["DistanceMatrix"]).Value;
+        DoubleMatrix d = ((ValueParameter<DoubleMatrix>)Parameters["DistanceMatrix"]).Value;
         Parameters.Remove("DistanceMatrix");
-        Parameters.Add(new ValueParameter<DoubleMatrix>("Distances", "bla", bla));
+        Parameters.Add(new ValueParameter<DoubleMatrix>("Distances", "The distance matrix which can either be specified directly without the coordinates, or can be calculated automatically from the coordinates.", d));
       }
       AttachEventHandlers();
@@ -411,5 +405,5 @@
             if (solParser.Quality.IsAlmost(QAPEvaluator.Apply(new Permutation(PermutationTypes.Absolute, solParser.Assignment), Weights, Distances))) {
               BestKnownQuality = new DoubleValue(solParser.Quality);
-              BestKnownSolutions = new ItemList<Permutation>(new Permutation[] { new Permutation(PermutationTypes.Absolute, solParser.Assignment) });
+              BestKnownSolutions = new ItemSet<Permutation>(new Permutation[] { new Permutation(PermutationTypes.Absolute, solParser.Assignment) }, new PermutationEqualityComparer());
               BestKnownSolution = new Permutation(PermutationTypes.Absolute, solParser.Assignment);
             } else {
@@ -420,5 +414,5 @@
           } else {
             BestKnownQuality = new DoubleValue(solParser.Quality);
-            BestKnownSolutions = new ItemList<Permutation>(new Permutation[] { new Permutation(PermutationTypes.Absolute, solParser.Assignment) });
+            BestKnownSolutions = new ItemSet<Permutation>(new Permutation[] { new Permutation(PermutationTypes.Absolute, solParser.Assignment) }, new PermutationEqualityComparer());
             BestKnownSolution = new Permutation(PermutationTypes.Absolute, solParser.Assignment);
           }
@@ -426,5 +420,5 @@
       } else {
         BestKnownQuality = null;
-        BestKnownSolutions = null;
+        BestKnownSolutions = new ItemSet<Permutation>(new PermutationEqualityComparer());
         BestKnownSolution = null;
       }
