Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/30/11 13:51:01 (13 years ago)
Author:
svonolfe
Message:

Added support for the multi depot pickup and delivery problem with time windows (#1177)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveMaker.cs

    r6773 r6856  
    6868
    6969      if (problemInstance is IPickupAndDeliveryProblemInstance) {
    70         IntArray pickupLocation =
    71           (problemInstance as IPickupAndDeliveryProblemInstance).PickupDeliveryLocation;
     70        IPickupAndDeliveryProblemInstance pdp = problemInstance as IPickupAndDeliveryProblemInstance;
    7271
    73         int location = pickupLocation[move.City];
     72        int location = pdp.GetPickupDeliveryLocation(move.City);
    7473        Tour oldTour2 = solution.Tours.Find(t => t.Stops.Contains(location));
    7574        oldTour2.Stops.Remove(location);
    7675
    77         location = pickupLocation[move.Replaced];
     76        location = pdp.GetPickupDeliveryLocation(move.Replaced);
    7877        oldTour2 = solution.Tours.Find(t => t.Stops.Contains(location));
    7978
     
    8180        tour.Stops.Remove(move.Replaced);
    8281
    83         PotvinPDRearrangeMoveMaker.InsertPair(solution, tour, move.City, pickupLocation[move.City], problemInstance);
    84         PotvinPDRearrangeMoveMaker.InsertPair(solution, oldTour, move.Replaced, pickupLocation[move.Replaced], problemInstance);
     82        PotvinPDRearrangeMoveMaker.InsertPair(solution, tour, move.City, pdp.GetPickupDeliveryLocation(move.City), problemInstance);
     83        PotvinPDRearrangeMoveMaker.InsertPair(solution, oldTour, move.Replaced, pdp.GetPickupDeliveryLocation(move.Replaced), problemInstance);
    8584      } else {
    8685        tour.Stops.Remove(move.Replaced);
Note: See TracChangeset for help on using the changeset viewer.