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 14153)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking.cs	(revision 14154)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -30,20 +31,20 @@
   [Item("BinPacking", "Represents a single-bin packing for a bin-packing problem.")]
   [StorableClass]
-  public abstract class BinPacking<D, B, I> : Item
-    where D : class, IPackingPosition
-    where B : PackingShape<D>
-    where I : PackingShape<D> {
+  public abstract class BinPacking<TPos, TBin, TItem> : Item
+    where TPos : class, IPackingPosition
+    where TBin : PackingShape<TPos>
+    where TItem : PackingShape<TPos> {
     #region Properties
     [Storable]
-    public ObservableDictionary<int, D> ItemPositions { get; private set; }
+    public ObservableDictionary<int, TPos> Positions { get; private set; }
 
     [Storable]
-    public ObservableDictionary<int, I> ItemMeasures { get; private set; } // TODO: rename to items
+    public ObservableDictionary<int, TItem> Items { get; private set; }
 
     [Storable]
-    public B BinMeasures { get; private set; }
+    public TBin BinShape { get; private set; }
 
     [Storable]
-    public SortedSet<D> ExtremePoints { get; protected set; }
+    public SortedSet<TPos> ExtremePoints { get; protected set; }
 
     [Storable]
@@ -52,11 +53,10 @@
     #endregion Properties
 
-    protected BinPacking(B binMeasures)
+    protected BinPacking(TBin binShape)
       : base() {
-      ItemPositions = new ObservableDictionary<int, D>();
-      ItemMeasures = new ObservableDictionary<int, I>();
-      BinMeasures = (B)binMeasures.Clone();
+      Positions = new ObservableDictionary<int, TPos>();
+      Items = new ObservableDictionary<int, TItem>();
+      BinShape = (TBin)binShape.Clone();
       OccupationLayers = new Dictionary<int, List<int>>();
-      InitializeOccupationLayers(); // TODO
     }
 
@@ -64,30 +64,39 @@
     [StorableConstructor]
     protected BinPacking(bool deserializing) : base(deserializing) { }
-    protected BinPacking(BinPacking<D, B, I> original, Cloner cloner)
+    protected BinPacking(BinPacking<TPos, TBin, TItem> original, Cloner cloner)
       : base(original, cloner) {
-      this.ItemPositions = new ObservableDictionary<int, D>(original.ItemPositions);
-      this.ItemMeasures = new ObservableDictionary<int, I>(original.ItemMeasures);
-      this.BinMeasures = (B)original.BinMeasures.Clone(cloner);
-      this.OccupationLayers = new Dictionary<int, List<int>>(original.OccupationLayers);
+      this.Positions = new ObservableDictionary<int, TPos>();
+      foreach (var kvp in original.Positions) {
+        Positions.Add(kvp.Key, cloner.Clone(kvp.Value));
+      }
+      this.Items = new ObservableDictionary<int, TItem>();
+      foreach (var kvp in original.Items) {
+        Items.Add(kvp.Key, cloner.Clone(kvp.Value));
+      }
+      this.BinShape = (TBin)original.BinShape.Clone(cloner);
+      this.OccupationLayers = new Dictionary<int, List<int>>();
+      foreach (var kvp in original.OccupationLayers) {
+        OccupationLayers.Add(kvp.Key, new List<int>(kvp.Value));
+      }
     }
 
-    protected abstract void GenerateNewExtremePointsForNewItem(I measures, D position);
+    protected abstract void GenerateNewExtremePointsForNewItem(TItem item, TPos position);
 
-    public abstract D FindExtremePointForItem(I measures, bool rotated, bool stackingConstraints);
-    public abstract D FindPositionBySliding(I measures, bool rotated);
+    public abstract TPos FindExtremePointForItem(TItem item, bool rotated, bool stackingConstraints);
+    public abstract TPos FindPositionBySliding(TItem item, bool rotated);
 
-    public abstract void SlidingBasedPacking(ref IList<int> sequence, IList<I> itemMeasures);
-    public abstract void SlidingBasedPacking(ref IList<int> sequence, IList<I> itemMeasures, Dictionary<int, bool> rotationArray);
-    public abstract void ExtremePointBasedPacking(ref IList<int> sequence, IList<I> itemMeasures, bool stackingConstraints);
-    public abstract void ExtremePointBasedPacking(ref IList<int> sequence, IList<I> itemMeasures, bool stackingConstraints, Dictionary<int, bool> rotationArray);
+    public abstract void SlidingBasedPacking(ref IList<int> sequence, IList<TItem> items);
+    public abstract void SlidingBasedPacking(ref IList<int> sequence, IList<TItem> items, Dictionary<int, bool> rotationArray);
+    public abstract void ExtremePointBasedPacking(ref IList<int> sequence, IList<TItem> items, bool stackingConstraints);
+    public abstract void ExtremePointBasedPacking(ref IList<int> sequence, IList<TItem> items, bool stackingConstraints, Dictionary<int, bool> rotationArray);
 
-    public void PackItem(int itemID, I measures, D position) {
-      ItemMeasures[itemID] = measures;
-      ItemPositions[itemID] = position;
+    public void PackItem(int itemID, TItem item, TPos position) {
+      Items[itemID] = item;
+      Positions[itemID] = position;
       ExtremePoints.Remove(position);
-      foreach (int id in ItemMeasures.Select(x => x.Key))
-        GenerateNewExtremePointsForNewItem(ItemMeasures[id], ItemPositions[id]);
+      foreach (int id in Items.Select(x => x.Key))
+        GenerateNewExtremePointsForNewItem(Items[id], Positions[id]);
 
-      AddNewItemToOccupationLayers(itemID, measures, position);
+      AddNewItemToOccupationLayers(itemID, item, position);
     }
 
@@ -95,7 +104,7 @@
       get {
         double result = 0;
-        foreach (var entry in ItemMeasures)
+        foreach (var entry in Items)
           result += entry.Value.Volume;
-        result /= BinMeasures.Volume;
+        result /= BinShape.Volume;
         return result;
       }
@@ -103,7 +112,7 @@
 
 
-    public int PointOccupation(D position) {
+    public int PointOccupation(TPos position) {
       foreach (var id in GetLayerItemIDs(position)) {
-        if (ItemMeasures[id].EnclosesPoint(ItemPositions[id], position))
+        if (Items[id].EnclosesPoint(Positions[id], position))
           return id;
       }
@@ -111,18 +120,18 @@
     }
 
-    public bool IsPointOccupied(D position) {
+    public bool IsPointOccupied(TPos position) {
       foreach (var id in GetLayerItemIDs(position)) {
-        if (ItemMeasures[id].EnclosesPoint(ItemPositions[id], position))
+        if (Items[id].EnclosesPoint(Positions[id], position))
           return true;
       }
       return false;
     }
-    public bool IsPositionFeasible(I measures, D position) {
+    public bool IsPositionFeasible(TItem item, TPos position) {
       //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, measures))
+      if (!BinShape.Encloses(position, item))
         return false;
 
-      foreach (var id in GetLayerItemIDs(measures, position)) {
-        if (ItemMeasures[id].Overlaps(ItemPositions[id], position, measures))
+      foreach (var id in GetLayerItemIDs(item, position)) {
+        if (Items[id].Overlaps(Positions[id], position, item))
           return false;
       }
@@ -130,12 +139,12 @@
       return true;
     }
-    public abstract int ShortestPossibleSideFromPoint(D position);
-    public abstract bool IsStaticStable(I measures, D position);
+    public abstract int ShortestPossibleSideFromPoint(TPos position);
+    public abstract bool IsStaticStable(TItem measures, TPos position);
 
 
     protected abstract void InitializeOccupationLayers();
-    protected abstract void AddNewItemToOccupationLayers(int itemID, I measures, D position);
-    protected abstract List<int> GetLayerItemIDs(D position);
-    protected abstract List<int> GetLayerItemIDs(I measures, D position);
+    protected abstract void AddNewItemToOccupationLayers(int itemID, TItem item, TPos position);
+    protected abstract List<int> GetLayerItemIDs(TPos position);
+    protected abstract List<int> GetLayerItemIDs(TItem item, TPos position);
   }
 }
Index: branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/PackingPlan.cs
===================================================================
--- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/PackingPlan.cs	(revision 14153)
+++ branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/PackingPlan.cs	(revision 14154)
@@ -86,5 +86,5 @@
 
     public void UpdateBinPackings() {
-      BinPackings.RemoveAll(x => x.ItemPositions.Count == 0);
+      BinPackings.RemoveAll(x => x.Positions.Count == 0);
       BinPackings = new ObservableList<BinPacking<D, B, I>>(BinPackings.OrderByDescending(bp => bp.PackingDensity));
     }
