- Timestamp:
- 03/23/12 11:03:20 (13 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Common/3.3/TypeEqualityComparer.cs
r7626 r7658 31 31 int IEqualityComparer<T>.GetHashCode(T obj) { 32 32 if (obj == null) return 0; 33 return obj.Get HashCode();33 return obj.GetType().GetHashCode(); 34 34 } 35 35 } -
trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs
r7626 r7658 226 226 Operators.Add(new TSPPopulationDiversityAnalyzer()); 227 227 ParameterizeAnalyzers(); 228 var defaultOperators = new HashSet<IPermutationOperator>(new IPermutationOperator[] {228 var operators = new HashSet<IPermutationOperator>(new IPermutationOperator[] { 229 229 new OrderCrossover2(), 230 230 new InversionManipulator(), 231 231 new StochasticInversionMultiMoveGenerator() 232 }); 233 Operators.AddRange(defaultOperators); 234 Operators.AddRange(ApplicationManager.Manager.GetInstances<IPermutationOperator>().Except(defaultOperators, new TypeEqualityComparer<IPermutationOperator>())); 232 }, new TypeEqualityComparer<IPermutationOperator>()); 233 foreach (var op in ApplicationManager.Manager.GetInstances<IPermutationOperator>()) 234 operators.Add(op); 235 Operators.AddRange(operators); 235 236 ParameterizeOperators(); 236 237 UpdateMoveEvaluators(); … … 399 400 try { 400 401 EvaluateAndLoadTour(data.BestKnownTour); 401 } catch (InvalidOperationException) { 402 } 403 catch (InvalidOperationException) { 402 404 if (data.BestKnownQuality.HasValue) 403 405 BestKnownQuality = new DoubleValue(data.BestKnownQuality.Value);
Note: See TracChangeset
for help on using the changeset viewer.