Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/12/15 21:49:06 (10 years ago)
Author:
mkommend
Message:

#2282: Fixed maximization flag and solution creators for binary problems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs

    r11984 r11996  
    2626using HeuristicLab.Common.Resources;
    2727using HeuristicLab.Core;
     28using HeuristicLab.Data;
    2829using HeuristicLab.Optimization;
    2930using HeuristicLab.Parameters;
     
    7677
    7778    private void OnProblemDefinitionChanged() {
     79      if (Parameters.ContainsKey("Maximization")) Parameters.Remove("Maximization");
     80      Parameters.Add(new FixedValueParameter<BoolValue>("Maximization", "Set to false if the problem should be minimized.", (BoolValue)new BoolValue(Maximization).AsReadOnly()) { Hidden = true });
     81
    7882      Encoding = ProblemDefinition.Encoding;
     83      OnOperatorsChanged();
     84      OnReset();
    7985    }
    8086
Note: See TracChangeset for help on using the changeset viewer.