Changeset 15617 for branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerResidualSpaceBestFit.cs
- Timestamp:
- 01/16/18 15:40:43 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerResidualSpaceBestFit.cs
r15554 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Problems.BinPacking3D.ExtremePointCreation; 27 using HeuristicLab.Problems.BinPacking3D.ExtremePointPruning; 27 28 using System; 28 29 using System.Collections.Generic; … … 55 56 /// </summary> 56 57 /// <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) { 58 59 IList<BinPacking3D> packingList = new List<BinPacking3D>(); 59 60 IList<int> remainingIds = new List<int>(sortedItems); 60 61 IExtremePointCreator extremePointCreator = ExtremePointCreatorFactory.CreateExtremePointCreator(epCreationMethod, useStackingConstraints); 61 bool rotated = false;62 62 63 63 foreach (var remainingId in remainingIds) { … … 78 78 if (!packed) { 79 79 BinPacking3D binPacking = new BinPacking3D(binShape); 80 var position = FindPackingPositionForItem(binPacking, item, useStackingConstraints , rotated);80 var position = FindPackingPositionForItem(binPacking, item, useStackingConstraints); 81 81 if (position != null) { 82 82 PackItem(binPacking, remainingId, item, position, extremePointCreator, useStackingConstraints); … … 87 87 } 88 88 } 89 90 ExtremePointPruningFactory.CreatePruning().PruneExtremePoints(epPruningMethod, packingList); 89 91 return packingList; 90 92 }
Note: See TracChangeset
for help on using the changeset viewer.