Changeset 3626 for trunk/sources/HeuristicLab.Algorithms.LocalSearch
- Timestamp:
- 05/05/10 11:34:35 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs
r3621 r3626 72 72 get { return (ValueParameter<IntValue>)Parameters["SampleSize"]; } 73 73 } 74 private ValueParameter<MultiAnalyzer > MoveAnalyzerParameter {75 get { return (ValueParameter<MultiAnalyzer >)Parameters["MoveAnalyzer"]; }76 } 77 private ValueParameter<MultiAnalyzer > AnalyzerParameter {78 get { return (ValueParameter<MultiAnalyzer >)Parameters["Analyzer"]; }74 private ValueParameter<MultiAnalyzer<IPopulationAnalyzer>> MoveAnalyzerParameter { 75 get { return (ValueParameter<MultiAnalyzer<IPopulationAnalyzer>>)Parameters["MoveAnalyzer"]; } 76 } 77 private ValueParameter<MultiAnalyzer<ISolutionAnalyzer>> AnalyzerParameter { 78 get { return (ValueParameter<MultiAnalyzer<ISolutionAnalyzer>>)Parameters["Analyzer"]; } 79 79 } 80 80 #endregion … … 109 109 set { SampleSizeParameter.Value = value; } 110 110 } 111 public MultiAnalyzer MoveAnalyzer {111 public MultiAnalyzer<IPopulationAnalyzer> MoveAnalyzer { 112 112 get { return MoveAnalyzerParameter.Value; } 113 113 set { MoveAnalyzerParameter.Value = value; } 114 114 } 115 public MultiAnalyzer Analyzer {115 public MultiAnalyzer<ISolutionAnalyzer> Analyzer { 116 116 get { return AnalyzerParameter.Value; } 117 117 set { AnalyzerParameter.Value = value; } … … 126 126 get { return (LocalSearchMainLoop)SolutionsCreator.Successor; } 127 127 } 128 private BestAverageWorstQualityAnalyzer moveQualityAnalyzer;128 private PopulationBestAverageWorstQualityAnalyzer moveQualityAnalyzer; 129 129 #endregion 130 130 … … 140 140 Parameters.Add(new ValueParameter<IntValue>("MaximumIterations", "The maximum number of generations which should be processed.", new IntValue(1000))); 141 141 Parameters.Add(new ValueParameter<IntValue>("SampleSize", "Number of moves that MultiMoveGenerators should create. This is ignored for Exhaustive- and SingleMoveGenerators.", new IntValue(100))); 142 Parameters.Add(new ValueParameter<MultiAnalyzer >("MoveAnalyzer", "The operator used to analyze the moves in each iteration.", new MultiAnalyzer()));143 Parameters.Add(new ValueParameter<MultiAnalyzer >("Analyzer", "The operator used to analyze each iteration.", new MultiAnalyzer()));142 Parameters.Add(new ValueParameter<MultiAnalyzer<IPopulationAnalyzer>>("MoveAnalyzer", "The operator used to analyze the moves in each iteration.", new MultiAnalyzer<IPopulationAnalyzer>())); 143 Parameters.Add(new ValueParameter<MultiAnalyzer<ISolutionAnalyzer>>("Analyzer", "The operator used to analyze each iteration.", new MultiAnalyzer<ISolutionAnalyzer>())); 144 144 145 145 RandomCreator randomCreator = new RandomCreator(); … … 268 268 } 269 269 private void InitializeAnalyzers() { 270 moveQualityAnalyzer = new BestAverageWorstQualityAnalyzer();270 moveQualityAnalyzer = new PopulationBestAverageWorstQualityAnalyzer(); 271 271 ParameterizeAnalyzers(); 272 272 } … … 317 317 MoveAnalyzer.Operators.Clear(); 318 318 MoveAnalyzer.Operators.Add(moveQualityAnalyzer); 319 /*if (Problem != null) {319 if (Problem != null) { 320 320 foreach (ISolutionAnalyzer analyzer in Problem.Operators.OfType<ISolutionAnalyzer>().OrderBy(x => x.Name)) 321 321 Analyzer.Operators.Add(analyzer); 322 } */322 } 323 323 } 324 324 private void ClearMoveParameters() {
Note: See TracChangeset
for help on using the changeset viewer.