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.ScatterSearch/3.3/ScatterSearch.cs

    r17226 r17695  
    2222using System;
    2323using System.Linq;
     24using HEAL.Attic;
    2425using HeuristicLab.Analysis;
    2526using HeuristicLab.Common;
     
    3031using HeuristicLab.Optimization.Operators;
    3132using HeuristicLab.Parameters;
    32 using HEAL.Attic;
    3333using HeuristicLab.Random;
    3434using HeuristicLab.Selection;
     
    283283    #region Events
    284284    protected override void OnProblemChanged() {
    285       ParameterizeStochasticOperator(Problem.SolutionCreator);
     285      ParameterizeStochasticOperator(SolutionCreator);
    286286      ParameterizeStochasticOperator(Problem.Evaluator);
    287287      foreach (IOperator op in Problem.Operators.OfType<IOperator>()) ParameterizeStochasticOperator(op);
     
    298298      base.OnProblemChanged();
    299299    }
    300     protected override void Problem_SolutionCreatorChanged(object sender, EventArgs e) {
    301       ParameterizeStochasticOperator(Problem.SolutionCreator);
     300    protected override void SolutionCreatorOnChanged() {
     301      ParameterizeStochasticOperator(SolutionCreator);
    302302      ParameterizeSolutionsCreator();
    303       base.Problem_SolutionCreatorChanged(sender, e);
     303      base.SolutionCreatorOnChanged();
    304304    }
    305305    protected override void Problem_EvaluatorChanged(object sender, EventArgs e) {
     
    431431    private void ParameterizeSolutionsCreator() {
    432432      SolutionsCreator.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
    433       SolutionsCreator.SolutionCreatorParameter.ActualName = Problem.SolutionCreatorParameter.Name;
     433      SolutionsCreator.SolutionCreatorParameter.ActualName = SolutionCreatorParameter.Name;
    434434    }
    435435    private void ParameterizeMainLoop() {
Note: See TracChangeset for help on using the changeset viewer.