Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/19/15 14:50:33 (9 years ago)
Author:
mkommend
Message:

#2320: Fixed error in symbolicexpressiontree crossover regarding the wiring of lookup parameters if persisted file is loaded.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SymbolicExpressionTreeCrossover.cs

    r12422 r12480  
    6868
    6969    public abstract ISymbolicExpressionTree Crossover(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1);
     70
     71
     72    [StorableHook(HookType.AfterDeserialization)]
     73    private void AfterDeserialization() {
     74      // BackwardsCompatibility3.4
     75      #region Backwards compatible code, remove with 3.5
     76      if (Parameters.ContainsKey("Child")) {
     77        var oldChildParameter = (ILookupParameter<ISymbolicExpressionTree>)Parameters["Child"];
     78        Parameters.Remove("Child");
     79        SymbolicExpressionTreeParameter.ActualName = oldChildParameter.ActualName;
     80      }
     81      #endregion
     82    }
    7083  }
    7184}
Note: See TracChangeset for help on using the changeset viewer.