Changeset 8053 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveMaker.cs
- Timestamp:
- 06/19/12 13:17:29 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveMaker.cs
r7852 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 23 using HeuristicLab.Common; 24 using HeuristicLab.Core; 25 using HeuristicLab.Data; 26 using HeuristicLab.Optimization; 27 using HeuristicLab.Parameters; 26 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Core;28 using HeuristicLab.Optimization;29 using HeuristicLab.Data;30 using HeuristicLab.Parameters;31 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 32 using HeuristicLab.Common;33 30 34 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General { … … 65 62 IVRPEvaluator evaluator = ProblemInstance.SolutionEvaluator; 66 63 ICollection<IParameter> addedParameters = new List<IParameter>(); 67 64 68 65 try { 69 66 foreach (IParameter parameter in evaluator.Parameters) { 70 if (parameter is ILookupParameter 71 && parameter != evaluator.VRPToursParameter 67 if (parameter is ILookupParameter 68 && parameter != evaluator.VRPToursParameter 72 69 && parameter != evaluator.ProblemInstanceParameter) { 73 70 ILookupParameter evaluatorParameter = parameter as ILookupParameter; 74 71 75 72 string resultName = evaluatorParameter.ActualName; 76 73 if (!this.Parameters.ContainsKey(resultName)) { … … 84 81 if (!this.Parameters.ContainsKey(moveResultName)) { 85 82 ILookupParameter moveResultParameter = new LookupParameter<IItem>(moveResultName); 86 moveResultParameter.ExecutionContext = ExecutionContext; 83 moveResultParameter.ExecutionContext = ExecutionContext; 87 84 this.Parameters.Add(moveResultParameter); 88 85 addedParameters.Add(moveResultParameter); … … 96 93 } 97 94 finally { 98 foreach (IParameter parameter in addedParameters) {95 foreach (IParameter parameter in addedParameters) { 99 96 this.Parameters.Remove(parameter); 100 97 } … … 105 102 PerformMove(); 106 103 UpdateMoveEvaluation(); 107 104 108 105 return base.Apply(); 109 106 }
Note: See TracChangeset
for help on using the changeset viewer.