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/Insertion/InsertionMoveGenerator.cs

    r14046 r14128  
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
     25using HeuristicLab.Encodings.PermutationEncoding;
    2526using HeuristicLab.Operators;
    2627using HeuristicLab.Optimization;
     
    3738      get { return false; }
    3839    }
    39     public ILookupParameter<PackingSequenceEncoding> PackingSequenceParameter {
    40       get { return (ILookupParameter<PackingSequenceEncoding>)Parameters["PackingSequence"]; }
     40    public ILookupParameter<Permutation> PackingSequenceParameter {
     41      get { return (ILookupParameter<Permutation>)Parameters["PackingSequence"]; }
    4142    }
    42     public ILookupParameter<IPackingMove> PackingMoveParameter {
    43       get { return (LookupParameter<IPackingMove>)Parameters["PackingMove"]; }
     43    public ILookupParameter<IPackingMove<Permutation>> PackingMoveParameter {
     44      get { return (LookupParameter<IPackingMove<Permutation>>)Parameters["PackingMove"]; }
    4445    }
    4546    protected ScopeParameter CurrentScopeParameter {
     
    5253    public InsertionMoveGenerator()
    5354      : base() {
    54       Parameters.Add(new LookupParameter<PackingSequenceEncoding>("PackingSequence", "The Sequence vector for which moves should be generated."));
    55       Parameters.Add(new LookupParameter<IPackingMove>("PackingMove", "The moves that should be generated in subscopes."));
     55      Parameters.Add(new LookupParameter<Permutation>("PackingSequence", "The Sequence vector for which moves should be generated."));
     56      Parameters.Add(new LookupParameter<IPackingMove<Permutation>>("PackingMove", "The moves that should be generated in subscopes."));
    5657      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
    5758    }
    5859
    5960    public override IOperation Apply() {
    60       PackingSequenceEncoding ps = PackingSequenceParameter.ActualValue;
     61      Permutation ps = PackingSequenceParameter.ActualValue;
    6162      InsertionMove[] moves = GenerateMoves(ps);
    6263      Scope[] moveScopes = new Scope[moves.Length];
     
    6970    }
    7071
    71     protected abstract InsertionMove[] GenerateMoves(PackingSequenceEncoding PackingSequence);
     72    protected abstract InsertionMove[] GenerateMoves(Permutation packingSequence);
    7273  }
    7374}
Note: See TracChangeset for help on using the changeset viewer.