Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/DBL/DeepestBottomLeftFunctions.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/DBL/DeepestBottomLeftFunctions.cs	(revision 9593)
+++ 	(revision )
@@ -1,239 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Collections;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.PackingEncoding.GroupingVector;
-using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;
-using HeuristicLab.Encodings.PackingEncoding.PackingPlan;
-using HeuristicLab.Encodings.PackingEncoding.PackingSequence;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Problems.BinPacking.Dimensions;
-using HeuristicLab.Problems.BinPacking.Interfaces;
-using HeuristicLab.Problems.BinPacking.PackingBin;
-using HeuristicLab.Problems.BinPacking.PackingItem;
-using HeuristicLab.Problems.BinPacking.Shapes;
-
-namespace HeuristicLab.Problems.BinPacking.Decoders {
-  public static class DeepestBottomLeftFunctions {
-
-    public static ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> DeepestLeftBottomPacking(MultiComponentVectorEncoding solution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-      int nrOfBins = solution.NrOfBins;
-
-      //Get all indexes of items for every bin according to grouping-vector
-      Dictionary<int, List<PackingInformation>> unpackedItemIndexesPerBin = new Dictionary<int, List<PackingInformation>>();
-
-      for (int i = 0; i < nrOfBins; i++) {
-        unpackedItemIndexesPerBin[i] = new List<PackingInformation>(solution.PackingInformations[i]);
-      }
-
-      ObservableDictionary<int, ThreeDimensionalPacking> itemPositions = new ObservableDictionary<int, ThreeDimensionalPacking>();
-      var remainingItems = new List<PackingInformation>();
-
-      //Iterate over all bin-lists
-      for (int binNr = 0; binNr < nrOfBins; binNr++) {
-        //Iterate over the current bin-item-list and find feasible positions in the current bin for each item
-        var unpackedItems = unpackedItemIndexesPerBin[binNr];
-        for (int i = 0; i < unpackedItems.Count; i++) {
-          var itemIndex = unpackedItems[i].ItemID;
-          var item = itemMeasures[itemIndex];
-          ThreeDimensionalPacking position = null;
-
-          position = DeepestBottomLeftFunctions.DeepestLeftBottomPosition(binMeasures, binNr, item, itemPositions, itemMeasures, unpackedItems[i].Rotated);
-
-          if (position == null) {
-            position = DeepestBottomLeftFunctions.DeepestLeftBottomPosition(binMeasures, binNr, item, itemPositions, itemMeasures, !unpackedItems[i].Rotated);
-          }
-          if (position == null) {
-            remainingItems.Add(unpackedItems[i]);
-            solution.PackingInformations[binNr].Remove(unpackedItems[i]);
-          } else {
-            itemPositions[itemIndex] = position;
-            solution.PackingInformations[binNr].Find(pi => pi.ItemID == itemIndex).Rotated = position.Rotated;
-          }
-        }
-      }
-
-      //Packing of remaining items
-      //Iterate over all bin-lists
-      for (int binNr = 0; binNr < nrOfBins && remainingItems.Count > 0; binNr++) {
-        var unpackedItems = new List<PackingInformation>(remainingItems);
-        for (int i = 0; i < unpackedItems.Count; i++) {
-          var itemIndex = unpackedItems[i].ItemID;
-          var item = itemMeasures[itemIndex];
-          ThreeDimensionalPacking position = null;
-
-          //Look for space in current bin
-          position = DeepestBottomLeftFunctions.DeepestLeftBottomPosition(binMeasures, binNr, item, itemPositions, itemMeasures, unpackedItems[i].Rotated);
-
-          if (position == null) {
-            position = DeepestBottomLeftFunctions.DeepestLeftBottomPosition(binMeasures, binNr, item, itemPositions, itemMeasures, !unpackedItems[i].Rotated);
-          }
-          if (position != null) {
-            itemPositions[itemIndex] = position;
-            remainingItems.Remove(unpackedItems[i]);
-            solution.PackingInformations[binNr].Add(unpackedItems[i]);
-            solution.PackingInformations[binNr].Find(pi => pi.ItemID == itemIndex).Rotated = position.Rotated;
-          }
-        }
-        if (remainingItems.Count > 0 && binNr + 1 >= nrOfBins) {
-          solution.PackingInformations[nrOfBins] = new ItemList<PackingInformation>();
-          nrOfBins++;
-        }
-      }
-
-      return BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>.GetBinPackings(itemPositions, binMeasures, itemMeasures, nrOfBins);
-    }
-
-    public static ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> DeepestLeftBottomPacking(GroupingVectorEncoding solution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-      int nrOfBins = solution.GroupingVector.Max() + 1;
-
-      //Get all indexes of items for every bin according to grouping-vector
-      //It is assumed, that at this point the item-indexes are sorted according to their item-size!
-      Dictionary<int, List<int>> unpackedItemIndexesPerBin = new Dictionary<int, List<int>>();
-
-      for (int i = 0; i < nrOfBins; i++) {
-        unpackedItemIndexesPerBin[i] = solution.GroupingVector
-          .Select((Value, Index) => new { Value, Index })
-          .Where(temp => temp.Value == i)
-          .Select(temp => temp.Index).ToList();
-      }
-
-      ObservableDictionary<int, ThreeDimensionalPacking> itemPositions = new ObservableDictionary<int, ThreeDimensionalPacking>();
-      var remainingItems = new List<int>();
-
-      //Iterate over all bin-lists
-      for (int binNr = 0; binNr < nrOfBins; binNr++) {
-        //Iterate over the current bin-item-list and find feasible positions in the current bin for each item
-        var unpackedItems = unpackedItemIndexesPerBin[binNr];
-        for (int i = 0; i < unpackedItems.Count; i++) {
-          var itemIndex = unpackedItems[i];
-          var item = itemMeasures[itemIndex];
-          ThreeDimensionalPacking position = null;
-
-          position = DeepestBottomLeftFunctions.DeepestLeftBottomPosition(binMeasures, binNr, item, itemPositions, itemMeasures);
-
-          if (position == null) {
-            remainingItems.Add(itemIndex);
-          } else
-            itemPositions[itemIndex] = position;
-        }
-      }
-
-      //Packing of remaining items
-      //Iterate over all bin-lists
-      for (int binNr = 0; binNr < nrOfBins && remainingItems.Count > 0; binNr++) {
-        var unpackedItems = new List<int>(remainingItems);
-        for (int i = 0; i < unpackedItems.Count; i++) {
-          var itemIndex = unpackedItems[i];
-          var item = itemMeasures[itemIndex];
-          ThreeDimensionalPacking position = null;
-
-          //Look for space in current bin
-          position = DeepestBottomLeftFunctions.DeepestLeftBottomPosition(binMeasures, binNr, item, itemPositions, itemMeasures);
-
-          if (position != null) {
-            itemPositions[itemIndex] = position;
-            remainingItems.Remove(itemIndex);
-            //solution.GroupingVector[itemIndex] = binNr;
-          }
-        }
-        if (remainingItems.Count > 0 && binNr + 1 >= nrOfBins) {
-          nrOfBins++;
-        }
-      }
-
-      return BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>.GetBinPackings(itemPositions, binMeasures, itemMeasures, nrOfBins);
-    }
-
-    public static ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> DeepestLeftBottomPacking(PackingSequenceEncoding solution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-      ObservableDictionary<int, ThreeDimensionalPacking> itemPositions = new ObservableDictionary<int, ThreeDimensionalPacking>();
-      int nrOfBins = 1;
-      for (int i = 0; i < solution.PackingSequence.Length; i++) {
-        var item = itemMeasures[solution.PackingSequence[i]];
-        ThreeDimensionalPacking position = null;
-        //Look for space in existing bins
-        for (int binNr = 0; binNr < nrOfBins; binNr++) {
-          position = DeepestBottomLeftFunctions.DeepestLeftBottomPosition(binMeasures, binNr, item, itemPositions, itemMeasures);
-          if (position != null)
-            break;
-        }
-        //Did not find enough space in any of the existing bins => create new bin
-        if (position == null) {
-          nrOfBins++;
-          position = DeepestBottomLeftFunctions.DeepestLeftBottomPosition(binMeasures, nrOfBins - 1, item, itemPositions, itemMeasures);
-        }
-
-        if (position == null)
-          position = new ThreeDimensionalPacking(-1, 0, 0, 0);
-
-        itemPositions[solution.PackingSequence[i]] = position;
-      }
-
-      return BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>.GetBinPackings(itemPositions, binMeasures, itemMeasures, nrOfBins);
-    }
-
-    public static ThreeDimensionalPacking DeepestLeftBottomPosition(CuboidPackingBin binMeasures, int binNr, CuboidPackingItem currentItem, ObservableDictionary<int, ThreeDimensionalPacking> itemPositions, ItemList<CuboidPackingItem> itemMeasures) {
-      return DeepestLeftBottomPosition(binMeasures, binNr, currentItem, itemPositions, itemMeasures, false);
-    }
-    public static ThreeDimensionalPacking DeepestLeftBottomPosition(CuboidPackingBin binMeasures, int binNr, CuboidPackingItem currentItem, ObservableDictionary<int, ThreeDimensionalPacking> itemPositions, ItemList<CuboidPackingItem> itemMeasures, bool rotated) {
-      //Starting-position at upper right corner (=left bottom point of item-rectangle is at position item.width,item.height)
-      ThreeDimensionalPacking currentPosition = new ThreeDimensionalPacking(binNr, 
-        binMeasures.Width - (rotated ? currentItem.Depth : currentItem.Width), 
-        binMeasures.Height - currentItem.Height, 
-        binMeasures.Depth - (rotated ? currentItem.Width : currentItem.Depth), rotated);
-      //Slide the item as far as possible to the bottom
-      while (IsPositionFeasible(binMeasures, binNr, currentItem, MoveDown(currentPosition), itemPositions, itemMeasures)
-        || IsPositionFeasible(binMeasures, binNr, currentItem, MoveLeft(currentPosition), itemPositions, itemMeasures)
-        || IsPositionFeasible(binMeasures, binNr, currentItem, MoveBack(currentPosition), itemPositions, itemMeasures)) {
-        //Slide the item as far as possible to the left
-          while (IsPositionFeasible(binMeasures, binNr, currentItem, MoveLeft(currentPosition), itemPositions, itemMeasures)
-          || IsPositionFeasible(binMeasures, binNr, currentItem, MoveBack(currentPosition), itemPositions, itemMeasures)) {
-          //Slide the item as far as possible to the back
-            while (IsPositionFeasible(binMeasures, binNr, currentItem, MoveBack(currentPosition), itemPositions, itemMeasures)) {
-            currentPosition = MoveBack(currentPosition);
-          }
-            if (IsPositionFeasible(binMeasures, binNr, currentItem, MoveLeft(currentPosition), itemPositions, itemMeasures))
-            currentPosition = MoveLeft(currentPosition);
-        }
-          if (IsPositionFeasible(binMeasures, binNr, currentItem, MoveDown(currentPosition), itemPositions, itemMeasures))
-          currentPosition = MoveDown(currentPosition);
-      }
-
-      return IsPositionFeasible(binMeasures, binNr, currentItem, currentPosition, itemPositions, itemMeasures) ? currentPosition : null;
-    }
-
-    
-
-    public static bool IsPositionFeasible(CuboidPackingBin binMeasures, int binNr, CuboidPackingItem currentItem,
-      ThreeDimensionalPacking currentPosition, ObservableDictionary<int, ThreeDimensionalPacking> itemPositions, ItemList<CuboidPackingItem> itemMeasures) {
-      //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
-      if (!binMeasures.Encloses(currentPosition, currentItem))
-        return false;
-
-      var itemsWithPositions = itemMeasures.
-        Select((Value, Index) => new { Value, Index }).
-        Where(s => itemPositions.ContainsKey(s.Index)).
-        Select((s) => new { Measures = itemMeasures[s.Index], Position = itemPositions[s.Index] });
-
-      foreach (var itemWithPosition in itemsWithPositions) {
-        if (itemWithPosition.Position.AssignedBin == binNr && itemWithPosition.Measures.Overlaps(itemWithPosition.Position, currentPosition, currentItem))
-          return false;
-      }
-
-      return true;
-    }
-
-    private static ThreeDimensionalPacking MoveLeft(ThreeDimensionalPacking original) {
-      return new ThreeDimensionalPacking(original.AssignedBin, original.X - 1, original.Y, original.Z, original.Rotated);
-    }
-    private static ThreeDimensionalPacking MoveDown(ThreeDimensionalPacking original) {
-      return new ThreeDimensionalPacking(original.AssignedBin, original.X, original.Y - 1, original.Z, original.Rotated);
-    }
-    private static ThreeDimensionalPacking MoveBack(ThreeDimensionalPacking original) {
-      return new ThreeDimensionalPacking(original.AssignedBin, original.X, original.Y, original.Z - 1, original.Rotated);
-    }
-
-  }
-}
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/DBL/DeepestBottomLeftGroupingVectorDecoder.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/DBL/DeepestBottomLeftGroupingVectorDecoder.cs	(revision 9593)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/DBL/DeepestBottomLeftGroupingVectorDecoder.cs	(revision 9596)
@@ -38,15 +38,8 @@
 
 namespace HeuristicLab.Problems.BinPacking.Decoders {
-  [Item("Identical bin three dimensional direct grouping vector decoder", "<Description missing...>")]
+  [Item("Identical bin, three dimensional, GroupingVector-decoder", "<Description missing...>")]
   [StorableClass]
-  public class DeepestBottomLeftGroupingVectorDecoder : PackingSolutionDecoder<
-      ThreeDimensionalPacking,
-      CuboidPackingBin,
-      CuboidPackingItem>, I3DGVDecoder {
-
-    public DeepestBottomLeftGroupingVectorDecoder()
-      : base() {
-        //EncodedSolutionParameter.ActualName = "EncodedSolution";
-    }
+  public class DeepestBottomLeftGroupingVectorDecoder : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>, I3DGVDecoder {
+    public DeepestBottomLeftGroupingVectorDecoder() : base() {}
     [StorableConstructor]
     protected DeepestBottomLeftGroupingVectorDecoder(bool deserializing) : base(deserializing) { }
@@ -58,14 +51,9 @@
     }
 
-
     public override PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-
       var solution = encodedSolution as GroupingVectorEncoding;
       if (solution == null) throw new InvalidOperationException("Encoding is not of type GroupingVector");
-
-      PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> result = new PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>(binMeasures);
-
-      result.BinPackings = ThreeDimensionalPackingFunctions.DeepestLeftBottomPacking(solution, binMeasures, itemMeasures);
-
+      PackingPlan3D result = new PackingPlan3D(binMeasures);
+      result.Pack(solution, itemMeasures);
       return result;
     }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/DBL/DeepestBottomLeftMultiComponentVectorDecoder.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/DBL/DeepestBottomLeftMultiComponentVectorDecoder.cs	(revision 9593)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/DBL/DeepestBottomLeftMultiComponentVectorDecoder.cs	(revision 9596)
@@ -39,15 +39,8 @@
 
 namespace HeuristicLab.Problems.BinPacking.Decoders {
-  [Item("Identical bin three dimensional multi component vector decoder", "<Description missing...>")]
+  [Item("Identical bin, three dimensional, MultiComponentVector-decoder", "<Description missing...>")]
   [StorableClass]
-  public class DeepestBottomLeftMultiComponentVectorDecoder : PackingSolutionDecoder<
-      ThreeDimensionalPacking,
-      CuboidPackingBin,
-      CuboidPackingItem>, I3DMCVDecoder {
-
-    public DeepestBottomLeftMultiComponentVectorDecoder()
-      : base() {
-        //EncodedSolutionParameter.ActualName = "EncodedSolution";
-    }
+  public class DeepestBottomLeftMultiComponentVectorDecoder : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>, I3DMCVDecoder {
+    public DeepestBottomLeftMultiComponentVectorDecoder() : base() { }
     [StorableConstructor]
     protected DeepestBottomLeftMultiComponentVectorDecoder(bool deserializing) : base(deserializing) { }
@@ -59,15 +52,9 @@
     }
 
-
     public override PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-
       var solution = encodedSolution as MultiComponentVectorEncoding;
       if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponent Vector");
-
-      PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> result = 
-        new PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>(binMeasures);
-
-      result.BinPackings = ThreeDimensionalPackingFunctions.DeepestLeftBottomPacking(solution, binMeasures, itemMeasures);
-
+      PackingPlan3D result = new PackingPlan3D(binMeasures);
+      result.Pack(solution, itemMeasures);
       return result;
     }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/DBL/DeepestBottomLeftPackingSequenceDecoder.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/DBL/DeepestBottomLeftPackingSequenceDecoder.cs	(revision 9593)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/DBL/DeepestBottomLeftPackingSequenceDecoder.cs	(revision 9596)
@@ -38,15 +38,8 @@
 
 namespace HeuristicLab.Problems.BinPacking.Decoders {
-  [Item("Identical bin, three dimensional, direct permutation decoder", "<Description missing...>")]
+  [Item("Identical bin, three dimensional, PackingSequence-decoder", "<Description missing...>")]
   [StorableClass]
-  public class DeepestBottomLeftPackingSequenceDecoder : PackingSolutionDecoder<
-      ThreeDimensionalPacking,
-      CuboidPackingBin,
-      CuboidPackingItem>, I3DPSDecoder {
-
-    public DeepestBottomLeftPackingSequenceDecoder()
-      : base() {
-        //EncodedSolutionParameter.ActualName = "EncodedSolution";
-    }
+  public class DeepestBottomLeftPackingSequenceDecoder : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>, I3DPSDecoder {
+    public DeepestBottomLeftPackingSequenceDecoder(): base() {}
     [StorableConstructor]
     protected DeepestBottomLeftPackingSequenceDecoder(bool deserializing) : base(deserializing) { }
@@ -58,15 +51,9 @@
     }
 
-
     public override PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-
       var solution = encodedSolution as PackingSequenceEncoding;
       if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence");
-
-      PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> result = 
-        new PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>(binMeasures);
-
-      result.BinPackings = ThreeDimensionalPackingFunctions.DeepestLeftBottomPacking(solution, binMeasures, itemMeasures);
-
+      PackingPlan3D result = new PackingPlan3D(binMeasures);
+      result.Pack(solution, itemMeasures);
       return result;
     }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ExtremePointGroupingVectorDecoder3D.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ExtremePointGroupingVectorDecoder3D.cs	(revision 9593)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ExtremePointGroupingVectorDecoder3D.cs	(revision 9596)
@@ -42,17 +42,6 @@
   [Item("Identical bin, three dimensional, extreme points based decoder for the GroupingVector encoding.", "<Description missing...>")]
   [StorableClass]
-  public class ExtremePointGroupingVectorDecoder3D : PackingSolutionDecoder<
-      ThreeDimensionalPacking,
-      CuboidPackingBin,
-      CuboidPackingItem>, I3DGVDecoder {
-
-    public ValueParameter<BoolValue> StackingConstraintsParameter {
-      get { return (ValueParameter<BoolValue>)Parameters["StackingConstraint"]; }
-    }
-
-    public ExtremePointGroupingVectorDecoder3D ()
-      : base() {
-      Parameters.Add(new ValueParameter<BoolValue>("StackingConstraint", "A flag determining whether stackingconstraints should be enforced or not."));
-    }
+  public class ExtremePointGroupingVectorDecoder3D : PackingSolutionDecoder< ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>, I3DGVDecoder {
+    public ExtremePointGroupingVectorDecoder3D () : base() { }
     [StorableConstructor]
     protected ExtremePointGroupingVectorDecoder3D (bool deserializing) : base(deserializing) { }
@@ -65,17 +54,12 @@
 
     public static PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> Decode(GroupingVectorEncoding solution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures, bool stackingConstraints) {
-      PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> result =
-        new PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>(binMeasures);
-
-      result.BinPackings = ThreeDimensionalPackingFunctions.ExtremePointBasedPacking(solution, itemMeasures, binMeasures, stackingConstraints);
-
+      PackingPlan3D result = new PackingPlan3D(binMeasures, true, stackingConstraints);
+      result.Pack(solution, itemMeasures);
       return result;
     }
 
     public override PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-                      
       var solution = encodedSolution as GroupingVectorEncoding;
       if (solution == null) throw new InvalidOperationException("Encoding is not of type GroupingVector");
-
       return Decode(solution, binMeasures, itemMeasures, StackingConstraintsParameter.Value.Value);
     }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ExtremePointMultiComponentVectorDecoder3D.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ExtremePointMultiComponentVectorDecoder3D.cs	(revision 9593)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ExtremePointMultiComponentVectorDecoder3D.cs	(revision 9596)
@@ -43,17 +43,6 @@
   [Item("Identical bin, three dimensional, extreme points based decoder for the MultiComponentVector encoding.", "<Description missing...>")]
   [StorableClass]
-  public class ExtremePointMultiComponentVectorDecoder3D : PackingSolutionDecoder<
-      ThreeDimensionalPacking,
-      CuboidPackingBin,
-      CuboidPackingItem>, I3DMCVDecoder {
-
-    public ValueParameter<BoolValue> StackingConstraintsParameter {
-      get { return (ValueParameter<BoolValue>)Parameters["StackingConstraint"]; }
-    }
-
-    public ExtremePointMultiComponentVectorDecoder3D ()
-      : base() {
-      Parameters.Add(new ValueParameter<BoolValue>("StackingConstraint", "A flag determining whether stackingconstraints should be enforced or not."));
-    }
+  public class ExtremePointMultiComponentVectorDecoder3D : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>, I3DMCVDecoder {
+    public ExtremePointMultiComponentVectorDecoder3D () : base() { }
     [StorableConstructor]
     protected ExtremePointMultiComponentVectorDecoder3D (bool deserializing) : base(deserializing) { }
@@ -66,17 +55,12 @@
 
     public static PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> Decode(MultiComponentVectorEncoding solution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures, bool stackingConstraints) {
-      PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> result =
-        new PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>(binMeasures);
-
-      result.BinPackings = ThreeDimensionalPackingFunctions.ExtremePointBasedPacking(solution, itemMeasures, binMeasures, stackingConstraints);
-
+      PackingPlan3D result = new PackingPlan3D(binMeasures, true, stackingConstraints);
+      result.Pack(solution, itemMeasures);
       return result;
     }
 
     public override PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-
       var solution = encodedSolution as MultiComponentVectorEncoding;
       if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponentVector");
-
       return Decode(solution, binMeasures, itemMeasures, StackingConstraintsParameter.Value.Value);
     }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ExtremePointPackingSequenceDecoder3D.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ExtremePointPackingSequenceDecoder3D.cs	(revision 9593)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ExtremePointPackingSequenceDecoder3D.cs	(revision 9596)
@@ -41,17 +41,6 @@
   [Item("Identical bin, three dimensional, extreme points based decoder for the PackingSequence encoding.", "<Description missing...>")]
   [StorableClass]
-  public class ExtremePointPackingSequenceDecoder3D : PackingSolutionDecoder<
-      ThreeDimensionalPacking,
-      CuboidPackingBin,
-      CuboidPackingItem>, I3DPSDecoder {
-
-    public ValueParameter<BoolValue> StackingConstraintsParameter {
-      get { return (ValueParameter<BoolValue>)Parameters["StackingConstraint"]; }
-    }
-
-    public ExtremePointPackingSequenceDecoder3D ()
-      : base() {
-        Parameters.Add(new ValueParameter<BoolValue>("StackingConstraint", "A flag determining whether stackingconstraints should be enforced or not."));
-    }
+  public class ExtremePointPackingSequenceDecoder3D : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>, I3DPSDecoder {
+    public ExtremePointPackingSequenceDecoder3D () : base() {}
     [StorableConstructor]
     protected ExtremePointPackingSequenceDecoder3D (bool deserializing) : base(deserializing) { }
@@ -65,13 +54,8 @@
 
     public override PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-
       var solution = encodedSolution as PackingSequenceEncoding;
       if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence");
-
-      PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> result = 
-        new PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>(binMeasures);
-
-      result.BinPackings = ThreeDimensionalPackingFunctions.ExtremePointBasedPacking(solution, itemMeasures, binMeasures, StackingConstraintsParameter.Value.Value); 
-
+      PackingPlan3D result = new PackingPlan3D(binMeasures, true, StackingConstraintsParameter.Value.Value);
+      result.Pack(solution, itemMeasures); 
       return result;
     }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ExtremePointsFunctions3D.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ExtremePointsFunctions3D.cs	(revision 9593)
+++ 	(revision )
@@ -1,451 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Collections;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.IntegerVectorEncoding;
-using HeuristicLab.Encodings.PackingEncoding.GroupingVector;
-using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;
-using HeuristicLab.Encodings.PackingEncoding.PackingPlan;
-using HeuristicLab.Encodings.PackingEncoding.PackingSequence;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Problems.BinPacking.Dimensions;
-using HeuristicLab.Problems.BinPacking.Interfaces;
-using HeuristicLab.Problems.BinPacking.PackingBin;
-using HeuristicLab.Problems.BinPacking.PackingItem;
-using HeuristicLab.Problems.BinPacking.Shapes;
-
-namespace HeuristicLab.Problems.BinPacking.Decoders {
-  public static class ExtremePointsFunctions3D {
-
-
-    public static ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> ExtremePointBasedPacking(ref MultiComponentVectorEncoding solution, 
-        ItemList<CuboidPackingItem> itemMeasures, CuboidPackingBin binMeasures, bool stackingConstraints) {
-
-      #region Preperations
-      int nrOfBins = solution.NrOfBins;
-
-      //Get all indexes of items for every bin according to grouping-vector                      
-      Dictionary<int, List<PackingInformation>> unpackedItemIndexesPerBin = new Dictionary<int, List<PackingInformation>>();
-      Dictionary<int, HashSet<ThreeDimensionalPacking>> extremePointsForBin = new Dictionary<int, HashSet<ThreeDimensionalPacking>>();
-      var occupiedPoints = new List<int[, ,]>();
-
-      for (int i = 0; i < nrOfBins; i++) {        
-        unpackedItemIndexesPerBin[i] = new List<PackingInformation> (solution.PackingInformations[i]);
-
-        extremePointsForBin[i] = new HashSet<ThreeDimensionalPacking>();
-        extremePointsForBin[i].Add(new ThreeDimensionalPacking(i, 0, 0, 0, false));
-        occupiedPoints = IncreaseBinCountForOccupiedPoints(occupiedPoints, binMeasures);
-      }
-
-      ObservableDictionary<int, ThreeDimensionalPacking> itemPositions = new ObservableDictionary<int, ThreeDimensionalPacking>();
-      var remainingItems = new List<PackingInformation>();
-
-      #endregion Preperations
-
-
-      //Iterate over all bin-lists
-      for (int binNr = 0; binNr < nrOfBins; binNr++) {
-        //Iterate over the current bin-item-list and find feasible positions in the current bin for each item
-        var unpackedItems = unpackedItemIndexesPerBin[binNr];
-        for (int i = 0; i < unpackedItems.Count; i++) {
-          var itemIndex = unpackedItems[i].ItemID;
-          var item = itemMeasures[itemIndex];
-
-          extremePointsForBin[binNr] = OrderExtremePoints(extremePointsForBin[binNr], occupiedPoints, binMeasures);
-          var positionFound = FindExtremePointForItem(itemIndex, itemMeasures, binMeasures, extremePointsForBin[binNr], occupiedPoints, itemPositions, unpackedItems[i].Rotated);
-          if (positionFound != null) {
-            extremePointsForBin[binNr].Remove(positionFound);
-            itemPositions[itemIndex] = positionFound;
-            occupiedPoints = OccupyPointsForNewItem(occupiedPoints, item, positionFound, itemIndex);
-            extremePointsForBin[binNr] = GenerateNewExtremePointsForNewItem(extremePointsForBin[binNr], occupiedPoints, item, positionFound, binMeasures);
-          } else {
-            remainingItems.Add(unpackedItems[i]);
-            solution.PackingInformations[binNr].Remove(unpackedItems[i]);
-          }
-        }
-      }
-
-
-      //Packing of remaining items    
-      //Iterate over all bin-lists
-      for (int binNr = 0; binNr < nrOfBins && remainingItems.Count > 0; binNr++) {
-        var unpackedItems = new List<PackingInformation>(remainingItems);
-        //Iterate over all the remaining items
-        for (int i = 0; i < unpackedItems.Count; i++) {
-          var itemIndex = unpackedItems[i].ItemID;
-          var item = itemMeasures[itemIndex];
-
-          extremePointsForBin[binNr] = OrderExtremePoints(extremePointsForBin[binNr], occupiedPoints, binMeasures);
-          var positionFound = FindExtremePointForItem(itemIndex, itemMeasures, binMeasures, extremePointsForBin[binNr], occupiedPoints, itemPositions, unpackedItems[i].Rotated);
-          if (positionFound != null) {
-            extremePointsForBin[binNr].Remove(positionFound);
-            itemPositions[itemIndex] = positionFound;
-            occupiedPoints = OccupyPointsForNewItem(occupiedPoints, item, positionFound, itemIndex);
-            extremePointsForBin[binNr] = GenerateNewExtremePointsForNewItem(extremePointsForBin[binNr], occupiedPoints, item, positionFound, binMeasures);      
-            remainingItems.Remove(unpackedItems[i]);
-            solution.PackingInformations[binNr].Add(unpackedItems[i]);
-          }
-        }
-        if (remainingItems.Count > 0 && binNr + 1 >= nrOfBins) {
-          extremePointsForBin[nrOfBins] = new HashSet<ThreeDimensionalPacking>();
-          extremePointsForBin[nrOfBins].Add(new ThreeDimensionalPacking(nrOfBins, 0, 0, 0, false));
-          occupiedPoints = IncreaseBinCountForOccupiedPoints(occupiedPoints, binMeasures);
-          solution.PackingInformations[nrOfBins] = new ItemList<PackingInformation>();
-          nrOfBins++;
-        }
-      }
-
-      return BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>.GetBinPackings(itemPositions, binMeasures, itemMeasures, nrOfBins);
-    }
-
-
-    public static ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> ExtremePointBasedPacking(GroupingVectorEncoding solution,
-        ItemList<CuboidPackingItem> itemMeasures, CuboidPackingBin binMeasures, bool stackingConstraints) {
-
-      #region Preperations
-      int nrOfBins = solution.GroupingVector.Max() + 1;
-
-      //Get all indexes of items for every bin according to grouping-vector
-      Dictionary<int, List<int>> unpackedItemIndexesPerBin = new Dictionary<int, List<int>>();   
-      Dictionary<int, HashSet<ThreeDimensionalPacking>> extremePointsForBin = new Dictionary<int, HashSet<ThreeDimensionalPacking>>(); 
-      var occupiedPoints = new List<int[, ,]>();
-
-      for (int i = 0; i < nrOfBins; i++) {
-        unpackedItemIndexesPerBin[i] = solution.GroupingVector
-          .Select((Value, Index) => new { Value, Index })
-          .Where(temp => temp.Value == i)
-          .Select(temp => temp.Index).ToList();
-
-        extremePointsForBin[i] = new HashSet<ThreeDimensionalPacking>();
-        extremePointsForBin[i].Add(new ThreeDimensionalPacking(i, 0, 0, 0, false));    
-        occupiedPoints = IncreaseBinCountForOccupiedPoints(occupiedPoints, binMeasures);
-      }
-
-      ObservableDictionary<int, ThreeDimensionalPacking> itemPositions = new ObservableDictionary<int, ThreeDimensionalPacking>();
-      var remainingItems = new List<int>();
-
-      #endregion Preperations
-
-              
-
-      //Iterate over all bin-lists
-      for (int binNr = 0; binNr < nrOfBins; binNr++) {
-        //Iterate over the current bin-item-list and find feasible positions in the current bin for each item
-        var unpackedItems = unpackedItemIndexesPerBin[binNr];
-        for (int i = 0; i < unpackedItems.Count; i++) {
-          var itemIndex = unpackedItems[i];
-          var item = itemMeasures[itemIndex];
-
-          extremePointsForBin[binNr] = OrderExtremePoints(extremePointsForBin[binNr], occupiedPoints, binMeasures);
-          var positionFound = FindExtremePointForItem(itemIndex, itemMeasures, binMeasures, extremePointsForBin[binNr], occupiedPoints, itemPositions, stackingConstraints);
-          if (positionFound != null) {
-            extremePointsForBin[binNr].Remove(positionFound);
-            itemPositions[itemIndex] = positionFound;
-            occupiedPoints = OccupyPointsForNewItem(occupiedPoints, item, positionFound, itemIndex);
-            extremePointsForBin[binNr] = GenerateNewExtremePointsForNewItem(extremePointsForBin[binNr], occupiedPoints, item, positionFound, binMeasures);
-          } else 
-            remainingItems.Add(itemIndex);
-        }
-      }
-
-
-
-      //Packing of remaining items    
-      //Iterate over all bin-lists
-      for (int binNr = 0; binNr < nrOfBins && remainingItems.Count > 0; binNr++) {
-        var unpackedItems = new List<int>(remainingItems);
-        //Iterate over all the remaining items
-        for (int i = 0; i < unpackedItems.Count; i++) {
-          var itemIndex = unpackedItems[i];
-          var item = itemMeasures[itemIndex];
-
-          extremePointsForBin[binNr] = OrderExtremePoints(extremePointsForBin[binNr], occupiedPoints, binMeasures);
-          var positionFound = FindExtremePointForItem(itemIndex, itemMeasures, binMeasures, extremePointsForBin[binNr], occupiedPoints, itemPositions, stackingConstraints);
-          if (positionFound != null) {
-            extremePointsForBin[binNr].Remove(positionFound);
-            itemPositions[itemIndex] = positionFound;
-            occupiedPoints = OccupyPointsForNewItem(occupiedPoints, item, positionFound, itemIndex);
-            extremePointsForBin[binNr] = GenerateNewExtremePointsForNewItem(extremePointsForBin[binNr], occupiedPoints, item, positionFound, binMeasures);        
-            remainingItems.Remove(itemIndex);
-          } 
-        }
-        if (remainingItems.Count > 0 && binNr + 1 >= nrOfBins) {
-          extremePointsForBin[nrOfBins] = new HashSet<ThreeDimensionalPacking>();
-          extremePointsForBin[nrOfBins].Add(new ThreeDimensionalPacking(nrOfBins, 0, 0, 0, false));
-          occupiedPoints = IncreaseBinCountForOccupiedPoints(occupiedPoints, binMeasures);
-          nrOfBins++;
-        }
-      }
-
-      return BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>.GetBinPackings(itemPositions, binMeasures, itemMeasures, nrOfBins);
-    }
-
-
-    public static ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> ExtremePointBasedPacking(PackingSequenceEncoding solution,
-        ItemList<CuboidPackingItem> itemMeasures, CuboidPackingBin binMeasures, bool stackingConstraints) {
-
-      #region Preperations 
-      var itemPositions = new ObservableDictionary<int, ThreeDimensionalPacking>();  
-      int nrOfBins = 1;
-
-      var occupiedPoints = new List<int[, ,]>();
-      occupiedPoints = IncreaseBinCountForOccupiedPoints(occupiedPoints, binMeasures);
-
-      HashSet<ThreeDimensionalPacking> extremePoints = new HashSet<ThreeDimensionalPacking>();
-      extremePoints.Add(new ThreeDimensionalPacking(0, 0, 0, 0, false));
-      #endregion
-
-      foreach (int itemIndex in solution.PackingSequence) {
-        var item = itemMeasures[itemIndex];
-        extremePoints = OrderExtremePoints(extremePoints, occupiedPoints, binMeasures);
-        var positionFound = FindExtremePointForItem(itemIndex, itemMeasures, binMeasures, extremePoints, occupiedPoints, itemPositions, stackingConstraints);
-        if (positionFound != null) {
-          extremePoints.Remove(positionFound); 
-        }
-        else {
-          positionFound = new ThreeDimensionalPacking(nrOfBins, 0, 0, 0);
-          occupiedPoints = IncreaseBinCountForOccupiedPoints(occupiedPoints, binMeasures);
-          nrOfBins++;
-        }
-        itemPositions[itemIndex] = positionFound;
-        occupiedPoints = OccupyPointsForNewItem(occupiedPoints, item, positionFound, itemIndex);
-        extremePoints = GenerateNewExtremePointsForNewItem(extremePoints, occupiedPoints, item, positionFound, binMeasures);
-      }
-
-      return BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>.GetBinPackings(itemPositions, binMeasures, itemMeasures, nrOfBins);
-    }
-
-
-
-
-    public static ThreeDimensionalPacking FindExtremePointForItem(int itemIndex, ItemList<CuboidPackingItem> itemMeasures, CuboidPackingBin binMeasures,
-        HashSet<ThreeDimensionalPacking> extremePoints, List<int[, ,]> occupiedPoints, ObservableDictionary<int, ThreeDimensionalPacking> itemPositions, bool stackingConstraints) {
-          return FindExtremePointForItem(itemIndex, itemMeasures, binMeasures, extremePoints, occupiedPoints, itemPositions, stackingConstraints, false);
-    }
-    public static ThreeDimensionalPacking FindExtremePointForItem(int itemIndex, ItemList<CuboidPackingItem> itemMeasures, CuboidPackingBin binMeasures,
-        HashSet<ThreeDimensionalPacking> extremePoints, List<int[, ,]> occupiedPoints, ObservableDictionary<int, ThreeDimensionalPacking> itemPositions, bool stackingConstraints, bool rotated) {
-
-      var itemFromList = itemMeasures[itemIndex];
-      CuboidPackingItem item = new CuboidPackingItem(
-        rotated ? itemFromList.Depth : itemFromList.Width, 
-        itemFromList.Height, 
-        rotated ? itemFromList.Width : itemFromList.Depth,
-        itemFromList.TargetBin);
-
-      int epIndex = 0;
-      while (epIndex < extremePoints.Count &&    
-        //(!IsPositionFeasible(binMeasures, item, extremePoints.ElementAt(epIndex), occupiedPoints) ||
-        (!DeepestBottomLeftFunctions.IsPositionFeasible(binMeasures, extremePoints.ElementAt(epIndex).AssignedBin, item, extremePoints.ElementAt(epIndex), itemPositions, itemMeasures) ||
-        (stackingConstraints && !IsStaticStable(occupiedPoints[extremePoints.ElementAt(epIndex).AssignedBin], item, extremePoints.ElementAt(epIndex))))) 
-      { epIndex++; }
-
-      if (epIndex < extremePoints.Count) {
-        var result = extremePoints.ElementAt(epIndex);
-        result.Rotated = rotated;
-        return result;
-      } 
-      return null;
-    }
-
-
-    public static ThreeDimensionalPacking FindExtremePointForItemUsingMaterialAndWeightConstraint(int itemIndex, ItemList<CuboidPackingItem> itemMeasures, CuboidPackingBin binMeasures,
-       HashSet<ThreeDimensionalPacking> extremePoints, List<int[, ,]> occupiedPoints, ObservableDictionary<int, ThreeDimensionalPacking> itemPositions, bool rotated) {
-
-      var itemFromList = itemMeasures[itemIndex];
-      CuboidPackingItem item = new CuboidPackingItem(
-        rotated ? itemFromList.Depth : itemFromList.Width,
-        itemFromList.Height,
-        rotated ? itemFromList.Width : itemFromList.Depth,
-        itemFromList.TargetBin, itemFromList.Weight, itemFromList.Material);
-
-      int epIndex = 0;
-      while (epIndex < extremePoints.Count &&
-        //(!IsPositionFeasible(binMeasures, item, extremePoints.ElementAt(epIndex), occupiedPoints) ||  
-        (!DeepestBottomLeftFunctions.IsPositionFeasible(binMeasures, extremePoints.ElementAt(epIndex).AssignedBin, item, extremePoints.ElementAt(epIndex), itemPositions, itemMeasures) ||
-        !IsStaticStable(occupiedPoints[extremePoints.ElementAt(epIndex).AssignedBin], item, extremePoints.ElementAt(epIndex)) ||
-        !WeightIsSupported(occupiedPoints[extremePoints.ElementAt(epIndex).AssignedBin], item, extremePoints.ElementAt(epIndex), itemMeasures))) { epIndex++; }
-
-      if (epIndex < extremePoints.Count) {
-        var result = extremePoints.ElementAt(epIndex);
-        result.Rotated = rotated;
-        return result;
-      }
-      return null;
-    }
-    public static List<int[, ,]> IncreaseBinCountForOccupiedPoints(List<int[, ,]> occupiedPoints, CuboidPackingBin binMeasures) {
-      occupiedPoints.Add(new int[binMeasures.Width, binMeasures.Height, binMeasures.Depth]);
-      int lastIndex = occupiedPoints.Count - 1;
-      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[lastIndex][w, h, d] = -1;
-          }
-        }
-      }
-      return occupiedPoints;
-    }
-    public static bool IsStaticStable(int[, ,] occupiedPoints, 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 static bool WeightIsSupported(int[, ,] occupiedPoints, 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 static List<int[, ,]>  OccupyPointsForNewItem(List<int[, ,]> occupiedPoints, CuboidPackingItem newItem, ThreeDimensionalPacking position, int itemIndex) {
-      int width = position.Rotated ? newItem.Depth : newItem.Width; 
-      int depth = position.Rotated ? newItem.Width : newItem.Depth;
-      for (int w = position.X; w < position.X + width; w++) {
-        for (int h = position.Y; h < position.Y + newItem.Height; h++) {
-          for (int d = position.Z; d < position.Z + depth; d++) {
-            occupiedPoints[position.AssignedBin][w,h,d] = itemIndex;
-          }
-        }
-      }
-      return occupiedPoints;
-    }
-    public static HashSet<ThreeDimensionalPacking> GenerateNewExtremePointsForNewItem(HashSet<ThreeDimensionalPacking> extremePoints, List<int[, ,]> occupiedPoints, 
-        CuboidPackingItem newItem, ThreeDimensionalPacking position, CuboidPackingBin binMeasures) {
-      int currentBin = position.AssignedBin;
-
-      int newWidth = position.Rotated ? newItem.Depth : newItem.Width;
-      int newDepth = position.Rotated ? newItem.Width : newItem.Depth;
-
-      //Find ExtremePoints beginning from sourcepointX
-      var sourcePointX = new ThreeDimensionalPacking(currentBin, 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 && occupiedPoints[currentBin][sourcePointX.X, currentYValue, sourcePointX.Z] == -1) {
-          currentYValue--;
-        }
-        extremePoints.Add(new ThreeDimensionalPacking(currentBin, sourcePointX.X, currentYValue, sourcePointX.Z));
-
-        //Traversing down the z-axis
-        int currentZValue = sourcePointX.Z;
-        while (currentZValue > 0 && occupiedPoints[currentBin][sourcePointX.X, sourcePointX.Y, currentZValue - 1] == -1) {
-          currentZValue--;
-        }
-        extremePoints.Add(new ThreeDimensionalPacking(currentBin, sourcePointX.X, sourcePointX.Y, currentZValue));
-      }
-
-
-
-
-      //Find ExtremePoints beginning from sourcepointY
-      var sourcePointY = new ThreeDimensionalPacking(currentBin, 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 && occupiedPoints[currentBin][currentXValue - 1, sourcePointY.Y, sourcePointY.Z] == -1) {
-          currentXValue--;
-        }
-        extremePoints.Add(new ThreeDimensionalPacking(currentBin, currentXValue, sourcePointY.Y, sourcePointY.Z));
-
-        //Traversing down the z-axis
-        int currentZValue = sourcePointY.Z;
-        while (currentZValue > 0 && occupiedPoints[currentBin][sourcePointY.X, sourcePointY.Y, currentZValue - 1] == -1) {
-          currentZValue--;
-        }
-        extremePoints.Add(new ThreeDimensionalPacking(currentBin, sourcePointY.X, sourcePointY.Y, currentZValue));
-      }
-
-
-
-
-
-      //Find ExtremePoints beginning from sourcepointZ
-      var sourcePointZ = new ThreeDimensionalPacking(currentBin, 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 && occupiedPoints[currentBin][currentXValue - 1, sourcePointZ.Y, sourcePointZ.Z] == -1) {
-          currentXValue--;
-        }
-        extremePoints.Add(new ThreeDimensionalPacking(currentBin, currentXValue, sourcePointZ.Y, sourcePointZ.Z));
-
-        //Traversing down the y-axis                                                                            
-        int currentYValue = sourcePointZ.Y;
-        while (currentYValue > 0 && occupiedPoints[currentBin][sourcePointZ.X, currentYValue, sourcePointZ.Z] == -1) {
-          currentYValue--;
-        }
-        extremePoints.Add(new ThreeDimensionalPacking(currentBin, sourcePointZ.X, currentYValue, sourcePointZ.Z));
-      }
-
-
-      return extremePoints;
-    }
-
-
-    public static HashSet<ThreeDimensionalPacking> OrderExtremePoints(HashSet<ThreeDimensionalPacking> hashSet, List<int[, ,]> occupiedPoints, CuboidPackingBin binMeasures) {
-      return new HashSet<ThreeDimensionalPacking>(hashSet.OrderBy(ep => ep.AssignedBin).ThenBy(ep => ep.Z).ThenBy(ep => ep.X).ThenBy(ep => ep.Y).ThenBy(ep => ShortestPossibleSideFromEP(ep, occupiedPoints, binMeasures)));
-    }
-    public static int ShortestPossibleSideFromEP(ThreeDimensionalPacking ep, List<int[, ,]> occupiedPoints, CuboidPackingBin binMeasures) {
-      int shortestSide = int.MaxValue;
-
-      if (ep.X >= binMeasures.Width || ep.Y >= binMeasures.Height || ep.Z >= binMeasures.Depth)
-        return shortestSide;
-
-      int currentX = ep.X;
-      while (currentX < binMeasures.Width && occupiedPoints[ep.AssignedBin][currentX, ep.Y, ep.Z] == -1) { currentX++; }   
-      if (currentX - ep.X < shortestSide)
-        shortestSide = currentX - ep.X;
-
-      int currentY = ep.Y;
-      while (currentY < binMeasures.Height && occupiedPoints[ep.AssignedBin][ep.X, currentY, ep.Z] == -1) { currentY++;  }
-      if (currentY - ep.Y < shortestSide)
-        shortestSide = currentY - ep.Y;
-
-      int currentZ = ep.Z;
-      while (currentZ < binMeasures.Depth && occupiedPoints[ep.AssignedBin][ep.X, ep.Y, currentZ] == -1) { currentZ++; }
-      if (currentZ - ep.Z < shortestSide)
-        shortestSide = currentZ - ep.Z;
-
-      return shortestSide;
-    }
-
-    
-  }
-}
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 9593)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/EP/ISOContainerMultiComponentVectorDecoder3D.cs	(revision 9596)
@@ -60,128 +60,60 @@
 
     public static PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> Decode(MultiComponentVectorEncoding solution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-      
-      PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> result =
-        new PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>();
-                                                                   /*
-      #region Preperations
-      int nrOfBins = solution.NrOfBins;
-                      
-      Dictionary<int, List<PackingInformation>> unpackedItemIndexesPerBin = new Dictionary<int, List<PackingInformation>>();
-      Dictionary<int, HashSet<ThreeDimensionalPacking>> extremePointsForBin = new Dictionary<int, HashSet<ThreeDimensionalPacking>>();  
-      ObservableDictionary<int, CuboidPackingBin> resultingBinMeasures = new ObservableDictionary<int, CuboidPackingBin>();
-      var occupiedPoints = new List<int[, ,]>();
+      PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> resultPlan = new PackingPlan3D(binMeasures);
+      ObservableList<BinPacking3D> result = new ObservableList<BinPacking3D>();
 
-      for (int i = 0; i < nrOfBins; i++) {
-        unpackedItemIndexesPerBin[i] = new List<PackingInformation>(solution.PackingInformations[i]);
+      var sequenceMatrix = solution.GenerateSequenceMatrix();
+      Dictionary<int, bool> rotated = solution.GenerateRotationArray();
 
-        extremePointsForBin[i] = new HashSet<ThreeDimensionalPacking>();
-        extremePointsForBin[i].Add(new ThreeDimensionalPacking(i, 0, 0, 0, false));
-        occupiedPoints = ExtremePointsFunctions3D.IncreaseBinCountForOccupiedPoints(occupiedPoints, binMeasures);
-        resultingBinMeasures[i] = new CuboidPackingBin(binMeasures.Width, binMeasures.Height, binMeasures.Depth);
+      //Fill bins according to grouping vector
+      List<int> remainingIDs = new List<int>();
+      foreach (var sequence in sequenceMatrix) {
+        remainingIDs = remainingIDs.Concat(sequence).ToList();
+        var bp = new BinPacking3D(binMeasures);
+        bp.ExtremePointBasedPacking(ref remainingIDs, itemMeasures, true, rotated);
+        if (remainingIDs.Count > 0) {
+          bp.DoubleDepth();
+          bp.ExtremePointBasedPacking(ref remainingIDs, itemMeasures, true, rotated);
+        }
+        result.Add(bp);
       }
+      result.RemoveAll(x => x.ItemPositions.Count == 0);
+      result = new ObservableList<BinPacking3D>(result.OrderByDescending(bp => bp.PackingDensity));
 
-      ObservableDictionary<int, ThreeDimensionalPacking> itemPositions = new ObservableDictionary<int, ThreeDimensionalPacking>();
-      var remainingItems = new List<PackingInformation>();
-
-      #endregion Preperations
-
-
-      //Iterate over all bin-lists
-      for (int binNr = 0; binNr < nrOfBins; binNr++) {
-        //Iterate over the current bin-item-list and find feasible positions in the current bin for each item
-        var unpackedItems = unpackedItemIndexesPerBin[binNr];
-        for (int i = 0; i < unpackedItems.Count; i++) {
-          var itemIndex = unpackedItems[i].ItemID;
-          var item = itemMeasures[itemIndex];
-
-          extremePointsForBin[binNr] = ExtremePointsFunctions3D.OrderExtremePoints(extremePointsForBin[binNr], occupiedPoints, resultingBinMeasures[binNr]);
-          var positionFound = ExtremePointsFunctions3D.FindExtremePointForItemUsingMaterialAndWeightConstraint(itemIndex, itemMeasures, resultingBinMeasures[binNr], extremePointsForBin[binNr], occupiedPoints, itemPositions, unpackedItems[i].Rotated);
-
-          if (positionFound == null && resultingBinMeasures[binNr].Depth.Equals(binMeasures.Depth)) {
-            occupiedPoints = DoubleDepthForBinNr(occupiedPoints, ref resultingBinMeasures, binNr);
-            positionFound = ExtremePointsFunctions3D.FindExtremePointForItemUsingMaterialAndWeightConstraint(itemIndex, itemMeasures, resultingBinMeasures[binNr], extremePointsForBin[binNr], occupiedPoints, itemPositions, unpackedItems[i].Rotated);
-          } 
-
-          if (positionFound != null) {
-            extremePointsForBin[binNr].Remove(positionFound);
-            itemPositions[itemIndex] = positionFound;
-            occupiedPoints = ExtremePointsFunctions3D.OccupyPointsForNewItem(occupiedPoints, item, positionFound, itemIndex);
-            extremePointsForBin[binNr] = ExtremePointsFunctions3D.GenerateNewExtremePointsForNewItem(extremePointsForBin[binNr], occupiedPoints, item, positionFound, resultingBinMeasures[binNr]);
-          } else {
-            remainingItems.Add(unpackedItems[i]);
-            solution.PackingInformations[binNr].Remove(unpackedItems[i]);
+      //Try to put remaining items in existing bins
+      var temp = new List<int>(remainingIDs);
+      foreach (int id in temp) {
+        foreach (var bp in result) {
+          var position = bp.FindExtremePointForItem(itemMeasures[id], rotated[id], true);
+          if (remainingIDs.Count > 0) {
+            bp.DoubleDepth();
+            position = bp.FindExtremePointForItem(itemMeasures[id], rotated[id], true);
+          }
+          if (position != null) {
+            bp.PackItem(id, itemMeasures[id], position);
+            remainingIDs.Remove(id);
           }
         }
       }
 
-
-      //Packing of remaining items    
-      //Iterate over all bin-lists
-      for (int binNr = 0; binNr < nrOfBins && remainingItems.Count > 0; binNr++) {
-        var unpackedItems = new List<PackingInformation>(remainingItems);
-        //Iterate over all the remaining items
-        for (int i = 0; i < unpackedItems.Count; i++) {
-          var itemIndex = unpackedItems[i].ItemID;
-          var item = itemMeasures[itemIndex];
-
-          extremePointsForBin[binNr] = ExtremePointsFunctions3D.OrderExtremePoints(extremePointsForBin[binNr], occupiedPoints, resultingBinMeasures[binNr]);
-          var positionFound = ExtremePointsFunctions3D.FindExtremePointForItemUsingMaterialAndWeightConstraint(itemIndex, itemMeasures, resultingBinMeasures[binNr], extremePointsForBin[binNr], occupiedPoints, itemPositions, unpackedItems[i].Rotated);
-
-
-          if (positionFound == null && resultingBinMeasures[binNr].Depth.Equals(binMeasures.Depth)) {
-            occupiedPoints = DoubleDepthForBinNr(occupiedPoints, ref resultingBinMeasures, binNr);
-            positionFound = ExtremePointsFunctions3D.FindExtremePointForItemUsingMaterialAndWeightConstraint(itemIndex, itemMeasures, resultingBinMeasures[binNr], extremePointsForBin[binNr], occupiedPoints, itemPositions, unpackedItems[i].Rotated);
-          } 
-          
-          if (positionFound != null) {
-            extremePointsForBin[binNr].Remove(positionFound);
-            itemPositions[itemIndex] = positionFound;
-            occupiedPoints = ExtremePointsFunctions3D.OccupyPointsForNewItem(occupiedPoints, item, positionFound, itemIndex);
-            extremePointsForBin[binNr] = ExtremePointsFunctions3D.GenerateNewExtremePointsForNewItem(extremePointsForBin[binNr], occupiedPoints, item, positionFound, resultingBinMeasures[binNr]);
-            remainingItems.Remove(unpackedItems[i]);
-            solution.PackingInformations[binNr].Add(unpackedItems[i]);
-          }
+      //Put still remaining items in new bins
+      while (remainingIDs.Count > 0) {
+        var bp = new BinPacking3D(binMeasures);
+        bp.ExtremePointBasedPacking(ref remainingIDs, itemMeasures, true, rotated);
+        if (remainingIDs.Count > 0) {
+          bp.DoubleDepth();
+          bp.ExtremePointBasedPacking(ref remainingIDs, itemMeasures, true, rotated);
         }
-        if (remainingItems.Count > 0 && binNr + 1 >= nrOfBins) {
-          extremePointsForBin[nrOfBins] = new HashSet<ThreeDimensionalPacking>();
-          extremePointsForBin[nrOfBins].Add(new ThreeDimensionalPacking(nrOfBins, 0, 0, 0, false));
-          occupiedPoints = ExtremePointsFunctions3D.IncreaseBinCountForOccupiedPoints(occupiedPoints, binMeasures);
-          resultingBinMeasures[nrOfBins] = new CuboidPackingBin(binMeasures.Width, binMeasures.Height, binMeasures.Depth);
-          solution.PackingInformations[nrOfBins] = new ItemList<PackingInformation>();
-          nrOfBins++;
-        }
+        result.Add(bp);
       }
-
-      result.BinPackings = BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>.GetBinPackings(itemPositions, resultingBinMeasures, itemMeasures, nrOfBins);   */
-      return result;
-    }
-
-    private static List<int[, ,]> DoubleDepthForBinNr(List<int[, ,]> occupiedPoints, ref ObservableDictionary<int, CuboidPackingBin> binMeasures, int binNr) {
-      var oldDepth = binMeasures[binNr].Depth;
-      binMeasures[binNr].Depth = binMeasures[binNr].Depth * 2;
-      var newBinOccupation = new int[binMeasures[binNr].Width, binMeasures[binNr].Height, binMeasures[binNr].Depth];
-      for (int w = 0; w < binMeasures[binNr].Width; w++) {
-        for (int h = 0; h < binMeasures[binNr].Height; h++) {
-          for (int d = 0; d < binMeasures[binNr].Depth; d++) {
-            if (d < oldDepth)
-              newBinOccupation[w, h, d] = occupiedPoints[binNr][w, h, d];
-            else
-              newBinOccupation[w, h, d] = -1;
-          }
-        }
-      }
-
-      occupiedPoints[binNr] = newBinOccupation;
-      return occupiedPoints;
+      result.RemoveAll(x => x.ItemPositions.Count == 0); 
+      resultPlan.BinPackings = new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>(result.OrderByDescending(bp => bp.PackingDensity));
+      return resultPlan;
     }
 
 
-
-
     public override PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-
       var solution = encodedSolution as MultiComponentVectorEncoding;
       if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponentVector");
-
       return Decode(solution, binMeasures, itemMeasures);
     }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/ThreeDimensionalPackingFunctions.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/3D/ThreeDimensionalPackingFunctions.cs	(revision 9593)
