Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10830


Ignore:
Timestamp:
05/09/14 15:11:16 (11 years ago)
Author:
bburlacu
Message:

#1772: Fixed persistence errors in the GenealogyAnalyzer and the instrumented operators, tweaked display code in the GenealogyGraphChart.

Location:
branches/HeuristicLab.EvolutionTracking
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphChart.cs

    r10827 r10830  
    5353
    5454    private void Clear() {
    55       if (nodeMap == null)
    56         nodeMap = new Dictionary<IGenealogyGraphNode, VisualGenealogyGraphNode>();
    57       else nodeMap.Clear();
    58 
    59       if (arcMap == null)
    60         arcMap = new Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc>();
    61       else arcMap.Clear();
     55      nodeMap = new Dictionary<IGenealogyGraphNode, VisualGenealogyGraphNode>();
     56      arcMap = new Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc>();
    6257
    6358      Chart.Group.Clear();
     
    118113        foreach (var node in nodes) {
    119114          var brush = new SolidBrush(node.GetColor());
    120 
    121115          var visualNode = new VisualGenealogyGraphNode(Chart, x, y, x + diameter, y + diameter, defaultPen, brush) {
    122116            Data = node,
     
    145139          var pen = Pens.Transparent;
    146140          var visualArc = AddArc(Chart, visualParent, visualNode, pen);
    147           if (!arcMap.ContainsKey(Tuple.Create(visualParent, visualNode)))
     141          if (!arcMap.ContainsKey(Tuple.Create(visualParent, visualNode))) {
    148142            arcMap.Add(Tuple.Create(visualParent, visualNode), visualArc);
     143          }
    149144        }
    150145      }
     
    233228      brush.Color = node.Data.GetColor();
    234229      var arcs = arcSelector(node);
     230      var pen = new Pen(Color.Transparent);
    235231      foreach (var arc in arcs) {
    236232        var source = arc.Source.Data;
     
    238234        var start = new Point((int)arc.Start.X, (int)arc.Start.Y);
    239235        var end = new Point((int)arc.End.X, (int)arc.End.Y);
    240         arc.Pen = new Pen(Color.Transparent);
     236        arc.Pen = pen;
    241237        arc.Pen.Brush = new LinearGradientBrush(start, end, source.GetColor(), target.GetColor());
    242238        DrawLineage(nodeSelector(arc), arcSelector, nodeSelector);
     
    273269          primitive.Pen = Pens.Transparent;
    274270        } else if (primitive is VisualGenealogyGraphNode) {
    275           primitive.Brush = Brushes.Transparent;
    276           primitive.Pen = Pens.DarkGray;
     271          primitive.Brush = new SolidBrush(Color.Transparent);
     272          primitive.Pen = new Pen(Color.DarkGray);
    277273        }
    278274      }
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Analyzers/GenealogyAnalyzer.cs

    r10755 r10830  
    1313  public class GenealogyAnalyzer<T> : SingleSuccessorOperator, IAnalyzer
    1414  where T : class,IItem {
     15    private const string GenerationsParameterName = "Generations";
     16    private const string ResultsParameterName = "Results";
     17    private const string PopulationGraphParameterName = "PopulationGraph";
     18    public const string QualityParameterName = "Quality";
     19    public const string PopulationParameterName = "SymbolicExpressionTree";
     20
     21    private const string CrossoverParameterName = "Crossover";
     22    private const string ManipulatorParameterName = "Mutator";
     23    private const string SolutionCreatorParameterName = "SolutionCreator";
     24
     25    private const string BeforeCrossoverOperatorParameterName = "BeforeCrossoverOperator";
     26    private const string AfterCrossoverOperatorParameterName = "AfterCrossoverOperator";
     27
     28    private const string BeforeManipulatorOperatorParameterName = "BeforeManipulatorOperator";
     29    private const string AfterManipulatorOperatorParameterName = "AfterManipulatorOperator";
     30
     31    private const string EnableCrossoverTrackingParameterName = "EnableCrossoverTracking";
     32    private const string EnableManipulatorTrackingParameterName = "EnableManipulatorTracking";
     33    private const string EnableSolutionCreatorTrackingParameterName = "EnableSolutionCreatorTracking"; // should always be enabled. maybe superfluous
    1534
    1635    public string CrossoverParentsParameterName { get; set; }
     
    1837    public string ManipulatorChildParameterName { get; set; }
    1938
    20     public IScopeTreeLookupParameter<DoubleValue> QualityParameter;
    21     public IScopeTreeLookupParameter<T> PopulationParameter;
    22 
    23     public ICrossoverOperator<T> BeforeCrossoverOperator { get; set; }
    24     public ICrossoverOperator<T> AfterCrossoverOperator { get; set; }
    25     public IManipulatorOperator<T> BeforeManipulatorOperator { get; set; }
    26     public IManipulatorOperator<T> AfterManipulatorOperator { get; set; }
    27 
    28     private const string PopulationParameterName = "Population";
    29     private const string QualityParameterName = "Quality";
    30 
    31     private const string GenerationsParameterName = "Generations";
    32     private const string ResultsParameterName = "Results";
    33     private const string PopulationGraphParameterName = "PopulationGraph";
    34 
    35     private const string CrossoverParameterName = "Crossover";
    36     private const string ManipulatorParameterName = "Mutator";
    37     private const string SolutionCreatorParameterName = "SolutionCreator";
    38 
    39     private const string EnableCrossoverTrackingParameterName = "EnableCrossoverTracking";
    40     private const string EnableManipulatorTrackingParameterName = "EnableManipulatorTracking";
    41     private const string EnableSolutionCreatorTrackingParameterName = "EnableSolutionCreatorTracking"; // should always be enabled. maybe superfluous
     39    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
     40      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
     41    }
     42
     43    public IScopeTreeLookupParameter<T> PopulationParameter {
     44      get { return (IScopeTreeLookupParameter<T>)Parameters[PopulationParameterName]; }
     45    }
     46
     47    public IValueParameter<ICrossoverOperator<T>> BeforeCrossoverOperatorParameter {
     48      get { return (IValueParameter<ICrossoverOperator<T>>)Parameters[BeforeCrossoverOperatorParameterName]; }
     49    }
     50    public IValueParameter<ICrossoverOperator<T>> AfterCrossoverOperatorParameter {
     51      get { return (IValueParameter<ICrossoverOperator<T>>)Parameters[AfterCrossoverOperatorParameterName]; }
     52    }
     53    public IValueParameter<IManipulatorOperator<T>> BeforeManipulatorOperatorParameter {
     54      get { return (IValueParameter<IManipulatorOperator<T>>)Parameters[BeforeManipulatorOperatorParameterName]; }
     55    }
     56    public IValueParameter<IManipulatorOperator<T>> AfterManipulatorOperatorParameter {
     57      get { return (IValueParameter<IManipulatorOperator<T>>)Parameters[AfterManipulatorOperatorParameterName]; }
     58    }
    4259
    4360    #region parameter properties
     
    6380      get { return (ILookupParameter<IManipulator>)Parameters[ManipulatorParameterName]; }
    6481    }
     82
    6583    public ILookupParameter<ISolutionCreator> SolutionCreatorParameter {
    6684      get { return (ILookupParameter<ISolutionCreator>)Parameters[SolutionCreatorParameterName]; }
     
    7492    public IManipulator Manipulator {
    7593      get { return ManipulatorParameter.ActualValue; }
     94    }
     95    public ICrossoverOperator<T> BeforeCrossoverOperator {
     96      get { return BeforeCrossoverOperatorParameter.Value; }
     97    }
     98    public ICrossoverOperator<T> AfterCrossoverOperator {
     99      get { return AfterCrossoverOperatorParameter.Value; }
     100    }
     101    public IManipulatorOperator<T> BeforeManipulatorOperator {
     102      get { return BeforeManipulatorOperatorParameter.Value; }
     103    }
     104    public IManipulatorOperator<T> AfterManipulatorOperator {
     105      get { return AfterManipulatorOperatorParameter.Value; }
    76106    }
    77107    public ISolutionCreator SolutionCreator {
     
    120150      Parameters.Add(new LookupParameter<IntValue>(GenerationsParameterName, "The number of generations so far."));
    121151      Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName));
    122       PopulationParameter = new ScopeTreeLookupParameter<T>(PopulationParameterName);
    123       QualityParameter = new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName);
    124       Parameters.Add(PopulationParameter);
    125       Parameters.Add(QualityParameter);
     152      Parameters.Add(new ScopeTreeLookupParameter<T>(PopulationParameterName, "The population of individuals."));
     153      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The individual qualities."));
     154      Parameters.Add(new ValueParameter<ICrossoverOperator<T>>(BeforeCrossoverOperatorParameterName));
     155      Parameters.Add(new ValueParameter<ICrossoverOperator<T>>(AfterCrossoverOperatorParameterName));
     156      Parameters.Add(new ValueParameter<IManipulatorOperator<T>>(BeforeManipulatorOperatorParameterName));
     157      Parameters.Add(new ValueParameter<IManipulatorOperator<T>>(AfterManipulatorOperatorParameterName));
    126158    }
    127159    public override IDeepCloneable Clone(Cloner cloner) {
     
    153185        Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName));
    154186      if (!Parameters.ContainsKey(PopulationParameterName)) {
    155         PopulationParameter = new ScopeTreeLookupParameter<T>(PopulationParameterName);
    156         Parameters.Add(PopulationParameter);
     187        Parameters.Add(new ScopeTreeLookupParameter<T>(PopulationParameterName, "The population of individuals."));
    157188      }
    158189      if (!Parameters.ContainsKey(QualityParameterName)) {
    159         QualityParameter = new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName);
    160         Parameters.Add(QualityParameter);
     190        Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The individual qualities."));
    161191      }
    162192    }
     
    175205        if (EnableCrossoverTracking.Value) {
    176206          if (BeforeCrossoverOperator != null) {
    177             BeforeCrossoverOperator.ParentsParameter.ActualName = CrossoverParentsParameterName;
    178             BeforeCrossoverOperator.ChildParameter.ActualName = CrossoverChildParameterName;
     207            //            BeforeCrossoverOperator.ParentsParameter.ActualName = CrossoverParentsParameterName;
     208            //            BeforeCrossoverOperator.ChildParameter.ActualName = CrossoverChildParameterName;
    179209            instrumentedCrossover.BeforeExecutionOperators.Add(BeforeCrossoverOperator);
    180210          }
    181211          if (AfterCrossoverOperator != null) {
    182             AfterCrossoverOperator.ParentsParameter.ActualName = CrossoverParentsParameterName;
    183             AfterCrossoverOperator.ChildParameter.ActualName = CrossoverChildParameterName;
     212            //            AfterCrossoverOperator.ParentsParameter.ActualName = CrossoverParentsParameterName;
     213            //            AfterCrossoverOperator.ChildParameter.ActualName = CrossoverChildParameterName;
    184214            instrumentedCrossover.AfterExecutionOperators.Add(AfterCrossoverOperator);
    185215          }
     
    194224        if (EnableManipulatorTracking.Value) {
    195225          if (BeforeManipulatorOperator != null) {
    196             BeforeManipulatorOperator.ChildParameter.ActualName = ManipulatorChildParameterName;
     226            //            BeforeManipulatorOperator.ChildParameter.ActualName = ManipulatorChildParameterName;
    197227            instrumentedManipulator.BeforeExecutionOperators.Add(BeforeManipulatorOperator);
    198228          }
    199229          if (AfterManipulatorOperator != null) {
    200             AfterManipulatorOperator.ChildParameter.ActualName = ManipulatorChildParameterName;
     230            //            AfterManipulatorOperator.ChildParameter.ActualName = ManipulatorChildParameterName;
    201231            instrumentedManipulator.AfterExecutionOperators.Add(AfterManipulatorOperator);
    202232          }
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Fragment.cs

    r10755 r10830  
    55namespace HeuristicLab.EvolutionTracking {
    66  [StorableClass]
    7   [Item("Fragment", "A fragment is an object that represents a piece of genetic information that was transferred from parent to child.")]
     7  [Item("Fragment", "A fragment is an object that represents a piece of inherited genetic information.")]
    88  public class Fragment : Item, IFragment {
    99    [Storable]
     
    2020    }
    2121
     22    [StorableConstructor]
     23    protected Fragment(bool deserializable) : base(deserializable) { }
     24
    2225    protected Fragment(Fragment original, Cloner cloner)
    2326      : base(original, cloner) {
     
    3235  }
    3336
     37  [StorableClass]
     38  [Item("Fragment", "A fragment is an object that represents a piece of inherited genetic information.")]
    3439  public class Fragment<T> : Fragment, IFragment<T> where T : class {
    3540    public new T Root {
     
    3742      set { base.Root = value; }
    3843    }
     44
     45    protected Fragment(Fragment original, Cloner cloner)
     46      : base(original, cloner) {
     47    }
     48
     49    [StorableConstructor]
     50    private Fragment(bool deserializable) : base(deserializable) { }
     51
     52    public Fragment() { }
    3953  }
    4054}
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraph.cs

    r10755 r10830  
    3232  public class GenealogyGraph : DirectedGraph, IGenealogyGraph {
    3333    [Storable]
    34     private Dictionary<double, LinkedList<IGenealogyGraphNode>> ranks; // use a linked list for fast insertion/removal
    35     public Dictionary<double, LinkedList<IGenealogyGraphNode>> Ranks {
     34    private Dictionary<double, List<IGenealogyGraphNode>> ranks; // use a linked list for fast insertion/removal
     35    public Dictionary<double, List<IGenealogyGraphNode>> Ranks {
    3636      get { return ranks; }
    3737      set { ranks = value; }
     
    4949    protected GenealogyGraph(bool deserializing) : base(deserializing) { }
    5050    public GenealogyGraph() {
    51       Ranks = new Dictionary<double, LinkedList<IGenealogyGraphNode>>();
     51      Ranks = new Dictionary<double, List<IGenealogyGraphNode>>();
    5252    }
    5353    public override void AddVertex(IVertex vertex) {
    5454      var node = (IGenealogyGraphNode)vertex;
    5555      if (!Ranks.ContainsKey(node.Rank))
    56         Ranks[node.Rank] = new LinkedList<IGenealogyGraphNode>();
    57       Ranks[node.Rank].AddLast(node);
     56        Ranks[node.Rank] = new List<IGenealogyGraphNode>();
     57      Ranks[node.Rank].Add(node);
    5858      base.AddVertex(vertex);
    5959    }
     
    8989    // members and properties
    9090    [Storable]
    91     private Dictionary<double, LinkedList<IGenealogyGraphNode>> ranks;
    92     public Dictionary<double, LinkedList<IGenealogyGraphNode>> Ranks {
     91    private Dictionary<double, List<IGenealogyGraphNode>> ranks;
     92    public Dictionary<double, List<IGenealogyGraphNode>> Ranks {
    9393      get { return ranks; }
    9494      set { ranks = value; }
     
    107107    protected GenealogyGraph(bool deserializing) : base(deserializing) { }
    108108    public GenealogyGraph() {
    109       Ranks = new Dictionary<double, LinkedList<IGenealogyGraphNode>>();
     109      Ranks = new Dictionary<double, List<IGenealogyGraphNode>>();
    110110    }
    111111    // methods
     
    113113      var node = (IGenealogyGraphNode<T>)vertex;
    114114      if (!Ranks.ContainsKey(node.Rank)) {
    115         Ranks[node.Rank] = new LinkedList<IGenealogyGraphNode>();
     115        Ranks[node.Rank] = new List<IGenealogyGraphNode>();
    116116      }
    117       Ranks[node.Rank].AddLast(node);
     117      Ranks[node.Rank].Add(node);
    118118      base.AddVertex(vertex);
    119119    }
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/Interfaces/IGenealogyGraph.cs

    r10677 r10830  
    2525namespace HeuristicLab.EvolutionTracking {
    2626  public interface IGenealogyGraph : IDirectedGraph {
    27     Dictionary<double, LinkedList<IGenealogyGraphNode>> Ranks { get; }
     27    Dictionary<double, List<IGenealogyGraphNode>> Ranks { get; }
    2828    new IEnumerable<IGenealogyGraphNode> Nodes { get; }
    2929  }
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/AfterCrossoverOperator.cs

    r10650 r10830  
    2929  [Item("AfterCrossoverOperator", "A generic operator that can record genealogical relationships between crossover parents and children.")]
    3030  public class AfterCrossoverOperator<T> : EvolutionTrackingOperator<T>, ICrossoverOperator<T> where T : class,IItem {
    31     private const string DefaultParentsParameterName = "Parents";
    32     private const string DefaultChildParameterName = "Child";
    33     public IScopeTreeLookupParameter<T> ParentsParameter { get; set; }
    34     public ILookupParameter<T> ChildParameter { get; set; }
     31    private const string ParentsParameterName = "Parents";
     32    private const string ChildParameterName = "Child";
     33
     34    public IScopeTreeLookupParameter<T> ParentsParameter {
     35      get { return (IScopeTreeLookupParameter<T>)Parameters[ParentsParameterName]; }
     36    }
     37    public ILookupParameter<T> ChildParameter {
     38      get { return (ILookupParameter<T>)Parameters[ChildParameterName]; }
     39    }
    3540
    3641    protected AfterCrossoverOperator(AfterCrossoverOperator<T> original, Cloner cloner)
     
    4247
    4348    public AfterCrossoverOperator() {
    44       ParentsParameter = new ScopeTreeLookupParameter<T>(DefaultParentsParameterName);
    45       ChildParameter = new LookupParameter<T>(DefaultChildParameterName);
    46       Parameters.Add(ParentsParameter);
    47       Parameters.Add(ChildParameter);
     49      Parameters.Add(new ScopeTreeLookupParameter<T>(ParentsParameterName));
     50      Parameters.Add(new LookupParameter<T>(ChildParameterName));
    4851    }
    4952
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/AfterManipulatorOperator.cs

    r10650 r10830  
    2929  [Item("AfterCrossoverOperator", "Performs an action after the crossover operator is applied.")]
    3030  public class AfterManipulatorOperator<T> : EvolutionTrackingOperator<T>, IManipulatorOperator<T> where T : class,IItem {
     31    private const string ChildParameterName = "Child";
    3132
    32     private const string ChildParameterName = "Child";
    33     public ILookupParameter<T> ChildParameter { get; set; }
     33    public ILookupParameter<T> ChildParameter {
     34      get { return (ILookupParameter<T>)Parameters[ChildParameterName]; }
     35    }
    3436
    3537    protected AfterManipulatorOperator(AfterManipulatorOperator<T> original, Cloner cloner)
     
    4143
    4244    public AfterManipulatorOperator() {
    43       ChildParameter = new LookupParameter<T>(ChildParameterName);
    44       Parameters.Add(ChildParameter);
     45      Parameters.Add(new LookupParameter<T>(ChildParameterName));
    4546    }
    4647
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/BeforeCrossoverOperator.cs

    r10675 r10830  
    3333  [Item("AfterCrossoverOperator", "A generic operator that can record genealogical relationships between crossover parents and children.")]
    3434  public class BeforeCrossoverOperator<T> : EvolutionTrackingOperator<T>, ICrossoverOperator<T> where T : class,IItem {
    35     private const string defaultParentsParameterName = "Parents";
    36     private const string defaultChildParameterName = "Child";
     35    private const string ParentsParameterName = "Parents";
     36    private const string ChildParameterName = "Child";
    3737
    38     public IScopeTreeLookupParameter<T> ParentsParameter { get; set; }
    39     public ILookupParameter<T> ChildParameter { get; set; }
     38    public IScopeTreeLookupParameter<T> ParentsParameter {
     39      get { return (IScopeTreeLookupParameter<T>)Parameters[ParentsParameterName]; }
     40    }
     41    public ILookupParameter<T> ChildParameter {
     42      get { return (ILookupParameter<T>)Parameters[ChildParameterName]; }
     43    }
    4044
    4145    protected BeforeCrossoverOperator(BeforeCrossoverOperator<T> original, Cloner cloner)
     
    4751
    4852    public BeforeCrossoverOperator() {
    49       ParentsParameter = new ScopeTreeLookupParameter<T>(defaultParentsParameterName);
    50       ChildParameter = new LookupParameter<T>(defaultChildParameterName);
    51       Parameters.Add(ParentsParameter);
    52       Parameters.Add(ChildParameter);
     53      Parameters.Add(new ScopeTreeLookupParameter<T>(ParentsParameterName));
     54      Parameters.Add(new LookupParameter<T>(ChildParameterName));
    5355    }
    5456
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/BeforeManipulatorOperator.cs

    r10822 r10830  
    3333
    3434    private const string ChildParameterName = "Child";
    35     public ILookupParameter<T> ChildParameter { get; set; }
     35
     36    public ILookupParameter<T> ChildParameter {
     37      get { return (ILookupParameter<T>)Parameters[ChildParameterName]; }
     38    }
    3639
    3740    protected BeforeManipulatorOperator(BeforeManipulatorOperator<T> original, Cloner cloner)
     
    4346
    4447    public BeforeManipulatorOperator() {
    45       ChildParameter = new LookupParameter<T>(ChildParameterName);
    46       Parameters.Add(ChildParameter);
     48      Parameters.Add(new LookupParameter<T>(ChildParameterName));
    4749    }
    4850
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/Interfaces/ICrossoverOperator.cs

    r10347 r10830  
    33namespace HeuristicLab.EvolutionTracking {
    44  public interface ICrossoverOperator<T> : IOperator where T : class,IItem {
    5     IScopeTreeLookupParameter<T> ParentsParameter { get; set; }
    6     ILookupParameter<T> ChildParameter { get; set; }
     5    IScopeTreeLookupParameter<T> ParentsParameter { get; }
     6    ILookupParameter<T> ChildParameter { get; }
    77  }
    88}
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/Interfaces/IManipulatorOperator.cs

    r10347 r10830  
    33namespace HeuristicLab.EvolutionTracking {
    44  public interface IManipulatorOperator<T> : IOperator where T : class,IItem {
    5     ILookupParameter<T> ChildParameter { get; set; }
     5    ILookupParameter<T> ChildParameter { get; }
    66  }
    77}
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs

    r10822 r10830  
    355355      // add tracking analyzer
    356356      foreach (var op in operators.OfType<SymbolicDataAnalysisGenealogyAnalyzer>()) {
    357         op.BeforeCrossoverOperator = new SymbolicDataAnalysisExpressionBeforeCrossoverOperator();
    358         op.AfterCrossoverOperator = new SymbolicDataAnalysisExpressionAfterCrossoverOperator();
    359         op.BeforeManipulatorOperator = new SymbolicDataAnalysisExpressionBeforeManipulatorOperator();
    360         op.AfterManipulatorOperator = new SymbolicDataAnalysisExpressionAfterManipulatorOperator();
     357        op.BeforeCrossoverOperatorParameter.ActualValue = new SymbolicDataAnalysisExpressionBeforeCrossoverOperator();
     358        op.AfterCrossoverOperatorParameter.ActualValue = new SymbolicDataAnalysisExpressionAfterCrossoverOperator();
     359        op.BeforeManipulatorOperatorParameter.ActualValue = new SymbolicDataAnalysisExpressionBeforeManipulatorOperator();
     360        op.AfterManipulatorOperatorParameter.ActualValue = new SymbolicDataAnalysisExpressionAfterManipulatorOperator();
    361361        // get crossover parameter names
    362362        var crossover = operators.OfType<ISymbolicExpressionTreeCrossover>().FirstOrDefault();
    363363        if (crossover != null) {
    364           op.CrossoverParentsParameterName = crossover.ParentsParameter.Name;
    365           op.CrossoverChildParameterName = crossover.ChildParameter.Name;
    366         }
    367         // get munipulator parameter names
     364          op.BeforeCrossoverOperator.ParentsParameter.ActualName = crossover.ParentsParameter.Name;
     365          op.AfterCrossoverOperator.ParentsParameter.ActualName = crossover.ParentsParameter.Name;
     366          op.BeforeCrossoverOperator.ChildParameter.ActualName = crossover.ChildParameter.Name;
     367          op.AfterCrossoverOperator.ChildParameter.ActualName = crossover.ChildParameter.Name;
     368        }
     369        // get manipulator parameter names
    368370        var manipulator = operators.OfType<ISymbolicExpressionTreeManipulator>().FirstOrDefault();
    369371        if (manipulator != null) {
    370           op.ManipulatorChildParameterName = manipulator.SymbolicExpressionTreeParameter.Name;
     372          op.BeforeManipulatorOperator.ChildParameter.ActualName = manipulator.SymbolicExpressionTreeParameter.Name;
    371373        }
    372374        var creator = operators.OfType<ISymbolicExpressionTreeCreator>().FirstOrDefault();
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs

    r10347 r10830  
    387387      if (TSPGenealogyAnalyzer != null) {
    388388        if (TSPCrossover != null) {
    389           TSPGenealogyAnalyzer.BeforeCrossoverOperator = new BeforeCrossoverOperator<Permutation>();
    390           TSPGenealogyAnalyzer.AfterCrossoverOperator = new AfterCrossoverOperator<Permutation>();
     389          TSPGenealogyAnalyzer.BeforeCrossoverOperatorParameter.ActualValue = new BeforeCrossoverOperator<Permutation>();
     390          TSPGenealogyAnalyzer.AfterCrossoverOperatorParameter.ActualValue = new AfterCrossoverOperator<Permutation>();
    391391          TSPGenealogyAnalyzer.CrossoverParentsParameterName = TSPCrossover.ParentsParameter.Name;
    392392          TSPGenealogyAnalyzer.CrossoverChildParameterName = TSPCrossover.ChildParameter.Name;
    393393        }
    394394        if (TSPManipulator != null) {
    395           TSPGenealogyAnalyzer.BeforeManipulatorOperator = new BeforeManipulatorOperator<Permutation>();
    396           TSPGenealogyAnalyzer.AfterManipulatorOperator = new AfterManipulatorOperator<Permutation>();
     395          TSPGenealogyAnalyzer.BeforeManipulatorOperatorParameter.ActualValue = new BeforeManipulatorOperator<Permutation>();
     396          TSPGenealogyAnalyzer.AfterManipulatorOperatorParameter.ActualValue = new AfterManipulatorOperator<Permutation>();
    397397          TSPGenealogyAnalyzer.ManipulatorChildParameterName = TSPManipulator.PermutationParameter.Name;
    398398        }
Note: See TracChangeset for help on using the changeset viewer.