Changeset 8304 for branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/SimilarityCalculators/VRPSimilarityCalculator.cs
- Timestamp:
- 07/19/12 13:19:12 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/SimilarityCalculators/VRPSimilarityCalculator.cs
r8303 r8304 46 46 if (left == null || right == null) 47 47 throw new ArgumentException("Cannot calculate similarity because one of the provided solutions or both are null."); 48 if (left == right) return 1.0; 48 49 49 50 // extract edges from first solution … … 77 78 } 78 79 79 p rotected override double CalculateSimilarity(IScope left, IScope right) {80 PotvinEncodingsol1 = left.Variables[Target].Value as PotvinEncoding;81 PotvinEncodingsol2 = right.Variables[Target].Value as PotvinEncoding;80 public override double CalculateIndividualSimilarity(IScope left, IScope right) { 81 var sol1 = left.Variables[Target].Value as PotvinEncoding; 82 var sol2 = right.Variables[Target].Value as PotvinEncoding; 82 83 83 84 return CalculateSimilarity(sol1, sol2);
Note: See TracChangeset
for help on using the changeset viewer.