Changeset 3671
- Timestamp:
- 05/06/10 14:07:21 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 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 } -
trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs
r3662 r3671 402 402 Analyzer.Operators.Add(qualityAnalyzer); 403 403 if (Problem != null) { 404 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) 404 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) { 405 foreach (IScopeTreeLookupParameter param in analyzer.Parameters.OfType<IScopeTreeLookupParameter>()) 406 param.Depth = 0; 405 407 Analyzer.Operators.Add(analyzer); 408 } 406 409 } 407 410 } -
trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs
r3662 r3671 392 392 MoveAnalyzer.Operators.Add(tabuNeighborhoodAnalyzer); 393 393 if (Problem != null) { 394 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) 394 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) { 395 foreach (IScopeTreeLookupParameter param in analyzer.Parameters.OfType<IScopeTreeLookupParameter>()) 396 param.Depth = 0; 395 397 Analyzer.Operators.Add(analyzer); 398 } 396 399 } 397 400 }
Note: See TracChangeset
for help on using the changeset viewer.