Index: branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauFormatInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauFormatInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauFormatInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauInstanceProvider.cs	(revision 11205)
+++ 	(revision )
@@ -1,52 +1,0 @@
-﻿#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;
-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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauMDInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauMDInstanceProvider.cs	(revision 12395)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauMDInstanceProvider.cs	(revision 12395)
@@ -0,0 +1,78 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauMDTWInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauMDTWInstanceProvider.cs	(revision 12395)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauMDTWInstanceProvider.cs	(revision 12395)
@@ -0,0 +1,81 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauParser.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauParser.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauParser.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/ChristofidesInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/ChristofidesInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/ChristofidesInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenFormatInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenFormatInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenFormatInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenParser.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenParser.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenParser.cs	(revision 12395)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/KytojokiInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/KytojokiInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/KytojokiInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/HeuristicLab.Problems.Instances.VehicleRouting-3.4.csproj
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/HeuristicLab.Problems.Instances.VehicleRouting-3.4.csproj	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/HeuristicLab.Problems.Instances.VehicleRouting-3.4.csproj	(revision 12395)
@@ -11,6 +11,7 @@
     <RootNamespace>HeuristicLab.Problems.Instances.VehicleRouting</RootNamespace>
     <AssemblyName>HeuristicLab.Problems.Instances.VehicleRouting-3.4</AssemblyName>
-    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
+    <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -22,4 +23,5 @@
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -30,4 +32,5 @@
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup>
@@ -52,4 +55,5 @@
     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
@@ -68,4 +72,5 @@
     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
@@ -84,4 +89,5 @@
     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
@@ -100,15 +106,14 @@
     <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="ICSharpCode.SharpZipLib">
-		<HintPath>..\..\HeuristicLab.PluginInfrastructure\3.3\ICSharpCode.SharpZipLib.dll</HintPath>
-		<Private>False</Private>
-	</Reference>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Data" />
-  </ItemGroup>
-  <ItemGroup>
+    <Reference Include="System.IO.Compression" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="CordeauFormat\CordeauMDTWInstanceProvider.cs" />
     <Compile Include="GoldenFormat\ChristofidesInstanceProvider.cs" />
     <Compile Include="GoldenFormat\KytojokiInstanceProvider.cs" />
@@ -117,4 +122,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 +128,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 +148,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 +153,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 +190,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 +196,5 @@
 
 call PreBuildEvent.cmd</PreBuildEvent>
-<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
 export ProjectDir=$(ProjectDir)
 export SolutionDir=$(SolutionDir)
