- Timestamp:
- 12/17/16 15:42:19 (8 years ago)
- Location:
- branches/symbreg-factors-2650
- Files:
-
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/symbreg-factors-2650
- Property svn:mergeinfo changed
/trunk/sources merged: 14457-14458,14463-14465,14468-14469,14475-14476,14478-14479,14481-14483,14486,14493-14494
- Property svn:mergeinfo changed
-
branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/HeuristicLab.Problems.Instances.VehicleRouting-3.4.csproj
r11650 r14498 158 158 <EmbeddedResource Include="Data\CordeauMDTW.opt.zip" /> 159 159 <EmbeddedResource Include="Data\Homberger.opt.zip" /> 160 <EmbeddedResource Include="Data\Solomon.opt.zip" /> 160 161 <None Include="Plugin.cs.frame" /> 161 162 <Compile Include="Plugin.cs" /> -
branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonFormatInstanceProvider.cs
r14185 r14498 21 21 22 22 using System; 23 using System.Collections.Generic;24 23 using System.IO; 25 24 using System.Linq; … … 64 63 string date = ExtractValue(reader.ReadLine()); 65 64 string reference = ExtractValue(reader.ReadLine()); 66 reader.ReadLine(); // Solution 67 68 var routesQuery = 69 from line in reader.ReadAllLines() 70 where !string.IsNullOrEmpty(line) 71 let tokens = ExtractValue(line).Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) 72 let stops = tokens.Select(int.Parse).Select(s => s - 1) 73 select stops; 74 75 var routes = routesQuery.Select(s => s.ToArray()).ToArray(); 76 77 instance.BestKnownTour = routes; 65 switch (reader.ReadLine().Trim()) { // "Solution" or "Distance" 66 case "Solution": 67 var routesQuery = from line in reader.ReadAllLines() 68 where !string.IsNullOrEmpty(line) 69 let tokens = ExtractValue(line).Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) 70 let stops = tokens.Select(int.Parse).Select(s => s - 1) 71 select stops; 72 var routes = routesQuery.Select(s => s.ToArray()).ToArray(); 73 instance.BestKnownTour = routes; 74 break; 75 case "Distance": 76 double quality = double.Parse(reader.ReadLine()); 77 instance.BestKnownQuality = quality; 78 break; 79 } 78 80 } 79 81 }
Note: See TracChangeset
for help on using the changeset viewer.