A Modified Partially Mapped MultiCrossover Genetic Algorithm for Two-Dimensional Bin Packing Problem

: Problem statement: Non-oriented case of Two-Dimensional Rectangular Bin Packing Problem (2DRBPP) was studied in this study. The objective of this problem was to pack a given set of small rectangles, which may be rotated by 90°, without overlaps into a minimum numbers of identical large rectangles. Our aim was to improve the performance of the MultiCrossover Genetic Algorithm (MXGA) proposed from the literature for solving the problem. Approach: Four major components of the MXGA consisted of selection, crossover, mutation and replacement are considered in this study. Initial computational investigations were conducted independently on the named components using some benchmark problem instances. The new MXGA was constructed by combining the rank selection, modified Partially Mapped Crossover (PMXm), mutation with two mutation operators and elitism replacement scheme with filtration. Results: Extensive computational experiments of the new proposed algorithm, MXGA, Standard GA (SGA), Unified Tabu Search (UTS) and Randomized Descent Method (RDM) were performed using benchmark data sets. Conclusion: The computational results indicated that the new proposed algorithm was able to outperform MXGA, SGA, UTS and RDM.


INTRODUCTION
Bin packing problem is a branch of cutting and packing problems which has many applications in wood and metal industries. Non-oriented case of Two-Dimensional Rectangular Single Bin Size Bin Packing Problem (2DRSBSBPP) based on classification of Wascher et al. (2007) is studied in this study. Without loss of generality, the problem will be referred as Two-Dimensional Rectangular Bin Packing Problem (2DRBPP) henceforth. Lodi et al. (1999) defined the problem as follows: "Given are a set of n rectangles, which may be rotated by 90°. Each rectangle is defined by a height h j and a width w j , for j = 1, 2,...,n and an unlimited number of identical rectangular bins, each having height H and width W. The objective of this problem is to pack all the rectangles without overlaps, into the minimum number of bins" The aims of this study is to improve the MultiCrossover Genetic Algorithm (MXGA) proposed by Lee (2008) for solving 2DRBPP and compare the effectiveness of the new proposed algorithm with MXGA, SGA and UTS and RDM. The multICrossover operator in the MXGA is able to repeat a standard 2point crossover operator on the selected parents for t times in order to generate a list of temporary offspring with size of 2t. Then the fittest and a selected temporary offspring using the probabilistic binary tournament selection mechanism is chosen to be the offspring of the current generation. Swap operator is used instead of the reproduction strategy in MXGA when the multiCrossover operator is not applied to the selected parents. A random swap point is selected in a parent and the position of the substrings is swapped to form a new offspring. Two mutation operators are applied in the MXGA. First, a subset of individuals is selected from the new offspring population with a given individual mutation probability. Then each gene in the selected offspring will go through the gene mutation operator with the given probability. The replacement strategy used in MXGA is the elitism replacement scheme. In this strategy the fittest individuals are always selected from the combination of parents and offspring population before proceeding to the next generation. Filtration is used to remove the identical individuals and replaced them with randomly generated new individuals.
Our proposed algorithm is constructed by combining the most competitive techniques from each component of MXGA. The competitive techniques are obtained from the initial investigations. The new algorithm is referred as Improved MultiCrossover Genetic Algorithm (MXGAi) henceforth.

