Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/28/18 16:10:48 (5 years ago)
Author:
jkarder
Message:

#2520: worked on reintegration of new persistence

  • added nuget references to HEAL.Fossil
  • added StorableType attributes to many classes
  • changed signature of StorableConstructors
  • removed some classes in old persistence
  • removed some unnecessary usings
Location:
branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/AgingScheme.cs

    r16453 r16462  
    2424using System.Linq;
    2525using HeuristicLab.Data;
     26using HEAL.Fossil;
    2627
    2728namespace HeuristicLab.Algorithms.ALPS {
     
    2930  /// Defines the growth of age limits for the layers.
    3031  /// </summary>
     32  [StorableType("136DA41B-0AC1-49A8-B4D9-DCE73BDB7110")]
    3133  public enum AgingScheme {
    3234    Linear,
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithm.cs

    r16453 r16462  
    3232using HeuristicLab.Optimization.Operators;
    3333using HeuristicLab.Parameters;
    34 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     34using HEAL.Fossil;
    3535using HeuristicLab.PluginInfrastructure;
    3636using HeuristicLab.Random;
     
    4040  [Item("ALPS Genetic Algorithm", "A genetic algorithm within an age-layered population structure as described in Gregory S. Hornby. 2006. ALPS: the age-layered population structure for reducing the problem of premature convergence. In Proceedings of the 8th annual conference on Genetic and evolutionary computation (GECCO '06). 815-822.")]
    4141  [Creatable(CreatableAttribute.Categories.PopulationBasedAlgorithms, Priority = 160)]
    42   [StorableClass]
     42  [StorableType("4A240A90-EB87-43D1-BD34-99A605B89C4D")]
    4343  public sealed class AlpsGeneticAlgorithm : HeuristicOptimizationEngineAlgorithm, IStorableContent {
    4444    public string Filename { get; set; }
     
    247247    #region Constructors
    248248    [StorableConstructor]
    249     private AlpsGeneticAlgorithm(bool deserializing)
    250       : base(deserializing) { }
     249    private AlpsGeneticAlgorithm(StorableConstructorFlag _) : base(_) { }
    251250    [StorableHook(HookType.AfterDeserialization)]
    252251    private void AfterDeserialization() {
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithmMainLoop.cs

    r16453 r16462  
    2727using HeuristicLab.Optimization.Operators;
    2828using HeuristicLab.Parameters;
    29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HEAL.Fossil;
    3030using HeuristicLab.Selection;
    3131
     
    3333
    3434  [Item("AlpsGeneticAlgorithmMainLoop", "An ALPS genetic algorithm main loop operator.")]
    35   [StorableClass]
     35  [StorableType("3DDD5DE1-4ACF-4E85-9A4C-30D930C44B56")]
    3636  public sealed class AlpsGeneticAlgorithmMainLoop : AlgorithmOperator {
    3737    #region Parameter Properties
     
    121121
    122122    [StorableConstructor]
    123     private AlpsGeneticAlgorithmMainLoop(bool deserializing)
    124       : base(deserializing) { }
     123    private AlpsGeneticAlgorithmMainLoop(StorableConstructorFlag _) : base(_) { }
    125124    private AlpsGeneticAlgorithmMainLoop(AlpsGeneticAlgorithmMainLoop original, Cloner cloner)
    126125      : base(original, cloner) { }
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithmMainOperator.cs

    r16453 r16462  
    2626using HeuristicLab.Optimization.Operators;
    2727using HeuristicLab.Parameters;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HEAL.Fossil;
    2929using HeuristicLab.Selection;
    3030
    3131namespace HeuristicLab.Algorithms.ALPS {
    3232  [Item("AlpsGeneticAlgorithmMainOperator", "An operator that represents the core of an ALPS genetic algorithm.")]
    33   [StorableClass]
     33  [StorableType("3F16B0C0-9054-4FE8-A6B1-2CCED065AC26")]
    3434  public sealed class AlpsGeneticAlgorithmMainOperator : AlgorithmOperator {
    3535    #region Parameter properties
     
    8888
    8989    [StorableConstructor]
    90     private AlpsGeneticAlgorithmMainOperator(bool deserializing) : base(deserializing) { }
     90    private AlpsGeneticAlgorithmMainOperator(StorableConstructorFlag _) : base(_) { }
    9191    private AlpsGeneticAlgorithmMainOperator(AlpsGeneticAlgorithmMainOperator original, Cloner cloner)
    9292      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/AlpsOffspringSelectionGeneticAlgorithm.cs

    r16453 r16462  
    3232using HeuristicLab.Optimization.Operators;
    3333using HeuristicLab.Parameters;
    34 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     34using HEAL.Fossil;
    3535using HeuristicLab.PluginInfrastructure;
    3636using HeuristicLab.Random;
     
    4040  [Item("ALPS OffspringSelection Genetic Algorithm", "An offspring selection genetic algorithm within an age-layered population structure.")]
    4141  [Creatable(CreatableAttribute.Categories.PopulationBasedAlgorithms, Priority = 162)]
    42   [StorableClass]
     42  [StorableType("4CA6AFE2-8EE9-4724-AA5C-624C734703FD")]
    4343  public sealed class AlpsOffspringSelectionGeneticAlgorithm : HeuristicOptimizationEngineAlgorithm, IStorableContent {
    4444    public string Filename { get; set; }
     
    294294    #region Constructors
    295295    [StorableConstructor]
    296     private AlpsOffspringSelectionGeneticAlgorithm(bool deserializing)
    297       : base(deserializing) { }
     296    private AlpsOffspringSelectionGeneticAlgorithm(StorableConstructorFlag _) : base(_) { }
    298297    [StorableHook(HookType.AfterDeserialization)]
    299298    private void AfterDeserialization() {
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/AlpsOffspringSelectionGeneticAlgorithmMainLoop.cs

    r16453 r16462  
    2727using HeuristicLab.Optimization.Operators;
    2828using HeuristicLab.Parameters;
    29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HEAL.Fossil;
    3030using HeuristicLab.Selection;
    3131
     
    3333
    3434  [Item("AlpsOffspringSelectionGeneticAlgorithmMainLoop", "An ALPS offspring selection genetic algorithm main loop operator.")]
    35   [StorableClass]
     35  [StorableType("C8DF9B75-7008-405D-B38A-15C1C22110B0")]
    3636  public sealed class AlpsOffspringSelectionGeneticAlgorithmMainLoop : AlgorithmOperator {
    3737    #region Parameter Properties
     
    134134
    135135    [StorableConstructor]
    136     private AlpsOffspringSelectionGeneticAlgorithmMainLoop(bool deserializing)
    137       : base(deserializing) { }
     136    private AlpsOffspringSelectionGeneticAlgorithmMainLoop(StorableConstructorFlag _) : base(_) { }
    138137    private AlpsOffspringSelectionGeneticAlgorithmMainLoop(AlpsOffspringSelectionGeneticAlgorithmMainLoop original, Cloner cloner)
    139138      : base(original, cloner) { }
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/AlpsOffspringSelectionGeneticAlgorithmMainOperator.cs

    r16453 r16462  
    2626using HeuristicLab.Optimization.Operators;
    2727using HeuristicLab.Parameters;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HEAL.Fossil;
    2929using HeuristicLab.Selection;
    3030
     
    3434  /// </summary>
    3535  [Item("AlpsOffspringSelectionGeneticAlgorithmMainOperator", "An operator that represents the core of an alps offspring selection genetic algorithm.")]
    36   [StorableClass]
     36  [StorableType("4DBAA32D-84EB-40C0-838D-ACCF9A9C41FA")]
    3737  public sealed class AlpsOffspringSelectionGeneticAlgorithmMainOperator : AlgorithmOperator {
    3838    #region Parameter properties
     
    110110
    111111    [StorableConstructor]
    112     private AlpsOffspringSelectionGeneticAlgorithmMainOperator(bool deserializing) : base(deserializing) { }
     112    private AlpsOffspringSelectionGeneticAlgorithmMainOperator(StorableConstructorFlag _) : base(_) { }
    113113    private AlpsOffspringSelectionGeneticAlgorithmMainOperator(AlpsOffspringSelectionGeneticAlgorithmMainOperator original, Cloner cloner)
    114114      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/AlpsOffspringSelector.cs

    r16453 r16462  
    2626using HeuristicLab.Operators;
    2727using HeuristicLab.Parameters;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HEAL.Fossil;
    2929
    3030namespace HeuristicLab.Algorithms.ALPS {
    3131  [Item("AlpsOffspringSelector", "Selects among the offspring population those that are designated successful and discards the unsuccessful offspring, except for some lucky losers. It expects the parent scopes to be below the first sub-scope, and offspring scopes to be below the second sub-scope separated again in two sub-scopes, the first with the failed offspring and the second with successful offspring.")]
    32   [StorableClass]
     32  [StorableType("69C49365-AF9B-474A-A994-7115469B03B7")]
    3333  public class AlpsOffspringSelector : SingleSuccessorOperator {
    3434    public IValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter {
     
    6969
    7070    [StorableConstructor]
    71     protected AlpsOffspringSelector(bool deserializing) : base(deserializing) { }
     71    protected AlpsOffspringSelector(StorableConstructorFlag _) : base(_) { }
    7272    protected AlpsOffspringSelector(AlpsOffspringSelector original, Cloner cloner) : base(original, cloner) { }
    7373    public override IDeepCloneable Clone(Cloner cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/Analyzers/AgeDistributionAnalyzer.cs

    r16453 r16462  
    2828using HeuristicLab.Optimization;
    2929using HeuristicLab.Parameters;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HEAL.Fossil;
    3131
    3232namespace HeuristicLab.Algorithms.ALPS {
    3333  // Based on QualityDistributionAnalyzer
    3434  [Item("AgeDistributionAnalyzer", "Analyzes the distribution of the ages in that it adds a Histogram of them into the result collection.")]
    35   [StorableClass]
     35  [StorableType("714CE0E4-A88F-44A1-A2D0-92F4D8252C0C")]
    3636  public sealed class AgeDistributionAnalyzer : SingleSuccessorOperator, IAnalyzer, IIterationBasedOperator {
    3737
     
    6969
    7070    [StorableConstructor]
    71     private AgeDistributionAnalyzer(bool deserializing)
    72       : base(deserializing) { }
     71    private AgeDistributionAnalyzer(StorableConstructorFlag _) : base(_) { }
    7372    private AgeDistributionAnalyzer(AgeDistributionAnalyzer original, Cloner cloner)
    7473      : base(original, cloner) { }
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/Analyzers/OldestAverageYoungestAgeAnalyzer.cs

    r16453 r16462  
    2929using HeuristicLab.Optimization.Operators;
    3030using HeuristicLab.Parameters;
    31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     31using HEAL.Fossil;
    3232
    3333namespace HeuristicLab.Algorithms.ALPS {
    3434  [Item("OldestAverageYoungestAgeAnalyzer", "An operator which calculates the current oldest, average and youngest age in the scope tree.")]
    35   [StorableClass]
     35  [StorableType("1AE2C4EF-BFCB-439C-AD5E-00E7740FD3D0")]
    3636  public sealed class OldestAverageYoungestAgeAnalyzer : AlgorithmOperator, IAnalyzer {
    3737    #region Parameter properties
     
    6767    #region Storing & Cloning
    6868    [StorableConstructor]
    69     private OldestAverageYoungestAgeAnalyzer(bool deserializing) : base(deserializing) { }
     69    private OldestAverageYoungestAgeAnalyzer(StorableConstructorFlag _) : base(_) { }
    7070    private OldestAverageYoungestAgeAnalyzer(OldestAverageYoungestAgeAnalyzer original, Cloner cloner)
    7171      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/Analyzers/OldestAverageYoungestAgeCalculator.cs

    r16453 r16462  
    2525using HeuristicLab.Operators;
    2626using HeuristicLab.Parameters;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HEAL.Fossil;
    2828
    2929namespace HeuristicLab.Algorithms.ALPS {
    3030  [Item("OldestAverageYoungestAgeCalculator", "An operator which calculates the oldest, average and youngest age of solutions in the scope tree.")]
    31   [StorableClass]
     31  [StorableType("DF4FA02E-C328-4A6E-9096-5BFADFA9F5DE")]
    3232  public sealed class OldestAverageYoungestAgeCalculator : SingleSuccessorOperator {
    3333    public IScopeTreeLookupParameter<DoubleValue> AgeParameter {
     
    4646    #region Storing & Cloning
    4747    [StorableConstructor]
    48     private OldestAverageYoungestAgeCalculator(bool deserializing) : base(deserializing) { }
     48    private OldestAverageYoungestAgeCalculator(StorableConstructorFlag _) : base(_) { }
    4949    private OldestAverageYoungestAgeCalculator(OldestAverageYoungestAgeCalculator original, Cloner cloner) : base(original, cloner) { }
    5050    public override IDeepCloneable Clone(Cloner cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/EldersSelector.cs

    r16453 r16462  
    2626using HeuristicLab.Data;
    2727using HeuristicLab.Parameters;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HEAL.Fossil;
    2929using HeuristicLab.Selection;
    3030
     
    3232
    3333  [Item("EldersSelector", "Select all individuals which are too old for their current layer.")]
    34   [StorableClass]
     34  [StorableType("5C81CE34-F8D4-4B92-A2E4-A62332D68B1C")]
    3535  public sealed class EldersSelector : Selector {
    3636    public IScopeTreeLookupParameter<DoubleValue> AgeParameter {
     
    4848
    4949    [StorableConstructor]
    50     private EldersSelector(bool deserializing)
    51       : base(deserializing) { }
     50    private EldersSelector(StorableConstructorFlag _) : base(_) { }
    5251    private EldersSelector(EldersSelector original, Cloner cloner)
    5352      : base(original, cloner) { }
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/HeuristicLab.Algorithms.ALPS-3.3.csproj

    r16454 r16462  
    8383      <HintPath>..\..\packages\Google.Protobuf.3.6.1\lib\net45\Google.Protobuf.dll</HintPath>
    8484    </Reference>
    85     <Reference Include="HEAL.Fossil, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
     85    <Reference Include="HEAL.Fossil, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    8686      <HintPath>..\..\packages\HEAL.Fossil.1.0.0\lib\netstandard2.0\HEAL.Fossil.dll</HintPath>
    8787    </Reference>
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/LastLayerCloner.cs

    r16453 r16462  
    2626using HeuristicLab.Operators;
    2727using HeuristicLab.Parameters;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HEAL.Fossil;
    2929
    3030namespace HeuristicLab.Algorithms.ALPS {
    3131  [Item("LastLayerCloner", "An operator that creates a new layer by cloning the current last one.")]
    32   [StorableClass]
     32  [StorableType("A0EC32A3-DBB1-4941-BE2A-880C7812C57B")]
    3333  public sealed class LastLayerCloner : SingleSuccessorOperator {
    3434    public OperatorParameter NewLayerOperatorParameter {
     
    4242
    4343    [StorableConstructor]
    44     private LastLayerCloner(bool deserializing) : base(deserializing) { }
     44    private LastLayerCloner(StorableConstructorFlag _) : base(_) { }
    4545
    4646    private LastLayerCloner(LastLayerCloner original, Cloner cloner)
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/MatingPoolCreator.cs

    r16453 r16462  
    2525using HeuristicLab.Operators;
    2626using HeuristicLab.Parameters;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HEAL.Fossil;
    2828
    2929namespace HeuristicLab.Algorithms.ALPS {
    3030  [Item("MatingPoolCreator", "An operator which creates mating pools based on a set of sub-populations. For each sub-population, the individuals from the previous sub-population are copied into the current sub-population.")]
    31   [StorableClass]
     31  [StorableType("F8B8EAF4-84FC-4E38-B3CB-82EEDBAFE083")]
    3232  public sealed class MatingPoolCreator : SingleSuccessorOperator {
    3333    public IValueLookupParameter<IntValue> MatingPoolRangeParameter {
     
    3636
    3737    [StorableConstructor]
    38     private MatingPoolCreator(bool deserializing)
    39       : base(deserializing) { }
     38    private MatingPoolCreator(StorableConstructorFlag _) : base(_) { }
    4039    private MatingPoolCreator(MatingPoolCreator original, Cloner cloner)
    4140      : base(original, cloner) { }
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/ReseedingController.cs

    r16453 r16462  
    2525using HeuristicLab.Operators;
    2626using HeuristicLab.Parameters;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HEAL.Fossil;
    2828
    2929namespace HeuristicLab.Algorithms.ALPS {
    3030  [Item("ReseedingController", "An operator that controls if reseeding is needed.")]
    31   [StorableClass]
     31  [StorableType("67294ABE-C118-41F0-B736-0576F30F664F")]
    3232  public sealed class ReseedingController : SingleSuccessorOperator {
    3333    public ILookupParameter<IntValue> GenerationsParameter {
     
    4747
    4848    [StorableConstructor]
    49     private ReseedingController(bool deserializing)
    50       : base(deserializing) { }
     49    private ReseedingController(StorableConstructorFlag _) : base(_) { }
    5150
    5251    private ReseedingController(ReseedingController original, Cloner cloner)
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/ResultsHistoryWiper.cs

    r16453 r16462  
    2727using HeuristicLab.Optimization;
    2828using HeuristicLab.Parameters;
    29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HEAL.Fossil;
    3030
    3131namespace HeuristicLab.Algorithms.ALPS {
    3232  [Item("ResultsHistoryWiper", "An operator that removes the history of a ResultsCollection by setting all values in all DataTables to NaN.")]
    33   [StorableClass]
     33  [StorableType("98514FF7-CE23-446F-9ACB-901FDF056CF0")]
    3434  public sealed class ResultsHistoryWiper : SingleSuccessorOperator {
    3535    public ILookupParameter<ResultCollection> ResultsParameter {
     
    3838
    3939    [StorableConstructor]
    40     private ResultsHistoryWiper(bool deserializing) : base(deserializing) {
     40    private ResultsHistoryWiper(StorableConstructorFlag _) : base(_) {
    4141    }
    4242
  • branches/2520_PersistenceReintegration/HeuristicLab.Algorithms.ALPS/3.3/WeightingReducer.cs

    r16453 r16462  
    2727using HeuristicLab.Operators;
    2828using HeuristicLab.Parameters;
    29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HEAL.Fossil;
    3030
    3131namespace HeuristicLab.Algorithms.ALPS {
    3232  [Item("WeightingReducer", "An operator that combines two values based on the weight of the lower (0.0) and higher (1.0) value.")]
    33   [StorableClass]
     33  [StorableType("A2B65E34-61EC-414A-827C-AAA3F1A1E46C")]
    3434  public sealed class WeightingReducer : SingleSuccessorOperator {
    3535    public IScopeTreeLookupParameter<DoubleValue> ParameterToReduce {
     
    4444
    4545    [StorableConstructor]
    46     private WeightingReducer(bool deserializing) : base(deserializing) { }
     46    private WeightingReducer(StorableConstructorFlag _) : base(_) { }
    4747    private WeightingReducer(WeightingReducer original, Cloner cloner)
    4848      : base(original, cloner) {
Note: See TracChangeset for help on using the changeset viewer.