Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container2DView.xaml.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container2DView.xaml.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container2DView.xaml.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs	(revision 15617)
@@ -1,4 +1,5 @@
-﻿/* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -15,6 +16,7 @@
  *
  * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see<http://www.gnu.org/licenses/> .
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
  */
+#endregion
 
 using System;
@@ -139,7 +141,7 @@
         var selectedModel = new GeometryModel3D { Geometry = new MeshGeometry3D(), Material = material };
         AddSolidCube((MeshGeometry3D)selectedModel.Geometry, selectedPos.X, selectedPos.Y, selectedPos.Z,
-          selectedPos.Rotated ? selectedItem.Value.Depth : selectedItem.Value.Width,
-          selectedItem.Value.Height,
-          selectedPos.Rotated ? selectedItem.Value.Width : selectedItem.Value.Depth);
+          selectedItem.Value.DepthInView,
+          selectedItem.Value.HeightInView,
+          selectedItem.Value.DepthInView);
         modelGroup.Children.Add(selectedModel);
 
@@ -147,7 +149,7 @@
           var position = packing.Positions[item.Key];
 
-          var w = position.Rotated ? item.Value.Depth : item.Value.Width;
-          var h = item.Value.Height;
-          var d = position.Rotated ? item.Value.Width : item.Value.Depth;
+          var w = item.Value.WidthInView;
+          var h = item.Value.HeightInView;
+          var d = item.Value.DepthInView;
 
           var model = new GeometryModel3D { Geometry = new MeshGeometry3D(), Material = hiddenMaterial };
@@ -161,7 +163,7 @@
           var position = packing.Positions[item.Key];
 
-          var w = position.Rotated ? item.Value.Depth : item.Value.Width;
-          var h = item.Value.Height;
-          var d = position.Rotated ? item.Value.Width : item.Value.Depth;
+          var w = item.Value.WidthInView;
+          var h = item.Value.HeightInView;
+          var d = item.Value.DepthInView;
 
           var model = new GeometryModel3D { Geometry = new MeshGeometry3D() };
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan2DView.Designer.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan2DView.Designer.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan2DView.Designer.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.Designer.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.Designer.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.Designer.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Algorithms/ExtremePointAlgorithm.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Algorithms/ExtremePointAlgorithm.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Algorithms/ExtremePointAlgorithm.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -40,7 +40,9 @@
 
   public enum SortingMethod { All, Given, VolumeHeight, HeightVolume, AreaHeight, HeightArea, ClusteredAreaHeight, ClusteredHeightArea }
-  public enum FittingMethod { All, FirstFit, ResidualSpaceBestFit, FreeVolumeBestFit }
+  public enum FittingMethod { All, FirstFit, ResidualSpaceBestFit, FreeVolumeBestFit, MinimumResidualSpaceLeft }
 
   public enum ExtremePointCreationMethod { All, PointProjection, LineProjection }
