Changeset 8493
- Timestamp:
- 08/16/12 12:57:09 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionProblem.cs
r8334 r8493 139 139 protected override void OnEvaluatorChanged() { 140 140 base.OnEvaluatorChanged(); 141 ParameterizeEvaluator(); 141 bool problemSizeChange = ProblemSize.Value < Evaluator.MinimumProblemSize 142 || ProblemSize.Value > Evaluator.MaximumProblemSize; 143 if (problemSizeChange) { 144 ProblemSize.Value = Math.Max(Evaluator.MinimumProblemSize, Math.Min(ProblemSize.Value, Evaluator.MaximumProblemSize)); 145 } else { 146 ParameterizeEvaluator(); 147 } 142 148 UpdateMoveEvaluators(); 143 149 ParameterizeAnalyzers(); 144 150 Maximization.Value = Evaluator.Maximization; 145 151 BoundsParameter.Value = Evaluator.Bounds; 146 if (ProblemSize.Value < Evaluator.MinimumProblemSize)147 ProblemSize.Value = Evaluator.MinimumProblemSize;148 else if (ProblemSize.Value > Evaluator.MaximumProblemSize)149 ProblemSize.Value = Evaluator.MaximumProblemSize;150 152 BestKnownQuality = new DoubleValue(Evaluator.BestKnownQuality); 151 153 Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged); … … 312 314 Evaluator.PointParameter.ActualName = SolutionCreator.RealVectorParameter.ActualName; 313 315 Evaluator.PointParameter.Hidden = true; 314 BestKnownSolutionParameter.Value = Evaluator.GetBestKnownSolution(ProblemSize.Value); 316 try { 317 BestKnownSolutionParameter.Value = Evaluator.GetBestKnownSolution(ProblemSize.Value); 318 } catch (ArgumentException e) { 319 ErrorHandling.ShowErrorDialog(e); 320 ProblemSize.Value = Evaluator.MinimumProblemSize; 321 } 315 322 } 316 323 private void ParameterizeOperators() {
Note: See TracChangeset
for help on using the changeset viewer.