Index: trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Analyzers/BestSingleObjectiveTestFunctionSolutionAnalyzer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Analyzers/PopulationBestSingleObjectiveTestFunctionSolutionAnalyzer.cs	(revision 3659)
+++ trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Analyzers/BestSingleObjectiveTestFunctionSolutionAnalyzer.cs	(revision 3661)
@@ -36,16 +36,16 @@
   /// An operator for analyzing the best solution for a SingleObjectiveTestFunction problem.
   /// </summary>
-  [Item("PopulationBestSingleObjectiveTestFunctionSolutionAnalyzer", "An operator for analyzing the best solution for a SingleObjectiveTestFunction problem.")]
+  [Item("BestSingleObjectiveTestFunctionSolutionAnalyzer", "An operator for analyzing the best solution for a SingleObjectiveTestFunction problem.")]
   [StorableClass]
-  class PopulationBestSingleObjectiveTestFunctionSolutionAnalyzer : SingleSuccessorOperator, IBestSingleObjectiveTestFunctionSolutionAnalyzer, IAnalyzer {
+  class BestSingleObjectiveTestFunctionSolutionAnalyzer : SingleSuccessorOperator, IBestSingleObjectiveTestFunctionSolutionAnalyzer, IAnalyzer {
 
-    public ILookupParameter<ItemArray<RealVector>> RealVectorParameter {
-      get { return (ILookupParameter<ItemArray<RealVector>>)Parameters["RealVector"]; }
+    public ScopeTreeLookupParameter<RealVector> RealVectorParameter {
+      get { return (ScopeTreeLookupParameter<RealVector>)Parameters["RealVector"]; }
     }
     ILookupParameter IBestSingleObjectiveTestFunctionSolutionAnalyzer.RealVectorParameter {
       get { return RealVectorParameter; }
     }
-    public ILookupParameter<ItemArray<DoubleValue>> QualityParameter {
-      get { return (ILookupParameter<ItemArray<DoubleValue>>)Parameters["Quality"]; }
+    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
     }
     ILookupParameter IBestSingleObjectiveTestFunctionSolutionAnalyzer.QualityParameter {
@@ -58,31 +58,40 @@
       get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; }
     }
+    public IValueLookupParameter<ISingleObjectiveTestFunctionProblemEvaluator> EvaluatorParameter {
+      get { return (IValueLookupParameter<ISingleObjectiveTestFunctionProblemEvaluator>)Parameters["Evaluator"]; }
+    }
 
-    public PopulationBestSingleObjectiveTestFunctionSolutionAnalyzer()
+    public BestSingleObjectiveTestFunctionSolutionAnalyzer()
       : base() {
       Parameters.Add(new ScopeTreeLookupParameter<RealVector>("RealVector", "The SingleObjectiveTestFunction solutions from which the best solution should be visualized."));
-
       Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the SingleObjectiveTestFunction solutions which should be visualized."));
       Parameters.Add(new LookupParameter<SingleObjectiveTestFunctionSolution>("BestSolution", "The best SingleObjectiveTestFunction solution."));
       Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the SingleObjectiveTestFunction solution should be stored."));
+      Parameters.Add(new ValueLookupParameter<ISingleObjectiveTestFunctionProblemEvaluator>("Evaluator", "The evaluator with which the solution is evaluated."));
     }
 
     public override IOperation Apply() {
-      ItemArray<RealVector> RealVectors = RealVectorParameter.ActualValue;
+      ItemArray<RealVector> realVectors = RealVectorParameter.ActualValue;
       ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
       ResultCollection results = ResultsParameter.ActualValue;
+      ISingleObjectiveTestFunctionProblemEvaluator evaluator = EvaluatorParameter.ActualValue;
 
       int i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
       SingleObjectiveTestFunctionSolution solution = BestSolutionParameter.ActualValue;
       if (solution == null) {
-        solution = new SingleObjectiveTestFunctionSolution(RealVectors[i], QualityParameter.ActualValue[i]);
+        solution = new SingleObjectiveTestFunctionSolution(realVectors[i], qualities[i], evaluator);
+        solution.Population = realVectors;
         BestSolutionParameter.ActualValue = solution;
 
         results.Add(new Result("Best SingleObjectiveTestFunction Solution", solution));
       } else {
-        solution.RealVector = RealVectors[i];
-        solution.Quality = QualityParameter.ActualValue[i];
+        if (evaluator.Maximization && qualities[i].Value > solution.BestQuality.Value
+          || !evaluator.Maximization && qualities[i].Value < solution.BestQuality.Value) {
+          solution.BestRealVector = realVectors[i];
+          solution.BestQuality = qualities[i];
+        }
+        solution.Population = realVectors;
 
-        results["Best SingleObjectiveTestFunction Solution"].Value = solution;
+        //results["Best SingleObjectiveTestFunction Solution"].Value = solution;
       }
 
