Changeset 13365 for branches/ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs
- Timestamp:
- 11/24/15 16:43:32 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemRefactoring/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs
r13350 r13365 73 73 : base() { 74 74 Parameters.Add(new FixedValueParameter<SingleObjectiveProblemDefinitionScript<TEncoding, TSolution>>("ProblemScript", "Defines the problem.", 75 new SingleObjectiveProblemDefinitionScript<TEncoding, TSolution>() { Name = Name, Encoding = Encoding })); 75 new SingleObjectiveProblemDefinitionScript<TEncoding, TSolution>() { Name = Name })); 76 ProblemScript.Encoding = Encoding = (TEncoding)Encoding.Clone(); 76 77 Operators.Add(new BestScopeSolutionAnalyzer()); 77 78 RegisterEvents(); … … 90 91 Parameters.Remove("Maximization"); 91 92 Parameters.Add(new FixedValueParameter<BoolValue>("Maximization", "Set to false if the problem should be minimized.", (BoolValue)new BoolValue(Maximization).AsReadOnly()) { Hidden = true }); 93 var multiEnc = ProblemScript.Encoding as MultiEncoding; 94 if (multiEnc != null) multiEnc.Clear(); 92 95 ProblemScript.Initialize(); 96 Encoding = (TEncoding)ProblemScript.Encoding.Clone(); 93 97 94 98 OnOperatorsChanged();
Note: See TracChangeset
for help on using the changeset viewer.