Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/16/14 16:37:56 (11 years ago)
Author:
bburlacu
Message:

#1772: Small changes to the GenealogyGraph. Added generic Fragment class and interface. Added the SymbolicDataAnalysisPopulationDiversityAnalyzer. Added specialized tracking operators for symbolic data analysis. Merged trunk changes.

Location:
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic
Files:
2 edited

Legend:

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

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

    r10293 r10347  
    2828using HeuristicLab.Data;
    2929using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     30using HeuristicLab.EvolutionTracking;
    3031using HeuristicLab.Optimization;
    3132using HeuristicLab.Parameters;
     
    355356      // add tracking analyzer
    356357      foreach (var op in operators.OfType<SymbolicDataAnalysisGenealogyAnalyzer>()) {
     358        //        op.BeforeCrossoverOperator = new SymbolicDataAnalysExpressionBeforeCrossoverOperator();
     359        //        op.AfterCrossoverOperator = new SymbolicDataAnalysExpressionAfterCrossoverOperator();
     360        op.BeforeCrossoverOperator = new BeforeCrossoverOperator<ISymbolicExpressionTree>();
     361        op.AfterCrossoverOperator = new AfterCrossoverOperator<ISymbolicExpressionTree>();
     362        op.BeforeManipulatorOperator = new BeforeManipulatorOperator<ISymbolicExpressionTree>();
     363        op.AfterManipulatorOperator = new AfterManipulatorOperator<ISymbolicExpressionTree>();
    357364        // get crossover parameter names
    358         var crossover = operators.OfType<ISymbolicExpressionTreeCrossover>().First();
    359         op.CrossoverParentsParameterName = crossover.ParentsParameter.Name;
    360         op.CrossoverChildParameterName = crossover.ChildParameter.Name;
     365        var crossover = operators.OfType<ISymbolicExpressionTreeCrossover>().FirstOrDefault();
     366        if (crossover != null) {
     367          op.CrossoverParentsParameterName = crossover.ParentsParameter.Name;
     368          op.CrossoverChildParameterName = crossover.ChildParameter.Name;
     369        }
    361370        // get munipulator parameter names
    362         var manipulator = operators.OfType<ISymbolicExpressionTreeManipulator>().First();
    363         op.ManipulatorChildParameterName = manipulator.SymbolicExpressionTreeParameter.Name;
     371        var manipulator = operators.OfType<ISymbolicExpressionTreeManipulator>().FirstOrDefault();
     372        if (manipulator != null) {
     373          op.ManipulatorChildParameterName = manipulator.SymbolicExpressionTreeParameter.Name;
     374        }
    364375      }
    365376    }
Note: See TracChangeset for help on using the changeset viewer.