Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.cs	(revision 9596)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.cs	(revision 9598)
@@ -44,6 +44,8 @@
       } else {
         Content.Name = "Packing Plan";
-        for (int i = 0; i < Content.NrOfBins; i++)
-          binSelection.Items.Add(i);
+        int i = 0;
+        foreach (var bp in Content.BinPackings)
+          binSelection.Items.Add(i++ + " (" + Math.Round(bp.PackingDensity * 100, 2) + "%)");
+
         binSelection.SelectedIndex = 0;
         UpdateModel();
@@ -53,5 +55,5 @@
 
     private void UpdateModel() {
-      int currentBin = (binSelection != null && binSelection.SelectedItem != null) ? (int)(binSelection.SelectedItem) : 0;
+      int currentBin = (binSelection != null) ? (int)(binSelection.SelectedIndex) : 0;
       var bin = Content.BinPackings[currentBin].BinMeasures;
       packingPlan3D.InitializeContainer(bin.Width, bin.Height, bin.Depth);
@@ -71,5 +73,5 @@
       itemSelection.SelectedIndex = -1;
       itemSelection.Items.Clear();
-      int currentBin = (binSelection != null && binSelection.SelectedItem != null) ? (int)(binSelection.SelectedItem) : 0;
+      int currentBin = (binSelection != null) ? (int)(binSelection.SelectedIndex) : 0;
       //for (int i = 0; i < Content.PackingItemPositions.Count; i++) {
       //  if (Content.PackingItemPositions[i].AssignedBin == currentBin)
@@ -106,6 +108,7 @@
         } else {
           Content.Name = "Packing Plan";
-          for (int i = 0; i < Content.NrOfBins; i++)
-            binSelection.Items.Add(i);
+          int i = 0;
+          foreach (var bp in Content.BinPackings)
+            binSelection.Items.Add(i++ + " (" + Math.Round(bp.PackingDensity * 100, 2) + "%)");
           binSelection.SelectedIndex = 0;
           UpdateModel();
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Plugin.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Plugin.cs	(revision 9596)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Plugin.cs	(revision 9598)
@@ -26,5 +26,5 @@
   /// Plugin class for HeuristicLab.Problems.BinPacking.Views plugin.
   /// </summary>
-  [Plugin("HeuristicLab.Problems.BinPacking.Views", "3.3.7.9593")]
+  [Plugin("HeuristicLab.Problems.BinPacking.Views", "3.3.7.9596")]
   [PluginFile("HeuristicLab.Problems.BinPacking.Views-3.3.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Common", "3.3")]
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Properties/AssemblyInfo.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Properties/AssemblyInfo.cs	(revision 9596)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Properties/AssemblyInfo.cs	(revision 9598)
@@ -54,3 +54,3 @@
 // by using the '*' as shown below:
 [assembly: AssemblyVersion("3.3.0.0")]
-[assembly: AssemblyFileVersion("3.3.7.9593")]
+[assembly: AssemblyFileVersion("3.3.7.9596")]
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ISOContainerMultiComponentVectorDecoder3D.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ISOContainerMultiComponentVectorDecoder3D.cs	(revision 9596)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ISOContainerMultiComponentVectorDecoder3D.cs	(revision 9598)
@@ -112,5 +112,4 @@
     }
 
-
     public override PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
       var solution = encodedSolution as MultiComponentVectorEncoding;
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/PackingSolutionDecoder.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/PackingSolutionDecoder.cs	(revision 9596)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/PackingSolutionDecoder.cs	(revision 9598)
@@ -70,5 +70,5 @@
       Parameters.Add(new LookupParameter<ItemList<I>>("PackingItemMeasures", "Packing-item data taken from the bin-packing problem-instance."));
       Parameters.Add(new LookupParameter<B>("PackingBinMeasures", "Packing-bin data taken from the bin-packing problem-instance."));
-      Parameters.Add(new ValueParameter<BoolValue>("StackingConstraint", "A flag determining whether stackingconstraints should be enforced or not."));
+      Parameters.Add(new ValueParameter<BoolValue>("StackingConstraint", "A flag determining whether stackingconstraints should be enforced or not.", new BoolValue(true)));
     }
 
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Dimensions/OccupiedPoints.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Dimensions/OccupiedPoints.cs	(revision 9596)
+++ 	(revision )
@@ -1,56 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Problems.BinPacking.Interfaces;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Core;
-using HeuristicLab.Common;
-using HeuristicLab.Problems.BinPacking.Shapes;
-
-namespace HeuristicLab.Problems.BinPacking.Dimensions {
-  [Item("Occupated Points", "A datastructure holding all currently occupied points of a packing-bin.")]
-  [StorableClass]
-  public abstract class OccupiedPoints<D, B, I> : Item
-    where D : class, IPackingDimensions
-    where B : PackingShape<D>, IPackingBin
-    where I : PackingShape<D>, IPackingItem {
-
-    public OccupiedPoints(B binMeasures) : base() { }
-    [StorableConstructor]
-    protected OccupiedPoints(bool deserializing) : base(deserializing) { }
-    protected OccupiedPoints(OccupiedPoints<D,B,I> original, Cloner cloner)
-      : base(original, cloner) {
-    }
-
-
-    public abstract bool IsPositionFeasible(I measures, D position);
-    public abstract void OccupyPoints(I measures, D position, int itemID);
-    public abstract bool IsPointOccupied(D point);
-    public abstract int ShortestPossibleSideFromEP(D ep);
-    public abstract bool IsStaticStable(I item, D ep);
-    public abstract bool WeightIsSupported(I item, D ep, ItemList<I> items);
-    public abstract void ChangeBinMeasures(B binMeasures);
-  }
-}
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Dimensions/OccupiedPoints2D.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Dimensions/OccupiedPoints2D.cs	(revision 9596)
+++ 	(revision )
@@ -1,113 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Problems.BinPacking.Interfaces;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Core;
-using HeuristicLab.Common;
-using HeuristicLab.Problems.BinPacking.Shapes;
-using HeuristicLab.Problems.BinPacking.PackingItem;
-using HeuristicLab.Problems.BinPacking.PackingBin;
-
-namespace HeuristicLab.Problems.BinPacking.Dimensions {
-  [Item("Occupated Points 2D", "A datastructure holding all currently occupied points of a 2D packing-bin.")]
-  [StorableClass]
-  public class OccupiedPoints2D : OccupiedPoints<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem> {
-                   
-    [Storable]
-    private int[,] occupiedPoints { get; set; }
-
-    public OccupiedPoints2D(RectangularPackingBin binMeasures) : base(binMeasures) {
-      occupiedPoints = new int[binMeasures.Width, binMeasures.Height];
-      for (int w = 0; w < binMeasures.Width; w++) {
-        for (int h = 0; h < binMeasures.Height; h++) {
-          occupiedPoints[w, h] = -1;
-        }
-      }
-    }
-    [StorableConstructor]
-    protected OccupiedPoints2D(bool deserializing) : base(deserializing) { }
-    protected OccupiedPoints2D(OccupiedPoints2D original, Cloner cloner)
-      : base(original, cloner) {
-      this.occupiedPoints = (int[,])original.occupiedPoints.Clone();
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new OccupiedPoints2D(this, cloner);
-    }
-
-    public override bool IsPositionFeasible(RectangularPackingItem measures, TwoDimensionalPacking position) {
-      for (int w = position.X; w < position.X + measures.Width; w++) {
-        for (int h = position.Y; h < position.Y + measures.Height; h++) {
-          if (occupiedPoints[w, h] != -1)
-            return false;
-        }
-      }
-      return true;
-    }
-    public override void OccupyPoints(RectangularPackingItem measures, TwoDimensionalPacking position, int itemID) {
-      int width = position.Rotated ? measures.Height : measures.Width;
-      int height = position.Rotated ? measures.Width : measures.Height;
-      for (int w = position.X; w < position.X + width; w++) {
-        for (int h = position.Y; h < position.Y + height; h++) {
-          occupiedPoints[w, h] = itemID;
-        }
-      }
-    }
-    public override bool IsPointOccupied(TwoDimensionalPacking point) {
-      return occupiedPoints[point.X, point.Y] != -1;
-    }
-    public override int ShortestPossibleSideFromEP(TwoDimensionalPacking ep) {
-      int shortestSide = int.MaxValue;
-      int width = occupiedPoints.GetLength(0);
-      int height = occupiedPoints.GetLength(1);
-
-      if (ep.X >= width || ep.Y >= height)
-        return shortestSide;
-
-      int currentX = ep.X;
-      while (currentX < width && occupiedPoints[currentX, ep.Y] == -1) { currentX++; }
-      if (currentX - ep.X < shortestSide)
-        shortestSide = currentX - ep.X;
-
-      int currentY = ep.Y;
-      while (currentY < height && occupiedPoints[ep.X, currentY] == -1) { currentY++; }
-      if (currentY - ep.Y < shortestSide)
-        shortestSide = currentY - ep.Y;
-
-      return shortestSide;
-    }
-    public override bool IsStaticStable(RectangularPackingItem item, TwoDimensionalPacking ep) {
-      //For the current implementation there was no need for stacking-constraints in the 2D-case. 
-      //But it could be interesting for shelf-packing applications!
-      throw new NotImplementedException();
-    }
-    public override bool WeightIsSupported(RectangularPackingItem item, TwoDimensionalPacking ep, ItemList<RectangularPackingItem> items) {
-      return true;
-    }
-    public override void ChangeBinMeasures(RectangularPackingBin binMeasures) {
-      throw new NotImplementedException();
-    }
-  }
-}
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Dimensions/OccupiedPoints3D.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Dimensions/OccupiedPoints3D.cs	(revision 9596)
+++ 	(revision )
@@ -1,177 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Problems.BinPacking.Interfaces;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Core;
-using HeuristicLab.Common;
-using HeuristicLab.Problems.BinPacking.Shapes;
-using HeuristicLab.Problems.BinPacking.PackingItem;
-using HeuristicLab.Problems.BinPacking.PackingBin;
-
-namespace HeuristicLab.Problems.BinPacking.Dimensions {
-  [Item("Occupied Points 3D", "A datastructure holding all currently occupied points of a 3D packing-bin.")]
-  [StorableClass]
-  public class OccupiedPoints3D : OccupiedPoints<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> {
-
-    [Storable]
-    private int[, ,] occupiedPoints { get; set; }
-
-    public OccupiedPoints3D(CuboidPackingBin binMeasures) : base(binMeasures) {
-      occupiedPoints = new int[binMeasures.Width, binMeasures.Height, binMeasures.Depth];
-      for (int w = 0; w < binMeasures.Width; w++) {
-        for (int h = 0; h < binMeasures.Height; h++) {
-          for (int d = 0; d < binMeasures.Depth; d++) {
-            occupiedPoints[w, h, d] = -1;
-          }
-        }
-      }
-    }
-    [StorableConstructor]
-    protected OccupiedPoints3D(bool deserializing) : base(deserializing) { }
-    protected OccupiedPoints3D(OccupiedPoints3D original, Cloner cloner)
-      : base(original, cloner) {
-        this.occupiedPoints = (int[,,])original.occupiedPoints.Clone();
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new OccupiedPoints3D(this, cloner);
-    }
-
-    public override bool IsPositionFeasible(CuboidPackingItem measures, ThreeDimensionalPacking position) {
-      for (int w = position.X; w < position.X + measures.Width; w++) {
-        for (int h = position.Y; h < position.Y + measures.Height; h++) {
-          for (int d = position.Z; d < position.Z + measures.Depth; d++) {
-            if (occupiedPoints[w, h, d] != -1)
-              return false;
-          }
-        }
-      }
-      return true;
-    }
-    public override void OccupyPoints(CuboidPackingItem measures, ThreeDimensionalPacking position, int itemID) {
-      int width = position.Rotated ? measures.Depth : measures.Width;
-      int depth = position.Rotated ? measures.Width : measures.Depth;
-      for (int w = position.X; w < position.X + width; w++) {
-        for (int h = position.Y; h < position.Y + measures.Height; h++) {
-          for (int d = position.Z; d < position.Z + depth; d++) {
-            occupiedPoints[w, h, d] = itemID;
-          }
-        }
-      }
-    }
-    public override bool IsPointOccupied(ThreeDimensionalPacking point) {
-      return occupiedPoints[point.X, point.Y, point.Z] != -1;
-    }
-    public override int ShortestPossibleSideFromEP(ThreeDimensionalPacking ep) {
-      int shortestSide = int.MaxValue;
-      int width = occupiedPoints.GetLength(0);
-      int height = occupiedPoints.GetLength(1);
-      int depth = occupiedPoints.GetLength(2);
-
-      if (ep.X >= width || ep.Y >= height || ep.Z >= depth)
-        return shortestSide;
-
-      int currentX = ep.X;
-      while (currentX < width && occupiedPoints[currentX, ep.Y, ep.Z] == -1) { currentX++; }
-      if (currentX - ep.X < shortestSide)
-        shortestSide = currentX - ep.X;
-
-      int currentY = ep.Y;
-      while (currentY < height && occupiedPoints[ep.X, currentY, ep.Z] == -1) { currentY++; }
-      if (currentY - ep.Y < shortestSide)
-        shortestSide = currentY - ep.Y;
-
-      int currentZ = ep.Z;
-      while (currentZ < depth && occupiedPoints[ep.X, ep.Y, currentZ] == -1) { currentZ++; }
-      if (currentZ - ep.Z < shortestSide)
-        shortestSide = currentZ - ep.Z;
-
-      return shortestSide;
-    }
-    public override bool IsStaticStable(CuboidPackingItem item, ThreeDimensionalPacking ep) {
-      //Static stability is given, if item is placed on the ground
-      if (ep.Y == 0)
-        return true;
-
-      if (occupiedPoints[ep.X, ep.Y - 1, ep.Z] != -1
-        && occupiedPoints[ep.X + item.Width - 1, ep.Y - 1, ep.Z] != -1
-        && occupiedPoints[ep.X, ep.Y - 1, ep.Z + item.Depth - 1] != -1
-        && occupiedPoints[ep.X + item.Width - 1, ep.Y - 1, ep.Z + item.Depth - 1] != -1)
-        return true;
-
-      //int groundCount = 0;
-      //for (int x = ep.X; x < ep.X + item.Width - 1; x++) {
-      //  for (int z = ep.Z; z < ep.Z + item.Depth - 1; z++) {
-      //    if (occupiedPoints[x,ep.Y-1, z] != -1)                                                     
-      //      groundCount++;
-      //  }
-      //}
-      //double stableGround = (double)(groundCount) / (double)(item.Width * item.Depth);
-      //if (stableGround > 0.75)
-      //  return true;
-
-      return false;
-    }
-    public override bool WeightIsSupported(CuboidPackingItem item, ThreeDimensionalPacking ep, ItemList<CuboidPackingItem> items) {
-      //Static stability is given, if item is placed on the ground
-      if (ep.Y == 0)
-        return true;
-
-      if (items[occupiedPoints[ep.X, ep.Y - 1, ep.Z]].SupportsStacking(item)
-        && items[occupiedPoints[ep.X + item.Width - 1, ep.Y - 1, ep.Z]].SupportsStacking(item)
-        && items[occupiedPoints[ep.X, ep.Y - 1, ep.Z + item.Depth - 1]].SupportsStacking(item)
-        && items[occupiedPoints[ep.X + item.Width - 1, ep.Y - 1, ep.Z + item.Depth - 1]].SupportsStacking(item))
-        return true;
-
-      //int groundCount = 0;
-      //for (int x = ep.X; x < ep.X + item.Width - 1; x++) {
-      //  for (int z = ep.Z; z < ep.Z + item.Depth - 1; z++) {
-      //    if (occupiedPoints[x,ep.Y-1, z] != -1)                                                     
-      //      groundCount++;
-      //  }
-      //}
-      //double stableGround = (double)(groundCount) / (double)(item.Width * item.Depth);
-      //if (stableGround > 0.75)
-      //  return true;
-
-      return false;
-    }
-    public override void ChangeBinMeasures(CuboidPackingBin binMeasures) {
-      int oldDepth = occupiedPoints.GetLength(2);
-      var newBinOccupation = new int[binMeasures.Width, binMeasures.Height, binMeasures.Depth];
-      for (int w = 0; w < binMeasures.Width; w++) {
-        for (int h = 0; h < binMeasures.Height; h++) {
-          for (int d = 0; d < binMeasures.Depth; d++) {
-            if (d < oldDepth)
-              newBinOccupation[w, h, d] = occupiedPoints[w, h, d];
-            else
-              newBinOccupation[w, h, d] = -1;
-          }
-        }
-      }
-      occupiedPoints = newBinOccupation;
-    }
-  }
-}
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking.cs	(revision 9596)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking.cs	(revision 9598)
@@ -105,4 +105,12 @@
     }
 
