- Timestamp:
- 02/24/12 09:25:32 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
r7259 r7511 598 598 private void UpdateCrossovers() { 599 599 ICrossover oldCrossover = CrossoverParameter.Value; 600 ICrossover defaultCrossover = Problem.Operators.OfType<ICrossover>().FirstOrDefault(); 600 601 CrossoverParameter.ValidValues.Clear(); 601 602 foreach (ICrossover crossover in Problem.Operators.OfType<ICrossover>().OrderBy(x => x.Name)) … … 604 605 ICrossover crossover = CrossoverParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldCrossover.GetType()); 605 606 if (crossover != null) CrossoverParameter.Value = crossover; 606 } 607 else oldCrossover = null; 608 } 609 if (oldCrossover == null && defaultCrossover != null) 610 CrossoverParameter.Value = defaultCrossover; 607 611 } 608 612 private void UpdateMutators() {
Note: See TracChangeset
for help on using the changeset viewer.