Changeset 7958 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPProblemInstance.cs
- Timestamp:
- 06/05/12 08:34:36 (12 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4 merged: 7923,7934
- Property svn:mergeinfo changed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPProblemInstance.cs
r7852 r7958 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using System.Text; 25 using HeuristicLab.Common; 26 using HeuristicLab.Core; 27 using HeuristicLab.Data; 28 using HeuristicLab.Parameters; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 26 31 using HeuristicLab.Problems.VehicleRouting.Interfaces; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;28 using HeuristicLab.Core;29 using HeuristicLab.Parameters;30 using HeuristicLab.Data;31 using HeuristicLab.Optimization;32 using HeuristicLab.PluginInfrastructure;33 using HeuristicLab.Common;34 using HeuristicLab.Problems.VehicleRouting.Encodings.General;35 32 36 33 namespace HeuristicLab.Problems.VehicleRouting.ProblemInstances { … … 72 69 } 73 70 } 74 71 75 72 protected ValueParameter<DoubleMatrix> CoordinatesParameter { 76 73 get { return (ValueParameter<DoubleMatrix>)Parameters["Coordinates"]; } … … 174 171 175 172 public IVRPEvaluator SolutionEvaluator { 176 get { 173 get { 177 174 return evaluator; 178 175 } … … 187 184 if (distanceMatrix != null) 188 185 distance = distanceMatrix[start, end]; 189 else 186 else 190 187 distance = CalculateDistance(start, end); 191 188 … … 199 196 startDistance = GetDistance(start, customer, solution); 200 197 endDistance = GetDistance(customer, end, solution); 201 198 202 199 double newDistance = startDistance + endDistance; 203 200 … … 244 241 protected abstract IVRPEvaluator Evaluator { get; } 245 242 protected abstract IVRPCreator Creator { get; } 246 243 247 244 [StorableConstructor] 248 245 protected VRPProblemInstance(bool deserializing) : base(deserializing) { } … … 265 262 protected VRPProblemInstance(VRPProblemInstance original, Cloner cloner) 266 263 : base(original, cloner) { 267 evaluator = Evaluator; 264 evaluator = Evaluator; 268 265 AttachEventHandlers(); 269 266 } 270 267 271 268 [StorableHook(HookType.AfterDeserialization)] 272 private void AfterDeserialization Hook() {269 private void AfterDeserialization() { 273 270 evaluator = Evaluator; 274 271 AttachEventHandlers();
Note: See TracChangeset
for help on using the changeset viewer.