Improved MultiCrossover Genetic Algorithm (MXGAi):
Representation: Bin permutation proposed by Lee (2008) is applied as the gene representation in the MXGAi. The length of the individual is equal to the number of rectangles. Each gene is represented by a uniform random permutation of the integer numbers of bins in the interval [1,LB], where LB is the lower bound proposed by Dell'Amico et al. (2002). After generating the initial population, the Lowest Gap Filled (LGF) developed by Lee (2008) is applied as a heuristic placement routine in the decoding stage of MXGAi. This placement routine provides a dynamic selection of the best fitting rectangle which can fill the existing gap in the partial layout. During the packing stage, any rectangle that cannot be feasibly packed in the bin will be kept as an unassigned rectangle in a list, which will be packed later using repack strategy. The repack strategy will try to pack any unassigned rectangles from the list into the used bin by unpacking the selected bin and repacking it after adding a rectangular from the unassigned rectangle list.
Selection mechanism: Rank selection scheme proposed by Baker (1985) is used as the selection mechanism in MXGAi. The initial investigations indicate that this selection strategy produced a better solution quality in comparison with other selection mechanisms namely: probabilistic binary tournament (Goldberg and Lingle, 1985), stochastic universal sampling (Baker, 1987) and sexual selection (Goh et al., 2003).
Crossover operator: Since maximizing the bin utilization of each bin is one of the objective for 2DRBPP, a specific crossover operator is proposed in this study to help the offspring to inherit the maximum bin utilization from their parents. The idea behind this crossover operator is derived from the Partially Mapped Crossover (PMX) (Goldberg and Lingle, 1985) and we will refer this crossover as modified Partially Mapped Crossover (PMXm). Similar to MXGA, the crossover operator is applied for t times in MXGAi. This crossover operator is applied as follows: Step 1: Sort the bins in Parent 1 and Parent 2 (P1 and P2) in a non-increasing order of their bin utilization. Step2: Group the rectangles with the same bin number in both P1 and P2.
Step 3: Let n 1 and n 2 be the number of applied bins in P1 and P2 respectively and N = min{n 1 , n 2 }.
Step 4: Set i←1 and C←0. The variables i(i = 1, 2,…,N) and C are represent the bin number and the number of bins with different bin utilization in P1 and P2 respectively. Let U 1i and U 2i be the bin utilization of the bin number i in P1 and P2 respectively and let c 1i and c 2i be the number of rectangles which are allocated in the bin number i in P1 and P2 respectively.
Step 5: While i≤N, if U 1i = U 2i , set i←i+1. Else Go to Step 6. If (i>N and C = 0) then two offspring are generated by duplicating the parents and the procedure is stopped.
Step 6: (i) If U 1i >U 2i and c 1i = c 2i , the bin number i in the offspring will inherit the corresponding rectangles from P1 and the other bins will inherit the ordering from P2, while the interchange mapping is applied for the rectangles which were allocated in the bin number i of P2. Go to Step 7. (ii) If U 1i >U 2i and c 1i >c 2i , the bin number i in the offspring will inherit the corresponding rectangles from P1 and the other bins will inherit the ordering from P2, while the interchange mapping is applied and the extra rectangle(s) will be removed from the relevant bin(s) of P2 and they will be allocated in the bin number i of offspring. Go to Step 7. (iii) If U 1i >U 2i and c 2i >c 1i , the interchange mapping is applied and the extra rectangles will be removed from bin number i of P2 and they will be allocated in the other bin which is randomly selected from the interval [1,n 2 ]. Note that if the generated random number is equal to i, another random number should be generated. Go to Step 7. (iv) Else if U 1i < U 2i, the process in (i), (ii) or (iii) performs in apposite fashion. Go to Step 7.
Note that generating large number of temporary offspring is very time consuming and in the case that the computational time is fixed, the algorithm will fail to explore the other region of the solution space. On the other hand a small number of temporary offspring may fail to use the advantage of MultiCrossover process. Depending on the variable N and C, parameter t has the ability to change during the procedure but it will not exceed 5.
Since PMXm is an effective but complicated crossover operator and applying this operator in the MultiCrossover process will be time consuming, it can be mixed with other simple crossover operators (e.g., 1point Crossover, 2-point Crossover and Uniform Crossover (UX)). This can be done by generating 2 temporary offspring from applying each crossover operator on the selected parents in order to generate a pool of temporary offspring. We refer to this crossover operator as Mixed Crossover (MX).
It is worth noting that except for the standard UX which can be applied to any type of gene representation, the other crossover operators are only suitable for item permutation, while the matrix crossover is only suitable for matrix representation. Since the gene representation which is defined in the MXGAi is bin permutation we considered some modifications in order to apply the above crossover operators in the MXGAi. Note that in all cases the MultiCrossover operator is applied to the selected parents via a given crossover probability (p c = 0.75).

Mutation operator:
Initial investigations indicate that the proposed mutation operator with two mutation operators by Lee (2008) in MXGA will generate a better solution quality in comparison with the Exchange Mutation (Banzhaf, 1990), Scramble Mutation (Syswerda, 1991) and Displacement Mutation (Michalewiz, 1992). Hence the applied mutation operator for MXGAi is the mutation with two mutation operators.
Replacement strategy: Initial computational results show that elitism replacement scheme produces a better solution quality in comparison with the steady state strategy. Thus the proposed MXGAi applies elitism replacement scheme. The advantage of this scheme is that the fit individuals are never lost unless fitter individuals are generated. During the elitism replacement stage, the combination of parent and offspring population with the size of 2P pop is sorted in a non-increasing order of their related fitness value. Then the first half of the combined population forms the new population for the next generation. After the elitism replacement scheme, the filtration process is applied in the MXGAi to identify the identical individuals from population and replace them by uniform randomly generated new individuals.

