Changeset 6711 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW
- Timestamp:
- 09/06/11 14:57:26 (13 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPPDTW/CVRPPDTWProblemInstance.cs
r6710 r6711 50 50 } 51 51 52 [Storable] 53 private DoubleValue currentPickupViolationPenalty; 54 52 55 public DoubleValue PickupViolationPenalty { 53 get { return PickupViolationPenaltyParameter.Value; } 54 set { PickupViolationPenaltyParameter.Value = value; } 56 get { 57 if (currentPickupViolationPenalty != null) 58 return currentPickupViolationPenalty; 59 else 60 return PickupViolationPenaltyParameter.Value; 61 } 62 set { currentPickupViolationPenalty = value; } 55 63 } 56 64 … … 90 98 protected CVRPPDTWProblemInstance(CVRPPDTWProblemInstance original, Cloner cloner) 91 99 : base(original, cloner) { 100 currentPickupViolationPenalty = cloner.Clone(original.currentPickupViolationPenalty) as DoubleValue; 101 92 102 AttachEventHandlers(); 93 103 } … … 100 110 private void AttachEventHandlers() { 101 111 PickupDeliveryLocationParameter.ValueChanged += new EventHandler(PickupDeliveryLocationParameter_ValueChanged); 112 } 113 114 public override void InitializeState() { 115 base.InitializeState(); 116 117 currentPickupViolationPenalty = null; 102 118 } 103 119 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWProblemInstance.cs
r6710 r6711 71 71 set { TimeFactorParameter.Value = value; } 72 72 } 73 74 [Storable] 75 private DoubleValue currentTardinessPenalty; 76 73 77 public DoubleValue TardinessPenalty { 74 get { return TardinessPenaltyParameter.Value; } 75 set { TardinessPenaltyParameter.Value = value; } 78 get { 79 if (currentTardinessPenalty != null) 80 return currentTardinessPenalty; 81 else 82 return TardinessPenaltyParameter.Value; 83 } 84 set { currentTardinessPenalty = value; } 76 85 } 77 86 … … 113 122 protected CVRPTWProblemInstance(CVRPTWProblemInstance original, Cloner cloner) 114 123 : base(original, cloner) { 124 currentTardinessPenalty = cloner.Clone(original.currentTardinessPenalty) as DoubleValue; 125 115 126 AttachEventHandlers(); 116 127 } … … 126 137 TimeFactorParameter.ValueChanged += new EventHandler(TimeFactorParameter_ValueChanged); 127 138 TimeFactorParameter.Value.ValueChanged += new EventHandler(TimeFactor_ValueChanged); 139 } 140 141 public override void InitializeState() { 142 base.InitializeState(); 143 144 currentTardinessPenalty = null; 128 145 } 129 146
Note: See TracChangeset
for help on using the changeset viewer.