Index: /trunk/sources/HeuristicLab.Problems.BinPacking.Views/3.3/HeuristicLab.Problems.BinPacking.Views-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking.Views/3.3/HeuristicLab.Problems.BinPacking.Views-3.3.csproj	(revision 15229)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking.Views/3.3/HeuristicLab.Problems.BinPacking.Views-3.3.csproj	(revision 15230)
@@ -19,5 +19,5 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
@@ -27,5 +27,5 @@
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
@@ -34,5 +34,5 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
     <DebugSymbols>true</DebugSymbols>
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <DebugType>full</DebugType>
@@ -41,5 +41,5 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <Optimize>true</Optimize>
@@ -50,5 +50,5 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
     <DebugSymbols>true</DebugSymbols>
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <DebugType>full</DebugType>
@@ -57,5 +57,5 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <Optimize>true</Optimize>
@@ -71,11 +71,67 @@
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="HeuristicLab.Collections-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core.Views-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core.Views-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Data.Views-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data.Views-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Views-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
     <Reference Include="PresentationCore" />
     <Reference Include="PresentationFramework" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Data" />
     <Reference Include="System.Drawing" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xaml" />
+    <Reference Include="System.Xml" />
     <Reference Include="UIAutomationProvider" />
     <Reference Include="WindowsBase" />
@@ -126,39 +182,4 @@
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
-      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
-      <Name>HeuristicLab.Collections-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
-      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
-      <Name>HeuristicLab.Common-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj">
-      <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project>
-      <Name>HeuristicLab.Core.Views-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
-      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
-      <Name>HeuristicLab.Core-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">
-      <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
-      <Name>HeuristicLab.MainForm.WindowsForms-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.MainForm\3.3\HeuristicLab.MainForm-3.3.csproj">
-      <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>
-      <Name>HeuristicLab.MainForm-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
-      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
-      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Problems.BinPacking\3.3\HeuristicLab.Problems.BinPacking-3.3.csproj">
       <Project>{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}</Project>
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/BinPacking2D.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/BinPacking2D.cs	(revision 15229)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/BinPacking2D.cs	(revision 15230)
@@ -88,38 +88,34 @@
       };
 
-      int epIndex = 0;
-      while (epIndex < ExtremePoints.Count && (!IsPositionFeasible(rotatedItem, ExtremePoints.ElementAt(epIndex)))) { epIndex++; }
-
-      if (epIndex < ExtremePoints.Count) {
-        var currentPoint = ExtremePoints.ElementAt(epIndex);
-
-        var result = new PackingPosition(currentPoint.AssignedBin, currentPoint.X, currentPoint.Y, rotated);
+      var ep = ExtremePoints.Where(x => IsPositionFeasible(rotatedItem, x, stackingConstraints)).FirstOrDefault();
+      if (ep != null) {
+        var result = new PackingPosition(ep.AssignedBin, ep.X, ep.Y, rotated);
         return result;
       }
       return null;
     }
-    public override PackingPosition FindPositionBySliding(PackingItem item, bool rotated) {
+    public override PackingPosition FindPositionBySliding(PackingItem item, bool rotated, bool stackingConstraints) {
       PackingPosition currentPosition = new PackingPosition(0,
         BinShape.Width - (rotated ? item.Height : item.Width),
         BinShape.Height - (rotated ? item.Width : item.Height), rotated);
       //Slide the item as far as possible to the left
-      while (IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition))
-        || IsPositionFeasible(item, PackingPosition.MoveDown(currentPosition))) {
+      while (IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition), stackingConstraints)
+        || IsPositionFeasible(item, PackingPosition.MoveDown(currentPosition), stackingConstraints)) {
         //Slide the item as far as possible to the bottom
-        while (IsPositionFeasible(item, PackingPosition.MoveDown(currentPosition))) {
+        while (IsPositionFeasible(item, PackingPosition.MoveDown(currentPosition), stackingConstraints)) {
           currentPosition = PackingPosition.MoveDown(currentPosition);
         }
-        if (IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition)))
+        if (IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition), stackingConstraints))
           currentPosition = PackingPosition.MoveLeft(currentPosition);
       }
 
-      return IsPositionFeasible(item, currentPosition) ? currentPosition : null;
-    }
-
-    public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items) {
+      return IsPositionFeasible(item, currentPosition, stackingConstraints) ? currentPosition : null;
+    }
+
+    public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints) {
       var temp = new List<int>(sequence);
       for (int i = 0; i < temp.Count; i++) {
         var item = items[temp[i]];
-        var position = FindPositionBySliding(item, false);
+        var position = FindPositionBySliding(item, false, stackingConstraints);
         if (position != null) {
           PackItem(temp[i], item, position);
@@ -128,9 +124,9 @@
       }
     }
-    public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, Dictionary<int, bool> rotationArray) {
+    public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, Dictionary<int, bool> rotationArray, bool stackingConstraints) {
       var temp = new List<int>(sequence);
       for (int i = 0; i < temp.Count; i++) {
         var item = items[temp[i]];
-        var position = FindPositionBySliding(item, rotationArray[temp[i]]);
+        var position = FindPositionBySliding(item, rotationArray[temp[i]], stackingConstraints);
         if (position != null) {
           PackItem(temp[i], item, position);
@@ -150,4 +146,5 @@
       }
     }
+    
     public override void ExtremePointBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints, Dictionary<int, bool> rotationArray) {
       var temp = new List<int>(sequence);
@@ -186,5 +183,4 @@
       throw new NotSupportedException();
     }
-
     protected override void InitializeOccupationLayers() {
       for (int i = 0; i * 10 <= BinShape.Width; i += 1) {
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/IntegerVectorEncoding/BottomLeftIntegerVectorDecoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/IntegerVectorEncoding/BottomLeftIntegerVectorDecoder.cs	(revision 15229)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/IntegerVectorEncoding/BottomLeftIntegerVectorDecoder.cs	(revision 15230)
@@ -47,5 +47,5 @@
 
     protected override PackingPosition FindPositionForItem(BinPacking2D bp, PackingItem item) {
-      return bp.FindPositionBySliding(item, rotated: false);
+      return bp.FindPositionBySliding(item, rotated: false, stackingConstraints: false);
     }
 
@@ -54,5 +54,5 @@
       ref IList<int> remainingIDs, IList<PackingItem> items) {
       var bp = new BinPacking2D(partialSolution.BinShape);
-      bp.SlidingBasedPacking(ref remainingIDs, items);
+      bp.SlidingBasedPacking(ref remainingIDs, items, stackingConstraints: false);
       return bp;
     }
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/BottomLeftPermutationDecoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/BottomLeftPermutationDecoder.cs	(revision 15229)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/2D/PermutationEncoding/BottomLeftPermutationDecoder.cs	(revision 15230)
@@ -46,5 +46,5 @@
       while (remainingIDs.Count > 0) {
         var bp = new BinPacking2D(binShape);
-        bp.SlidingBasedPacking(ref remainingIDs, items);
+        bp.SlidingBasedPacking(ref remainingIDs, items, stackingConstraints: false);
         result.Bins.Add(bp);
       }
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/BinPacking3D.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/BinPacking3D.cs	(revision 15229)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/BinPacking3D.cs	(revision 15230)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -35,5 +36,6 @@
       : base(binShape) {
       ExtremePoints = new SortedSet<PackingPosition>();
-      ExtremePoints.Add(binShape.Origin);
+      ResidualSpace = new Dictionary<PackingPosition, Tuple<int,int,int>>();
+      AddExtremePoint(binShape.Origin);
       InitializeOccupationLayers();
     }
@@ -43,4 +45,7 @@
       : base(original, cloner) {
       this.ExtremePoints = new SortedSet<PackingPosition>(original.ExtremePoints.Select(p => cloner.Clone(p)));
+      this.ResidualSpace = new Dictionary<PackingPosition, Tuple<int, int, int>>();
+      foreach (var o in original.ResidualSpace)
+        this.ResidualSpace.Add(cloner.Clone(o.Key), Tuple.Create(o.Value.Item1, o.Value.Item2, o.Value.Item3));
     }
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -60,9 +65,9 @@
           current = PackingPosition.MoveDown(current);
         }
