- Timestamp:
- 03/29/11 15:40:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPProblemInstance.cs
r5127 r5867 32 32 using HeuristicLab.PluginInfrastructure; 33 33 using HeuristicLab.Common; 34 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 34 35 35 36 namespace HeuristicLab.Problems.VehicleRouting.ProblemInstances { … … 39 40 public IValueParameter<IVRPEvaluator> EvaluatorParameter { 40 41 get { return (ValueParameter<IVRPEvaluator>)Parameters["Evaluator"]; } 42 } 43 44 IVRPEvaluator moveEvaluator; 45 46 public IVRPEvaluator MoveEvaluator { 47 get { 48 if (EvaluatorParameter.Value == null) 49 return null; 50 else { 51 if (moveEvaluator == null) { 52 moveEvaluator = EvaluatorParameter.Value.Clone() as IVRPEvaluator; 53 54 foreach (IParameter parameter in moveEvaluator.Parameters) { 55 if (parameter is ILookupParameter 56 && parameter != moveEvaluator.ProblemInstanceParameter 57 && parameter != moveEvaluator.VRPToursParameter) { 58 (parameter as ILookupParameter).ActualName = 59 VRPMoveEvaluator.MovePrefix + 60 (parameter as ILookupParameter).ActualName; 61 } 62 } 63 } 64 65 return moveEvaluator; 66 } 67 } 41 68 } 42 69 … … 253 280 254 281 private void AttachEventHandlers() { 282 EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged); 255 283 BestKnownSolutionParameter.ValueChanged += new EventHandler(BestKnownSolutionParameter_ValueChanged); 256 284 DistanceFactorParameter.ValueChanged += new EventHandler(DistanceFactorParameter_ValueChanged); … … 268 296 269 297 #region Event handlers 298 void EvaluatorParameter_ValueChanged(object sender, EventArgs e) { 299 moveEvaluator = null; 300 } 301 270 302 void BestKnownSolutionParameter_ValueChanged(object sender, EventArgs e) { 271 303 EvalBestKnownSolution();
Note: See TracChangeset
for help on using the changeset viewer.