Ignore:
Timestamp:
07/20/16 14:02:36 (5 years ago)
Author:
gkronber
Message:

#1966: refactoring of bin packing implementation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/PackingSequenceManipulator.cs

    r14046 r14128  
    2424using HeuristicLab.Common;
    2525using HeuristicLab.Core;
     26using HeuristicLab.Encodings.PermutationEncoding;
    2627using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2728using HeuristicLab.Problems.BinPacking;
     
    3031  [Item("PackingSequenceManipulator", "An operator which manipulates a PackingSequence representation.")]
    3132  [StorableClass]
    32   public abstract class PackingSequenceManipulator : PackingSolutionManipulator, IPackingSequenceOperator {
     33  public abstract class PackingSequenceManipulator : PackingSolutionManipulator<Permutation>, IPackingSequenceOperator {
    3334    [StorableConstructor]
    3435    protected PackingSequenceManipulator(bool deserializing) : base(deserializing) { }
     
    3940    }
    4041
    41     protected abstract void Manipulate(IRandom random, PackingSequenceEncoding individual);
     42    protected abstract void Manipulate(IRandom random, Permutation individual);
    4243
    4344    public override IOperation Apply() {
    44       var solution = EncodedSolutionParameter.ActualValue as PackingSequenceEncoding;
     45      var solution = EncodedSolutionParameter.ActualValue;
    4546      if (solution == null) throw new InvalidOperationException("PackingSolutionEncoding was not found or is not of type PackingSequenceEncoding.");
    4647      Manipulate(RandomParameter.ActualValue, solution);
Note: See TracChangeset for help on using the changeset viewer.