- Timestamp:
- 01/16/18 15:40:43 (7 years ago)
- 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 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * 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) 3 4 * 4 5 * This file is part of HeuristicLab. … … 15 16 * 16 17 * 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/>. 18 19 */ 20 #endregion 19 21 20 22 using System; … … 139 141 var selectedModel = new GeometryModel3D { Geometry = new MeshGeometry3D(), Material = material }; 140 142 AddSolidCube((MeshGeometry3D)selectedModel.Geometry, selectedPos.X, selectedPos.Y, selectedPos.Z, 141 selected Pos.Rotated ? selectedItem.Value.Depth : selectedItem.Value.Width,142 selectedItem.Value.Height ,143 selected Pos.Rotated ? selectedItem.Value.Width : selectedItem.Value.Depth);143 selectedItem.Value.DepthInView, 144 selectedItem.Value.HeightInView, 145 selectedItem.Value.DepthInView); 144 146 modelGroup.Children.Add(selectedModel); 145 147 … … 147 149 var position = packing.Positions[item.Key]; 148 150 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; 152 154 153 155 var model = new GeometryModel3D { Geometry = new MeshGeometry3D(), Material = hiddenMaterial }; … … 161 163 var position = packing.Positions[item.Key]; 162 164 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; 166 168 167 169 var model = new GeometryModel3D { Geometry = new MeshGeometry3D() }; -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan2DView.Designer.cs
r14162 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.Designer.cs
r15488 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Algorithms/ExtremePointAlgorithm.cs
r15585 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 40 40 41 41 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 } 43 43 44 44 public enum ExtremePointCreationMethod { All, PointProjection, LineProjection } 45 46 public enum ExtremePointPruningMethod { None, All, PruneBehind } 45 47 46 48 [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 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * 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 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.Linq; -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/ExtremePointPermutationDecoder.cs
r15488 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 98 98 /// <param name="useStackingConstraints"></param> 99 99 /// <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) { 101 101 var binPacker = BinPackerFactory.CreateBinPacker(FittingMethod); 102 var pruningMethod = ExtremePointPruningMethod.None; 102 103 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)) { 104 105 solution.Bins.Add(packedBin); 105 106 } -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/IDecoder.cs
r15473 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/PermutationProblem.cs
r15488 r15617 1 1 #region License Information 2 3 2 /* HeuristicLab 4 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 4 * 6 5 * This file is part of HeuristicLab. … … 19 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 20 19 */ 21 22 20 #endregion 23 21 -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/BinUtilizationEvaluator.cs
r15473 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/IEvaluator.cs
r15473 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/MoveEvaluatorBase.cs
r15473 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/PackingRatioEvaluator.cs
r15473 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/Swap2MoveEvaluator.cs
r15473 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/TranslocationMoveEvaluator.cs
r15473 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * 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 22 using HeuristicLab.Common; 2 23 using HeuristicLab.Problems.BinPacking3D.Geometry; 3 24 using HeuristicLab.Problems.BinPacking3D.ResidualSpaceCalculation; … … 43 64 /// <param name="position"></param> 44 65 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; 47 68 var binShape = binPacking.BinShape; 48 69 -
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 22 using System; 2 23 using System.Collections.Generic; 3 24 using 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 22 using HeuristicLab.Problems.BinPacking3D; 2 23 using System; 3 24 using 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 22 using HeuristicLab.Common; 2 23 using HeuristicLab.Problems.BinPacking3D.Geometry; 3 24 using HeuristicLab.Problems.BinPacking3D.ResidualSpaceCalculation; … … 7 28 using System.Text; 8 29 using System.Threading.Tasks; 30 using System.Collections.Concurrent; 9 31 10 32 namespace HeuristicLab.Problems.BinPacking3D.ExtremePointCreation { … … 15 37 public class LineProjectionBasedEPCreator : ExtremePointCreator { 16 38 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 17 44 protected override void UpdateExtremePoints(BinPacking3D binPacking, PackingItem item, PackingPosition position) { 18 45 binPacking.ExtremePoints.Clear(); 19 46 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 => { 21 49 PackingItem it = i.Value; 22 50 PackingPosition p = binPacking.Positions[i.Key]; 23 51 GenerateNewExtremePointsForItem(binPacking, it, p); 24 } 25 52 }); 53 26 54 // remove not needed extreme points. 27 55 foreach (var extremePoint in binPacking.ExtremePoints.ToList()) { … … 37 65 } 38 66 } 39 } 40 67 68 } 69 41 70 /// <summary> 42 71 /// Returns true if a given residual space can be removed. … … 60 89 if (itemBelowEp || !itemBelowEp && !itemBelowPos) { 61 90 return true; 62 } 91 } 63 92 } 64 93 } 65 94 return false; 66 95 } 67 96 68 97 /// <summary> 69 98 /// Returns true if the given position lies on an item or an the ground. … … 80 109 var itemPosition = binPacking.Positions[x.Key]; 81 110 var item = x.Value; 82 int width = item Position.Rotated ? item.Depth : item.Width;83 int depth = item Position.Rotated ? item.Width : item.Depth;111 int width = item.Width; 112 int depth = item.Depth; 84 113 85 114 return itemPosition.Y + item.Height == position.Y && … … 110 139 } 111 140 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 } 124 156 } 125 157 … … 148 180 /// <param name="position"></param> 149 181 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; 152 184 var binShape = binPacking.BinShape; 153 185 var sourcePoint = new PackingPosition(position.AssignedBin, position.X + newWidth, position.Y, position.Z); … … 196 228 /// <param name="position"></param> 197 229 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; 200 232 var binShape = binPacking.BinShape; 201 233 … … 235 267 foreach (var item in binPacking.Items) { 236 268 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; 239 271 if (position.X <= point.X && point.X < position.X + width && 240 272 position.Y <= point.Y && point.Y < position.Y + item.Value.Height && … … 444 476 /// <returns></returns> 445 477 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; 448 480 return new Vector3D[] { 449 481 new Vector3D(position.X + 0, position.Y + 0, position.Z + 0), // (0,0,0) … … 574 606 } 575 607 } 608 576 609 return eps as IEnumerable<Vector3D>; 577 610 } -
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 22 using HeuristicLab.Common; 2 23 using HeuristicLab.Problems.BinPacking3D.Geometry; 3 24 using System; … … 36 57 for (int i = 0; i < residualSpaces.Count(); i++) { 37 58 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; 40 61 var changed = false; 41 62 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 22 using System; 2 23 using System.Collections.Generic; 3 24 using 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 22 using System; 2 23 using System.Collections.Generic; 3 24 using 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 22 using System; 2 23 using System.Collections.Generic; 3 24 using 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 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.Linq; -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/IOperator.cs
r15554 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/BPPData.cs
r15473 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 19 19 */ 20 20 #endregion 21 22 23 21 24 22 namespace HeuristicLab.Problems.BinPacking3D.Instances { -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RandomDataDescriptor.cs
r14162 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 19 19 */ 20 20 #endregion 21 22 21 23 22 using HeuristicLab.Problems.Instances; -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RandomInstanceProvider.cs
r15473 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 19 19 */ 20 20 #endregion 21 22 21 23 22 using System; -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RealWorldContainerPackingInstanceProvider.cs
r15473 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceDescriptor.cs
r15230 r15617 1 1 #region License Information 2 3 2 /* HeuristicLab 4 * Copyright (C) 2002-201 7Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 4 * 6 5 * This file is part of HeuristicLab. … … 19 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 20 19 */ 21 22 20 #endregion 23 21 -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/ThreeDInstanceParser.cs
r15473 r15617 1 1 #region License Information 2 3 2 /* HeuristicLab 4 * Copyright (C) 2002-201 7Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 4 * 6 5 * This file is part of HeuristicLab. … … 19 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 20 19 */ 21 22 20 #endregion 23 21 … … 58 56 var tilt = GetNextInteger(reader); 59 57 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 }; 61 62 Items.Add(item); 62 63 } -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPacker.cs
r15554 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 49 49 public BinPacker() { } 50 50 51 51 52 /// <summary> 52 53 /// Packs all items of the bin packer and returns a collection of BinPacking3D objects … … 57 58 /// <param name="useStackingConstraints">Flag for using stacking constraints</param> 58 59 /// <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); 60 61 61 62 /// <summary> … … 66 67 /// <param name="packingItem"></param> 67 68 /// <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) { 74 70 packingBin.PackItem(itemId, packingItem, position); 75 71 extremePointCreator.UpdateBinPacking(packingBin, packingItem, position); … … 82 78 /// <param name="packingItem"></param> 83 79 /// <param name="useStackingConstraints"></param> 84 /// <param name="rotated"></param>85 80 /// <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 87 88 PackingItem newItem = new PackingItem( 88 rotated ? packingItem.Depth :packingItem.Width,89 packingItem.Width, 89 90 packingItem.Height, 90 rotated ? packingItem.Width :packingItem.Depth,91 packingItem.Depth, 91 92 packingItem.TargetBin, packingItem.Weight, packingItem.Material); 92 93 … … 102 103 /// <param name="item"></param> 103 104 /// <returns>Returns true if the dimensions of an given item are less or equal to the bin.</returns> 104 pr ivate bool CheckItemDimensions(BinPacking3D packingBin, PackingItem item, PackingPosition itemPosition) {105 var width = item Position.Rotated ? item.Depth : item.Width;106 var depth = item Position.Rotated ? item.Width : item.Depth;105 protected virtual bool CheckItemDimensions(BinPacking3D packingBin, PackingItem item) { 106 var width = item.Width; 107 var depth = item.Depth; 107 108 return packingBin.BinShape.Width >= width && packingBin.BinShape.Height >= item.Height && packingBin.BinShape.Depth >= depth; 108 109 } 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 109 124 } 110 125 } -
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 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.Linq; … … 29 50 binPacker = new BinPackerResidualSpaceBestFit(); 30 51 break; 52 case FittingMethod.MinimumResidualSpaceLeft: 53 binPacker = new BinPackerMinRSLeft(); 54 break; 31 55 default: 32 56 throw new ArgumentException("Unknown fitting method: " + fittingMethod); -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFirstFit.cs
r15554 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Problems.BinPacking3D.ExtremePointCreation; 27 using HeuristicLab.Problems.BinPacking3D.ExtremePointPruning; 27 28 using System; 28 29 using System.Collections.Generic; … … 52 53 /// </summary> 53 54 /// <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 ep GenerationMethod, bool useStackingConstraints) {55 public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, ExtremePointCreationMethod epCreationMethod, ExtremePointPruningMethod epPruningMethod, bool useStackingConstraints) { 55 56 IList<BinPacking3D> packingList = new List<BinPacking3D>(); 56 57 IList<int> remainingIds = new List<int>(sortedItems); … … 58 59 while (remainingIds.Count > 0) { 59 60 BinPacking3D packingBin = new BinPacking3D(binShape); 60 PackRemainingItems(ref remainingIds, ref packingBin, items, ep GenerationMethod, useStackingConstraints, null);61 PackRemainingItems(ref remainingIds, ref packingBin, items, epCreationMethod, useStackingConstraints); 61 62 packingList.Add(packingBin); 62 63 } 63 64 65 ExtremePointPruningFactory.CreatePruning().PruneExtremePoints(epPruningMethod, packingList); 64 66 return packingList; 65 67 } … … 69 71 /// </summary> 70 72 /// <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> 71 74 /// <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) { 74 78 IExtremePointCreator extremePointCreator = ExtremePointCreatorFactory.CreateExtremePointCreator(epCreationMethod, useStackingConstraints); 75 79 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); 78 81 // if a valid packing position could be found, the current item can be added to the given bin 79 82 if (position != null) { -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFreeVolumeBestFit.cs
r15554 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Problems.BinPacking3D.ExtremePointCreation; 27 using HeuristicLab.Problems.BinPacking3D.ExtremePointPruning; 27 28 using System; 28 29 using System.Collections.Generic; … … 61 62 /// <param name="useStackingConstraints"></param> 62 63 /// <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) { 64 65 IList<BinPacking3D> packingList = new List<BinPacking3D>(); 65 66 IList<int> remainingIds = new List<int>(sortedItems); … … 73 74 74 75 foreach (var packingBin in sortedBins) { 75 PackingPosition position = FindPackingPositionForItem(packingBin, item, useStackingConstraints , false);76 PackingPosition position = FindPackingPositionForItem(packingBin, item, useStackingConstraints); 76 77 positionFound = position != null; 77 78 var bin = packingBin; … … 84 85 if (!positionFound) { 85 86 BinPacking3D packingBin = new BinPacking3D(binShape); 86 PackingPosition position = FindPackingPositionForItem(packingBin, item, useStackingConstraints , false);87 PackingPosition position = FindPackingPositionForItem(packingBin, item, useStackingConstraints); 87 88 88 89 if (position == null) { … … 94 95 } 95 96 } 97 ExtremePointPruningFactory.CreatePruning().PruneExtremePoints(epPruningMethod, packingList); 96 98 return packingList.ToList(); 97 99 } -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerResidualSpaceBestFit.cs
r15554 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Problems.BinPacking3D.ExtremePointCreation; 27 using HeuristicLab.Problems.BinPacking3D.ExtremePointPruning; 27 28 using System; 28 29 using System.Collections.Generic; … … 55 56 /// </summary> 56 57 /// <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) { 58 59 IList<BinPacking3D> packingList = new List<BinPacking3D>(); 59 60 IList<int> remainingIds = new List<int>(sortedItems); 60 61 IExtremePointCreator extremePointCreator = ExtremePointCreatorFactory.CreateExtremePointCreator(epCreationMethod, useStackingConstraints); 61 bool rotated = false;62 62 63 63 foreach (var remainingId in remainingIds) { … … 78 78 if (!packed) { 79 79 BinPacking3D binPacking = new BinPacking3D(binShape); 80 var position = FindPackingPositionForItem(binPacking, item, useStackingConstraints , rotated);80 var position = FindPackingPositionForItem(binPacking, item, useStackingConstraints); 81 81 if (position != null) { 82 82 PackItem(binPacking, remainingId, item, position, extremePointCreator, useStackingConstraints); … … 87 87 } 88 88 } 89 90 ExtremePointPruningFactory.CreatePruning().PruneExtremePoints(epPruningMethod, packingList); 89 91 return packingList; 90 92 } -
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 22 using HeuristicLab.Encodings.PermutationEncoding; 2 23 using System; 3 24 using System.Collections.Generic; … … 16 37 /// <param name="useStackingConstraints">Flag for using stacking constraints</param> 17 38 /// <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); 19 40 20 41 } -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingItem.cs
r14162 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 31 31 [StorableClass] 32 32 public class PackingItem : PackingShape, IPackingItem { 33 #region Properties 34 35 33 36 public IValueParameter<PackingShape> TargetBinParameter { 34 37 get { return (IValueParameter<PackingShape>)Parameters["TargetBin"]; } … … 40 43 get { return (IFixedValueParameter<IntValue>)Parameters["Material"]; } 41 44 } 42 45 43 46 public PackingShape TargetBin { 44 47 get { return TargetBinParameter.Value; } … … 56 59 } 57 60 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 58 258 public bool SupportsStacking(IPackingItem other) { 59 259 return ((other.Material < this.Material) || (other.Material.Equals(this.Material) && other.Weight <= this.Weight)); 60 260 } 261 #endregion 262 61 263 62 264 [StorableConstructor] … … 71 273 Parameters.Add(new FixedValueParameter<DoubleValue>("Weight")); 72 274 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")); 73 283 74 284 RegisterEvents(); 75 285 } 76 286 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 77 295 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) { 82 297 this.Weight = weight; 83 298 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) 88 304 : 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; 93 317 } 94 318 … … 110 334 } 111 335 112 113 336 public override string ToString() { 114 337 return string.Format("CuboidPackingItem ({0}, {1}, {2}; weight={3}, mat={4})", this.Width, this.Height, this.Depth, this.Weight, this.Material); 115 338 } 339 116 340 } 117 341 } -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingPosition.cs
r15554 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/PackingShape.cs
r14162 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ProblemBase.cs
r15473 r15617 1 1 #region License Information 2 3 2 /* HeuristicLab 4 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 4 * 6 5 * This file is part of HeuristicLab. … … 19 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 20 19 */ 21 22 20 #endregion 23 21 -
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 22 using HeuristicLab.Core; 2 23 using System; 3 24 using System.Collections.Generic; … … 102 123 public PackingItem ToPackingItem() { 103 124 return new PackingItem() { 104 Width = this.Width,105 Height = this.Height,106 Depth = this.Depth125 OriginalWidth = this.Width, 126 OriginalHeight = this.Height, 127 OriginalDepth = this.Depth 107 128 }; 108 129 } -
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 22 using HeuristicLab.Problems.BinPacking3D.Geometry; 2 23 using System; 3 24 using 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 22 using HeuristicLab.Problems.BinPacking3D.Geometry; 2 23 using System; 3 24 using 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 22 using System; 2 23 using System.Collections.Generic; 3 24 using 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 22 using HeuristicLab.Common; 2 23 using HeuristicLab.Core; 3 24 using 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 22 using HeuristicLab.Encodings.PermutationEncoding; 2 23 using HeuristicLab.Problems.BinPacking2D; 3 24 using System; … … 14 35 /// </summary> 15 36 public static class PermutationPackingItemSorter { 16 37 17 38 /// <summary> 18 39 /// 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 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj
r15554 r15617 109 109 <Compile Include="3D\ExtremePointCreation\LineProjectionBasedEPCreator.cs" /> 110 110 <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" /> 111 114 <Compile Include="3D\Geometry\Edge3D.cs" /> 112 115 <Compile Include="3D\Packer\BinPacker.cs" /> … … 122 125 <Compile Include="3D\Geometry\Vector3D.cs" /> 123 126 <Compile Include="3D\Packer\BinPackerFreeVolumeBestFit.cs" /> 127 <Compile Include="3D\Packer\BinPackerMinRSLeft.cs" /> 124 128 <Compile Include="3D\Packer\BinPackerResidualSpaceBestFit.cs" /> 125 129 <Compile Include="3D\Instances\ThreeDInstanceDescriptor.cs" /> … … 145 149 <Compile Include="3D\ProblemBase.cs" /> 146 150 <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" /> 147 161 <Compile Include="3D\Sorting\PermutationPackingItemSorter.cs" /> 148 162 <Compile Include="3D\Algorithms\ExtremePointAlgorithm.cs" /> -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingPlan.cs
r14167 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingPosition.cs
r14162 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/PackingShape.cs
r14167 r15617 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6 Joseph Helm andHeuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * 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/>. 4 19 */ 20 #endregion 21 22 5 23 using HeuristicLab.Core; 6 24 using System; … … 9 27 10 28 namespace 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 */ 12 33 [Item("SRand", "A pseudo random number generator which creates uniformly distributed random numbers.")] 13 34 [StorableClass]
Note: See TracChangeset
for help on using the changeset viewer.