+
+  public enum ExtremePointPruningMethod { None, All, PruneBehind }
 
   [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.")]
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/BinPacking3D.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/BinPacking3D.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/BinPacking3D.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/BinPacking3DException.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/BinPacking3DException.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/BinPacking3DException.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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;
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/ExtremePointPermutationDecoder.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/ExtremePointPermutationDecoder.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/ExtremePointPermutationDecoder.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -98,8 +98,9 @@
     /// <param name="useStackingConstraints"></param>
     /// <returns></returns>
-    public Solution Decode(Permutation permutation, PackingShape binShape, IList<PackingItem> items,bool useStackingConstraints) {
+    public Solution Decode(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
       var binPacker = BinPackerFactory.CreateBinPacker(FittingMethod);
+      var pruningMethod = ExtremePointPruningMethod.None;
       Solution solution = new Solution(binShape, useExtremePoints: true, stackingConstraints: useStackingConstraints);
-      foreach (var packedBin in binPacker.PackItems(permutation, binShape, items, ExtremePointCreationMethod, useStackingConstraints)) {
+      foreach (var packedBin in binPacker.PackItems(permutation, binShape, items, ExtremePointCreationMethod, pruningMethod, useStackingConstraints)) {
         solution.Bins.Add(packedBin);
       }
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/IDecoder.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/IDecoder.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/IDecoder.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/PermutationProblem.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/PermutationProblem.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/PermutationProblem.cs	(revision 15617)
@@ -1,6 +1,5 @@
 ﻿#region License Information
-
 /* HeuristicLab
- * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -19,5 +18,4 @@
  * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
  */
-
 #endregion
 
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/BinUtilizationEvaluator.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/BinUtilizationEvaluator.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/BinUtilizationEvaluator.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/IEvaluator.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/IEvaluator.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/IEvaluator.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/MoveEvaluatorBase.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/MoveEvaluatorBase.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/MoveEvaluatorBase.cs	(revision 15617)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/PackingRatioEvaluator.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/PackingRatioEvaluator.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/PackingRatioEvaluator.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/Swap2MoveEvaluator.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/Swap2MoveEvaluator.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/Swap2MoveEvaluator.cs	(revision 15617)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/TranslocationMoveEvaluator.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/TranslocationMoveEvaluator.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/TranslocationMoveEvaluator.cs	(revision 15617)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/ExtremePointCreator.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/ExtremePointCreator.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/ExtremePointCreator.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using HeuristicLab.Common;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Common;
 using HeuristicLab.Problems.BinPacking3D.Geometry;
 using HeuristicLab.Problems.BinPacking3D.ResidualSpaceCalculation;
@@ -43,6 +64,6 @@
     /// <param name="position"></param>
     protected virtual void GenerateNewExtremePointsForItem(BinPacking3D binPacking, PackingItem newItem, PackingPosition position) {
-      int newWidth = position.Rotated ? newItem.Depth : newItem.Width;
-      int newDepth = position.Rotated ? newItem.Width : newItem.Depth;
+      int newWidth = newItem.Width;
+      int newDepth = newItem.Depth;
       var binShape = binPacking.BinShape;
 
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/ExtremePointCreatorFactory.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/ExtremePointCreatorFactory.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/ExtremePointCreatorFactory.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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;
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/IExtremePointCreator.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/IExtremePointCreator.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/IExtremePointCreator.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using HeuristicLab.Problems.BinPacking3D;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.BinPacking3D;
 using System;
 using System.Collections.Generic;
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/LineProjectionBasedEPCreator.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/LineProjectionBasedEPCreator.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/LineProjectionBasedEPCreator.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using HeuristicLab.Common;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Common;
 using HeuristicLab.Problems.BinPacking3D.Geometry;
 using HeuristicLab.Problems.BinPacking3D.ResidualSpaceCalculation;
@@ -7,4 +28,5 @@
 using System.Text;
 using System.Threading.Tasks;
+using System.Collections.Concurrent;
 
 namespace HeuristicLab.Problems.BinPacking3D.ExtremePointCreation {
@@ -15,13 +37,19 @@
   public class LineProjectionBasedEPCreator : ExtremePointCreator {
 
+    /// <summary>
+    /// This lock object is needed because of creating the extreme points in an parallel for loop.
+    /// </summary>
+    object _lockAddExtremePoint = new object();
+
     protected override void UpdateExtremePoints(BinPacking3D binPacking, PackingItem item, PackingPosition position) {
       binPacking.ExtremePoints.Clear();
 
-      foreach (var i in binPacking.Items) {
+      // generate all new extreme points parallel. This speeds up the creator.
+      Parallel.ForEach(binPacking.Items, i => {
         PackingItem it = i.Value;
         PackingPosition p = binPacking.Positions[i.Key];
         GenerateNewExtremePointsForItem(binPacking, it, p);
-      }
-     
+      });
+
       // remove not needed extreme points.
       foreach (var extremePoint in binPacking.ExtremePoints.ToList()) {
@@ -37,6 +65,7 @@
         }
       }
-    }
-    
+      
+    }
+
     /// <summary>
     /// Returns true if a given residual space can be removed.
@@ -60,10 +89,10 @@
           if (itemBelowEp || !itemBelowEp && !itemBelowPos) {
             return true;
-          }          
+          }
         }
       }
       return false;
     }
-    
+
     /// <summary>
     /// Returns true if the given position lies on an item or an the ground.
@@ -80,6 +109,6 @@
         var itemPosition = binPacking.Positions[x.Key];
         var item = x.Value;
-        int width = itemPosition.Rotated ? item.Depth : item.Width;
-        int depth = itemPosition.Rotated ? item.Width : item.Depth;
+        int width = item.Width;
+        int depth = item.Depth;
 
         return itemPosition.Y + item.Height == position.Y &&
@@ -110,16 +139,19 @@
       }
 
-      if (binPacking.ExtremePoints.ContainsKey(position)) {
-        return false;
-      }
-
-      var rs = CalculateResidualSpace(binPacking, new Vector3D(position));
-
-      if (rs.Count() <= 0) {
-        return false;
-      }
-
-      binPacking.ExtremePoints.Add(position, rs);
-      return true;
+      // this is necessary if the extreme points are being created in a parallel loop.
+      lock (_lockAddExtremePoint) {
+        if (binPacking.ExtremePoints.ContainsKey(position)) {
+          return false;
+        }
+
+        var rs = CalculateResidualSpace(binPacking, new Vector3D(position));
+
+        if (rs.Count() <= 0) {
+          return false;
+        }
+
+        binPacking.ExtremePoints.Add(position, rs);
+        return true;
+      }
     }
 
