- Timestamp:
- 10/02/12 18:59:15 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/SimilarityCalculators/VRPSimilarityCalculator.cs
r8346 r8720 92 92 93 93 public override double CalculateSolutionSimilarity(IScope leftSolution, IScope rightSolution) { 94 var sol1 = leftSolution.Variables[SolutionVariableName].Value as PotvinEncoding;95 var sol2 = rightSolution.Variables[SolutionVariableName].Value as PotvinEncoding;94 var sol1 = leftSolution.Variables[SolutionVariableName].Value as IVRPEncoding; 95 var sol2 = rightSolution.Variables[SolutionVariableName].Value as IVRPEncoding; 96 96 97 return CalculateSimilarity(sol1, sol2); 97 var potvinSol1 = sol1 is PotvinEncoding ? sol1 as PotvinEncoding : PotvinEncoding.ConvertFrom(sol1, ProblemInstance); 98 var potvinSol2 = sol2 is PotvinEncoding ? sol2 as PotvinEncoding : PotvinEncoding.ConvertFrom(sol2, ProblemInstance); 99 100 return CalculateSimilarity(potvinSol1, potvinSol2); 98 101 } 99 102 }
Note: See TracChangeset
for help on using the changeset viewer.