Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/19/20 19:07:40 (4 years ago)
Author:
fbaching
Message:

#1837: merged changes from trunk

  • apply changes from Attic release to all SlidingWindow specific code files (replace StorableClass with StorableType)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1837_Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs

    r9456 r17687  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2424using HeuristicLab.Core;
    2525using HeuristicLab.Data;
     26using HeuristicLab.Optimization;
    2627using HeuristicLab.Parameters;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HEAL.Attic;
    2829
    2930namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
    30   [Item("Symbolic Regression Problem (multi objective)", "Represents a multi objective symbolic regression problem.")]
    31   [StorableClass]
    32   [Creatable("Problems")]
     31  [Item("Symbolic Regression Problem (multi-objective)", "Represents a multi objective symbolic regression problem.")]
     32  [StorableType("4A8D3658-66B3-48B4-B983-D46409045DBE")]
     33  [Creatable(CreatableAttribute.Categories.GeneticProgrammingProblems, Priority = 110)]
    3334  public class SymbolicRegressionMultiObjectiveProblem : SymbolicDataAnalysisMultiObjectiveProblem<IRegressionProblemData, ISymbolicRegressionMultiObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, IRegressionProblem {
    3435    private const double PunishmentFactor = 10;
     
    5253
    5354    [StorableConstructor]
    54     protected SymbolicRegressionMultiObjectiveProblem(bool deserializing) : base(deserializing) { }
     55    protected SymbolicRegressionMultiObjectiveProblem(StorableConstructorFlag _) : base(_) { }
    5556    protected SymbolicRegressionMultiObjectiveProblem(SymbolicRegressionMultiObjectiveProblem original, Cloner cloner)
    5657      : base(original, cloner) {
     
    9394      Operators.Add(new SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer());
    9495      Operators.Add(new SymbolicRegressionMultiObjectiveValidationBestSolutionAnalyzer());
     96      Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator());
     97      Operators.Add(new SymbolicRegressionPhenotypicDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreePhenotypicSimilarityCalculator>()));
    9598      ParameterizeOperators();
    9699    }
     
    122125        }
    123126      }
     127
     128      foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) {
     129        op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
     130        op.QualityVariableName = Evaluator.QualitiesParameter.ActualName;
     131
     132        if (op is SymbolicExpressionTreePhenotypicSimilarityCalculator) {
     133          var phenotypicSimilarityCalculator = (SymbolicExpressionTreePhenotypicSimilarityCalculator)op;
     134          phenotypicSimilarityCalculator.ProblemData = ProblemData;
     135          phenotypicSimilarityCalculator.Interpreter = SymbolicExpressionTreeInterpreter;
     136        }
     137      }
    124138    }
    125139  }
Note: See TracChangeset for help on using the changeset viewer.