Unified Tabu Search (UTS):
The UTS algorithm applied in the computational experiments is introduced by Lodi et al. (1999). According to them, this algorithm has the ability to generate high quality solutions, regardless of the inner heuristic placement routine applied in the search. The main feature of this algorithm is a unified parametric neighborhood which is independent of the specific packing problem to be solved and whose size is dynamically changed during the search.

Randomized Descent Method (RDM):
The RDM used in the computational experiments is developed by Lee (2008). The main characteristics of the RDM are similar to the UTS, while the main differences between RDM and UTS are an acceptance rule which allows the natural moves solution up to R consecutive iterations before terminating the algorithm and the randomization process which selects a random move from the list of identical moves in a single iteration.

RESULTS
The performance of the proposed MXGAi is compared with the MXGA, SGA, UTS and RDM. All the algorithms are coded in ANSI-C using Microsoft Visual C++ 6.0 as the compiler and run on a Pentium 4, 2.0 GHz processor with 1.0 GB memory. Ten different classes of problem instances are considered. The first six classes (I-VI) are proposed by Berkey and Wang (1987) and the next four classes (VII-X) are proposed by Martello and Vigo (1998) (Table 1). In each of the first six classes, all the rectangles are generated in the same interval while in the other four classes a more realistic situation is considered and the rectangles are classified into four types: For each class, we considered five values of n: 20, 40, 60, 80 and 100 where n represents the number of rectangles which are going to be packed into the bins. For each combination of class and value of n, ten problem instances are generated. The performance of the local search algorithms is compared on the basis of the Average Ratio and the Overall Bin Utilization: Where: A j = The total area of all the rectangles in bin j (j = 1, 2, …, UB i ) A = The area of the bin In order to have a fair comparison between MXGAi, MXGA and SGA, all these algorithms will start their implementation with the same initial population and a stopping criteria of 120 CPU seconds is employed for each problem instances in all algorithms. Note that the crossover operator is applied for t (t = 5) and t'(t'≤5) times in both MXGA and MXGAi respectively. The MultiCrossover operator in MXGA has the ability to generate 2t temporary offspring, while in MXGAi the operator generates t' temporary offspring. Unlike MXGA and MXGAi, SGA applies the standard 2-point crossover operator in order to generate exactly two offspring from two selected parents. The reproduction strategy is applied in SGA instead of swap operator. The gene mutation operator in SGA applies for the entire population, while in MXGA and MXGAi only 25% (p M = 0.25) of the individuals have the chance to be mutated. Steady state replacement strategy is employed as the replacement strategy in SGA. The extensive computational results are presented in Table 2. The first pair of columns in Table 2 indicates the class and the value of n. The following pairs of columns give the result of MXGA, MXGAi, SGA and UTS respectively. For each algorithm, entries in the first and second columns of the table report the average ratio (Eq. 1) and the average overall bin utilization (Eq. 2) respectively which are computed for 15 times over all problem instances. The final row of each class gives the overall average over that class for all values of n and the final row of the table gives the overall average over all classes.

DISCUSSION
The computational results of MXGAi and MXGA indicate that combining the PMXm crossover operator with rank selection mechanism in MXGAi can improve the average ratio over all classes about 0.4%. Improvement of 1.5% in the MXGA as compared to SGA, shows that applying the crossover operator for t times in MXGA can improved the solution quality.   Generally, RDM produces the least impressive results and this indicates that the algorithm is not a suitable choice for solving 2DRBPP. According to the computational results, UTS is performing better than RDM. Average computed values, for each class indicates that MXGAi outperformed the other algorithms with only one exception occurs for class IV. In this class UTS performs the best only in term of overall average ratio. The overall results over all the classes in Table 2 indicate that MXGAi is the more preferred choice followed by MXGA, UTS, SGA and RDM for solving 2DRBPP.

CONCLUSION
This study presents a new MXGA for solving 2DRBPP by combining the rank selection, PMXm, mutation with two mutation operators and elitism replacement scheme with filtration. Extensive computational experiments were conducted and the results indicated that the new proposed algorithm is able to outperform the MXGA, SGA, UTS and RDM.