Changeset 8795
- Timestamp:
- 10/11/12 16:12:49 (12 years ago)
- Location:
- branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/Parsers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/Parsers/DefaultDynPDPParser.cs
r8675 r8795 47 47 Vehicle v = new Vehicle(); 48 48 49 v.xCoord = double.Parse(m[0].Value );50 v.yCoord = double.Parse(m[1].Value );51 v.capacity = double.Parse(m[2].Value );52 v.readyTime = double.Parse(m[3].Value );53 v.dueTime = double.Parse(m[4].Value );49 v.xCoord = double.Parse(m[0].Value, System.Globalization.CultureInfo.InvariantCulture); 50 v.yCoord = double.Parse(m[1].Value, System.Globalization.CultureInfo.InvariantCulture); 51 v.capacity = double.Parse(m[2].Value, System.Globalization.CultureInfo.InvariantCulture); 52 v.readyTime = double.Parse(m[3].Value, System.Globalization.CultureInfo.InvariantCulture); 53 v.dueTime = double.Parse(m[4].Value, System.Globalization.CultureInfo.InvariantCulture); 54 54 55 55 vehicles.Add(v); … … 64 64 Order o = new Order(); 65 65 66 o.revealedTime = double.Parse(m[0].Value );67 o.pickupXCoord = double.Parse(m[1].Value );68 o.pickupYCoord = double.Parse(m[2].Value );69 o.deliveryXCoord = double.Parse(m[3].Value );70 o.deliveryYCoord = double.Parse(m[4].Value );71 o.demand = double.Parse(m[5].Value );72 o.pickupServiceTime = double.Parse(m[6].Value );73 o.pickupReadyTime = double.Parse(m[7].Value );74 o.pickupDueTime = double.Parse(m[8].Value );75 o.deliveryServiceTime = double.Parse(m[9].Value );76 o.deliveryReadyTime = double.Parse(m[10].Value );77 o.deliveryDueTime = double.Parse(m[11].Value );66 o.revealedTime = double.Parse(m[0].Value, System.Globalization.CultureInfo.InvariantCulture); 67 o.pickupXCoord = double.Parse(m[1].Value, System.Globalization.CultureInfo.InvariantCulture); 68 o.pickupYCoord = double.Parse(m[2].Value, System.Globalization.CultureInfo.InvariantCulture); 69 o.deliveryXCoord = double.Parse(m[3].Value, System.Globalization.CultureInfo.InvariantCulture); 70 o.deliveryYCoord = double.Parse(m[4].Value, System.Globalization.CultureInfo.InvariantCulture); 71 o.demand = double.Parse(m[5].Value, System.Globalization.CultureInfo.InvariantCulture); 72 o.pickupServiceTime = double.Parse(m[6].Value, System.Globalization.CultureInfo.InvariantCulture); 73 o.pickupReadyTime = double.Parse(m[7].Value, System.Globalization.CultureInfo.InvariantCulture); 74 o.pickupDueTime = double.Parse(m[8].Value, System.Globalization.CultureInfo.InvariantCulture); 75 o.deliveryServiceTime = double.Parse(m[9].Value, System.Globalization.CultureInfo.InvariantCulture); 76 o.deliveryReadyTime = double.Parse(m[10].Value, System.Globalization.CultureInfo.InvariantCulture); 77 o.deliveryDueTime = double.Parse(m[11].Value, System.Globalization.CultureInfo.InvariantCulture); 78 78 79 79 orders.Add(o); -
branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/Parsers/TSPLibDynPDPParser.cs
r8675 r8795 59 59 m = reg.Matches(line); 60 60 while (m.Count == 3) { 61 xCoord.Add(double.Parse(m[1].Value ));62 yCoord.Add(double.Parse(m[2].Value ));61 xCoord.Add(double.Parse(m[1].Value, System.Globalization.CultureInfo.InvariantCulture)); 62 yCoord.Add(double.Parse(m[2].Value, System.Globalization.CultureInfo.InvariantCulture)); 63 63 64 64 line = reader.ReadLine(); … … 84 84 Order o = new Order(); 85 85 86 int pickupId = int.Parse(m[1].Value );87 int deliveryId = int.Parse(m[2].Value );88 double pickupTWOpen = double.Parse(m[3].Value );89 double pickupTWClose = double.Parse(m[4].Value );90 double pickupServiceTime = double.Parse(m[5].Value );91 double deliveryTWOpen = double.Parse(m[6].Value );92 double deliveryTWClose = double.Parse(m[7].Value );93 double deliveryServiceTime = double.Parse(m[8].Value );94 double demand = double.Parse(m[9].Value );95 double revealed = double.Parse(m[10].Value );86 int pickupId = int.Parse(m[1].Value, System.Globalization.CultureInfo.InvariantCulture); 87 int deliveryId = int.Parse(m[2].Value, System.Globalization.CultureInfo.InvariantCulture); 88 double pickupTWOpen = double.Parse(m[3].Value, System.Globalization.CultureInfo.InvariantCulture); 89 double pickupTWClose = double.Parse(m[4].Value, System.Globalization.CultureInfo.InvariantCulture); 90 double pickupServiceTime = double.Parse(m[5].Value, System.Globalization.CultureInfo.InvariantCulture); 91 double deliveryTWOpen = double.Parse(m[6].Value, System.Globalization.CultureInfo.InvariantCulture); 92 double deliveryTWClose = double.Parse(m[7].Value, System.Globalization.CultureInfo.InvariantCulture); 93 double deliveryServiceTime = double.Parse(m[8].Value, System.Globalization.CultureInfo.InvariantCulture); 94 double demand = double.Parse(m[9].Value, System.Globalization.CultureInfo.InvariantCulture); 95 double revealed = double.Parse(m[10].Value, System.Globalization.CultureInfo.InvariantCulture); 96 96 97 97 o.revealedTime = revealed;
Note: See TracChangeset
for help on using the changeset viewer.