Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/12/19 09:42:35 (5 years ago)
Author:
gkronber
Message:

#3021: updated EmptyAlgorithm template to work with new persistence

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Templates/EmptyAlgorithm/EmptyAlgorithm/MyAlgorithm.cs

    r14816 r17199  
    77using HeuristicLab.Optimization; // BasicAlgorithm
    88using HeuristicLab.Parameters;
    9 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    109using HeuristicLab.Problems.Binary;
    1110using HeuristicLab.Random; // MersenneTwister
     11using HEAL.Attic;
    1212
    1313namespace EmptyAlgorithm {
     
    1919  [Creatable(Category = CreatableAttribute.Categories.Algorithms, Priority = 999)]
    2020
    21   [StorableClass] // for persistence (storing your algorithm to a files or transfer to HeuristicLab.Hive
     21  [StorableType("689280F7-E371-44A2-98A5-FCEDF22CA343")] // for persistence (storing your algorithm to a files or transfer to HeuristicLab.Hive
    2222  public class MyAlgorithm : BasicAlgorithm {
    2323    // This algorithm only works for BinaryProblems.
     
    4949    // even though the data is later overwritten by the stored data.
    5050    [StorableConstructor]
    51     public MyAlgorithm(bool deserializing) : base(deserializing) { }
     51    public MyAlgorithm(StorableConstructorFlag _) : base(_) { }
    5252
    5353    // Each clonable item must have a cloning ctor (deep cloning, the cloner is used to handle cyclic object references)
Note: See TracChangeset for help on using the changeset viewer.