@@ -148,6 +180,6 @@
     /// <param name="position"></param>
     private void PointProjectionForNewItem(BinPacking3D binPacking, PackingItem newItem, PackingPosition position) {
-      int newWidth = position.Rotated ? newItem.Depth : newItem.Width;
-      int newDepth = position.Rotated ? newItem.Width : newItem.Depth;
+      int newWidth = newItem.Width;
+      int newDepth = newItem.Depth;
       var binShape = binPacking.BinShape;
       var sourcePoint = new PackingPosition(position.AssignedBin, position.X + newWidth, position.Y, position.Z);
@@ -196,6 +228,6 @@
     /// <param name="position"></param>
     private void EdgeProjectionForNewItem(BinPacking3D binPacking, PackingItem newItem, PackingPosition position) {
-      int newWidth = position.Rotated ? newItem.Depth : newItem.Width;
-      int newDepth = position.Rotated ? newItem.Width : newItem.Depth;
+      int newWidth = newItem.Width;
+      int newDepth = newItem.Depth;
       var binShape = binPacking.BinShape;
 
@@ -235,6 +267,6 @@
       foreach (var item in binPacking.Items) {
         PackingPosition position = binPacking.Positions[item.Key];
-        var depth = position.Rotated ? item.Value.Width : item.Value.Depth;
-        var width = position.Rotated ? item.Value.Depth : item.Value.Width;
+        var depth = item.Value.Depth;
+        var width = item.Value.Width;
         if (position.X <= point.X && point.X < position.X + width &&
             position.Y <= point.Y && point.Y < position.Y + item.Value.Height &&
@@ -444,6 +476,6 @@
     /// <returns></returns>
     private Vector3D[] GetVertices(PackingItem item, PackingPosition position) {
-      int width = position.Rotated ? item.Depth : item.Width;
-      int depth = position.Rotated ? item.Width : item.Depth;
+      int width = item.Width;
+      int depth = item.Depth;
       return new Vector3D[] {
         new Vector3D(position.X + 0,     position.Y + 0,           position.Z + 0), // (0,0,0)
@@ -574,4 +606,5 @@
         }
       }
+
       return eps as IEnumerable<Vector3D>;
     }
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/PointProjectionBasedEPCreator.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/PointProjectionBasedEPCreator.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/PointProjectionBasedEPCreator.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using HeuristicLab.Common;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Common;
 using HeuristicLab.Problems.BinPacking3D.Geometry;
 using System;
@@ -36,6 +57,6 @@
         for (int i = 0; i < residualSpaces.Count(); i++) {
           var rs = residualSpaces[i];
-          var depth = position.Rotated ? item.Width : item.Depth;
-          var width = position.Rotated ? item.Depth : item.Width;
+          var depth = item.Depth;
+          var width = item.Width;
           var changed = false;
           if (ep.Z >= position.Z && ep.Z < position.Z + depth) {
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Edge3D.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Edge3D.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Edge3D.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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;
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Line3D.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Line3D.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Line3D.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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;
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Plane3D.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Plane3D.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Plane3D.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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;
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Vector3D.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Vector3D.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Vector3D.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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;
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/IOperator.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/IOperator.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/IOperator.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/BPPData.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/BPPData.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/BPPData.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -19,6 +19,4 @@
  */
 #endregion
-
-
 
 namespace HeuristicLab.Problems.BinPacking3D.Instances {
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RandomDataDescriptor.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RandomDataDescriptor.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RandomDataDescriptor.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -19,5 +19,4 @@
  */
 #endregion
-
 
 using HeuristicLab.Problems.Instances;
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RandomInstanceProvider.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RandomInstanceProvider.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RandomInstanceProvider.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -19,5 +19,4 @@
  */
 #endregion
-
 
 using System;
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RealWorldContainerPackingInstanceProvider.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RealWorldContainerPackingInstanceProvider.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RealWorldContainerPackingInstanceProvider.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceDescriptor.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceDescriptor.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceDescriptor.cs	(revision 15617)
@@ -1,6 +1,5 @@
 ﻿#region License Information
-
 /* HeuristicLab
- * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -19,5 +18,4 @@
  * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
  */
-
 #endregion
 
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceParser.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceParser.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceParser.cs	(revision 15617)
@@ -1,6 +1,5 @@
 ﻿#region License Information
-
 /* HeuristicLab
- * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -19,5 +18,4 @@
  * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
  */
-
 #endregion
 
@@ -58,5 +56,8 @@
             var tilt = GetNextInteger(reader);
             for (var i = 0; i < pieces; i++) {
-              PackingItem item = new PackingItem(width, height, length, Bin, weight, material);
+              PackingItem item = new PackingItem(width, height, length, Bin, weight, material) {
+                RotateEnabled = rotate == 0 ? false : true,
+                TiltEnabled = tilt == 0 ? false : true
+              };
               Items.Add(item);
             }
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPacker.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPacker.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPacker.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -49,4 +49,5 @@
     public BinPacker() { }
 
+   
     /// <summary>
     /// Packs all items of the bin packer and returns a collection of BinPacking3D objects
@@ -57,5 +58,5 @@
     /// <param name="useStackingConstraints">Flag for using stacking constraints</param>
     /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
-    public abstract IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, bool useStackingConstraints);
+    public abstract IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, ExtremePointPruningMethod epPruningMethod, bool useStackingConstraints);
     
     /// <summary>
@@ -66,10 +67,5 @@
     /// <param name="packingItem"></param>
     /// <param name="position"></param>
-    protected virtual void PackItem(BinPacking3D packingBin, int itemId, PackingItem packingItem, PackingPosition position, IExtremePointCreator extremePointCreator, bool useStackingConstraints) {
-      if (!CheckItemDimensions(packingBin, packingItem, position)) {
-        throw new BinPacking3DException($"The dimensions of the given item exceeds the bin dimensions. " +
-          $"Bin: ({packingBin.BinShape.Width} {packingBin.BinShape.Depth} {packingBin.BinShape.Height})" +
-          $"Item: ({packingItem.Width} {packingItem.Depth} {packingItem.Height})");
-      }
+    protected virtual void PackItem(BinPacking3D packingBin, int itemId, PackingItem packingItem, PackingPosition position, IExtremePointCreator extremePointCreator, bool useStackingConstraints) {      
       packingBin.PackItem(itemId, packingItem, position);
       extremePointCreator.UpdateBinPacking(packingBin, packingItem, position);
@@ -82,11 +78,16 @@
     /// <param name="packingItem"></param>
     /// <param name="useStackingConstraints"></param>
-    /// <param name="rotated"></param>
     /// <returns>Returns the packing position for an given item. If there could not be found a valid position it returns null</returns>
-    protected PackingPosition FindPackingPositionForItem(BinPacking3D packingBin, PackingItem packingItem, bool useStackingConstraints, bool rotated) {
+    protected virtual PackingPosition FindPackingPositionForItem(BinPacking3D packingBin, PackingItem packingItem, bool useStackingConstraints) {
+      if (!CheckItemDimensions(packingBin, packingItem)) {
+        throw new BinPacking3DException($"The dimensions of the given item exceeds the bin dimensions. " +
+          $"Bin: ({packingBin.BinShape.Width} {packingBin.BinShape.Depth} {packingBin.BinShape.Height})" +
+          $"Item: ({packingItem.Width} {packingItem.Depth} {packingItem.Height})");
+      }
+
       PackingItem newItem = new PackingItem(
-        rotated ? packingItem.Depth : packingItem.Width,
+        packingItem.Width,
         packingItem.Height,
-        rotated ? packingItem.Width : packingItem.Depth,
+        packingItem.Depth,
         packingItem.TargetBin, packingItem.Weight, packingItem.Material);
 
@@ -102,9 +103,23 @@
     /// <param name="item"></param>
     /// <returns>Returns true if the dimensions of an given item are less or equal to the bin.</returns>
-    private bool CheckItemDimensions(BinPacking3D packingBin, PackingItem item, PackingPosition itemPosition) {
-      var width = itemPosition.Rotated ? item.Depth : item.Width;
-      var depth = itemPosition.Rotated ? item.Width : item.Depth;
+    protected virtual bool CheckItemDimensions(BinPacking3D packingBin, PackingItem item) {
+      var width = item.Width;
+      var depth = item.Depth;
       return packingBin.BinShape.Width >= width && packingBin.BinShape.Height >= item.Height && packingBin.BinShape.Depth >= depth;
     }
+
+    /// <summary>
+    /// Clones a given list of packing items.
+    /// </summary>
+    /// <param name="items"></param>
+    /// <returns></returns>
+    protected static IList<PackingItem> CloneItems(IList<PackingItem> items) {
+      var clonedItems = new List<PackingItem>();
+      foreach (var item in items) {
+        clonedItems.Add(item.Clone() as PackingItem);
+      }
+      return clonedItems;
+    }
+
   }
 }
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFactory.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFactory.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFactory.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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;
@@ -29,4 +50,7 @@
           binPacker = new BinPackerResidualSpaceBestFit();
           break;
+        case FittingMethod.MinimumResidualSpaceLeft:
+          binPacker = new BinPackerMinRSLeft();
+          break;
         default:
           throw new ArgumentException("Unknown fitting method: " + fittingMethod);
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFirstFit.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFirstFit.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFirstFit.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -25,4 +25,5 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Problems.BinPacking3D.ExtremePointCreation;
+using HeuristicLab.Problems.BinPacking3D.ExtremePointPruning;
 using System;
 using System.Collections.Generic;
@@ -52,5 +53,5 @@
     /// </summary>
     /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
-    public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epGenerationMethod, bool useStackingConstraints) {
+    public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, ExtremePointPruningMethod epPruningMethod, bool useStackingConstraints) {
       IList<BinPacking3D> packingList = new List<BinPacking3D>();
       IList<int> remainingIds = new List<int>(sortedItems);
@@ -58,8 +59,9 @@
       while (remainingIds.Count > 0) {
         BinPacking3D packingBin = new BinPacking3D(binShape);
-        PackRemainingItems(ref remainingIds, ref packingBin, items, epGenerationMethod, useStackingConstraints, null);
+        PackRemainingItems(ref remainingIds, ref packingBin, items, epCreationMethod, useStackingConstraints);
         packingList.Add(packingBin);
       }
 
+      ExtremePointPruningFactory.CreatePruning().PruneExtremePoints(epPruningMethod, packingList);
       return packingList;
     }
@@ -69,11 +71,12 @@
     /// </summary>
     /// <param name="remainingIds">List of remaining ids. After the method has been executed the list has to have less items</param>
+    /// <param name="packingBin">This object will be filled with some of the given items</param>
     /// <param name="items">List of packing items. Some of the items will be assigned to the BinPacking3D object</param>
-    /// <param name="packingBin">This object will be filled with some of the given items</param>
-    protected void PackRemainingItems(ref IList<int> remainingIds, ref BinPacking3D packingBin, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, bool useStackingConstraints, Dictionary<int, bool> rotationArray) {
+    /// <param name="epCreationMethod"></param>
+    /// <param name="useStackingConstraints"></param>
+    protected void PackRemainingItems(ref IList<int> remainingIds, ref BinPacking3D packingBin, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, bool useStackingConstraints) {
       IExtremePointCreator extremePointCreator = ExtremePointCreatorFactory.CreateExtremePointCreator(epCreationMethod, useStackingConstraints);
       foreach (var itemId in new List<int>(remainingIds)) {
-        bool rotated = rotationArray == null ? false : rotationArray[itemId];
-        PackingPosition position = FindPackingPositionForItem(packingBin, items[itemId], useStackingConstraints, rotated);
+        PackingPosition position = FindPackingPositionForItem(packingBin, items[itemId], useStackingConstraints);
         // if a valid packing position could be found, the current item can be added to the given bin
         if (position != null) {
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFreeVolumeBestFit.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFreeVolumeBestFit.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFreeVolumeBestFit.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -25,4 +25,5 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Problems.BinPacking3D.ExtremePointCreation;
+using HeuristicLab.Problems.BinPacking3D.ExtremePointPruning;
 using System;
 using System.Collections.Generic;
@@ -61,5 +62,5 @@
     /// <param name="useStackingConstraints"></param>
     /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
-    public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epGenerationMethod, bool useStackingConstraints) {
+    public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epGenerationMethod, ExtremePointPruningMethod epPruningMethod, bool useStackingConstraints) {
       IList<BinPacking3D> packingList = new List<BinPacking3D>();
       IList<int> remainingIds = new List<int>(sortedItems);
@@ -73,5 +74,5 @@
 
         foreach (var packingBin in sortedBins) {
-          PackingPosition position = FindPackingPositionForItem(packingBin, item, useStackingConstraints, false);
+          PackingPosition position = FindPackingPositionForItem(packingBin, item, useStackingConstraints);
           positionFound = position != null;
           var bin = packingBin;
@@ -84,5 +85,5 @@
         if (!positionFound) {
           BinPacking3D packingBin = new BinPacking3D(binShape);
-          PackingPosition position = FindPackingPositionForItem(packingBin, item, useStackingConstraints, false);
+          PackingPosition position = FindPackingPositionForItem(packingBin, item, useStackingConstraints);
 
           if (position == null) {
@@ -94,4 +95,5 @@
         }
       }
+      ExtremePointPruningFactory.CreatePruning().PruneExtremePoints(epPruningMethod, packingList);
       return packingList.ToList();
     }
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerResidualSpaceBestFit.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerResidualSpaceBestFit.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerResidualSpaceBestFit.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -25,4 +25,5 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Problems.BinPacking3D.ExtremePointCreation;
+using HeuristicLab.Problems.BinPacking3D.ExtremePointPruning;
 using System;
 using System.Collections.Generic;
@@ -55,9 +56,8 @@
     /// </summary>
     /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
-    public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, bool useStackingConstraints) {
+    public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, ExtremePointPruningMethod epPruningMethod, bool useStackingConstraints) {
       IList<BinPacking3D> packingList = new List<BinPacking3D>();
       IList<int> remainingIds = new List<int>(sortedItems);
       IExtremePointCreator extremePointCreator = ExtremePointCreatorFactory.CreateExtremePointCreator(epCreationMethod, useStackingConstraints);
-      bool rotated = false;
 
       foreach (var remainingId in remainingIds) {
@@ -78,5 +78,5 @@
         if (!packed) {
           BinPacking3D binPacking = new BinPacking3D(binShape);
-          var position = FindPackingPositionForItem(binPacking, item, useStackingConstraints, rotated);
+          var position = FindPackingPositionForItem(binPacking, item, useStackingConstraints);
           if (position != null) {
             PackItem(binPacking, remainingId, item, position, extremePointCreator, useStackingConstraints);
@@ -87,4 +87,6 @@
         }
       }
+
+      ExtremePointPruningFactory.CreatePruning().PruneExtremePoints(epPruningMethod, packingList);
       return packingList;
     }
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/IBinPacker.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/IBinPacker.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/IBinPacker.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using HeuristicLab.Encodings.PermutationEncoding;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Encodings.PermutationEncoding;
 using System;
 using System.Collections.Generic;
@@ -16,5 +37,5 @@
     /// <param name="useStackingConstraints">Flag for using stacking constraints</param>
     /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
-    IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, bool useStackingConstraints);
+    IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, ExtremePointPruningMethod epPruningMethod, bool useStackingConstraints);
 
   }
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingItem.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingItem.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingItem.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -31,4 +31,7 @@
   [StorableClass]
   public class PackingItem : PackingShape, IPackingItem {
+    #region Properties
+
+
     public IValueParameter<PackingShape> TargetBinParameter {
       get { return (IValueParameter<PackingShape>)Parameters["TargetBin"]; }
@@ -40,5 +43,5 @@
       get { return (IFixedValueParameter<IntValue>)Parameters["Material"]; }
     }
-
+    
     public PackingShape TargetBin {
       get { return TargetBinParameter.Value; }
@@ -56,7 +59,206 @@
     }
 
+
+    public IValueParameter<BoolValue> RotateEnabledParameter {
+      get { return (IValueParameter<BoolValue>)Parameters["RotateEnabled"]; }
+    }
+
+    public IValueParameter<BoolValue> RotatedParameter {
+      get { return (IValueParameter<BoolValue>)Parameters["Rotated"]; }
+    }
+
+    public IValueParameter<BoolValue> TiltEnabledParameter {
+      get { return (IValueParameter<BoolValue>)Parameters["TiltEnabled"]; }
+    }
+
+    public IValueParameter<BoolValue> TiltedParameter {
+      get { return (IValueParameter<BoolValue>)Parameters["Tilted"]; }
+    }
+    
+    /// <summary>
+    /// Enables that the current item can be rotated.
+    /// </summary>
+    public bool RotateEnabled {
+      get { return RotateEnabledParameter.Value.Value; }
+      set { RotateEnabledParameter.Value.Value = value; }
+    }
+
+    /// <summary>
+    /// Indicates that the current item is rotated.
+    /// If the item is also tilted it will be tilted first.
+    /// </summary>
+    public bool Rotated {
+      get { return RotatedParameter.Value.Value; }
+      set { RotatedParameter.Value.Value = value; }
+    }
+
+    /// <summary>
+    /// Enables that the current item can be tilted.
+    /// </summary>
+    public bool TiltEnabled {
+      get { return TiltEnabledParameter.Value.Value; }
+      set { TiltEnabledParameter.Value.Value = value; }
+    }
+
+    /// <summary>
+    /// Indicates that the current item is tilted.
+    /// Tilted means that the item is tilted sidewards.
+    /// If the item is also rotated it will be tilted first.
+    /// </summary>
+    public bool Tilted {
+      get { return TiltedParameter.Value.Value; }
+      set { TiltedParameter.Value.Value = value; }
+    }
+    
+    public IFixedValueParameter<IntValue> LoadSecuringHeightParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters["LoadSecuringHeight"]; }
+    }
+    
+    public IFixedValueParameter<IntValue> LoadSecuringWidthParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters["LoadSecuringWidth"]; }
+    }
+
+    public IFixedValueParameter<IntValue> LoadSecuringDepthParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters["LoadSecuringDepth"]; }
+    }
+
+    public int LoadSecuringHeight {
+      get { return LoadSecuringHeightParameter.Value.Value; }
+      set { LoadSecuringHeightParameter.Value.Value = value; }
+    }
+
+    public int LoadSecuringWidth {
+      get { return LoadSecuringWidthParameter.Value.Value; }
+      set { LoadSecuringWidthParameter.Value.Value = value; }
+    }
+
+    public int LoadSecuringDepth {
+      get { return LoadSecuringDepthParameter.Value.Value; }
+      set { LoadSecuringDepthParameter.Value.Value = value; }
+    }
+
+    /// <summary>
+    /// This property represents the height as needed in the bin packing.
+    /// </summary>
+    public new int Height {
+      get {
+        if (!Tilted) {
+          return HeightParameter.Value.Value + LoadSecuringHeightParameter.Value.Value;
+        } else {
+          return WidthParameter.Value.Value + LoadSecuringHeightParameter.Value.Value;
+        }
+      }
+    }
+
+    /// <summary>
+    /// This property represents the width as needed in the bin packing.
+    /// </summary>
+    public new int Width {
+      get {
+        if (Rotated) {
+          return DepthParameter.Value.Value + LoadSecuringWidthParameter.Value.Value;
+        } else {
+          if (!Tilted) {
+            return WidthParameter.Value.Value + LoadSecuringWidthParameter.Value.Value;
+          } else {
+            return HeightParameter.Value.Value + LoadSecuringWidthParameter.Value.Value;
+          }
+        }
+      }
+    }
+
+    /// <summary>
+    /// This property represents the depth as needed in the bin packing.
+    /// </summary>
+    public new int Depth {
+      get {
+        if (!Rotated) {
+          return DepthParameter.Value.Value + LoadSecuringDepthParameter.Value.Value;
+        } else {
+          if (!Tilted) {
+            return WidthParameter.Value.Value + LoadSecuringDepthParameter.Value.Value;
+          } else {
+            return HeightParameter.Value.Value + LoadSecuringDepthParameter.Value.Value;
+          }
+        }
+      }
+    }
+
+    /// <summary>
+    /// This property represents the height as it is seen in the view of the bin packing.
+    /// </summary>
+    public int HeightInView {
+      get {
+        if (!Tilted) {
+          return HeightParameter.Value.Value;
+        } else {
+          return WidthParameter.Value.Value;
+        }
+      } 
+    }
+
+    /// <summary>
+    /// This property represents the width as it is seen in the view of the bin packing.
+    /// </summary>
+    public int WidthInView {
+      get {
+        if (Rotated) {
+          return DepthParameter.Value.Value;
+        } else {
+          if (!Tilted) {
+            return WidthParameter.Value.Value;
+          } else {
+            return HeightParameter.Value.Value;
+          }
+        }
+      }
+    }
+
+    /// <summary>
+    /// This property represents the depth as it is seen in the view of the bin packing.
+    /// </summary>
+    public int DepthInView {
+      get {
+        if (!Rotated) {
+          return DepthParameter.Value.Value;
+        } else {
+          if (!Tilted) {
+            return WidthParameter.Value.Value;
+          } else {
+            return HeightParameter.Value.Value;
+          }
+        }
+      }
+    }
+
+    /// <summary>
+    /// This property represents the original height.
+    /// </summary>
+    public int OriginalHeight {
+      get { return HeightParameter.Value.Value; }
+      set { HeightParameter.Value.Value = value; }
+    }
+
+    /// <summary>
+    /// This property represents the original width.
+    /// </summary>
+    public int OriginalWidth {
+      get { return WidthParameter.Value.Value; }
+      set { WidthParameter.Value.Value = value; }
+    }
+
+    /// <summary>
+    /// This property represents the original depth.
+    /// </summary>
+    public int OriginalDepth {
+      get { return DepthParameter.Value.Value; }
+      set { DepthParameter.Value.Value = value; }
+    }
+    
     public bool SupportsStacking(IPackingItem other) {
       return ((other.Material < this.Material) || (other.Material.Equals(this.Material) && other.Weight <= this.Weight));
     }
+    #endregion
+
 
     [StorableConstructor]
@@ -71,24 +273,46 @@
       Parameters.Add(new FixedValueParameter<DoubleValue>("Weight"));
       Parameters.Add(new FixedValueParameter<IntValue>("Material"));
+      Parameters.Add(new FixedValueParameter<BoolValue>("RotateEnabled"));
+      Parameters.Add(new FixedValueParameter<BoolValue>("Rotated"));
+      Parameters.Add(new FixedValueParameter<BoolValue>("TiltEnabled"));
+      Parameters.Add(new FixedValueParameter<BoolValue>("Tilted"));
+      
+      Parameters.Add(new FixedValueParameter<IntValue>("LoadSecuringHeight"));
+      Parameters.Add(new FixedValueParameter<IntValue>("LoadSecuringWidth"));
+      Parameters.Add(new FixedValueParameter<IntValue>("LoadSecuringDepth"));
 
       RegisterEvents();
     }
 
+    public PackingItem(int width, int height, int depth, PackingShape targetBin)
+      : this() {
+      this.OriginalWidth = width;
+      this.OriginalHeight = height;
+      this.OriginalDepth = depth;
+      this.TargetBin = (PackingShape)targetBin.Clone();
+    }
+
     public PackingItem(int width, int height, int depth, PackingShape targetBin, double weight, int material)
-      : this() {
-      this.Width = width;
-      this.Height = height;
-      this.Depth = depth;
+      : this(width, height, depth, targetBin) {    
       this.Weight = weight;
       this.Material = material;
-      this.TargetBin = (PackingShape)targetBin.Clone();
-    }
-
-    public PackingItem(int width, int height, int depth, PackingShape targetBin)
+    }
+
+    
+
+    public PackingItem(PackingItem packingItem) 
       : this() {
-      this.Width = width;
-      this.Height = height;
-      this.Depth = depth;
-      this.TargetBin = (PackingShape)targetBin.Clone();
+      OriginalWidth = packingItem.OriginalWidth;
+      OriginalHeight = packingItem.OriginalHeight;
+      OriginalDepth =  packingItem.OriginalDepth;
+      TargetBin = (PackingShape)packingItem.TargetBin.Clone();
+      Weight = packingItem.Weight;
+      Material = packingItem.Material;
+      Rotated = packingItem.Rotated;
+      Tilted = packingItem.Tilted;
+
+      LoadSecuringDepth = packingItem.LoadSecuringDepth;
+      LoadSecuringHeight = packingItem.LoadSecuringHeight;
+      LoadSecuringWidth = packingItem.LoadSecuringWidth;
     }
 
@@ -110,8 +334,8 @@
     }
 
