Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17199 for branches


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

#3021: updated EmptyAlgorithm template to work with new persistence

Location:
branches/Templates/EmptyAlgorithm/EmptyAlgorithm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/Templates/EmptyAlgorithm/EmptyAlgorithm/EmptyAlgorithm.csproj

    r15745 r17199  
    1010    <RootNamespace>EmptyAlgorithm</RootNamespace>
    1111    <AssemblyName>EmptyAlgorithm</AssemblyName>
    12     <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
     12    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
    1313    <FileAlignment>512</FileAlignment>
     14    <TargetFrameworkProfile />
    1415  </PropertyGroup>
    1516  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     
    3132  </PropertyGroup>
    3233  <ItemGroup>
     34    <Reference Include="HEAL.Attic, Version=1.2.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     35      <SpecificVersion>False</SpecificVersion>
     36      <HintPath>..\..\..\..\trunk\bin\HEAL.Attic.dll</HintPath>
     37    </Reference>
    3338    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    3439      <SpecificVersion>False</SpecificVersion>
  • 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.