Changeset 11432
- Timestamp:
- 10/09/14 09:27:42 (10 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauFormatInstanceProvider.cs
r11429 r11432 46 46 var toursPerDepotQuery = 47 47 from line in ReadAllLines(reader) 48 where !string.IsNullOrEmpty(line) 48 49 let tokens = line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) 49 50 let depot = int.Parse(tokens[0]) … … 52 53 //let load = double.Parse(tokens[3]) 53 54 let customers = tokens.Skip(4).Where(t => !t.StartsWith("(")).Select(int.Parse) 55 let numberOfCustomers = customers.Count() 54 56 //let serviceTimes = tokens.Skip(5).Where(t => t.StartsWith("(")).Select(t => int.Parse(t.Trim('(', ')'))) 55 let stops = customers. Where(s => s != 0).Select(s => s - 1)57 let stops = customers.Skip(1).Take(numberOfCustomers - 2).Select(s => s - 1) 56 58 select new { depot, /*vehicle,*/ stops } into assignment 57 59 group assignment by assignment.depot; -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.VehicleRouting-3.4/VRPInstancesTest.cs
r11287 r11432 55 55 ((dynamic)vrp).Load(((dynamic)provider).LoadData(instance)); 56 56 } catch (Exception exc) { 57 failedInstances.AppendLine(instance + ": " + exc.Message);57 failedInstances.AppendLine(instance.Name + ": " + exc.Message); 58 58 } 59 59 }
Note: See TracChangeset
for help on using the changeset viewer.