Changeset 7669 for branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators
- Timestamp:
- 03/28/12 15:47:26 (12 years ago)
- Location:
- branches/HeuristicLab.Hive.Azure
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure
- Property svn:ignore
-
old new 3 3 *.resharper 4 4 *.suo 5 *.user 5 6 *.vsp 6 7 Doxygen 8 FxCopResults.txt 7 9 Google.ProtocolBuffers-0.9.1.dll 8 10 HeuristicLab 3.3.5.1.ReSharper.user
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.TravelingSalesman/3.3/MoveEvaluators/TSPPathMoveEvaluator.cs
r7270 r7669 20 20 #endregion 21 21 22 using System; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; … … 78 79 DistanceMatrix distanceMatrix = DistanceMatrixParameter.ActualValue; 79 80 if (distanceMatrix == null) { 81 if (coordinates == null) throw new InvalidOperationException("Neither a distance matrix nor coordinates were given."); 80 82 distanceMatrix = CalculateDistanceMatrix(coordinates); 81 83 DistanceMatrixParameter.ActualValue = distanceMatrix; 82 84 } 83 85 relativeQualityDifference = EvaluateByDistanceMatrix(permutation, distanceMatrix); 84 } else relativeQualityDifference = EvaluateByCoordinates(permutation, coordinates); 86 } else { 87 if (coordinates == null) throw new InvalidOperationException("No coordinates were given."); 88 relativeQualityDifference = EvaluateByCoordinates(permutation, coordinates); 89 } 85 90 DoubleValue moveQuality = MoveQualityParameter.ActualValue; 86 91 if (moveQuality == null) MoveQualityParameter.ActualValue = new DoubleValue(QualityParameter.ActualValue.Value + relativeQualityDifference);
Note: See TracChangeset
for help on using the changeset viewer.