+++ 	(revision )
@@ -1,205 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Collections;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.PackingEncoding.GroupingVector;
-using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;
-using HeuristicLab.Encodings.PackingEncoding.PackingPlan;
-using HeuristicLab.Encodings.PackingEncoding.PackingSequence;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Problems.BinPacking.Dimensions;
-using HeuristicLab.Problems.BinPacking.Interfaces;
-using HeuristicLab.Problems.BinPacking.PackingBin;
-using HeuristicLab.Problems.BinPacking.PackingItem;
-using HeuristicLab.Problems.BinPacking.Shapes;
-
-namespace HeuristicLab.Problems.BinPacking.Decoders {
-  public static class ThreeDimensionalPackingFunctions {
-
-    public static ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> DeepestLeftBottomPacking(
-     MultiComponentVectorEncoding solution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-
-       ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> result =
-       new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>();
-
-     var sequenceMatrix = SequentialPackingFunctions.GenerateSequenceMatrix(solution);
-     Dictionary<int, bool> rotated = SequentialPackingFunctions.GenerateRotationArray(solution);
-          
-     //Fill bins according to grouping vector
-     List<int> remainingIDs = new List<int>();
-     foreach (var sequence in sequenceMatrix) {
-       remainingIDs = remainingIDs.Concat(sequence).ToList();
-       result.Add(SequentialPackingFunctions.DeepestLeftBottomPacking(ref remainingIDs, binMeasures, itemMeasures, rotated));
-     }
-
-     //Try to put remaining items in existing bins
-     var temp = new List<int>(remainingIDs);
-     foreach (int id in temp) {
-       foreach (var bp in result) {
-         var position = bp.FindPositionBySliding(itemMeasures[id], rotated[id]);
-         if (position != null) {
-           bp.PackItem(id, itemMeasures[id], position);
-           remainingIDs.Remove(id);
-         }
-       }
-     }
-
-     //Put still remaining items in new bins
-     while (remainingIDs.Count > 0) {
-       result.Add(SequentialPackingFunctions.DeepestLeftBottomPacking(ref remainingIDs, binMeasures, itemMeasures));
-     }
-
-     return result;
-   }
-
-    public static ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> DeepestLeftBottomPacking(
-     GroupingVectorEncoding solution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-
-       ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> result =
-       new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>();
-
-     var sequenceMatrix = SequentialPackingFunctions.GenerateSequenceMatrix(solution);
-          
-     //Fill bins according to grouping vector
-     List<int> remainingIDs = new List<int>();
-     foreach (var sequence in sequenceMatrix) {
-       remainingIDs = remainingIDs.Concat(sequence).ToList();
-       result.Add(SequentialPackingFunctions.DeepestLeftBottomPacking(ref remainingIDs, binMeasures, itemMeasures));
-     }
-
-     //Try to put remaining items in existing bins
-     var temp = new List<int>(remainingIDs);
-     foreach (int id in temp) {
-       foreach (var bp in result) {
-         var position = bp.FindPositionBySliding(itemMeasures[id], false);
-         if (position != null) {
-           bp.PackItem(id, itemMeasures[id], position);
-           remainingIDs.Remove(id);
-         }
-       }
-     }
-
-     //Put still remaining items in new bins
-     while (remainingIDs.Count > 0) {
-       result.Add(SequentialPackingFunctions.DeepestLeftBottomPacking(ref remainingIDs, binMeasures, itemMeasures));
-     }
-
-     return result;
-   }
-
-   public static ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> DeepestLeftBottomPacking(
-     PackingSequenceEncoding solution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-
-       ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> result =
-       new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>();
-
-     List<int> remainingIDs = new List<int>(solution.PackingSequence);
-     while (remainingIDs.Count > 0) {
-       result.Add(SequentialPackingFunctions.DeepestLeftBottomPacking(ref remainingIDs, binMeasures, itemMeasures));
-     }
-
-     return result;
-   }
-
-
-
-
-   public static ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> ExtremePointBasedPacking(
-     MultiComponentVectorEncoding solution, ItemList<CuboidPackingItem> itemMeasures, CuboidPackingBin binMeasures, bool stackingConstraints) {
-
-     ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> result =
-       new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>();
-
-     var sequenceMatrix = SequentialPackingFunctions.GenerateSequenceMatrix(solution);
-     Dictionary<int, bool> rotated = SequentialPackingFunctions.GenerateRotationArray(solution);
-
-     //Fill bins according to grouping vector
-     List<int> remainingIDs = new List<int>();
-     foreach (var sequence in sequenceMatrix) {
-       remainingIDs = remainingIDs.Concat(sequence).ToList();
-       result.Add(SequentialPackingFunctions.ExtremePointBasedPacking(ref remainingIDs, binMeasures, itemMeasures, stackingConstraints, rotated));
-     }
-
-     result = new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>(result.OrderByDescending(x => x.PackingDensity));
-
-     //Try to put remaining items in existing bins
-     var temp = new List<int>(remainingIDs);
-     foreach (int id in temp) {
-       foreach (var bp in result) {
-         var position = bp.FindExtremePointForItem(itemMeasures[id], rotated[id], stackingConstraints);
-         if (position != null) {
-           bp.PackItem(id, itemMeasures[id], position);
-           remainingIDs.Remove(id);
-         }
-       }
-     }
-
-     //Put still remaining items in new bins
-     while (remainingIDs.Count > 0) {
-       result.Add(SequentialPackingFunctions.ExtremePointBasedPacking(ref remainingIDs, binMeasures, itemMeasures, stackingConstraints));
-     }
-            
-      result.RemoveAll(x => x.ItemPositions.Count == 0);
-      return new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>(result.OrderByDescending(x => x.PackingDensity));
-   }
-
-   public static ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> ExtremePointBasedPacking(
-     GroupingVectorEncoding solution, ItemList<CuboidPackingItem> itemMeasures, CuboidPackingBin binMeasures, bool stackingConstraints) {
-
-     ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> result =
-       new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>();
-
-     var sequenceMatrix = SequentialPackingFunctions.GenerateSequenceMatrix(solution);
-
-     //Fill bins according to grouping vector
-     List<int> remainingIDs = new List<int>();
-     foreach (var sequence in sequenceMatrix) {
-       remainingIDs = remainingIDs.Concat(sequence).ToList();
-       result.Add(SequentialPackingFunctions.ExtremePointBasedPacking(ref remainingIDs, binMeasures, itemMeasures, stackingConstraints));
-     }
-
-     result = new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>(result.OrderByDescending(x => x.PackingDensity));
-
-     //Try to put remaining items in existing bins
-     var temp = new List<int>(remainingIDs);
-     foreach (int id in temp) {
-       foreach (var bp in result) {
-         var position = bp.FindExtremePointForItem(itemMeasures[id], false, stackingConstraints);
-         if (position != null) {
-           bp.PackItem(id, itemMeasures[id], position);
-           remainingIDs.Remove(id);
-           break;
-         }
-       }
-     }
-
-     //Put still remaining items in new bins
-     while (remainingIDs.Count > 0) {
-       result.Add(SequentialPackingFunctions.ExtremePointBasedPacking(ref remainingIDs, binMeasures, itemMeasures, stackingConstraints));
-     }
-
-     result.RemoveAll(x => x.ItemPositions.Count == 0);
-     return new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>(result.OrderByDescending(x => x.PackingDensity));
-   }
-
-   public static ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> ExtremePointBasedPacking(
-     PackingSequenceEncoding solution, ItemList<CuboidPackingItem> itemMeasures, CuboidPackingBin binMeasures, bool stackingConstraints) {
-
-     ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>> result =
-       new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>();
-
-
-     List<int> remainingIDs = new List<int>(solution.PackingSequence);
-     while (remainingIDs.Count > 0) {
-       result.Add(SequentialPackingFunctions.ExtremePointBasedPacking(ref remainingIDs, binMeasures, itemMeasures, stackingConstraints));
-     }
-
-     result.RemoveAll(x => x.ItemPositions.Count == 0);
-     return new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>(result.OrderByDescending(x => x.PackingDensity));
-   }
-
-    
-  }
-}
