Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/28/18 16:10:48 (6 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.Problems.Knapsack/3.3
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.Knapsack/3.3/Analyzers/BestKnapsackSolutionAnalyzer.cs

    r16453 r16462  
    2828using HeuristicLab.Optimization;
    2929using HeuristicLab.Parameters;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HEAL.Fossil;
    3131
    3232namespace HeuristicLab.Problems.Knapsack {
     
    3535  /// </summary>
    3636  [Item("BestKnapsackSolutionAnalyzer", "An operator for analyzing the best solution for a Knapsack problem.")]
    37   [StorableClass]
     37  [StorableType("40BCB11E-F9C9-4749-A4FF-831BD8342D1A")]
    3838  public class BestKnapsackSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer, ISingleObjectiveOperator {
    3939    public virtual bool EnabledByDefault {
     
    7373
    7474    [StorableConstructor]
    75     protected BestKnapsackSolutionAnalyzer(bool deserializing) : base(deserializing) { }
     75    protected BestKnapsackSolutionAnalyzer(StorableConstructorFlag _) : base(_) { }
    7676    protected BestKnapsackSolutionAnalyzer(BestKnapsackSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { }
    7777    public BestKnapsackSolutionAnalyzer()
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.Knapsack/3.3/Evaluators/KnapsackEvaluator.cs

    r16453 r16462  
    2727using HeuristicLab.Operators;
    2828using HeuristicLab.Parameters;
    29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HEAL.Fossil;
    3030
    3131namespace HeuristicLab.Problems.Knapsack {
     
    3434  /// </summary>
    3535  [Item("KnapsackEvaluator", "Evaluates solutions for the Knapsack problem.")]
    36   [StorableClass]
     36  [StorableType("905F6A31-FDC1-48EA-9229-DA23956F1929")]
    3737  public class KnapsackEvaluator : InstrumentedOperator, IKnapsackEvaluator {
    3838    public ILookupParameter<DoubleValue> QualityParameter {
     
    7070
    7171    [StorableConstructor]
    72     protected KnapsackEvaluator(bool deserializing) : base(deserializing) { }
     72    protected KnapsackEvaluator(StorableConstructorFlag _) : base(_) { }
    7373    protected KnapsackEvaluator(KnapsackEvaluator original, Cloner cloner) : base(original, cloner) { }
    7474    public KnapsackEvaluator()
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj

    r16454 r16462  
    102102      <HintPath>..\..\packages\Google.Protobuf.3.6.1\lib\net45\Google.Protobuf.dll</HintPath>
    103103    </Reference>
    104     <Reference Include="HEAL.Fossil, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
     104    <Reference Include="HEAL.Fossil, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    105105      <HintPath>..\..\packages\HEAL.Fossil.1.0.0\lib\netstandard2.0\HEAL.Fossil.dll</HintPath>
    106106    </Reference>
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.Knapsack/3.3/Improvers/KnapsackImprovementOperator.cs

    r16453 r16462  
    2929using HeuristicLab.Optimization;
    3030using HeuristicLab.Parameters;
    31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     31using HEAL.Fossil;
    3232
    3333namespace HeuristicLab.Problems.Knapsack {
     
    4040  /// </remarks>
    4141  [Item("KnapsackImprovementOperator", "An operator that improves knapsack solutions. It is implemented as described in Laguna, M. and Martí, R. (2003). Scatter Search: Methodology and Implementations in C. Operations Research/Computer Science Interfaces Series, Vol. 24. Springer.")]
    42   [StorableClass]
     42  [StorableType("DD57DC5B-8874-49C8-B28F-89962FC11EB2")]
    4343  public sealed class KnapsackImprovementOperator : SingleSuccessorOperator, ISingleObjectiveImprovementOperator {
    4444    #region Parameter properties
     
    8686
    8787    [StorableConstructor]
    88     private KnapsackImprovementOperator(bool deserializing) : base(deserializing) { }
     88    private KnapsackImprovementOperator(StorableConstructorFlag _) : base(_) { }
    8989    private KnapsackImprovementOperator(KnapsackImprovementOperator original, Cloner cloner) : base(original, cloner) { }
    9090    public KnapsackImprovementOperator()
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs

    r16453 r16462  
    3131using HeuristicLab.Optimization.Operators;
    3232using HeuristicLab.Parameters;
    33 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     33using HEAL.Fossil;
    3434using HeuristicLab.PluginInfrastructure;
    3535
     
    3737  [Item("Knapsack Problem (KSP)", "Represents a Knapsack problem.")]
    3838  [Creatable(CreatableAttribute.Categories.CombinatorialProblems, Priority = 200)]
    39   [StorableClass]
     39  [StorableType("8CEDAFA2-6E0A-4D4B-B6C6-F85CC58B824E")]
    4040  public sealed class KnapsackProblem : SingleObjectiveHeuristicOptimizationProblem<IKnapsackEvaluator, IBinaryVectorCreator>, IStorableContent {
    4141    public string Filename { get; set; }
     
    9999
    100100    [StorableConstructor]
    101     private KnapsackProblem(bool deserializing) : base(deserializing) { }
     101    private KnapsackProblem(StorableConstructorFlag _) : base(_) { }
    102102    private KnapsackProblem(KnapsackProblem original, Cloner cloner)
    103103      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.Knapsack/3.3/KnapsackSolution.cs

    r16453 r16462  
    2626using HeuristicLab.Data;
    2727using HeuristicLab.Encodings.BinaryVectorEncoding;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HEAL.Fossil;
    2929
    3030namespace HeuristicLab.Problems.Knapsack {
     
    3333  /// </summary>
    3434  [Item("KnapsackSolution", "Represents a Knapsack solution which can be visualized in the GUI.")]
    35   [StorableClass]
     35  [StorableType("C959079D-3D92-4C88-8734-9DADEE851169")]
    3636  public class KnapsackSolution : Item {
    3737    public static new Image StaticItemImage {
     
    110110
    111111    [StorableConstructor]
    112     protected KnapsackSolution(bool deserializing) : base(deserializing) { }
     112    protected KnapsackSolution(StorableConstructorFlag _) : base(_) { }
    113113    protected KnapsackSolution(KnapsackSolution original, Cloner cloner)
    114114      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackMoveEvaluator.cs

    r16453 r16462  
    2525using HeuristicLab.Encodings.BinaryVectorEncoding;
    2626using HeuristicLab.Operators;
    27 using HeuristicLab.Optimization;
    2827using HeuristicLab.Parameters;
    29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HEAL.Fossil;
    3029
    3130namespace HeuristicLab.Problems.Knapsack {
     
    3433  /// </summary>
    3534  [Item("KnapsackMoveEvaluator", "A base class for operators which evaluate Knapsack moves.")]
    36   [StorableClass]
     35  [StorableType("F953FC74-8688-48E5-856D-E9D8A2411CA0")]
    3736  public abstract class KnapsackMoveEvaluator : SingleSuccessorOperator, IKnapsackMoveEvaluator, IBinaryVectorMoveOperator {
    3837    public ILookupParameter<DoubleValue> QualityParameter {
     
    5958
    6059    [StorableConstructor]
    61     protected KnapsackMoveEvaluator(bool deserializing) : base(deserializing) { }
     60    protected KnapsackMoveEvaluator(StorableConstructorFlag _) : base(_) { }
    6261    protected KnapsackMoveEvaluator(KnapsackMoveEvaluator original, Cloner cloner) : base(original, cloner) { }
    6362    protected KnapsackMoveEvaluator()
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.Knapsack/3.3/MoveEvaluators/KnapsackOneBitflipMoveEvaluator.cs

    r16453 r16462  
    2525using HeuristicLab.Encodings.BinaryVectorEncoding;
    2626using HeuristicLab.Parameters;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HEAL.Fossil;
    2828
    2929namespace HeuristicLab.Problems.Knapsack {
     
    3232  /// </summary>
    3333  [Item("KnapsackOneBitflipMoveEvaluator", "Base class for evaluating one bitflip moves.")]
    34   [StorableClass]
     34  [StorableType("E1BB4CCB-E9C3-4A16-8F03-3F619D4A4B0A")]
    3535  public class KnapsackOneBitflipMoveEvaluator : KnapsackMoveEvaluator, IOneBitflipMoveOperator {
    3636    public ILookupParameter<OneBitflipMove> OneBitflipMoveParameter {
     
    3939
    4040    [StorableConstructor]
    41     protected KnapsackOneBitflipMoveEvaluator(bool deserializing) : base(deserializing) { }
     41    protected KnapsackOneBitflipMoveEvaluator(StorableConstructorFlag _) : base(_) { }
    4242    protected KnapsackOneBitflipMoveEvaluator(KnapsackOneBitflipMoveEvaluator original, Cloner cloner) : base(original, cloner) { }
    4343    public KnapsackOneBitflipMoveEvaluator()
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.Knapsack/3.3/PathRelinkers/KnapsackPathRelinker.cs

    r16453 r16462  
    2828using HeuristicLab.Encodings.BinaryVectorEncoding;
    2929using HeuristicLab.Optimization.Operators;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HEAL.Fossil;
    3131
    3232namespace HeuristicLab.Problems.Knapsack {
     
    3838  /// </remarks>
    3939  [Item("KnapsackPathRelinker", "An operator that relinks paths between knapsack solutions. The operator incrementally assimilates the initiating solution into the guiding solution by adding and removing elements as needed.")]
    40   [StorableClass]
     40  [StorableType("3A528AB4-5552-4979-B443-2943A3496BC3")]
    4141  public sealed class KnapsackPathRelinker : SingleObjectivePathRelinker {
    4242    [StorableConstructor]
    43     private KnapsackPathRelinker(bool deserializing) : base(deserializing) { }
     43    private KnapsackPathRelinker(StorableConstructorFlag _) : base(_) { }
    4444    private KnapsackPathRelinker(KnapsackPathRelinker original, Cloner cloner) : base(original, cloner) { }
    4545    public KnapsackPathRelinker() : base() { }
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.Knapsack/3.3/PathRelinkers/KnapsackSimultaneousPathRelinker.cs

    r16453 r16462  
    2828using HeuristicLab.Encodings.BinaryVectorEncoding;
    2929using HeuristicLab.Optimization.Operators;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HEAL.Fossil;
    3131
    3232namespace HeuristicLab.Problems.Knapsack {
     
    3838  /// </remarks>
    3939  [Item("KnapsackSimultaneousPathRelinker", "An operator that relinks paths between knapsack solutions starting from both ends. The operator incrementally assimilates the initiating solution into the guiding solution and vice versa by adding and removing elements as needed.")]
    40   [StorableClass]
     40  [StorableType("8D046D17-BA0F-4974-AF76-95B3F90FB7A4")]
    4141  public sealed class KnapsackSimultaneousPathRelinker : SingleObjectivePathRelinker {
    4242    [StorableConstructor]
    43     private KnapsackSimultaneousPathRelinker(bool deserializing) : base(deserializing) { }
     43    private KnapsackSimultaneousPathRelinker(StorableConstructorFlag _) : base(_) { }
    4444    private KnapsackSimultaneousPathRelinker(KnapsackSimultaneousPathRelinker original, Cloner cloner) : base(original, cloner) { }
    4545    public KnapsackSimultaneousPathRelinker() : base() { }
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.Knapsack/3.3/SimilarityCalculators/KnapsackSimilarityCalculator.cs

    r16453 r16462  
    2121
    2222using System;
     23using HEAL.Fossil;
    2324using HeuristicLab.Common;
    2425using HeuristicLab.Core;
     
    4041    protected override bool IsCommutative { get { return true; } }
    4142
    42     private KnapsackSimilarityCalculator(bool deserializing) : base(deserializing) { }
     43    [StorableConstructor]
     44    private KnapsackSimilarityCalculator(StorableConstructorFlag _) : base(_) { }
    4345    private KnapsackSimilarityCalculator(KnapsackSimilarityCalculator original, Cloner cloner) : base(original, cloner) { }
    4446    public KnapsackSimilarityCalculator() : base() { }
Note: See TracChangeset for help on using the changeset viewer.