- Timestamp:
- 10/10/14 12:34:07 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.VehicleRouting/3.4/CordeauFormat/CordeauFormatInstanceProvider.cs
r11432 r11442 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Globalization; 24 25 using System.IO; 25 26 using System.Linq; … … 42 43 protected override void LoadSolution(Stream stream, TData instance) { 43 44 using (var reader = new StreamReader(stream)) { 44 double costs = double.Parse(reader.ReadLine() );45 double costs = double.Parse(reader.ReadLine(), new CultureInfo("en-US")); 45 46 46 47 var toursPerDepotQuery = … … 50 51 let depot = int.Parse(tokens[0]) 51 52 //let vehicle = int.Parse(tokens[1]) 52 //let duration = double.Parse(tokens[2] )53 //let load = double.Parse(tokens[3] )53 //let duration = double.Parse(tokens[2], new CultureInfo("en-US")) 54 //let load = double.Parse(tokens[3], new CultureInfo("en-US")) 54 55 let customers = tokens.Skip(4).Where(t => !t.StartsWith("(")).Select(int.Parse) 55 56 let numberOfCustomers = customers.Count() 56 //let serviceTimes = tokens.Skip(5).Where(t => t.StartsWith("(")).Select(t => int.Parse(t.Trim('(', ')')))57 //let serviceTimes = tokens.Skip(5).Where(t => t.StartsWith("(")).Select(t => double.Parse(t.Trim('(', ')'), new CultureInfo("en-US"))) 57 58 let stops = customers.Skip(1).Take(numberOfCustomers - 2).Select(s => s - 1) 58 59 select new { depot, /*vehicle,*/ stops } into assignment
Note: See TracChangeset
for help on using the changeset viewer.