Index: trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Analyzers/BestKnapsackSolutionAnalyzer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Analyzers/BestKnapsackSolutionAnalyzer.cs	(revision 3641)
+++ trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Analyzers/BestKnapsackSolutionAnalyzer.cs	(revision 3641)
@@ -0,0 +1,106 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 System.Text;
+using HeuristicLab.Optimization;
+using HeuristicLab.Data;
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Knapsack.Analyzers {
+  /// <summary>
+  /// An operator for analyzing the best solution for a knapsack problem.
+  /// </summary>
+  [Item("BestKnapsackSolutionAnalyzer", "An operator for analyzing the best solution for a knapsack problem.")]
+  [StorableClass]
+  class BestKnapsackSolutionAnalyzer : SingleSuccessorOperator, IBestKnapsackSolutionAnalyzer, ISolutionAnalyzer {
+
+    public ILookupParameter<BinaryVector> BinaryVectorParameter {
+      get { return (ILookupParameter<BinaryVector>)Parameters["BinaryVector"]; }
+    }
+    ILookupParameter IBestKnapsackSolutionAnalyzer.BinaryVectorParameter {
+      get { return BinaryVectorParameter; }
+    }
+    public ILookupParameter<IntValue> KnapsackCapacityParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["KnapsackCapacity"]; }
+    }
+    public ILookupParameter<IntArray> WeightsParameter {
+      get { return (ILookupParameter<IntArray>)Parameters["Weights"]; }
+    }
+    public ILookupParameter<IntArray> ValuesParameter {
+      get { return (ILookupParameter<IntArray>)Parameters["Values"]; }
+    }
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    ILookupParameter IBestKnapsackSolutionAnalyzer.QualityParameter {
+      get { return QualityParameter; }
+    }
+    public ILookupParameter<KnapsackSolution> BestSolutionParameter {
+      get { return (ILookupParameter<KnapsackSolution>)Parameters["BestSolution"]; }
+    }
+    public IValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+
+    public BestKnapsackSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<BinaryVector>("BinaryVector", "The knapsack solutions from which the best solution should be visualized."));
+      Parameters.Add(new LookupParameter<IntValue>("KnapsackCapacity", "Capacity of the Knapsack."));
+      Parameters.Add(new LookupParameter<IntArray>("Weights", "The weights of the items."));
+      Parameters.Add(new LookupParameter<IntArray>("Values", "The values of the items."));
+
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The qualities of the knapsack solutions which should be visualized."));
+      Parameters.Add(new LookupParameter<KnapsackSolution>("BestSolution", "The best knapsack solution."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the knapsack solution should be stored."));
+    }
+
+    public override IOperation Apply() {
+      BinaryVector binaryVector = BinaryVectorParameter.ActualValue;
+      DoubleValue quality = QualityParameter.ActualValue;
+      ResultCollection results = ResultsParameter.ActualValue;
+
+      KnapsackSolution solution = BestSolutionParameter.ActualValue;
+      if (solution == null) {
+        solution = new KnapsackSolution(binaryVector, QualityParameter.ActualValue,
+          KnapsackCapacityParameter.ActualValue, WeightsParameter.ActualValue, ValuesParameter.ActualValue);
+        BestSolutionParameter.ActualValue = solution;
+        results.Add(new Result("Best Knapsack Solution", solution));
+      }  else {
+        solution.BinaryVector = binaryVector;
+        solution.Quality = QualityParameter.ActualValue;
+        solution.Capacity = KnapsackCapacityParameter.ActualValue;
+        solution.Weights = WeightsParameter.ActualValue;
+        solution.Values = ValuesParameter.ActualValue;
+
+        results["Best Knapsack Solution"].Value = solution;
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Analyzers/MultiPopulationBestKnapsackSolutionAnalyzer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Analyzers/MultiPopulationBestKnapsackSolutionAnalyzer.cs	(revision 3641)
+++ trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Analyzers/MultiPopulationBestKnapsackSolutionAnalyzer.cs	(revision 3641)
@@ -0,0 +1,121 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 System.Text;
+using HeuristicLab.Optimization;
+using HeuristicLab.Data;
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Knapsack.Analyzers {
+  /// <summary>
+  /// An operator for analyzing the best solution for a knapsack problem.
+  /// </summary>
+  [Item("MultiPopulationBestKnapsackSolutionAnalyzer", "An operator for analyzing the best solution for a knapsack problem.")]
+  [StorableClass]
+  class MultiPopulationBestKnapsackSolutionAnalyzer : SingleSuccessorOperator, IBestKnapsackSolutionAnalyzer, IMultiPopulationAnalyzer {
+
+    public ILookupParameter<ItemArray<ItemArray<BinaryVector>>> BinaryVectorParameter {
+      get { return (ILookupParameter<ItemArray<ItemArray<BinaryVector>>>)Parameters["BinaryVector"]; }
+    }
+    ILookupParameter IBestKnapsackSolutionAnalyzer.BinaryVectorParameter {
+      get { return BinaryVectorParameter; }
+    }
+    public ILookupParameter<IntValue> KnapsackCapacityParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["KnapsackCapacity"]; }
+    }
+    public ILookupParameter<IntArray> WeightsParameter {
+      get { return (ILookupParameter<IntArray>)Parameters["Weights"]; }
+    }
+    public ILookupParameter<IntArray> ValuesParameter {
+      get { return (ILookupParameter<IntArray>)Parameters["Values"]; }
+    }
+    public ILookupParameter<ItemArray<ItemArray<DoubleValue>>> QualityParameter {
+      get { return (ILookupParameter<ItemArray<ItemArray<DoubleValue>>>)Parameters["Quality"]; }
+    }
+    ILookupParameter IBestKnapsackSolutionAnalyzer.QualityParameter {
+      get { return QualityParameter; }
+    }
+    public ILookupParameter<KnapsackSolution> BestSolutionParameter {
+      get { return (ILookupParameter<KnapsackSolution>)Parameters["BestSolution"]; }
+    }
+    public IValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+
+    public MultiPopulationBestKnapsackSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new SubScopesLookupParameter<ItemArray<BinaryVector>>("BinaryVector", "The knapsack solutions from which the best solution should be visualized."));
+      Parameters.Add(new LookupParameter<IntValue>("KnapsackCapacity", "Capacity of the Knapsack."));
+      Parameters.Add(new LookupParameter<IntArray>("Weights", "The weights of the items."));
+      Parameters.Add(new LookupParameter<IntArray>("Values", "The values of the items."));
+      
+      Parameters.Add(new SubScopesLookupParameter<ItemArray<DoubleValue>>("Quality", "The qualities of the knapsack solutions which should be visualized."));
+      Parameters.Add(new LookupParameter<KnapsackSolution>("BestSolution", "The best knapsack solution."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the knapsack solution should be stored."));
+    }
+
+    public override IOperation Apply() {
+      ItemArray<ItemArray<BinaryVector>> binaryVectors = BinaryVectorParameter.ActualValue;
+      ItemArray<ItemArray<DoubleValue>> qualities = QualityParameter.ActualValue;
+      ResultCollection results = ResultsParameter.ActualValue;
+
+      DoubleValue bestQuality = new DoubleValue(double.MaxValue);
+      BinaryVector bestBinaryVector = null;
+
+      for (int i = 0; i < qualities.Length; i++) {
+        for (int j = 0; j < qualities[i].Length; j++) {
+          if (qualities[i][j].Value < bestQuality.Value) {
+            bestQuality = qualities[i][j];
+            bestBinaryVector = binaryVectors[i][j];
+          }
+        }
+      }
+
+      KnapsackSolution solution = BestSolutionParameter.ActualValue;
+      if (solution == null) {
+        solution = new KnapsackSolution(bestBinaryVector, bestQuality,
+          KnapsackCapacityParameter.ActualValue, WeightsParameter.ActualValue, ValuesParameter.ActualValue);
+        BestSolutionParameter.ActualValue = solution;
+
+        results.Add(new Result("Best Knapsack Solution", solution));
+      } else {
+        if (solution.Quality.Value > bestQuality.Value) {
+          solution.BinaryVector = bestBinaryVector;
+          solution.Quality = bestQuality;
+          solution.Capacity = KnapsackCapacityParameter.ActualValue;
+          solution.Weights = WeightsParameter.ActualValue;
+          solution.Values = ValuesParameter.ActualValue;
+
+          results["Best Knapsack Solution"].Value = solution;
+        }
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Analyzers/PopulationBestKnapsackSolutionAnalyzer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Analyzers/PopulationBestKnapsackSolutionAnalyzer.cs	(revision 3641)
+++ trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Analyzers/PopulationBestKnapsackSolutionAnalyzer.cs	(revision 3641)
@@ -0,0 +1,108 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 System.Text;
+using HeuristicLab.Optimization;
+using HeuristicLab.Data;
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Knapsack.Analyzers {
+  /// <summary>
+  /// An operator for analyzing the best solution for a knapsack problem.
+  /// </summary>
+  [Item("PopulationBestKnapsackSolutionAnalyzer", "An operator for analyzing the best solution for a knapsack problem.")]
+  [StorableClass]
+  class PopulationBestKnapsackSolutionAnalyzer : SingleSuccessorOperator, IBestKnapsackSolutionAnalyzer, IPopulationAnalyzer {
+
+    public ILookupParameter<ItemArray<BinaryVector>> BinaryVectorParameter {
+      get { return (ILookupParameter<ItemArray<BinaryVector>>)Parameters["BinaryVector"]; }
+    }
+    ILookupParameter IBestKnapsackSolutionAnalyzer.BinaryVectorParameter {
+      get { return BinaryVectorParameter; }
+    }
+    public ILookupParameter<IntValue> KnapsackCapacityParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["KnapsackCapacity"]; }
+    }
+    public ILookupParameter<IntArray> WeightsParameter {
+      get { return (ILookupParameter<IntArray>)Parameters["Weights"]; }
+    }
+    public ILookupParameter<IntArray> ValuesParameter {
+      get { return (ILookupParameter<IntArray>)Parameters["Values"]; }
+    }
+    public ILookupParameter<ItemArray<DoubleValue>> QualityParameter {
+      get { return (ILookupParameter<ItemArray<DoubleValue>>)Parameters["Quality"]; }
+    }
+    ILookupParameter IBestKnapsackSolutionAnalyzer.QualityParameter {
+      get { return QualityParameter; }
+    }
+    public ILookupParameter<KnapsackSolution> BestSolutionParameter {
+      get { return (ILookupParameter<KnapsackSolution>)Parameters["BestSolution"]; }
+    }
+    public IValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+
+    public PopulationBestKnapsackSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new SubScopesLookupParameter<BinaryVector>("BinaryVector", "The knapsack solutions from which the best solution should be visualized."));
+      Parameters.Add(new LookupParameter<IntValue>("KnapsackCapacity", "Capacity of the Knapsack."));
+      Parameters.Add(new LookupParameter<IntArray>("Weights", "The weights of the items."));
+      Parameters.Add(new LookupParameter<IntArray>("Values", "The values of the items."));
+      
+      Parameters.Add(new SubScopesLookupParameter<DoubleValue>("Quality", "The qualities of the knapsack solutions which should be visualized."));
+      Parameters.Add(new LookupParameter<KnapsackSolution>("BestSolution", "The best knapsack solution."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the knapsack solution should be stored."));
+    }
+
+    public override IOperation Apply() {
+      ItemArray<BinaryVector> binaryVectors = BinaryVectorParameter.ActualValue;
+      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
+      ResultCollection results = ResultsParameter.ActualValue;
+
+      int i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
+      KnapsackSolution solution = BestSolutionParameter.ActualValue;
+      if (solution == null) {
+        solution = new KnapsackSolution(binaryVectors[i], QualityParameter.ActualValue[i],
+          KnapsackCapacityParameter.ActualValue, WeightsParameter.ActualValue, ValuesParameter.ActualValue);
+        BestSolutionParameter.ActualValue = solution;
+
+        results.Add(new Result("Best Knapsack Solution", solution));
+      } else {
+        solution.BinaryVector = binaryVectors[i];
+        solution.Quality = QualityParameter.ActualValue[i];
+        solution.Capacity = KnapsackCapacityParameter.ActualValue;
+        solution.Weights = WeightsParameter.ActualValue;
+        solution.Values = ValuesParameter.ActualValue;
+
+        results["Best Knapsack Solution"].Value = solution;
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj	(revision 3616)
+++ trunk/sources/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj	(revision 3641)
@@ -81,8 +81,10 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Analyzers\MultiPopulationBestKnapsackSolutionAnalyzer.cs" />
+    <Compile Include="Analyzers\PopulationBestKnapsackSolutionAnalyzer.cs" />
     <Compile Include="Evaluators\KnapsackEvaluator.cs" />
     <Compile Include="HeuristicLabProblemsKnapsackPlugin.cs" />
+    <Compile Include="Interfaces\IBestKnapsackSolutionAnalyzer.cs" />
     <Compile Include="Interfaces\IKnapsackEvaluator.cs" />
-    <Compile Include="Interfaces\IKnapsackSolutionsVisualizer.cs" />
     <Compile Include="Interfaces\IKnapsackMoveEvaluator.cs" />
     <Compile Include="KnapsackProblem.cs" />
@@ -91,5 +93,5 @@
     <Compile Include="MoveEvaluators\KnapsackOneBitflipMoveEvaluator.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Visualizers\BestKnapsackVisualizer.cs" />
+    <Compile Include="Analyzers\BestKnapsackSolutionAnalyzer.cs" />
   </ItemGroup>
   <ItemGroup>
Index: trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IBestKnapsackSolutionAnalyzer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IBestKnapsackSolutionAnalyzer.cs	(revision 3641)
+++ trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IBestKnapsackSolutionAnalyzer.cs	(revision 3641)
@@ -0,0 +1,40 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.Knapsack;
+
+namespace HeuristicLab.Problems.Knapsack {
+  /// <summary>
+  /// An interface which represents operators for analyzing the best solution of Knapsack Problems given in bit vector representation.
+  /// </summary>
+  public interface IBestKnapsackSolutionAnalyzer : IAnalyzer {
+    ILookupParameter BinaryVectorParameter { get; }
+    ILookupParameter<IntValue> KnapsackCapacityParameter { get; }
+    ILookupParameter<IntArray> WeightsParameter { get; }
+    ILookupParameter<IntArray> ValuesParameter { get; }
+    ILookupParameter QualityParameter { get; }
+    ILookupParameter<KnapsackSolution> BestSolutionParameter { get; }
+    IValueLookupParameter<ResultCollection> ResultsParameter { get; }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IKnapsackSolutionsVisualizer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IKnapsackSolutionsVisualizer.cs	(revision 3616)
+++ 	(revision )
@@ -1,37 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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.Optimization;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.BinaryVectorEncoding;
-using HeuristicLab.Data;
-
-namespace HeuristicLab.Problems.Knapsack {
-  /// <summary>
-  /// An interface which represents an operator for visualizing solutions of Knapsack Problems.
-  /// </summary>
-  public interface IKnapsackSolutionsVisualizer : IAnalyzer {
-    ILookupParameter<ItemArray<BinaryVector>> BinaryVectorParameter { get; }
-    ILookupParameter<IntValue> KnapsackCapacityParameter { get; }
-    ILookupParameter<IntArray> WeightsParameter { get; }
-    ILookupParameter<IntArray> ValuesParameter { get; }
-  }
-}
Index: trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs	(revision 3616)
+++ trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs	(revision 3641)
@@ -32,5 +32,5 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Problems.Knapsack.Visualizers;
+using HeuristicLab.Problems.Knapsack.Analyzers;
 
 namespace HeuristicLab.Problems.Knapsack {
@@ -120,7 +120,10 @@
       set { BestKnownQualityParameter.Value = value; }
     }
-    private List<IBinaryVectorOperator> operators;
+    private List<IOperator> operators;
     public IEnumerable<IOperator> Operators {
       get { return operators.Cast<IOperator>(); }
+    }
+    private IEnumerable<IBestKnapsackSolutionAnalyzer> BestKnapsackSolutionAnalyzers {
+      get { return operators.OfType<IBestKnapsackSolutionAnalyzer>(); }
     }
     #endregion
@@ -168,5 +171,4 @@
       ParameterizeSolutionCreator();
       ParameterizeEvaluator();
-      ParameterizeVisualizer();
 
       Initialize();
@@ -201,28 +203,28 @@
 
     private void SolutionCreatorParameter_ValueChanged(object sender, EventArgs e) {
-      SolutionCreator.BinaryVectorParameter.ActualNameChanged += new EventHandler(SolutionCreator_PermutationParameter_ActualNameChanged);
-      ParameterizeSolutionCreator();
-      ParameterizeEvaluator();
-      ParameterizeVisualizer();
+      SolutionCreator.BinaryVectorParameter.ActualNameChanged += new EventHandler(SolutionCreator_BinaryVectorParameter_ActualNameChanged);
+      ParameterizeSolutionCreator();
+      ParameterizeEvaluator();
+      ParameterizeAnalyzers();
       ParameterizeOperators();
       OnSolutionCreatorChanged();
     }
-    private void SolutionCreator_PermutationParameter_ActualNameChanged(object sender, EventArgs e) {
-      ParameterizeEvaluator();
-      ParameterizeVisualizer();
+    private void SolutionCreator_BinaryVectorParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeEvaluator();
+      ParameterizeAnalyzers();
       ParameterizeOperators();
     }
     private void EvaluatorParameter_ValueChanged(object sender, EventArgs e) {
       ParameterizeEvaluator();
-      ParameterizeVisualizer();
+      ParameterizeAnalyzers();
       OnEvaluatorChanged();
     }
     void KnapsackCapacityParameter_ValueChanged(object sender, EventArgs e) {
       ParameterizeEvaluator();
-      ParameterizeVisualizer();
+      ParameterizeAnalyzers();
     }
     void WeightsParameter_ValueChanged(object sender, EventArgs e) {
       ParameterizeEvaluator();
-      ParameterizeVisualizer();
+      ParameterizeAnalyzers();
       ParameterizeSolutionCreator();
 
@@ -237,5 +239,5 @@
     void ValuesParameter_ValueChanged(object sender, EventArgs e) {
       ParameterizeEvaluator();
-      ParameterizeVisualizer();
+      ParameterizeAnalyzers();
       ParameterizeSolutionCreator();
 
@@ -264,5 +266,5 @@
       InitializeOperators();
       SolutionCreatorParameter.ValueChanged += new EventHandler(SolutionCreatorParameter_ValueChanged);
-      SolutionCreator.BinaryVectorParameter.ActualNameChanged += new EventHandler(SolutionCreator_PermutationParameter_ActualNameChanged);
+      SolutionCreator.BinaryVectorParameter.ActualNameChanged += new EventHandler(SolutionCreator_BinaryVectorParameter_ActualNameChanged);
       EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged);
       KnapsackCapacityParameter.ValueChanged += new EventHandler(KnapsackCapacityParameter_ValueChanged);
@@ -289,16 +291,19 @@
       }
     }
-    private void ParameterizeVisualizer() {
-      //if (Visualizer is IKnapsackSolutionsVisualizer) {
-      //  IKnapsackSolutionsVisualizer visualizer =
-      //    (IKnapsackSolutionsVisualizer)Visualizer;
-      //  visualizer.BinaryVectorParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName;
-      //  visualizer.KnapsackCapacityParameter.ActualName = KnapsackCapacityParameter.Name;
-      //  visualizer.WeightsParameter.ActualName = WeightsParameter.Name;
-      //  visualizer.ValuesParameter.ActualName = ValuesParameter.Name;
-      //}
+    private void ParameterizeAnalyzers() {
+      foreach (IBestKnapsackSolutionAnalyzer analyzer in BestKnapsackSolutionAnalyzers) {
+        analyzer.BinaryVectorParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName;
+        analyzer.KnapsackCapacityParameter.ActualName = KnapsackCapacityParameter.Name;
+        analyzer.WeightsParameter.ActualName = WeightsParameter.Name;
+        analyzer.ValuesParameter.ActualName = ValuesParameter.Name;
+        analyzer.ResultsParameter.ActualName = "Results";
+      }
     }
     private void InitializeOperators() {
-      operators = new List<IBinaryVectorOperator>();
+      operators = new List<IOperator>();
+      operators.Add(new BestKnapsackSolutionAnalyzer());
+      operators.Add(new PopulationBestKnapsackSolutionAnalyzer());
+      operators.Add(new MultiPopulationBestKnapsackSolutionAnalyzer());
+      ParameterizeAnalyzers();
       foreach (IBinaryVectorOperator op in ApplicationManager.Manager.GetInstances<IBinaryVectorOperator>()) {
         if (!(op is ISingleObjectiveMoveEvaluator) || (op is IKnapsackMoveEvaluator)) {
Index: trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackSolution.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackSolution.cs	(revision 3616)
+++ trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackSolution.cs	(revision 3641)
@@ -98,6 +98,20 @@
     }
 
+    [Storable]
+    private DoubleValue quality;
+    public DoubleValue Quality {
+      get { return quality; }
+      set {
+        if (quality != value) {
+          if (quality != null) DeregisterQualityEvents();
+          quality = value;
+          if (quality != null) RegisterQualityEvents();
+          OnQualityChanged();
+        }
+      }
+    }
+
     public KnapsackSolution() : base() { }
-    public KnapsackSolution(BinaryVector binaryVector, IntValue capacity, IntArray weights, IntArray values)
+    public KnapsackSolution(BinaryVector binaryVector, DoubleValue quality, IntValue capacity, IntArray weights, IntArray values)
       : base() {
       this.binaryVector = binaryVector;
@@ -105,4 +119,5 @@
       this.weights = weights;
       this.values = values;
+      this.quality = quality;
       Initialize();
     }
@@ -113,4 +128,5 @@
     private void Initialize() {
       if (binaryVector != null) RegisterBinaryVectorEvents();
+      if (quality != null) RegisterQualityEvents();
       if (capacity != null) RegisterCapacityEvents();
       if (weights != null) RegisterWeightsEvents();
@@ -122,4 +138,5 @@
       cloner.RegisterClonedObject(this, clone);
       clone.binaryVector = (BinaryVector)cloner.Clone(binaryVector);
+      clone.quality = (DoubleValue)cloner.Clone(quality);
       clone.capacity = (IntValue)cloner.Clone(capacity);
       clone.weights = (IntArray)cloner.Clone(weights);
@@ -158,4 +175,11 @@
     }
 
+    public event EventHandler QualityChanged;
+    private void OnQualityChanged() {
+      var changed = QualityChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+
     private void RegisterBinaryVectorEvents() {
       BinaryVector.ItemChanged += new EventHandler<EventArgs<int>>(BinaryVector_ItemChanged);
@@ -196,4 +220,11 @@
     }
 
+    private void RegisterQualityEvents() {
+      Quality.ValueChanged += new EventHandler(Quality_ValueChanged);
+    }
+    private void DeregisterQualityEvents() {
+      Quality.ValueChanged -= new EventHandler(Quality_ValueChanged);
+    }
+
     private void BinaryVector_ItemChanged(object sender, EventArgs<int> e) {
       OnBinaryVectorChanged();
@@ -216,4 +247,7 @@
     private void Values_Reset(object sender, EventArgs e) {
       OnValuesChanged();
+    }
+    private void Quality_ValueChanged(object sender, EventArgs e) {
+      OnQualityChanged();
     }
     #endregion