+
+    public int PointOccupation(D position) {
+      foreach (var ipEntry in ItemPositions) {
+        if (ItemMeasures[ipEntry.Key].EnclosesPoint(ipEntry.Value, position))
+          return ipEntry.Key;
+      }
+      return -1;
+    }
     public bool IsPointOccupied(D position) {
       foreach (var ipEntry in ItemPositions) {
@@ -110,9 +118,8 @@
           return true;
       }
-
       return false;
     }
     public bool IsPositionFeasible(I currentItem, D position) {
-      //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 item
+      //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
       if (!BinMeasures.Encloses(position, currentItem))
         return false;
@@ -127,11 +134,4 @@
     public abstract int ShortestPossibleSideFromPoint (D position);
     public abstract bool IsStaticStable (I item, D position);
-    
-    //public bool IsPositionFeasible1(I currentItem, D position) {
-    //  if (!BinMeasures.Encloses(position, currentItem))
-    //    return false;
-
-    //  return OccupiedPoints.IsPositionFeasible (currentItem, position);
-    //}
   }   
 }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking2D.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking2D.cs	(revision 9596)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking2D.cs	(revision 9598)
@@ -62,5 +62,5 @@
       if (sourcePointX.X < BinMeasures.Width && sourcePointX.Y < BinMeasures.Height) {
         //Traversing down the y-axis        
-        while (sourcePointX.Y > 0 && !IsPointOccupied(new TwoDimensionalPacking(0, sourcePointX.X, sourcePointX.Y - 1))) {
+        while (sourcePointX.Y > 0 && (-1).Equals(IsPointOccupied(new TwoDimensionalPacking(0, sourcePointX.X, sourcePointX.Y - 1)))) {
           sourcePointX.Y--;
         }
@@ -75,5 +75,5 @@
       if (sourcePointY.X < BinMeasures.Width && sourcePointY.Y < BinMeasures.Height) {
         //Traversing down the x-axis  
-        while (sourcePointY.X > 0 && !IsPointOccupied(new TwoDimensionalPacking (0,sourcePointY.X - 1, sourcePointY.Y))) {
+        while (sourcePointY.X > 0 && (-1).Equals(IsPointOccupied(new TwoDimensionalPacking (0,sourcePointY.X - 1, sourcePointY.Y)))) {
           sourcePointY.X--;
         }
@@ -166,5 +166,4 @@
     }
 
-
     public override int ShortestPossibleSideFromPoint(TwoDimensionalPacking position) {
       int shortestSide = int.MaxValue;
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking3D.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking3D.cs	(revision 9596)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking3D.cs	(revision 9598)
@@ -61,17 +61,25 @@
       var sourcePointX = new ThreeDimensionalPacking(0, position.X + newWidth, position.Y, position.Z);
       if (sourcePointX.X < BinMeasures.Width && sourcePointX.Y < BinMeasures.Height && sourcePointX.Z < BinMeasures.Depth) {
-        //Traversing down the y-axis                                                                            
-        int currentYValue = sourcePointX.Y;
-        while (currentYValue > 0 && !IsPointOccupied(new ThreeDimensionalPacking (0, sourcePointX.X, currentYValue, sourcePointX.Z))) {
-          currentYValue--;
-        }
-        ExtremePoints.Add(new ThreeDimensionalPacking(0, sourcePointX.X, currentYValue, sourcePointX.Z));
-
-        //Traversing down the z-axis
-        int currentZValue = sourcePointX.Z;
-        while (currentZValue > 0 && !IsPointOccupied(new ThreeDimensionalPacking (0, sourcePointX.X, sourcePointX.Y, currentZValue - 1))) {
-          currentZValue--;
-        }
-        ExtremePoints.Add(new ThreeDimensionalPacking(0, sourcePointX.X, sourcePointX.Y, currentZValue));
+        //Traversing down the y-axis            
+        ThreeDimensionalPacking current = new ThreeDimensionalPacking(0, sourcePointX.X, sourcePointX.Y, sourcePointX.Z);
+        while (current.Y > 0 && IsPointOccupied(ThreeDimensionalPacking.MoveDown (current))) {
+          current = ThreeDimensionalPacking.MoveDown(current);
+        }
+        ExtremePoints.Add((ThreeDimensionalPacking)current.Clone());
+        while (current.X > 0 && IsPointOccupied(ThreeDimensionalPacking.MoveLeft(current))) {
+          current = ThreeDimensionalPacking.MoveLeft(current);
+        }
+        ExtremePoints.Add(current);
+
+        //Traversing down the z-axis                 
+        current = new ThreeDimensionalPacking(0, sourcePointX.X, sourcePointX.Y, sourcePointX.Z);
+        while (current.Z > 0 && IsPointOccupied(ThreeDimensionalPacking.MoveBack (current))) {
+          current = ThreeDimensionalPacking.MoveBack(current);
+        }
+        ExtremePoints.Add((ThreeDimensionalPacking)current.Clone());
+        while (current.Y > 0 && IsPointOccupied(ThreeDimensionalPacking.MoveDown(current))) {
+          current = ThreeDimensionalPacking.MoveDown(current);
+        }
+        ExtremePoints.Add(current);
       }
 
@@ -82,17 +90,25 @@
       var sourcePointY = new ThreeDimensionalPacking(0, position.X, position.Y + newItem.Height, position.Z);
       if (sourcePointY.X < BinMeasures.Width && sourcePointY.Y < BinMeasures.Height && sourcePointY.Z < BinMeasures.Depth) {
-        //Traversing down the x-axis  
-        int currentXValue = sourcePointY.X;
-        while (currentXValue > 0 && !IsPointOccupied(new ThreeDimensionalPacking (0, currentXValue - 1, sourcePointY.Y, sourcePointY.Z))) {
-          currentXValue--;
-        }
-        ExtremePoints.Add(new ThreeDimensionalPacking(0, currentXValue, sourcePointY.Y, sourcePointY.Z));
-
-        //Traversing down the z-axis
-        int currentZValue = sourcePointY.Z;
-        while (currentZValue > 0 && !IsPointOccupied(new ThreeDimensionalPacking (0, sourcePointY.X, sourcePointY.Y, currentZValue - 1))) {
-          currentZValue--;
-        }
-        ExtremePoints.Add(new ThreeDimensionalPacking(0, sourcePointY.X, sourcePointY.Y, currentZValue));
+        //Traversing down the x-axis          
+        ThreeDimensionalPacking current = new ThreeDimensionalPacking(0, sourcePointY.X, sourcePointY.Y, sourcePointY.Z);
+        while (current.X > 0 && IsPointOccupied(ThreeDimensionalPacking.MoveLeft(current))) {
+          current = ThreeDimensionalPacking.MoveLeft(current);
+        }
+        ExtremePoints.Add((ThreeDimensionalPacking)current.Clone());
+        while (current.Y > 0 && IsPointOccupied(ThreeDimensionalPacking.MoveDown(current))) {
+          current = ThreeDimensionalPacking.MoveDown(current);
+        }
+        ExtremePoints.Add(current);
+
+        //Traversing down the z-axis                                                                   
+        current = new ThreeDimensionalPacking(0, sourcePointY.X, sourcePointY.Y, sourcePointY.Z);
+        while (current.Z > 0 && IsPointOccupied(ThreeDimensionalPacking.MoveBack(current))) {
+          current = ThreeDimensionalPacking.MoveBack(current);
+        }
+        ExtremePoints.Add((ThreeDimensionalPacking)current.Clone());
+        while (current.Y > 0 && IsPointOccupied(ThreeDimensionalPacking.MoveDown(current))) {
+          current = ThreeDimensionalPacking.MoveDown(current);
+        }
+        ExtremePoints.Add(current);
       }
 
@@ -104,17 +120,25 @@
       var sourcePointZ = new ThreeDimensionalPacking(0, position.X, position.Y, position.Z + newDepth);
       if (sourcePointZ.X < BinMeasures.Width && sourcePointZ.Y < BinMeasures.Height && sourcePointZ.Z < BinMeasures.Depth) {
-        //Traversing down the x-axis  
-        int currentXValue = sourcePointZ.X;
-        while (currentXValue > 0 && !IsPointOccupied(new ThreeDimensionalPacking (0, currentXValue - 1, sourcePointZ.Y, sourcePointZ.Z))) {
-          currentXValue--;
-        }
-        ExtremePoints.Add(new ThreeDimensionalPacking(0, currentXValue, sourcePointZ.Y, sourcePointZ.Z));
-
-        //Traversing down the y-axis                                                                            
-        int currentYValue = sourcePointZ.Y;
-        while (currentYValue > 0 && !IsPointOccupied(new ThreeDimensionalPacking (0, sourcePointZ.X, currentYValue, sourcePointZ.Z))) {
-          currentYValue--;
-        }
-        ExtremePoints.Add(new ThreeDimensionalPacking(0, sourcePointZ.X, currentYValue, sourcePointZ.Z));
+        //Traversing down the x-axis                                                                             
+        ThreeDimensionalPacking current = new ThreeDimensionalPacking(0, sourcePointZ.X, sourcePointZ.Y, sourcePointZ.Z);
+        while (current.X > 0 && IsPointOccupied(ThreeDimensionalPacking.MoveLeft(current))) {
+          current = ThreeDimensionalPacking.MoveLeft(current);
+        }
+        ExtremePoints.Add((ThreeDimensionalPacking)current.Clone());
+        while (current.Y > 0 && IsPointOccupied(ThreeDimensionalPacking.MoveDown(current))) {
+          current = ThreeDimensionalPacking.MoveDown(current);
+        }
+        ExtremePoints.Add(current);
+
+        //Traversing down the y-axis                                                                     
+        current = new ThreeDimensionalPacking(0, sourcePointZ.X, sourcePointZ.Y, sourcePointZ.Z);
+        while (current.Y > 0 && IsPointOccupied(ThreeDimensionalPacking.MoveDown(current))) {
+          current = ThreeDimensionalPacking.MoveDown(current);
+        }
+        ExtremePoints.Add((ThreeDimensionalPacking)current.Clone());
+        while (current.X > 0 && IsPointOccupied(ThreeDimensionalPacking.MoveLeft(current))) {
+          current = ThreeDimensionalPacking.MoveLeft(current);
+        }
+        ExtremePoints.Add(current);
       }
 
@@ -122,6 +146,6 @@
         OrderBy(ep => ep.Z).
         ThenBy(ep => ep.X).
-        ThenBy(ep => ep.Y).
-        ThenBy(ep => ShortestPossibleSideFromPoint(ep)));
+        ThenBy(ep => ep.Y)//.ThenBy(ep => ShortestPossibleSideFromPoint(ep)) 
+        );
     }
 
@@ -136,5 +160,8 @@
       int epIndex = 0;
       while (epIndex < ExtremePoints.Count && (
-        !IsPositionFeasible(item, ExtremePoints.ElementAt(epIndex)) || (stackingConstraints && !IsStaticStable(item, ExtremePoints.ElementAt(epIndex)))
+        !IsPositionFeasible(item, ExtremePoints.ElementAt(epIndex))
+        || !IsSupportedByAtLeastOnePoint(item, ExtremePoints.ElementAt(epIndex))
+        || (stackingConstraints && !IsStaticStable(item, ExtremePoints.ElementAt(epIndex)))
+        || (stackingConstraints && !IsWeightSupported(item, ExtremePoints.ElementAt(epIndex)))
       )) { epIndex++; }
 
@@ -146,4 +173,5 @@
       return null;
     }
