Index: /trunk/sources/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBCVRPInstanceProvider.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBCVRPInstanceProvider.cs	(revision 7871)
+++ /trunk/sources/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBCVRPInstanceProvider.cs	(revision 7872)
@@ -46,20 +46,20 @@
       switch (parser.EdgeWeightType) {
         case TSPLIBEdgeWeightTypes.ATT:
-          instance.DistanceMeasure = CVRPDistanceMeasure.Att; break;
+          instance.DistanceMeasure = DistanceMeasure.Att; break;
         case TSPLIBEdgeWeightTypes.CEIL_2D:
-          instance.DistanceMeasure = CVRPDistanceMeasure.UpperEuclidean; break;
+          instance.DistanceMeasure = DistanceMeasure.UpperEuclidean; break;
         case TSPLIBEdgeWeightTypes.EUC_2D:
         case TSPLIBEdgeWeightTypes.EUC_3D:
-          instance.DistanceMeasure = CVRPDistanceMeasure.RoundedEuclidean; break;
+          instance.DistanceMeasure = DistanceMeasure.RoundedEuclidean; break;
         case TSPLIBEdgeWeightTypes.EXPLICIT:
-          instance.DistanceMeasure = CVRPDistanceMeasure.Direct; break;
+          instance.DistanceMeasure = DistanceMeasure.Direct; break;
         case TSPLIBEdgeWeightTypes.GEO:
-          instance.DistanceMeasure = CVRPDistanceMeasure.Geo; break;
+          instance.DistanceMeasure = DistanceMeasure.Geo; break;
         case TSPLIBEdgeWeightTypes.MAN_2D:
         case TSPLIBEdgeWeightTypes.MAN_3D:
-          instance.DistanceMeasure = CVRPDistanceMeasure.Manhattan; break;
+          instance.DistanceMeasure = DistanceMeasure.Manhattan; break;
         case TSPLIBEdgeWeightTypes.MAX_2D:
         case TSPLIBEdgeWeightTypes.MAX_3D:
-          instance.DistanceMeasure = CVRPDistanceMeasure.Maximum; break;
+          instance.DistanceMeasure = DistanceMeasure.Maximum; break;
         default:
           throw new InvalidDataException("The given edge weight is not supported by HeuristicLab.");
Index: /trunk/sources/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBTSPInstanceProvider.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBTSPInstanceProvider.cs	(revision 7871)
+++ /trunk/sources/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBTSPInstanceProvider.cs	(revision 7872)
@@ -46,21 +46,21 @@
       switch (parser.EdgeWeightType) {
         case TSPLIBEdgeWeightTypes.ATT:
-          instance.DistanceMeasure = TSPDistanceMeasure.Att; break;
+          instance.DistanceMeasure = DistanceMeasure.Att; break;
         case TSPLIBEdgeWeightTypes.CEIL_2D:
-          instance.DistanceMeasure = TSPDistanceMeasure.UpperEuclidean; break;
+          instance.DistanceMeasure = DistanceMeasure.UpperEuclidean; break;
         case TSPLIBEdgeWeightTypes.EUC_2D:
-          instance.DistanceMeasure = TSPDistanceMeasure.RoundedEuclidean; break;
+          instance.DistanceMeasure = DistanceMeasure.RoundedEuclidean; break;
         case TSPLIBEdgeWeightTypes.EUC_3D:
           throw new InvalidDataException("3D coordinates are not supported.");
         case TSPLIBEdgeWeightTypes.EXPLICIT:
-          instance.DistanceMeasure = TSPDistanceMeasure.Direct; break;
+          instance.DistanceMeasure = DistanceMeasure.Direct; break;
         case TSPLIBEdgeWeightTypes.GEO:
-          instance.DistanceMeasure = TSPDistanceMeasure.Geo; break;
+          instance.DistanceMeasure = DistanceMeasure.Geo; break;
         case TSPLIBEdgeWeightTypes.MAN_2D:
-          instance.DistanceMeasure = TSPDistanceMeasure.Manhattan; break;
+          instance.DistanceMeasure = DistanceMeasure.Manhattan; break;
         case TSPLIBEdgeWeightTypes.MAN_3D:
           throw new InvalidDataException("3D coordinates are not supported.");
         case TSPLIBEdgeWeightTypes.MAX_2D:
-          instance.DistanceMeasure = TSPDistanceMeasure.Maximum; break;
+          instance.DistanceMeasure = DistanceMeasure.Maximum; break;
         case TSPLIBEdgeWeightTypes.MAX_3D:
           throw new InvalidDataException("3D coordinates are not supported.");
Index: /trunk/sources/HeuristicLab.Problems.Instances/3.3/HeuristicLab.Problems.Instances-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Instances/3.3/HeuristicLab.Problems.Instances-3.3.csproj	(revision 7871)
+++ /trunk/sources/HeuristicLab.Problems.Instances/3.3/HeuristicLab.Problems.Instances-3.3.csproj	(revision 7872)
@@ -117,6 +117,8 @@
     <Compile Include="Types\CTAPData.cs" />
     <Compile Include="IDataDescriptor.cs" />
-    <Compile Include="Types\CVRPData.cs" />
+    <Compile Include="Types\DistanceHelper.cs" />
+    <Compile Include="Types\VRP\CVRPData.cs" />
     <Compile Include="Types\GQAPData.cs" />
+    <Compile Include="Types\VRP\IVRPData.cs" />
     <Compile Include="Types\QAPData.cs" />
     <Compile Include="Types\TSPData.cs" />
Index: unk/sources/HeuristicLab.Problems.Instances/3.3/Types/CVRPData.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/CVRPData.cs	(revision 7871)
+++ 	(revision )
@@ -1,93 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 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
-
-
-namespace HeuristicLab.Problems.Instances {
-  public enum CVRPDistanceMeasure { Direct, Euclidean, RoundedEuclidean, UpperEuclidean, Geo, Manhattan, Maximum, Att };
-
-  /// <summary>
-  /// Describes instances of the Capacitated Vehicle Routing Problem (CVRP).
-  /// </summary>
-  public class CVRPData {
-    /// <summary>
-    /// The name of the instance
-    /// </summary>
-    public string Name { get; set; }
-    /// <summary>
-    /// Optional! The description of the instance
-    /// </summary>
-    public string Description { get; set; }
-
-    /// <summary>
-    /// The number of customers and the depot
-    /// </summary>
-    public int Dimension { get; set; }
-    /// <summary>
-    /// The distance measure that is used to calculate the distance between
-    ///the coordinates if no <see cref="Distances"/> is given.
-    /// </summary>
-    public CVRPDistanceMeasure DistanceMeasure { get; set; }
-    /// <summary>
-    /// Optional! The maximum number of vehicles that can be used.
-    /// </summary>
-    /// <remarks>
-    /// If no number is given, but a maximum is required, it can be assumed that
-    /// the maximum number of vehicles is equal to the number of customers as
-    /// there cannot be more than one vehicle per customer.
-    /// </remarks>
-    public double? MaximumVehicles { get; set; }
-    /// <summary>
-    /// The capacity of the vehicles, which is the same for all (homogeneous fleet).
-    /// </summary>
-    public double Capacity { get; set; }
-    /// <summary>
-    /// Optional! The distances are given in form of a distance matrix.
-    /// </summary>
-    /// <remarks>
-    /// Either Distances or the <see cref="Coordinates"/> need to be specified along
-    /// with a distance measure.
-    /// </remarks>
-    public double[,] Distances { get; set; }
-    /// <summary>
-    /// Optional! A a matrix of dimension [N, 2] where each row is either the customer
-    /// or the depot and the columns represent x and y coordinates respectively.
-    /// </summary>
-    /// <remarks>
-    /// Either <see cref="Distances"/> or the Coordinates need to be specified along
-    /// with a distance measure.
-    /// </remarks>
-    public double[,] Coordinates { get; set; }
-    /// <summary>
-    /// The demand vector that specifies how many goods need to be delivered.
-    /// The vector has to include the depot, but with a demand of 0.
-    /// </summary>
-    public double[] Demands { get; set; }
-
-    /// <summary>
-    /// Optional! The best-known solution as a list of tours in path-encoding.
-    /// </summary>
-    public int[][] BestKnownTour { get; set; }
-    /// <summary>
-    /// Optional! The quality of the best-known solution.
-    /// </summary>
-    public double? BestKnownQuality { get; set; }
-  }
-}
Index: /trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/DistanceHelper.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/DistanceHelper.cs	(revision 7872)
+++ /trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/DistanceHelper.cs	(revision 7872)
@@ -0,0 +1,113 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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;
+
+namespace HeuristicLab.Problems.Instances {
+  public enum DistanceMeasure { Direct, Euclidean, RoundedEuclidean, UpperEuclidean, Geo, Manhattan, Maximum, Att };
+  
+  public static class DistanceHelper {
+    /// <summary>
+    /// If only the coordinates are given, can calculate the distance matrix.
+    /// </summary>
+    /// <returns>A full distance matrix between all cities.</returns>
+    public static double[,] GetDistanceMatrix(DistanceMeasure distanceMeasure, double[,] coordinates, double[,] distances, int dimension) {
+      if (distances != null) return distances;
+      
+      distances = new double[dimension, dimension];
+      for (int i = 0; i < dimension - 1; i++)
+        for (int j = i + 1; j < dimension; j++) {
+          distances[i, j] = GetDistance(i, j, distanceMeasure, coordinates, distances);
+          distances[j, i] = distances[i, j];
+        }
+
+      return distances;
+    }
+
+    #region Private Helpers
+    private static double GetDistance(int i, int j, DistanceMeasure distanceMeasure, double[,] coordinates, double[,] distances) {
+      switch (distanceMeasure) {
+        case DistanceMeasure.Att:
+          return AttDistance(coordinates[i, 0], coordinates[i, 1], coordinates[j, 0], coordinates[j, 1]);
+        case DistanceMeasure.Direct:
+          return distances[i, j];
+        case DistanceMeasure.Euclidean:
+          return EuclideanDistance(coordinates[i, 0], coordinates[i, 1], coordinates[j, 0], coordinates[j, 1]);
+        case DistanceMeasure.Geo:
+          return GeoDistance(coordinates[i, 0], coordinates[i, 1], coordinates[j, 0], coordinates[j, 1]);
+        case DistanceMeasure.Manhattan:
+          return ManhattanDistance(coordinates[i, 0], coordinates[i, 1], coordinates[j, 0], coordinates[j, 1]);
+        case DistanceMeasure.Maximum:
+          return MaximumDistance(coordinates[i, 0], coordinates[i, 1], coordinates[j, 0], coordinates[j, 1]);
+        case DistanceMeasure.RoundedEuclidean:
+          return Math.Round(EuclideanDistance(coordinates[i, 0], coordinates[i, 1], coordinates[j, 0], coordinates[j, 1]));
+        case DistanceMeasure.UpperEuclidean:
+          return Math.Ceiling(EuclideanDistance(coordinates[i, 0], coordinates[i, 1], coordinates[j, 0], coordinates[j, 1]));
+        default:
+          throw new InvalidOperationException("Distance measure is not known.");
+      }
+    }
+
+    private static double AttDistance(double x1, double y1, double x2, double y2) {
+      return Math.Ceiling(Math.Sqrt(((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) / 10.0));
+    }
+
+    private static double EuclideanDistance(double x1, double y1, double x2, double y2) {
+      return Math.Sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
+    }
+
+    private const double PI = 3.141592;
+    private const double RADIUS = 6378.388;
+    private static double GeoDistance(double x1, double y1, double x2, double y2) {
+      double latitude1, longitude1, latitude2, longitude2;
+      double q1, q2, q3;
+      double length;
+
+      latitude1 = ConvertToRadian(x1);
+      longitude1 = ConvertToRadian(y1);
+      latitude2 = ConvertToRadian(x2);
+      longitude2 = ConvertToRadian(y2);
+
+      q1 = Math.Cos(longitude1 - longitude2);
+      q2 = Math.Cos(latitude1 - latitude2);
+      q3 = Math.Cos(latitude1 + latitude2);
+
+      length = (int)(RADIUS * Math.Acos(0.5 * ((1.0 + q1) * q2 - (1.0 - q1) * q3)) + 1.0);
+      return (length);
+    }
+
+    private static double ConvertToRadian(double x) {
+      return PI * (Math.Truncate(x) + 5.0 * (x - Math.Truncate(x)) / 3.0) / 180.0;
+    }
+
+    private static double ManhattanDistance(double x1, double y1, double x2, double y2) {
+      return Math.Round(Math.Abs(x1 - x2) + Math.Abs(y1 - y2), MidpointRounding.AwayFromZero);
+    }
+
+    private static double MaximumDistance(double x1, double y1, double x2, double y2) {
+      return Math.Max(Math.Round(Math.Abs(x1 - x2), MidpointRounding.AwayFromZero), Math.Round(Math.Abs(y1 - y2), MidpointRounding.AwayFromZero));
+    }
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/TSPData.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/TSPData.cs	(revision 7871)
+++ /trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/TSPData.cs	(revision 7872)
@@ -23,6 +23,4 @@
 
 namespace HeuristicLab.Problems.Instances {
-  public enum TSPDistanceMeasure { Direct, Euclidean, RoundedEuclidean, UpperEuclidean, Geo, Manhattan, Maximum, Att };
-
   /// <summary>
   /// Describes instances of the Traveling Salesman Problem (TSP).
@@ -45,5 +43,5 @@
     /// Specifies the distance measure that is to be used.
     /// </summary>
-    public TSPDistanceMeasure DistanceMeasure { get; set; }
+    public DistanceMeasure DistanceMeasure { get; set; }
     /// <summary>
     /// Optional! The distances are given in form of a distance matrix.
@@ -81,78 +79,6 @@
     /// <returns>A full distance matrix between all cities.</returns>
     public double[,] GetDistanceMatrix() {
-      if (Distances != null) return Distances;
-      Distances = new double[Dimension, Dimension];
-      for (int i = 0; i < Dimension - 1; i++)
-        for (int j = i + 1; j < Dimension; j++) {
-          Distances[i, j] = GetDistance(i, j);
-          Distances[j, i] = Distances[i, j];
-        }
-      return Distances;
+      return DistanceHelper.GetDistanceMatrix(DistanceMeasure, Coordinates, Distances, Dimension);
     }
-
-    #region Private Helpers
-    private double GetDistance(int i, int j) {
-      switch (DistanceMeasure) {
-        case TSPDistanceMeasure.Att:
-          return AttDistance(Coordinates[i, 0], Coordinates[i, 1], Coordinates[j, 0], Coordinates[j, 1]);
-        case TSPDistanceMeasure.Direct:
-          return Distances[i, j];
-        case TSPDistanceMeasure.Euclidean:
-          return EuclideanDistance(Coordinates[i, 0], Coordinates[i, 1], Coordinates[j, 0], Coordinates[j, 1]);
-        case TSPDistanceMeasure.Geo:
-          return GeoDistance(Coordinates[i, 0], Coordinates[i, 1], Coordinates[j, 0], Coordinates[j, 1]);
-        case TSPDistanceMeasure.Manhattan:
-          return ManhattanDistance(Coordinates[i, 0], Coordinates[i, 1], Coordinates[j, 0], Coordinates[j, 1]);
-        case TSPDistanceMeasure.Maximum:
-          return MaximumDistance(Coordinates[i, 0], Coordinates[i, 1], Coordinates[j, 0], Coordinates[j, 1]);
-        case TSPDistanceMeasure.RoundedEuclidean:
-          return Math.Round(EuclideanDistance(Coordinates[i, 0], Coordinates[i, 1], Coordinates[j, 0], Coordinates[j, 1]));
-        case TSPDistanceMeasure.UpperEuclidean:
-          return Math.Ceiling(EuclideanDistance(Coordinates[i, 0], Coordinates[i, 1], Coordinates[j, 0], Coordinates[j, 1]));
-        default:
-          throw new InvalidOperationException("Distance measure is not known.");
-      }
-    }
-
-    private double AttDistance(double x1, double y1, double x2, double y2) {
-      return Math.Ceiling(Math.Sqrt(((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) / 10.0));
-    }
-
-    private double EuclideanDistance(double x1, double y1, double x2, double y2) {
-      return Math.Sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
-    }
-
-    private const double PI = 3.141592;
-    private const double RADIUS = 6378.388;
-    private double GeoDistance(double x1, double y1, double x2, double y2) {
-      double latitude1, longitude1, latitude2, longitude2;
-      double q1, q2, q3;
-      double length;
-
-      latitude1 = ConvertToRadian(x1);
-      longitude1 = ConvertToRadian(y1);
-      latitude2 = ConvertToRadian(x2);
-      longitude2 = ConvertToRadian(y2);
-
-      q1 = Math.Cos(longitude1 - longitude2);
-      q2 = Math.Cos(latitude1 - latitude2);
-      q3 = Math.Cos(latitude1 + latitude2);
-
-      length = (int)(RADIUS * Math.Acos(0.5 * ((1.0 + q1) * q2 - (1.0 - q1) * q3)) + 1.0);
-      return (length);
-    }
-
-    private double ConvertToRadian(double x) {
-      return PI * (Math.Truncate(x) + 5.0 * (x - Math.Truncate(x)) / 3.0) / 180.0;
-    }
-
-    private double ManhattanDistance(double x1, double y1, double x2, double y2) {
-      return Math.Round(Math.Abs(x1 - x2) + Math.Abs(y1 - y2), MidpointRounding.AwayFromZero);
-    }
-
-    private double MaximumDistance(double x1, double y1, double x2, double y2) {
-      return Math.Max(Math.Round(Math.Abs(x1 - x2), MidpointRounding.AwayFromZero), Math.Round(Math.Abs(y1 - y2), MidpointRounding.AwayFromZero));
-    }
-    #endregion
   }
 }
Index: /trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/VRP/CVRPData.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/VRP/CVRPData.cs	(revision 7872)
+++ /trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/VRP/CVRPData.cs	(revision 7872)
@@ -0,0 +1,99 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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
+
+
+namespace HeuristicLab.Problems.Instances {
+  /// <summary>
+  /// Describes instances of the Capacitated Vehicle Routing Problem (CVRP).
+  /// </summary>
+  public class CVRPData: IVRPData {
+    /// <summary>
+    /// The name of the instance
+    /// </summary>
+    public string Name { get; set; }
+    /// <summary>
+    /// Optional! The description of the instance
+    /// </summary>
+    public string Description { get; set; }
+
+    /// <summary>
+    /// The number of customers and the depot
+    /// </summary>
+    public int Dimension { get; set; }
+    /// <summary>
+    /// The distance measure that is used to calculate the distance between
+    ///the coordinates if no <see cref="Distances"/> is given.
+    /// </summary>
+    public DistanceMeasure DistanceMeasure { get; set; }
+    /// <summary>
+    /// Optional! The maximum number of vehicles that can be used.
+    /// </summary>
+    /// <remarks>
+    /// If no number is given, but a maximum is required, it can be assumed that
+    /// the maximum number of vehicles is equal to the number of customers as
+    /// there cannot be more than one vehicle per customer.
+    /// </remarks>
+    public double? MaximumVehicles { get; set; }
+    /// <summary>
+    /// The capacity of the vehicles, which is the same for all (homogeneous fleet).
+    /// </summary>
+    public double Capacity { get; set; }
+    /// <summary>
+    /// Optional! The distances are given in form of a distance matrix.
+    /// </summary>
+    /// <remarks>
+    /// Either Distances or the <see cref="Coordinates"/> need to be specified along
+    /// with a distance measure.
+    /// </remarks>
+    public double[,] Distances { get; set; }
+    /// <summary>
+    /// Optional! A a matrix of dimension [N, 2] where each row is either the customer
+    /// or the depot and the columns represent x and y coordinates respectively.
+    /// </summary>
+    /// <remarks>
+    /// Either <see cref="Distances"/> or the Coordinates need to be specified along
+    /// with a distance measure.
+    /// </remarks>
+    public double[,] Coordinates { get; set; }
+    /// <summary>
+    /// The demand vector that specifies how many goods need to be delivered.
+    /// The vector has to include the depot, but with a demand of 0.
+    /// </summary>
+    public double[] Demands { get; set; }
+
+    /// <summary>
+    /// Optional! The best-known solution as a list of tours in path-encoding.
+    /// </summary>
+    public int[][] BestKnownTour { get; set; }
+    /// <summary>
+    /// Optional! The quality of the best-known solution.
+    /// </summary>
+    public double? BestKnownQuality { get; set; }
+
+    /// <summary>
+    /// If only the coordinates are given, can calculate the distance matrix.
+    /// </summary>
+    /// <returns>A full distance matrix between all cities.</returns>
+    public double[,] GetDistanceMatrix() {
+      return DistanceHelper.GetDistanceMatrix(DistanceMeasure, Coordinates, Distances, Dimension);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/VRP/IVRPData.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/VRP/IVRPData.cs	(revision 7872)
+++ /trunk/sources/HeuristicLab.Problems.Instances/3.3/Types/VRP/IVRPData.cs	(revision 7872)
@@ -0,0 +1,33 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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;
+
+namespace HeuristicLab.Problems.Instances {
+  /// <summary>
+  /// Marker interface for VRP data
+  /// </summary>
+  public interface IVRPData {
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs	(revision 7871)
+++ /trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs	(revision 7872)
@@ -347,8 +347,8 @@
       if (data.Coordinates == null && data.Distances == null)
         throw new System.IO.InvalidDataException("The given instance specifies neither coordinates nor distances!");
-      if (data.Dimension > DistanceMatrixSizeLimit && (data.DistanceMeasure == TSPDistanceMeasure.Att
-        || data.DistanceMeasure == TSPDistanceMeasure.Manhattan
-        || data.DistanceMeasure == TSPDistanceMeasure.Maximum
-        || data.DistanceMeasure == TSPDistanceMeasure.UpperEuclidean))
+      if (data.Dimension > DistanceMatrixSizeLimit && (data.DistanceMeasure == DistanceMeasure.Att
+        || data.DistanceMeasure == DistanceMeasure.Manhattan
+        || data.DistanceMeasure == DistanceMeasure.Maximum
+        || data.DistanceMeasure == DistanceMeasure.UpperEuclidean))
         throw new System.IO.InvalidDataException("The given instance uses an unsupported distance measure and is too large for using a distance matrix.");
       if (data.Coordinates != null && data.Coordinates.GetLength(1) != 2)
@@ -363,12 +363,12 @@
 
       TSPEvaluator evaluator;
-      if (data.DistanceMeasure == TSPDistanceMeasure.Att
-        || data.DistanceMeasure == TSPDistanceMeasure.Manhattan
-        || data.DistanceMeasure == TSPDistanceMeasure.Maximum
-        || data.DistanceMeasure == TSPDistanceMeasure.UpperEuclidean) {
+      if (data.DistanceMeasure == DistanceMeasure.Att
+        || data.DistanceMeasure == DistanceMeasure.Manhattan
+        || data.DistanceMeasure == DistanceMeasure.Maximum
+        || data.DistanceMeasure == DistanceMeasure.UpperEuclidean) {
         evaluator = new TSPDistanceMatrixEvaluator();
         UseDistanceMatrix = new BoolValue(true);
         DistanceMatrix = new DistanceMatrix(data.GetDistanceMatrix());
-      } else if (data.DistanceMeasure == TSPDistanceMeasure.Direct && data.Distances != null) {
+      } else if (data.DistanceMeasure == DistanceMeasure.Direct && data.Distances != null) {
         evaluator = new TSPDistanceMatrixEvaluator();
         UseDistanceMatrix = new BoolValue(true);
@@ -378,11 +378,11 @@
         UseDistanceMatrix = new BoolValue(data.Dimension <= DistanceMatrixSizeLimit);
         switch (data.DistanceMeasure) {
-          case TSPDistanceMeasure.Euclidean:
+          case DistanceMeasure.Euclidean:
             evaluator = new TSPEuclideanPathEvaluator();
             break;
-          case TSPDistanceMeasure.RoundedEuclidean:
+          case DistanceMeasure.RoundedEuclidean:
             evaluator = new TSPRoundedEuclideanPathEvaluator();
             break;
-          case TSPDistanceMeasure.Geo:
+          case DistanceMeasure.Geo:
             evaluator = new TSPGeoPathEvaluator();
             break;
