Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/12/15 16:32:37 (9 years ago)
Author:
mkommend
Message:

#2282: Added best known quality parameter to single-objective basic problem and new one-max problem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization/3.3/BasicProblems/SingleObjectiveBasicProblem.cs

    r11970 r11990  
    3333    ISingleObjectiveProblemDefinition, ISingleObjectiveHeuristicOptimizationProblem
    3434  where TEncoding : class, IEncoding {
     35
     36    protected IValueParameter<DoubleValue> BestKnownQualityParameter {
     37      get { return (IValueParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
     38    }
     39
     40    public double BestKnownQuality {
     41      get {
     42        if (BestKnownQualityParameter.Value == null) return double.NaN;
     43        return BestKnownQualityParameter.Value.Value;
     44      }
     45      set {
     46        if (BestKnownQualityParameter.Value == null) BestKnownQualityParameter.Value = new DoubleValue(value);
     47        else BestKnownQualityParameter.Value.Value = value;
     48      }
     49    }
     50
    3551    [StorableConstructor]
    3652    protected SingleObjectiveBasicProblem(bool deserializing) : base(deserializing) { }
Note: See TracChangeset for help on using the changeset viewer.