Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5160 for trunk


Ignore:
Timestamp:
12/22/10 16:23:16 (14 years ago)
Author:
svonolfe
Message:

Merged changes from branch into trunk (#1343)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearchMainLoop.cs

    r4722 r5160  
    9696    public override IDeepCloneable Clone(Cloner cloner) {
    9797      return new TabuSearchMainLoop(this, cloner);
     98    }
     99
     100    [StorableHook(HookType.AfterDeserialization)]
     101    private void AfterDeserialization() {
     102      #region Backwards compatible code
     103      VariableCreator variableCreator = OperatorGraph.InitialOperator as VariableCreator;
     104
     105      if (variableCreator != null) {
     106        if (!variableCreator.CollectedValues.ContainsKey("Memories")) {
     107          variableCreator.CollectedValues.Add(new ValueParameter<VariableCollection>("Memories", new VariableCollection()));
     108        }
     109      }
     110      #endregion
    98111    }
    99112
     
    153166      variableCreator.CollectedValues.Add(new ValueParameter<BoolValue>("EmptyNeighborhood", new BoolValue(false)));
    154167      variableCreator.CollectedValues.Add(new ValueParameter<ItemList<IItem>>("TabuList", new ItemList<IItem>()));
     168      variableCreator.CollectedValues.Add(new ValueParameter<VariableCollection>("Memories", new VariableCollection()));
    155169      variableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(0)));
    156170
Note: See TracChangeset for help on using the changeset viewer.