- Timestamp:
- 05/19/20 15:01:59 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/SingleObjectiveProblem.cs
r17522 r17546 62 62 if (Maximization == value) return; 63 63 MaximizationParameter.ForceValue(new BoolValue(value, @readonly: true)); 64 OnMaximizationChanged();65 64 } 66 65 } … … 74 73 MaximizationParameter = cloner.Clone(original.MaximizationParameter); 75 74 ParameterizeOperators(); 75 RegisterEventHandlers(); 76 76 } 77 77 78 78 protected SingleObjectiveProblem() : base() { 79 80 79 MaximizationParameter = new ValueParameter<BoolValue>("Maximization", "Whether the problem should be maximized (True) or minimized (False).", new BoolValue(false).AsReadOnly()) { Hidden = true, ReadOnly = true }; 81 80 BestKnownQualityParameter = new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this problem."); … … 92 91 93 92 ParameterizeOperators(); 93 RegisterEventHandlers(); 94 94 } 95 95 … … 106 106 107 107 ParameterizeOperators(); 108 RegisterEventHandlers(); 108 109 } 109 110 … … 111 112 private void AfterDeserialization() { 112 113 ParameterizeOperators(); 114 RegisterEventHandlers(); 113 115 } 114 116 … … 200 202 } 201 203 204 private void RegisterEventHandlers() { 205 BoolValueParameterChangeHandler.Create(MaximizationParameter, OnMaximizationChanged); 206 } 207 202 208 #region ISingleObjectiveHeuristicOptimizationProblem Members 203 209 IParameter ISingleObjectiveHeuristicOptimizationProblem.MaximizationParameter {
Note: See TracChangeset
for help on using the changeset viewer.