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/GroupingMoveMaker.cs

    r14046 r14128  
    2424using HeuristicLab.Core;
    2525using HeuristicLab.Data;
     26using HeuristicLab.Encodings.PermutationEncoding;
    2627using HeuristicLab.Operators;
    2728using HeuristicLab.Optimization;
     
    4344      get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
    4445    }
    45     public ILookupParameter<IPackingMove> PackingMoveParameter {
    46       get { return (ILookupParameter<IPackingMove>)Parameters["PackingMove"]; }
     46    public ILookupParameter<IPackingMove<Permutation>> PackingMoveParameter {
     47      get { return (ILookupParameter<IPackingMove<Permutation>>)Parameters["PackingMove"]; }
    4748    }
    48     public ILookupParameter<PackingSequenceEncoding> PackingSequenceParameter {
    49       get { return (ILookupParameter<PackingSequenceEncoding>)Parameters["PackingSequence"]; }
     49    public ILookupParameter<Permutation> PackingSequenceParameter {
     50      get { return (ILookupParameter<Permutation>)Parameters["PackingSequence"]; }
    5051    }
    5152    public ILookupParameter<IPackingPlan> PackingPlanParameter {
     
    6263      : base() {
    6364      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution."));
    64       Parameters.Add(new LookupParameter<IPackingMove>("PackingMove", "The move to evaluate."));
     65      Parameters.Add(new LookupParameter<IPackingMove<Permutation>>("PackingMove", "The move to evaluate."));
    6566      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move."));
    66       Parameters.Add(new LookupParameter<PackingSequenceEncoding>("PackingSequence", "The solution as Sequence vector."));
     67      Parameters.Add(new LookupParameter<Permutation>("PackingSequence", "The solution as Sequence vector."));
    6768      Parameters.Add(new LookupParameter<IPackingPlan>("PackingPlan", "The currently best performing, decoded bin-packing solution represented as generalized packing-plan."));
    6869      Parameters.Add(new LookupParameter<IPackingPlan>("PackingPlanAfterMove", "The moved and decoded bin-packing solution represented as generalized packing-plan."));
     
    7475
    7576    public override IOperation Apply() {
    76       IPackingMove move = PackingMoveParameter.ActualValue;
    77       PackingSequenceEncoding PackingSequence = PackingSequenceParameter.ActualValue;
    7877      DoubleValue moveQuality = MoveQualityParameter.ActualValue;
    7978      DoubleValue quality = QualityParameter.ActualValue;
    8079
    81       PackingSequence.PackingSequence = (move.GetSolutionAfterMove() as PackingSequenceEncoding).PackingSequence;
    8280      PackingPlanParameter.ActualValue = PackingPlanAfterMoveParameter.ActualValue;
    8381
Note: See TracChangeset for help on using the changeset viewer.