Index: trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/BinPacking2D.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/BinPacking2D.cs	(revision 15069)
+++ trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/BinPacking2D.cs	(revision 15230)
@@ -88,38 +88,34 @@
       };
 
-      int epIndex = 0;
-      while (epIndex < ExtremePoints.Count && (!IsPositionFeasible(rotatedItem, ExtremePoints.ElementAt(epIndex)))) { epIndex++; }
-
-      if (epIndex < ExtremePoints.Count) {
-        var currentPoint = ExtremePoints.ElementAt(epIndex);
-
-        var result = new PackingPosition(currentPoint.AssignedBin, currentPoint.X, currentPoint.Y, rotated);
+      var ep = ExtremePoints.Where(x => IsPositionFeasible(rotatedItem, x, stackingConstraints)).FirstOrDefault();
+      if (ep != null) {
+        var result = new PackingPosition(ep.AssignedBin, ep.X, ep.Y, rotated);
         return result;
       }
       return null;
     }
-    public override PackingPosition FindPositionBySliding(PackingItem item, bool rotated) {
+    public override PackingPosition FindPositionBySliding(PackingItem item, bool rotated, bool stackingConstraints) {
       PackingPosition currentPosition = new PackingPosition(0,
         BinShape.Width - (rotated ? item.Height : item.Width),
         BinShape.Height - (rotated ? item.Width : item.Height), rotated);
       //Slide the item as far as possible to the left
-      while (IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition))
-        || IsPositionFeasible(item, PackingPosition.MoveDown(currentPosition))) {
+      while (IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition), stackingConstraints)
+        || IsPositionFeasible(item, PackingPosition.MoveDown(currentPosition), stackingConstraints)) {
         //Slide the item as far as possible to the bottom
-        while (IsPositionFeasible(item, PackingPosition.MoveDown(currentPosition))) {
+        while (IsPositionFeasible(item, PackingPosition.MoveDown(currentPosition), stackingConstraints)) {
           currentPosition = PackingPosition.MoveDown(currentPosition);
         }
-        if (IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition)))
+        if (IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition), stackingConstraints))
           currentPosition = PackingPosition.MoveLeft(currentPosition);
       }
 
-      return IsPositionFeasible(item, currentPosition) ? currentPosition : null;
-    }
-
-    public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items) {
+      return IsPositionFeasible(item, currentPosition, stackingConstraints) ? currentPosition : null;
+    }
+
+    public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints) {
       var temp = new List<int>(sequence);
       for (int i = 0; i < temp.Count; i++) {
         var item = items[temp[i]];
-        var position = FindPositionBySliding(item, false);
+        var position = FindPositionBySliding(item, false, stackingConstraints);
         if (position != null) {
           PackItem(temp[i], item, position);
@@ -128,9 +124,9 @@
       }
     }
-    public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, Dictionary<int, bool> rotationArray) {
+    public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, Dictionary<int, bool> rotationArray, bool stackingConstraints) {
       var temp = new List<int>(sequence);
       for (int i = 0; i < temp.Count; i++) {
         var item = items[temp[i]];
-        var position = FindPositionBySliding(item, rotationArray[temp[i]]);
+        var position = FindPositionBySliding(item, rotationArray[temp[i]], stackingConstraints);
         if (position != null) {
           PackItem(temp[i], item, position);
@@ -150,4 +146,5 @@
       }
     }
+    
     public override void ExtremePointBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints, Dictionary<int, bool> rotationArray) {
       var temp = new List<int>(sequence);
@@ -186,5 +183,4 @@
       throw new NotSupportedException();
     }
-
     protected override void InitializeOccupationLayers() {
       for (int i = 0; i * 10 <= BinShape.Width; i += 1) {
Index: trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/IntegerVectorEncoding/BottomLeftIntegerVectorDecoder.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/IntegerVectorEncoding/BottomLeftIntegerVectorDecoder.cs	(revision 15069)
+++ trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/IntegerVectorEncoding/BottomLeftIntegerVectorDecoder.cs	(revision 15230)
@@ -47,5 +47,5 @@
 
     protected override PackingPosition FindPositionForItem(BinPacking2D bp, PackingItem item) {
-      return bp.FindPositionBySliding(item, rotated: false);
+      return bp.FindPositionBySliding(item, rotated: false, stackingConstraints: false);
     }
 
@@ -54,5 +54,5 @@
       ref IList<int> remainingIDs, IList<PackingItem> items) {
       var bp = new BinPacking2D(partialSolution.BinShape);
-      bp.SlidingBasedPacking(ref remainingIDs, items);
+      bp.SlidingBasedPacking(ref remainingIDs, items, stackingConstraints: false);
       return bp;
     }
Index: trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/BottomLeftPermutationDecoder.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/BottomLeftPermutationDecoder.cs	(revision 15069)
+++ trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/BottomLeftPermutationDecoder.cs	(revision 15230)
@@ -46,5 +46,5 @@
       while (remainingIDs.Count > 0) {
         var bp = new BinPacking2D(binShape);
-        bp.SlidingBasedPacking(ref remainingIDs, items);
+        bp.SlidingBasedPacking(ref remainingIDs, items, stackingConstraints: false);
         result.Bins.Add(bp);
       }
