Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs	(revision 11276)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/OrienteeringProblem.cs	(revision 11277)
@@ -40,5 +40,5 @@
   public class OrienteeringProblem
     : SingleObjectiveHeuristicOptimizationProblem<IOrienteeringEvaluator, IIntegerVectorCreator>,
-    IStorableContent, IProblemInstanceConsumer<CVRPData>, IProblemInstanceConsumer<OPData> {
+    IStorableContent, IProblemInstanceConsumer<OPData>, IProblemInstanceConsumer<TSPData>, IProblemInstanceConsumer<CVRPData> {
 
     public string Filename { get; set; }
@@ -334,8 +334,8 @@
     }
 
-    public void Load(CVRPData data) {
-      if (data.Coordinates == null)
-        throw new InvalidDataException("The given instance specifies no coordinates!");
-      if (data.Coordinates.GetLength(1) != 2)
+    public void Load(OPData data) {
+      if (data.Coordinates == null && data.Distances == null)
+        throw new InvalidDataException("The given instance specifies no coordinates or distance matrix!");
+      if (data.Coordinates != null && data.Coordinates.GetLength(1) != 2)
         throw new InvalidDataException("The coordinates of the given instance are not in the right format, there need to be one row for each customer and two columns for the x and y coordinates.");
 
@@ -347,5 +347,57 @@
       Description = data.Description;
 
-      Coordinates = new DoubleMatrix(data.Coordinates);
+      Coordinates = data.Coordinates != null ? new DoubleMatrix(data.Coordinates) : null;
+      if (data.Distances != null)
+        DistanceMatrix = new DistanceMatrix(data.Distances);
+      else
+        DistanceMatrix = new DistanceMatrix(data.GetDistanceMatrix());
+
+      StartingPoint = new IntValue(data.StartingPoint);
+      TerminusPoint = new IntValue(data.TerminusPoint);
+
+      MaximumDistance = new DoubleValue(data.MaximumDistance);
+      Scores = new DoubleArray(data.Scores);
+    }
+
+    public void Load(TSPData data) {
+      if (data.Coordinates == null && data.Distances == null)
+        throw new InvalidDataException("The given instance specifies no coordinates or distance matrix!");
+      if (data.Coordinates != null && data.Coordinates.GetLength(1) != 2)
+        throw new InvalidDataException("The coordinates of the given instance are not in the right format, there need to be one row for each customer and two columns for the x and y coordinates.");
+
+      // Clear old solutions
+      BestKnownQuality = null;
+      BestKnownSolution = null;
+
+      Name = data.Name;
+      Description = data.Description;
+
+      Coordinates = data.Coordinates != null ? new DoubleMatrix(data.Coordinates) : null;
+      if (data.Distances != null)
+        DistanceMatrix = new DistanceMatrix(data.Distances);
+      else
+        DistanceMatrix = new DistanceMatrix(data.GetDistanceMatrix());
+
+      StartingPoint = new IntValue(0); // First city is interpreted as start point
+      TerminusPoint = new IntValue(data.Dimension - 1); // Last city is interpreted als end point
+
+      MaximumDistance = new DoubleValue(DistanceMatrix[0, data.Dimension - 1] * 10.0); // distance from start to end first to last city is interpreted as maximum distance
+      Scores = new DoubleArray(Enumerable.Repeat(1.0, data.Dimension).ToArray()); // all scores are 1
+    }
+
+    public void Load(CVRPData data) {
+      if (data.Coordinates == null && data.Distances == null)
+        throw new InvalidDataException("The given instance specifies no coordinates or distance matrix!");
+      if (data.Coordinates != null && data.Coordinates.GetLength(1) != 2)
+        throw new InvalidDataException("The coordinates of the given instance are not in the right format, there need to be one row for each customer and two columns for the x and y coordinates.");
+
+      // Clear old solutions
+      BestKnownQuality = null;
+      BestKnownSolution = null;
+
+      Name = data.Name;
+      Description = data.Description;
+
+      Coordinates = data.Coordinates != null ? new DoubleMatrix(data.Coordinates) : null;
       DistanceMatrix = data.Distances != null
         ? new DistanceMatrix(data.Distances)
@@ -360,30 +412,4 @@
       OnReset();
     }
-
-    public void Load(OPData data) {
-      if (data.Coordinates == null)
-        throw new InvalidDataException("The given instance specifies no coordinates!");
-      if (data.Coordinates.GetLength(1) != 2)
-        throw new InvalidDataException("The coordinates of the given instance are not in the right format, there need to be one row for each customer and two columns for the x and y coordinates.");
-
-      // Clear old solutions
-      BestKnownQuality = null;
-      BestKnownSolution = null;
-
-      Name = data.Name;
-      Description = data.Description;
-
-      Coordinates = new DoubleMatrix(data.Coordinates);
-      if (data.Distances != null)
-        DistanceMatrix = new DistanceMatrix(data.Distances);
-      else
-        data.GetDistanceMatrix();
-
-      StartingPoint = new IntValue(data.StartingPoint);
-      TerminusPoint = new IntValue(data.TerminusPoint);
-
-      MaximumDistance = new DoubleValue(data.MaximumDistance);
-      Scores = new DoubleArray(data.Scores);
-    }
   }
 }
