Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointPruning/ExtremePointPruning.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointPruning/ExtremePointPruning.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointPruning/ExtremePointPruning.cs	(revision 15618)
@@ -0,0 +1,77 @@
+﻿#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;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HeuristicLab.Problems.BinPacking3D.ExtremePointPruning {
+  internal class ExtremePointPruning : IExtremePointPruning {
+    public void PruneExtremePoints(ExtremePointPruningMethod pruningMethod, PackingShape bin, Dictionary<BinPacking3D, List<KeyValuePair<int, PackingPosition>>> positions) {
+      if (pruningMethod == ExtremePointPruningMethod.PruneBehind) {
+        PruneExtremePointsBehind(bin, positions);
+      }
+    }
+
+    public void PruneExtremePoints(ExtremePointPruningMethod pruningMethod, IList<BinPacking3D> binPackings) {
+      if (binPackings.Count <= 0) {
+        return;
+      }
+      var fixedPositions = new Dictionary<BinPacking3D, List<KeyValuePair<int, PackingPosition>>>();
+      foreach (BinPacking3D bp in binPackings) {
+        var list = new List<KeyValuePair<int, PackingPosition>>();
+        fixedPositions.Add(bp, list);
+        foreach (var p in bp.Positions) {
+          list.Add(p);
+        }
+      }
+      PruneExtremePointsBehind(binPackings[0].BinShape, fixedPositions);
+    }
+
+
+    /// <summary>
+    /// Prunes all extreme point behind the given positions.
+    /// </summary>
+    /// <param name="bin"></param>
+    /// <param name="positions"></param>
+    private static void PruneExtremePointsBehind(PackingShape bin, Dictionary<BinPacking3D, List<KeyValuePair<int, PackingPosition>>> positions) {
+      int binHeight = bin.Height;
+      foreach (var kvp in positions) {
+        var bp = kvp.Key;
+        foreach (var item in kvp.Value.OrderByDescending(x => x.Value.Z).ThenByDescending(x => x.Value.X)) {
+          // everything behind the item
+          var limit = new {
+            X = item.Value.X + bp.Items[item.Key].Width,
+            Y = item.Value.Y + binHeight,
+            Z = item.Value.Z
+          };
+          var eps = bp.ExtremePoints.Where(x => x.Key.X < limit.X && x.Key.Y < limit.Y && x.Key.Z < limit.Z).ToList();
+          foreach (var ep in eps) {
+            bp.ExtremePoints.Remove(ep);
+          }
+        }
+      }
+    }
+    
+  }
+}
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointPruning/ExtremePointPruningFactory.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointPruning/ExtremePointPruningFactory.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointPruning/ExtremePointPruningFactory.cs	(revision 15618)
@@ -0,0 +1,34 @@
+﻿#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;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HeuristicLab.Problems.BinPacking3D.ExtremePointPruning {
+  public static class ExtremePointPruningFactory {
+    public static IExtremePointPruning CreatePruning() {
+      return new ExtremePointPruning();
+    }
+  }
+}
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointPruning/IExtremePointPruning.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointPruning/IExtremePointPruning.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointPruning/IExtremePointPruning.cs	(revision 15618)
@@ -0,0 +1,46 @@
+﻿#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;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HeuristicLab.Problems.BinPacking3D.ExtremePointPruning {
+  public interface IExtremePointPruning {
+
+    /// <summary>
+    /// Prunes the extreme points of the given bin depending on the given pruning method.
+    /// </summary>
+    /// <param name="pruningMethod"></param>
+    /// <param name="bin"></param>
+    /// <param name="positions"></param>
+    void PruneExtremePoints(ExtremePointPruningMethod pruningMethod, PackingShape bin, Dictionary<BinPacking3D, List<KeyValuePair<int, PackingPosition>>> positions);
+
+    /// <summary>
+    /// Prunes the extreme points of the given bins depending on the given pruning method.
+    /// </summary>
+    /// <param name="pruningMethod"></param>
+    /// <param name="bins"></param>
+    void PruneExtremePoints(ExtremePointPruningMethod pruningMethod, IList<BinPacking3D> binPackings);
+  }
+}
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/3D-TestLineProjection-container.txt
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/3D-TestLineProjection-container.txt	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/3D-TestLineProjection-container.txt	(revision 15618)
@@ -0,0 +1,7 @@
+BIN DIMENSION
+Length	Width	Height	MaxWeight
+1360	245	280	583200
+ITEMS
+ID	Pcs	Length	Width	Height	Weight	Stack	Layer	Rotate	Tilt
+0	2	100	145	70	800	1	0	0	0
+
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerMinRSLeft.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerMinRSLeft.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerMinRSLeft.cs	(revision 15618)
@@ -0,0 +1,225 @@
+﻿#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;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.BinPacking3D.ExtremePointCreation;
+using HeuristicLab.Problems.BinPacking3D.ExtremePointPruning;
+
+namespace HeuristicLab.Problems.BinPacking3D.Packer {
+  internal class BinPackerMinRSLeft : BinPacker {
+    #region Constructors for HEAL
+    [StorableConstructor]
+    protected BinPackerMinRSLeft(bool deserializing) : base(deserializing) { }
+
+    public BinPackerMinRSLeft(BinPackerMinRSLeft original, Cloner cloner) : base(original, cloner) {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BinPackerMinRSLeft(this, cloner);
+    }
+    #endregion
+
+    public BinPackerMinRSLeft() : base() { }
+
+
+    public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, ExtremePointPruningMethod epPruningMethod, bool useStackingConstraints) {
+      var workingItems = CloneItems(items);
+      IList<BinPacking3D> packingList = new List<BinPacking3D>();
+      IList<int> remainingIds = new List<int>(sortedItems);
+
+      try {
+        while (remainingIds.Count > 0) {
+          BinPacking3D packingBin = new BinPacking3D(binShape);
+          PackRemainingItems(ref remainingIds, ref packingBin, workingItems, epCreationMethod, useStackingConstraints);
+          packingList.Add(packingBin);
+        }
+      } catch(BinPacking3DException e) {
+      }
+      
+      ExtremePointPruningFactory.CreatePruning().PruneExtremePoints(epPruningMethod, packingList);
+      return packingList;
+    }
+
+    /// <summary>
+    /// Tries to pack the remainig items into a given BinPacking3D object. Each item could be packed into the BinPacking3D object will be removed from the list of remaining ids
+    /// </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="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)) {
+        var item = items[itemId];
+        PackingPosition position = FindPackingPositionForItem(packingBin, item, useStackingConstraints);
+        // if a valid packing position could be found, the current item can be added to the given bin
+        if (position != null) {
+          PackItem(packingBin, itemId, item, position, extremePointCreator, useStackingConstraints);
+          remainingIds.Remove(itemId);
+        }
+      }
+    }
+
+    
+    protected override 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})");
+      }
+
+      var rsds = new SortedSet<ResidualSpaceDifference>();
+
+      rsds.Add(FindResidualSpaceDifferenceForItem(packingBin, packingItem, useStackingConstraints, rotated: false, tilted: false));
+
+      if (packingItem.TiltEnabled) {
+        rsds.Add(FindResidualSpaceDifferenceForItem(packingBin, packingItem, useStackingConstraints, rotated: false, tilted: true));
+      }
+      if (packingItem.RotateEnabled) {
+        rsds.Add(FindResidualSpaceDifferenceForItem(packingBin, packingItem, useStackingConstraints, rotated: true, tilted: false));
+      }
+      if (packingItem.RotateEnabled && packingItem.TiltEnabled) {
+        rsds.Add(FindResidualSpaceDifferenceForItem(packingBin, packingItem, useStackingConstraints, rotated: true, tilted: true));
+      }
+
+      var rsd = rsds.Where(x => x != null).FirstOrDefault();
+      
+      if (rsd == null) {
+        return null;
+      }
+
+      packingItem.Rotated = rsd.Item.Rotated;
+      packingItem.Tilted = rsd.Item.Tilted;
+      return rsd.Position;
+    }
+
+    protected ResidualSpaceDifference FindResidualSpaceDifferenceForItem(BinPacking3D packingBin, PackingItem packingItem, bool useStackingConstraints, bool rotated, bool tilted) {
+      PackingItem newItem = new PackingItem(packingItem) {
+        Rotated = rotated,
+        Tilted = tilted
+      };
+
+      var rsds = new SortedSet<ResidualSpaceDifference>();
+
+      foreach (var ep in packingBin.ExtremePoints) {
+        var position = ep.Key;
+        if (packingBin.IsPositionFeasible(newItem, position, useStackingConstraints)) {
+          foreach (var rs in ep.Value) {
+            var rsd = ResidualSpaceDifference.Create(position, newItem, rs);
+            if (rsd != null) {
+              rsds.Add(rsd);
+            }
+          }
+        }
+      }
+      return rsds.FirstOrDefault();
+    }
+
+    protected override bool CheckItemDimensions(BinPacking3D packingBin, PackingItem item) {
+      bool ok = false;
+      int width = item.OriginalWidth;
+      int height = item.OriginalHeight;
+      int depth = item.OriginalDepth;
+
+      ok |= CheckItemDimensions(packingBin, width, height, depth);
+
+      if (item.RotateEnabled && item.TiltEnabled) {
+        ok |= CheckItemDimensions(packingBin, depth, height, width);//rotated
+        ok |= CheckItemDimensions(packingBin, height, width, depth);//tilted
+        ok |= CheckItemDimensions(packingBin, depth, width, height);//rotated & tilted
+      } else if (item.RotateEnabled) {
+        ok |= CheckItemDimensions(packingBin, depth, height, width);
+      } else if (item.TiltEnabled) {
+        ok |= CheckItemDimensions(packingBin, height, width, depth);
+      }
+
+      return ok;
+    }
+
+    private bool CheckItemDimensions(BinPacking3D packingBin, int width, int height, int depth) {
+      return base.CheckItemDimensions(packingBin, new PackingItem() {
+        OriginalWidth = width,
+        OriginalHeight = height,
+        OriginalDepth =  depth
+      });
+    }
+
+    protected class ResidualSpaceDifference : IComparable {
+      public static ResidualSpaceDifference Create(PackingPosition position, PackingItem item, ResidualSpace rs) {
+        var x = rs.Width - item.Width;
+        var y = rs.Height - item.Height;
+        var z = rs.Depth - item.Depth;
+        // the item can't be places in the residual space
+        if (rs.IsZero() || x < 0 || y < 0 || z < 0) {
+          return null;
+        }
+
+        return new ResidualSpaceDifference() {
+          Position = position,
+          Item = item,
+          X = x,
+          Y = y,
+          Z = z
+        };
+      }
+
+      public ResidualSpaceDifference() { }
+
+      public PackingItem Item { get; set; }
+
+      public PackingPosition Position { get; set; }
+      public int X { get; set; }
+      public int Y { get; set; }
+      public int Z { get; set; }
+
+
+      public int CompareTo(object obj) {
+        if (!(obj is ResidualSpaceDifference)) {
+          return 0;
+        }
+        var rsd = obj as ResidualSpaceDifference;
+
+        var x = this.X - rsd.X;
+        var y = rsd.Y - this.Y;
+        var z = this.Z - rsd.Z;
+
+        if (x != 0) {
+          return x;
+        } else if (y != 0 ) {
+          return y;
+        } else if (z != 0) {
+          return z;
+        }
+
+        return 0;
+      }
+    }
+
+  }
+}
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/IPackingItemClusteredSorter.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/IPackingItemClusteredSorter.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/IPackingItemClusteredSorter.cs	(revision 15618)
@@ -0,0 +1,35 @@
+﻿#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;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HeuristicLab.Problems.BinPacking3D.Sorting {
+  public interface IPackingItemClusteredSorter : IPackingItemSorter {
+    Permutation SortPackingItems(IList<PackingItem> items, PackingShape bin, double delta);
+
+    Permutation SortPackingItemsByMaterial(IList<PackingItem> items, PackingShape bin, double delta);
+  }
+}
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/IPackingItemSorter.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/IPackingItemSorter.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/IPackingItemSorter.cs	(revision 15618)
@@ -0,0 +1,36 @@
+﻿#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.BinPacking3D;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HeuristicLab.Problems.BinPacking3D.Sorting {
+  public interface IPackingItemSorter {
+    Permutation SortPackingItems(IList<PackingItem> items, PackingShape bin);
+
+    Permutation SortPackingItemsByMaterial(IList<PackingItem> items, PackingShape bin);
+  }
+}
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemAreaHeightSorter.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemAreaHeightSorter.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemAreaHeightSorter.cs	(revision 15618)
@@ -0,0 +1,40 @@
+﻿#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;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Problems.BinPacking3D;
+
+namespace HeuristicLab.Problems.BinPacking3D.Sorting {
+  internal class PackingItemAreaHeightSorter : IPackingItemSorter {
+    public Permutation SortPackingItems(IList<PackingItem> items, PackingShape bin) {
+      return items.SortByAreaHeight();
+    }
+    
+    public Permutation SortPackingItemsByMaterial(IList<PackingItem> items, PackingShape bin) {
+      return items.SortByMaterialAreaHeight();
+    }
+  }
+}
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemClusterdHeightAreaSorter.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemClusterdHeightAreaSorter.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemClusterdHeightAreaSorter.cs	(revision 15618)
@@ -0,0 +1,48 @@
+﻿#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;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Problems.BinPacking3D;
+
+namespace HeuristicLab.Problems.BinPacking3D.Sorting {
+  internal class PackingItemClusterdHeightAreaSorter : IPackingItemClusteredSorter {
+    public Permutation SortPackingItems(IList<PackingItem> items, PackingShape bin, double delta) {
+      return items.SortByClusteredHeightArea(bin, delta);
+    }
+
+    public Permutation SortPackingItems(IList<PackingItem> items, PackingShape bin) {
+      return SortPackingItems(items, bin, 10.0);
+    }
+
+    public Permutation SortPackingItemsByMaterial(IList<PackingItem> items, PackingShape bin, double delta) {
+      return items.SortByMaterialClusteredHeightArea(bin, delta);
+    }
+
+    public Permutation SortPackingItemsByMaterial(IList<PackingItem> items, PackingShape bin) {
+      return SortPackingItemsByMaterial(items, bin, 10.0);
+    }
+  }
+}
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemClusteredAreaHeightSorter.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemClusteredAreaHeightSorter.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemClusteredAreaHeightSorter.cs	(revision 15618)
@@ -0,0 +1,48 @@
+﻿#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;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Problems.BinPacking3D;
+
+namespace HeuristicLab.Problems.BinPacking3D.Sorting {
+  internal class PackingItemClusteredAreaHeightSorter : IPackingItemClusteredSorter {
+    public Permutation SortPackingItems(IList<PackingItem> items, PackingShape bin, double delta) {
+      return items.SortByClusteredAreaHeight(bin, delta);
+    }
+
+    public Permutation SortPackingItems(IList<PackingItem> items, PackingShape bin) {
+      return SortPackingItems(items, bin, 10.0);
+    }
+
+    public Permutation SortPackingItemsByMaterial(IList<PackingItem> items, PackingShape bin, double delta) {
+      return items.SortByMaterialClusteredAreaHeight(bin, delta);
+    }
+
+    public Permutation SortPackingItemsByMaterial(IList<PackingItem> items, PackingShape bin) {
+      return SortPackingItemsByMaterial(items, bin, 10.0);
+    }
+  }
+}
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemGivenSorter.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemGivenSorter.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemGivenSorter.cs	(revision 15618)
@@ -0,0 +1,40 @@
+﻿#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;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Problems.BinPacking3D;
+
+namespace HeuristicLab.Problems.BinPacking3D.Sorting {
+  internal class PackingItemGivenSorter : IPackingItemSorter {
+    public Permutation SortPackingItems(IList<PackingItem> items, PackingShape bin) {
+      return new Permutation(PermutationTypes.Absolute, Enumerable.Range(0, items.Count).ToArray());
+    }
+
+    public Permutation SortPackingItemsByMaterial(IList<PackingItem> items, PackingShape bin) {
+      return new Permutation(PermutationTypes.Absolute, Enumerable.Range(0, items.Count).ToArray());
+    }
+  }
+}
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemHeightAreaSorter.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemHeightAreaSorter.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemHeightAreaSorter.cs	(revision 15618)
@@ -0,0 +1,40 @@
+﻿#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;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Problems.BinPacking3D;
+
+namespace HeuristicLab.Problems.BinPacking3D.Sorting {
+  internal class PackingItemHeightAreaSorter : IPackingItemSorter {
+    public Permutation SortPackingItems(IList<PackingItem> items, PackingShape bin) {
+      return items.SortByHeightArea();
+    }
+
+    public Permutation SortPackingItemsByMaterial(IList<PackingItem> items, PackingShape bin) {
+      return items.SortByMaterialHeightArea();
+    }
+  }
+}
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemHeightVolumeSorter.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemHeightVolumeSorter.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemHeightVolumeSorter.cs	(revision 15618)
@@ -0,0 +1,40 @@
+﻿#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;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Problems.BinPacking3D;
+
+namespace HeuristicLab.Problems.BinPacking3D.Sorting {
+  internal class PackingItemHeightVolumeSorter : IPackingItemSorter {
+    public Permutation SortPackingItems(IList<PackingItem> items, PackingShape bin) {
+      return items.SortByHeightVolume();
+    }
+
+    public Permutation SortPackingItemsByMaterial(IList<PackingItem> items, PackingShape bin) {
+      return items.SortByMaterialHeightVolume();
+    }
+  }
+}
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemSorterFactory.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemSorterFactory.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemSorterFactory.cs	(revision 15618)
@@ -0,0 +1,61 @@
+﻿#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;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace HeuristicLab.Problems.BinPacking3D.Sorting {
+  public static class PackingItemSorterFactory {
+    public static IPackingItemSorter CreatePackingItemSorter(SortingMethod sortingMethod) {
+      IPackingItemSorter sorter = null;
+      switch (sortingMethod) {
+        case SortingMethod.Given:
+          sorter = new PackingItemGivenSorter();
+          break;
+        case SortingMethod.VolumeHeight:
+          sorter = new PackingItemVolumeHeightSorter();
+          break;
+        case SortingMethod.HeightVolume:
+          sorter = new PackingItemHeightVolumeSorter();
+          break;
+        case SortingMethod.AreaHeight:
+          sorter = new PackingItemAreaHeightSorter();
+          break;
+        case SortingMethod.HeightArea:
+          sorter = new PackingItemHeightAreaSorter();
+          break;
+        case SortingMethod.ClusteredAreaHeight:
+          sorter = new PackingItemClusteredAreaHeightSorter();
+          break;
+        case SortingMethod.ClusteredHeightArea:
+          sorter = new PackingItemClusterdHeightAreaSorter();
+          break;
+        default:
+          throw new ArgumentException("Unknown sorting method: " + sortingMethod);
+      }
+      return sorter;
+    }
+  }
+}
Index: branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemVolumeHeightSorter.cs
===================================================================
--- branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemVolumeHeightSorter.cs	(revision 15618)
+++ branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PackingItemVolumeHeightSorter.cs	(revision 15618)
@@ -0,0 +1,40 @@
+﻿#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;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Problems.BinPacking3D;
+
+namespace HeuristicLab.Problems.BinPacking3D.Sorting {
+  internal class PackingItemVolumeHeightSorter : IPackingItemSorter {
+    public Permutation SortPackingItems(IList<PackingItem> items, PackingShape bin) {
+      return items.SortByVolumeHeight();
+    }
+
+    public Permutation SortPackingItemsByMaterial(IList<PackingItem> items, PackingShape bin) {
+      return items.SortByMaterialVolumeHeight();
+    }
+  }
+}
