Index: /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/RectangularIdenticalBinPackingProblem.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/RectangularIdenticalBinPackingProblem.cs	(revision 14038)
+++ /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/RectangularIdenticalBinPackingProblem.cs	(revision 14039)
@@ -34,4 +34,6 @@
 using HeuristicLab.Problems.Instances;
 using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;
+using HeuristicLab.Data;
+using System;
 
 namespace HeuristicLab.Problems.BinPacking.Problem {
@@ -101,4 +103,50 @@
     }
 
+    #region Problem instance handling
+    public override void Load(BPPData data) {
+      var realData = data as RealBPPData;
+      var binData = new RectangularPackingBin(data.BinMeasures[0], data.BinMeasures[1]);
+
+      var itemData = new ItemList<RectangularPackingItem>(data.Items);
+      for (int j = 0; j < data.Items; j++) {
+        var bin = new RectangularPackingBin(data.BinMeasures[0], data.BinMeasures[1]);
+        var item = new RectangularPackingItem(data.ItemMeasures[j][0], data.ItemMeasures[j][1], bin);
+        if (realData != null) {
+          item.Weight = realData.ItemWeights[j];
+          item.Material = realData.ItemMaterials[j];
+        }
+        itemData.Add(item);
+      }
+
+      BestKnownQuality = data.BestKnownQuality.HasValue ? new DoubleValue(data.BestKnownQuality.Value) : null;
+
+      PackingBinMeasures = binData;
+      PackingItemMeasures = itemData;
+
+      ApplyHorizontalOrientation();
+      SortItems();
+      PackingItemsParameter.Value.Value = PackingItemMeasures.Count;
+      LowerBoundParameter.Value.Value = CalculateLowerBound();
+    }
+
+
+    public override BPPData Export() {
+      var result = new BPPData {
+        Name = Name,
+        Description = Description,
+        Items = PackingItemsParameter.Value.Value,
+        BinMeasures = new int[] { PackingBinMeasures.Width, PackingBinMeasures.Height }
+      };
+
+      var itemMeasures = new int[result.Items][];
+      int i = 0;
+      foreach (var item in PackingItemMeasures) {
+        itemMeasures[i] = new int[] { item.Width, item.Height };
+        i++;
+      }
+      result.ItemMeasures = itemMeasures;
+      return result;
+    }
+    #endregion
 
     #region Helpers
@@ -107,9 +155,9 @@
 
       PackingSolutionDecoderParameter.ValidValues.Clear();
