- Timestamp:
- 07/13/17 15:22:59 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/BinPacking.cs
r14976 r15229 90 90 91 91 public abstract TPos FindExtremePointForItem(TItem item, bool rotated, bool stackingConstraints); 92 public abstract TPos FindPositionBySliding(TItem item, bool rotated );92 public abstract TPos FindPositionBySliding(TItem item, bool rotated, bool stackingConstraints); 93 93 94 public abstract void SlidingBasedPacking(ref IList<int> sequence, IList<TItem> items );95 public abstract void SlidingBasedPacking(ref IList<int> sequence, IList<TItem> items, Dictionary<int, bool> rotationArray );94 public abstract void SlidingBasedPacking(ref IList<int> sequence, IList<TItem> items, bool stackingConstraints); 95 public abstract void SlidingBasedPacking(ref IList<int> sequence, IList<TItem> items, Dictionary<int, bool> rotationArray, bool stackingConstraints); 96 96 public abstract void ExtremePointBasedPacking(ref IList<int> sequence, IList<TItem> items, bool stackingConstraints); 97 public abstract bool ExtremePointBasedPacking(int ID, IList<TItem> items, bool stackingConstraints);98 97 public abstract void ExtremePointBasedPacking(ref IList<int> sequence, IList<TItem> items, bool stackingConstraints, Dictionary<int, bool> rotationArray); 99 98 100 public v oid PackItem(int itemID, TItem item, TPos position) {99 public virtual void PackItem(int itemID, TItem item, TPos position) { 101 100 Items[itemID] = item; 102 101 Positions[itemID] = position; … … 107 106 108 107 AddNewItemToOccupationLayers(itemID, item, position); 108 } 109 public virtual bool PackItemIfFeasible(int itemID, TItem item, TPos position, bool stackingConstraints) { 110 if (IsPositionFeasible(item, position, stackingConstraints)) { 111 PackItem(itemID, item, position); 112 return true; 113 } 114 return false; 109 115 } 110 116 … … 135 141 return false; 136 142 } 137 public bool IsPositionFeasible(TItem item, TPos position) {143 public virtual bool IsPositionFeasible(TItem item, TPos position, bool stackingConstraints) { 138 144 //In this case feasability is defined as following: 1. the item fits into the bin-borders; 2. the point is supported by something; 3. the item does not collide with another already packed item 139 145 if (!BinShape.Encloses(position, item)) … … 147 153 return true; 148 154 } 155 149 156 public abstract int ShortestPossibleSideFromPoint(TPos position); 150 157 public abstract bool IsStaticStable(TItem measures, TPos position);
Note: See TracChangeset
for help on using the changeset viewer.