Index: branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/IVRPInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/IVRPInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/IVRPInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimFormatInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimFormatInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimFormatInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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 "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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimParser.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimParser.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimParser.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/Plugin.cs.frame
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/Plugin.cs.frame	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/Plugin.cs.frame	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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.3.$WCREV$")]
+  [Plugin("HeuristicLab.Problems.Instances.VehicleRouting", "3.4.4.$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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/Properties/AssemblyInfo.cs.frame
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/Properties/AssemblyInfo.cs.frame	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/Properties/AssemblyInfo.cs.frame	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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-2014 HEAL")]
+[assembly: AssemblyCopyright("(c) 2002-2015 HEAL")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
@@ -55,3 +55,3 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("3.4.0.0")]
-[assembly: AssemblyFileVersion("3.4.3.$WCREV$")]
+[assembly: AssemblyFileVersion("3.4.4.$WCREV$")]
Index: branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/HombergerInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/HombergerInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/HombergerInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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 "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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonFormatInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonFormatInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonFormatInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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,5 +31,5 @@
       get { return "Solomon test set"; }
     }
-    
+
     public override Uri WebLink {
       get { return new Uri(@"http://web.cba.neu.edu/~msolomon/problems.htm"); }
Index: branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonParser.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonParser.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonParser.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/StreamReaderHelper.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/StreamReaderHelper.cs	(revision 12395)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/StreamReaderHelper.cs	(revision 12395)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/AugeratInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/AugeratInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/AugeratInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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,5 +31,5 @@
       get { return "Augerat test set"; }
     }
-    
+
     public override Uri WebLink {
       get { return new Uri(@"http://www.branchandcut.org/VRP/data"); }
Index: branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/ChristofidesEilonInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/ChristofidesEilonInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/ChristofidesEilonInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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,5 +31,5 @@
       get { return "Christofides and Eilon test set"; }
     }
-    
+
     public override Uri WebLink {
       get { return new Uri(@"http://www.branchandcut.org/VRP/data"); }
Index: branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/TSPLibFormatInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/TSPLibFormatInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TSPLibFormat/TSPLibFormatInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardFormatInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardFormatInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardFormatInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 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,5 +31,5 @@
       get { return "Taillard test set"; }
     }
-    
+
     public override Uri WebLink {
       get { return new Uri(@"http://mistic.heig-vd.ch/taillard/problemes.dir/vrp.dir/vrp.html"); }
Index: branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardParser.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardParser.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/TaillardFormat/TaillardParser.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/VRPDataDescriptor.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/VRPDataDescriptor.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/VRPDataDescriptor.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/VRPInstanceProvider.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/VRPInstanceProvider.cs	(revision 11205)
+++ branches/HiveStatistics/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/VRPInstanceProvider.cs	(revision 12395)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -23,20 +23,21 @@
 using System.Collections.Generic;
 using System.IO;
+using System.IO.Compression;
 using System.Linq;
 using System.Reflection;
 using System.Text.RegularExpressions;
-using ICSharpCode.SharpZipLib.Zip;
+using HeuristicLab.Common;
 
 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);
+        using (var solutionsZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName), ZipArchiveMode.Read)) {
+          foreach (var entry in solutionsZipFile.Entries)
+            solutions.Add(Path.GetFileNameWithoutExtension(entry.Name) + "." + FileName, entry.Name);
         }
       }
@@ -44,7 +45,7 @@
       if (String.IsNullOrEmpty(instanceArchiveName)) yield break;
 
-      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;
+      using (var instanceStream = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName), ZipArchiveMode.Read)) {
+        foreach (var entry in instanceStream.Entries.Select(x => x.Name).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,10 +53,10 @@
     }
 
-    public override VRPData LoadData(IDataDescriptor id) {
+    public override TData LoadData(IDataDescriptor id) {
       var descriptor = (VRPDataDescriptor)id;
       var instanceArchiveName = GetResourceName(FileName + @"\.zip");
-      using (var instancesZipFile = new ZipFile(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) {
+      using (var instancesZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) {
         var entry = instancesZipFile.GetEntry(descriptor.InstanceIdentifier);
-        var stream = instancesZipFile.GetInputStream(entry);
+        var stream = entry.Open();
         var instance = LoadData(stream);
         if (string.IsNullOrEmpty(instance.Name)) {
@@ -65,7 +66,7 @@
         if (!String.IsNullOrEmpty(descriptor.SolutionIdentifier)) {
           var solutionsArchiveName = GetResourceName(FileName + @"\.opt\.zip");
-          using (var solutionsZipFile = new ZipFile(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) {
+          using (var solutionsZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) {
             entry = solutionsZipFile.GetEntry(descriptor.SolutionIdentifier);
-            stream = solutionsZipFile.GetInputStream(entry);
+            stream = entry.Open();
             LoadSolution(stream, instance);
           }
@@ -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,21 @@
     }
 
-    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()
@@ -127,11 +150,5 @@
       return "Embedded instance of plugin version " + Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true).Cast<AssemblyFileVersionAttribute>().First().Version + ".";
     }
-
-    protected IEnumerable<string> GetZipContents(ZipInputStream zipFile) {
-      ZipEntry entry;
-      while ((entry = zipFile.GetNextEntry()) != null) {
-        yield return entry.Name;
-      }
-    }
+    #endregion
   }
 }
