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.Problems.GrammaticalEvolution/3.4/SymbolicRegression/GESymbolicDataAnalysisProblem.cs

    r17520 r17695  
    2626using System.Drawing;
    2727using System.Linq;
     28using HEAL.Attic;
    2829using HeuristicLab.Common;
    2930using HeuristicLab.Common.Resources;
     
    3435using HeuristicLab.Optimization;
    3536using HeuristicLab.Parameters;
    36 using HEAL.Attic;
    3737using HeuristicLab.PluginInfrastructure;
    3838using HeuristicLab.Problems.DataAnalysis;
     
    4343namespace HeuristicLab.Problems.GrammaticalEvolution {
    4444  [StorableType("E31AC1E8-590D-4D65-883F-3113544B6C91")]
    45   public abstract class GESymbolicDataAnalysisProblem<T, U, V> : HeuristicOptimizationProblem<U, V>, IDataAnalysisProblem<T>,
     45  public abstract class GESymbolicDataAnalysisProblem<T, U> : HeuristicOptimizationProblem<U>, IDataAnalysisProblem<T>,
    4646                                                                 IGESymbolicDataAnalysisProblem, IStorableContent,
    4747                                                                 IProblemInstanceConsumer<T>, IProblemInstanceExporter<T>
    4848    where T : class, IDataAnalysisProblemData
    49     where U : class, IGESymbolicDataAnalysisEvaluator<T>
    50     where V : class, IIntegerVectorCreator {
     49    where U : class, IGESymbolicDataAnalysisEvaluator<T> {
    5150
    5251    #region parameter names & descriptions
     
    152151      RegisterEventHandlers();
    153152    }
    154     protected GESymbolicDataAnalysisProblem(GESymbolicDataAnalysisProblem<T, U, V> original, Cloner cloner)
     153    protected GESymbolicDataAnalysisProblem(GESymbolicDataAnalysisProblem<T, U> original, Cloner cloner)
    155154      : base(original, cloner) {
    156155      RegisterEventHandlers();
    157156    }
    158157
    159     protected GESymbolicDataAnalysisProblem(T problemData, U evaluator, V solutionCreator)
    160       : base(evaluator, solutionCreator) {
     158    protected GESymbolicDataAnalysisProblem(T problemData, U evaluator)
     159      : base(evaluator) {
    161160      Parameters.Add(new ValueParameter<T>(ProblemDataParameterName, ProblemDataParameterDescription, problemData));
    162161      Parameters.Add(new ValueParameter<ISymbolicDataAnalysisGrammar>(SymbolicExpressionTreeGrammarParameterName, SymbolicExpressionTreeGrammarParameterDescription));
     
    267266        op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
    268267        op.ApplyLinearScalingParameter.ActualName = ApplyLinearScalingParameter.Name;
    269         op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.Name;
     268        //op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.Name;
    270269        op.GenotypeToPhenotypeMapperParameter.ActualName = GenotypeToPhenotypeMapperParameter.Name;
    271270        op.SymbolicExpressionTreeGrammarParameter.ActualName = SymbolicExpressionTreeGrammarParameter.Name;
    272271      }
    273272      foreach (var op in operators.OfType<IIntegerVectorCrossover>()) {
    274         op.ParentsParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
    275         op.ChildParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
     273        //op.ParentsParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
     274        //op.ChildParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
    276275      }
    277276      foreach (var op in operators.OfType<IIntegerVectorManipulator>()) {
    278         op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
     277        //op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
    279278      }
    280279      foreach (var op in operators.OfType<IIntegerVectorCreator>()) {
Note: See TracChangeset for help on using the changeset viewer.