Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs	(revision 7448)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs	(revision 7466)
@@ -38,5 +38,5 @@
   [Creatable("Problems")]
   [StorableClass]
-  public sealed class GeneralizedQuadraticAssignmentProblem : SingleObjectiveHeuristicOptimizationProblem<IGQAPEvaluator, IGQAPSolutionCreator>, IStorableContent, IProblemInstanceConsumer<IQAPInstance>, IProblemInstanceConsumer<ICTAPInstance> {
+  public sealed class GeneralizedQuadraticAssignmentProblem : SingleObjectiveHeuristicOptimizationProblem<IGQAPEvaluator, IGQAPSolutionCreator>, IStorableContent, IProblemInstanceConsumer<IQAPInstance>, IProblemInstanceConsumer<ICTAPInstance>, IProblemInstanceConsumer<ITSPInstance>, IProblemInstanceConsumer<IATSPInstance> {
 
     public override Image ItemImage {
@@ -206,49 +206,125 @@
     }
 
-    public void LoadFrom(IQAPInstance instance) {
-      Name = instance.Name;
-      Description = instance.Description;
-
-      Weights = new DoubleMatrix(instance.Weights);
-      Distances = new DoubleMatrix(instance.Distances);
-      InstallationCosts = new DoubleMatrix(Weights.Rows, Distances.Columns); // all zero
-      Capacities = new DoubleArray(Enumerable.Range(0, Distances.Rows).Select(x => 1.0).ToArray());
-      Demands = new DoubleArray(Enumerable.Range(0, Weights.Rows).Select(x => 1.0).ToArray());
-
-      TransportationCosts.Value = 1;
-
-      if (instance.BestKnownAssignment != null) {
-        EvaluateAndLoadAssignment(instance.BestKnownAssignment);
-      } else {
-        BestKnownQuality = null;
-        BestKnownSolution = null;
-        BestKnownSolutions = null;
-      }
-    }
-
-    public void LoadFrom(ICTAPInstance instance) {
-      Name = instance.Name;
-      Description = instance.Description;
-
-      Capacities = new DoubleArray(instance.MemoryCapacities);
-      Demands = new DoubleArray(instance.MemoryRequirements);
-      Weights = new DoubleMatrix(instance.CommunicationCosts);
-      InstallationCosts = new DoubleMatrix(instance.ExecutionCosts.Transpose());
-      Distances = new DoubleMatrix(Capacities.Length, Capacities.Length); // all one, except diagonal
-      for (int i = 0; i < Capacities.Length - 1; i++)
-        for (int j = i + 1; j < Capacities.Length; j++) {
-          Distances[i, j] = 1;
-          Distances[j, i] = 1;
-        }
-
-      TransportationCosts.Value = 1;
-
-      if (instance.BestKnownAssignment != null) {
-        EvaluateAndLoadAssignment(instance.BestKnownAssignment);
-      } else {
-        BestKnownQuality = null;
-        BestKnownSolution = null;
-        BestKnownSolutions = null;
-      }
+    public bool LoadFrom(IQAPInstance instance) {
+      try {
+        Name = instance.Name;
+        Description = instance.Description;
+
+        Weights = new DoubleMatrix(instance.Weights);
+        Distances = new DoubleMatrix(instance.Distances);
+        InstallationCosts = new DoubleMatrix(Weights.Rows, Distances.Columns); // all zero
+        Capacities = new DoubleArray(Enumerable.Range(0, Distances.Rows).Select(x => 1.0).ToArray());
+        Demands = new DoubleArray(Enumerable.Range(0, Weights.Rows).Select(x => 1.0).ToArray());
+
+        TransportationCosts.Value = 1;
+
+        if (instance.BestKnownAssignment != null) {
+          EvaluateAndLoadAssignment(instance.BestKnownAssignment);
+        } else {
+          BestKnownQuality = null;
+          BestKnownSolution = null;
+          BestKnownSolutions = null;
+        }
+      } catch {
+        return false;
+      }
+      return true;
+    }
+
+    public bool LoadFrom(ICTAPInstance instance) {
+      try {
+        Name = instance.Name;
+        Description = instance.Description;
+
+        Capacities = new DoubleArray(instance.MemoryCapacities);
+        Demands = new DoubleArray(instance.MemoryRequirements);
+        Weights = new DoubleMatrix(instance.CommunicationCosts);
+        InstallationCosts = new DoubleMatrix(instance.ExecutionCosts.Transpose());
+        Distances = new DoubleMatrix(Capacities.Length, Capacities.Length); // all one, except diagonal
+        for (int i = 0; i < Capacities.Length - 1; i++)
+          for (int j = i + 1; j < Capacities.Length; j++) {
+            Distances[i, j] = 1;
+            Distances[j, i] = 1;
+          }
+
+        TransportationCosts.Value = 1;
+
+        if (instance.BestKnownAssignment != null) {
+          EvaluateAndLoadAssignment(instance.BestKnownAssignment);
+        } else {
+          BestKnownQuality = null;
+          BestKnownSolution = null;
+          BestKnownSolutions = null;
+        }
+      } catch {
+        return false;
+      }
+      return true;
+    }
+
+    public bool LoadFrom(ITSPInstance instance) {
+      try {
+        if (instance.Dimension > 1000) return false;
+        
+        Name = instance.Name;
+        Description = instance.Description;
+
+        Capacities = new DoubleArray(instance.Dimension);
+        Demands = new DoubleArray(instance.Dimension);
+        for (int i = 0; i < instance.Dimension; i++) {
+          Capacities[i] = 1;
+          Demands[i] = 1;
+        }
+        InstallationCosts = new DoubleMatrix(instance.Dimension, instance.Dimension);
+        Weights = new DoubleMatrix(instance.Dimension, instance.Dimension);
+        for (int i = 0; i < instance.Dimension; i++)
+          Weights[i, (i + 1) % instance.Dimension] = 1;
+        Distances = new DoubleMatrix(instance.GetDistanceMatrix());
+
+        TransportationCosts.Value = 1;
+
+        if (instance.BestKnownTour != null) {
+          EvaluateAndLoadAssignment(instance.BestKnownTour);
+        } else {
+          BestKnownQuality = null;
+          BestKnownSolution = null;
+          BestKnownSolutions = null;
+        }
+      } catch {
+        return false;
+      }
+      return true;
+    }
+
+    public bool LoadFrom(IATSPInstance instance) {
+      try {
+        Name = instance.Name;
+        Description = instance.Description;
+
+        Capacities = new DoubleArray(instance.Dimension);
+        Demands = new DoubleArray(instance.Dimension);
+        for (int i = 0; i < instance.Dimension; i++) {
+          Capacities[i] = 1;
+          Demands[i] = 1;
+        }
+        InstallationCosts = new DoubleMatrix(instance.Dimension, instance.Dimension);
+        Weights = new DoubleMatrix(instance.Dimension, instance.Dimension);
+        for (int i = 0; i < instance.Dimension; i++)
+          Weights[i, (i + 1) % instance.Dimension] = 1;
+        Distances = new DoubleMatrix(instance.Distances);
+
+        TransportationCosts.Value = 1;
+
+        if (instance.BestKnownTour != null) {
+          EvaluateAndLoadAssignment(instance.BestKnownTour);
+        } else {
+          BestKnownQuality = null;
+          BestKnownSolution = null;
+          BestKnownSolutions = null;
+        }
+      } catch {
+        return false;
+      }
+      return true;
     }
 
