Ignore:
Timestamp:
05/10/12 15:31:22 (7 years ago)
Author:
svonolfe
Message:

Improved PDP moves (#1177)

File:
1 edited

Legend:

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

    r6773 r7791  
    5454      get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; }
    5555    }
     56    public ILookupParameter<IntValue> PickupViolationsParameter {
     57      get { return (ILookupParameter<IntValue>)Parameters["PickupViolations"]; }
     58    }
    5659
    5760    [StorableConstructor]
     
    6770        Parameters.Add(new LookupParameter<DoubleValue>("Overload", "The overload of the individual"));
    6871        Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness of the individual"));
     72        Parameters.Add(new LookupParameter<IntValue>("PickupViolations", "The number of pickup violations."));
    6973    }
    7074
     
    8993      if (TardinessParameter.ActualValue != null)
    9094        tardiness = TardinessParameter.ActualValue.Value;
     95
     96      int pickupViolations = 0;
     97      if (PickupViolationsParameter.ActualValue != null)
     98        pickupViolations = PickupViolationsParameter.ActualValue.Value;
    9199     
    92       return new PotvinPDRelocateMoveAttribute(baseQuality, move.OldTour, move.City, distance, overload, tardiness);
     100      return new PotvinPDRelocateMoveAttribute(baseQuality, move.OldTour, move.City, distance, overload, tardiness, pickupViolations);
    93101    }
    94102  }
Note: See TracChangeset for help on using the changeset viewer.