Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/13/17 15:25:11 (8 years ago)
Author:
abeham
Message:

#2762: integrated bin packing extension into trunk

Location:
trunk/sources/HeuristicLab.Problems.BinPacking
Files:
3 edited
3 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.BinPacking

  • trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/BottomLeftPermutationDecoder.cs

    r14167 r15230  
    4646      while (remainingIDs.Count > 0) {
    4747        var bp = new BinPacking3D(binShape);
    48         bp.SlidingBasedPacking(ref remainingIDs, items);
     48        bp.SlidingBasedPacking(ref remainingIDs, items, useStackingConstraints);
    4949        result.Bins.Add(bp);
    5050      }
  • trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/ExtremePointPermutationDecoder.cs

    r14167 r15230  
    2020#endregion
    2121
     22using System;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    2526using System.Collections.Generic;
    2627using HeuristicLab.Encodings.PermutationEncoding;
     28using System.Linq;
     29
    2730
    2831namespace HeuristicLab.Problems.BinPacking3D {
    2932  [Item("Extreme-point Permutation Decoder (3d)", "Decodes the permutation and creates a packing solution candidate")]
    3033  [StorableClass]
    31   public class ExtremePointPermutationDecoder : Item, IDecoder<Permutation> {
     34  public class ExtremePointPermutationDecoder : ExtremePointPermutationDecoderBase {
    3235
    3336    [StorableConstructor]
     
    4144    }
    4245
    43     public Solution Decode(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
     46    public override Solution Decode(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
     47      return Apply(permutation, binShape, items, useStackingConstraints);
     48    }
     49
     50    public static Solution Apply(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
    4451      Solution result = new Solution(binShape, useExtremePoints: true, stackingConstraints: useStackingConstraints);
    4552      IList<int> remainingIDs = new List<int>(permutation);
Note: See TracChangeset for help on using the changeset viewer.