Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/26/14 17:14:14 (10 years ago)
Author:
bburlacu
Message:

#1772: Found bug in GenealogyGraph creation, attempted fix by injecting vertex guid's in the individual scopes.

File:
1 edited

Legend:

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

    r10650 r10674  
    211211        ConfigureTrackingOperators();
    212212
    213         foreach (var individual in population) {
     213        for (int i = 0; i < population.Count; ++i) {
     214          var individual = population[i];
    214215          var vertex = new GenealogyGraphNode<T> { Content = individual, Rank = Generations.Value, };
    215216          GenealogyGraph.AddVertex(vertex);
     217          // save the vertex id in the individual scope (so that we can identify graph indices)
     218          ExecutionContext.Scope.SubScopes[i].Variables.Add(new Variable("Id", new StringValue(vertex.Id)));
    216219        }
    217220      } else {
Note: See TracChangeset for help on using the changeset viewer.