+
     public override ThreeDimensionalPacking FindPositionBySliding(CuboidPackingItem measures, bool rotated) {
       //Starting-position at upper right corner (=left bottom point of item-rectangle is at position item.width,item.height)
@@ -217,17 +245,5 @@
       }
     }
-    
-
-    [Storable]
-    private bool depthWasDoubled = false;
-    public void DoubleDepth() {
-      if (!depthWasDoubled) {
-        var oldDepth = BinMeasures.Depth;
-        BinMeasures.Depth = BinMeasures.Depth * 2;
-        //OccupiedPoints.ChangeBinMeasures(BinMeasures);
-        depthWasDoubled = true;
-      }
-    }
-
+                                                   
     public override int ShortestPossibleSideFromPoint(ThreeDimensionalPacking position) {
 
@@ -265,7 +281,7 @@
 
       if (IsPointOccupied (new ThreeDimensionalPacking (0, position.X, position.Y - 1, position.Z))
-        && IsPointOccupied (new ThreeDimensionalPacking (0, position.X + item.Width - 1, position.Y - 1, position.Z))
-        && IsPointOccupied (new ThreeDimensionalPacking (0, position.X, position.Y - 1, position.Z + item.Depth - 1))
-        && IsPointOccupied (new ThreeDimensionalPacking (0, position.X + item.Width - 1, position.Y - 1, position.Z + item.Depth - 1)))
+        && IsPointOccupied (new ThreeDimensionalPacking (0, position.X + item.Width, position.Y - 1, position.Z))
+        && IsPointOccupied (new ThreeDimensionalPacking (0, position.X, position.Y - 1, position.Z + item.Depth))
+        && IsPointOccupied (new ThreeDimensionalPacking (0, position.X + item.Width, position.Y - 1, position.Z + item.Depth)))
         return true;
 
