- Timestamp:
- 10/06/11 11:39:21 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/PushForwardInsertionCreator.cs
r6870 r6881 213 213 List<int> unroutedCustomers = new List<int>(); 214 214 for (int i = 1; i <= problemInstance.Cities.Value; i++) { 215 if (pdp == null || 216 (problemInstance.GetDemand(i) >= 0 || 217 pdp.GetPickupDeliveryLocation(i) <= 0)) 215 if (pdp == null || (problemInstance.GetDemand(i) >= 0)) 218 216 unroutedCustomers.Add(i); 219 217 } … … 271 269 272 270 tour.Stops.Add(currentCustomer); 273 if (pdp != null && pdp.GetPickupDeliveryLocation(currentCustomer) > 0) {271 if (pdp != null) { 274 272 tour.Stops.Add(pdp.GetPickupDeliveryLocation(currentCustomer)); 275 273 } … … 291 289 double tourCost = eval.Quality - originalCosts; 292 290 293 if (pdp != null && pdp.GetPickupDeliveryLocation(unrouted) > 0) {291 if (pdp != null) { 294 292 for (int j = i + 1; j <= tour.Stops.Count; j++) { 295 293 bool feasible; … … 326 324 if (indexOfMinimumCost != -1) { 327 325 tour.Stops.Insert(indexOfMinimumCost, customer); 328 if (pdp != null && pdp.GetPickupDeliveryLocation(customer) > 0) {326 if (pdp != null) { 329 327 tour.Stops.Insert(indexOfMinimumCost2, pdp.GetPickupDeliveryLocation(customer)); 330 328 } … … 349 347 350 348 tour.Stops.Add(currentCustomer); 351 if (pdp != null && pdp.GetPickupDeliveryLocation(currentCustomer) > 0) {349 if (pdp != null) { 352 350 tour.Stops.Add(pdp.GetPickupDeliveryLocation(currentCustomer)); 353 351 }
Note: See TracChangeset
for help on using the changeset viewer.