Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauFormatInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauFormatInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauFormatInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -20,9 +20,13 @@
 #endregion
 
+using System;
+using System.Collections.Generic;
+using System.Globalization;
 using System.IO;
+using System.Linq;
 
 namespace HeuristicLab.Problems.Instances.VehicleRouting {
-  public abstract class CordeauFormatInstanceProvider : VRPInstanceProvider {
-    protected override VRPData LoadData(Stream stream) {
+  public abstract class CordeauFormatInstanceProvider<TData> : VRPInstanceProvider<TData> where TData : MDCVRPData {
+    protected override TData LoadData(Stream stream) {
       return LoadInstance(new CordeauParser(stream));
     }
@@ -31,37 +35,57 @@
       get { return true; }
     }
-    public override VRPData ImportData(string path) {
+    public override TData ImportData(string path) {
       return LoadInstance(new CordeauParser(path));
     }
 
-    private MDCVRPTWData LoadInstance(CordeauParser parser) {
-      parser.Parse();
+    internal abstract TData LoadInstance(CordeauParser parser);
 
-      var instance = new MDCVRPTWData();
-      instance.Dimension = parser.Cities + 1;
-      instance.Depots = parser.Depots;
-      instance.Coordinates = parser.Coordinates;
-      instance.Capacity = parser.Capacity;
-      instance.Demands = parser.Demands;
-      instance.DistanceMeasure = DistanceMeasure.Euclidean;
-      instance.ReadyTimes = parser.Readytimes;
-      instance.ServiceTimes = parser.Servicetimes;
-      instance.DueTimes = parser.Duetimes;
-      instance.MaximumVehicles = parser.Vehicles;
+    protected override void LoadSolution(Stream stream, TData instance) {
+      using (var reader = new StreamReader(stream)) {
+        double costs = double.Parse(reader.ReadLine(), CultureInfo.InvariantCulture);
 
-      int depots = parser.Depots;
-      int vehicles = parser.Vehicles / parser.Depots;
-      instance.VehicleDepotAssignment = new int[depots * vehicles];
-      int index = 0;
+        var toursPerDepotQuery =
+          from line in reader.ReadAllLines()
+          where !string.IsNullOrEmpty(line)
+          let tokens = line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
+          let depot = int.Parse(tokens[0])
+          //let vehicle = int.Parse(tokens[1])
+          //let duration = double.Parse(tokens[2], CultureInfo.InvariantCulture)
+          //let load = double.Parse(tokens[3], new CultureInfo.InvariantCulture)
+          let customers = tokens.Skip(4).Where(t => !t.StartsWith("(")).Select(int.Parse)
+          let numberOfCustomers = customers.Count()
+          //let serviceTimes = tokens.Skip(5).Where(t => t.StartsWith("(")).Select(t => double.Parse(t.Trim('(', ')'), CultureInfo.InvariantCulture))
+          let stops = customers.Skip(1).Take(numberOfCustomers - 2).Select(s => s - 1)
+          select new { depot, /*vehicle,*/ stops } into assignment
+          group assignment by assignment.depot;
 
-      for (int i = 0; i < depots; i++)
-        for (int j = 0; j < vehicles; j++) {
-          instance.VehicleDepotAssignment[index] = i;
-          index++;
-        }
+        var toursPerDepot = toursPerDepotQuery.Select(d => d.Select(v => v.stops.ToArray()).ToArray()).ToArray();
 
-      instance.Name = parser.ProblemName;
+        instance.BestKnownTour = toursPerDepot.SelectMany(depot => depot).ToArray();
 
-      return instance;
+        instance.BestKnownTourVehicleAssignment = DetermineTourToVehicleAssignment(toursPerDepot, instance.VehicleDepotAssignment);
+      }
+    }
+
+    private static int[] DetermineTourToVehicleAssignment(int[][][] toursPerDepot, int[] vehicleDepotAssignments) {
+      var usedVehiclesPerDepot = toursPerDepot.Select((d, i) => new { i, d }).ToDictionary(k => k.i, v => v.d.Length);
+      var availableVehiclesPerDepot = vehicleDepotAssignments.GroupBy(a => a).ToDictionary(k => k.Key, v => v.Count());
+
+      var tourToVehicle = new List<int>(vehicleDepotAssignments.Length);
+      var unusedVehicles = new List<int>();
+
+      int vehicle = 0;
+      for (int depot = 0; depot < toursPerDepot.Length; depot++) {
+        int used = usedVehiclesPerDepot[depot];
+        tourToVehicle.AddRange(Enumerable.Range(vehicle, used));
+        vehicle += used;
+
+        int unused = availableVehiclesPerDepot[depot] - used;
+        unusedVehicles.AddRange(Enumerable.Range(vehicle, unused));
+        vehicle += unused;
+      }
+      tourToVehicle.AddRange(unusedVehicles);
+
+      return tourToVehicle.ToArray();
     }
   }
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauInstanceProvider.cs	(revision 11062)
+++ 	(revision )
@@ -1,52 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2013 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.IO;
-using System.Linq;
-using System.Reflection;
-using System.Text.RegularExpressions;
-using ICSharpCode.SharpZipLib.Zip;
-
-namespace HeuristicLab.Problems.Instances.VehicleRouting {
-  public class CordeauInstanceProvider : CordeauFormatInstanceProvider {
-    public override string Name {
-      get { return "Cordeau (MDCVRPTW)"; }
-    }
-
-    public override string Description {
-      get { return "Cordeau test set"; }
-    }
-    
-    public override Uri WebLink {
-      get { return new Uri(@"http://neo.lcc.uma.es/radi-aeb/WebVRP/"); }
-    }
-
-    public override string ReferencePublication {
-      get { return null; }
-    }
-
-    protected override string FileName {
-      get { return "Cordeau"; }
-    }
-  }
-}
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauMDInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauMDInstanceProvider.cs	(revision 11576)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauMDInstanceProvider.cs	(revision 11576)
@@ -0,0 +1,78 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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;
+
+namespace HeuristicLab.Problems.Instances.VehicleRouting {
+  public class CordeauMDInstanceProvider : CordeauFormatInstanceProvider<MDCVRPData> {
+    public override string Name {
+      get { return "Cordeau (MDCVRP)"; }
+    }
+
+    public override string Description {
+      get { return "Cordeau test set"; }
+    }
+
+    public override Uri WebLink {
+      get { return new Uri(@"http://neo.lcc.uma.es/vrp/vrp-instances/multiple-depot-vrp-instances/"); }
+    }
+
+    public override string ReferencePublication {
+      get {
+        return @"J.-F. Cordeau, M. Gendreau, G. Laporte. 1997.
+A tabu search heuristic for periodic and multi-depot vehicle routing problems.
+Networks, 30, pp. 105–119.";
+      }
+    }
+
+    protected override string FileName {
+      get { return "CordeauMD"; }
+    }
+
+    internal override MDCVRPData LoadInstance(CordeauParser parser) {
+      parser.Parse();
+
+      var instance = new MDCVRPData();
+      instance.Dimension = parser.Cities + 1;
+      instance.Depots = parser.Depots;
+      instance.Coordinates = parser.Coordinates;
+      instance.Capacity = parser.Capacity;
+      instance.Demands = parser.Demands;
+      instance.DistanceMeasure = DistanceMeasure.Euclidean;
+      instance.MaximumVehicles = parser.Vehicles;
+
+      int depots = parser.Depots;
+      int vehicles = parser.Vehicles / parser.Depots;
+      instance.VehicleDepotAssignment = new int[depots * vehicles];
+      int index = 0;
+
+      for (int i = 0; i < depots; i++)
+        for (int j = 0; j < vehicles; j++) {
+          instance.VehicleDepotAssignment[index] = i;
+          index++;
+        }
+
+      instance.Name = parser.ProblemName;
+
+      return instance;
+    }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauMDTWInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauMDTWInstanceProvider.cs	(revision 11576)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauMDTWInstanceProvider.cs	(revision 11576)
@@ -0,0 +1,81 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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;
+
+namespace HeuristicLab.Problems.Instances.VehicleRouting {
+  public class CordeauMDTWInstanceProvider : CordeauFormatInstanceProvider<MDCVRPTWData> {
+    public override string Name {
+      get { return "Cordeau (MDCVRPTW)"; }
+    }
+
+    public override string Description {
+      get { return "Cordeau test set"; }
+    }
+
+    public override Uri WebLink {
+      get { return new Uri(@"http://neo.lcc.uma.es/vrp/vrp-instances/multiple-depot-vrp-with-time-windows-instances/"); }
+    }
+
+    public override string ReferencePublication {
+      get {
+        return @"J.-F. Cordeau, M. Gendreau, G. Laporte. 1997.
+A tabu search heuristic for periodic and multi-depot vehicle routing problems.
+Networks, 30, pp. 105–119.";
+      }
+    }
+
+    protected override string FileName {
+      get { return "CordeauMDTW"; }
+    }
+
+    internal override MDCVRPTWData LoadInstance(CordeauParser parser) {
+      parser.Parse();
+
+      var instance = new MDCVRPTWData();
+      instance.Dimension = parser.Cities + 1;
+      instance.Depots = parser.Depots;
+      instance.Coordinates = parser.Coordinates;
+      instance.Capacity = parser.Capacity;
+      instance.Demands = parser.Demands;
+      instance.DistanceMeasure = DistanceMeasure.Euclidean;
+      instance.ReadyTimes = parser.Readytimes;
+      instance.ServiceTimes = parser.Servicetimes;
+      instance.DueTimes = parser.Duetimes;
+      instance.MaximumVehicles = parser.Vehicles;
+
+      int depots = parser.Depots;
+      int vehicles = parser.Vehicles / parser.Depots;
+      instance.VehicleDepotAssignment = new int[depots * vehicles];
+      int index = 0;
+
+      for (int i = 0; i < depots; i++)
+        for (int j = 0; j < vehicles; j++) {
+          instance.VehicleDepotAssignment[index] = i;
+          index++;
+        }
+
+      instance.Name = parser.ProblemName;
+
+      return instance;
+    }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauParser.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauParser.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauParser.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/ChristofidesInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/ChristofidesInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/ChristofidesInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -21,10 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Text.RegularExpressions;
-using ICSharpCode.SharpZipLib.Zip;
 
 namespace HeuristicLab.Problems.Instances.VehicleRouting {
@@ -37,7 +31,7 @@
       get { return "Christofides test set"; }
     }
-    
+
     public override Uri WebLink {
-      get { return new Uri(@"http://www.rhsmith.umd.edu/faculty/bgolden/vrp_data.htm"); }
+      get { return new Uri(@"http://www.terpconnect.umd.edu/~bgolden/vrp_data.htm"); }
     }
 
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenFormatInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenFormatInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenFormatInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -24,6 +24,6 @@
 
 namespace HeuristicLab.Problems.Instances.VehicleRouting {
-  public abstract class GoldenFormatInstanceProvider : VRPInstanceProvider {
-    protected override VRPData LoadData(Stream stream) {
+  public abstract class GoldenFormatInstanceProvider : VRPInstanceProvider<CVRPTWData> {
+    protected override CVRPTWData LoadData(Stream stream) {
       return LoadInstance(new GoldenParser(stream));
     }
@@ -32,5 +32,5 @@
       get { return true; }
     }
-    public override VRPData ImportData(string path) {
+    public override CVRPTWData ImportData(string path) {
       return LoadInstance(new GoldenParser(path));
     }
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -21,10 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Text.RegularExpressions;
-using ICSharpCode.SharpZipLib.Zip;
 
 namespace HeuristicLab.Problems.Instances.VehicleRouting {
@@ -37,7 +31,7 @@
       get { return "Golden test set"; }
     }
-    
+
     public override Uri WebLink {
-      get { return new Uri(@"http://www.rhsmith.umd.edu/faculty/bgolden/vrp_data.htm"); }
+      get { return new Uri(@"http://www.terpconnect.umd.edu/~bgolden/vrp_data.htm"); }
     }
 
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenParser.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenParser.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenParser.cs	(revision 11576)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/KytojokiInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/KytojokiInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/KytojokiInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -21,10 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Text.RegularExpressions;
-using ICSharpCode.SharpZipLib.Zip;
 
 namespace HeuristicLab.Problems.Instances.VehicleRouting {
@@ -37,7 +31,7 @@
       get { return "Kytojoki test set"; }
     }
-    
+
     public override Uri WebLink {
-      get { return new Uri(@"http://www.rhsmith.umd.edu/faculty/bgolden/vrp_data.htm"); }
+      get { return new Uri(@"http://www.terpconnect.umd.edu/~bgolden/vrp_data.htm"); }
     }
 
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/HeuristicLab.Problems.Instances.VehicleRouting-3.4.csproj
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/HeuristicLab.Problems.Instances.VehicleRouting-3.4.csproj	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/HeuristicLab.Problems.Instances.VehicleRouting-3.4.csproj	(revision 11576)
@@ -103,7 +103,7 @@
   <ItemGroup>
     <Reference Include="ICSharpCode.SharpZipLib">
-		<HintPath>..\..\HeuristicLab.PluginInfrastructure\3.3\ICSharpCode.SharpZipLib.dll</HintPath>
-		<Private>False</Private>
-	</Reference>
+      <HintPath>..\..\HeuristicLab.PluginInfrastructure\3.3\ICSharpCode.SharpZipLib.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -111,4 +111,5 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="CordeauFormat\CordeauMDTWInstanceProvider.cs" />
     <Compile Include="GoldenFormat\ChristofidesInstanceProvider.cs" />
     <Compile Include="GoldenFormat\KytojokiInstanceProvider.cs" />
@@ -117,4 +118,5 @@
     <Compile Include="GoldenFormat\GoldenFormatInstanceProvider.cs" />
     <Compile Include="IVRPInstanceProvider.cs" />
+    <Compile Include="StreamReaderHelper.cs" />
     <Compile Include="TaillardFormat\TaillardInstanceProvider.cs" />
     <Compile Include="TaillardFormat\TaillardParser.cs" />
@@ -122,5 +124,5 @@
     <Compile Include="TSPLibFormat\AugeratInstanceProvider.cs" />
     <Compile Include="TSPLibFormat\ChristofidesEilonInstanceProvider.cs" />
-    <Compile Include="CordeauFormat\CordeauInstanceProvider.cs" />
+    <Compile Include="CordeauFormat\CordeauMDInstanceProvider.cs" />
     <Compile Include="CordeauFormat\CordeauFormatInstanceProvider.cs" />
     <Compile Include="LiLimFormat\LiLimInstanceProvider.cs" />
@@ -142,5 +144,4 @@
     <EmbeddedResource Include="Data\Homberger.zip" />
     <EmbeddedResource Include="Data\LiLim.zip" />
-    <EmbeddedResource Include="Data\Cordeau.zip" />
     <EmbeddedResource Include="Data\Golden.zip" />
     <EmbeddedResource Include="Data\Christofides.zip" />
@@ -148,4 +149,9 @@
     <EmbeddedResource Include="Data\Taillard.opt.zip" />
     <EmbeddedResource Include="Data\Taillard.zip" />
+    <EmbeddedResource Include="Data\CordeauMD.zip" />
+    <EmbeddedResource Include="Data\CordeauMDTW.zip" />
+    <EmbeddedResource Include="Data\CordeauMD.opt.zip" />
+    <EmbeddedResource Include="Data\CordeauMDTW.opt.zip" />
+    <EmbeddedResource Include="Data\Homberger.opt.zip" />
     <None Include="Plugin.cs.frame" />
     <Compile Include="Plugin.cs" />
@@ -180,5 +186,5 @@
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
-   <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
 set ProjectDir=$(ProjectDir)
 set SolutionDir=$(SolutionDir)
@@ -186,5 +192,5 @@
 
 call PreBuildEvent.cmd</PreBuildEvent>
-<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
 export ProjectDir=$(ProjectDir)
 export SolutionDir=$(SolutionDir)
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/IVRPInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/IVRPInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/IVRPInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -21,10 +21,10 @@
 
 namespace HeuristicLab.Problems.Instances.VehicleRouting {
-  public interface IVRPInstanceProvider {
+  public interface IVRPInstanceProvider<TData> {
     bool CanImportData { get; }
-    IVRPData Import(string vrpFile, string tourFile);
+    TData Import(string instancePath, string solutionPath);
 
     bool CanExportData { get; }
-    void Export(IVRPData instance, string path);
+    void Export(TData instance, string path);
   }
 }
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimFormatInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimFormatInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimFormatInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -23,6 +23,6 @@
 
 namespace HeuristicLab.Problems.Instances.VehicleRouting {
-  public abstract class LiLimFormatInstanceProvider : VRPInstanceProvider {
-    protected override VRPData LoadData(Stream stream) {
+  public abstract class LiLimFormatInstanceProvider : VRPInstanceProvider<PDPTWData> {
+    protected override PDPTWData LoadData(Stream stream) {
       return LoadInstance(new LiLimParser(stream));
     }
@@ -31,5 +31,5 @@
       get { return true; }
     }
-    public override VRPData ImportData(string path) {
+    public override PDPTWData ImportData(string path) {
       return LoadInstance(new LiLimParser(path));
     }
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -37,7 +37,7 @@
       get { return "LiLim test set"; }
     }
-    
+
     public override Uri WebLink {
-      get { return new Uri(@"http://www.sintef.no/Projectweb/TOP/Problems/PDPTW/Li--Lim-benchmark/"); }
+      get { return new Uri(@"http://www.sintef.no/Projectweb/TOP/PDPTW/Li--Lim-benchmark/"); }
     }
 
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimParser.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimParser.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimParser.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/Plugin.cs.frame
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/Plugin.cs.frame	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/Plugin.cs.frame	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -23,6 +23,7 @@
 
 namespace HeuristicLab.Problems.Instances.VehicleRouting {
-  [Plugin("HeuristicLab.Problems.Instances.VehicleRouting", "3.4.2.$WCREV$")]
+  [Plugin("HeuristicLab.Problems.Instances.VehicleRouting", "3.4.3.$WCREV$")]
   [PluginFile("HeuristicLab.Problems.Instances.VehicleRouting-3.4.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
   [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
   [PluginDependency("HeuristicLab.Problems.Instances.TSPLIB", "3.3")]
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/Properties/AssemblyInfo.cs.frame
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/Properties/AssemblyInfo.cs.frame	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/Properties/AssemblyInfo.cs.frame	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -32,5 +32,5 @@
 [assembly: AssemblyCompany("HEAL")]
 [assembly: AssemblyProduct("HeuristicLab")]
-[assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
+[assembly: AssemblyCopyright("(c) 2002-2014 HEAL")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
@@ -55,3 +55,3 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("3.4.0.0")]
-[assembly: AssemblyFileVersion("3.4.2.$WCREV$")]
+[assembly: AssemblyFileVersion("3.4.3.$WCREV$")]
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/HombergerInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/HombergerInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/HombergerInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -37,7 +37,7 @@
       get { return "Homberger test set"; }
     }
-    
+
     public override Uri WebLink {
-      get { return new Uri(@"http://www.fernuni-hagen.de/WINF/touren/inhalte/probinst.htm"); }
+      get { return new Uri(@"http://www.sintef.no/Projectweb/TOP/VRPTW/Homberger-benchmark/"); }
     }
 
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonFormatInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonFormatInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonFormatInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -20,9 +20,12 @@
 #endregion
 
+using System;
+using System.Collections.Generic;
 using System.IO;
+using System.Linq;
 
 namespace HeuristicLab.Problems.Instances.VehicleRouting {
-  public abstract class SolomonFormatInstanceProvider : VRPInstanceProvider {
-    protected override VRPData LoadData(Stream stream) {
+  public abstract class SolomonFormatInstanceProvider : VRPInstanceProvider<CVRPTWData> {
+    protected override CVRPTWData LoadData(Stream stream) {
       return LoadInstance(new SolomonParser(stream));
     }
@@ -31,5 +34,5 @@
       get { return true; }
     }
-    public override VRPData ImportData(string path) {
+    public override CVRPTWData ImportData(string path) {
       return LoadInstance(new SolomonParser(path));
     }
@@ -54,4 +57,29 @@
       return instance;
     }
+
+    protected override void LoadSolution(Stream stream, CVRPTWData instance) {
+      using (var reader = new StreamReader(stream)) {
+        string instanceName = ExtractValue(reader.ReadLine());
+        string authors = ExtractValue(reader.ReadLine());
+        string date = ExtractValue(reader.ReadLine());
+        string reference = ExtractValue(reader.ReadLine());
+        reader.ReadLine(); // Solution
+
+        var routesQuery =
+          from line in reader.ReadAllLines()
+          where !string.IsNullOrEmpty(line)
+          let tokens = ExtractValue(line).Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
+          let stops = tokens.Select(int.Parse).Select(s => s - 1)
+          select stops;
+
+        var routes = routesQuery.Select(s => s.ToArray()).ToArray();
+
+        instance.BestKnownTour = routes;
+      }
+    }
+
+    private static string ExtractValue(string line) {
+      return line.Split(new[] { ':' }, StringSplitOptions.RemoveEmptyEntries).Last().Trim();
+    }
   }
 }
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonParser.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonParser.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonParser.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/StreamReaderHelper.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/StreamReaderHelper.cs	(revision 11576)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/StreamReaderHelper.cs	(revision 11576)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.Collections.Generic;
+using System.IO;
+
+namespace HeuristicLab.Problems.Instances.VehicleRouting {
+  internal static class StreamReaderHelper {
+    public static IEnumerable<string> ReadAllLines(this StreamReader reader) {
+      while (!reader.EndOfStream)
+        yield return reader.ReadLine();
+    }
+  }
+}
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/AugeratInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/AugeratInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/AugeratInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/ChristofidesEilonInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/ChristofidesEilonInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/ChristofidesEilonInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/TSPLibFormatInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/TSPLibFormatInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/TSPLibFormatInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -25,6 +25,6 @@
 
 namespace HeuristicLab.Problems.Instances.VehicleRouting {
-  public abstract class TSPLibFormatInstanceProvider : VRPInstanceProvider {
-    protected override VRPData LoadData(Stream stream) {
+  public abstract class TSPLibFormatInstanceProvider : VRPInstanceProvider<CVRPData> {
+    protected override CVRPData LoadData(Stream stream) {
       return LoadInstance(new TSPLIBParser(stream));
     }
@@ -33,5 +33,5 @@
       get { return true; }
     }
-    public override VRPData ImportData(string path) {
+    public override CVRPData ImportData(string path) {
       return LoadInstance(new TSPLIBParser(path));
     }
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardFormatInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardFormatInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardFormatInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -23,6 +23,6 @@
 
 namespace HeuristicLab.Problems.Instances.VehicleRouting {
-  public abstract class TaillardFormatInstanceProvider : VRPInstanceProvider {
-    protected override VRPData LoadData(Stream stream) {
+  public abstract class TaillardFormatInstanceProvider : VRPInstanceProvider<CVRPData> {
+    protected override CVRPData LoadData(Stream stream) {
       return LoadInstance(new TaillardParser(stream));
     }
@@ -31,5 +31,5 @@
       get { return true; }
     }
-    public override VRPData ImportData(string path) {
+    public override CVRPData ImportData(string path) {
       return LoadInstance(new TaillardParser(path));
     }
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardParser.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardParser.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardParser.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/VRPDataDescriptor.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/VRPDataDescriptor.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/VRPDataDescriptor.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/VRPInstanceProvider.cs
===================================================================
--- branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/VRPInstanceProvider.cs	(revision 11062)
+++ branches/OptimizationNetworks/HeuristicLab.Problems.Instances.VehicleRouting/3.4/VRPInstanceProvider.cs	(revision 11576)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -26,17 +26,18 @@
 using System.Reflection;
 using System.Text.RegularExpressions;
+using HeuristicLab.Common;
 using ICSharpCode.SharpZipLib.Zip;
 
 namespace HeuristicLab.Problems.Instances.VehicleRouting {
-  public abstract class VRPInstanceProvider : ProblemInstanceProvider<VRPData>, IVRPInstanceProvider {
+  public abstract class VRPInstanceProvider<TData> : ProblemInstanceProvider<TData>, IVRPInstanceProvider<TData> where TData : IVRPData {
     protected abstract string FileName { get; }
 
     public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
-      Dictionary<string, string> solutions = new Dictionary<string, string>();
+      var solutions = new Dictionary<string, string>();
       var solutionsArchiveName = GetResourceName(FileName + @"\.opt\.zip");
       if (!String.IsNullOrEmpty(solutionsArchiveName)) {
         using (var solutionsZipFile = new ZipInputStream(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) {
           foreach (var entry in GetZipContents(solutionsZipFile))
-            solutions.Add(entry.Substring(0, entry.Length - ".opt".Length) + "." + FileName, entry);
+            solutions.Add(Path.GetFileNameWithoutExtension(entry) + "." + FileName, entry);
         }
       }
@@ -45,6 +46,6 @@
 
       using (var instanceStream = new ZipInputStream(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) {
-        foreach (var entry in GetZipContents(instanceStream).OrderBy(x => x)) {
-          string solutionEntry = entry.Substring(0, entry.Length - ".opt".Length) + "." + FileName;
+        foreach (var entry in GetZipContents(instanceStream).OrderBy(x => x, new NaturalStringComparer())) {
+          string solutionEntry = Path.GetFileNameWithoutExtension(entry) + "." + FileName;
           yield return new VRPDataDescriptor(Path.GetFileNameWithoutExtension(entry), GetInstanceDescription(), entry, solutions.ContainsKey(solutionEntry) ? solutions[solutionEntry] : String.Empty);
         }
@@ -52,5 +53,5 @@
     }
 
-    public override VRPData LoadData(IDataDescriptor id) {
+    public override TData LoadData(IDataDescriptor id) {
       var descriptor = (VRPDataDescriptor)id;
       var instanceArchiveName = GetResourceName(FileName + @"\.zip");
@@ -76,5 +77,23 @@
     }
 
-    private static void LoadSolution(Stream stream, VRPData instance) {
+    #region IVRPInstanceProvider
+    public TData Import(string vrpFile, string tourFile) {
+      var data = ImportData(vrpFile);
+      if (!String.IsNullOrEmpty(tourFile)) {
+        LoadSolution(tourFile, data);
+      }
+      return data;
+    }
+
+    public void Export(TData instance, string path) {
+      ExportData(instance, path);
+    }
+    #endregion
+
+    protected virtual void LoadSolution(Stream stream, TData instance) {
+      LoadOptFile(stream, instance);
+    }
+
+    private void LoadOptFile(Stream stream, TData instance) {
       List<List<int>> routes = new List<List<int>>();
 
@@ -93,4 +112,11 @@
             routes.Add(route);
           }
+
+          if (line.StartsWith("Solution")) {
+            if (routes.Any()) {
+              // Skip remaining solutions since only one "best solution" is stored
+              break;
+            }
+          }
         }
       }
@@ -99,24 +125,20 @@
     }
 
-    public static void LoadSolution(string path, VRPData instance) {
-      using (FileStream stream = new FileStream(path, FileMode.Open)) {
-        LoadSolution(stream, instance);
+    public void LoadSolution(string path, TData instance) {
+      try {
+        using (var stream = new FileStream(path, FileMode.Open)) {
+          LoadSolution(stream, instance);
+        }
+      } catch (Exception) {
+        // new stream necessary because first try already read from stream
+        using (var stream = new FileStream(path, FileMode.Open)) {
+          LoadOptFile(stream, instance); // Fallback to .opt-Format
+        }
       }
     }
 
-    protected abstract VRPData LoadData(Stream stream);
+    protected abstract TData LoadData(Stream stream);
 
-    public IVRPData Import(string vrpFile, string tourFile) {
-      var data = ImportData(vrpFile);
-      if (!String.IsNullOrEmpty(tourFile)) {
-        LoadSolution(tourFile, data);
-      }
-      return data;
-    }
-
-    public void Export(IVRPData instance, string path) {
-      ExportData((VRPData)instance, path);
-    }
-
+    #region Helpers
     protected virtual string GetResourceName(string fileName) {
       return Assembly.GetExecutingAssembly().GetManifestResourceNames()
@@ -134,4 +156,5 @@
       }
     }
+    #endregion
   }
 }
