Changeset 12002 for trunk/sources/HeuristicLab.Problems.Programmable
- Timestamp:
- 02/13/15 13:21:00 (10 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.Programmable/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProgrammableProblem.cs
r11998 r12002 74 74 75 75 private void OnProblemDefinitionChanged() { 76 if (Parameters.ContainsKey("Maximization"))Parameters.Remove("Maximization");77 Parameters.Add(new ValueParameter<BoolArray>("Maximization", "Set to false if the problem should be minimized.", (BoolArray)new BoolArray(Maximization).AsReadOnly()) );76 Parameters.Remove("Maximization"); 77 Parameters.Add(new ValueParameter<BoolArray>("Maximization", "Set to false if the problem should be minimized.", (BoolArray)new BoolArray(Maximization).AsReadOnly()) { Hidden = true }); 78 78 79 79 Encoding = ProblemDefinition.Encoding; … … 83 83 84 84 public override bool[] Maximization { 85 get { return Parameters.ContainsKey("ProblemScript") ? ProblemDefinition.Maximization : new []{false}; }85 get { return Parameters.ContainsKey("ProblemScript") ? ProblemDefinition.Maximization : new[] { false }; } 86 86 } 87 87 -
trunk/sources/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs
r11998 r12002 77 77 78 78 private void OnProblemDefinitionChanged() { 79 if (Parameters.ContainsKey("Maximization"))Parameters.Remove("Maximization");79 Parameters.Remove("Maximization"); 80 80 Parameters.Add(new FixedValueParameter<BoolValue>("Maximization", "Set to false if the problem should be minimized.", (BoolValue)new BoolValue(Maximization).AsReadOnly()) { Hidden = true }); 81 81
Note: See TracChangeset
for help on using the changeset viewer.