Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/AnalyticalPTSP.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/AnalyticalPTSP.cs	(revision 12191)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/AnalyticalPTSP.cs	(revision 12191)
@@ -0,0 +1,72 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Optimization;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.Instances;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Common;
+using HeuristicLab.Parameters;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.PTSP {
+  [Item("Analytical Probabilistic Traveling Salesman Problem", "Represents an analytical Probabilistic Traveling Salesman Problem.")]
+  [Creatable("Problems")]
+  [StorableClass]
+  public sealed class AnalyticalProbabilisticTravelingSalesmanProblem : ProbabilisticTravelingSalesmanProblem, IStorableContent,
+  IProblemInstanceConsumer<TSPData> {
+
+    [StorableConstructor]
+    private AnalyticalProbabilisticTravelingSalesmanProblem(bool deserializing) : base(deserializing) { }
+    private AnalyticalProbabilisticTravelingSalesmanProblem(AnalyticalProbabilisticTravelingSalesmanProblem original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new AnalyticalProbabilisticTravelingSalesmanProblem(this, cloner);
+    }
+
+    public override double Evaluate(Individual individual, IRandom random) {
+      Permutation p = individual.Permutation();
+      // Analytical evaluation
+      double firstSum = 0;
+      for (int i = 0; i < p.Length - 1; i++) {
+        for (int j = i + 1; j < p.Length - 1; j++) {
+          double sum1 = DistanceMatrix[p[i], p[j]] * ProbabilityMatrix[0, p[i]] * ProbabilityMatrix[0, p[j]];
+          for (int k = i + 1; k < j; k++) {
+            sum1 = sum1 * (1 - ProbabilityMatrix[0, p[k]]);
+          }
+          firstSum += sum1;
+        }
+      }
+      double secondSum = 0;
+      for (int j = 0; j < p.Length - 1; j++) {
+        for (int i = 0; i < j; i++) {
+          double sum2 = DistanceMatrix[p[j], p[i]] * ProbabilityMatrix[0, p[i]] * ProbabilityMatrix[0, p[j]];
+          for (int k = j + 1; k < p.Length - 1; k++) {
+            sum2 = sum2 * (1 - ProbabilityMatrix[0, p[k]]);
+          }
+          for (int k = 1; k < i; k++) {
+            sum2 = sum2 * (1 - ProbabilityMatrix[0, p[k]]);
+          }
+          secondSum += sum2;
+        }
+      }
+      return firstSum + secondSum;
+    }
+
+    public AnalyticalProbabilisticTravelingSalesmanProblem() {
+      Operators.Add(new PTSPInversionMovePathEvaluator());
+    }
+
+    public override void Load(TSPData data) {
+      base.Load(data);
+      // Compute A and B matrices
+    }
+
+  }
+}
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/DistanceMatrix.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/DistanceMatrix.cs	(revision 12190)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/DistanceMatrix.cs	(revision 12191)
@@ -1,4 +1,3 @@
 ﻿using System;