-      if (SolutionCreator is PackingSequenceRandomCreator) {        
+      if (SolutionCreator is PackingSequenceRandomCreator) {
         PackingSolutionDecoderParameter.ValidValues.UnionWith(ApplicationManager.Manager.GetInstances<I2DPSDecoder>());
-      } else if (SolutionCreator is GroupingVectorRandomCreator) {  
+      } else if (SolutionCreator is GroupingVectorRandomCreator) {
         PackingSolutionDecoderParameter.ValidValues.UnionWith(ApplicationManager.Manager.GetInstances<I2DGVDecoder>());
-      } else if (SolutionCreator is MultiComponentVectorRandomCreator) {  
+      } else if (SolutionCreator is MultiComponentVectorRandomCreator) {
         PackingSolutionDecoderParameter.ValidValues.UnionWith(ApplicationManager.Manager.GetInstances<I2DMCVDecoder>());
       } else {
@@ -120,5 +168,5 @@
 
     protected override IPackingPlanEvaluator CreateDefaultEvaluator() {
-      return new PackingRatioRectangularIdenticalBinEvaluator ();
+      return new PackingRatioRectangularIdenticalBinEvaluator();
     }
 
Index: /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/RectangularPackingItem.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/RectangularPackingItem.cs	(revision 14038)
+++ /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/RectangularPackingItem.cs	(revision 14039)
@@ -69,5 +69,5 @@
     public RectangularPackingItem(int width, int height, RectangularPackingBin targetBin)
       : this() {
-      this.Weight = width;
+      this.Width = width;
       this.Height = height;
       this.TargetBin = (RectangularPackingBin)targetBin.Clone();
Index: /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/CuboidIdenticalBinPackingProblem.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/CuboidIdenticalBinPackingProblem.cs	(revision 14038)
+++ /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/CuboidIdenticalBinPackingProblem.cs	(revision 14039)
@@ -34,4 +34,6 @@
 using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;
 using HeuristicLab.PluginInfrastructure;
+using System;
+using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.BinPacking.Problem {
@@ -42,8 +44,8 @@
 
     #region Default Instance
-    private static readonly BPPData DefaultInstance = new BPPData() {  
-      Name = "3D BPP Default Instance", 
+    private static readonly BPPData DefaultInstance = new BPPData() {
+      Name = "3D BPP Default Instance",
       Description = "The default instance for 3D Bin Packing.",
-      BinMeasures = new int[] {25,25,35},
+      BinMeasures = new int[] { 25, 25, 35 },
       ItemMeasures = new int[][] {
         new int[] {12,5,10},
@@ -92,5 +94,5 @@
     };
     #endregion
-    
+
     [StorableConstructor]
     protected CuboidIdenticalBinPackingProblem(bool deserializing) : base(deserializing) { }
@@ -107,4 +109,48 @@
 
 
+    public override void Load(BPPData data) {
+      var realData = data as RealBPPData;
+      var binData = new CuboidPackingBin(data.BinMeasures[0], data.BinMeasures[1], data.BinMeasures[2]);
+
+      var itemData = new ItemList<CuboidPackingItem>(data.Items);
+      for (int j = 0; j < data.Items; j++) {
+        var bin = new CuboidPackingBin(data.BinMeasures[0], data.BinMeasures[1], data.BinMeasures[2]);
+        var item = new CuboidPackingItem(data.ItemMeasures[j][0], data.ItemMeasures[j][1], data.ItemMeasures[j][2], bin);
+        if (realData != null) {
+          item.Weight = realData.ItemWeights[j];
+          item.Material = realData.ItemMaterials[j];
+        }
+        itemData.Add(item);
+      }
+
+      BestKnownQuality = data.BestKnownQuality.HasValue ? new DoubleValue(data.BestKnownQuality.Value) : null;
+
+      PackingBinMeasures = binData;
+      PackingItemMeasures = itemData;
+
+      ApplyHorizontalOrientation();
+      SortItems();
+      PackingItemsParameter.Value.Value = PackingItemMeasures.Count;
+      LowerBoundParameter.Value.Value = CalculateLowerBound();
+    }
+
+    public override BPPData Export() {
+      var result = new BPPData {
+        Name = Name,
+        Description = Description,
+        Items = PackingItemsParameter.Value.Value,
+        BinMeasures = new int[] { PackingBinMeasures.Width, PackingBinMeasures.Height, PackingBinMeasures.Depth }
+      };
+
+      var itemMeasures = new int[result.Items][];
+      int i = 0;
+      foreach (var item in PackingItemMeasures) {
+        itemMeasures[i] = new int[] { item.Width, item.Height, item.Depth };
+        i++;
+      }
+      result.ItemMeasures = itemMeasures;
+      return result;
+    }
+
     #region Helpers
     protected override void InitializeDecoder() {
@@ -112,9 +158,9 @@
 
       PackingSolutionDecoderParameter.ValidValues.Clear();
-      if (SolutionCreator is PackingSequenceRandomCreator) {   
+      if (SolutionCreator is PackingSequenceRandomCreator) {
         PackingSolutionDecoderParameter.ValidValues.UnionWith(ApplicationManager.Manager.GetInstances<I3DPSDecoder>());
-      } else if (SolutionCreator is GroupingVectorRandomCreator) {      
+      } else if (SolutionCreator is GroupingVectorRandomCreator) {
         PackingSolutionDecoderParameter.ValidValues.UnionWith(ApplicationManager.Manager.GetInstances<I3DGVDecoder>());
-      } else if (SolutionCreator is MultiComponentVectorRandomCreator) {    
+      } else if (SolutionCreator is MultiComponentVectorRandomCreator) {
         PackingSolutionDecoderParameter.ValidValues.UnionWith(ApplicationManager.Manager.GetInstances<I3DMCVDecoder>());
       } else {
@@ -133,6 +179,6 @@
 
     protected override void RemoveTooBigItems() {
-      PackingItemMeasures.RemoveAll(pi => 
-        !PackingBinMeasures.Encloses (new ThreeDimensionalPacking(0, 0, 0, 0, false), pi) &&
+      PackingItemMeasures.RemoveAll(pi =>
+        !PackingBinMeasures.Encloses(new ThreeDimensionalPacking(0, 0, 0, 0, false), pi) &&
         !PackingBinMeasures.Encloses(new ThreeDimensionalPacking(0, 0, 0, 0, true), pi));
     }
Index: /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/RegularIdenticalBinPackingProblem.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/RegularIdenticalBinPackingProblem.cs	(revision 14038)
+++ /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/RegularIdenticalBinPackingProblem.cs	(revision 14039)
@@ -41,8 +41,8 @@
   [Item("RegularIdenticalBinPackingProblem", "Represents a bin-packing problem-instance using only bins with identical measures and bins/items with regular shapes (e.g. rectangle, cuboid).")]
   [StorableClass]
-  public abstract class RegularIdenticalBinPackingProblem<D, B, I> : BinPackingProblem<D, B, I>, IProblemInstanceConsumer<BPPData>,  IProblemInstanceExporter<BPPData> 
+  public abstract class RegularIdenticalBinPackingProblem<D, B, I> : BinPackingProblem<D, B, I>, IProblemInstanceConsumer<BPPData>, IProblemInstanceExporter<BPPData>
     where D : class, IPackingDimensions
     where B : PackingShape<D>, IPackingBin, IRegularPackingShape, new()
-    where I : PackingShape<D>, IPackingItem, IRegularPackingShape, new() {        
+    where I : PackingShape<D>, IPackingItem, IRegularPackingShape, new() {
 
     #region Parameter Properties
@@ -58,7 +58,7 @@
     public B PackingBinMeasures {
       get { return PackingBinMeasuresParameter.Value; }
-      set { PackingBinMeasuresParameter.Value = value; } 
-    }
-    public PackingSolutionDecoder<D,B,I> PackingSolutionDecoder {
+      set { PackingBinMeasuresParameter.Value = value; }
+    }
+    public PackingSolutionDecoder<D, B, I> PackingSolutionDecoder {
       get { return PackingSolutionDecoderParameter.Value as PackingSolutionDecoder<D, B, I>; }
       set { PackingSolutionDecoderParameter.Value = value; }
@@ -69,5 +69,5 @@
     [StorableConstructor]
     protected RegularIdenticalBinPackingProblem(bool deserializing) : base(deserializing) { }
-    protected RegularIdenticalBinPackingProblem(RegularIdenticalBinPackingProblem<D,B,I> original, Cloner cloner)
+    protected RegularIdenticalBinPackingProblem(RegularIdenticalBinPackingProblem<D, B, I> original, Cloner cloner)
       : base(original, cloner) {
       InitializeEventHandlers();
@@ -86,5 +86,5 @@
     }
 
-    
+
 
 
@@ -101,5 +101,5 @@
     protected abstract void InitializeProblemData();
     protected abstract IPackingPlanEvaluator CreateDefaultEvaluator();
-    private void ApplyHorizontalOrientation() {
+    protected void ApplyHorizontalOrientation() {
       PackingBinMeasures.ApplyHorizontalOrientation();
       foreach (IRegularPackingShape shape in PackingItemMeasures) {
@@ -107,16 +107,16 @@
       }
     }
-    private void SortItems() {
+    protected void SortItems() {
       PackingItemMeasures.Sort((x, y) => y.CompareTo(x));
     }
-    private int CalculateLowerBound() {
+    protected int CalculateLowerBound() {
       //This is the obvious continuous lower bound calculation; Martello and Vigo proposed a better way but it has not been implemented yet;
       int items = PackingItemMeasures.Select(x => x.Volume).Sum();
       int bin = PackingBinMeasures.Volume;
-      return (items + bin - 1)/(bin);
+      return (items + bin - 1) / (bin);
     }
 
     protected override void InitializeOperators() {
-      Operators.Clear();  
+      Operators.Clear();
       Operators.Add(new BestBinPackingSolutionAnalyzer<D, B, I>());
 
@@ -134,7 +134,7 @@
         Operators.AddRange(ApplicationManager.Manager.GetInstances<IMultiComponentVectorOperator>());
         InitializeDecoder();
-      } 
-    }
-    private void ParameterizeOperators() {    
+      }
+    }
+    private void ParameterizeOperators() {
       foreach (var op in Operators.OfType<BestBinPackingSolutionAnalyzer<D, B, I>>()) {
         op.QualityParameter.ActualName = PackingPlanEvaluator.QualityParameter.ActualName;
@@ -224,58 +224,10 @@
       ParameterizeOperators();
     }
-    #endregion
-
-
-    #region Problem instance handling
-    public virtual void Load(BPPData data) {
-      // var realData = data as RealBPPData;
-      // var binData = new B();
-      // binData.InitializeFromMeasures (data.BinMeasures);
-      // 
-      // var itemData = new ItemList<I>(data.Items);
-      // for (int j = 0; j < data.Items; j++) {
-      //   var item = new I();
-      //   item.InitializeFromMeasures(data.ItemMeasures[j]);
-      //   item.AddTargetBinMeasures(data.BinMeasures);
-      //   if (realData != null) {
-      //     item.Weight = realData.ItemWeights[j];
-      //     item.Material = realData.ItemMaterials[j];
-      //   }
-      //   itemData.Add(item);
-      // }
-      // 
-      // BestKnownQuality = data.BestKnownQuality.HasValue ? new DoubleValue(data.BestKnownQuality.Value) : null;
-      // 
-      // PackingBinMeasures = binData;    
-      // PackingItemMeasures = itemData;
-      // 
-      // ApplyHorizontalOrientation();
-      // SortItems();
-      // PackingItemsParameter.Value.Value = PackingItemMeasures.Count;
-      // LowerBoundParameter.Value.Value = CalculateLowerBound();
-
-      throw new NotImplementedException();
-    }
-
-    public BPPData Export() {
-      // var result = new BPPData{
-      //   Name = Name,
-      //   Description = Description,
-      //   Items = PackingItemsParameter.Value.Value,
-      //   BinMeasures = PackingBinMeasures.ToArray() // TODO: split functionality of class in 2d and 3d code
-      // };
-      // 
-      // var itemMeasures = new int[result.Items][];
-      // int i = 0;
-      // foreach (var item in PackingItemMeasures) {
-      //   itemMeasures[i] = item.ToArray();
-      //   i++;
-      // }
-      // result.ItemMeasures = itemMeasures;
-      // return result;
-
-      throw new NotImplementedException();
-    }
-    #endregion
+
+    public abstract void Load(BPPData data);
+
+    public abstract BPPData Export();
+    #endregion
+
   }
 }
