Changeset 9598 for branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking.cs
- Timestamp:
- 06/07/13 15:35:12 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking.cs
r9596 r9598 105 105 } 106 106 107 108 public int PointOccupation(D position) { 109 foreach (var ipEntry in ItemPositions) { 110 if (ItemMeasures[ipEntry.Key].EnclosesPoint(ipEntry.Value, position)) 111 return ipEntry.Key; 112 } 113 return -1; 114 } 107 115 public bool IsPointOccupied(D position) { 108 116 foreach (var ipEntry in ItemPositions) { … … 110 118 return true; 111 119 } 112 113 120 return false; 114 121 } 115 122 public bool IsPositionFeasible(I currentItem, D position) { 116 //In this case feasability is defined as following: 1. the item fits into the bin-borders; 2. the item does not collide with another already packed item123 //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 117 124 if (!BinMeasures.Encloses(position, currentItem)) 118 125 return false; … … 127 134 public abstract int ShortestPossibleSideFromPoint (D position); 128 135 public abstract bool IsStaticStable (I item, D position); 129 130 //public bool IsPositionFeasible1(I currentItem, D position) {131 // if (!BinMeasures.Encloses(position, currentItem))132 // return false;133 134 // return OccupiedPoints.IsPositionFeasible (currentItem, position);135 //}136 136 } 137 137 }
Note: See TracChangeset
for help on using the changeset viewer.