Changeset 11996 for trunk/sources/HeuristicLab.Optimization/3.3/BasicProblems/SingleObjectiveBasicProblem.cs
- Timestamp:
- 02/12/15 21:49:06 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization/3.3/BasicProblems/SingleObjectiveBasicProblem.cs
r11990 r11996 59 59 protected SingleObjectiveBasicProblem() 60 60 : base() { 61 Parameters.Add(new FixedValueParameter<BoolValue>("Maximization", "Set to false if the problem should be minimized.", new BoolValue()));61 Parameters.Add(new FixedValueParameter<BoolValue>("Maximization", "Set to false if the problem should be minimized.", (BoolValue)new BoolValue(Maximization).AsReadOnly()) { Hidden = true }); 62 62 Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this problem.")); 63 63 … … 82 82 public virtual IEnumerable<Individual> GetNeighbors(Individual individual, IRandom random) { 83 83 return Enumerable.Empty<Individual>(); 84 }85 86 87 protected override void OnEncodingChanged() {88 base.OnEncodingChanged();89 var max = (BoolValue)Parameters["Maximization"].ActualValue;90 max.Value = Maximization;91 84 } 92 85
Note: See TracChangeset
for help on using the changeset viewer.