@@ -290,4 +306,41 @@
       return false;
     }
+
+
+    [Storable]
+    private bool depthWasDoubled = false;
+    public void DoubleDepth() {
+      if (!depthWasDoubled) {
+        var oldDepth = BinMeasures.Depth;
+        BinMeasures.Depth = BinMeasures.Depth * 2;
+        //OccupiedPoints.ChangeBinMeasures(BinMeasures);
+        depthWasDoubled = true;
+      }
+    }
+          
+    public bool IsSupportedByAtLeastOnePoint(CuboidPackingItem item, ThreeDimensionalPacking position) {
+      if (position.Y == 0)
+        return true;
+
+      int y = position.Y - 1;
+      for (int x = position.X; x < position.X + item.Width; x++)
+        for (int z = position.Z; z < position.Z + item.Depth; z++)
+          if (IsPointOccupied(new ThreeDimensionalPacking(0, x, y, z)))
+            return true;
+      
+      return false;
+    }
+    public bool IsWeightSupported(CuboidPackingItem item, ThreeDimensionalPacking ep) {
+      if (ep.Y == 0)
+        return true;
+
+      if (ItemMeasures[PointOccupation(new ThreeDimensionalPacking(0, ep.X, ep.Y - 1, ep.Z))].SupportsStacking(item)
+        && ItemMeasures[PointOccupation(new ThreeDimensionalPacking(0, ep.X + item.Width, ep.Y - 1, ep.Z))].SupportsStacking(item)
+        && ItemMeasures[PointOccupation(new ThreeDimensionalPacking(0, ep.X, ep.Y - 1, ep.Z + item.Depth))].SupportsStacking(item)
+        && ItemMeasures[PointOccupation(new ThreeDimensionalPacking(0, ep.X + item.Width, ep.Y - 1, ep.Z + item.Depth))].SupportsStacking(item))
+        return true;
+
+      return false;
+    }
   }
 }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Plugin.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Plugin.cs	(revision 9596)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Plugin.cs	(revision 9598)
