Changeset 4860 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW
- Timestamp:
- 11/19/10 15:43:21 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWProblemInstance.cs
r4752 r4860 103 103 Parameters.Add(new ValueParameter<DoubleValue>("EvalTimeFactor", "The time factor considered in the evaluation.", new DoubleValue(0))); 104 104 Parameters.Add(new ValueParameter<DoubleValue>("EvalTardinessPenalty", "The tardiness penalty considered in the evaluation.", new DoubleValue(100))); 105 106 AttachEventHandlers(); 105 107 } 106 108 … … 111 113 protected CVRPTWProblemInstance(CVRPTWProblemInstance original, Cloner cloner) 112 114 : base(original, cloner) { 115 AttachEventHandlers(); 113 116 } 117 118 [StorableHook(HookType.AfterDeserialization)] 119 private void AfterDeserializationHook() { 120 AttachEventHandlers(); 121 } 122 123 private void AttachEventHandlers() { 124 TardinessPenaltyParameter.ValueChanged += new EventHandler(TardinessPenaltyParameter_ValueChanged); 125 TardinessPenaltyParameter.Value.ValueChanged += new EventHandler(TardinessPenalty_ValueChanged); 126 TimeFactorParameter.ValueChanged += new EventHandler(TimeFactorParameter_ValueChanged); 127 TimeFactorParameter.Value.ValueChanged += new EventHandler(TimeFactor_ValueChanged); 128 } 129 130 #region Event handlers 131 void TardinessPenaltyParameter_ValueChanged(object sender, EventArgs e) { 132 TardinessPenaltyParameter.Value.ValueChanged += new EventHandler(TardinessPenalty_ValueChanged); 133 EvalBestKnownSolution(); 134 } 135 void TardinessPenalty_ValueChanged(object sender, EventArgs e) { 136 EvalBestKnownSolution(); 137 } 138 void TimeFactorParameter_ValueChanged(object sender, EventArgs e) { 139 TimeFactorParameter.Value.ValueChanged += new EventHandler(TimeFactor_ValueChanged); 140 EvalBestKnownSolution(); 141 } 142 void TimeFactor_ValueChanged(object sender, EventArgs e) { 143 EvalBestKnownSolution(); 144 } 145 #endregion 114 146 } 115 147 }
Note: See TracChangeset
for help on using the changeset viewer.