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/Moves/SequenceTabuMaker.cs

    r14046 r14128  
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
     25using HeuristicLab.Encodings.PermutationEncoding;
    2526using HeuristicLab.Optimization.Operators;
    2627using HeuristicLab.Parameters;
     
    3233  [StorableClass]
    3334  public class SequenceTabuMaker : TabuMaker, IPackingSequenceMoveOperator {
    34     public ILookupParameter<IPackingMove> PackingMoveParameter {
    35       get { return (ILookupParameter<IPackingMove>)Parameters["PackingMove"]; }
     35    public ILookupParameter<IPackingMove<Permutation>> PackingMoveParameter {
     36      get { return (ILookupParameter<IPackingMove<Permutation>>)Parameters["PackingMove"]; }
    3637    }
    37     public ILookupParameter<PackingSequenceEncoding> PackingSequenceParameter {
    38       get { return (ILookupParameter<PackingSequenceEncoding>)Parameters["PackingSequence"]; }
     38    public ILookupParameter<Permutation> PackingSequenceParameter {
     39      get { return (ILookupParameter<Permutation>)Parameters["PackingSequence"]; }
    3940    }
    4041
     
    4445    public SequenceTabuMaker()
    4546      : base() {
    46       Parameters.Add(new LookupParameter<IPackingMove>("PackingMove", "The move to evaluate."));
    47       Parameters.Add(new LookupParameter<PackingSequenceEncoding>("PackingSequence", "The solution to evaluate."));
     47      Parameters.Add(new LookupParameter<IPackingMove<Permutation>>("PackingMove", "The move to evaluate."));
     48      Parameters.Add(new LookupParameter<Permutation>("PackingSequence", "The solution to evaluate."));
    4849    }
    4950
     
    5354
    5455    protected override IItem GetTabuAttribute(bool maximization, double quality, double moveQuality) {
    55       IPackingMove move = PackingMoveParameter.ActualValue;
    56       PackingSequenceEncoding PackingSequence = PackingSequenceParameter.ActualValue;
     56      var move = PackingMoveParameter.ActualValue;
    5757      double baseQuality = moveQuality;
    5858      if (maximization && quality > moveQuality || !maximization && quality < moveQuality)
Note: See TracChangeset for help on using the changeset viewer.