Changeset 12002


Ignore:
Timestamp:
02/13/15 13:21:00 (7 years ago)
Author:
abeham
Message:

#2174:

  • Reopened maximization parameter in ExternalEvaluationProblem
  • Added hidden flag to maximization parameter in multi-objective programmable problem
Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.ExternalEvaluation/3.4/ExternalEvaluationProblem.cs

    r11961 r12002  
    8585    public ExternalEvaluationProblem()
    8686      : base() {
     87      Parameters.Remove("Maximization"); // readonly in base class
     88      Parameters.Add(new FixedValueParameter<BoolValue>("Maximization", "Set to false if the problem should be minimized.", new BoolValue()));
    8789      Parameters.Add(new OptionalValueParameter<EvaluationCache>("Cache", "Cache of previously evaluated solutions."));
    8890      Parameters.Add(new ValueParameter<CheckedItemCollection<IEvaluationServiceClient>>("Clients", "The clients that are used to communicate with the external application.", new CheckedItemCollection<IEvaluationServiceClient>() { new EvaluationServiceClient() }));
  • trunk/sources/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProgrammableProblem.cs

    r11998 r12002  
    7474
    7575    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 });
    7878
    7979      Encoding = ProblemDefinition.Encoding;
     
    8383
    8484    public override bool[] Maximization {
    85       get { return Parameters.ContainsKey("ProblemScript") ? ProblemDefinition.Maximization : new []{false}; }
     85      get { return Parameters.ContainsKey("ProblemScript") ? ProblemDefinition.Maximization : new[] { false }; }
    8686    }
    8787
  • trunk/sources/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs

    r11998 r12002  
    7777
    7878    private void OnProblemDefinitionChanged() {
    79       if (Parameters.ContainsKey("Maximization")) Parameters.Remove("Maximization");
     79      Parameters.Remove("Maximization");
    8080      Parameters.Add(new FixedValueParameter<BoolValue>("Maximization", "Set to false if the problem should be minimized.", (BoolValue)new BoolValue(Maximization).AsReadOnly()) { Hidden = true });
    8181
Note: See TracChangeset for help on using the changeset viewer.