Although the 2D-DFA is able to solve some instances of 2D-KP from the literature, the algorithm’s worst-case exponential run time results in extremely long run times as soon
as the number of different types of items, or the number of items of each type available, gets larger. In this case, as previously discussed, we need to use a heuristic or to add additional restrictions in order to obtain a good solution in a timely fashion.
Wang [1983] adopts the second alternative, adding the restriction that the patterns are of guillotine type. Her algorithm minimizes the trim loss, or the amount of wasted area, in constrained 2D-KP instances, constructing larger rectangles by consecutively joining items. Daza et al [1995] use “informed methods” to improve Wang’s algorithm, and compare their algorithm with two others from the literature – Wang’s [1983] and Oliveira and Ferreira [1990] - using eight 2D-KP instances, P-1 to P-8, described in the paper. We apply the 2D-DFA to the same instances. Table VI.3 presents the results, and run times, from Daza et al [1995] and obtained by 2D-DFA.
Daza et al [1995] 2D-DFA Instance
Trim Loss Run Time (Sec) Trim Loss Run Time (Sec)
P-1 0 9.33 0 0.00 P-2 29 48.94 22 115.07 P-3 43 109.74 43 1,033.14 P-4 31 38.01 31 1,342.05 P-5 0 1.32 0 0.00 P-6 0 8.12 0 0.11 P-7 8 13.34 5 33.23 P-8 34 21.53 34 274.53
Table VI.3 Trim loss and run times presented in Daza et al [1995] and obtained by 2D- DFA for eight instances of 2D-KP.
The 2D-DFA is executed on an Athlon 1 GHz personal computer.
Because the 2D-DFA considers patterns other than those generated by guillotine cuts, it is able to find solutions to two instances with less waste than the algorithm proposed by Daza et al [1995], but at the expense of a considerable increase in run time.
We investigate an alternate approach: the Limited Iteration 2D-DFA (2D-LDFA)
limits the number of backtracks in the verification stage of the algorithm. If the feasibility of a packing list is unknown when this limit is reached, then it is considered as infeasible. We have no way to specify this limit a priori, with the number of items in the list and the size of the bin being important in the selection. If this limit is set too small, solutions might
Table VI.4 has the results of the application of two different levels: 1,000 and 10,000 backtracks allowed. With the former level, the optimal solution is obtained in 5 out of 8 cases, taking on average 11.79 seconds to solve each instance. With the latter level, all instances are solved to optimality, taking on average 37.01 seconds.
2D-LDFA – 1,000 Backtracks 2D-LDFA – 10,000 backtracks Instance
Wasted Area Run Time
(Sec) Wasted Area
Run Time (Sec) P-1 0 0.00 0 0.00 P-2 24 31.58 22 99.20 P-3 87 15.49 43 90.41 P-4 31 16.15 31 86.01 P-5 0 0.00 0 0.00 P-6 0 3.62 0 0.11 P-7 5 6.87 5 27.96 P-8 70 20.60 34 65.69
Table VI.4 Wasted areas and run times observed using the 2D-LDFA, with limits on 1,000 and 10,000 backtracks on the verification stage of the algorithm.
C. EXTENDING DFA TO SOLVE 3D-KP
A natural step to follow is to extend the DFA algorithm to solve three-dimensional problems. In this section, we implement an algorithm for 3D-KP, verify its performance with some test instances, and propose a simple heuristic based on limiting the number of iterations in the verification stage of the algorithm.
1. Implementing the Three-Dimensional Diagonal Fill Algorithm
The transformation of the DFA to work with three-dimensional problems is straightforward. No changes are required in the first stage of the algorithm, because it only selects items to be loaded in the bin. This stage is essentially independent of the dimensionality of the problem. The second stage requires the addition of a third dimension, the height, in the grid representing the positions in the bin where items may be positioned in a normal packing pattern, and new labels to represent all six possible orientations of items inside the bin. We call this algorithm the Three-Dimensional Diagonal Fill Algorithm – 3D-DFA.
2. Computational Results
The 3D-DFA is applied to the same instance presented by Chen et al [1995], and it computes an optimal solution in less than a millisecond. Then, we generate a set of 10 random instances, with the following characteristics:
• All bins have dimensions 30 20 15× × .
• Items dimensions are selected, independently, in the range [5, 15], with uniform probability.
• Item values are integral values based on the volume of the corresponding item type, and are selected, also with uniform probability, in the range
[
0.05∗ItemVolume,0.15∗ItemVolume]
.• The number of items available from each type are selected in {1, 2, 3}.
• Items are generated and included in an instance until the sum of item volumes is larger than a number generated between 7,200 and 10,800, or between 80% and 120% of the volume of the bin.
Table VI.6 contains general information of the instances M-1 to M-10, generated
above. The information, presented in column order, is: instance, number of different types of item, number of items, total volume of items, total value of the items and an upper- bound on the value of the optimal packing, obtained by modeling the problem as a 1D-KP instance, using the volumes and values.
Instance # Item Types # Items Total Volume of Items Total Value of Items Upper- Bound on Optimal Value M-1 6 15 13,411 1,281 941 M-2 8 17 10,840 1,116 990 M-3 2 6 8,352 1,221 1,221 M-4 4 10 10,074 1,060 909 M-5 6 13 10,120 1,022 905 M-6 7 16 12,065 1,107 917 M-7 6 10 9,889 824 752 M-8 2 5 12,468 847 579 M-9 5 10 11,511 1,158 971 M-10 6 14 12,567 958 767 Averages 5.2 11.6 11,129.7 1,169.4 895.2
Table VI.5 Descriptive information of the random instances used to investigate the performance of the 3D-DFA.
The information, presented in column order, is: instance, number of different types of item, number of items, total volume of items, total value of the items and an upper-bound on the value of the optimal packing, obtained using the volumes and values in as an 1D-KP instance
Table VI.6 presents the results, and run times, observed when applying the 3D-DFA on the 10 random instances, M-1 to M-10, oriented and orthogonal versions.
Oriented Orthogonal
Instance Value Run Time
(Sec) Value Run (Sec) Time
M-1 663 3.25 869 741.28 M-2 843 44.71 939 3,222.39 M-3 814 0.00 946 0.00 M-4 666 0.10 892 3.35 M-5 796 0.82 905 69.20 M-6 677 5.44 789 1,941.40 M-7 616 0.00 720 6.21 M-8 386 0.00 386 0.00 M-9 756 0.00 883 5.05 M-10 590 0.27 712 77.28
Table VI.6 Optimal values and run times, in seconds, obtained with the 3D-DFA, oriented and orthogonal versions, on 10 random instances.
The optimal values obtained in the oriented version are, on average, 14.5% smaller than those generated with the orthogonal version. In one case, the fixed orientation
restriction accounts for a 25.3% decrease in optimal solution value. But, as expected, larger problems require much longer periods of time before an optimal solution is obtained. As in the two-dimensional version, the use of a heuristic may be the only approach to generate “good” solutions in a timely fashion.