Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/23/20 16:21:55 (4 years ago)
Author:
abeham
Message:

#2521:

  • Moving solution creator parameter from problems to algorithms (breaking wiring in some HeuristicOptimizationProblems)
  • Disallowing evaluator or encoding changes in encoding-specific base problems (to avoid confusion in derived problems whether this needs to be handled or not)
  • Added private set to ReferenceParameter property (serialization)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Algorithms.RandomSearch/3.3/RandomSearchAlgorithm.cs

    r17226 r17695  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HEAL.Attic;
    2526using HeuristicLab.Analysis;
    2627using HeuristicLab.Common;
     
    3132using HeuristicLab.Optimization.Operators;
    3233using HeuristicLab.Parameters;
    33 using HEAL.Attic;
    3434using HeuristicLab.Random;
    3535
     
    236236    protected override void OnProblemChanged() {
    237237      base.OnProblemChanged();
    238       ParameterizeStochasticOperator(Problem.SolutionCreator);
     238      ParameterizeStochasticOperator(SolutionCreator);
    239239      foreach (var @operator in Problem.Operators.OfType<IOperator>())
    240240        ParameterizeStochasticOperator(@operator);
     
    268268    }
    269269
    270     protected override void Problem_SolutionCreatorChanged(object sender, EventArgs e) {
    271       base.Problem_SolutionCreatorChanged(sender, e);
    272       ParameterizeStochasticOperator(Problem.SolutionCreator);
     270    protected override void SolutionCreatorOnChanged() {
     271      base.SolutionCreatorOnChanged();
     272      ParameterizeStochasticOperator(SolutionCreator);
    273273
    274274      if (SingleObjectiveProblem != null)
     
    316316    private void ParameterizeSolutionsCreator() {
    317317      SolutionsCreator.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
    318       SolutionsCreator.SolutionCreatorParameter.ActualName = Problem.SolutionCreatorParameter.Name;
     318      SolutionsCreator.SolutionCreatorParameter.ActualName = SolutionCreatorParameter.Name;
    319319    }
    320320    private void ParameterizeAnalyzers() {
Note: See TracChangeset for help on using the changeset viewer.