Changeset 11088 for trunk/sources/HeuristicLab.Algorithms.TabuSearch
- Timestamp:
- 07/04/14 17:32:52 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs
r9456 r11088 352 352 if (Problem != null) { 353 353 foreach (IMoveGenerator generator in Problem.Operators.OfType<IMoveGenerator>().OrderBy(x => x.Name)) { 354 MoveGeneratorParameter.ValidValues.Add(generator); 354 var moveTypes = generator.GetType().GetInterfaces().Where(x => typeof(IMoveOperator).IsAssignableFrom(x)).ToList(); 355 foreach (var type in moveTypes.ToList()) { 356 if (moveTypes.Any(t => t != type && type.IsAssignableFrom(t))) moveTypes.Remove(type); 357 } 358 if (Problem.Operators.OfType<ITabuChecker>().Any(op => moveTypes.Any(m => m.IsInstanceOfType(op))) 359 && Problem.Operators.OfType<ITabuMaker>().Any(op => moveTypes.Any(m => m.IsInstanceOfType(op)))) 360 MoveGeneratorParameter.ValidValues.Add(generator); 355 361 } 356 362 }
Note: See TracChangeset
for help on using the changeset viewer.