Changeset 16692 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP
- Timestamp:
- 03/18/19 17:24:30 (6 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPEvaluator.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPProblemInstance.cs
r12488 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 110 110 111 111 private void AttachEventHandlers() { 112 CapacityParameter.ValueChanged += new EventHandler(CapacityParameter_ValueChanged); 113 OverloadPenaltyParameter.ValueChanged += new EventHandler(OverloadPenaltyParameter_ValueChanged); 114 OverloadPenaltyParameter.Value.ValueChanged += new EventHandler(OverloadPenalty_ValueChanged); 112 CapacityParameter.ValueChanged += CapacityParameter_ValueChanged; 113 Capacity.Reset += Capacity_Changed; 114 Capacity.ItemChanged += Capacity_Changed; 115 OverloadPenaltyParameter.ValueChanged += OverloadPenaltyParameter_ValueChanged; 116 OverloadPenalty.ValueChanged += OverloadPenalty_ValueChanged; 115 117 } 116 118 … … 123 125 #region Event handlers 124 126 void CapacityParameter_ValueChanged(object sender, EventArgs e) { 127 Capacity.Reset += Capacity_Changed; 128 Capacity.ItemChanged += Capacity_Changed; 129 EvalBestKnownSolution(); 130 } 131 private void Capacity_Changed(object sender, EventArgs e) { 125 132 EvalBestKnownSolution(); 126 133 } 127 134 void OverloadPenaltyParameter_ValueChanged(object sender, EventArgs e) { 128 OverloadPenalty Parameter.Value.ValueChanged += new EventHandler(OverloadPenalty_ValueChanged);135 OverloadPenalty.ValueChanged += OverloadPenalty_ValueChanged; 129 136 EvalBestKnownSolution(); 130 137 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPPDTW/MDCVRPPDTWEvaluator.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPPDTW/MDCVRPPDTWProblemInstance.cs
r12488 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 117 117 118 118 private void AttachEventHandlers() { 119 PickupDeliveryLocationParameter.ValueChanged += new EventHandler(PickupDeliveryLocationParameter_ValueChanged); 119 PickupDeliveryLocationParameter.ValueChanged += PickupDeliveryLocationParameter_ValueChanged; 120 PickupDeliveryLocation.Reset += PickupDeliveryLocation_Changed; 121 PickupDeliveryLocation.ItemChanged += PickupDeliveryLocation_Changed; 122 PickupViolationPenaltyParameter.ValueChanged += PickupViolationPenaltyParameter_ValueChanged; 123 PickupViolationPenalty.ValueChanged += PickupViolationPenalty_Changed; 120 124 } 121 125 … … 128 132 #region Event handlers 129 133 void PickupDeliveryLocationParameter_ValueChanged(object sender, EventArgs e) { 130 PickupDeliveryLocationParameter.Value.ItemChanged += new EventHandler<EventArgs<int>>(Value_ItemChanged); 134 PickupDeliveryLocation.Reset += PickupDeliveryLocation_Changed; 135 PickupDeliveryLocation.ItemChanged += PickupDeliveryLocation_Changed; 131 136 EvalBestKnownSolution(); 132 137 } 133 134 void Value_ItemChanged(object sender, EventArgs<int> e) { 138 private void PickupDeliveryLocation_Changed(object sender, EventArgs e) { 139 EvalBestKnownSolution(); 140 } 141 private void PickupViolationPenaltyParameter_ValueChanged(object sender, EventArgs e) { 142 PickupViolationPenalty.ValueChanged += PickupViolationPenalty_Changed; 143 EvalBestKnownSolution(); 144 } 145 private void PickupViolationPenalty_Changed(object sender, EventArgs e) { 135 146 EvalBestKnownSolution(); 136 147 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPTWEvaluator.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPTWProblemInstance.cs
r12488 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 136 136 137 137 private void AttachEventHandlers() { 138 TardinessPenaltyParameter.ValueChanged += new EventHandler(TardinessPenaltyParameter_ValueChanged); 139 TardinessPenaltyParameter.Value.ValueChanged += new EventHandler(TardinessPenalty_ValueChanged); 140 TimeFactorParameter.ValueChanged += new EventHandler(TimeFactorParameter_ValueChanged); 141 TimeFactorParameter.Value.ValueChanged += new EventHandler(TimeFactor_ValueChanged); 138 ReadyTimeParameter.ValueChanged += ReadyTimeParameter_ValueChanged; 139 ReadyTime.Reset += ReadyTime_Changed; 140 ReadyTime.ItemChanged += ReadyTime_Changed; 141 DueTimeParameter.ValueChanged += DueTimeParameter_ValueChanged; 142 DueTime.Reset += DueTime_Changed; 143 DueTime.ItemChanged += DueTime_Changed; 144 ServiceTimeParameter.ValueChanged += ServiceTimeParameter_ValueChanged; 145 ServiceTime.Reset += ServiceTime_Changed; 146 ServiceTime.ItemChanged += ServiceTime_Changed; 147 TardinessPenaltyParameter.ValueChanged += TardinessPenaltyParameter_ValueChanged; 148 TardinessPenalty.ValueChanged += TardinessPenalty_ValueChanged; 149 TimeFactorParameter.ValueChanged += TimeFactorParameter_ValueChanged; 150 TimeFactor.ValueChanged += TimeFactor_ValueChanged; 142 151 } 143 152 … … 149 158 150 159 #region Event handlers 151 void TardinessPenaltyParameter_ValueChanged(object sender, EventArgs e) { 152 TardinessPenaltyParameter.Value.ValueChanged += new EventHandler(TardinessPenalty_ValueChanged); 153 EvalBestKnownSolution(); 154 } 155 void TardinessPenalty_ValueChanged(object sender, EventArgs e) { 156 EvalBestKnownSolution(); 157 } 158 void TimeFactorParameter_ValueChanged(object sender, EventArgs e) { 159 TimeFactorParameter.Value.ValueChanged += new EventHandler(TimeFactor_ValueChanged); 160 EvalBestKnownSolution(); 161 } 162 void TimeFactor_ValueChanged(object sender, EventArgs e) { 160 private void ReadyTimeParameter_ValueChanged(object sender, EventArgs e) { 161 ReadyTime.Reset += ReadyTime_Changed; 162 ReadyTime.ItemChanged += ReadyTime_Changed; 163 EvalBestKnownSolution(); 164 } 165 private void ReadyTime_Changed(object sender, EventArgs e) { 166 EvalBestKnownSolution(); 167 } 168 private void DueTimeParameter_ValueChanged(object sender, EventArgs e) { 169 DueTime.Reset += DueTime_Changed; 170 DueTime.ItemChanged += DueTime_Changed; 171 EvalBestKnownSolution(); 172 } 173 private void DueTime_Changed(object sender, EventArgs e) { 174 EvalBestKnownSolution(); 175 } 176 private void ServiceTimeParameter_ValueChanged(object sender, EventArgs e) { 177 ServiceTime.Reset += ServiceTime_Changed; 178 ServiceTime.ItemChanged += ServiceTime_Changed; 179 EvalBestKnownSolution(); 180 } 181 private void ServiceTime_Changed(object sender, EventArgs e) { 182 EvalBestKnownSolution(); 183 } 184 private void TardinessPenaltyParameter_ValueChanged(object sender, EventArgs e) { 185 TardinessPenalty.ValueChanged += TardinessPenalty_ValueChanged; 186 EvalBestKnownSolution(); 187 } 188 private void TardinessPenalty_ValueChanged(object sender, EventArgs e) { 189 EvalBestKnownSolution(); 190 } 191 private void TimeFactorParameter_ValueChanged(object sender, EventArgs e) { 192 TimeFactor.ValueChanged += TimeFactor_ValueChanged; 193 EvalBestKnownSolution(); 194 } 195 private void TimeFactor_ValueChanged(object sender, EventArgs e) { 163 196 EvalBestKnownSolution(); 164 197 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MultiDepotVRPEvaluator.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MultiDepotVRPProblemInstance.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.Linq; … … 174 175 [StorableConstructor] 175 176 protected MultiDepotVRPProblemInstance(bool deserializing) : base(deserializing) { } 176 177 protected MultiDepotVRPProblemInstance(MultiDepotVRPProblemInstance original, Cloner cloner) 178 : base(original, cloner) { 179 AttachEventHandlers(); 180 } 177 181 public MultiDepotVRPProblemInstance() { 178 182 Parameters.Add(new ValueParameter<IntValue>("Depots", "The number of depots", new IntValue(0))); 179 183 Parameters.Add(new ValueParameter<IntArray>("VehicleDepotAssignment", "The assignment of vehicles to depots", new IntArray())); 184 AttachEventHandlers(); 180 185 } 181 186 … … 184 189 } 185 190 186 protected MultiDepotVRPProblemInstance(MultiDepotVRPProblemInstance original, Cloner cloner) 187 : base(original, cloner) { 188 } 191 [StorableHook(HookType.AfterDeserialization)] 192 private void AfterDeserialization() { 193 AttachEventHandlers(); 194 } 195 196 private void AttachEventHandlers() { 197 DepotsParameter.ValueChanged += DepotsParameter_ValueChanged; 198 Depots.ValueChanged += Depots_ValueChanged; 199 VehicleDepotAssignmentParameter.ValueChanged += VehicleDepotAssignmentParameter_ValueChanged; 200 VehicleDepotAssignment.Reset += VehicleDepotAssignment_Changed; 201 VehicleDepotAssignment.ItemChanged += VehicleDepotAssignment_Changed; 202 } 203 204 #region Event handlers 205 private void DepotsParameter_ValueChanged(object sender, EventArgs e) { 206 Depots.ValueChanged += Depots_ValueChanged; 207 EvalBestKnownSolution(); 208 } 209 private void Depots_ValueChanged(object sender, EventArgs e) { 210 EvalBestKnownSolution(); 211 } 212 private void VehicleDepotAssignmentParameter_ValueChanged(object sender, EventArgs e) { 213 VehicleDepotAssignment.Reset += VehicleDepotAssignment_Changed; 214 VehicleDepotAssignment.ItemChanged += VehicleDepotAssignment_Changed; 215 EvalBestKnownSolution(); 216 } 217 private void VehicleDepotAssignment_Changed(object sender, EventArgs e) { 218 EvalBestKnownSolution(); 219 } 220 #endregion 189 221 } 190 222 }
Note: See TracChangeset
for help on using the changeset viewer.