Changeset 3658 for trunk/sources/HeuristicLab.Algorithms.TabuSearch
- Timestamp:
- 05/05/10 23:27:50 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuNeighborhoodAnalyzer.cs
r3636 r3658 28 28 29 29 namespace HeuristicLab.Algorithms.TabuSearch { 30 public class TabuNeighborhoodAnalyzer : SingleSuccessorOperator, I PopulationAnalyzer {30 public class TabuNeighborhoodAnalyzer : SingleSuccessorOperator, IAnalyzer { 31 31 public SubScopesLookupParameter<BoolValue> IsTabuParameter { 32 32 get { return (SubScopesLookupParameter<BoolValue>)Parameters["IsTabu"]; } -
trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs
r3636 r3658 81 81 get { return (ValueParameter<IntValue>)Parameters["SampleSize"]; } 82 82 } 83 private ValueParameter<MultiAnalyzer <IPopulationAnalyzer>> MoveAnalyzerParameter {84 get { return (ValueParameter<MultiAnalyzer <IPopulationAnalyzer>>)Parameters["MoveAnalyzer"]; }85 } 86 private ValueParameter<MultiAnalyzer <ISolutionAnalyzer>> AnalyzerParameter {87 get { return (ValueParameter<MultiAnalyzer <ISolutionAnalyzer>>)Parameters["Analyzer"]; }83 private ValueParameter<MultiAnalyzer> MoveAnalyzerParameter { 84 get { return (ValueParameter<MultiAnalyzer>)Parameters["MoveAnalyzer"]; } 85 } 86 private ValueParameter<MultiAnalyzer> AnalyzerParameter { 87 get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; } 88 88 } 89 89 #endregion … … 126 126 set { MaximumIterationsParameter.Value = value; } 127 127 } 128 public MultiAnalyzer <IPopulationAnalyzer>MoveAnalyzer {128 public MultiAnalyzer MoveAnalyzer { 129 129 get { return MoveAnalyzerParameter.Value; } 130 130 set { MoveAnalyzerParameter.Value = value; } 131 131 } 132 public MultiAnalyzer <ISolutionAnalyzer>Analyzer {132 public MultiAnalyzer Analyzer { 133 133 get { return AnalyzerParameter.Value; } 134 134 set { AnalyzerParameter.Value = value; } … … 159 159 Parameters.Add(new ValueParameter<IntValue>("MaximumIterations", "The maximum number of generations which should be processed.", new IntValue(1000))); 160 160 Parameters.Add(new ValueParameter<IntValue>("SampleSize", "The neighborhood size for stochastic sampling move generators", new IntValue(100))); 161 Parameters.Add(new ValueParameter<MultiAnalyzer <IPopulationAnalyzer>>("MoveAnalyzer", "The operator used to analyze the moves.", new MultiAnalyzer<IPopulationAnalyzer>()));162 Parameters.Add(new ValueParameter<MultiAnalyzer <ISolutionAnalyzer>>("Analyzer", "The operator used to analyze the solution.", new MultiAnalyzer<ISolutionAnalyzer>()));161 Parameters.Add(new ValueParameter<MultiAnalyzer>("MoveAnalyzer", "The operator used to analyze the moves.", new MultiAnalyzer())); 162 Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze the solution.", new MultiAnalyzer())); 163 163 164 164 RandomCreator randomCreator = new RandomCreator(); … … 392 392 MoveAnalyzer.Operators.Add(tabuNeighborhoodAnalyzer); 393 393 if (Problem != null) { 394 foreach (I SolutionAnalyzer analyzer in Problem.Operators.OfType<ISolutionAnalyzer>().OrderBy(x => x.Name))394 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) 395 395 Analyzer.Operators.Add(analyzer); 396 396 }
Note: See TracChangeset
for help on using the changeset viewer.