-using System;
 using System.Collections.Generic;
 using HeuristicLab.Common;
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/EstimatedPTSP.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/EstimatedPTSP.cs	(revision 12191)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/EstimatedPTSP.cs	(revision 12191)
@@ -0,0 +1,61 @@
+﻿using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Optimization;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.Instances;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Common;
+using HeuristicLab.Parameters;
+using HeuristicLab.Data;
+using System;
+
+namespace HeuristicLab.Problems.PTSP {
+  [Item("Estimated Probabilistic Traveling Salesman Problem", "Represents an estimated Probabilistic Traveling Salesman Problem.")]
+  [Creatable("Problems")]
+  [StorableClass]
+  public sealed class EstimatedProbabilisticTravelingSalesmanProblem : ProbabilisticTravelingSalesmanProblem, IStorableContent,
+  IProblemInstanceConsumer<TSPData> {
+
+    [StorableConstructor]
+    private EstimatedProbabilisticTravelingSalesmanProblem(bool deserializing) : base(deserializing) { }
+    private EstimatedProbabilisticTravelingSalesmanProblem(EstimatedProbabilisticTravelingSalesmanProblem original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new EstimatedProbabilisticTravelingSalesmanProblem(this, cloner);
+    }
+
+    public override double Evaluate(Individual individual, IRandom random) {
+      Permutation p = individual.Permutation();
+      // Estimation-based evaluation
+      Random r = new Random();
+      double estimatedSum = 0;
+      for (int i = 0; i < SampleSize.Value; i++) {
+        int singleRealization = -1;
+        for (int j = 0; j < p.Length - 1; j++) {
+          if (ProbabilityMatrix[0, p[j]] > r.NextDouble()) {
+            if (singleRealization != -1) {
+              estimatedSum += DistanceMatrix[singleRealization, p[j]];
+            }
+            singleRealization = p[j];
+          }
+        }
+      }
+      return estimatedSum / SampleSize.Value;
+    }
+
+    public EstimatedProbabilisticTravelingSalesmanProblem() {
+      Parameters.Add(new ValueParameter<IntValue>("SampleSize", "Size of the sample for the estimation-based evaluation"));
+      Operators.Add(new PTSPInversionMovePathEvaluator());
+    }
+
+    public override void Load(TSPData data) {
+      base.Load(data);
+      // For now uses sample size of 20 but should use Student's t-test
+      SampleSize = new IntValue(20);
+    }
+  }
+}
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 12190)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/HeuristicLab.Problems.PTSP-3.3.csproj	(revision 12191)
@@ -99,4 +99,5 @@
     <Reference Include="System" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Drawing" />
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />
@@ -108,5 +109,12 @@
     <None Include="Properties\AssemblyInfo.cs.frame" />
     <None Include="Plugin.cs.frame" />
+    <Compile Include="AnalyticalPTSP.cs" />
     <Compile Include="DistanceMatrix.cs" />
+    <Compile Include="EstimatedPTSP.cs" />
+    <Compile Include="Interfaces\IPTSPPathMoveEvaluator.cs" />
+    <Compile Include="Interfaces\IPTSPMoveEvaluator.cs" />
+    <Compile Include="MoveEvaluators\PTSPMoveEvaluator.cs" />
+    <Compile Include="MoveEvaluators\PTSPPathMoveEvaluator.cs" />
+    <Compile Include="MoveEvaluators\TwoOpt\PTSPInversionMovePathEvaluator.cs" />
     <Compile Include="PTSP.cs" />
     <Compile Include="Plugin.cs" />
