Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6839


Ignore:
Timestamp:
09/27/11 13:42:56 (13 years ago)
Author:
svonolfe
Message:

Fixed issue in PFIH (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/PushForwardInsertionCreator.cs

    r6838 r6839  
    152152      Tour tour = new Tour();
    153153      result.Tours.Add(tour);
     154
    154155      tour.Stops.Add(unroutedList[0]);
     156
     157      if (pdp != null) {
     158        tour.Stops.Add(pdp.PickupDeliveryLocation[unroutedList[0]]);
     159      }
     160
    155161      unroutedList.RemoveAt(0);
    156162
     
    196202        if (indexOfMinimumCost != -1) {
    197203          tour.Stops.Insert(indexOfMinimumCost, unroutedList[indexOfCustomer]);
    198 
    199204          if (pdp != null) {
    200205            tour.Stops.Insert(indexOfMinimumCost2, pdp.PickupDeliveryLocation[unroutedList[indexOfCustomer]]);
     
    202207
    203208          unroutedList.RemoveAt(indexOfCustomer);
    204           costList.RemoveAt(indexOfCustomer);
    205209        } else { // no feasible customer found
    206210          tour = new Tour();
    207211          result.Tours.Add(tour);
     212
    208213          tour.Stops.Add(unroutedList[0]);
     214          if (pdp != null) {
     215            tour.Stops.Add(pdp.PickupDeliveryLocation[unroutedList[0]]);
     216          }
     217
    209218          unroutedList.RemoveAt(0);
    210219        }
Note: See TracChangeset for help on using the changeset viewer.