Changeset 15652 for branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding
- Timestamp:
- 01/24/18 17:15:15 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Encoding/ExtremePointPermutationDecoder.cs
r15617 r15652 102 102 var pruningMethod = ExtremePointPruningMethod.None; 103 103 Solution solution = new Solution(binShape, useExtremePoints: true, stackingConstraints: useStackingConstraints); 104 foreach (var packedBin in binPacker.PackItems(permutation, binShape, items, ExtremePointCreationMethod, pruningMethod, useStackingConstraints)) { 104 105 IList<BinPacking3D> packingList = binPacker.PackItems(permutation, binShape, items, ExtremePointCreationMethod, pruningMethod, useStackingConstraints); 106 foreach (var packedBin in packingList) { 105 107 solution.Bins.Add(packedBin); 106 108 } 107 109 return solution; 108 110 } 111 112 Permutation AddOffset(Permutation p, int offset) { 113 var s = p.ToArray(); 114 for (int i = 0; i < s.Length; i++) { 115 s[i] += offset; 116 } 117 118 return new Permutation(PermutationTypes.Absolute, s); 119 } 109 120 } 110 121 }
Note: See TracChangeset
for help on using the changeset viewer.