Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10675


Ignore:
Timestamp:
03/27/14 02:18:08 (11 years ago)
Author:
bburlacu
Message:

#1772: Fixed genealogy graph creation.

Location:
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Analyzers/GenealogyAnalyzer.cs

    r10674 r10675  
    226226            IsElite = true
    227227          };
    228           var previousVertex = GenealogyGraph[elite].Last();
     228          var previousVertex = (IGenealogyGraphNode<T>)GenealogyGraph[elite].Last();
    229229          GenealogyGraph.AddVertex(vertex);
    230230          previousVertex.AddForwardArc(vertex);
    231231          vertex.AddReverseArc(previousVertex);
     232          vertex.InArcs.Last().Data = previousVertex.InArcs.Last().Data; // save the fragment in case there is one
     233          vertex.Id = previousVertex.Id;
    232234        }
    233235      }
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/BeforeCrossoverOperator.cs

    r10674 r10675  
    6363    public override IOperation Apply() {
    6464      if (CurrentGeneration == null) throw new Exception();
    65       // we get the parents by parsing the scope name because the individuals in the execution scope are clones of the ones saved in the graph
    66       //      var parentVertices = ExecutionContext.Scope.SubScopes.Select(s => CurrentGeneration.Find(x => x.Id == ((StringValue)s.Variables["Id"].Value)).ToList();
    6765      var parentVertices = (from s in ExecutionContext.Scope.SubScopes
    6866                            let id = ((StringValue)s.Variables["Id"].Value).Value
Note: See TracChangeset for help on using the changeset viewer.