Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15617 for branches


Ignore:
Timestamp:
01/16/18 15:40:43 (7 years ago)
Author:
rhanghof
Message:

#2817:

  • The items can be rotated and tilted now.
  • Added pruning of extreme points in packed bins.
  • Added new packer which packs items by positioning them on the point with the minimum of wasted space. He uses rotating and tilting of items.
  • Added classes for sorting given items.
Location:
branches/2817-BinPackingSpeedup
Files:
54 edited

Legend:

Unmodified
Added
Removed
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container2DView.xaml.cs

    r14162 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs

    r15554 r15617  
    1 /* HeuristicLab
    2  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    34 *
    45 * This file is part of HeuristicLab.
     
    1516 *
    1617 * You should have received a copy of the GNU General Public License
    17  * along with HeuristicLab. If not, see<http://www.gnu.org/licenses/> .
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    1819 */
     20#endregion
    1921
    2022using System;
     
    139141        var selectedModel = new GeometryModel3D { Geometry = new MeshGeometry3D(), Material = material };
    140142        AddSolidCube((MeshGeometry3D)selectedModel.Geometry, selectedPos.X, selectedPos.Y, selectedPos.Z,
    141           selectedPos.Rotated ? selectedItem.Value.Depth : selectedItem.Value.Width,
    142           selectedItem.Value.Height,
    143           selectedPos.Rotated ? selectedItem.Value.Width : selectedItem.Value.Depth);
     143          selectedItem.Value.DepthInView,
     144          selectedItem.Value.HeightInView,
     145          selectedItem.Value.DepthInView);
    144146        modelGroup.Children.Add(selectedModel);
    145147
     
    147149          var position = packing.Positions[item.Key];
    148150
    149           var w = position.Rotated ? item.Value.Depth : item.Value.Width;
    150           var h = item.Value.Height;
    151           var d = position.Rotated ? item.Value.Width : item.Value.Depth;
     151          var w = item.Value.WidthInView;
     152          var h = item.Value.HeightInView;
     153          var d = item.Value.DepthInView;
    152154
    153155          var model = new GeometryModel3D { Geometry = new MeshGeometry3D(), Material = hiddenMaterial };
     
    161163          var position = packing.Positions[item.Key];
    162164
    163           var w = position.Rotated ? item.Value.Depth : item.Value.Width;
    164           var h = item.Value.Height;
    165           var d = position.Rotated ? item.Value.Width : item.Value.Depth;
     165          var w = item.Value.WidthInView;
     166          var h = item.Value.HeightInView;
     167          var d = item.Value.DepthInView;
    166168
    167169          var model = new GeometryModel3D { Geometry = new MeshGeometry3D() };
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan2DView.Designer.cs

    r14162 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.Designer.cs

    r15488 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Algorithms/ExtremePointAlgorithm.cs

    r15585 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    4040
    4141  public enum SortingMethod { All, Given, VolumeHeight, HeightVolume, AreaHeight, HeightArea, ClusteredAreaHeight, ClusteredHeightArea }
    42   public enum FittingMethod { All, FirstFit, ResidualSpaceBestFit, FreeVolumeBestFit }
     42  public enum FittingMethod { All, FirstFit, ResidualSpaceBestFit, FreeVolumeBestFit, MinimumResidualSpaceLeft }
    4343
    4444  public enum ExtremePointCreationMethod { All, PointProjection, LineProjection }
     45
     46  public enum ExtremePointPruningMethod { None, All, PruneBehind }
    4547
    4648  [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.")]
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/BinPacking3D.cs

    r15554 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/BinPacking3DException.cs

    r15488 r15617  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/ExtremePointPermutationDecoder.cs

    r15488 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    9898    /// <param name="useStackingConstraints"></param>
    9999    /// <returns></returns>
    100     public Solution Decode(Permutation permutation, PackingShape binShape, IList<PackingItem> items,bool useStackingConstraints) {
     100    public Solution Decode(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
    101101      var binPacker = BinPackerFactory.CreateBinPacker(FittingMethod);
     102      var pruningMethod = ExtremePointPruningMethod.None;
    102103      Solution solution = new Solution(binShape, useExtremePoints: true, stackingConstraints: useStackingConstraints);
    103       foreach (var packedBin in binPacker.PackItems(permutation, binShape, items, ExtremePointCreationMethod, useStackingConstraints)) {
     104      foreach (var packedBin in binPacker.PackItems(permutation, binShape, items, ExtremePointCreationMethod, pruningMethod, useStackingConstraints)) {
    104105        solution.Bins.Add(packedBin);
    105106      }
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/IDecoder.cs

    r15473 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/PermutationProblem.cs

    r15488 r15617  
    11#region License Information
    2 
    32/* HeuristicLab
    4  * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    54 *
    65 * This file is part of HeuristicLab.
     
    1918 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    2019 */
    21 
    2220#endregion
    2321
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/BinUtilizationEvaluator.cs

    r15473 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/IEvaluator.cs

    r15473 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/MoveEvaluatorBase.cs

    r15473 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/PackingRatioEvaluator.cs

    r15473 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/Swap2MoveEvaluator.cs

    r15473 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/TranslocationMoveEvaluator.cs

    r15473 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/ExtremePointCreator.cs

    r15585 r15617  
    1 using HeuristicLab.Common;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
    223using HeuristicLab.Problems.BinPacking3D.Geometry;
    324using HeuristicLab.Problems.BinPacking3D.ResidualSpaceCalculation;
     
    4364    /// <param name="position"></param>
    4465    protected virtual void GenerateNewExtremePointsForItem(BinPacking3D binPacking, PackingItem newItem, PackingPosition position) {
    45       int newWidth = position.Rotated ? newItem.Depth : newItem.Width;
    46       int newDepth = position.Rotated ? newItem.Width : newItem.Depth;
     66      int newWidth = newItem.Width;
     67      int newDepth = newItem.Depth;
    4768      var binShape = binPacking.BinShape;
    4869
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/ExtremePointCreatorFactory.cs

    r15488 r15617  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/IExtremePointCreator.cs

    r15520 r15617  
    1 using HeuristicLab.Problems.BinPacking3D;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Problems.BinPacking3D;
    223using System;
    324using System.Collections.Generic;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/LineProjectionBasedEPCreator.cs

    r15585 r15617  
    1 using HeuristicLab.Common;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
    223using HeuristicLab.Problems.BinPacking3D.Geometry;
    324using HeuristicLab.Problems.BinPacking3D.ResidualSpaceCalculation;
     
    728using System.Text;
    829using System.Threading.Tasks;
     30using System.Collections.Concurrent;
    931
    1032namespace HeuristicLab.Problems.BinPacking3D.ExtremePointCreation {
     
    1537  public class LineProjectionBasedEPCreator : ExtremePointCreator {
    1638
     39    /// <summary>
     40    /// This lock object is needed because of creating the extreme points in an parallel for loop.
     41    /// </summary>
     42    object _lockAddExtremePoint = new object();
     43
    1744    protected override void UpdateExtremePoints(BinPacking3D binPacking, PackingItem item, PackingPosition position) {
    1845      binPacking.ExtremePoints.Clear();
    1946
    20       foreach (var i in binPacking.Items) {
     47      // generate all new extreme points parallel. This speeds up the creator.
     48      Parallel.ForEach(binPacking.Items, i => {
    2149        PackingItem it = i.Value;
    2250        PackingPosition p = binPacking.Positions[i.Key];
    2351        GenerateNewExtremePointsForItem(binPacking, it, p);
    24       }
    25      
     52      });
     53
    2654      // remove not needed extreme points.
    2755      foreach (var extremePoint in binPacking.ExtremePoints.ToList()) {
     
    3765        }
    3866      }
    39     }
    40    
     67     
     68    }
     69
    4170    /// <summary>
    4271    /// Returns true if a given residual space can be removed.
     
    6089          if (itemBelowEp || !itemBelowEp && !itemBelowPos) {
    6190            return true;
    62           }         
     91          }
    6392        }
    6493      }
    6594      return false;
    6695    }
    67    
     96
    6897    /// <summary>
    6998    /// Returns true if the given position lies on an item or an the ground.
     
    80109        var itemPosition = binPacking.Positions[x.Key];
    81110        var item = x.Value;
    82         int width = itemPosition.Rotated ? item.Depth : item.Width;
    83         int depth = itemPosition.Rotated ? item.Width : item.Depth;
     111        int width = item.Width;
     112        int depth = item.Depth;
    84113
    85114        return itemPosition.Y + item.Height == position.Y &&
     
    110139      }
    111140
    112       if (binPacking.ExtremePoints.ContainsKey(position)) {
    113         return false;
    114       }
    115 
    116       var rs = CalculateResidualSpace(binPacking, new Vector3D(position));
    117 
    118       if (rs.Count() <= 0) {
    119         return false;
    120       }
    121 
    122       binPacking.ExtremePoints.Add(position, rs);
    123       return true;
     141      // this is necessary if the extreme points are being created in a parallel loop.
     142      lock (_lockAddExtremePoint) {
     143        if (binPacking.ExtremePoints.ContainsKey(position)) {
     144          return false;
     145        }
     146
     147        var rs = CalculateResidualSpace(binPacking, new Vector3D(position));
     148
     149        if (rs.Count() <= 0) {
     150          return false;
     151        }
     152
     153        binPacking.ExtremePoints.Add(position, rs);
     154        return true;
     155      }
    124156    }
    125157
     
    148180    /// <param name="position"></param>
    149181    private void PointProjectionForNewItem(BinPacking3D binPacking, PackingItem newItem, PackingPosition position) {
    150       int newWidth = position.Rotated ? newItem.Depth : newItem.Width;
    151       int newDepth = position.Rotated ? newItem.Width : newItem.Depth;
     182      int newWidth = newItem.Width;
     183      int newDepth = newItem.Depth;
    152184      var binShape = binPacking.BinShape;
    153185      var sourcePoint = new PackingPosition(position.AssignedBin, position.X + newWidth, position.Y, position.Z);
     
    196228    /// <param name="position"></param>
    197229    private void EdgeProjectionForNewItem(BinPacking3D binPacking, PackingItem newItem, PackingPosition position) {
    198       int newWidth = position.Rotated ? newItem.Depth : newItem.Width;
    199       int newDepth = position.Rotated ? newItem.Width : newItem.Depth;
     230      int newWidth = newItem.Width;
     231      int newDepth = newItem.Depth;
    200232      var binShape = binPacking.BinShape;
    201233
     
    235267      foreach (var item in binPacking.Items) {
    236268        PackingPosition position = binPacking.Positions[item.Key];
    237         var depth = position.Rotated ? item.Value.Width : item.Value.Depth;
    238         var width = position.Rotated ? item.Value.Depth : item.Value.Width;
     269        var depth = item.Value.Depth;
     270        var width = item.Value.Width;
    239271        if (position.X <= point.X && point.X < position.X + width &&
    240272            position.Y <= point.Y && point.Y < position.Y + item.Value.Height &&
     
    444476    /// <returns></returns>
    445477    private Vector3D[] GetVertices(PackingItem item, PackingPosition position) {
    446       int width = position.Rotated ? item.Depth : item.Width;
    447       int depth = position.Rotated ? item.Width : item.Depth;
     478      int width = item.Width;
     479      int depth = item.Depth;
    448480      return new Vector3D[] {
    449481        new Vector3D(position.X + 0,     position.Y + 0,           position.Z + 0), // (0,0,0)
     
    574606        }
    575607      }
     608
    576609      return eps as IEnumerable<Vector3D>;
    577610    }
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ExtremePointCreation/PointProjectionBasedEPCreator.cs

    r15554 r15617  
    1 using HeuristicLab.Common;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
    223using HeuristicLab.Problems.BinPacking3D.Geometry;
    324using System;
     
    3657        for (int i = 0; i < residualSpaces.Count(); i++) {
    3758          var rs = residualSpaces[i];
    38           var depth = position.Rotated ? item.Width : item.Depth;
    39           var width = position.Rotated ? item.Depth : item.Width;
     59          var depth = item.Depth;
     60          var width = item.Width;
    4061          var changed = false;
    4162          if (ep.Z >= position.Z && ep.Z < position.Z + depth) {
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Edge3D.cs

    r15554 r15617  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Line3D.cs

    r15554 r15617  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Plane3D.cs

    r15554 r15617  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Geometry/Vector3D.cs

    r15554 r15617  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/IOperator.cs

    r15554 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/BPPData.cs

    r15473 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    1919 */
    2020#endregion
    21 
    22 
    2321
    2422namespace HeuristicLab.Problems.BinPacking3D.Instances {
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RandomDataDescriptor.cs

    r14162 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    1919 */
    2020#endregion
    21 
    2221
    2322using HeuristicLab.Problems.Instances;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RandomInstanceProvider.cs

    r15473 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    1919 */
    2020#endregion
    21 
    2221
    2322using System;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RealWorldContainerPackingInstanceProvider.cs

    r15473 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceDescriptor.cs

    r15230 r15617  
    11#region License Information
    2 
    32/* HeuristicLab
    4  * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    54 *
    65 * This file is part of HeuristicLab.
     
    1918 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    2019 */
    21 
    2220#endregion
    2321
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceParser.cs

    r15473 r15617  
    11#region License Information
    2 
    32/* HeuristicLab
    4  * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    54 *
    65 * This file is part of HeuristicLab.
     
    1918 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    2019 */
    21 
    2220#endregion
    2321
     
    5856            var tilt = GetNextInteger(reader);
    5957            for (var i = 0; i < pieces; i++) {
    60               PackingItem item = new PackingItem(width, height, length, Bin, weight, material);
     58              PackingItem item = new PackingItem(width, height, length, Bin, weight, material) {
     59                RotateEnabled = rotate == 0 ? false : true,
     60                TiltEnabled = tilt == 0 ? false : true
     61              };
    6162              Items.Add(item);
    6263            }
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPacker.cs

    r15554 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    4949    public BinPacker() { }
    5050
     51   
    5152    /// <summary>
    5253    /// Packs all items of the bin packer and returns a collection of BinPacking3D objects
     
    5758    /// <param name="useStackingConstraints">Flag for using stacking constraints</param>
    5859    /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
    59     public abstract IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, bool useStackingConstraints);
     60    public abstract IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, ExtremePointPruningMethod epPruningMethod, bool useStackingConstraints);
    6061   
    6162    /// <summary>
     
    6667    /// <param name="packingItem"></param>
    6768    /// <param name="position"></param>
    68     protected virtual void PackItem(BinPacking3D packingBin, int itemId, PackingItem packingItem, PackingPosition position, IExtremePointCreator extremePointCreator, bool useStackingConstraints) {
    69       if (!CheckItemDimensions(packingBin, packingItem, position)) {
    70         throw new BinPacking3DException($"The dimensions of the given item exceeds the bin dimensions. " +
    71           $"Bin: ({packingBin.BinShape.Width} {packingBin.BinShape.Depth} {packingBin.BinShape.Height})" +
    72           $"Item: ({packingItem.Width} {packingItem.Depth} {packingItem.Height})");
    73       }
     69    protected virtual void PackItem(BinPacking3D packingBin, int itemId, PackingItem packingItem, PackingPosition position, IExtremePointCreator extremePointCreator, bool useStackingConstraints) {     
    7470      packingBin.PackItem(itemId, packingItem, position);
    7571      extremePointCreator.UpdateBinPacking(packingBin, packingItem, position);
     
    8278    /// <param name="packingItem"></param>
    8379    /// <param name="useStackingConstraints"></param>
    84     /// <param name="rotated"></param>
    8580    /// <returns>Returns the packing position for an given item. If there could not be found a valid position it returns null</returns>
    86     protected PackingPosition FindPackingPositionForItem(BinPacking3D packingBin, PackingItem packingItem, bool useStackingConstraints, bool rotated) {
     81    protected virtual PackingPosition FindPackingPositionForItem(BinPacking3D packingBin, PackingItem packingItem, bool useStackingConstraints) {
     82      if (!CheckItemDimensions(packingBin, packingItem)) {
     83        throw new BinPacking3DException($"The dimensions of the given item exceeds the bin dimensions. " +
     84          $"Bin: ({packingBin.BinShape.Width} {packingBin.BinShape.Depth} {packingBin.BinShape.Height})" +
     85          $"Item: ({packingItem.Width} {packingItem.Depth} {packingItem.Height})");
     86      }
     87
    8788      PackingItem newItem = new PackingItem(
    88         rotated ? packingItem.Depth : packingItem.Width,
     89        packingItem.Width,
    8990        packingItem.Height,
    90         rotated ? packingItem.Width : packingItem.Depth,
     91        packingItem.Depth,
    9192        packingItem.TargetBin, packingItem.Weight, packingItem.Material);
    9293
     
    102103    /// <param name="item"></param>
    103104    /// <returns>Returns true if the dimensions of an given item are less or equal to the bin.</returns>
    104     private bool CheckItemDimensions(BinPacking3D packingBin, PackingItem item, PackingPosition itemPosition) {
    105       var width = itemPosition.Rotated ? item.Depth : item.Width;
    106       var depth = itemPosition.Rotated ? item.Width : item.Depth;
     105    protected virtual bool CheckItemDimensions(BinPacking3D packingBin, PackingItem item) {
     106      var width = item.Width;
     107      var depth = item.Depth;
    107108      return packingBin.BinShape.Width >= width && packingBin.BinShape.Height >= item.Height && packingBin.BinShape.Depth >= depth;
    108109    }
     110
     111    /// <summary>
     112    /// Clones a given list of packing items.
     113    /// </summary>
     114    /// <param name="items"></param>
     115    /// <returns></returns>
     116    protected static IList<PackingItem> CloneItems(IList<PackingItem> items) {
     117      var clonedItems = new List<PackingItem>();
     118      foreach (var item in items) {
     119        clonedItems.Add(item.Clone() as PackingItem);
     120      }
     121      return clonedItems;
     122    }
     123
    109124  }
    110125}
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFactory.cs

    r15554 r15617  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
     
    2950          binPacker = new BinPackerResidualSpaceBestFit();
    3051          break;
     52        case FittingMethod.MinimumResidualSpaceLeft:
     53          binPacker = new BinPackerMinRSLeft();
     54          break;
    3155        default:
    3256          throw new ArgumentException("Unknown fitting method: " + fittingMethod);
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFirstFit.cs

    r15554 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Problems.BinPacking3D.ExtremePointCreation;
     27using HeuristicLab.Problems.BinPacking3D.ExtremePointPruning;
    2728using System;
    2829using System.Collections.Generic;
     
    5253    /// </summary>
    5354    /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
    54     public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epGenerationMethod, bool useStackingConstraints) {
     55    public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, ExtremePointPruningMethod epPruningMethod, bool useStackingConstraints) {
    5556      IList<BinPacking3D> packingList = new List<BinPacking3D>();
    5657      IList<int> remainingIds = new List<int>(sortedItems);
     
    5859      while (remainingIds.Count > 0) {
    5960        BinPacking3D packingBin = new BinPacking3D(binShape);
    60         PackRemainingItems(ref remainingIds, ref packingBin, items, epGenerationMethod, useStackingConstraints, null);
     61        PackRemainingItems(ref remainingIds, ref packingBin, items, epCreationMethod, useStackingConstraints);
    6162        packingList.Add(packingBin);
    6263      }
    6364
     65      ExtremePointPruningFactory.CreatePruning().PruneExtremePoints(epPruningMethod, packingList);
    6466      return packingList;
    6567    }
     
    6971    /// </summary>
    7072    /// <param name="remainingIds">List of remaining ids. After the method has been executed the list has to have less items</param>
     73    /// <param name="packingBin">This object will be filled with some of the given items</param>
    7174    /// <param name="items">List of packing items. Some of the items will be assigned to the BinPacking3D object</param>
    72     /// <param name="packingBin">This object will be filled with some of the given items</param>
    73     protected void PackRemainingItems(ref IList<int> remainingIds, ref BinPacking3D packingBin, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, bool useStackingConstraints, Dictionary<int, bool> rotationArray) {
     75    /// <param name="epCreationMethod"></param>
     76    /// <param name="useStackingConstraints"></param>
     77    protected void PackRemainingItems(ref IList<int> remainingIds, ref BinPacking3D packingBin, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, bool useStackingConstraints) {
    7478      IExtremePointCreator extremePointCreator = ExtremePointCreatorFactory.CreateExtremePointCreator(epCreationMethod, useStackingConstraints);
    7579      foreach (var itemId in new List<int>(remainingIds)) {
    76         bool rotated = rotationArray == null ? false : rotationArray[itemId];
    77         PackingPosition position = FindPackingPositionForItem(packingBin, items[itemId], useStackingConstraints, rotated);
     80        PackingPosition position = FindPackingPositionForItem(packingBin, items[itemId], useStackingConstraints);
    7881        // if a valid packing position could be found, the current item can be added to the given bin
    7982        if (position != null) {
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFreeVolumeBestFit.cs

    r15554 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Problems.BinPacking3D.ExtremePointCreation;
     27using HeuristicLab.Problems.BinPacking3D.ExtremePointPruning;
    2728using System;
    2829using System.Collections.Generic;
     
    6162    /// <param name="useStackingConstraints"></param>
    6263    /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
    63     public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epGenerationMethod, bool useStackingConstraints) {
     64    public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epGenerationMethod, ExtremePointPruningMethod epPruningMethod, bool useStackingConstraints) {
    6465      IList<BinPacking3D> packingList = new List<BinPacking3D>();
    6566      IList<int> remainingIds = new List<int>(sortedItems);
     
    7374
    7475        foreach (var packingBin in sortedBins) {
    75           PackingPosition position = FindPackingPositionForItem(packingBin, item, useStackingConstraints, false);
     76          PackingPosition position = FindPackingPositionForItem(packingBin, item, useStackingConstraints);
    7677          positionFound = position != null;
    7778          var bin = packingBin;
     
    8485        if (!positionFound) {
    8586          BinPacking3D packingBin = new BinPacking3D(binShape);
    86           PackingPosition position = FindPackingPositionForItem(packingBin, item, useStackingConstraints, false);
     87          PackingPosition position = FindPackingPositionForItem(packingBin, item, useStackingConstraints);
    8788
    8889          if (position == null) {
     
    9495        }
    9596      }
     97      ExtremePointPruningFactory.CreatePruning().PruneExtremePoints(epPruningMethod, packingList);
    9698      return packingList.ToList();
    9799    }
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerResidualSpaceBestFit.cs

    r15554 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Problems.BinPacking3D.ExtremePointCreation;
     27using HeuristicLab.Problems.BinPacking3D.ExtremePointPruning;
    2728using System;
    2829using System.Collections.Generic;
     
    5556    /// </summary>
    5657    /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
    57     public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, bool useStackingConstraints) {
     58    public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, ExtremePointPruningMethod epPruningMethod, bool useStackingConstraints) {
    5859      IList<BinPacking3D> packingList = new List<BinPacking3D>();
    5960      IList<int> remainingIds = new List<int>(sortedItems);
    6061      IExtremePointCreator extremePointCreator = ExtremePointCreatorFactory.CreateExtremePointCreator(epCreationMethod, useStackingConstraints);
    61       bool rotated = false;
    6262
    6363      foreach (var remainingId in remainingIds) {
     
    7878        if (!packed) {
    7979          BinPacking3D binPacking = new BinPacking3D(binShape);
    80           var position = FindPackingPositionForItem(binPacking, item, useStackingConstraints, rotated);
     80          var position = FindPackingPositionForItem(binPacking, item, useStackingConstraints);
    8181          if (position != null) {
    8282            PackItem(binPacking, remainingId, item, position, extremePointCreator, useStackingConstraints);
     
    8787        }
    8888      }
     89
     90      ExtremePointPruningFactory.CreatePruning().PruneExtremePoints(epPruningMethod, packingList);
    8991      return packingList;
    9092    }
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/IBinPacker.cs

    r15554 r15617  
    1 using HeuristicLab.Encodings.PermutationEncoding;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Encodings.PermutationEncoding;
    223using System;
    324using System.Collections.Generic;
     
    1637    /// <param name="useStackingConstraints">Flag for using stacking constraints</param>
    1738    /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
    18     IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, bool useStackingConstraints);
     39    IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, ExtremePointPruningMethod epPruningMethod, bool useStackingConstraints);
    1940
    2041  }
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingItem.cs

    r14162 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3131  [StorableClass]
    3232  public class PackingItem : PackingShape, IPackingItem {
     33    #region Properties
     34
     35
    3336    public IValueParameter<PackingShape> TargetBinParameter {
    3437      get { return (IValueParameter<PackingShape>)Parameters["TargetBin"]; }
     
    4043      get { return (IFixedValueParameter<IntValue>)Parameters["Material"]; }
    4144    }
    42 
     45   
    4346    public PackingShape TargetBin {
    4447      get { return TargetBinParameter.Value; }
     
    5659    }
    5760
     61
     62    public IValueParameter<BoolValue> RotateEnabledParameter {
     63      get { return (IValueParameter<BoolValue>)Parameters["RotateEnabled"]; }
     64    }
     65
     66    public IValueParameter<BoolValue> RotatedParameter {
     67      get { return (IValueParameter<BoolValue>)Parameters["Rotated"]; }
     68    }
     69
     70    public IValueParameter<BoolValue> TiltEnabledParameter {
     71      get { return (IValueParameter<BoolValue>)Parameters["TiltEnabled"]; }
     72    }
     73
     74    public IValueParameter<BoolValue> TiltedParameter {
     75      get { return (IValueParameter<BoolValue>)Parameters["Tilted"]; }
     76    }
     77   
     78    /// <summary>
     79    /// Enables that the current item can be rotated.
     80    /// </summary>
     81    public bool RotateEnabled {
     82      get { return RotateEnabledParameter.Value.Value; }
     83      set { RotateEnabledParameter.Value.Value = value; }
     84    }
     85
     86    /// <summary>
     87    /// Indicates that the current item is rotated.
     88    /// If the item is also tilted it will be tilted first.
     89    /// </summary>
     90    public bool Rotated {
     91      get { return RotatedParameter.Value.Value; }
     92      set { RotatedParameter.Value.Value = value; }
     93    }
     94
     95    /// <summary>
     96    /// Enables that the current item can be tilted.
     97    /// </summary>
     98    public bool TiltEnabled {
     99      get { return TiltEnabledParameter.Value.Value; }
     100      set { TiltEnabledParameter.Value.Value = value; }
     101    }
     102
     103    /// <summary>
     104    /// Indicates that the current item is tilted.
     105    /// Tilted means that the item is tilted sidewards.
     106    /// If the item is also rotated it will be tilted first.
     107    /// </summary>
     108    public bool Tilted {
     109      get { return TiltedParameter.Value.Value; }
     110      set { TiltedParameter.Value.Value = value; }
     111    }
     112   
     113    public IFixedValueParameter<IntValue> LoadSecuringHeightParameter {
     114      get { return (IFixedValueParameter<IntValue>)Parameters["LoadSecuringHeight"]; }
     115    }
     116   
     117    public IFixedValueParameter<IntValue> LoadSecuringWidthParameter {
     118      get { return (IFixedValueParameter<IntValue>)Parameters["LoadSecuringWidth"]; }
     119    }
     120
     121    public IFixedValueParameter<IntValue> LoadSecuringDepthParameter {
     122      get { return (IFixedValueParameter<IntValue>)Parameters["LoadSecuringDepth"]; }
     123    }
     124
     125    public int LoadSecuringHeight {
     126      get { return LoadSecuringHeightParameter.Value.Value; }
     127      set { LoadSecuringHeightParameter.Value.Value = value; }
     128    }
     129
     130    public int LoadSecuringWidth {
     131      get { return LoadSecuringWidthParameter.Value.Value; }
     132      set { LoadSecuringWidthParameter.Value.Value = value; }
     133    }
     134
     135    public int LoadSecuringDepth {
     136      get { return LoadSecuringDepthParameter.Value.Value; }
     137      set { LoadSecuringDepthParameter.Value.Value = value; }
     138    }
     139
     140    /// <summary>
     141    /// This property represents the height as needed in the bin packing.
     142    /// </summary>
     143    public new int Height {
     144      get {
     145        if (!Tilted) {
     146          return HeightParameter.Value.Value + LoadSecuringHeightParameter.Value.Value;
     147        } else {
     148          return WidthParameter.Value.Value + LoadSecuringHeightParameter.Value.Value;
     149        }
     150      }
     151    }
     152
     153    /// <summary>
     154    /// This property represents the width as needed in the bin packing.
     155    /// </summary>
     156    public new int Width {
     157      get {
     158        if (Rotated) {
     159          return DepthParameter.Value.Value + LoadSecuringWidthParameter.Value.Value;
     160        } else {
     161          if (!Tilted) {
     162            return WidthParameter.Value.Value + LoadSecuringWidthParameter.Value.Value;
     163          } else {
     164            return HeightParameter.Value.Value + LoadSecuringWidthParameter.Value.Value;
     165          }
     166        }
     167      }
     168    }
     169
     170    /// <summary>
     171    /// This property represents the depth as needed in the bin packing.
     172    /// </summary>
     173    public new int Depth {
     174      get {
     175        if (!Rotated) {
     176          return DepthParameter.Value.Value + LoadSecuringDepthParameter.Value.Value;
     177        } else {
     178          if (!Tilted) {
     179            return WidthParameter.Value.Value + LoadSecuringDepthParameter.Value.Value;
     180          } else {
     181            return HeightParameter.Value.Value + LoadSecuringDepthParameter.Value.Value;
     182          }
     183        }
     184      }
     185    }
     186
     187    /// <summary>
     188    /// This property represents the height as it is seen in the view of the bin packing.
     189    /// </summary>
     190    public int HeightInView {
     191      get {
     192        if (!Tilted) {
     193          return HeightParameter.Value.Value;
     194        } else {
     195          return WidthParameter.Value.Value;
     196        }
     197      }
     198    }
     199
     200    /// <summary>
     201    /// This property represents the width as it is seen in the view of the bin packing.
     202    /// </summary>
     203    public int WidthInView {
     204      get {
     205        if (Rotated) {
     206          return DepthParameter.Value.Value;
     207        } else {
     208          if (!Tilted) {
     209            return WidthParameter.Value.Value;
     210          } else {
     211            return HeightParameter.Value.Value;
     212          }
     213        }
     214      }
     215    }
     216
     217    /// <summary>
     218    /// This property represents the depth as it is seen in the view of the bin packing.
     219    /// </summary>
     220    public int DepthInView {
     221      get {
     222        if (!Rotated) {
     223          return DepthParameter.Value.Value;
     224        } else {
     225          if (!Tilted) {
     226            return WidthParameter.Value.Value;
     227          } else {
     228            return HeightParameter.Value.Value;
     229          }
     230        }
     231      }
     232    }
     233
     234    /// <summary>
     235    /// This property represents the original height.
     236    /// </summary>
     237    public int OriginalHeight {
     238      get { return HeightParameter.Value.Value; }
     239      set { HeightParameter.Value.Value = value; }
     240    }
     241
     242    /// <summary>
     243    /// This property represents the original width.
     244    /// </summary>
     245    public int OriginalWidth {
     246      get { return WidthParameter.Value.Value; }
     247      set { WidthParameter.Value.Value = value; }
     248    }
     249
     250    /// <summary>
     251    /// This property represents the original depth.
     252    /// </summary>
     253    public int OriginalDepth {
     254      get { return DepthParameter.Value.Value; }
     255      set { DepthParameter.Value.Value = value; }
     256    }
     257   
    58258    public bool SupportsStacking(IPackingItem other) {
    59259      return ((other.Material < this.Material) || (other.Material.Equals(this.Material) && other.Weight <= this.Weight));
    60260    }
     261    #endregion
     262
    61263
    62264    [StorableConstructor]
     
    71273      Parameters.Add(new FixedValueParameter<DoubleValue>("Weight"));
    72274      Parameters.Add(new FixedValueParameter<IntValue>("Material"));
     275      Parameters.Add(new FixedValueParameter<BoolValue>("RotateEnabled"));
     276      Parameters.Add(new FixedValueParameter<BoolValue>("Rotated"));
     277      Parameters.Add(new FixedValueParameter<BoolValue>("TiltEnabled"));
     278      Parameters.Add(new FixedValueParameter<BoolValue>("Tilted"));
     279     
     280      Parameters.Add(new FixedValueParameter<IntValue>("LoadSecuringHeight"));
     281      Parameters.Add(new FixedValueParameter<IntValue>("LoadSecuringWidth"));
     282      Parameters.Add(new FixedValueParameter<IntValue>("LoadSecuringDepth"));
    73283
    74284      RegisterEvents();
    75285    }
    76286
     287    public PackingItem(int width, int height, int depth, PackingShape targetBin)
     288      : this() {
     289      this.OriginalWidth = width;
     290      this.OriginalHeight = height;
     291      this.OriginalDepth = depth;
     292      this.TargetBin = (PackingShape)targetBin.Clone();
     293    }
     294
    77295    public PackingItem(int width, int height, int depth, PackingShape targetBin, double weight, int material)
    78       : this() {
    79       this.Width = width;
    80       this.Height = height;
    81       this.Depth = depth;
     296      : this(width, height, depth, targetBin) {   
    82297      this.Weight = weight;
    83298      this.Material = material;
    84       this.TargetBin = (PackingShape)targetBin.Clone();
    85     }
    86 
    87     public PackingItem(int width, int height, int depth, PackingShape targetBin)
     299    }
     300
     301   
     302
     303    public PackingItem(PackingItem packingItem)
    88304      : this() {
    89       this.Width = width;
    90       this.Height = height;
    91       this.Depth = depth;
    92       this.TargetBin = (PackingShape)targetBin.Clone();
     305      OriginalWidth = packingItem.OriginalWidth;
     306      OriginalHeight = packingItem.OriginalHeight;
     307      OriginalDepth =  packingItem.OriginalDepth;
     308      TargetBin = (PackingShape)packingItem.TargetBin.Clone();
     309      Weight = packingItem.Weight;
     310      Material = packingItem.Material;
     311      Rotated = packingItem.Rotated;
     312      Tilted = packingItem.Tilted;
     313
     314      LoadSecuringDepth = packingItem.LoadSecuringDepth;
     315      LoadSecuringHeight = packingItem.LoadSecuringHeight;
     316      LoadSecuringWidth = packingItem.LoadSecuringWidth;
    93317    }
    94318
     
    110334    }
    111335
    112 
    113336    public override string ToString() {
    114337      return string.Format("CuboidPackingItem ({0}, {1}, {2}; weight={3}, mat={4})", this.Width, this.Height, this.Depth, this.Weight, this.Material);
    115338    }
     339   
    116340  }
    117341}
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingPosition.cs

    r15554 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingShape.cs

    r14162 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ProblemBase.cs

    r15473 r15617  
    11#region License Information
    2 
    32/* HeuristicLab
    4  * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    54 *
    65 * This file is part of HeuristicLab.
     
    1918 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    2019 */
    21 
    2220#endregion
    2321
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpace.cs

    r15520 r15617  
    1 using HeuristicLab.Core;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Core;
    223using System;
    324using System.Collections.Generic;
     
    102123    public PackingItem ToPackingItem() {
    103124      return new PackingItem() {
    104         Width = this.Width,
    105         Height = this.Height,
    106         Depth = this.Depth
     125        OriginalWidth = this.Width,
     126        OriginalHeight = this.Height,
     127        OriginalDepth = this.Depth
    107128      };
    108129    }
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpaceCalculation/IResidualSpaceCalculator.cs

    r15554 r15617  
    1 using HeuristicLab.Problems.BinPacking3D.Geometry;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Problems.BinPacking3D.Geometry;
    223using System;
    324using System.Collections.Generic;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpaceCalculation/ResidualSpaceCalculator.cs

    r15585 r15617  
    1 using HeuristicLab.Problems.BinPacking3D.Geometry;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Problems.BinPacking3D.Geometry;
    223using System;
    324using System.Collections.Generic;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ResidualSpaceCalculation/ResidualSpaceCalculatorFactory.cs

    r15520 r15617  
    1 using System;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Solution.cs

    r14167 r15617  
    1 using HeuristicLab.Common;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Common;
    223using HeuristicLab.Core;
    324using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Sorting/PermutationPackingItemSorter.cs

    r15473 r15617  
    1 using HeuristicLab.Encodings.PermutationEncoding;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
     22using HeuristicLab.Encodings.PermutationEncoding;
    223using HeuristicLab.Problems.BinPacking2D;
    324using System;
     
    1435  /// </summary>
    1536  public static class PermutationPackingItemSorter {
    16 
     37       
    1738    /// <summary>
    1839    /// Sorts a given permutation first by the volume and secoundly by the height.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/BinPacking.cs

    r15520 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj

    r15554 r15617  
    109109    <Compile Include="3D\ExtremePointCreation\LineProjectionBasedEPCreator.cs" />
    110110    <Compile Include="3D\ExtremePointCreation\PointProjectionBasedEPCreator.cs" />
     111    <Compile Include="3D\ExtremePointPruning\ExtremePointPruning.cs" />
     112    <Compile Include="3D\ExtremePointPruning\ExtremePointPruningFactory.cs" />
     113    <Compile Include="3D\ExtremePointPruning\IExtremePointPruning.cs" />
    111114    <Compile Include="3D\Geometry\Edge3D.cs" />
    112115    <Compile Include="3D\Packer\BinPacker.cs" />
     
    122125    <Compile Include="3D\Geometry\Vector3D.cs" />
    123126    <Compile Include="3D\Packer\BinPackerFreeVolumeBestFit.cs" />
     127    <Compile Include="3D\Packer\BinPackerMinRSLeft.cs" />
    124128    <Compile Include="3D\Packer\BinPackerResidualSpaceBestFit.cs" />
    125129    <Compile Include="3D\Instances\ThreeDInstanceDescriptor.cs" />
     
    145149    <Compile Include="3D\ProblemBase.cs" />
    146150    <Compile Include="3D\Solution.cs" />
     151    <Compile Include="3D\Sorting\IPackingItemClusteredSorter.cs" />
     152    <Compile Include="3D\Sorting\PackingItemAreaHeightSorter.cs" />
     153    <Compile Include="3D\Sorting\IPackingItemSorter.cs" />
     154    <Compile Include="3D\Sorting\PackingItemClusterdHeightAreaSorter.cs" />
     155    <Compile Include="3D\Sorting\PackingItemClusteredAreaHeightSorter.cs" />
     156    <Compile Include="3D\Sorting\PackingItemGivenSorter.cs" />
     157    <Compile Include="3D\Sorting\PackingItemHeightAreaSorter.cs" />
     158    <Compile Include="3D\Sorting\PackingItemHeightVolumeSorter.cs" />
     159    <Compile Include="3D\Sorting\PackingItemSorterFactory.cs" />
     160    <Compile Include="3D\Sorting\PackingItemVolumeHeightSorter.cs" />
    147161    <Compile Include="3D\Sorting\PermutationPackingItemSorter.cs" />
    148162    <Compile Include="3D\Algorithms\ExtremePointAlgorithm.cs" />
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingPlan.cs

    r14167 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingPosition.cs

    r14162 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingShape.cs

    r14167 r15617  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Joseph Helm and Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/Random/SRand48.cs

    r15454 r15617  
    1 /*
    2  * C# port of the implementation of the srand48 random generator.
    3  * First implemented in test3dbpp.c by S. Martello, D. Pisinger, D. Vigo, E. den Boef, J. Korst (2003)
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    419 */
     20#endregion
     21
     22
    523using HeuristicLab.Core;
    624using System;
     
    927
    1028namespace HeuristicLab.Problems.BinPacking.Random {
    11 
     29  /*
     30   * C# port of the implementation of the srand48 random generator.
     31   * First implemented in test3dbpp.c by S. Martello, D. Pisinger, D. Vigo, E. den Boef, J. Korst (2003)
     32   */
    1233  [Item("SRand", "A pseudo random number generator which creates uniformly distributed random numbers.")]
    1334  [StorableClass]
Note: See TracChangeset for help on using the changeset viewer.