-        ExtremePoints.Add((PackingPosition)current.Clone());
+        AddExtremePoint((PackingPosition)current.Clone());
         while (current.X > 0 && !IsPointOccupied(PackingPosition.MoveLeft(current))) {
           current = PackingPosition.MoveLeft(current);
         }
-        ExtremePoints.Add(current);
+        AddExtremePoint(current);
 
         //Traversing down the z-axis
@@ -71,9 +76,9 @@
           current = PackingPosition.MoveBack(current);
         }
-        ExtremePoints.Add((PackingPosition)current.Clone());
-        while (current.Y > 0 && !IsPointOccupied(PackingPosition.MoveDown(current))) {
-          current = PackingPosition.MoveDown(current);
-        }
-        ExtremePoints.Add(current);
+        AddExtremePoint((PackingPosition)current.Clone());
+        while (current.Y > 0 && !IsPointOccupied(PackingPosition.MoveDown(current))) {
+          current = PackingPosition.MoveDown(current);
+        }
+        AddExtremePoint(current);
       }
 
@@ -86,9 +91,9 @@
           current = PackingPosition.MoveLeft(current);
         }
-        ExtremePoints.Add((PackingPosition)current.Clone());
-        while (current.Y > 0 && !IsPointOccupied(PackingPosition.MoveDown(current))) {
-          current = PackingPosition.MoveDown(current);
-        }
-        ExtremePoints.Add(current);
+        AddExtremePoint((PackingPosition)current.Clone());
+        while (current.Y > 0 && !IsPointOccupied(PackingPosition.MoveDown(current))) {
+          current = PackingPosition.MoveDown(current);
+        }
+        AddExtremePoint(current);
 
         //Traversing down the z-axis
@@ -97,9 +102,9 @@
           current = PackingPosition.MoveBack(current);
         }
-        ExtremePoints.Add((PackingPosition)current.Clone());
-        while (current.Y > 0 && !IsPointOccupied(PackingPosition.MoveDown(current))) {
-          current = PackingPosition.MoveDown(current);
-        }
-        ExtremePoints.Add(current);
+        AddExtremePoint((PackingPosition)current.Clone());
+        while (current.Y > 0 && !IsPointOccupied(PackingPosition.MoveDown(current))) {
+          current = PackingPosition.MoveDown(current);
+        }
+        AddExtremePoint(current);
       }
 
@@ -112,9 +117,9 @@
           current = PackingPosition.MoveLeft(current);
         }
-        ExtremePoints.Add((PackingPosition)current.Clone());
-        while (current.Y > 0 && !IsPointOccupied(PackingPosition.MoveDown(current))) {
-          current = PackingPosition.MoveDown(current);
-        }
-        ExtremePoints.Add(current);
+        AddExtremePoint((PackingPosition)current.Clone());
+        while (current.Y > 0 && !IsPointOccupied(PackingPosition.MoveDown(current))) {
+          current = PackingPosition.MoveDown(current);
+        }
+        AddExtremePoint(current);
 
         //Traversing down the y-axis
@@ -123,14 +128,20 @@
           current = PackingPosition.MoveDown(current);
         }
-        ExtremePoints.Add((PackingPosition)current.Clone());
+        AddExtremePoint((PackingPosition)current.Clone());
         while (current.X > 0 && !IsPointOccupied(PackingPosition.MoveLeft(current))) {
           current = PackingPosition.MoveLeft(current);
         }
-        ExtremePoints.Add(current);
+        AddExtremePoint(current);
+      }
+    }
+
+    private void AddExtremePoint(PackingPosition current) {
+      if (ExtremePoints.Add(current)) {
+        var tuple = Tuple.Create(BinShape.Width - current.X, BinShape.Height - current.Y, BinShape.Depth - current.Z);
+        ResidualSpace.Add(current, tuple);
       }
     }
 
     public override PackingPosition FindExtremePointForItem(PackingItem item, bool rotated, bool stackingConstraints) {
-
       PackingItem newItem = new PackingItem(
         rotated ? item.Depth : item.Width,
@@ -139,15 +150,7 @@
         item.TargetBin, item.Weight, item.Material);
 
-      int epIndex = 0;
-      while (epIndex < ExtremePoints.Count && (
-        !IsPositionFeasible(newItem, ExtremePoints.ElementAt(epIndex))
-        || !IsSupportedByAtLeastOnePoint(newItem, ExtremePoints.ElementAt(epIndex))
-        || (stackingConstraints && !IsStaticStable(newItem, ExtremePoints.ElementAt(epIndex)))
-        || (stackingConstraints && !IsWeightSupported(newItem, ExtremePoints.ElementAt(epIndex)))
-      )) { epIndex++; }
-
-      if (epIndex < ExtremePoints.Count) {
-        var origPoint = ExtremePoints.ElementAt(epIndex);
-        var result = new PackingPosition(origPoint.AssignedBin, origPoint.X, origPoint.Y, origPoint.Z, rotated);
+      var ep = ExtremePoints.Where(x => IsPositionFeasible(newItem, x, stackingConstraints)).FirstOrDefault();
+      if (ep != null) {
+        var result = new PackingPosition(ep.AssignedBin, ep.X, ep.Y, ep.Z, rotated);
         return result;
       }
@@ -155,6 +158,12 @@
     }
 
-    public override PackingPosition FindPositionBySliding(PackingItem item, bool rotated) {
-      //TODO: does not support stacking constraints yet
+    public override bool IsPositionFeasible(PackingItem item, PackingPosition position, bool stackingConstraints) {
+      var feasible = base.IsPositionFeasible(item, position, stackingConstraints);
+      return feasible
+        && IsSupportedByAtLeastOnePoint(item, position)
+        && (!stackingConstraints || (IsStaticStable(item, position) && IsWeightSupported(item, position)));
+    }
+
+    public override PackingPosition FindPositionBySliding(PackingItem item, bool rotated, bool stackingConstraints) {
       //Starting-position at upper right corner (=left bottom point of item-rectangle is at position item.width,item.height)
       PackingPosition currentPosition = new PackingPosition(0,
@@ -163,29 +172,29 @@
         BinShape.Depth - (rotated ? item.Width : item.Depth), rotated);
       //Slide the item as far as possible to the bottom
-      while (IsPositionFeasible(item, PackingPosition.MoveDown(currentPosition))
-        || IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition))
-        || IsPositionFeasible(item, PackingPosition.MoveBack(currentPosition))) {
+      while (IsPositionFeasible(item, PackingPosition.MoveDown(currentPosition), stackingConstraints)
+        || IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition), stackingConstraints)
+        || IsPositionFeasible(item, PackingPosition.MoveBack(currentPosition), stackingConstraints)) {
         //Slide the item as far as possible to the left
-        while (IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition))
-      || IsPositionFeasible(item, PackingPosition.MoveBack(currentPosition))) {
+        while (IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition), stackingConstraints)
+      || IsPositionFeasible(item, PackingPosition.MoveBack(currentPosition), stackingConstraints)) {
           //Slide the item as far as possible to the back
-          while (IsPositionFeasible(item, PackingPosition.MoveBack(currentPosition))) {
+          while (IsPositionFeasible(item, PackingPosition.MoveBack(currentPosition), stackingConstraints)) {
             currentPosition = PackingPosition.MoveBack(currentPosition);
           }
-          if (IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition)))
+          if (IsPositionFeasible(item, PackingPosition.MoveLeft(currentPosition), stackingConstraints))
             currentPosition = PackingPosition.MoveLeft(currentPosition);
         }
