Changeset 3187 for trunk/sources/HeuristicLab.Algorithms.LocalSearch
- Timestamp:
- 03/22/10 22:58:43 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs
r3145 r3187 65 65 get { return (ValueParameter<IntValue>)Parameters["MaximumIterations"]; } 66 66 } 67 private ValueParameter<IntValue> SampleSizeParameter { 68 get { return (ValueParameter<IntValue>)Parameters["SampleSize"]; } 69 } 67 70 #endregion 68 71 … … 91 94 get { return MaximumIterationsParameter.Value; } 92 95 set { MaximumIterationsParameter.Value = value; } 96 } 97 public IntValue SampleSize { 98 get { return SampleSizeParameter.Value; } 99 set { SampleSizeParameter.Value = value; } 93 100 } 94 101 private RandomCreator RandomCreator { … … 113 120 Parameters.Add(new ConstrainedValueParameter<ISingleObjectiveMoveEvaluator>("MoveEvaluator", "The operator used to evaluate a move.")); 114 121 Parameters.Add(new ValueParameter<IntValue>("MaximumIterations", "The maximum number of generations which should be processed.", new IntValue(1000))); 122 Parameters.Add(new ValueParameter<IntValue>("SampleSize", "Number of moves that MultiMoveGenerators should create. This is ignored for Exhaustive- and SingleMoveGenerators.", new IntValue(100))); 115 123 116 124 RandomCreator randomCreator = new RandomCreator(); … … 158 166 ParameterizeMoveMakers(); 159 167 UpdateMoveGenerator(); 168 UpdateMoveParameters(); 160 169 Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged); 161 170 base.OnProblemChanged(); … … 189 198 op.MoveQualityParameter.ActualNameChanged += new EventHandler(MoveEvaluator_MoveQualityParameter_ActualNameChanged); 190 199 } 191 IMoveGenerator oldMoveGenerator = MoveGenerator;192 200 UpdateMoveGenerator(); 193 if (oldMoveGenerator == MoveGenerator) // in this case MoveGeneratorParameter_ValueChanged did not fire 194 UpdateMoveParameters(); 201 UpdateMoveParameters(); 195 202 ParameterizeMainLoop(); 196 203 ParameterizeMoveEvaluators();
Note: See TracChangeset
for help on using the changeset viewer.