-
     public override string ToString() {
       return string.Format("CuboidPackingItem ({0}, {1}, {2}; weight={3}, mat={4})", this.Width, this.Height, this.Depth, this.Weight, this.Material);
     }
+    
   }
 }
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingPosition.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingPosition.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingPosition.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingShape.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingShape.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingShape.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ProblemBase.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ProblemBase.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ProblemBase.cs	(revision 15617)
@@ -1,6 +1,5 @@
 ﻿#region License Information
-
 /* HeuristicLab
- * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -19,5 +18,4 @@
  * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
  */
-
 #endregion
 
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpace.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpace.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpace.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using HeuristicLab.Core;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Core;
 using System;
 using System.Collections.Generic;
@@ -102,7 +123,7 @@
     public PackingItem ToPackingItem() {
       return new PackingItem() {
-        Width = this.Width,
-        Height = this.Height,
-        Depth = this.Depth
+        OriginalWidth = this.Width,
+        OriginalHeight = this.Height,
+        OriginalDepth = this.Depth
       };
     }
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpaceCalculation/IResidualSpaceCalculator.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpaceCalculation/IResidualSpaceCalculator.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpaceCalculation/IResidualSpaceCalculator.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using HeuristicLab.Problems.BinPacking3D.Geometry;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.BinPacking3D.Geometry;
 using System;
 using System.Collections.Generic;
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpaceCalculation/ResidualSpaceCalculator.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpaceCalculation/ResidualSpaceCalculator.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpaceCalculation/ResidualSpaceCalculator.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using HeuristicLab.Problems.BinPacking3D.Geometry;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.BinPacking3D.Geometry;
 using System;
 using System.Collections.Generic;
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpaceCalculation/ResidualSpaceCalculatorFactory.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpaceCalculation/ResidualSpaceCalculatorFactory.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpaceCalculation/ResidualSpaceCalculatorFactory.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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;
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Solution.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Solution.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Solution.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using HeuristicLab.Common;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PermutationPackingItemSorter.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PermutationPackingItemSorter.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PermutationPackingItemSorter.cs	(revision 15617)
@@ -1,3 +1,24 @@
-﻿using HeuristicLab.Encodings.PermutationEncoding;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Encodings.PermutationEncoding;
 using HeuristicLab.Problems.BinPacking2D;
 using System;
