Changeset 15473
- Timestamp:
- 11/15/17 12:30:13 (7 years ago)
- Location:
- branches/2817-BinPackingSpeedup
- Files:
-
- 338 added
- 8 deleted
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/2D/BinPacking2D.cs
r15241 r15473 34 34 public BinPacking2D(PackingShape binShape) 35 35 : base(binShape) { 36 OccupationLayers = new Dictionary<int, List<int>>(); 36 37 ExtremePoints.Add(binShape.Origin); 37 38 InitializeOccupationLayers(); … … 40 41 [StorableConstructor] 41 42 protected BinPacking2D(bool deserializing) : base(deserializing) { } 42 protected BinPacking2D(BinPacking2D original, Cloner cloner) : base(original, cloner) { } 43 protected BinPacking2D(BinPacking2D original, Cloner cloner) : base(original, cloner) { 44 this.OccupationLayers = new Dictionary<int, List<int>>(); 45 foreach (var kvp in original.OccupationLayers) { 46 OccupationLayers.Add(kvp.Key, new List<int>(kvp.Value)); 47 } 48 } 43 49 public override IDeepCloneable Clone(Cloner cloner) { 44 50 return new BinPacking2D(this, cloner); 45 51 } 52 53 [Storable] 54 protected Dictionary<int, List<int>> OccupationLayers { get; set; } 46 55 47 56 protected override void GenerateNewExtremePointsForNewItem(PackingItem newItem, PackingPosition position) { … … 75 84 } 76 85 77 public overridePackingPosition FindExtremePointForItem(PackingItem item, bool rotated, bool stackingConstraints) {86 public PackingPosition FindExtremePointForItem(PackingItem item, bool rotated, bool stackingConstraints) { 78 87 PackingItem rotatedItem = new PackingItem( 79 88 rotated ? item.Height : item.Width, … … 91 100 return null; 92 101 } 93 public override PackingPosition FindPositionBySliding(PackingItem item, bool rotated, bool stackingConstraints) { 102 103 public override void PackItem(int itemID, PackingItem item, PackingPosition position) { 104 Items[itemID] = item; 105 Positions[itemID] = position; 106 ExtremePoints.Remove(position); 107 GenerateNewExtremePointsForNewItem(item, position); 108 109 AddNewItemToOccupationLayers(itemID, item, position); 110 } 111 112 public bool PackItemIfFeasible(int itemID, PackingItem item, PackingPosition position, bool stackingConstraints) { 113 if (IsPositionFeasible(item, position, stackingConstraints)) { 114 PackItem(itemID, item, position); 115 return true; 116 } 117 return false; 118 } 119 120 /// <summary> 121 /// 122 /// </summary> 123 /// <param name="item"></param> 124 /// <param name="position"></param> 125 /// <param name="stackingConstraints"></param> 126 /// <returns></returns> 127 public override bool IsPositionFeasible(PackingItem item, PackingPosition position, bool stackingConstraints) { 128 //In this case feasability is defined as following: 129 //1. the item fits into the bin-borders; 130 //2. the point is supported by something; 131 //3. the item does not collide with another already packed item 132 if (!BinShape.Encloses(position, item)) 133 return false; 134 135 foreach (var id in GetLayerItemIDs(item, position)) { 136 if (Items[id].Overlaps(Positions[id], position, item)) 137 return false; 138 } 139 140 return true; 141 } 142 143 144 public PackingPosition FindPositionBySliding(PackingItem item, bool rotated, bool stackingConstraints) { 94 145 PackingPosition currentPosition = new PackingPosition(0, 95 146 BinShape.Width - (rotated ? item.Height : item.Width), … … 109 160 } 110 161 111 public overridevoid SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints) {162 public void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints) { 112 163 var temp = new List<int>(sequence); 113 164 for (int i = 0; i < temp.Count; i++) { … … 120 171 } 121 172 } 122 public overridevoid SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, Dictionary<int, bool> rotationArray, bool stackingConstraints) {173 public void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, Dictionary<int, bool> rotationArray, bool stackingConstraints) { 123 174 var temp = new List<int>(sequence); 124 175 for (int i = 0; i < temp.Count; i++) { … … 131 182 } 132 183 } 133 public overridevoid ExtremePointBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints) {184 public void ExtremePointBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints) { 134 185 var temp = new List<int>(sequence); 135 186 foreach (int itemID in temp) { … … 143 194 } 144 195 145 public overridevoid ExtremePointBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints, Dictionary<int, bool> rotationArray) {196 public void ExtremePointBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints, Dictionary<int, bool> rotationArray) { 146 197 var temp = new List<int>(sequence); 147 198 foreach (int itemID in temp) { … … 155 206 } 156 207 157 public overrideint ShortestPossibleSideFromPoint(PackingPosition position) {208 public int ShortestPossibleSideFromPoint(PackingPosition position) { 158 209 int shortestSide = int.MaxValue; 159 210 int width = BinShape.Width; … … 179 230 throw new NotSupportedException(); 180 231 } 181 protected overridevoid InitializeOccupationLayers() {232 protected void InitializeOccupationLayers() { 182 233 for (int i = 0; i * 10 <= BinShape.Width; i += 1) { 183 234 OccupationLayers[i] = new List<int>(); … … 185 236 } 186 237 187 protected overridevoid AddNewItemToOccupationLayers(int itemID, PackingItem item, PackingPosition position) {238 protected void AddNewItemToOccupationLayers(int itemID, PackingItem item, PackingPosition position) { 188 239 int x1 = position.X / 10; 189 240 int x2 = (position.X + (position.Rotated ? item.Height : item.Width)) / 10; … … 192 243 OccupationLayers[i].Add(itemID); 193 244 } 194 protected overrideList<int> GetLayerItemIDs(PackingPosition position) {245 protected List<int> GetLayerItemIDs(PackingPosition position) { 195 246 return OccupationLayers[position.X / 10]; 196 247 } 197 protected overrideList<int> GetLayerItemIDs(PackingItem item, PackingPosition position) {248 protected List<int> GetLayerItemIDs(PackingItem item, PackingPosition position) { 198 249 List<int> result = new List<int>(); 199 250 int x1 = position.X / 10; … … 205 256 return result; 206 257 } 258 259 260 public int PointOccupation(PackingPosition position) { 261 foreach (var id in GetLayerItemIDs(position)) { 262 if (Items[id].EnclosesPoint(Positions[id], position)) 263 return id; 264 } 265 return -1; 266 } 267 268 public bool IsPointOccupied(PackingPosition position) { 269 foreach (var id in GetLayerItemIDs(position)) { 270 if (Items[id].EnclosesPoint(Positions[id], position)) 271 return true; 272 } 273 return false; 274 } 207 275 } 208 276 } -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/BinPacking3D.cs
r15471 r15473 41 41 ResidualSpace = new Dictionary<PackingPosition, Tuple<int, int, int>>(); 42 42 AddExtremePoint(binShape.Origin); 43 InitializeOccupationLayers();44 43 } 45 44 [StorableConstructor] … … 64 63 #endregion 65 64 } 66 67 #region New methods for bin packer class68 65 69 66 /// <summary> … … 114 111 AddExtremePoint(ep3); 115 112 } 116 113 117 114 private Tuple<int, int, int> CalculateResidualSpace(Vector3D pos) { 118 115 var itemPos = Items.Select(x => new { Item = x.Value, Position = Positions[x.Key] }); … … 132 129 } 133 130 } 134 135 if (limit.X - pos.X <= 0 || limit.Y - pos.Y <= 0 131 132 if (limit.X - pos.X <= 0 || limit.Y - pos.Y <= 0 || limit.Z - pos.Z <= 0) { 136 133 return Tuple.Create(0, 0, 0); 137 } 134 } 138 135 return Tuple.Create(limit.X - pos.X, limit.Y - pos.Y, limit.Z - pos.Z); 139 136 } … … 363 360 itemsP4.Where(x => x.Item2.SupportsStacking(item)).Any(); 364 361 } 365 366 367 368 #endregion 362 369 363 370 364 /// <summary> … … 501 495 return false; 502 496 } 503 497 504 498 #region Projections 505 499 … … 629 623 #endregion 630 624 631 632 #region Sliding based packing and obsolet methods633 public override PackingPosition FindExtremePointForItem(PackingItem item, bool rotated, bool stackingConstraints) {634 throw new NotSupportedException();635 PackingItem newItem = new PackingItem(636 rotated ? item.Depth : item.Width,637 item.Height,638 rotated ? item.Width : item.Depth,639 item.TargetBin, item.Weight, item.Material);640 641 var ep = ExtremePoints.Where(x => IsPositionFeasible(newItem, x, stackingConstraints))642 .FirstOrDefault();643 if (ep != null) {644 var result = new PackingPosition(ep.AssignedBin, ep.X, ep.Y, ep.Z, rotated);645 return result;646 }647 return null;648 }649 650 651 652 653 public override PackingPosition FindPositionBySliding(PackingItem item, bool rotated, bool stackingConstraints) {654 throw new NotSupportedException();655 }656 657 public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints) {658 throw new NotSupportedException();659 }660 public override void SlidingBasedPacking(ref IList<int> sequence, IList<PackingItem> items, Dictionary<int, bool> rotationArray, bool stackingConstraints) {661 throw new NotSupportedException();662 }663 664 665 public override void ExtremePointBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints) {666 throw new NotSupportedException();667 }668 669 public override void ExtremePointBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints, Dictionary<int, bool> rotationArray) {670 throw new NotSupportedException();671 }672 673 public override int ShortestPossibleSideFromPoint(PackingPosition position) {674 throw new NotSupportedException();675 }676 677 678 protected override void InitializeOccupationLayers() {679 }680 protected override void AddNewItemToOccupationLayers(int itemID, PackingItem item, PackingPosition position) {681 }682 683 684 protected override List<int> GetLayerItemIDs(PackingPosition position) {685 return null;686 }687 protected override List<int> GetLayerItemIDs(PackingItem item, PackingPosition position) {688 return null;689 }690 #endregion691 625 692 626 -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/BinUtilizationEvaluator.cs
r14167 r15473 26 26 using HeuristicLab.Common; 27 27 28 namespace HeuristicLab.Problems.BinPacking3D {28 namespace HeuristicLab.Problems.BinPacking3D.Evaluators { 29 29 // NOTE: same implementation as for 2d problem 30 30 [Item("Bin-Utilization Evaluator (3d)", "Calculates the overall utilization of bin space.")] … … 43 43 44 44 #region IEvaluator Members 45 46 /// <summary> 47 /// Calculates the bin utilization in percent. 48 /// </summary> 49 /// <param name="solution"></param> 50 /// <returns>Returns the calculated bin utilization of all bins in percent.</returns> 45 51 public double Evaluate(Solution solution) { 46 52 return CalculateBinUtilization(solution); -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/PackingRatioEvaluator.cs
r15462 r15473 26 26 using HeuristicLab.Common; 27 27 28 namespace HeuristicLab.Problems.BinPacking3D {28 namespace HeuristicLab.Problems.BinPacking3D.Evaluators { 29 29 // NOTE: same implementation as for 2d problem 30 30 [Item("Packing-Ratio Evaluator (3d)", "Calculates the ratio between packed and unpacked space.")] … … 43 43 44 44 #region IEvaluator Members 45 46 /// <summary> 47 /// Calculates the packing ratio for the solution. 48 /// The packing ration is calculated as followed: 49 /// Falkenauer:1996 - A Hybrid Grouping Genetic Algorithm for Bin Packing 50 /// fBPP = (SUM[i=1..N](Fi / C)^k)/N 51 /// N.......the number of bins used in the solution, 52 /// Fi......the sum of sizes of the items in the bin i (the fill of the bin), 53 /// C.......the bin capacity and 54 /// k.......a constant, k>1. 55 /// </summary> 56 /// <param name="solution"></param> 57 /// <returns>Returns the calculated packing ratio of the bins in the given solution.</returns> 45 58 public double Evaluate(Solution solution) { 46 59 return CalculatePackingRatio(solution); -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/BPPData.cs
r14162 r15473 22 22 23 23 24 namespace HeuristicLab.Problems.BinPacking3D {24 namespace HeuristicLab.Problems.BinPacking3D.Instances { 25 25 26 /// <summary> 27 /// Represents an instance which contains bin packing problem data. 28 /// </summary> 26 29 public class BPPData { 27 30 /// <summary> … … 29 32 /// </summary> 30 33 public string Name { get; set; } 34 31 35 /// <summary> 32 36 /// Optional! The description of the instance … … 38 42 /// </summary> 39 43 public int NumItems { get { return Items == null ? 0 : Items.Length; } } 44 45 /// <summary> 46 /// Assigned packing shape 47 /// </summary> 40 48 public PackingShape BinShape { get; set; } 49 50 /// <summary> 51 /// Array with assigned packing items 52 /// </summary> 41 53 public PackingItem[] Items { get; set; } 54 42 55 /// <summary> 43 56 /// Optional! The quality of the best-known solution. -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RandomInstanceProvider.cs
r15454 r15473 164 164 } 165 165 166 166 /// <summary> 167 /// Loads the data from the given data descriptor. 168 /// It retuns a bin packing problem data instance with the data of the random instance provider. 169 /// </summary> 170 /// <param name="dd"></param> 171 /// <returns></returns> 167 172 public override BPPData LoadData(IDataDescriptor dd) { 168 173 var randDd = dd as RandomDataDescriptor; -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RealWorldContainerPackingInstanceProvider.cs
r15471 r15473 28 28 using System.Text.RegularExpressions; 29 29 using HeuristicLab.Problems.Instances; 30 using HeuristicLab.Problems.BinPacking3D.Instances; 30 31 31 32 namespace HeuristicLab.Problems.BinPacking3D { -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPacker.cs
r15471 r15473 54 54 /// <param name="packingItem"></param> 55 55 /// <param name="position"></param> 56 protected v oid PackItem(refBinPacking3D packingBin, int itemId, PackingItem packingItem, PackingPosition position, bool useStackingConstraints) {56 protected virtual void PackItem(BinPacking3D packingBin, int itemId, PackingItem packingItem, PackingPosition position, bool useStackingConstraints) { 57 57 58 58 packingBin.PackItem(itemId, packingItem, position); -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFirstFit.cs
r15471 r15473 67 67 // if a valid packing position could be found, the current item can be added to the given bin 68 68 if (position != null) { 69 PackItem( refpackingBin, itemId, items[itemId], position, useStackingConstraints);69 PackItem(packingBin, itemId, items[itemId], position, useStackingConstraints); 70 70 remainingIds.Remove(itemId); 71 71 } -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFreeVolumeBestFit.cs
r15471 r15473 64 64 var bin = packingBin; 65 65 if (positionFound) { 66 PackItem( refbin, remainingId, item, position, useStackingConstraints);66 PackItem(bin, remainingId, item, position, useStackingConstraints); 67 67 break; 68 68 } … … 77 77 } 78 78 79 PackItem( refpackingBin, remainingId, item, position, useStackingConstraints);79 PackItem(packingBin, remainingId, item, position, useStackingConstraints); 80 80 packingList.Add(packingBin); 81 81 } -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerResidualSpaceBestFit.cs
r15471 r15473 56 56 if (point.Item1.IsPositionFeasible(item, point.Item2, useStackingConstraints)) { 57 57 var binPacking = point.Item1; 58 PackItem( refbinPacking, remainingId, item, point.Item2, useStackingConstraints);58 PackItem(binPacking, remainingId, item, point.Item2, useStackingConstraints); 59 59 packed = true; 60 60 break; … … 66 66 var position = FindPackingPositionForItem(binPacking, item, useStackingConstraints, rotated); 67 67 if (position != null) { 68 PackItem( refbinPacking, remainingId, item, position, useStackingConstraints);68 PackItem(binPacking, remainingId, item, position, useStackingConstraints); 69 69 } else { 70 70 throw new InvalidOperationException("Item " + remainingId + " cannot be packed in an empty bin."); -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/ProblemBase.cs
r15471 r15473 30 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 31 using HeuristicLab.Problems.Instances; 32 using HeuristicLab.Problems.BinPacking3D.Encoding; 33 using HeuristicLab.Problems.BinPacking3D.Evaluators; 34 using HeuristicLab.Problems.BinPacking3D.Instances; 32 35 33 36 namespace HeuristicLab.Problems.BinPacking3D { -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/BinPacking.cs
r15454 r15473 51 51 public SortedSet<TPos> ExtremePoints { get; protected set; } 52 52 53 [Storable] 54 protected Dictionary<int, List<int>> OccupationLayers { get; set; } 55 56 #endregion Properties 53 public double PackingDensity { 54 get { 55 double result = 0; 56 foreach (var entry in Items) 57 result += entry.Value.Volume; 58 result /= BinShape.Volume; 59 return result; 60 } 61 } 57 62 58 63 public int FreeVolume { 59 64 get { return BinShape.Volume - Items.Sum(x => x.Value.Volume); } 60 65 } 61 66 #endregion Properties 67 62 68 protected BinPacking(TBin binShape) 63 69 : base() { … … 66 72 BinShape = (TBin)binShape.Clone(); 67 73 ExtremePoints = new SortedSet<TPos>(); 68 OccupationLayers = new Dictionary<int, List<int>>();69 74 } 70 75 71 76 [StorableConstructor] 72 77 protected BinPacking(bool deserializing) : base(deserializing) { } 78 73 79 protected BinPacking(BinPacking<TPos, TBin, TItem> original, Cloner cloner) 74 80 : base(original, cloner) { … … 83 89 this.BinShape = (TBin)original.BinShape.Clone(cloner); 84 90 this.ExtremePoints = new SortedSet<TPos>(original.ExtremePoints.Select(p => cloner.Clone(p))); 85 this.OccupationLayers = new Dictionary<int, List<int>>();86 foreach (var kvp in original.OccupationLayers) {87 OccupationLayers.Add(kvp.Key, new List<int>(kvp.Value));88 }89 91 } 90 92 93 /// <summary> 94 /// Generate new extreme points for a given item 95 /// </summary> 96 /// <param name="item"></param> 97 /// <param name="position"></param> 91 98 protected abstract void GenerateNewExtremePointsForNewItem(TItem item, TPos position); 92 93 public abstract TPos FindExtremePointForItem(TItem item, bool rotated, bool stackingConstraints); 94 public abstract TPos FindPositionBySliding(TItem item, bool rotated, bool stackingConstraints); 95 96 public abstract void SlidingBasedPacking(ref IList<int> sequence, IList<TItem> items, bool stackingConstraints); 97 public abstract void SlidingBasedPacking(ref IList<int> sequence, IList<TItem> items, Dictionary<int, bool> rotationArray, bool stackingConstraints); 98 public abstract void ExtremePointBasedPacking(ref IList<int> sequence, IList<TItem> items, bool stackingConstraints); 99 public abstract void ExtremePointBasedPacking(ref IList<int> sequence, IList<TItem> items, bool stackingConstraints, Dictionary<int, bool> rotationArray); 100 101 public virtual void PackItem(int itemID, TItem item, TPos position) { 102 Items[itemID] = item; 103 Positions[itemID] = position; 104 ExtremePoints.Remove(position); 105 GenerateNewExtremePointsForNewItem(item, position); 106 107 AddNewItemToOccupationLayers(itemID, item, position); 108 } 109 public virtual bool PackItemIfFeasible(int itemID, TItem item, TPos position, bool stackingConstraints) { 110 if (IsPositionFeasible(item, position, stackingConstraints)) { 111 PackItem(itemID, item, position); 112 return true; 113 } 114 return false; 115 } 116 117 public double PackingDensity { 118 get { 119 double result = 0; 120 foreach (var entry in Items) 121 result += entry.Value.Volume; 122 result /= BinShape.Volume; 123 return result; 124 } 125 } 126 127 128 public int PointOccupation(TPos position) { 129 foreach (var id in GetLayerItemIDs(position)) { 130 if (Items[id].EnclosesPoint(Positions[id], position)) 131 return id; 132 } 133 return -1; 134 } 135 136 public bool IsPointOccupied(TPos position) { 137 foreach (var id in GetLayerItemIDs(position)) { 138 if (Items[id].EnclosesPoint(Positions[id], position)) 139 return true; 140 } 141 return false; 142 } 143 99 144 100 /// <summary> 145 /// 101 /// Packs an item into the bin packing 102 /// </summary> 103 /// <param name="itemID"></param> 104 /// <param name="item"></param> 105 /// <param name="position"></param> 106 public abstract void PackItem(int itemID, TItem item, TPos position); 107 108 /// <summary> 109 /// Checks if the given position is feasible for the given item 146 110 /// </summary> 147 111 /// <param name="item"></param> 148 112 /// <param name="position"></param> 149 113 /// <param name="stackingConstraints"></param> 150 /// <returns></returns> 151 public virtual bool IsPositionFeasible(TItem item, TPos position, bool stackingConstraints) { 152 //In this case feasability is defined as following: 153 //1. the item fits into the bin-borders; 154 //2. the point is supported by something; 155 //3. the item does not collide with another already packed item 156 if (!BinShape.Encloses(position, item)) 157 return false; 114 /// <returns>Returns true if the given position is feasible for the given item</returns> 115 public abstract bool IsPositionFeasible(TItem item, TPos position, bool stackingConstraints); 158 116 159 foreach (var id in GetLayerItemIDs(item, position)) {160 if (Items[id].Overlaps(Positions[id], position, item))161 return false;162 }163 164 return true;165 }117 /// <summary> 118 /// Checks if the given item is static stable on the given position 119 /// </summary> 120 /// <param name="measures">Item</param> 121 /// <param name="position">Position of the item</param> 122 /// <returns>Returns true if the given item is static stable on the given position</returns> 123 public abstract bool IsStaticStable(TItem measures, TPos position); 166 124 167 public abstract int ShortestPossibleSideFromPoint(TPos position); 168 public abstract bool IsStaticStable(TItem measures, TPos position); 169 170 protected abstract void InitializeOccupationLayers(); 171 protected abstract void AddNewItemToOccupationLayers(int itemID, TItem item, TPos position); 172 protected abstract List<int> GetLayerItemIDs(TPos position); 173 protected abstract List<int> GetLayerItemIDs(TItem item, TPos position); 125 174 126 } 175 127 } -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj
r15462 r15473 107 107 <Compile Include="3D\Packer\BinPackerFirstFit.cs" /> 108 108 <Compile Include="3D\BinPacking3D.cs" /> 109 <Compile Include="3D\ Decoder\ExtremePointPermutationDecoder.cs" />109 <Compile Include="3D\Encoding\ExtremePointPermutationDecoder.cs" /> 110 110 <Compile Include="3D\Evaluators\BinUtilizationEvaluator.cs" /> 111 111 <Compile Include="3D\Evaluators\PackingRatioEvaluator.cs" /> … … 120 120 <Compile Include="3D\Instances\RandomDataDescriptor.cs" /> 121 121 <Compile Include="3D\Instances\RealWorldContainerPackingInstanceProvider.cs" /> 122 <Compile Include="3D\IntegerVectorEncoding\ThreeDInstanceParser.cs" /> 123 <Compile Include="3D\IntegerVectorEncoding\BottomLeftIntegerVectorDecoder.cs" /> 124 <Compile Include="3D\IntegerVectorEncoding\ExtremePointIntegerVectorDecoder.cs" /> 125 <Compile Include="3D\IntegerVectorEncoding\IntegerVectorDecoderBase.cs" /> 126 <Compile Include="3D\IntegerVectorEncoding\IntegerVectorProblem.cs" /> 127 <Compile Include="3D\Interfaces\IDecoder.cs" /> 128 <Compile Include="3D\Interfaces\IEvaluator.cs" /> 129 <Compile Include="3D\Interfaces\IOperator.cs" /> 130 <Compile Include="3D\MoveEvaluatorBase.cs" /> 122 <Compile Include="3D\Instances\ThreeDInstanceParser.cs" /> 123 <Compile Include="3D\Encoding\IDecoder.cs" /> 124 <Compile Include="3D\Evaluators\IEvaluator.cs" /> 125 <Compile Include="3D\IOperator.cs" /> 126 <Compile Include="3D\Evaluators\MoveEvaluatorBase.cs" /> 131 127 <Compile Include="3D\PackingItem.cs" /> 132 128 <Compile Include="3D\PackingPosition.cs" /> 133 129 <Compile Include="3D\PackingShape.cs" /> 134 <Compile Include="3D\ PermutationEncoding\PermutationProblem.cs" />135 <Compile Include="3D\ PermutationEncoding\Swap2MoveEvaluator.cs" />136 <Compile Include="3D\ PermutationEncoding\TranslocationMoveEvaluator.cs" />130 <Compile Include="3D\Encoding\PermutationProblem.cs" /> 131 <Compile Include="3D\Evaluators\Swap2MoveEvaluator.cs" /> 132 <Compile Include="3D\Evaluators\TranslocationMoveEvaluator.cs" /> 137 133 <Compile Include="3D\ProblemBase.cs" /> 138 134 <Compile Include="3D\Solution.cs" /> 139 <Compile Include="3D\Sorting\P ackingItemSorter.cs" />140 <Compile Include=" Algorithms\3D\ExtremePointAlgorithm.cs" />135 <Compile Include="3D\Sorting\PermutationPackingItemSorter.cs" /> 136 <Compile Include="3D\Algorithms\ExtremePointAlgorithm.cs" /> 141 137 <Compile Include="BinPacking.cs" /> 142 138 <Compile Include="Interfaces\IPackingItem.cs"> … … 162 158 <None Include="Plugin.cs.frame" /> 163 159 </ItemGroup> 164 <ItemGroup> 165 <Folder Include="3D\Algorithms\" /> 166 </ItemGroup> 160 <ItemGroup /> 167 161 <ItemGroup> 168 162 <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj"> -
branches/2817-BinPackingSpeedup/HeuristicLab.Tests/HeuristicLab.Problems.Bin-Packing-3.3/3D/PermutationSortingTest.cs
r15463 r15473 145 145 public void TestSortByMaterialClusteredAreaHeightExtension() { 146 146 Permutation actual = _items.SortByMaterialClusteredAreaHeight(_packingShape, 1.0); 147 Permutation expected = new Permutation(PermutationTypes.Absolute, new int[] { 0, 2, 5, 7, 8, 10, 13, 9, 11, 12, 14, 1, 3, 4, 6});147 Permutation expected = new Permutation(PermutationTypes.Absolute, new int[] { 8, 13, 3, 2, 7, 12, 11, 1, 6, 0, 5, 10, 9, 14, 4 }); 148 148 for (int i = 0; i < expected.Length; i++) { 149 149 Assert.AreEqual(expected[i], actual[i]); -
branches/2817-BinPackingSpeedup/HeuristicLab.Tests/HeuristicLab.Problems.Bin-Packing-3.3/3D/RandomInstanceProviderTest.cs
r15471 r15473 44 44 private IDictionary<string, List<Dimension>> ReadReferenceItemLists() { 45 45 var itemList = new Dictionary<string, List<Dimension>>(); 46 string path = @".\..\HeuristicLab.Tests\HeuristicLab.Problems.Bin-Packing-3.3\ ReferenceInstances";46 string path = @".\..\HeuristicLab.Tests\HeuristicLab.Problems.Bin-Packing-3.3\TestInstances\ReferenceInstances"; 47 47 48 48 string[] files = Directory.GetFiles(path); -
branches/2817-BinPackingSpeedup/HeuristicLab.Tests/HeuristicLab.Tests.csproj
r15471 r15473 586 586 <Compile Include="HeuristicLab.Problems.Bin-Packing-3.3\3D\PermutationSortingTest.cs" /> 587 587 <Compile Include="HeuristicLab.Problems.Bin-Packing-3.3\3D\ExtremePointAlgorithmTest.cs" /> 588 <Compile Include="HeuristicLab.Problems.Bin-Packing-3.3\3D\ThreeDInstanceParserTest.cs" /> 588 589 <Compile Include="HeuristicLab.Problems.Bin-Packing-3.3\Utils\TestUtils.cs" /> 589 590 <Compile Include="HeuristicLab.Problems.DataAnalysis-3.4\ThresholdCalculatorsTest.cs" />
Note: See TracChangeset
for help on using the changeset viewer.