Changeset 7615 for branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
- Timestamp:
- 03/15/12 09:11:17 (13 years ago)
- Location:
- branches/HeuristicLab.TimeSeries
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
r7268 r7615 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.