Changeset 7791 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange
- Timestamp:
- 05/10/12 15:31:22 (12 years ago)
- 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/PotvinPDExchangeMoveTabuCriterion.cs
r6857 r7791 140 140 quality += attribute.Tardiness * vrptw.TardinessPenalty.Value; 141 141 142 IPickupAndDeliveryProblemInstance pdp = instance as IPickupAndDeliveryProblemInstance; 143 if (pdp != null) 144 quality += attribute.PickupViolations * pdp.PickupViolationPenalty.Value; 145 142 146 if (!useAspiration || moveQuality >= quality) { 143 147 if ((attribute.City == move.City && attribute.Tour == move.Tour) || -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveTabuMaker.cs
r6773 r7791 73 73 get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; } 74 74 } 75 public ILookupParameter<IntValue> PickupViolationsParameter { 76 get { return (ILookupParameter<IntValue>)Parameters["PickupViolations"]; } 77 } 75 78 76 79 [StorableConstructor] … … 92 95 Parameters.Add(new LookupParameter<DoubleValue>("Overload", "The overload of the individual")); 93 96 Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness of the individual")); 97 Parameters.Add(new LookupParameter<IntValue>("PickupViolations", "The number of pickup violations.")); 94 98 } 95 99 … … 128 132 tardiness = TardinessParameter.ActualValue.Value; 129 133 130 tabuList.Add(new PotvinPDRelocateMoveAttribute(baseQuality, move.OldTour, move.City, distance, overload, tardiness)); 131 tabuList.Add(new PotvinPDRelocateMoveAttribute(baseQuality, move.Tour, move.Replaced, distance, overload, tardiness)); 134 int pickupViolations = 0; 135 if (PickupViolationsParameter.ActualValue != null) 136 pickupViolations = PickupViolationsParameter.ActualValue.Value; 137 138 tabuList.Add(new PotvinPDRelocateMoveAttribute(baseQuality, move.OldTour, move.City, distance, overload, tardiness, pickupViolations)); 139 tabuList.Add(new PotvinPDRelocateMoveAttribute(baseQuality, move.Tour, move.Replaced, distance, overload, tardiness, pickupViolations)); 132 140 return base.Apply(); 133 141 }
Note: See TracChangeset
for help on using the changeset viewer.