Changeset 7864 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPTWProblemInstance.cs
- Timestamp:
- 05/22/12 09:38:54 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPTWProblemInstance.cs
r6854 r7864 72 72 } 73 73 74 [Storable] 75 private DoubleValue currentTardinessPenalty; 74 protected IValueParameter<DoubleValue> CurrentTardinessPenaltyParameter { 75 get { return (IValueParameter<DoubleValue>)Parameters["CurrentTardinessPenalty"]; } 76 } 76 77 77 78 public DoubleValue TardinessPenalty { 78 79 get { 80 DoubleValue currentTardinessPenalty = CurrentTardinessPenaltyParameter.Value; 79 81 if (currentTardinessPenalty != null) 80 82 return currentTardinessPenalty; … … 82 84 return TardinessPenaltyParameter.Value; 83 85 } 84 set { currentTardinessPenalty= value; }86 set { CurrentTardinessPenaltyParameter.Value = value; } 85 87 } 86 88 … … 112 114 Parameters.Add(new ValueParameter<DoubleValue>("EvalTimeFactor", "The time factor considered in the evaluation.", new DoubleValue(0))); 113 115 Parameters.Add(new ValueParameter<DoubleValue>("EvalTardinessPenalty", "The tardiness penalty considered in the evaluation.", new DoubleValue(100))); 116 Parameters.Add(new OptionalValueParameter<DoubleValue>("CurrentTardinessPenalty", "The current tardiness penalty considered in the evaluation.")); 114 117 115 118 AttachEventHandlers(); … … 122 125 protected MDCVRPTWProblemInstance(MDCVRPTWProblemInstance original, Cloner cloner) 123 126 : base(original, cloner) { 124 currentTardinessPenalty = cloner.Clone(original.currentTardinessPenalty) as DoubleValue;125 126 127 AttachEventHandlers(); 127 128 } … … 142 143 base.InitializeState(); 143 144 144 currentTardinessPenalty= null;145 CurrentTardinessPenaltyParameter.Value = null; 145 146 } 146 147
Note: See TracChangeset
for help on using the changeset viewer.