@@ -26,5 +26,5 @@
   /// Plugin class for HeuristicLab.Problems.BinPacking plugin.
   /// </summary>
-  [Plugin("HeuristicLab.Problems.BinPacking", "3.3.7.9593")]
+  [Plugin("HeuristicLab.Problems.BinPacking", "3.3.7.9596")]
   [PluginFile("HeuristicLab.Problems.BinPacking-3.3.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Common", "3.3")]
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Problem/CuboidIdenticalBinPackingProblem.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Problem/CuboidIdenticalBinPackingProblem.cs	(revision 9596)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Problem/CuboidIdenticalBinPackingProblem.cs	(revision 9598)
@@ -145,4 +145,10 @@
       Load(DefaultInstance);
     }
+
+    protected override void RemoveTooBigItems() {
+      PackingItemMeasures.RemoveAll(pi => 
+        !PackingBinMeasures.Encloses (new ThreeDimensionalPacking(0, 0, 0, 0, false), pi) &&
+        !PackingBinMeasures.Encloses(new ThreeDimensionalPacking(0, 0, 0, 0, true), pi));
+    }
     #endregion
   }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Problem/RectangularIdenticalBinPackingProblem.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Problem/RectangularIdenticalBinPackingProblem.cs	(revision 9596)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Problem/RectangularIdenticalBinPackingProblem.cs	(revision 9598)
