Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/29/11 15:51:56 (13 years ago)
Author:
svonolfe
Message:

Added support for multi depot CVRP instances (#1177)

Location:
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange
Files:
2 edited

Legend:

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

    r6773 r6851  
    6262            if (k != i) {
    6363              int city1 = individual.Tours[i].Stops[j];
    64               if (pdp == null || pdp.Demand[city1] >= 0) {
     64              if (pdp == null || pdp.GetDemand(city1) >= 0) {
    6565                for (int l = 0; l < individual.Tours[k].Stops.Count; l++) {
    6666                  int city2 = individual.Tours[k].Stops[l];
    67                   if (pdp == null || pdp.Demand[city2] >= 0) {
     67                  if (pdp == null || pdp.GetDemand(city2) >= 0) {
    6868                    bool valid = pdp == null ||
    6969                      (pdp.PickupDeliveryLocation[city2] != pdp.PickupDeliveryLocation[city1] &&
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeSingleMoveGenerator.cs

    r6773 r6851  
    6262      IPickupAndDeliveryProblemInstance pdp = problemInstance as IPickupAndDeliveryProblemInstance;
    6363      for (int i = 1; i <= individual.Cities; i++) {
    64         if (pdp == null || pdp.Demand[i] >= 0)
     64        if (pdp == null || pdp.GetDemand(i) >= 0)
    6565          cities.Add(i);
    6666      }
     
    8484        foreach (int stop in newTour.Stops) {
    8585          if (pdp == null ||
    86             (pdp.Demand[stop] >= 0 &&
     86            (pdp.GetDemand(stop) >= 0 &&
    8787             pdp.PickupDeliveryLocation[stop] != pdp.PickupDeliveryLocation[city] &&
    8888             pdp.PickupDeliveryLocation[stop] != city &&
Note: See TracChangeset for help on using the changeset viewer.