Changeset 3671 for trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs
- Timestamp:
- 05/06/10 14:07:21 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs
r3662 r3671 205 205 } 206 206 private BestAverageWorstQualityAnalyzer islandQualityAnalyzer; 207 //private MultipopulationBestAverageWorstQualityAnalyzer qualityAnalyzer;207 private BestAverageWorstQualityAnalyzer qualityAnalyzer; 208 208 #endregion 209 209 … … 399 399 private void InitializeAnalyzers() { 400 400 islandQualityAnalyzer = new BestAverageWorstQualityAnalyzer(); 401 //qualityAnalyzer = new MultipopulationBestAverageWorstQualityAnalyzer();401 qualityAnalyzer = new BestAverageWorstQualityAnalyzer(); 402 402 ParameterizeAnalyzers(); 403 403 } … … 438 438 private void ParameterizeAnalyzers() { 439 439 islandQualityAnalyzer.ResultsParameter.ActualName = "Results"; 440 //qualityAnalyzer.ResultsParameter.ActualName = "Results"; 440 foreach (IScopeTreeLookupParameter param in ((IAnalyzer)islandQualityAnalyzer).Parameters.OfType<IScopeTreeLookupParameter>()) 441 param.Depth = 1; 442 qualityAnalyzer.ResultsParameter.ActualName = "Results"; 443 foreach (IScopeTreeLookupParameter param in ((IAnalyzer)qualityAnalyzer).Parameters.OfType<IScopeTreeLookupParameter>()) 444 param.Depth = 2; 441 445 if (Problem != null) { 442 446 islandQualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 443 447 islandQualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 444 448 islandQualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name; 449 qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 450 qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 451 qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name; 445 452 } 446 453 } … … 511 518 Analyzer.Operators.Clear(); 512 519 IslandAnalyzer.Operators.Add(islandQualityAnalyzer); 513 //Analyzer.Operators.Add(qualityAnalyzer);520 Analyzer.Operators.Add(qualityAnalyzer); 514 521 if (Problem != null) { 522 /*foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) { 523 foreach (IScopeTreeLookupParameter param in analyzer.Parameters.OfType<IScopeTreeLookupParameter>()) 524 param.Depth = 1; 525 IslandAnalyzer.Operators.Add(analyzer); 526 }*/ 515 527 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) { 516 IslandAnalyzer.Operators.Add(analyzer); 528 foreach (IScopeTreeLookupParameter param in analyzer.Parameters.OfType<IScopeTreeLookupParameter>()) 529 param.Depth = 2; 530 Analyzer.Operators.Add(analyzer); 517 531 } 518 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name))519 Analyzer.Operators.Add(analyzer);520 532 } 521 533 }
Note: See TracChangeset
for help on using the changeset viewer.