Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/16/15 09:41:09 (10 years ago)
Author:
mkommend
Message:

#2174: Corrected maximization in programmable problem base classes.

Location:
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/MultiObjectiveProgrammableProblem.cs

    r11767 r11780  
    2424using HeuristicLab.Common;
    2525using HeuristicLab.Core;
     26using HeuristicLab.Data;
    2627using HeuristicLab.Optimization;
     28using HeuristicLab.Parameters;
    2729using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2830
    2931namespace HeuristicLab.Problems.Programmable {
    3032  [StorableClass]
    31   public abstract class MultiObjectiveProgrammableProblem<TEncoding> : ProgrammableProblem<TEncoding, MultiObjectiveEvaluator>, IMultiObjectiveProblemDefinition
     33  public abstract class MultiObjectiveProgrammableProblem<TEncoding> : ProgrammableProblem<TEncoding, MultiObjectiveEvaluator>, IMultiObjectiveHeuristicOptimizationProblem, IMultiObjectiveProblemDefinition
    3234  where TEncoding : class, IEncoding {
    3335    [StorableConstructor]
     
    4143    protected MultiObjectiveProgrammableProblem()
    4244      : base() {
     45        Parameters.Add(new ValueParameter<BoolArray>("Maximization", "Set to false if the problem should be minimized.", new BoolArray(Maximization)));
    4346
    4447      Operators.Add(Evaluator);
     
    7275    }
    7376
     77
     78    #region IMultiObjectiveHeuristicOptimizationProblem Members
     79    IParameter IMultiObjectiveHeuristicOptimizationProblem.MaximizationParameter {
     80      get { return Parameters["Maximization"]; }
     81    }
     82    IMultiObjectiveEvaluator IMultiObjectiveHeuristicOptimizationProblem.Evaluator {
     83      get { return Evaluator; }
     84    }
     85    #endregion
    7486  }
    7587}
  • branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/SingleObjectiveProgrammableProblem.cs

    r11753 r11780  
    4444    protected SingleObjectiveProgrammableProblem()
    4545      : base() {
    46       Parameters.Add(new FixedValueParameter<BoolValue>("Maximization", "Set to false if the problem should be minimized.", new BoolValue()));
     46      Parameters.Add(new FixedValueParameter<BoolValue>("Maximization", "Set to false if the problem should be minimized.", new BoolValue(Maximization)));
    4747      Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this problem."));
    4848
Note: See TracChangeset for help on using the changeset viewer.