Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/28/20 14:41:43 (4 years ago)
Author:
abeham
Message:

#2521: work in progress

Location:
branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Encoding.cs

    r17226 r17567  
    116116
    117117    public void ConfigureOperator(IItem @operator) { ConfigureOperators(new[] { @operator }); }
    118     public abstract void ConfigureOperators(IEnumerable<IItem> operators);
     118    public virtual void ConfigureOperators(IEnumerable<IItem> operators) {
     119      ConfigureSingleObjectiveImprovementOperators(operators.OfType<ISingleObjectiveImprovementOperator>());
     120    }
     121
     122    protected virtual void ConfigureSingleObjectiveImprovementOperators(IEnumerable<ISingleObjectiveImprovementOperator> operators) {
     123      foreach (var op in operators) {
     124        op.SolutionParameter.ActualName = Name;
     125      }
     126    }
    119127
    120128    public event EventHandler SolutionCreatorChanged;
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/MultiObjectiveProblem.cs

    r17320 r17567  
    9595      protected set {
    9696        if (MaximizationParameter.Value.SequenceEqual(value)) return;
    97         MaximizationParameter.ForceValue(new BoolArray(value, @readonly: true));
     97        MaximizationParameter.Value = new BoolArray(value, @readonly: true);
    9898        OnMaximizationChanged();
    9999      }
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/SingleObjectiveProblem.cs

    r17546 r17567  
    6161      protected set {
    6262        if (Maximization == value) return;
    63         MaximizationParameter.ForceValue(new BoolValue(value, @readonly: true));
     63        MaximizationParameter.Value = new BoolValue(value, @readonly: true);
    6464      }
    6565    }
Note: See TracChangeset for help on using the changeset viewer.