@@ -115,4 +123,7 @@
   <ItemGroup>
     <None Include="HeuristicLab.snk" />
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="MoveEvaluators\OneShift\" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/Interfaces/IPTSPMoveEvaluator.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/Interfaces/IPTSPMoveEvaluator.cs	(revision 12191)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/Interfaces/IPTSPMoveEvaluator.cs	(revision 12191)
@@ -0,0 +1,29 @@
+﻿#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;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.PTSP {
+  public interface IPTSPMoveEvaluator : ISingleObjectiveMoveEvaluator, IMoveOperator {
+    Type EvaluatorType { get; }
+  }
+}
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/Interfaces/IPTSPPathMoveEvaluator.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/Interfaces/IPTSPPathMoveEvaluator.cs	(revision 12191)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/Interfaces/IPTSPPathMoveEvaluator.cs	(revision 12191)
@@ -0,0 +1,32 @@
+﻿#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+
+namespace HeuristicLab.Problems.PTSP {
+  public interface IPTSPPathMoveEvaluator : IPTSPMoveEvaluator, IPermutationMoveOperator {
+    ILookupParameter<DoubleMatrix> CoordinatesParameter { get; }
+    ILookupParameter<DistanceMatrix> DistanceMatrixParameter { get; }
+    ILookupParameter<BoolValue> UseDistanceMatrixParameter { get; }
+  }
+}
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/PTSPMoveEvaluator.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/PTSPMoveEvaluator.cs	(revision 12191)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/PTSPMoveEvaluator.cs	(revision 12191)
@@ -0,0 +1,39 @@
+﻿using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.PTSP {
+  /// <summary>
+  /// A base class for operators which evaluate TSP solutions.
+  /// </summary>
+  [Item("PTSPMoveEvaluator", "A base class for operators which evaluate TSP moves.")]
+  [StorableClass]
+  public abstract class PTSPMoveEvaluator : SingleSuccessorOperator, IPTSPMoveEvaluator, IMoveOperator {
+
+    public abstract Type EvaluatorType { get; }
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
+    }
+
+    [StorableConstructor]
+    protected PTSPMoveEvaluator(bool deserializing) : base(deserializing) { }
+    protected PTSPMoveEvaluator(PTSPMoveEvaluator original, Cloner cloner) : base(original, cloner) { }
+    protected PTSPMoveEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of a TSP solution."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The evaluated quality of a move on a TSP solution."));
+    }
+  }
+}
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/PTSPPathMoveEvaluator.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/PTSPPathMoveEvaluator.cs	(revision 12191)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/PTSPPathMoveEvaluator.cs	(revision 12191)
@@ -0,0 +1,109 @@
+﻿#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;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.PTSP {
+  /// <summary>
+  /// A base class for operators which evaluate TSP solutions.
+  /// </summary>
+  [Item("PTSPMoveEvaluator", "A base class for operators which evaluate TSP moves.")]
+  [StorableClass]
+  public abstract class PTSPPathMoveEvaluator : PTSPMoveEvaluator, IPTSPPathMoveEvaluator {
+    public ILookupParameter<Permutation> PermutationParameter {
+      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
+    }
+    public ILookupParameter<DoubleMatrix> CoordinatesParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
+    }
+    public ILookupParameter<DistanceMatrix> DistanceMatrixParameter {
+      get { return (ILookupParameter<DistanceMatrix>)Parameters["DistanceMatrix"]; }
+    }
+    public ILookupParameter<BoolValue> UseDistanceMatrixParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters["UseDistanceMatrix"]; }
+    }
+
+    [StorableConstructor]
+    protected PTSPPathMoveEvaluator(bool deserializing) : base(deserializing) { }
+    protected PTSPPathMoveEvaluator(PTSPPathMoveEvaluator original, Cloner cloner) : base(original, cloner) { }
+    protected PTSPPathMoveEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The city's coordinates."));
+      Parameters.Add(new LookupParameter<DistanceMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+      Parameters.Add(new LookupParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated (if it does not exist already) and used for evaluation, otherwise false."));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code (remove with 3.4)
+      LookupParameter<DoubleMatrix> oldDistanceMatrixParameter = Parameters["DistanceMatrix"] as LookupParameter<DoubleMatrix>;
+      if (oldDistanceMatrixParameter != null) {
+        Parameters.Remove(oldDistanceMatrixParameter);
+        Parameters.Add(new LookupParameter<DistanceMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+        DistanceMatrixParameter.ActualName = oldDistanceMatrixParameter.ActualName;
+      }
+      #endregion
+    }
+
+    public override IOperation Apply() {
+      Permutation permutation = PermutationParameter.ActualValue;
+      DoubleMatrix coordinates = CoordinatesParameter.ActualValue;
+      double relativeQualityDifference = 0;
+      if (UseDistanceMatrixParameter.ActualValue.Value) {
+        DistanceMatrix distanceMatrix = DistanceMatrixParameter.ActualValue;
+        if (distanceMatrix == null) {
+          if (coordinates == null) throw new InvalidOperationException("Neither a distance matrix nor coordinates were given.");
+          distanceMatrix = CalculateDistanceMatrix(coordinates);
+          DistanceMatrixParameter.ActualValue = distanceMatrix;
+        }
+        relativeQualityDifference = EvaluateByDistanceMatrix(permutation, distanceMatrix);
+      } else {
+        if (coordinates == null) throw new InvalidOperationException("No coordinates were given.");
+        relativeQualityDifference = EvaluateByCoordinates(permutation, coordinates);
+      }
+      DoubleValue moveQuality = MoveQualityParameter.ActualValue;
+      if (moveQuality == null) MoveQualityParameter.ActualValue = new DoubleValue(QualityParameter.ActualValue.Value + relativeQualityDifference);
+      else moveQuality.Value = QualityParameter.ActualValue.Value + relativeQualityDifference;
+      return base.Apply();
+    }
+
+    protected abstract double CalculateDistance(double x1, double y1, double x2, double y2);
+    protected abstract double EvaluateByDistanceMatrix(Permutation permutation, DistanceMatrix distanceMatrix);
+    protected abstract double EvaluateByCoordinates(Permutation permutation, DoubleMatrix coordinates);
+
+    private DistanceMatrix CalculateDistanceMatrix(DoubleMatrix c) {
+      DistanceMatrix distanceMatrix = new DistanceMatrix(c.Rows, c.Rows);
+      for (int i = 0; i < distanceMatrix.Rows; i++) {
+        for (int j = 0; j < distanceMatrix.Columns; j++)
+          distanceMatrix[i, j] = CalculateDistance(c[i, 0], c[i, 1], c[j, 0], c[j, 1]);
+      }
+      return (DistanceMatrix)distanceMatrix.AsReadOnly();
+    }
+  }
+}
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/TwoOpt/PTSPInversionMovePathEvaluator.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/TwoOpt/PTSPInversionMovePathEvaluator.cs	(revision 12191)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/MoveEvaluators/TwoOpt/PTSPInversionMovePathEvaluator.cs	(revision 12191)
@@ -0,0 +1,104 @@
+﻿#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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System;
+
+namespace HeuristicLab.Problems.PTSP {
+  /// <summary>
+  /// An operator to evaluate inversion moves (2-opt).
+  /// </summary>
+  [Item("PTSPInversionMovePathEvaluator", "Evaluates an inversion move (2-opt) by summing up the length of all added edges and subtracting the length of all deleted edges.")]
+  [StorableClass]
+  public class PTSPInversionMovePathEvaluator : PTSPPathMoveEvaluator, IPermutationInversionMoveOperator {
+    public override Type EvaluatorType {
+      get { return typeof(PTSPInversionMovePathEvaluator); }
+    }
+    public ILookupParameter<InversionMove> InversionMoveParameter {
+      get { return (ILookupParameter<InversionMove>)Parameters["InversionMove"]; }
+    }
+
+    [StorableConstructor]
+    protected PTSPInversionMovePathEvaluator(bool deserializing) : base(deserializing) { }
+    protected PTSPInversionMovePathEvaluator(PTSPInversionMovePathEvaluator original, Cloner cloner) : base(original, cloner) { }
+    public PTSPInversionMovePathEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<InversionMove>("InversionMove", "The move to evaluate."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PTSPInversionMovePathEvaluator(this, cloner);
+    }
+
+    public static double EvaluateByCoordinates(Permutation permutation, InversionMove move, DoubleMatrix coordinates, PTSPInversionMovePathEvaluator evaluator) {
+      int edge1source = permutation.GetCircular(move.Index1 - 1);
+      int edge1target = permutation[move.Index1];
+      int edge2source = permutation[move.Index2];
+      int edge2target = permutation.GetCircular(move.Index2 + 1);
+      if (move.Index2 - move.Index1 >= permutation.Length - 2) return 0;
+      double moveQuality = 0;
+      // remove two edges
+      moveQuality -= evaluator.CalculateDistance(coordinates[edge1source, 0], coordinates[edge1source, 1],
+            coordinates[edge1target, 0], coordinates[edge1target, 1]);
+      moveQuality -= evaluator.CalculateDistance(coordinates[edge2source, 0], coordinates[edge2source, 1],
+        coordinates[edge2target, 0], coordinates[edge2target, 1]);
+      // add two edges
+      moveQuality += evaluator.CalculateDistance(coordinates[edge1source, 0], coordinates[edge1source, 1],
+        coordinates[edge2source, 0], coordinates[edge2source, 1]);
+      moveQuality += evaluator.CalculateDistance(coordinates[edge1target, 0], coordinates[edge1target, 1],
+        coordinates[edge2target, 0], coordinates[edge2target, 1]);
+      return moveQuality;
+    }
+
+    public static double EvaluateByDistanceMatrix(Permutation permutation, InversionMove move, DistanceMatrix distanceMatrix) {
+      int edge1source = permutation.GetCircular(move.Index1 - 1);
+      int edge1target = permutation[move.Index1];
+      int edge2source = permutation[move.Index2];
+      int edge2target = permutation.GetCircular(move.Index2 + 1);
+      if (move.Index2 - move.Index1 >= permutation.Length - 2) return 0;
+      double moveQuality = 0;
+      // remove two edges
+      moveQuality -= distanceMatrix[edge1source, edge1target];
+      moveQuality -= distanceMatrix[edge2source, edge2target];
+      // add two edges
+      moveQuality += distanceMatrix[edge1source, edge2source];
+      moveQuality += distanceMatrix[edge1target, edge2target];
+      return moveQuality;
+    }
+
+    protected override double EvaluateByCoordinates(Permutation permutation, DoubleMatrix coordinates) {
+      return EvaluateByCoordinates(permutation, InversionMoveParameter.ActualValue, coordinates, this);
+    }
+
+    protected override double EvaluateByDistanceMatrix(Permutation permutation, DistanceMatrix distanceMatrix) {
+      return EvaluateByDistanceMatrix(permutation, InversionMoveParameter.ActualValue, distanceMatrix);
+    }
+
+    protected override double CalculateDistance(double x1, double y1, double x2, double y2) {
+      return Math.Round(Math.Sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));
+    }
+  }
+}
Index: /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/PTSP.cs
===================================================================
--- /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/PTSP.cs	(revision 12190)
+++ /branches/PTSP/HeuristicLab.Problems.PTSP/3.3/PTSP.cs	(revision 12191)
@@ -37,7 +37,6 @@
 namespace HeuristicLab.Problems.PTSP {
   [Item("Probabilistic Traveling Salesman Problem", "Represents a Probabilistic Traveling Salesman Problem.")]
-  [Creatable("Problems")]
   [StorableClass]
-  public sealed class ProbabilisticTravelingSalesmanProblem : SingleObjectiveBasicProblem<PermutationEncoding>, IStorableContent,
+  public abstract class ProbabilisticTravelingSalesmanProblem : SingleObjectiveBasicProblem<PermutationEncoding>, IStorableContent,
   IProblemInstanceConsumer<TSPData> {
     #region Parameter Properties
@@ -53,7 +52,4 @@
     public OptionalValueParameter<Permutation> BestKnownSolutionParameter {
       get { return (OptionalValueParameter<Permutation>)Parameters["BestKnownSolution"]; }
-    }
-    public ValueParameter<BoolValue> UseAnalyticalEvaluationParameter {
-      get { return (ValueParameter<BoolValue>)Parameters["UseAnalyticalEvaluation"]; }
     }
     public OptionalValueParameter<DistanceMatrix> ProbabilityMatrixParameter {
@@ -83,8 +79,4 @@
       set { BestKnownSolutionParameter.Value = value; }
     }
-    public BoolValue UseAnalyticalEvaluation {
-      get { return UseAnalyticalEvaluationParameter.Value; }
-      set { UseAnalyticalEvaluationParameter.Value = value; }
-    }
     public DistanceMatrix ProbabilityMatrix {
       get { return ProbabilityMatrixParameter.Value; }
@@ -96,50 +88,5 @@
     }
     #endregion
-    public override double Evaluate(Individual individual, IRandom random) {
-      Permutation p = individual.Permutation();
-      if (UseAnalyticalEvaluation.Value) {
-        // Analytical evaluation
-        double firstSum = 0;
-        for (int i = 0; i < p.Length - 1; i++) {
-          for (int j = i + 1; j < p.Length - 1; j++) {
-            double sum1 = DistanceMatrix[p[i], p[j]] * ProbabilityMatrix[0, p[i]] * ProbabilityMatrix[0, p[j]];
-            for (int k = i + 1; k < j; k++) {
-              sum1 = sum1 * (1 - ProbabilityMatrix[0, p[k]]);
-            }
-            firstSum += sum1;
-          }
-        }
-        double secondSum = 0;
-        for (int j = 0; j < p.Length - 1; j++) {
-          for (int i = 0; i < j; i++) {
-            double sum2 = DistanceMatrix[p[j], p[i]] * ProbabilityMatrix[0, p[i]] * ProbabilityMatrix[0, p[j]];
-            for (int k = j + 1; k < p.Length - 1; k++) {
-              sum2 = sum2 * (1 - ProbabilityMatrix[0, p[k]]);
-            }
-            for (int k = 1; k < i; k++) {
-              sum2 = sum2 * (1 - ProbabilityMatrix[0, p[k]]);
-            }
-            secondSum += sum2;
-          }
-        }
-        return firstSum+secondSum;
-      } else {
-        // Estimation-based evaluation
-        Random r = new Random();
-        double estimatedSum = 0;
-        for (int i = 0; i < SampleSize.Value; i++) {
-          int singleRealization = -1;
-          for (int j = 0; j < p.Length - 1; j++) {
-            if (ProbabilityMatrix[0, p[j]] > r.NextDouble()) {
-              if (singleRealization != -1) {
-                estimatedSum += DistanceMatrix[singleRealization, p[j]];
-              }
-              singleRealization = p[j];
-            }
-          }
-        }
-        return estimatedSum / SampleSize.Value;
-      }
-    }
+    
 
     public override bool Maximization {
@@ -148,11 +95,9 @@
 
     [StorableConstructor]
-    private ProbabilisticTravelingSalesmanProblem(bool deserializing) : base(deserializing) { }
-    private ProbabilisticTravelingSalesmanProblem(ProbabilisticTravelingSalesmanProblem original, Cloner cloner)
+    protected ProbabilisticTravelingSalesmanProblem(bool deserializing) : base(deserializing) { }
+    protected ProbabilisticTravelingSalesmanProblem(ProbabilisticTravelingSalesmanProblem original, Cloner cloner)
       : base(original, cloner) {
     }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new ProbabilisticTravelingSalesmanProblem(this, cloner);
-    }
+
     public ProbabilisticTravelingSalesmanProblem() {
       Parameters.Add(new OptionalValueParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities."));
@@ -160,11 +105,9 @@
       Parameters.Add(new ValueParameter<BoolValue>("UseDistanceMatrix", "True if the coordinates based evaluators should calculate the distance matrix from the coordinates and use it for evaluation similar to the distance matrix evaluator, otherwise false.", new BoolValue(true)));
       Parameters.Add(new OptionalValueParameter<Permutation>("BestKnownSolution", "The best known solution of this TSP instance."));
-      Parameters.Add(new ValueParameter<BoolValue>("UseAnalyticalEvaluation", "Check to use analytical evaluation, uncheck to use estimation-based approach."));
       Parameters.Add(new OptionalValueParameter<DistanceMatrix>("ProbabilityMatrix", "The matrix which contains the probabilities of each of the cities."));
-      Parameters.Add(new ValueParameter<IntValue>("SampleSize", "Size of the sample for the estimation-based evaluation"));
+      
     }
 
-    public void Load(TSPData data) {
-      SampleSize = new IntValue(20);
+    public virtual void Load(TSPData data) {
       DistanceMatrix = new DistanceMatrix(data.GetDistanceMatrix());
       // Get Probabilities of cities using random with seed from hash function on the Name of the instance