-        if (IsPositionFeasible(item, PackingPosition.MoveDown(currentPosition)))
+        if (IsPositionFeasible(item, PackingPosition.MoveDown(currentPosition), stackingConstraints))
           currentPosition = PackingPosition.MoveDown(currentPosition);
       }
 
-      return IsPositionFeasible(item, currentPosition) ? currentPosition : null;
-    }
-
-    public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items) {
+      return IsPositionFeasible(item, currentPosition, stackingConstraints) ? currentPosition : null;
+    }
+
+    public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints) {
       var temp = new List<int>(sequence);
       for (int i = 0; i < temp.Count; i++) {
         var item = items[temp[i]];
-        var position = FindPositionBySliding(item, false);
+        var position = FindPositionBySliding(item, false, stackingConstraints);
         if (position != null) {
           PackItem(temp[i], item, position);
@@ -194,9 +203,9 @@
       }
     }
-    public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, Dictionary<int, bool> rotationArray) {
+    public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, Dictionary<int, bool> rotationArray, bool stackingConstraints) {
       var temp = new List<int>(sequence);
       for (int i = 0; i < temp.Count; i++) {
         var item = items[temp[i]];
-        var position = FindPositionBySliding(item, rotationArray[i]);
+        var position = FindPositionBySliding(item, rotationArray[i], stackingConstraints);
         if (position != null) {
           PackItem(temp[i], item, position);
@@ -212,4 +221,7 @@
         if (positionFound != null) {
           PackItem(itemID, item, positionFound);
+          if (!(positionFound.X == 0 && positionFound.Y == 0 && positionFound.Z == 0)) {
+            UpdateResidualSpace(item, positionFound);
+          }
           sequence.Remove(itemID);
         }
@@ -227,5 +239,4 @@
       }
     }
-
     public override int ShortestPossibleSideFromPoint(PackingPosition position) {
 
@@ -297,5 +308,4 @@
     }
 
-
     protected override void InitializeOccupationLayers() {
       for (int i = 0; i * 10 <= BinShape.Depth; i += 1) {
@@ -320,8 +330,31 @@
       for (int i = z1; i <= z2; i++)
         result.AddRange(OccupationLayers[i]);
-
       return result;
     }
+    
+    public void UpdateResidualSpace(PackingItem item, PackingPosition pos) {
+      foreach (var ep in ExtremePoints) {
+        if (ep.Z >= pos.Z && ep.Z <= pos.Z + item.Depth) {
+          if (ep.X <= pos.X && ep.Y > pos.Y && ep.Y < pos.Y + item.Height) {
+            var diff = pos.X - ep.X;
+            var newRSX = ResidualSpace[ep].Item1 < diff ? ResidualSpace[ep].Item1 : diff;
+            ResidualSpace[ep] = Tuple.Create(newRSX, ResidualSpace[ep].Item2, ResidualSpace[ep].Item3);
+          }
+          if (ep.Y <= pos.Y && ep.X > pos.X && ep.X < pos.X + item.Width) {
+            var diff = pos.Y - ep.Y;
+            var newRSY = ResidualSpace[ep].Item2 < diff ? ResidualSpace[ep].Item2 : diff;
+            ResidualSpace[ep] = Tuple.Create(ResidualSpace[ep].Item1, newRSY, ResidualSpace[ep].Item3);
+          }
+        }
+        if (ep.Z <= pos.Z && 
+          ep.Y > pos.Y && ep.Y < pos.Y + item.Height &&
+          ep.X > pos.X && ep.X < pos.X + item.Width) {
+            var diff = pos.Z - ep.Z;
+            var newRSZ = ResidualSpace[ep].Item3 < diff ? ResidualSpace[ep].Item3 : diff;
+            ResidualSpace[ep] = Tuple.Create(ResidualSpace[ep].Item1, ResidualSpace[ep].Item2, newRSZ);
+        }
+      }
+      return;
+    }
   }
-
 }
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RealWorldContainerPackingInstanceProvider.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RealWorldContainerPackingInstanceProvider.cs	(revision 15230)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RealWorldContainerPackingInstanceProvider.cs	(revision 15230)
@@ -0,0 +1,139 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.IO.Compression;
+using System.Linq;
+using System.Reflection;
+using System.Text.RegularExpressions;
+using HeuristicLab.Problems.Instances;
+
+namespace HeuristicLab.Problems.BinPacking3D {
+  public sealed class RealWorldContainerPackingInstanceProvider : ProblemInstanceProvider<BPPData> {
+    private string FileName { get { return "ContainerPackingInstances"; } }
+    
+    public override string Name {
+      get { return "Real-world Container Packing"; }
+    }
+
+    public override string Description {
+      get { return "Problem instances derived from real-world container packing data."; }
+    }
+
+    public override Uri WebLink {
+      get { return null; }
+    }
+
+    public override string ReferencePublication {
+      get { return null; }
+    }
+
+    public RealWorldContainerPackingInstanceProvider() : base() { }
+
+    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
+      var instanceArchiveName = GetResourceName(FileName + @"\.zip");
+      if (String.IsNullOrEmpty(instanceArchiveName)) yield break;
+
+      using (var instanceStream = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName), ZipArchiveMode.Read)) {
+        foreach (var entry in instanceStream.Entries.Select(x => x.Name).OrderBy(x => x)) {
+          yield return new ThreeDInstanceDescriptor(Path.GetFileNameWithoutExtension(entry), GetDescription(), entry);
+        }
+      }
+    }
+
+    private string GetResourceName(string fileName) {
+      return Assembly.GetExecutingAssembly().GetManifestResourceNames()
+              .Where(x => Regex.Match(x, @".*\.Instances\." + fileName).Success).SingleOrDefault();
+    }
+
+    private string GetDescription() {
+      return "Embedded instance of plugin version " + Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyFileVersionAttribute), true).Cast<AssemblyFileVersionAttribute>().First().Version + ".";
+    }
+
+    public override BPPData LoadData(IDataDescriptor dd) {
+      var desc = dd as ThreeDInstanceDescriptor;
+      if (desc == null) throw new NotSupportedException("Cannot load data descriptor " + dd);
+      var instanceArchiveName = GetResourceName(FileName + @"\.zip");
+      using (
+        var instancesZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName),
+          ZipArchiveMode.Read)) {
+        var entry = instancesZipFile.GetEntry(desc.InstanceIdentifier);
+
+        using (var stream = entry.Open()) {
+          var parser = new ThreeDInstanceParser();
+          parser.Parse(stream);
+
+          return new BPPData() {
+            Name = desc.Name,
+            Description = desc.Description,
+            BinShape = parser.Bin,
+            Items = parser.Items.ToArray()
+          };
+        }
+      }
+    }
+
+    public override bool CanImportData {
+      get { return true; }
+    }
+
+    public override BPPData ImportData(string path) {
+      using (var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) {
+        var parser = new ThreeDInstanceParser();
+        parser.Parse(stream);
+
+        return new BPPData() {
+          Name = Path.GetFileNameWithoutExtension(path),
+          Description = "Imported instance from " + path,
+          BinShape = parser.Bin,
+          Items = parser.Items.ToArray()
+        };
+      }
+    }
+
+    public override bool CanExportData {
+      get { return true; }
+    }
+
+    public override void ExportData(BPPData instance, string file) {
+      using (Stream stream = new FileStream(file, FileMode.OpenOrCreate, FileAccess.Write)) {
+        Export(instance, stream);
+      }
+    }
+    public static void Export(BPPData instance, Stream stream) {
+
+      using (var writer = new StreamWriter(stream)) {
+        writer.WriteLine(String.Format("{0,-5} {1,-5} {2,-5}   WBIN,HBIN,DBIN", instance.BinShape.Width, instance.BinShape.Height, instance.BinShape.Depth));
+        for (int i = 0; i < instance.NumItems; i++) {
+          if (i == 0)
+            writer.WriteLine("{0,-5} {1,-5} {2,-5}   W(I),H(I),D(I),I=1,...,N", instance.Items[i].Width, instance.Items[i].Height, instance.Items[i].Depth);
+          else
+            writer.WriteLine("{0,-5} {1,-5} {2,-5}", instance.Items[i].Width, instance.Items[i].Height, instance.Items[i].Depth);
+
+        }
+        writer.Flush();
+      }
+    }
+
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceDescriptor.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceDescriptor.cs	(revision 15230)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceDescriptor.cs	(revision 15230)
@@ -0,0 +1,39 @@
+﻿#region License Information
+
+/* HeuristicLab
+ * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#endregion
+
+using HeuristicLab.Problems.Instances;
+
+namespace HeuristicLab.Problems.BinPacking3D {
+  internal sealed class ThreeDInstanceDescriptor : IDataDescriptor {
+    public string Name { get; private set; }
+    public string Description { get; private set; }
+
+    public string InstanceIdentifier { get; private set; }
+
+    internal ThreeDInstanceDescriptor(string name, string description, string instanceIdentifier) {
+      this.Name = name;
+      this.Description = description;
+      this.InstanceIdentifier = instanceIdentifier;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceParser.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceParser.cs	(revision 15230)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceParser.cs	(revision 15230)
@@ -0,0 +1,76 @@
+﻿#region License Information
+
+/* HeuristicLab
+ * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+namespace HeuristicLab.Problems.BinPacking3D {
+  public class ThreeDInstanceParser {
+    public PackingShape Bin { get; private set; }
+    public List<PackingItem> Items { get; private set; }
+
+    public void Parse(Stream stream) {
+      var reader = new StreamReader(stream);
+      var length = GetNextInteger(reader);
+      var width = GetNextInteger(reader);
+      var height = GetNextInteger(reader);
+      var maxWeight = GetNextInteger(reader);
+      Bin = new PackingShape(width, height, length);
+      Items = new List<PackingItem>();
+      while (true) {
+        try {
+          var id = GetNextInteger(reader);
+          var pieces = GetNextInteger(reader);
+          length = GetNextInteger(reader);
+          width = GetNextInteger(reader);
+          height = GetNextInteger(reader);
+          var weight = GetNextInteger(reader);
+          var stack = GetNextInteger(reader);
+          var material = GetNextInteger(reader);
+          var rotate = GetNextInteger(reader);
+          var tilt = GetNextInteger(reader);
+          for (var i = 0; i < pieces; i++) {
+            Items.Add(new PackingItem(width, height, length, Bin, weight, material));
+          }
+        } catch (InvalidOperationException) {
+          break;
+        }
+      }
+    }
+
+    private int GetNextInteger(StreamReader reader) {
+      var next = reader.Read();
+      var builder = new StringBuilder();
+      while (next >= 0 && !char.IsDigit((char)next)) next = reader.Read();
+      if (next == -1) throw new InvalidOperationException("No further integer available");
+      while (char.IsDigit((char)next)) {
+        builder.Append((char)next);
+        next = reader.Read();
+        if (next == -1) break;
+      }
+      return int.Parse(builder.ToString());
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/IntegerVectorEncoding/BottomLeftIntegerVectorDecoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/IntegerVectorEncoding/BottomLeftIntegerVectorDecoder.cs	(revision 15229)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/IntegerVectorEncoding/BottomLeftIntegerVectorDecoder.cs	(revision 15230)
@@ -54,5 +54,5 @@
 
     protected override PackingPosition FindPositionForItem(BinPacking3D bp, PackingItem item, bool useStackingConstraints) {
-      return bp.FindPositionBySliding(item, rotated: false);
+      return bp.FindPositionBySliding(item, rotated: false, stackingConstraints: useStackingConstraints);
     }
 
@@ -61,5 +61,5 @@
       ref IList<int> remainingIDs, IList<PackingItem> items, bool useStackingConstraints) {
       var bp = new BinPacking3D(partialSolution.BinShape);
-      bp.SlidingBasedPacking(ref remainingIDs, items);
+      bp.SlidingBasedPacking(ref remainingIDs, items, useStackingConstraints);
       return bp;
     }
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/BottomLeftPermutationDecoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/BottomLeftPermutationDecoder.cs	(revision 15229)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/BottomLeftPermutationDecoder.cs	(revision 15230)
@@ -46,5 +46,5 @@
       while (remainingIDs.Count > 0) {
         var bp = new BinPacking3D(binShape);
-        bp.SlidingBasedPacking(ref remainingIDs, items);
+        bp.SlidingBasedPacking(ref remainingIDs, items, useStackingConstraints);
         result.Bins.Add(bp);
       }
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/ExtremePointPermutationDecoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/ExtremePointPermutationDecoder.cs	(revision 15229)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/ExtremePointPermutationDecoder.cs	(revision 15230)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -25,9 +26,11 @@
 using System.Collections.Generic;
 using HeuristicLab.Encodings.PermutationEncoding;
+using System.Linq;
+
 
 namespace HeuristicLab.Problems.BinPacking3D {
   [Item("Extreme-point Permutation Decoder (3d)", "Decodes the permutation and creates a packing solution candidate")]
   [StorableClass]
-  public class ExtremePointPermutationDecoder : Item, IDecoder<Permutation> {
+  public class ExtremePointPermutationDecoder : ExtremePointPermutationDecoderBase {
 
     [StorableConstructor]
@@ -41,5 +44,9 @@
     }
 
-    public Solution Decode(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
+    public override Solution Decode(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
+      return Apply(permutation, binShape, items, useStackingConstraints);
+    }
+
+    public static Solution Apply(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
       Solution result = new Solution(binShape, useExtremePoints: true, stackingConstraints: useStackingConstraints);
       IList<int> remainingIDs = new List<int>(permutation);
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/ExtremePointPermutationDecoderBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/ExtremePointPermutationDecoderBase.cs	(revision 15230)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/ExtremePointPermutationDecoderBase.cs	(revision 15230)
@@ -0,0 +1,42 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+ 
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.BinPacking3D {
+  [Item("Extreme-point Permutation Decoder (3d) Base", "Base class for decoders")]
+  [StorableClass]
+  public abstract class ExtremePointPermutationDecoderBase : Item, IDecoder<Permutation> {
+
+    [StorableConstructor]
+    protected ExtremePointPermutationDecoderBase(bool deserializing) : base(deserializing) { }
+    protected ExtremePointPermutationDecoderBase(ExtremePointPermutationDecoderBase original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public ExtremePointPermutationDecoderBase() : base() { }
+
+    public abstract Solution Decode(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints);
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/FreeVolumeBestFitExtremePointPermutationDecoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/FreeVolumeBestFitExtremePointPermutationDecoder.cs	(revision 15230)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/FreeVolumeBestFitExtremePointPermutationDecoder.cs	(revision 15230)
@@ -0,0 +1,79 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.BinPacking3D {
+  [Item("Free Volume Best Fit Extreme-point Permutation Decoder (3d)", "Decodes the permutation and creates a packing solution candidate")]
+  [StorableClass]
+  public class FreeVolumeBestFitExtremePointPermutationDecoder : ExtremePointPermutationDecoderBase {
+
+    [StorableConstructor]
+    protected FreeVolumeBestFitExtremePointPermutationDecoder(bool deserializing) : base(deserializing) { }
+    protected FreeVolumeBestFitExtremePointPermutationDecoder(FreeVolumeBestFitExtremePointPermutationDecoder original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public FreeVolumeBestFitExtremePointPermutationDecoder() : base() { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new FreeVolumeBestFitExtremePointPermutationDecoder(this, cloner);
+    }
+
+    public override Solution Decode(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
+      return Apply(permutation, binShape, items, useStackingConstraints);
+    }
+
+    public static Solution Apply(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
+      Solution result = new Solution(binShape, useExtremePoints: true, stackingConstraints: useStackingConstraints);
+      IList<int> remainingIDs = new List<int>(permutation);
+      var bpg = new BinPacking3D(binShape);
+      bpg.ExtremePointBasedPacking(ref remainingIDs, items, stackingConstraints: useStackingConstraints);
+      result.Bins.Add(bpg);
+      foreach (int ID in remainingIDs) {
+        var sortedBins = result.Bins.OrderBy(x => x.FreeVolume);
+        var item = items[ID];
+        var posFound = false;
+        foreach (var bp in sortedBins) {
+          var pos = bp.FindExtremePointForItem(item, false, useStackingConstraints);
+          posFound = pos != null;
+          if (posFound) {
+            bp.PackItem(ID, item, pos);
+            break;
+          }
+        }
+        if (!posFound) {
+          var bp = new BinPacking3D(binShape);
+          var pos = bp.FindExtremePointForItem(item, false, useStackingConstraints);
+          if (pos == null) throw new InvalidOperationException("Item " + ID + " cannot be packed in empty bin.");
+          bp.PackItem(ID, item, pos);
+          result.Bins.Add(bp);
+        }
+      }
+      result.UpdateBinPackings();
+      return result;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/ResidualSpaceBestFitExtremePointPermutationDecoder.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/ResidualSpaceBestFitExtremePointPermutationDecoder.cs	(revision 15230)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/PermutationEncoding/ResidualSpaceBestFitExtremePointPermutationDecoder.cs	(revision 15230)
@@ -0,0 +1,96 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.BinPacking3D {
+  [Item("Residual Space Best Fit Extreme-point Permutation Decoder (3d)", "Decodes the permutation and creates a packing solution candidate")]
+  [StorableClass]
+  public class ResidualSpaceBestFitExtremePointPermutationDecoder : ExtremePointPermutationDecoderBase {
+
+    [StorableConstructor]
+    protected ResidualSpaceBestFitExtremePointPermutationDecoder(bool deserializing) : base(deserializing) { }
+    protected ResidualSpaceBestFitExtremePointPermutationDecoder(ResidualSpaceBestFitExtremePointPermutationDecoder original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public ResidualSpaceBestFitExtremePointPermutationDecoder() : base() { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ResidualSpaceBestFitExtremePointPermutationDecoder(this, cloner);
+    }
+
+    public override Solution Decode(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
+      return Apply(permutation, binShape, items, useStackingConstraints);
+    }
+
+    public static Solution Apply(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
+      Solution result = new Solution(binShape, useExtremePoints: true, stackingConstraints: useStackingConstraints);
+      IList<int> remainingIDs = new List<int>(permutation);
+      var bpg = new BinPacking3D(binShape);
+      bpg.ExtremePointBasedPacking(ref remainingIDs, items, stackingConstraints: useStackingConstraints);
+      result.Bins.Add(bpg);
+      foreach (int ID in remainingIDs) {
+        var item = items[ID];
+        var points = GetResidualSpaceAllPoints(result, item);
+        var sortedPoints = points.OrderBy(x => x.Item3);
+        var packed = false;
+        foreach (var p in sortedPoints) {
+          packed = p.Item1.PackItemIfFeasible(ID, item, p.Item2, useStackingConstraints);
+          if (packed) break;
+        }
+        if (!packed) {
+          // pack item in a new bin
+          var bp = new BinPacking3D(binShape);
+          var positionFound = bp.FindExtremePointForItem(item, false, useStackingConstraints);
+          if (positionFound != null) {
+            bp.PackItem(ID, item, positionFound);
+          } else throw new InvalidOperationException("Item " + ID + " cannot be packed in an empty bin.");
+          result.Bins.Add(bp);
+        }
+      }
+      result.UpdateBinPackings();
+      return result;
+    }
+
+    public static IList<Tuple<BinPacking3D, PackingPosition, int>> GetResidualSpaceAllPoints(Solution solution, PackingItem item) {
+      var result = new List<Tuple<BinPacking3D, PackingPosition, int>>();
+      foreach (BinPacking3D bp in solution.Bins) {
+        foreach (var ep in bp.ExtremePoints) {
+          var rs = bp.ResidualSpace[ep];
+          if (rs.Item1 < item.Width || rs.Item2 < item.Height || rs.Item3 < item.Depth) continue;
+          result.Add(Tuple.Create(bp, ep, GetResidualMerit(rs, item, ep)));
+        }
+      }
+      return result;
+    }
+
+    private static int GetResidualMerit(Tuple<int, int, int> rs, PackingItem item, PackingPosition ep) {
+      return ((rs.Item1 - item.Width) +
+          (rs.Item2 - item.Height) +
+          (rs.Item3 - item.Depth));
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/ProblemBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/ProblemBase.cs	(revision 15229)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/3D/ProblemBase.cs	(revision 15230)
@@ -175,5 +175,4 @@
     public override bool Maximization { get { return true; } }
 
-
     public override double Evaluate(Individual individual, IRandom random) {
       var encodedSolutionCand = (TSol)individual[EncodedSolutionName];
@@ -237,5 +236,4 @@
       BinShape = data.BinShape;
       var items = new ItemList<PackingItem>(data.Items);
-      items.Sort((x, y) => y.CompareTo(x));
       Items = items.AsReadOnly();
 
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/Algorithms/3D/ExtremePointAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/Algorithms/3D/ExtremePointAlgorithm.cs	(revision 15230)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/Algorithms/3D/ExtremePointAlgorithm.cs	(revision 15230)
@@ -0,0 +1,241 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.BinPacking3D {
+  
+  public enum SortingMethod { All, Given, VolumeHeight, HeightVolume, AreaHeight, HeightArea, ClusteredAreaHeight, ClusteredHeightArea }
+  public enum FittingMethod { All, FirstFit, ResidualSpaceBestFit, FreeVolumeBestFit }
+
+  [Item("Extreme-point-based Bin Packing (3d)", "An implementation of the extreme-point based packing described in Crainic, T. G., Perboli, G., & Tadei, R. (2008). Extreme point-based heuristics for three-dimensional bin packing. Informs Journal on computing, 20(3), 368-384.")]
+  [StorableClass]
+  [Creatable(CreatableAttribute.Categories.SingleSolutionAlgorithms, Priority = 180)]
+  public sealed class ExtremePointAlgorithm : BasicAlgorithm {
+
+    public override Type ProblemType {
+      get { return typeof(PermutationProblem); }
+    }
+
+    public new PermutationProblem Problem {
+      get { return (PermutationProblem)base.Problem; }
+      set { base.Problem = value; }
+    }
+
+    public override bool SupportsPause {
+      get { return false; }
+    }
+
+    [Storable]
+    private readonly IValueParameter<EnumValue<SortingMethod>> sortingMethodParameter;
+    public IValueParameter<EnumValue<SortingMethod>> SortingMethodParameter {
+      get { return sortingMethodParameter; }
+    }
+
+    [Storable]
+    private readonly IValueParameter<EnumValue<FittingMethod>> fittingMethodParameter;
+    public IValueParameter<EnumValue<FittingMethod>> FittingMethodParameter {
+      get { return fittingMethodParameter; }
+    }
+
+    [Storable]
+    private readonly IValueParameter<PercentValue> deltaParameter;
+    public IValueParameter<PercentValue> DeltaParameter {
+      get { return deltaParameter; }
+    }
+
+    [StorableConstructor]
+    private ExtremePointAlgorithm(bool deserializing) : base(deserializing) { }
+    private ExtremePointAlgorithm(ExtremePointAlgorithm original, Cloner cloner)
+      : base(original, cloner) {
+      sortingMethodParameter = cloner.Clone(original.sortingMethodParameter);
+      fittingMethodParameter = cloner.Clone(original.fittingMethodParameter);
+      deltaParameter = cloner.Clone(original.deltaParameter);
+    }
+    public ExtremePointAlgorithm() {
+      Parameters.Add(sortingMethodParameter = new ValueParameter<EnumValue<SortingMethod>>("SortingMethod", "In which order the items should be packed.", new EnumValue<SortingMethod>(SortingMethod.All)));
+      Parameters.Add(fittingMethodParameter = new ValueParameter<EnumValue<FittingMethod>>("FittingMethod", "Which method to fit should be used.", new EnumValue<FittingMethod>(FittingMethod.All)));
+      Parameters.Add(deltaParameter = new ValueParameter<PercentValue>("Delta", "[1;100]% Clustered sorting methods use a delta parameter to determine the clusters.", new PercentValue(.1)));
+      
+      Problem = new PermutationProblem();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ExtremePointAlgorithm(this, cloner);
+    }
+    
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    protected override void Run(CancellationToken token) {
+      var items = Problem.Items;
+      var bin = Problem.BinShape;
+      var sorting = new[] { SortingMethodParameter.Value.Value };
+      if (sorting[0] == SortingMethod.All) {
+        sorting = Enum.GetValues(typeof(SortingMethod)).Cast<SortingMethod>().Where(x => x != SortingMethod.All).ToArray();
+      }
+      var fitting = new[] { fittingMethodParameter.Value.Value };
+      if (fitting[0] == FittingMethod.All) {
+        fitting = Enum.GetValues(typeof(FittingMethod)).Cast<FittingMethod>().Where(x => x != FittingMethod.All).ToArray();
+      }
+      var result = GetBest(bin, items, sorting, fitting, token);
+      if (result == null) throw new InvalidOperationException("No result obtained!");
+
+      Results.Add(new Result("Best Solution",
+        "The best found solution",
+        result.Item1));
+      Results.Add(new Result("Best Solution Quality",
+        "The quality of the best found solution according to the evaluator",
+        new DoubleValue(result.Item2)));
+
+      var binUtil = new BinUtilizationEvaluator();
+      var packRatio = new PackingRatioEvaluator();
+      Results.Add(new Result("Best Solution Bin Count",
+        "The number of bins in the best found solution",
+        new IntValue(result.Item1.NrOfBins)));
+      Results.Add(new Result("Best Solution Bin Utilization",
+        "The utilization given in percentage as calculated by the BinUtilizationEvaluator (total used space / total available space)",
+        new PercentValue(Math.Round(binUtil.Evaluate(result.Item1), 3))));
+
+      if (result.Item3.HasValue && sorting.Length > 1)
+        Results.Add(new Result("Best Sorting Method",
+          "The sorting method that found the best solution",
+          new EnumValue<SortingMethod>(result.Item3.Value)));
+      if (result.Item4.HasValue && fitting.Length > 1)
+        Results.Add(new Result("Best Fitting Method",
+          "The fitting method that found the best solution",
+          new EnumValue<FittingMethod>(result.Item4.Value)));
+    }
+
+    private Tuple<Solution, double, SortingMethod?, FittingMethod?> GetBest(PackingShape bin, IList<PackingItem> items, SortingMethod[] sortings, FittingMethod[] fittings, CancellationToken token) {
+      SortingMethod? bestSorting = null;
+      FittingMethod? bestFitting = null;
+      var best = double.NaN;
+      Solution bestSolution = null;
+      foreach (var fit in fittings) {
+        foreach (var sort in sortings) {
+          var result = Optimize(bin, items, sort, fit, DeltaParameter.Value.Value, Problem.UseStackingConstraints, Problem.SolutionEvaluator, token);
+          if (double.IsNaN(result.Item2) || double.IsInfinity(result.Item2)) continue;
+          if (double.IsNaN(best)
+            || Problem.Maximization && result.Item2 > best
+            || !Problem.Maximization && result.Item2 < best) {
+            bestSolution = result.Item1;
+            best = result.Item2;
+            bestSorting = sort;
+            bestFitting = fit;
+          }
+          if (token.IsCancellationRequested) return Tuple.Create(bestSolution, best, bestSorting, bestFitting);
+        }
+      }
+      if (double.IsNaN(best)) return null;
+      return Tuple.Create(bestSolution, best, bestSorting, bestFitting);
+    }
+
+    private static Tuple<Solution, double> Optimize(PackingShape bin, IList<PackingItem> items, SortingMethod sorting, FittingMethod fitting, double delta, bool stackingConstraints, IEvaluator evaluator, CancellationToken token) {
+      Permutation sorted = null;
+      switch (sorting) {
+        case SortingMethod.Given:
+          sorted = new Permutation(PermutationTypes.Absolute, Enumerable.Range(0, items.Count).ToArray());
+          break;
+        case SortingMethod.VolumeHeight:
+          sorted = new Permutation(PermutationTypes.Absolute,
+                    items.Select((v, i) => new { Index = i, Item = v })
+                         .OrderByDescending(x => x.Item.Depth * x.Item.Width * x.Item.Height)
+                         .ThenByDescending(x => x.Item.Height)
+                         .Select(x => x.Index).ToArray());
+          break;
+        case SortingMethod.HeightVolume:
+          sorted = new Permutation(PermutationTypes.Absolute,
+                    items.Select((v, i) => new { Index = i, Item = v })
+                         .OrderByDescending(x => x.Item.Height)
+                         .ThenByDescending(x => x.Item.Depth * x.Item.Width * x.Item.Height)
+                         .Select(x => x.Index).ToArray());
+          break;
+        case SortingMethod.AreaHeight:
+          sorted = new Permutation(PermutationTypes.Absolute,
+                    items.Select((v, i) => new { Index = i, Item = v })
+                         .OrderByDescending(x => x.Item.Depth * x.Item.Width)
+                         .ThenByDescending(x => x.Item.Height)
+                         .Select(x => x.Index).ToArray());
+          break;
+        case SortingMethod.HeightArea:
+          sorted = new Permutation(PermutationTypes.Absolute,
+                    items.Select((v, i) => new { Index = i, Item = v })
+                         .OrderByDescending(x => x.Item.Height)
+                         .ThenByDescending(x => x.Item.Depth * x.Item.Width)
+                         .Select(x => x.Index).ToArray());
+          break;
+        case SortingMethod.ClusteredAreaHeight:
+          double clusterRange = bin.Width * bin.Depth * delta;
+          sorted = new Permutation(PermutationTypes.Absolute,
+                    items.Select((v, i) => new { Index = i, Item = v, ClusterId = (int)(Math.Ceiling(v.Width * v.Depth / clusterRange)) })
+                        .GroupBy(x => x.ClusterId)
+                        .Select(x => new { Cluster = x.Key, Items = x.OrderByDescending(y => y.Item.Height).ToList() })
+                        .OrderByDescending(x => x.Cluster)
+                        .SelectMany(x => x.Items)
+                        .Select(x => x.Index).ToArray());
+          break;
+        case SortingMethod.ClusteredHeightArea:
+          double clusterRange2 = bin.Height * delta;
+          sorted = new Permutation(PermutationTypes.Absolute,
+                    items.Select((v, i) => new { Index = i, Item = v, ClusterId = (int)(Math.Ceiling(v.Height / clusterRange2)) })
+                        .GroupBy(x => x.ClusterId)
+                        .Select(x => new { Cluster = x.Key, Items = x.OrderByDescending(y => y.Item.Depth * y.Item.Width).ToList() })
+                        .OrderByDescending(x => x.Cluster)
+                        .SelectMany(x => x.Items)
+                        .Select(x => x.Index).ToArray());
+          break;
+        default: throw new ArgumentException("Unknown sorting method: " + sorting);
+      }
+      
+      ExtremePointPermutationDecoderBase decoder = null;
+      switch (fitting) {
+        case FittingMethod.FirstFit:
+          decoder = new ExtremePointPermutationDecoder();
+          break;
+        case FittingMethod.FreeVolumeBestFit:
+          decoder = new FreeVolumeBestFitExtremePointPermutationDecoder();
+          break;
+        case FittingMethod.ResidualSpaceBestFit:
+          decoder = new ResidualSpaceBestFitExtremePointPermutationDecoder();
+          break;
+        default: throw new ArgumentException("Unknown fitting method: " + fitting);
+      }
+
+      var sol = decoder.Decode(sorted, bin, items, stackingConstraints);
+      var fit = evaluator.Evaluate(sol);
+
+      return Tuple.Create(sol, fit);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/BinPacking.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/BinPacking.cs	(revision 15229)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/BinPacking.cs	(revision 15230)
@@ -51,5 +51,12 @@
     protected Dictionary<int, List<int>> OccupationLayers { get; set; }
 
+    [Storable]
+    public Dictionary<TPos, Tuple<int,int,int>> ResidualSpace { get; protected set; }
+
     #endregion Properties
+
+    public int FreeVolume {
+      get { return BinShape.Volume - Items.Sum(x => x.Value.Volume); }
+    }
 
     protected BinPacking(TBin binShape)
@@ -60,5 +67,4 @@
       OccupationLayers = new Dictionary<int, List<int>>();
     }
-
 
     [StorableConstructor]
@@ -84,19 +90,27 @@
 
     public abstract TPos FindExtremePointForItem(TItem item, bool rotated, bool stackingConstraints);
-    public abstract TPos FindPositionBySliding(TItem item, bool rotated);
+    public abstract TPos FindPositionBySliding(TItem item, bool rotated, bool stackingConstraints);
 
-    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 SlidingBasedPacking(ref IList<int> sequence, IList<TItem> items, bool stackingConstraints);
+    public abstract void SlidingBasedPacking(ref IList<int> sequence, IList<TItem> items, Dictionary<int, bool> rotationArray, bool stackingConstraints);
     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, TItem item, TPos position) {
+    public virtual void PackItem(int itemID, TItem item, TPos position) {
       Items[itemID] = item;
       Positions[itemID] = position;
       ExtremePoints.Remove(position);
+      if (ResidualSpace != null) ResidualSpace.Remove(position);
       foreach (int id in Items.Select(x => x.Key))
         GenerateNewExtremePointsForNewItem(Items[id], Positions[id]);
-
+      
       AddNewItemToOccupationLayers(itemID, item, position);
+    }
+    public virtual bool PackItemIfFeasible(int itemID, TItem item, TPos position, bool stackingConstraints) {
+      if (IsPositionFeasible(item, position, stackingConstraints)) {
+        PackItem(itemID, item, position);
+        return true;
+      }
+      return false;
     }
 
@@ -127,5 +141,5 @@
       return false;
     }
-    public bool IsPositionFeasible(TItem item, TPos position) {
+    public virtual bool IsPositionFeasible(TItem item, TPos position, bool stackingConstraints) {
       //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 (!BinShape.Encloses(position, item))
@@ -139,7 +153,7 @@
       return true;
     }
+    
     public abstract int ShortestPossibleSideFromPoint(TPos position);
     public abstract bool IsStaticStable(TItem measures, TPos position);
-
 
     protected abstract void InitializeOccupationLayers();
Index: /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj	(revision 15229)
+++ /trunk/sources/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj	(revision 15230)
@@ -19,5 +19,5 @@
     <DebugType>full</DebugType>
     <Optimize>false</Optimize>
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
@@ -27,5 +27,5 @@
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
@@ -34,5 +34,5 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
     <DebugSymbols>true</DebugSymbols>
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <DebugType>full</DebugType>
@@ -41,5 +41,5 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <Optimize>true</Optimize>
@@ -51,5 +51,5 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
     <DebugSymbols>true</DebugSymbols>
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <DebugType>full</DebugType>
@@ -58,5 +58,5 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
-    <OutputPath>..\..\bin\</OutputPath>
+    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <Optimize>true</Optimize>
@@ -72,4 +72,66 @@
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Collections-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.IntegerVectorEncoding-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Parameters-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Persistence-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Problems.Instances-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Random-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -106,7 +168,11 @@
     <Compile Include="3D\Evaluators\BinUtilizationEvaluator.cs" />
     <Compile Include="3D\Evaluators\PackingRatioEvaluator.cs" />
+    <Compile Include="Algorithms\3D\ExtremePointAlgorithm.cs" />
+    <Compile Include="3D\Instances\ThreeDInstanceDescriptor.cs" />
     <Compile Include="3D\Instances\BPPData.cs" />
     <Compile Include="3D\Instances\RandomDataDescriptor.cs" />
+    <Compile Include="3D\Instances\RealWorldContainerPackingInstanceProvider.cs" />
     <Compile Include="3D\Instances\RandomInstanceProvider.cs" />
+    <Compile Include="3D\Instances\ThreeDInstanceParser.cs" />
     <Compile Include="3D\IntegerVectorEncoding\BottomLeftIntegerVectorDecoder.cs" />
     <Compile Include="3D\IntegerVectorEncoding\ExtremePointIntegerVectorDecoder.cs" />
@@ -121,4 +187,7 @@
     <Compile Include="3D\PackingShape.cs" />
     <Compile Include="3D\PermutationEncoding\BottomLeftPermutationDecoder.cs" />
+    <Compile Include="3D\PermutationEncoding\ResidualSpaceBestFitExtremePointPermutationDecoder.cs" />
+    <Compile Include="3D\PermutationEncoding\FreeVolumeBestFitExtremePointPermutationDecoder.cs" />
+    <Compile Include="3D\PermutationEncoding\ExtremePointPermutationDecoderBase.cs" />
     <Compile Include="3D\PermutationEncoding\ExtremePointPermutationDecoder.cs" />
     <Compile Include="3D\PermutationEncoding\PermutationProblem.cs" />
@@ -144,4 +213,5 @@
   </ItemGroup>
   <ItemGroup>
+    <EmbeddedResource Include="3D\Instances\ContainerPackingInstances.zip" />
     <None Include="HeuristicLab.snk" />
     <None Include="Properties\AssemblyInfo.cs.frame" />
@@ -149,81 +219,4 @@
   </ItemGroup>
   <ItemGroup />
-  <ItemGroup>
-    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
-      <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
-      <Name>HeuristicLab.Analysis-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
-      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
-      <Name>HeuristicLab.Collections-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
-      <Project>{a9ad58b9-3ef9-4cc1-97e5-8d909039ff5c}</Project>
-      <Name>HeuristicLab.Common-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
-      <Project>{c36bd924-a541-4a00-afa8-41701378ddc5}</Project>
-      <Name>HeuristicLab.Core-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
-      <Project>{bbab9df5-5ef3-4ba8-ade9-b36e82114937}</Project>
-      <Name>HeuristicLab.Data-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Encodings.IntegerVectorEncoding\3.3\HeuristicLab.Encodings.IntegerVectorEncoding-3.3.csproj">
-      <Project>{ddfb14dd-2a85-493c-a52d-e69729bbaeb0}</Project>
-      <Name>HeuristicLab.Encodings.IntegerVectorEncoding-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Encodings.PermutationEncoding\3.3\HeuristicLab.Encodings.PermutationEncoding-3.3.csproj">
-      <Project>{dbecb8b0-b166-4133-baf1-ed67c3fd7fca}</Project>
-      <Name>HeuristicLab.Encodings.PermutationEncoding-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
-      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
-      <Name>HeuristicLab.Operators-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
-      <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
-      <Name>HeuristicLab.Optimization.Operators-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
-      <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project>
-      <Name>HeuristicLab.Optimization-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
-      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
-      <Name>HeuristicLab.Parameters-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
-      <Project>{102bc7d3-0ef9-439c-8f6d-96ff0fdb8e1b}</Project>
-      <Name>HeuristicLab.Persistence-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
-      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
-      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
-      <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>
-      <Name>HeuristicLab.Problems.Instances-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
-      <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
-      <Name>HeuristicLab.Random-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
