- Timestamp:
- 10/09/14 09:27:42 (10 years ago)
- File:
-
- 1 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;
Note: See TracChangeset
for help on using the changeset viewer.