Index: /branches/2521_ProblemRefactoring/HeuristicLab 3.3.sln
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab 3.3.sln	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab 3.3.sln	(revision 17254)
@@ -1,6 +1,6 @@
 ﻿
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26730.16
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29306.81
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{96396439-A764-4022-A8D2-BE021449B8D1}"
@@ -471,4 +471,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.DataAnalysis.DecisionTrees-3.4", "HeuristicLab.Algorithms.DataAnalysis.DecisionTrees\3.4\HeuristicLab.Algorithms.DataAnalysis.DecisionTrees-3.4.csproj", "{541A53F3-E6A7-402F-91BB-D76041CDD9FD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Tests", "HeuristicLab.Tests\HeuristicLab.Tests.csproj", "{B62872C1-6752-4758-9823-751A2D28C388}"
 EndProject
 Global
@@ -2290,4 +2292,16 @@
 		{541A53F3-E6A7-402F-91BB-D76041CDD9FD}.Release|x86.ActiveCfg = Release|Any CPU
 		{541A53F3-E6A7-402F-91BB-D76041CDD9FD}.Release|x86.Build.0 = Release|Any CPU
+		{B62872C1-6752-4758-9823-751A2D28C388}.Debug|Any CPU.ActiveCfg = Debug|x64
+		{B62872C1-6752-4758-9823-751A2D28C388}.Debug|Any CPU.Build.0 = Debug|x64
+		{B62872C1-6752-4758-9823-751A2D28C388}.Debug|x64.ActiveCfg = Debug|x64
+		{B62872C1-6752-4758-9823-751A2D28C388}.Debug|x64.Build.0 = Debug|x64
+		{B62872C1-6752-4758-9823-751A2D28C388}.Debug|x86.ActiveCfg = Debug|x86
+		{B62872C1-6752-4758-9823-751A2D28C388}.Debug|x86.Build.0 = Debug|x86
+		{B62872C1-6752-4758-9823-751A2D28C388}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B62872C1-6752-4758-9823-751A2D28C388}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B62872C1-6752-4758-9823-751A2D28C388}.Release|x64.ActiveCfg = Release|x64
+		{B62872C1-6752-4758-9823-751A2D28C388}.Release|x64.Build.0 = Release|x64
+		{B62872C1-6752-4758-9823-751A2D28C388}.Release|x86.ActiveCfg = Release|x86
+		{B62872C1-6752-4758-9823-751A2D28C388}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Core/3.3/ExecutionContext.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Core/3.3/ExecutionContext.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Core/3.3/ExecutionContext.cs	(revision 17254)
@@ -21,6 +21,6 @@
 
 using System;
+using HEAL.Attic;
 using HeuristicLab.Common;
-using HEAL.Attic;
 
 namespace HeuristicLab.Core {
@@ -39,4 +39,6 @@
       get { return parameterizedItem.Parameters; }
     }
+
+    public IParameterizedItem Item => parameterizedItem;
 
     public IOperator Operator {
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Core/3.3/Interfaces/IExecutionContext.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Core/3.3/Interfaces/IExecutionContext.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Core/3.3/Interfaces/IExecutionContext.cs	(revision 17254)
@@ -20,6 +20,6 @@
 #endregion
 
+using HEAL.Attic;
 using HeuristicLab.Common;
-using HEAL.Attic;
 
 namespace HeuristicLab.Core {
@@ -33,4 +33,6 @@
     IScope Scope { get; }
 
+    IParameterizedItem Item { get; }
+
     IAtomicOperation CreateOperation(IOperator op);
     IAtomicOperation CreateOperation(IOperator op, IScope scope);
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Core/3.3/Interfaces/ILookupParameter.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Core/3.3/Interfaces/ILookupParameter.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Core/3.3/Interfaces/ILookupParameter.cs	(revision 17254)
@@ -36,3 +36,13 @@
     new T ActualValue { get; set; }
   }
+
+  [StorableType("285d7903-5c4b-4136-bd69-491dc1766825")]
+  public interface IContextLookupParameter : IParameter {
+    IExecutionContext ExecutionContext { get; set; }
+  }
+
+  [StorableType("26db2a08-7537-4e0e-b93c-4d4478698cd1")]
+  public interface IContextLookupParameter<T> : IContextLookupParameter where T : class, IParameterizedItem {
+    new T ActualValue { get; }
+  }
 }
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Operators/3.3/Operator.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Operators/3.3/Operator.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Operators/3.3/Operator.cs	(revision 17254)
@@ -24,7 +24,7 @@
 using System.Linq;
 using System.Threading;
