Changeset 8922
- Timestamp:
- 11/19/12 16:29:34 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPProblemInstance.cs
r8652 r8922 183 183 184 184 public virtual double GetDistance(int start, int end, IVRPEncoding solution) { 185 double distance = 0.0;186 185 if (distanceMatrix == null && UseDistanceMatrix.Value) { 187 if (DistanceMatrix != null) 188 distanceMatrix = DistanceMatrix; 189 else 190 distanceMatrix = DistanceMatrix = CreateDistanceMatrix(); 191 } 192 193 if (distanceMatrix != null) 194 distance = distanceMatrix[start, end]; 195 else 196 distance = CalculateDistance(start, end); 197 198 return distance; 186 if (DistanceMatrix == null) DistanceMatrix = CreateDistanceMatrix(); 187 distanceMatrix = DistanceMatrix; 188 } 189 190 if (distanceMatrix != null) return distanceMatrix[start, end]; 191 return CalculateDistance(start, end); 199 192 } 200 193
Note: See TracChangeset
for help on using the changeset viewer.