Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/16/18 15:40:43 (7 years ago)
Author:
rhanghof
Message:

#2817:

  • The items can be rotated and tilted now.
  • Added pruning of extreme points in packed bins.
  • Added new packer which packs items by positioning them on the point with the minimum of wasted space. He uses rotating and tilting of items.
  • Added classes for sorting given items.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerResidualSpaceBestFit.cs

    r15554 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Problems.BinPacking3D.ExtremePointCreation;
     27using HeuristicLab.Problems.BinPacking3D.ExtremePointPruning;
    2728using System;
    2829using System.Collections.Generic;
     
    5556    /// </summary>
    5657    /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
    57     public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, bool useStackingConstraints) {
     58    public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, ExtremePointPruningMethod epPruningMethod, bool useStackingConstraints) {
    5859      IList<BinPacking3D> packingList = new List<BinPacking3D>();
    5960      IList<int> remainingIds = new List<int>(sortedItems);
    6061      IExtremePointCreator extremePointCreator = ExtremePointCreatorFactory.CreateExtremePointCreator(epCreationMethod, useStackingConstraints);
    61       bool rotated = false;
    6262
    6363      foreach (var remainingId in remainingIds) {
     
    7878        if (!packed) {
    7979          BinPacking3D binPacking = new BinPacking3D(binShape);
    80           var position = FindPackingPositionForItem(binPacking, item, useStackingConstraints, rotated);
     80          var position = FindPackingPositionForItem(binPacking, item, useStackingConstraints);
    8181          if (position != null) {
    8282            PackItem(binPacking, remainingId, item, position, extremePointCreator, useStackingConstraints);
     
    8787        }
    8888      }
     89
     90      ExtremePointPruningFactory.CreatePruning().PruneExtremePoints(epPruningMethod, packingList);
    8991      return packingList;
    9092    }
Note: See TracChangeset for help on using the changeset viewer.