@@ -139,4 +139,10 @@
       Load(DefaultInstance);
     }
+
+    protected override void RemoveTooBigItems() {
+      PackingItemMeasures.RemoveAll(pi =>
+        !PackingBinMeasures.Encloses(new TwoDimensionalPacking(0, 0, 0, false), pi) &&
+        !PackingBinMeasures.Encloses(new TwoDimensionalPacking(0, 0, 0, true), pi));
+    }
     #endregion
   }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Problem/RegularIdenticalBinPackingProblem.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Problem/RegularIdenticalBinPackingProblem.cs	(revision 9596)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Problem/RegularIdenticalBinPackingProblem.cs	(revision 9598)
@@ -43,4 +43,5 @@
 using HeuristicLab.Problems.Instances;
 using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;
+using HeuristicLab.Problems.BinPacking.Dimensions;
 
 namespace HeuristicLab.Problems.BinPacking.Problem {
@@ -100,7 +101,9 @@
       ApplyHorizontalOrientation();
       SortItems();
+      RemoveTooBigItems();
       PackingItemsParameter.Value.Value = PackingItemMeasures.Count;
       LowerBoundParameter.Value.Value = CalculateLowerBound();
     }
+    protected abstract void RemoveTooBigItems();
     protected abstract void InitializeProblemData();
     protected abstract IPackingPlanEvaluator CreateDefaultEvaluator();
