Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/Analyzers/BestPTSPSolutionAnalyzer.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/Analyzers/BestPTSPSolutionAnalyzer.cs	(revision 12799)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/Analyzers/BestPTSPSolutionAnalyzer.cs	(revision 12799)
@@ -0,0 +1,138 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Linq;
+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.Problems.PTSP {
+  /// <summary>
+  /// An operator for analyzing the best solution of Traveling Salesman Problems given in path representation using city coordinates.
+  /// </summary>
+  [Item("BestPTSPSolutionAnalyzer", "An operator for analyzing the best solution of Probabilistic Traveling Salesman Problems given in path representation using city coordinates.")]
+  [StorableClass]
+  public sealed class BestPTSPSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator {
+    public bool EnabledByDefault {
+      get { return true; }
+    }
+
+    public LookupParameter<BoolValue> MaximizationParameter {
+      get { return (LookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    public LookupParameter<DoubleMatrix> CoordinatesParameter {
+      get { return (LookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
+    }
+    public ScopeTreeLookupParameter<Permutation> PermutationParameter {
+      get { return (ScopeTreeLookupParameter<Permutation>)Parameters["Permutation"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public LookupParameter<DoubleArray> ProbabilityMatrixParameter {
+      get { return (LookupParameter<DoubleArray>)Parameters["ProbabilityMatrix"]; }
+    }
+    public LookupParameter<PathPTSPTour> BestSolutionParameter {
+      get { return (LookupParameter<PathPTSPTour>)Parameters["BestSolution"]; }
+    }
+    public ValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+    public LookupParameter<DoubleValue> BestKnownQualityParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
+    }
+    public LookupParameter<Permutation> BestKnownSolutionParameter {
+      get { return (LookupParameter<Permutation>)Parameters["BestKnownSolution"]; }
+    }
+
+    [StorableConstructor]
+    private BestPTSPSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+    private BestPTSPSolutionAnalyzer(BestPTSPSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BestPTSPSolutionAnalyzer(this, cloner);
+    }
+    public BestPTSPSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities."));
+      Parameters.Add(new ScopeTreeLookupParameter<Permutation>("Permutation", "The PTSP solutions given in path representation from which the best solution should be analyzed."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the PTSP solutions which should be analyzed."));
+      Parameters.Add(new LookupParameter<DoubleArray>("ProbabilityMatrix", "The matrix which contains the probabilities of each of the cities."));
+      Parameters.Add(new LookupParameter<PathPTSPTour>("BestSolution", "The best PTSP solution."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best PTSP solution should be stored."));
+      Parameters.Add(new LookupParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this PTSP instance."));
+      Parameters.Add(new LookupParameter<Permutation>("BestKnownSolution", "The best known solution of this PTSP instance."));
+
+      MaximizationParameter.Hidden = true;
+      CoordinatesParameter.Hidden = true;
+      PermutationParameter.Hidden = true;
+      QualityParameter.Hidden = true;
+      ProbabilityMatrixParameter.Hidden = true;
+      BestSolutionParameter.Hidden = true;
+      ResultsParameter.Hidden = true;
+      BestKnownQualityParameter.Hidden = true;
+      BestKnownSolutionParameter.Hidden = true;
+    }
+
+    public override IOperation Apply() {
+      DoubleMatrix coordinates = CoordinatesParameter.ActualValue;
+      ItemArray<Permutation> permutations = PermutationParameter.ActualValue;
+      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
+      DoubleArray probabilities = ProbabilityMatrixParameter.ActualValue;
+      ResultCollection results = ResultsParameter.ActualValue;
+      bool max = MaximizationParameter.ActualValue.Value;
+      DoubleValue bestKnownQuality = BestKnownQualityParameter.ActualValue;
+
+      int i = -1;
+      if (!max)
+        i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
+      else i = qualities.Select((x, index) => new { index, x.Value }).OrderByDescending(x => x.Value).First().index;
+
+      if (bestKnownQuality == null ||
+          max && qualities[i].Value > bestKnownQuality.Value ||
+          !max && qualities[i].Value < bestKnownQuality.Value) {
+        BestKnownQualityParameter.ActualValue = new DoubleValue(qualities[i].Value);
+        BestKnownSolutionParameter.ActualValue = (Permutation)permutations[i].Clone();
+      }
+
+      PathPTSPTour tour = BestSolutionParameter.ActualValue;
+      if (tour == null) {
+        tour = new PathPTSPTour(coordinates,probabilities, (Permutation)permutations[i].Clone(), new DoubleValue(qualities[i].Value));
+        BestSolutionParameter.ActualValue = tour;
+        results.Add(new Result("Best PTSP Solution", tour));
+      } else {
+        if (max && tour.Quality.Value < qualities[i].Value ||
+          !max && tour.Quality.Value > qualities[i].Value) {
+          tour.Coordinates = coordinates;
+          tour.Permutation = (Permutation)permutations[i].Clone();
+          tour.Quality.Value = qualities[i].Value;
+        }
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/EstimatedPTSP.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/EstimatedPTSP.cs	(revision 12798)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/EstimatedPTSP.cs	(revision 12799)
@@ -53,4 +53,11 @@
       Parameters.Add(new ValueParameter<IntValue>("RealizationsSize", "Size of the sample for the estimation-based evaluation"));
       Parameters.Add(new ValueParameter<ItemList<ItemList<IntValue>>>("Realizations", "The concrete..."));
+
+      Operators.RemoveAll(x => x is ISingleObjectiveMoveEvaluator);
+      Operators.RemoveAll(x => x is IMoveGenerator);
+      Operators.RemoveAll(x => x is IMoveMaker);
+
+      Operators.Add(new BestPTSPSolutionAnalyzer());
+
       Operators.Add(new PTSPEstimatedInversionEvaluator());
       Operators.Add(new PTSPEstimatedInsertionEvaluator());
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/HeuristicLab.Problems.PTSP-3.3.csproj
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/HeuristicLab.Problems.PTSP-3.3.csproj	(revision 12798)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/HeuristicLab.Problems.PTSP-3.3.csproj	(revision 12799)
@@ -115,4 +115,5 @@
     <None Include="Plugin.cs.frame" />
     <Compile Include="AnalyticalPTSP.cs" />
+    <Compile Include="Analyzers\BestPTSPSolutionAnalyzer.cs" />
     <Compile Include="DistanceMatrix.cs" />
     <Compile Include="EstimatedPTSP.cs" />
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/OneShift/PTSPEstimatedInsertionEvaluator.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/OneShift/PTSPEstimatedInsertionEvaluator.cs	(revision 12798)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/OneShift/PTSPEstimatedInsertionEvaluator.cs	(revision 12799)
@@ -157,5 +157,5 @@
       }
       // return average of cost differences
-      return moveQuality / realizations.Capacity;
+      return moveQuality / realizations.Count;
     }
 
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/TwoOpt/PTSPEstimatedInversionEvaluator.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/TwoOpt/PTSPEstimatedInversionEvaluator.cs	(revision 12798)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/TwoOpt/PTSPEstimatedInversionEvaluator.cs	(revision 12799)
@@ -119,5 +119,5 @@
       }
       // return average of cost differences
-      return moveQuality / realizations.Capacity;
+      return moveQuality / realizations.Count;
     }
 
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/TwoPointFiveOpt/PTSP25MoveEvaluator.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/TwoPointFiveOpt/PTSP25MoveEvaluator.cs	(revision 12798)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/TwoPointFiveOpt/PTSP25MoveEvaluator.cs	(revision 12799)
@@ -175,5 +175,5 @@
       }
       // return average of cost differences
-      return moveQuality / realizations.Capacity;
+      return moveQuality / realizations.Count;
     }
     public static double EvaluateInsertionByDistanceMatrix(Permutation permutation, TwoPointFiveMove move, DistanceMatrix distanceMatrix, ItemList<ItemList<IntValue>> realizations) {
@@ -258,5 +258,5 @@
       }
       // return average of cost differences
-      return moveQuality / realizations.Capacity;
+      return moveQuality / realizations.Count;
     }
     protected double EvaluateByDistanceMatrix(Permutation permutation, DistanceMatrix distanceMatrix) {
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/PathPTSPTour.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/PathPTSPTour.cs	(revision 12798)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/PathPTSPTour.cs	(revision 12799)
@@ -32,5 +32,5 @@
   /// Represents a tour of a Probabilistic Traveling Salesman Problem given in path representation which can be visualized in the GUI.
   /// </summary>
-  [Item("PathTSPTour", "Represents a tour of a Probabilistic Traveling Salesman Problem given in path representation which can be visualized in the GUI.")]
+  [Item("PathPTSPTour", "Represents a tour of a Probabilistic Traveling Salesman Problem given in path representation which can be visualized in the GUI.")]
   [StorableClass]
   public sealed class PathPTSPTour : Item {