+using HEAL.Attic;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HEAL.Attic;
 
 namespace HeuristicLab.Operators {
@@ -119,5 +119,7 @@
         ExecutionContext = context;
         this.cancellationToken = cancellationToken;
-        foreach (ILookupParameter param in Parameters.OfType<ILookupParameter>())
+        foreach (var param in Parameters.OfType<ILookupParameter>())
+          param.ExecutionContext = context;
+        foreach (var param in Parameters.OfType<IContextLookupParameter>())
           param.ExecutionContext = context;
         IOperation next = Apply();
@@ -126,5 +128,7 @@
       }
       finally {
-        foreach (ILookupParameter param in Parameters.OfType<ILookupParameter>())
+        foreach (var param in Parameters.OfType<ILookupParameter>())
+          param.ExecutionContext = null;
+        foreach (var param in Parameters.OfType<IContextLookupParameter>())
           param.ExecutionContext = null;
         ExecutionContext = null;
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Parameters/3.3/ContextLookupParameter.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Parameters/3.3/ContextLookupParameter.cs	(revision 17254)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Parameters/3.3/ContextLookupParameter.cs	(revision 17254)
@@ -0,0 +1,88 @@
+﻿using System;
+using System.Threading;
+using HEAL.Attic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Parameters {
+  [Item("ContextLookupParameter", "A parameter that looks up contexts by type.")]
+  [StorableType("4ac189c8-6cf3-48fd-bf79-392d35a872db")]
+  public class ContextLookupParameter<T> : Parameter, IContextLookupParameter<T>, IStatefulItem
+      where T : class, IParameterizedItem {
+
+    public new T ActualValue {
+      get { return (T)base.ActualValue; }
+    }
+
+    private Lazy<ThreadLocal<IItem>> cachedActualValues;
+    protected IItem CachedActualValue {
+      get { return cachedActualValues.Value.Value; }
+      set { cachedActualValues.Value.Value = value; }
+    }
+
+    private Lazy<ThreadLocal<IExecutionContext>> executionContexts;
+    public IExecutionContext ExecutionContext {
+      get { return executionContexts.Value.Value; }
+      set {
+        if (value != executionContexts.Value.Value) {
+          executionContexts.Value.Value = value;
+          cachedActualValues.Value.Value = null;
+        }
+      }
+    }
+
+    [StorableConstructor]
+    protected ContextLookupParameter(StorableConstructorFlag _) : base(_) {
+      cachedActualValues = new Lazy<ThreadLocal<IItem>>(() => { return new ThreadLocal<IItem>(); }, LazyThreadSafetyMode.ExecutionAndPublication);
+      executionContexts = new Lazy<ThreadLocal<IExecutionContext>>(() => { return new ThreadLocal<IExecutionContext>(); }, LazyThreadSafetyMode.ExecutionAndPublication);
+    }
+    protected ContextLookupParameter(ContextLookupParameter<T> original, Cloner cloner)
+      : base(original, cloner) {
+      cachedActualValues = new Lazy<ThreadLocal<IItem>>(() => { return new ThreadLocal<IItem>(); }, LazyThreadSafetyMode.ExecutionAndPublication);
+      executionContexts = new Lazy<ThreadLocal<IExecutionContext>>(() => { return new ThreadLocal<IExecutionContext>(); }, LazyThreadSafetyMode.ExecutionAndPublication);
+    }
+    public ContextLookupParameter() : this("Anonymous") { }
+    public ContextLookupParameter(string name, string description = null)
+      : base(name, description, typeof(T)) {
+      cachedActualValues = new Lazy<ThreadLocal<IItem>>(() => { return new ThreadLocal<IItem>(); }, LazyThreadSafetyMode.ExecutionAndPublication);
+      executionContexts = new Lazy<ThreadLocal<IExecutionContext>>(() => { return new ThreadLocal<IExecutionContext>(); }, LazyThreadSafetyMode.ExecutionAndPublication);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ContextLookupParameter<T>(this, cloner);
+    }
+
+    protected override IItem GetActualValue() {
+      if (CachedActualValue != null) return CachedActualValue;
+
+      IItem item = null;
+      var context = ExecutionContext;
+      while (context != null) {
+        if (context.Item != null && typeof(T).IsAssignableFrom(context.Item.GetType())) {
+          item = context.Item;
+          break;
+        }
+        context = context.Parent;
+      }
+      CachedActualValue = item;
+      return item;
+    }
+
+    protected override void SetActualValue(IItem value) {
+      throw new NotSupportedException("The context lookup parameter may not be used to set an item.");
+    }
+
+    public virtual void InitializeState() {
+    }
+    public virtual void ClearState() {
+      if (cachedActualValues.IsValueCreated) {
+        cachedActualValues.Value.Dispose();
+        cachedActualValues = new Lazy<ThreadLocal<IItem>>(() => { return new ThreadLocal<IItem>(); }, LazyThreadSafetyMode.ExecutionAndPublication);
+      }
+      if (executionContexts.IsValueCreated) {
+        executionContexts.Value.Dispose();
+        executionContexts = new Lazy<ThreadLocal<IExecutionContext>>(() => { return new ThreadLocal<IExecutionContext>(); }, LazyThreadSafetyMode.ExecutionAndPublication);
+      }
+    }
+  }
+}
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Parameters/3.3/HeuristicLab.Parameters-3.3.csproj
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Parameters/3.3/HeuristicLab.Parameters-3.3.csproj	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Parameters/3.3/HeuristicLab.Parameters-3.3.csproj	(revision 17254)
@@ -122,4 +122,5 @@
     <None Include="Plugin.cs.frame" />
     <Compile Include="ConstrainedValueParameter.cs" />
+    <Compile Include="ContextLookupParameter.cs" />
     <Compile Include="FixedValueParameter.cs" />
     <Compile Include="OptionalConstrainedValueParameter.cs" />
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Parameters/3.3/LookupParameter.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Parameters/3.3/LookupParameter.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Parameters/3.3/LookupParameter.cs	(revision 17254)
@@ -22,7 +22,7 @@
 using System;
 using System.Threading;
+using HEAL.Attic;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HEAL.Attic;
 
 namespace HeuristicLab.Parameters {
@@ -136,5 +136,6 @@
       while (currentExecutionContext != null) {
         IParameter param = null;
-        while (currentExecutionContext != null && !currentExecutionContext.Parameters.TryGetValue(translatedName, out param))
+        while (currentExecutionContext != null && (!currentExecutionContext.Parameters.TryGetValue(translatedName, out param)
+          || param is IContextLookupParameter))
           currentExecutionContext = currentExecutionContext.Parent;
         if (currentExecutionContext == null) break;
@@ -143,7 +144,7 @@
         lookupParam = param as ILookupParameter;
 
-        if ((valueParam == null) && (lookupParam == null))
+        if (valueParam == null && lookupParam == null)
           throw new InvalidOperationException(
-            string.Format("Parameter look-up chain broken. Parameter \"{0}\" is not an \"{1}\" or an \"{2}\".",
+            string.Format("Parameter look-up chain broken. Parameter \"{0}\" is neither an \"{1}\" nor an \"{2}\".",
                           translatedName, typeof(IValueParameter).GetPrettyName(), typeof(ILookupParameter).GetPrettyName())
           );
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/HeuristicLab.Problems.Instances.DataAnalysis-3.3.csproj
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/HeuristicLab.Problems.Instances.DataAnalysis-3.3.csproj	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/HeuristicLab.Problems.Instances.DataAnalysis-3.3.csproj	(revision 17254)
@@ -24,5 +24,5 @@
     <WarningLevel>4</WarningLevel>
     <Prefer32Bit>false</Prefer32Bit>
-    <LangVersion>5</LangVersion>
+    <LangVersion>6</LangVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Problems.TravelingSalesman/3.3/TSPData.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Problems.TravelingSalesman/3.3/TSPData.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Problems.TravelingSalesman/3.3/TSPData.cs	(revision 17254)
@@ -198,5 +198,5 @@
 
   [Item("Geo TSP Data", "TSP that is represented by geo coordinates.")]
-  [StorableType("4bf58348-cd98-46c5-a4c0-55f486ca88b4")]
+  [StorableType("dc859a89-e6c2-4af3-a3b6-9aa3041b14a9")]
   public class GeoTSPData : CoordinatesTSPData {
     [StorableConstructor]
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs	(revision 17254)
@@ -29,4 +29,5 @@
 using HeuristicLab.Optimization;
 using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.TravelingSalesman;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
 
@@ -45,18 +46,18 @@
       excludedTypes = new HashSet<Type> {
         typeof (HeuristicLab.Problems.DataAnalysis.Dataset),
-        typeof (HeuristicLab.Problems.TravelingSalesman.DistanceMatrix),
         typeof (HeuristicLab.Problems.DataAnalysis.ClassificationEnsembleSolution),
         typeof (HeuristicLab.Problems.DataAnalysis.RegressionEnsembleSolution),
         typeof (HeuristicLab.Problems.Orienteering.DistanceMatrix)
-        //TODO: include when PTSP builds again,
-        //typeof (HeuristicLab.Problems.PTSP.DistanceMatrix)
       };
       excludedTypes.Add(typeof(SymbolicExpressionGrammar).Assembly.GetType("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.EmptySymbolicExpressionTreeGrammar"));
 
-      foreach (var symbolType in ApplicationManager.Manager.GetTypes(typeof(HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbol)))
+      foreach (var tspData in ApplicationManager.Manager.GetTypes(typeof(ITSPData)))
+        excludedTypes.Add(tspData);
+
+      foreach (var symbolType in ApplicationManager.Manager.GetTypes(typeof(Symbol)))
         excludedTypes.Add(symbolType);
       // SimpleSymbol is a non-discoverable type and thus needs to be added manually
-      excludedTypes.Add(typeof(HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.SimpleSymbol));
-      foreach (var grammarType in ApplicationManager.Manager.GetTypes(typeof(HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.SymbolicExpressionGrammarBase)))
+      excludedTypes.Add(typeof(SimpleSymbol));
+      foreach (var grammarType in ApplicationManager.Manager.GetTypes(typeof(SymbolicExpressionGrammarBase)))
         excludedTypes.Add(grammarType);
     }
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/AlpsSampleTest.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/AlpsSampleTest.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/AlpsSampleTest.cs	(revision 17254)
@@ -88,7 +88,6 @@
       var provider = new TSPLIBTSPInstanceProvider();
       var instance = provider.GetDataDescriptors().Single(x => x.Name == "ch130");
-      TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem();
+      var tspProblem = new TSP();
       tspProblem.Load(provider.LoadData(instance));
-      tspProblem.UseDistanceMatrix.Value = true;
       #endregion
       #region Algorithm Configuration
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GATspSampleTest.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GATspSampleTest.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GATspSampleTest.cs	(revision 17254)
@@ -65,7 +65,6 @@
       var provider = new TSPLIBTSPInstanceProvider();
       var instance = provider.GetDataDescriptors().Where(x => x.Name == "ch130").Single();
-      TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem();
+      var tspProblem = new TSP();
       tspProblem.Load(provider.LoadData(instance));
-      tspProblem.UseDistanceMatrix.Value = true;
       #endregion
       #region Algorithm Configuration
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/IslandGaTspSampleTest.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/IslandGaTspSampleTest.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/IslandGaTspSampleTest.cs	(revision 17254)
@@ -63,7 +63,6 @@
       var provider = new TSPLIBTSPInstanceProvider();
       var instance = provider.GetDataDescriptors().Where(x => x.Name == "ch130").Single();
-      TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem();
+      var tspProblem = new TSP();
       tspProblem.Load(provider.LoadData(instance));
-      tspProblem.UseDistanceMatrix.Value = true;
       #endregion
       #region Algorithm Configuration
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchTspSampleTest.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchTspSampleTest.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/TabuSearchTspSampleTest.cs	(revision 17254)
@@ -61,7 +61,6 @@
       var provider = new TSPLIBTSPInstanceProvider();
       var instance = provider.GetDataDescriptors().Where(x => x.Name == "ch130").Single();
-      TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem();
+      var tspProblem = new TSP();
       tspProblem.Load(provider.LoadData(instance));
-      tspProblem.UseDistanceMatrix.Value = true;
       #endregion
       #region Algorithm Configuration
@@ -77,5 +76,5 @@
       ts.MoveGenerator = moveGenerator;
       var moveEvaluator = ts.MoveEvaluatorParameter.ValidValues
-        .OfType<TSPInversionMoveRoundedEuclideanPathEvaluator>()
+        .OfType<TSPInversionMoveEvaluator>()
         .Single();
       ts.MoveEvaluator = moveEvaluator;
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsTspSampleTest.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsTspSampleTest.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/Samples/VnsTspSampleTest.cs	(revision 17254)
@@ -60,16 +60,13 @@
       VariableNeighborhoodSearch vns = new VariableNeighborhoodSearch();
       #region Problem Configuration
-      TravelingSalesmanProblem tspProblem = new TravelingSalesmanProblem();
-      tspProblem.BestKnownSolution = new Permutation(PermutationTypes.Absolute, new int[] {
-117, 65, 73, 74, 75, 76, 82, 86, 87, 94, 100, 106, 115, 120, 124, 107, 101, 108, 109, 102, 97, 90, 96, 95, 88, 89, 84, 78, 69, 57, 68, 56, 44, 55, 45, 36, 46, 37, 38, 47, 48, 59, 49, 58, 70, 77, 83, 79, 50, 80, 85, 98, 103, 110, 116, 121, 125, 133, 132, 138, 139, 146, 147, 159, 168, 169, 175, 182, 188, 201, 213, 189, 214, 221, 230, 246, 262, 276, 284, 275, 274, 261, 245, 229, 220, 228, 243, 259, 273, 282, 272, 258, 242, 257, 293, 292, 302, 310, 319, 320, 327, 326, 333, 340, 346, 339, 345, 344, 337, 338, 332, 325, 318, 309, 301, 291, 271, 251, 270, 233, 250, 269, 268, 280, 290, 300, 415, 440, 416, 417, 441, 458, 479, 418, 419, 395, 420, 442, 421, 396, 397, 422, 423, 461, 481, 502, 460, 501, 459, 480, 500, 517, 531, 516, 530, 499, 478, 457, 439, 414, 413, 412, 438, 456, 477, 498, 515, 529, 538, 547, 558, 559, 560, 548, 539, 549, 561, 562, 551, 550, 532, 540, 533, 541, 518, 534, 542, 552, 553, 554, 555, 535, 543, 556, 544, 536, 522, 505, 521, 520, 504, 519, 503, 482, 462, 463, 464, 483, 443, 465, 484, 506, 485, 507, 508, 487, 467, 486, 466, 445, 428, 444, 424, 425, 426, 427, 398, 399, 400, 381, 382, 371, 372, 401, 429, 446, 430, 402, 383, 366, 356, 357, 352, 385, 384, 403, 431, 447, 469, 468, 488, 489, 490, 470, 471, 448, 432, 433, 404, 405, 386, 373, 374, 367, 376, 375, 387, 491, 509, 537, 510, 492, 472, 449, 388, 389, 406, 450, 407, 377, 368, 359, 354, 350, 335, 324, 330, 390, 434, 451, 473, 493, 511, 523, 545, 563, 565, 567, 570, 569, 578, 577, 576, 575, 574, 573, 572, 580, 584, 583, 582, 587, 586, 585, 581, 579, 571, 568, 566, 564, 557, 546, 527, 513, 526, 525, 524, 512, 495, 494, 474, 452, 436, 409, 435, 453, 475, 496, 514, 528, 497, 455, 476, 454, 437, 411, 410, 394, 393, 392, 380, 370, 379, 408, 391, 378, 369, 364, 365, 361, 355, 351, 343, 336, 331, 317, 299, 286, 287, 278, 263, 264, 265, 223, 202, 248, 266, 279, 288, 289, 281, 267, 249, 232, 224, 216, 215, 204, 192, 193, 194, 186, 179, 185, 203, 191, 190, 177, 171, 161, 128, 135, 140, 149, 162, 150, 163, 172, 178, 173, 164, 152, 151, 141, 153, 165, 154, 142, 155, 143, 137, 136, 130, 129, 118, 114, 113, 105, 119, 123, 131, 144, 156, 157, 145, 158, 166, 167, 174, 180, 181, 187, 195, 205, 217, 226, 236, 225, 234, 252, 235, 253, 254, 255, 238, 239, 240, 241, 256, 237, 206, 207, 208, 196, 197, 198, 209, 199, 200, 211, 212, 219, 210, 218, 227, 244, 260, 283, 294, 295, 303, 296, 311, 304, 297, 298, 305, 285, 306, 314, 329, 321, 313, 312, 328, 334, 341, 347, 348, 353, 358, 362, 363, 360, 349, 342, 322, 323, 315, 316, 308, 307, 277, 247, 231, 222, 184, 183, 176, 170, 160, 148, 134, 127, 126, 111, 104, 92, 91, 71, 60, 51, 52, 40, 32, 23, 21, 20, 18, 17, 16, 14, 13, 11, 10, 7, 6, 5, 2, 1, 0, 3, 4, 31, 39, 25, 30, 35, 34, 33, 43, 54, 42, 27, 28, 29, 9, 8, 12, 15, 19, 22, 24, 26, 41, 67, 66, 64, 63, 53, 62, 61, 72, 81, 93, 99, 112, 122, 
-      });
-      tspProblem.Coordinates = new DoubleMatrix(new double[,] {
+      var coordinates = new double[,] {
 {48, 71}, {49, 71}, {50, 71}, {44, 70}, {45, 70}, {52, 70}, {53, 70}, {54, 70}, {41, 69}, {42, 69}, {55, 69}, {56, 69}, {40, 68}, {56, 68}, {57, 68}, {39, 67}, {57, 67}, {58, 67}, {59, 67}, {38, 66}, {59, 66}, {60, 66}, {37, 65}, {60, 65}, {36, 64}, {43, 64}, {35, 63}, {37, 63}, {41, 63}, {42, 63}, {43, 63}, {47, 63}, {61, 63}, {40, 62}, {41, 62}, {42, 62}, {43, 62}, {45, 62}, {46, 62}, {47, 62}, {62, 62}, {34, 61}, {38, 61}, {39, 61}, {42, 61}, {43, 61}, {44, 61}, {45, 61}, {46, 61}, {47, 61}, {52, 61}, {62, 61}, {63, 61}, {26, 60}, {38, 60}, {42, 60}, {43, 60}, {44, 60}, {46, 60}, {47, 60}, {63, 60}, {23, 59}, {24, 59}, {27, 59}, {29, 59}, {30, 59}, {31, 59}, {33, 59}, {42, 59}, {46, 59}, {47, 59}, {63, 59}, {21, 58}, {32, 58}, {33, 58}, {34, 58}, {35, 58}, {46, 58}, {47, 58}, {48, 58}, {53, 58}, {21, 57}, {35, 57}, {47, 57}, {48, 57}, {53, 57}, {36, 56}, {37, 56}, {46, 56}, {47, 56}, {48, 56}, {64, 56}, {65, 56}, {20, 55}, {38, 55}, {46, 55}, {47, 55}, {48, 55}, {52, 55}, {21, 54}, {40, 54}, {47, 54}, {48, 54}, {52, 54}, {65, 54}, {30, 53}, {41, 53}, {46, 53}, {47, 53}, {48, 53}, {52, 53}, {65, 53}, {21, 52}, {32, 52}, {33, 52}, {42, 52}, {51, 52}, {21, 51}, {33, 51}, {34, 51}, {43, 51}, {51, 51}, {21, 50}, {35, 50}, {44, 50}, {50, 50}, {66, 50}, {67, 50}, {21, 49}, {34, 49}, {36, 49}, {37, 49}, {46, 49}, {49, 49}, {67, 49}, {22, 48}, {36, 48}, {37, 48}, {46, 48}, {47, 48}, {22, 47}, {30, 47}, {34, 47}, {37, 47}, {38, 47}, {39, 47}, {47, 47}, {48, 47}, {67, 47}, {23, 46}, {28, 46}, {29, 46}, {30, 46}, {31, 46}, {32, 46}, {35, 46}, {37, 46}, {38, 46}, {39, 46}, {49, 46}, {67, 46}, {23, 45}, {28, 45}, {29, 45}, {31, 45}, {32, 45}, {40, 45}, {41, 45}, {49, 45}, {50, 45}, {68, 45}, {24, 44}, {29, 44}, {32, 44}, {41, 44}, {51, 44}, {68, 44}, {25, 43}, {30, 43}, {32, 43}, {42, 43}, {43, 43}, {51, 43}, {68, 43}, {69, 43}, {31, 42}, {32, 42}, {43, 42}, {52, 42}, {55, 42}, {26, 41}, {27, 41}, {31, 41}, {32, 41}, {33, 41}, {44, 41}, {45, 41}, {46, 41}, {47, 41}, {48, 41}, {49, 41}, {53, 41}, {25, 40}, {27, 40}, {32, 40}, {43, 40}, {44, 40}, {45, 40}, {46, 40}, {48, 40}, {49, 40}, {50, 40}, {51, 40}, {53, 40}, {56, 40}, {32, 39}, {33, 39}, {43, 39}, {50, 39}, {51, 39}, {54, 39}, {56, 39}, {69, 39}, {24, 38}, {32, 38}, {41, 38}, {42, 38}, {51, 38}, {52, 38}, {54, 38}, {57, 38}, {69, 38}, {31, 37}, {32, 37}, {40, 37}, {41, 37}, {42, 37}, {43, 37}, {44, 37}, {45, 37}, {46, 37}, {47, 37}, {48, 37}, {51, 37}, {52, 37}, {55, 37}, {57, 37}, {69, 37}, {24, 36}, {31, 36}, {32, 36}, {39, 36}, {40, 36}, {41, 36}, {42, 36}, {43, 36}, {45, 36}, {48, 36}, {49, 36}, {51, 36}, {53, 36}, {55, 36}, {58, 36}, {22, 35}, {23, 35}, {24, 35}, {25, 35}, {30, 35}, {31, 35}, {32, 35}, {39, 35}, {41, 35}, {49, 35}, {51, 35}, {55, 35}, {56, 35}, {58, 35}, {71, 35}, {20, 34}, {27, 34}, {30, 34}, {31, 34}, {51, 34}, {53, 34}, {57, 34}, {60, 34}, {18, 33}, {19, 33}, {29, 33}, {30, 33}, {31, 33}, {45, 33}, {46, 33}, {47, 33}, {52, 33}, {53, 33}, {55, 33}, {57, 33}, {58, 33}, {17, 32}, {30, 32}, {44, 32}, {47, 32}, {54, 32}, {57, 32}, {59, 32}, {61, 32}, {71, 32}, {72, 32}, {43, 31}, {47, 31}, {56, 31}, {58, 31}, {59, 31}, {61, 31}, {72, 31}, {74, 31}, {16, 30}, {43, 30}, {46, 30}, {47, 30}, {59, 30}, {63, 30}, {71, 30}, {75, 30}, {43, 29}, {46, 29}, {47, 29}, {59, 29}, {60, 29}, {75, 29}, {15, 28}, {43, 28}, {46, 28}, {61, 28}, {76, 28}, {15, 27}, {43, 27}, {44, 27}, {45, 27}, {46, 27}, {60, 27}, {62, 27}, {15, 26}, {43, 26}, {44, 26}, {46, 26}, {59, 26}, {60, 26}, {64, 26}, {77, 26}, {15, 25}, {58, 25}, {61, 25}, {77, 25}, {15, 24}, {53, 24}, {55, 24}, {61, 24}, {77, 24}, {62, 23}, {16, 22}, {61, 22}, {62, 22}, {15, 21}, {16, 21}, {52, 21}, {63, 21}, {77, 21}, {16, 20}, {17, 20}, {46, 20}, {47, 20}, {60, 20}, {62, 20}, {63, 20}, {65, 20}, {76, 20}, {15, 19}, {17, 19}, {18, 19}, {44, 19}, {45, 19}, {48, 19}, {53, 19}, {56, 19}, {60, 19}, {62, 19}, {67, 19}, {68, 19}, {76, 19}, {15, 18}, {18, 18}, {19, 18}, {20, 18}, {32, 18}, {33, 18}, {34, 18}, {41, 18}, {42, 18}, {43, 18}, {46, 18}, {48, 18}, {53, 18}, {59, 18}, {60, 18}, {69, 18}, {75, 18}, {16, 17}, {17, 17}, {20, 17}, {21, 17}, {22, 17}, {23, 17}, {24, 17}, {26, 17}, {28, 17}, {29, 17}, {30, 17}, {31, 17}, {32, 17}, {34, 17}, {35, 17}, {36, 17}, {37, 17}, {38, 17}, {39, 17}, {40, 17}, {44, 17}, {46, 17}, {48, 17}, {53, 17}, {56, 17}, {58, 17}, {75, 17}, {17, 16}, {18, 16}, {20, 16}, {24, 16}, {26, 16}, {27, 16}, {29, 16}, {33, 16}, {41, 16}, {42, 16}, {44, 16}, {47, 16}, {52, 16}, {57, 16}, {70, 16}, {73, 16}, {74, 16}, {17, 15}, {18, 15}, {20, 15}, {22, 15}, {24, 15}, {27, 15}, {29, 15}, {31, 15}, {33, 15}, {35, 15}, {36, 15}, {38, 15}, {39, 15}, {42, 15}, {45, 15}, {47, 15}, {52, 15}, {53, 15}, {55, 15}, {56, 15}, {70, 15}, {73, 15}, {17, 14}, {19, 14}, {21, 14}, {24, 14}, {26, 14}, {29, 14}, {31, 14}, {34, 14}, {37, 14}, {40, 14}, {42, 14}, {44, 14}, {46, 14}, {47, 14}, {53, 14}, {54, 14}, {55, 14}, {62, 14}, {70, 14}, {72, 14}, {17, 13}, {19, 13}, {21, 13}, {23, 13}, {25, 13}, {27, 13}, {30, 13}, {32, 13}, {34, 13}, {36, 13}, {38, 13}, {41, 13}, {43, 13}, {44, 13}, {45, 13}, {60, 13}, {70, 13}, {71, 13}, {18, 12}, {21, 12}, {23, 12}, {26, 12}, {28, 12}, {31, 12}, {34, 12}, {37, 12}, {39, 12}, {41, 12}, {42, 12}, {70, 12}, {18, 11}, {19, 11}, {20, 11}, {21, 11}, {24, 11}, {25, 11}, {27, 11}, {29, 11}, {31, 11}, {33, 11}, {35, 11}, {38, 11}, {41, 11}, {59, 11}, {26, 10}, {29, 10}, {32, 10}, {34, 10}, {36, 10}, {39, 10}, {40, 10}, {69, 10}, {21, 9}, {26, 9}, {28, 9}, {30, 9}, {32, 9}, {33, 9}, {35, 9}, {36, 9}, {37, 9}, {38, 9}, {39, 9}, {22, 8}, {27, 8}, {28, 8}, {29, 8}, {30, 8}, {31, 8}, {68, 8}, {23, 7}, {66, 7}, {24, 6}, {65, 6}, {25, 5}, {62, 5}, {63, 5}, {26, 4}, {55, 4}, {56, 4}, {57, 4}, {58, 4}, {59, 4}, {60, 4}, {61, 4}, {28, 3}, {53, 3}, {29, 2}, {50, 2}, {51, 2}, {52, 2}, {31, 1}, {32, 1}, {48, 1}
-      });
-      tspProblem.BestKnownQuality = new DoubleValue(867);
-
-      tspProblem.EvaluatorParameter.Value = new TSPRoundedEuclideanPathEvaluator();
-      tspProblem.SolutionCreatorParameter.Value = new RandomPermutationCreator();
-      tspProblem.UseDistanceMatrix.Value = true;
+      };
+      var tspProblem = new TSP();
+      tspProblem.BestKnownSolution = new TSPSolution(new DoubleMatrix(coordinates), new Permutation(PermutationTypes.RelativeUndirected, new int[] {
+117, 65, 73, 74, 75, 76, 82, 86, 87, 94, 100, 106, 115, 120, 124, 107, 101, 108, 109, 102, 97, 90, 96, 95, 88, 89, 84, 78, 69, 57, 68, 56, 44, 55, 45, 36, 46, 37, 38, 47, 48, 59, 49, 58, 70, 77, 83, 79, 50, 80, 85, 98, 103, 110, 116, 121, 125, 133, 132, 138, 139, 146, 147, 159, 168, 169, 175, 182, 188, 201, 213, 189, 214, 221, 230, 246, 262, 276, 284, 275, 274, 261, 245, 229, 220, 228, 243, 259, 273, 282, 272, 258, 242, 257, 293, 292, 302, 310, 319, 320, 327, 326, 333, 340, 346, 339, 345, 344, 337, 338, 332, 325, 318, 309, 301, 291, 271, 251, 270, 233, 250, 269, 268, 280, 290, 300, 415, 440, 416, 417, 441, 458, 479, 418, 419, 395, 420, 442, 421, 396, 397, 422, 423, 461, 481, 502, 460, 501, 459, 480, 500, 517, 531, 516, 530, 499, 478, 457, 439, 414, 413, 412, 438, 456, 477, 498, 515, 529, 538, 547, 558, 559, 560, 548, 539, 549, 561, 562, 551, 550, 532, 540, 533, 541, 518, 534, 542, 552, 553, 554, 555, 535, 543, 556, 544, 536, 522, 505, 521, 520, 504, 519, 503, 482, 462, 463, 464, 483, 443, 465, 484, 506, 485, 507, 508, 487, 467, 486, 466, 445, 428, 444, 424, 425, 426, 427, 398, 399, 400, 381, 382, 371, 372, 401, 429, 446, 430, 402, 383, 366, 356, 357, 352, 385, 384, 403, 431, 447, 469, 468, 488, 489, 490, 470, 471, 448, 432, 433, 404, 405, 386, 373, 374, 367, 376, 375, 387, 491, 509, 537, 510, 492, 472, 449, 388, 389, 406, 450, 407, 377, 368, 359, 354, 350, 335, 324, 330, 390, 434, 451, 473, 493, 511, 523, 545, 563, 565, 567, 570, 569, 578, 577, 576, 575, 574, 573, 572, 580, 584, 583, 582, 587, 586, 585, 581, 579, 571, 568, 566, 564, 557, 546, 527, 513, 526, 525, 524, 512, 495, 494, 474, 452, 436, 409, 435, 453, 475, 496, 514, 528, 497, 455, 476, 454, 437, 411, 410, 394, 393, 392, 380, 370, 379, 408, 391, 378, 369, 364, 365, 361, 355, 351, 343, 336, 331, 317, 299, 286, 287, 278, 263, 264, 265, 223, 202, 248, 266, 279, 288, 289, 281, 267, 249, 232, 224, 216, 215, 204, 192, 193, 194, 186, 179, 185, 203, 191, 190, 177, 171, 161, 128, 135, 140, 149, 162, 150, 163, 172, 178, 173, 164, 152, 151, 141, 153, 165, 154, 142, 155, 143, 137, 136, 130, 129, 118, 114, 113, 105, 119, 123, 131, 144, 156, 157, 145, 158, 166, 167, 174, 180, 181, 187, 195, 205, 217, 226, 236, 225, 234, 252, 235, 253, 254, 255, 238, 239, 240, 241, 256, 237, 206, 207, 208, 196, 197, 198, 209, 199, 200, 211, 212, 219, 210, 218, 227, 244, 260, 283, 294, 295, 303, 296, 311, 304, 297, 298, 305, 285, 306, 314, 329, 321, 313, 312, 328, 334, 341, 347, 348, 353, 358, 362, 363, 360, 349, 342, 322, 323, 315, 316, 308, 307, 277, 247, 231, 222, 184, 183, 176, 170, 160, 148, 134, 127, 126, 111, 104, 92, 91, 71, 60, 51, 52, 40, 32, 23, 21, 20, 18, 17, 16, 14, 13, 11, 10, 7, 6, 5, 2, 1, 0, 3, 4, 31, 39, 25, 30, 35, 34, 33, 43, 54, 42, 27, 28, 29, 9, 8, 12, 15, 19, 22, 24, 26, 41, 67, 66, 64, 63, 53, 62, 61, 72, 81, 93, 99, 112, 122,
+      }), new DoubleValue(867));
+      tspProblem.BestKnownQuality = 867;
+      tspProblem.TSPData = new EuclideanTSPData("Funny TSP", coordinates, EuclideanTSPData.DistanceRounding.Midpoint);
       tspProblem.Name = "Funny TSP";
       tspProblem.Description = "Represents a symmetric Traveling Salesman Problem.";
@@ -88,5 +85,5 @@
         .Single();
       localImprovement.MoveEvaluator = localImprovement.MoveEvaluatorParameter.ValidValues
-        .OfType<TSPInversionMoveRoundedEuclideanPathEvaluator>()
+        .OfType<TSPInversionMoveEvaluator>()
         .Single();
       localImprovement.MoveMaker = localImprovement.MoveMakerParameter.ValidValues
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Problems.TravelingSalesman-3.3/TSPMoveEvaluatorTest.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Problems.TravelingSalesman-3.3/TSPMoveEvaluatorTest.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Problems.TravelingSalesman-3.3/TSPMoveEvaluatorTest.cs	(revision 17254)
@@ -20,8 +20,7 @@
 #endregion
 
-using System;
 using HeuristicLab.Common;
-using HeuristicLab.Data;
 using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Problems.Instances;
 using HeuristicLab.Random;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -34,6 +33,6 @@
   public class TSPMoveEvaluatorTest {
     private const int ProblemSize = 10;
-    private static DoubleMatrix coordinates;
-    private static DistanceMatrix distances;
+    private static double[,] coordinates;
+    private static double[,] distances;
     private static Permutation tour;
     private static MersenneTwister random;
@@ -42,16 +41,15 @@
     public static void MyClassInitialize(TestContext testContext) {
       random = new MersenneTwister();
-      coordinates = new DoubleMatrix(ProblemSize, 2);
-      distances = new DistanceMatrix(ProblemSize, ProblemSize);
+      coordinates = new double[ProblemSize, 2];
       for (int i = 0; i < ProblemSize; i++) {
         coordinates[i, 0] = random.Next(ProblemSize * 10);
         coordinates[i, 1] = random.Next(ProblemSize * 10);
       }
-      for (int i = 0; i < ProblemSize - 1; i++) {
+      distances = new double[ProblemSize, ProblemSize];
+      for (int i = 0; i < ProblemSize-1; i++)
         for (int j = i + 1; j < ProblemSize; j++) {
-          distances[i, j] = Math.Round(Math.Sqrt(Math.Pow(coordinates[i, 0] - coordinates[j, 0], 2) + Math.Pow(coordinates[i, 1] - coordinates[j, 1], 2)));
+          distances[i, j] = DistanceHelper.EuclideanDistance(coordinates[i, 0], coordinates[i, 1], coordinates[j, 0], coordinates[j, 1]);
           distances[j, i] = distances[i, j];
         }
-      }
       tour = new Permutation(PermutationTypes.RelativeUndirected, ProblemSize, random);
     }
@@ -61,8 +59,8 @@
     [TestProperty("Time", "short")]
     public void InversionMoveEvaluatorTest() {
-      var evaluator = new TSPRoundedEuclideanPathEvaluator();
-      var moveEvaluator = new TSPInversionMoveRoundedEuclideanPathEvaluator();
-      double beforeMatrix = TSPDistanceMatrixEvaluator.Apply(distances, tour);
-      double beforeCoordinates = TSPCoordinatesPathEvaluator.Apply(evaluator, coordinates, tour);
+      var euclidTSP = new TSP() { TSPData = new EuclideanTSPData("test", coordinates) };
+      var matrixTSP = new TSP() { TSPData = new MatrixTSPData("test", distances) };
+      double beforeMatrix = matrixTSP.Evaluate(tour);
+      double beforeCoordinates = euclidTSP.Evaluate(tour);
       Assert.IsTrue(beforeMatrix.IsAlmost(beforeCoordinates), "Evaluation differs between using the coordinates and using the distance matrix.");
 
@@ -70,6 +68,6 @@
         var move = StochasticInversionSingleMoveGenerator.Apply(tour, random);
 
-        double moveMatrix = TSPInversionMovePathEvaluator.EvaluateByDistanceMatrix(tour, move, distances);
-        double moveCoordinates = TSPInversionMovePathEvaluator.EvaluateByCoordinates(tour, move, coordinates, moveEvaluator);
+        double moveMatrix = TSPInversionMoveEvaluator.CalculateTourLengthDelta(matrixTSP.TSPData, tour, move);
+        double moveCoordinates = TSPInversionMoveEvaluator.CalculateTourLengthDelta(euclidTSP.TSPData, tour, move);
         Assert.IsTrue(moveMatrix.IsAlmost(moveCoordinates), "Evaluation differs between using the coordinates and using the distance matrix.");
 
@@ -79,6 +77,6 @@
         InversionManipulator.Apply(tour, move.Index1, move.Index2);
 
-        double afterMatrix = TSPDistanceMatrixEvaluator.Apply(distances, tour);
-        double afterCoordinates = TSPCoordinatesPathEvaluator.Apply(evaluator, coordinates, tour);
+        double afterMatrix = matrixTSP.Evaluate(tour);
+        double afterCoordinates = euclidTSP.Evaluate(tour);
         Assert.IsTrue(afterMatrix.IsAlmost(afterCoordinates), "Evaluation differs between using the coordinates and using the distance matrix.");
 
@@ -94,8 +92,9 @@
     [TestProperty("Time", "short")]
     public void TranslocationMoveEvaluatorTest() {
-      var evaluator = new TSPRoundedEuclideanPathEvaluator();
-      var moveEvaluator = new TSPTranslocationMoveRoundedEuclideanPathEvaluator();
-      double beforeMatrix = TSPDistanceMatrixEvaluator.Apply(distances, tour);
-      double beforeCoordinates = TSPCoordinatesPathEvaluator.Apply(evaluator, coordinates, tour);
+
+      var euclidTSP = new TSP() { TSPData = new EuclideanTSPData("test", coordinates) };
+      var matrixTSP = new TSP() { TSPData = new MatrixTSPData("test", distances) };
+      double beforeMatrix = matrixTSP.Evaluate(tour);
+      double beforeCoordinates = euclidTSP.Evaluate(tour);
       Assert.IsTrue(beforeMatrix.IsAlmost(beforeCoordinates), "Evaluation differs between using the coordinates and using the distance matrix.");
 
@@ -103,6 +102,6 @@
         var move = StochasticTranslocationSingleMoveGenerator.Apply(tour, random);
 
-        double moveMatrix = TSPTranslocationMovePathEvaluator.EvaluateByDistanceMatrix(tour, move, distances);
-        double moveCoordinates = TSPTranslocationMovePathEvaluator.EvaluateByCoordinates(tour, move, coordinates, moveEvaluator);
+        double moveMatrix = TSPTranslocationMoveEvaluator.CalculateTourLengthDelta(matrixTSP.TSPData, tour, move);
+        double moveCoordinates = TSPTranslocationMoveEvaluator.CalculateTourLengthDelta(euclidTSP.TSPData, tour, move);
         Assert.IsTrue(moveMatrix.IsAlmost(moveCoordinates), "Evaluation differs between using the coordinates and using the distance matrix.");
 
@@ -111,6 +110,6 @@
         TranslocationManipulator.Apply(tour, move.Index1, move.Index2, move.Index3);
 
-        double afterMatrix = TSPDistanceMatrixEvaluator.Apply(distances, tour);
-        double afterCoordinates = TSPCoordinatesPathEvaluator.Apply(evaluator, coordinates, tour);
+        double afterMatrix = matrixTSP.Evaluate(tour);
+        double afterCoordinates = euclidTSP.Evaluate(tour);
         Assert.IsTrue(afterMatrix.IsAlmost(afterCoordinates), "Evaluation differs between using the coordinates and using the distance matrix.");
 
Index: /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GUIAutomationScriptSource.cs
===================================================================
--- /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GUIAutomationScriptSource.cs	(revision 17253)
+++ /branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GUIAutomationScriptSource.cs	(revision 17254)
@@ -14,5 +14,5 @@
       MaximumGenerations = { Value = 50 },
       PopulationSize = { Value = 10 },
-      Problem = new TravelingSalesmanProblem()
+      Problem = new TSP()
     };
 
