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.BinPacking/3.3/2D
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/BinPacking2D.cs

    r15583 r16462  
    2323using System.Collections.Generic;
    2424using System.Linq;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HEAL.Fossil;
    2626using HeuristicLab.Core;
    2727using HeuristicLab.Common;
     
    2929namespace HeuristicLab.Problems.BinPacking2D {
    3030  [Item("BinPacking2D", "Represents a single-bin packing for a 2D bin-packing problem.")]
    31   [StorableClass]
     31  [StorableType("8B9C6AB0-ED65-4868-B1DF-09BD1F49309A")]
    3232  public class BinPacking2D : BinPacking.BinPacking<PackingPosition, PackingShape, PackingItem> {
    3333
     
    3939
    4040    [StorableConstructor]
    41     protected BinPacking2D(bool deserializing) : base(deserializing) { }
     41    protected BinPacking2D(StorableConstructorFlag _) : base(_) { }
    4242    protected BinPacking2D(BinPacking2D original, Cloner cloner) : base(original, cloner) { }
    4343    public override IDeepCloneable Clone(Cloner cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/Evaluators/BinUtilizationEvaluator.cs

    r15583 r16462  
    2020#endregion
    2121
    22 using System;
    2322using System.Linq;
    2423using HeuristicLab.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     24using HEAL.Fossil;
    2625using HeuristicLab.Common;
    2726
    2827namespace HeuristicLab.Problems.BinPacking2D {
    2928  [Item("Bin-Utilization Evaluator (2d)", "Calculates the overall utilization of bin space.")]
    30   [StorableClass]
     29  [StorableType("54C2F064-D3C8-40C0-808D-B952D0C43033")]
    3130  public class BinUtilizationEvaluator : Item, IEvaluator {
    3231
    3332    [StorableConstructor]
    34     protected BinUtilizationEvaluator(bool deserializing) : base(deserializing) { }
     33    protected BinUtilizationEvaluator(StorableConstructorFlag _) : base(_) { }
    3534    protected BinUtilizationEvaluator(BinUtilizationEvaluator original, Cloner cloner)
    3635      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/Evaluators/PackingRatioEvaluator.cs

    r15583 r16462  
    2323using System.Linq;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HEAL.Fossil;
    2626using HeuristicLab.Common;
    2727
    2828namespace HeuristicLab.Problems.BinPacking2D {
    2929  [Item("Packing-Ratio Evaluator (2d)", "Calculates the ratio between packed and unpacked space.")]
    30   [StorableClass]
     30  [StorableType("F07A6B7A-763B-413C-B3DA-916A6147B71A")]
    3131  public class PackingRatioEvaluator : Item, IEvaluator {
    3232
    3333    [StorableConstructor]
    34     protected PackingRatioEvaluator(bool deserializing) : base(deserializing) { }
     34    protected PackingRatioEvaluator(StorableConstructorFlag _) : base(_) { }
    3535    protected PackingRatioEvaluator(PackingRatioEvaluator original, Cloner cloner)
    3636      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/IntegerVectorEncoding/BottomLeftIntegerVectorDecoder.cs

    r15583 r16462  
    2020#endregion
    2121
    22 using System.Linq;
    2322using HeuristicLab.Core;
    24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     23using HEAL.Fossil;
    2524using HeuristicLab.Common;
    2625using System.Collections.Generic;
    27 using HeuristicLab.Encodings.IntegerVectorEncoding;
    2826
    2927namespace HeuristicLab.Problems.BinPacking2D {
    3028  [Item("Bottom-left IntegerVector Decoder (2d)", "Decodes the integer vector and creates a packing solution candidate")]
    31   [StorableClass]
     29  [StorableType("27643FED-BADA-48BF-8A71-38C35D160961")]
    3230  public class BottomLeftIntegerVectorDecoder : IntegerVectorDecoderBase {
    3331
    3432    [StorableConstructor]
    35     protected BottomLeftIntegerVectorDecoder(bool deserializing) : base(deserializing) { }
     33    protected BottomLeftIntegerVectorDecoder(StorableConstructorFlag _) : base(_) { }
    3634    protected BottomLeftIntegerVectorDecoder(BottomLeftIntegerVectorDecoder original, Cloner cloner)
    3735      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/IntegerVectorEncoding/ExtremePointIntegerVectorDecoder.cs

    r15583 r16462  
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     23using HEAL.Fossil;
    2424using HeuristicLab.Common;
    2525using System.Collections.Generic;
    26 using System.Linq;
    27 using HeuristicLab.Encodings.IntegerVectorEncoding;
    2826
    2927namespace HeuristicLab.Problems.BinPacking2D {
    3028  [Item("Extreme-point IntegerVector Decoder (2d)", "Decodes the integer vector and creates a packing solution candidate")]
    31   [StorableClass]
     29  [StorableType("D40DEE7A-4AAC-47DA-9FA8-12D3C09177A7")]
    3230  public class ExtremePointIntegerVectorDecoder : IntegerVectorDecoderBase {
    3331
    3432    [StorableConstructor]
    35     protected ExtremePointIntegerVectorDecoder(bool deserializing) : base(deserializing) { }
     33    protected ExtremePointIntegerVectorDecoder(StorableConstructorFlag _) : base(_) { }
    3634    protected ExtremePointIntegerVectorDecoder(ExtremePointIntegerVectorDecoder original, Cloner cloner)
    3735      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/IntegerVectorEncoding/IntegerVectorDecoderBase.cs

    r15583 r16462  
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     23using HEAL.Fossil;
    2424using HeuristicLab.Common;
    2525using System.Collections.Generic;
     
    2828
    2929namespace HeuristicLab.Problems.BinPacking2D {
    30   [StorableClass]
     30  [StorableType("63588140-31BB-402A-BEEE-B11C8809A585")]
    3131  public abstract class IntegerVectorDecoderBase : Item, IDecoder<IntegerVector> {
    3232
    3333    [StorableConstructor]
    34     protected IntegerVectorDecoderBase(bool deserializing) : base(deserializing) { }
     34    protected IntegerVectorDecoderBase(StorableConstructorFlag _) : base(_) { }
    3535    protected IntegerVectorDecoderBase(IntegerVectorDecoderBase original, Cloner cloner)
    3636      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/IntegerVectorEncoding/IntegerVectorProblem.cs

    r16453 r16462  
    3030using HeuristicLab.Optimization;
    3131using HeuristicLab.Optimization.Operators;
    32 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     32using HEAL.Fossil;
    3333
    3434namespace HeuristicLab.Problems.BinPacking2D {
    3535  [Item("Bin Packing Problem (2D, integer vector encoding) (BPP)", "Represents a two-dimensional bin-packing problem using only bins with identical measures and bins/items with rectangular shapes.")]
    36   [StorableClass]
     36  [StorableType("0928004F-FB4B-4516-9FAE-B44D2F39413B")]
    3737  [Creatable(Category = CreatableAttribute.Categories.CombinatorialProblems, Priority = 310)]
    3838  public sealed class IntegerVectorProblem : ProblemBase<IntegerVectorEncoding, IntegerVector> {
    3939    // persistence
    4040    [StorableConstructor]
    41     private IntegerVectorProblem(bool deserializing) : base(deserializing) { }
     41    private IntegerVectorProblem(StorableConstructorFlag _) : base(_) { }
    4242
    4343    // cloning
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/MoveEvaluatorBase.cs

    r15583 r16462  
    2626using HeuristicLab.Optimization;
    2727using HeuristicLab.Parameters;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HEAL.Fossil;
    2929
    3030namespace HeuristicLab.Problems.BinPacking2D {
    31   [StorableClass]
     31  [StorableType("13553924-A74F-4897-ABAB-CD049CFD2B41")]
    3232  public abstract class MoveEvaluatorBase<TSol, TMove> : SingleSuccessorOperator,
    3333    ISingleObjectiveMoveEvaluator, ISingleObjectiveMoveOperator, IOperator<TSol>
     
    6161
    6262    [StorableConstructor]
    63     protected MoveEvaluatorBase(bool deserializing) : base(deserializing) { }
     63    protected MoveEvaluatorBase(StorableConstructorFlag _) : base(_) { }
    6464    protected MoveEvaluatorBase(MoveEvaluatorBase<TSol, TMove> original, Cloner cloner) : base(original, cloner) { }
    6565    protected MoveEvaluatorBase()
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/PackingItem.cs

    r15583 r16462  
    2121
    2222
    23 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     23using HEAL.Fossil;
    2424using HeuristicLab.Common;
    2525using HeuristicLab.Core;
     
    3030namespace HeuristicLab.Problems.BinPacking2D {
    3131  [Item("PackingItem (2d)", "Represents a rectangular packing-item for bin-packing problems.")]
    32   [StorableClass]
     32  [StorableType("36B693B0-3CD9-4EE2-97EF-B8BEA8E4877A")]
    3333  public class PackingItem : PackingShape, IPackingItem {
    3434
     
    4949
    5050    [StorableConstructor]
    51     protected PackingItem(bool deserializing) : base(deserializing) { }
     51    protected PackingItem(StorableConstructorFlag _) : base(_) { }
    5252    protected PackingItem(PackingItem original, Cloner cloner)
    5353      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/PackingPosition.cs

    r15583 r16462  
    2121
    2222using System;
    23 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     23using HEAL.Fossil;
    2424using HeuristicLab.Core;
    2525using HeuristicLab.Common;
     
    2727namespace HeuristicLab.Problems.BinPacking2D {
    2828  [Item("Packing Position (2d)", "Represents a packing-position associated with a two dimensional packing-problem.")]
    29   [StorableClass]
     29  [StorableType("7B0A0FD9-2D2C-4E03-BB66-674446A07587")]
    3030  // PackingPosition is an immutable class (and handled as value type concerning Equals and GetHashCode())
    3131  public class PackingPosition : BinPacking.PackingPosition, IComparable<PackingPosition> {
     
    3939
    4040    [StorableConstructor]
    41     protected PackingPosition(bool deserializing) : base(deserializing) { }
     41    protected PackingPosition(StorableConstructorFlag _) : base(_) { }
    4242    protected PackingPosition(PackingPosition original, Cloner cloner)
    4343      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/PackingShape.cs

    r15583 r16462  
    2323using System;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HEAL.Fossil;
    2626using HeuristicLab.Common;
    2727using HeuristicLab.Data;
     
    3131namespace HeuristicLab.Problems.BinPacking2D {
    3232  [Item("PackingShape (2d)", "Represents the rectangular measures (width, height) of a two-dimensional bin-packing object.")]
    33   [StorableClass]
     33  [StorableType("11EF7917-826C-4154-A7E6-0869C1188B95")]
    3434  public class PackingShape : PackingShape<PackingPosition>, IComparable<PackingShape> {
    3535    public int Height {
     
    4444
    4545    [StorableConstructor]
    46     protected PackingShape(bool deserializing) : base(deserializing) { }
     46    protected PackingShape(StorableConstructorFlag _) : base(_) { }
    4747    protected PackingShape(PackingShape original, Cloner cloner)
    4848      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/BottomLeftPermutationDecoder.cs

    r15583 r16462  
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     23using HEAL.Fossil;
    2424using HeuristicLab.Common;
    2525using System.Collections.Generic;
     
    2828namespace HeuristicLab.Problems.BinPacking2D {
    2929  [Item("Bottom-left Permutation Decoder (2d)", "Decodes the permutation and creates a packing solution candidate")]
    30   [StorableClass]
     30  [StorableType("BD0B1034-46EC-430A-B971-258FACC9A39B")]
    3131  public class BottomLeftPermutationDecoder : Item, IDecoder<Permutation> {
    3232
    3333    [StorableConstructor]
    34     protected BottomLeftPermutationDecoder(bool deserializing) : base(deserializing) { }
     34    protected BottomLeftPermutationDecoder(StorableConstructorFlag _) : base(_) { }
    3535    protected BottomLeftPermutationDecoder(BottomLeftPermutationDecoder original, Cloner cloner)
    3636      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/ExtremePointPermutationDecoder.cs

    r15583 r16462  
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     23using HEAL.Fossil;
    2424using HeuristicLab.Common;
    2525using System.Collections.Generic;
     
    2828namespace HeuristicLab.Problems.BinPacking2D {
    2929  [Item("Extreme-point Permutation Decoder (2d)", "Decodes the permutation and creates a packing solution candidate")]
    30   [StorableClass]
     30  [StorableType("F50F332A-CFE7-4AB7-95C6-8D7943B3DEF2")]
    3131  public class ExtremePointPermutationDecoder : Item, IDecoder<Permutation> {
    3232
    3333    [StorableConstructor]
    34     protected ExtremePointPermutationDecoder(bool deserializing) : base(deserializing) { }
     34    protected ExtremePointPermutationDecoder(StorableConstructorFlag _) : base(_) { }
    3535    protected ExtremePointPermutationDecoder(ExtremePointPermutationDecoder original, Cloner cloner)
    3636      : base(original, cloner) {
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/PermutationProblem.cs

    r16453 r16462  
    2929using HeuristicLab.Optimization;
    3030using HeuristicLab.Optimization.Operators;
    31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     31using HEAL.Fossil;
    3232
    3333namespace HeuristicLab.Problems.BinPacking2D {
    3434  [Item("Bin Packing Problem (2D, permutation encoding) (BPP)", "Represents a two-dimensional bin-packing problem using only bins with identical measures and bins/items with rectangular shapes.")]
    35   [StorableClass]
     35  [StorableType("BE95CC5D-7FFD-4BC7-A2FF-7D71D3B951F6")]
    3636  [Creatable(Category = CreatableAttribute.Categories.CombinatorialProblems, Priority = 300)]
    3737  public sealed class PermutationProblem : ProblemBase<PermutationEncoding, Permutation> {
    3838    // persistence
    3939    [StorableConstructor]
    40     private PermutationProblem(bool deserializing) : base(deserializing) { }
     40    private PermutationProblem(StorableConstructorFlag _) : base(_) { }
    4141
    4242    // cloning
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/Swap2MoveEvaluator.cs

    r15583 r16462  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Encodings.PermutationEncoding;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HEAL.Fossil;
    2626
    2727namespace HeuristicLab.Problems.BinPacking2D {
    2828  [Item("Swap2MoveEvaluator", "Move evaluator for 2-opt moves.")]
    29   [StorableClass]
     29  [StorableType("7C1A0291-AD10-457D-B7B3-3D2B5B02C58D")]
    3030  public sealed class Swap2MoveEvaluator : MoveEvaluatorBase<Permutation, Swap2Move>, IPermutationSwap2MoveOperator {
    3131    public ILookupParameter<Swap2Move> Swap2MoveParameter {
     
    3737
    3838    [StorableConstructor]
    39     private Swap2MoveEvaluator(bool deserializing) : base(deserializing) { }
     39    private Swap2MoveEvaluator(StorableConstructorFlag _) : base(_) { }
    4040    private Swap2MoveEvaluator(Swap2MoveEvaluator original, Cloner cloner) : base(original, cloner) { }
    4141    public Swap2MoveEvaluator()
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/TranslocationMoveEvaluator.cs

    r15583 r16462  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Encodings.PermutationEncoding;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HEAL.Fossil;
    2626
    2727namespace HeuristicLab.Problems.BinPacking2D {
    2828  [Item("TranslocationMoveEvaluator", "Move evaluator for insertion or translocation moves.")]
    29   [StorableClass]
     29  [StorableType("9198644C-27DA-408B-810E-7686F0539802")]
    3030  public sealed class TranslocationMoveEvaluator : MoveEvaluatorBase<Permutation, TranslocationMove>, IPermutationTranslocationMoveOperator {
    3131    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
     
    3636    }
    3737    [StorableConstructor]
    38     private TranslocationMoveEvaluator(bool deserializing) : base(deserializing) { }
     38    private TranslocationMoveEvaluator(StorableConstructorFlag _) : base(_) { }
    3939    private TranslocationMoveEvaluator(TranslocationMoveEvaluator original, Cloner cloner) : base(original, cloner) { }
    4040    public TranslocationMoveEvaluator()
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/ProblemBase.cs

    r16453 r16462  
    2828using HeuristicLab.Optimization;
    2929using HeuristicLab.Parameters;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HEAL.Fossil;
    3131using HeuristicLab.Problems.Instances;
    3232
    3333namespace HeuristicLab.Problems.BinPacking2D {
    34   [StorableClass]
     34  [StorableType("215B7963-4B3D-4197-B18F-16CC13EC5D68")]
    3535  public abstract class ProblemBase<TEnc, TSol> :
    3636    SingleObjectiveBasicProblem<TEnc>, IProblemInstanceConsumer<BPPData>, IProblemInstanceExporter<BPPData>
     
    138138    // persistence
    139139    [StorableConstructor]
    140     protected ProblemBase(bool deserializing) : base(deserializing) { }
     140    protected ProblemBase(StorableConstructorFlag _) : base(_) { }
    141141
    142142    // cloning
  • branches/2520_PersistenceReintegration/HeuristicLab.Problems.BinPacking/3.3/2D/Solution.cs

    r15583 r16462  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
    24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     24using HEAL.Fossil;
    2525using HeuristicLab.Problems.BinPacking;
    2626
    2727namespace HeuristicLab.Problems.BinPacking2D {
    2828  [Item("Bin Packing Solution (2d)", "Represents a solution for a 2D bin packing problem.")]
    29   [StorableClass]
     29  [StorableType("9C014DEE-B1B3-447F-885E-5887E29DADF1")]
    3030  public class Solution : PackingPlan<PackingPosition, PackingShape, PackingItem> {
    3131    public Solution(PackingShape binShape) : this(binShape, false, false) { }
    3232    public Solution(PackingShape binShape, bool useExtremePoints, bool stackingConstraints) : base(binShape, useExtremePoints, stackingConstraints) { }
    3333    [StorableConstructor]
    34     protected Solution(bool deserializing) : base(deserializing) { }
     34    protected Solution(StorableConstructorFlag _) : base(_) { }
    3535    protected Solution(Solution original, Cloner cloner)
    3636      : base(original, cloner) {
Note: See TracChangeset for help on using the changeset viewer.