Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/30/14 01:41:54 (10 years ago)
Author:
bburlacu
Message:

#1772: Worked towards integrating the new graph api with the tracking operators.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs

    r11232 r11233  
    235235      Operators.Add(new SingleObjectivePopulationDiversityAnalyzer());
    236236      Operators.Add(new BottomUpSimilarityCalculator());
     237      Operators.Add(new SymbolicDataAnalysisGenealogyAnalyzer());
    237238      ParameterizeOperators();
    238239    }
     
    361362        op.SimilarityCalculator = operators.OfType<BottomUpSimilarityCalculator>().SingleOrDefault();
    362363      }
     364      // add tracking analyzer
     365      foreach (var op in operators.OfType<SymbolicDataAnalysisGenealogyAnalyzer>()) {
     366        op.BeforeCrossoverOperatorParameter.ActualValue = new SymbolicDataAnalysisExpressionBeforeCrossoverOperator();
     367        op.AfterCrossoverOperatorParameter.ActualValue = new SymbolicDataAnalysisExpressionAfterCrossoverOperator();
     368        op.BeforeManipulatorOperatorParameter.ActualValue = new SymbolicDataAnalysisExpressionBeforeManipulatorOperator();
     369        op.AfterManipulatorOperatorParameter.ActualValue = new SymbolicDataAnalysisExpressionAfterManipulatorOperator();
     370        // get crossover parameter names
     371        var crossover = operators.OfType<ISymbolicExpressionTreeCrossover>().FirstOrDefault();
     372        if (crossover != null) {
     373          op.BeforeCrossoverOperator.ParentsParameter.ActualName = crossover.ParentsParameter.Name;
     374          op.AfterCrossoverOperator.ParentsParameter.ActualName = crossover.ParentsParameter.Name;
     375          op.BeforeCrossoverOperator.ChildParameter.ActualName = crossover.ChildParameter.Name;
     376          op.AfterCrossoverOperator.ChildParameter.ActualName = crossover.ChildParameter.Name;
     377        }
     378        // get manipulator parameter names
     379        var manipulator = operators.OfType<ISymbolicExpressionTreeManipulator>().FirstOrDefault();
     380        if (manipulator != null) {
     381          op.BeforeManipulatorOperator.ChildParameter.ActualName = manipulator.SymbolicExpressionTreeParameter.Name;
     382          op.AfterManipulatorOperator.ChildParameter.ActualName = manipulator.SymbolicExpressionTreeParameter.Name;
     383        }
     384        var creator = operators.OfType<ISymbolicExpressionTreeCreator>().FirstOrDefault();
     385        if (creator != null) {
     386          op.PopulationParameter.ActualName = creator.SymbolicExpressionTreeParameter.ActualName;
     387        }
     388      }
    363389    }
    364390
Note: See TracChangeset for help on using the changeset viewer.