@@ -14,5 +35,5 @@
   /// </summary>
   public static class PermutationPackingItemSorter {
-
+       
     /// <summary>
     /// Sorts a given permutation first by the volume and secoundly by the height.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/BinPacking.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/BinPacking.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/BinPacking.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj	(revision 15617)
@@ -109,4 +109,7 @@
     <Compile Include="3D\ExtremePointCreation\LineProjectionBasedEPCreator.cs" />
     <Compile Include="3D\ExtremePointCreation\PointProjectionBasedEPCreator.cs" />
+    <Compile Include="3D\ExtremePointPruning\ExtremePointPruning.cs" />
+    <Compile Include="3D\ExtremePointPruning\ExtremePointPruningFactory.cs" />
+    <Compile Include="3D\ExtremePointPruning\IExtremePointPruning.cs" />
     <Compile Include="3D\Geometry\Edge3D.cs" />
     <Compile Include="3D\Packer\BinPacker.cs" />
@@ -122,4 +125,5 @@
     <Compile Include="3D\Geometry\Vector3D.cs" />
     <Compile Include="3D\Packer\BinPackerFreeVolumeBestFit.cs" />
+    <Compile Include="3D\Packer\BinPackerMinRSLeft.cs" />
     <Compile Include="3D\Packer\BinPackerResidualSpaceBestFit.cs" />
     <Compile Include="3D\Instances\ThreeDInstanceDescriptor.cs" />
@@ -145,4 +149,14 @@
     <Compile Include="3D\ProblemBase.cs" />
     <Compile Include="3D\Solution.cs" />
+    <Compile Include="3D\Sorting\IPackingItemClusteredSorter.cs" />
+    <Compile Include="3D\Sorting\PackingItemAreaHeightSorter.cs" />
+    <Compile Include="3D\Sorting\IPackingItemSorter.cs" />
+    <Compile Include="3D\Sorting\PackingItemClusterdHeightAreaSorter.cs" />
+    <Compile Include="3D\Sorting\PackingItemClusteredAreaHeightSorter.cs" />
+    <Compile Include="3D\Sorting\PackingItemGivenSorter.cs" />
+    <Compile Include="3D\Sorting\PackingItemHeightAreaSorter.cs" />
+    <Compile Include="3D\Sorting\PackingItemHeightVolumeSorter.cs" />
+    <Compile Include="3D\Sorting\PackingItemSorterFactory.cs" />
+    <Compile Include="3D\Sorting\PackingItemVolumeHeightSorter.cs" />
     <Compile Include="3D\Sorting\PermutationPackingItemSorter.cs" />
     <Compile Include="3D\Algorithms\ExtremePointAlgorithm.cs" />
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingPlan.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingPlan.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingPlan.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingPosition.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingPosition.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingPosition.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingShape.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingShape.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingShape.cs	(revision 15617)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/Random/SRand48.cs
===================================================================
--- /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/Random/SRand48.cs	(revision 15616)
+++ /branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/Random/SRand48.cs	(revision 15617)
@@ -1,6 +1,24 @@
-﻿/* 
- * C# port of the implementation of the srand48 random generator.
- * First implemented in test3dbpp.c by S. Martello, D. Pisinger, D. Vigo, E. den Boef, J. Korst (2003) 
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2018 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.Core;
 using System;
@@ -9,5 +27,8 @@
 
 namespace HeuristicLab.Problems.BinPacking.Random {
-
+  /* 
+   * C# port of the implementation of the srand48 random generator.
+   * First implemented in test3dbpp.c by S. Martello, D. Pisinger, D. Vigo, E. den Boef, J. Korst (2003) 
+   */
   [Item("SRand", "A pseudo random number generator which creates uniformly distributed random numbers.")]
   [StorableClass]
