Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11350


Ignore:
Timestamp:
09/06/14 11:58:54 (10 years ago)
Author:
bburlacu
Message:

#1772: Small fix to fragment tracing.

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

Legend:

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

    r11318 r11350  
    4646      }
    4747
    48       if (fragment == null)
    49         throw new InvalidOperationException("Could not identify crossover fragment.");
    50 
     48      // if the fragment is null it means that nodes0 is identical with childNodes (in other words crossover did nothing)
    5149      arcs[0].Data = null;
    5250      arcs[1].Data = fragment;
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionTracing.cs

    r11318 r11350  
    6161        }
    6262        var parents = node.Parents.ToList();
    63         if (node.IsElite) {
    64           // skip elite, go up the graph to original individual
     63        var fragment = (IFragment<ISymbolicExpressionTreeNode>)node.InArcs.Last().Data;
     64
     65        if (fragment == null) {
     66          // fragment == null can only mean that the individual is the previous generation elite
     67          // which got introduced in the next generation. skip elite, go up the graph to original individual
    6568          node = parents[0];
    6669          continue;
    6770        }
    68         var fragment = (IFragment<ISymbolicExpressionTreeNode>)node.InArcs.Last().Data;
    69 
    70         if (node.Rank > 1 && fragment == null)
    71           throw new ArgumentNullException("Fragment cannot be null");
    7271
    7372        var fragmentLength = fragment.Root.GetLength();
Note: See TracChangeset for help on using the changeset viewer.