Next Article in Journal
Quantum Features of Atom–Field Systems in the Framework of Deformed Fields
Previous Article in Journal
Homodyne Spectroscopy with Broadband Terahertz Power Detector Based on 90-nm Silicon CMOS Transistor
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Improved Adaptive Genetic Algorithm for Two-Dimensional Rectangular Packing Problem

1
State Key Laboratory of Precision Measuring Technology and Instruments, Tianjin University, Tianjin 300072, China
2
Canterbury School, 101 Aspetuck Ave, New Milford, CT 06776, USA
*
Author to whom correspondence should be addressed.
Appl. Sci. 2021, 11(1), 413; https://doi.org/10.3390/app11010413
Submission received: 24 November 2020 / Revised: 22 December 2020 / Accepted: 28 December 2020 / Published: 4 January 2021

Abstract

:
This paper proposes the hybrid adaptive genetic algorithm (HAGA) as an improved method for solving the NP-hard two-dimensional rectangular packing problem to maximize the filling rate of a rectangular sheet. The packing sequence and rotation state are encoded in a two-stage approach, and the initial population is constructed from random generation by a combination of sorting rules. After using the sort-based method as an improved selection operator for the hybrid adaptive genetic algorithm, the crossover probability and mutation probability are adjusted adaptively according to the joint action of individual fitness from the local perspective and the global perspective of population evolution. The approach not only can obtain differential performance for individuals but also deals with the impact of dynamic changes on population evolution to quickly find a further improved solution. The heuristic placement algorithm decodes the rectangular packing sequence and addresses the two-dimensional rectangular packing problem through continuous iterative optimization. The computational results of a wide range of benchmark instances from zero-waste to non-zero-waste problems show that the HAGA outperforms those of two adaptive genetic algorithms from the related literature. Compared with some recent algorithms, this algorithm, which can be increased by up to 1.6604% for the average filling rate, has great significance for improving the quality of work in fields such as packing and cutting.

1. Introduction

The two-dimensional rectangular packing (2DRP) problem is often involved in the manufacturing process of furniture, glass, metal, paper products, VLSI chip design, newspapers paging, and so on [1,2]. Consequently, optimized algorithms designed to improve the quality and efficiency of packing (therefore reducing the cost of the enterprises) are the subject of many researchers’ explorations in recent years. The 2DRP problem can be described simply as this: rectangles of different sizes are put into a large two-dimensional rectangular container (which we call the sheet) in a certain way to maximize the filling rate of the sheet. The 2DRP is a representative NP-hard problem [3] with complex constraints, which means that there is no exact method to solve the problem in polynomial time. Thus, most researchers have devoted their efforts to fast approximate heuristics and meta-heuristics to obtain practical solutions with higher qualities.
In recent decades, in order to solve the optimal or nearly optimal packing scheme of the 2DRP problem in a compromise time and space, scholars have explored and studied many methods for solving the problem. Two types of representative approaches have been used to address the 2DRP problem: the first solves the problem directly by using different heuristics; the second uses meta-heuristic algorithms, such as Simulated Annealing (SA) [4], Genetic Algorithm (GA) [5], Particle Swarm Optimization (PSO) [6], Ant Colony Optimization (ACO) [7], etc., combined with heuristic placement strategy. Recently, other introduced algorithms include whale optimization algorithm [8], dragonfly algorithm [9], naked mole-rat algorithm [10], moth flame optimization [11], etc.
The component in the first approach is the layout representation for packing sequence. The bottom-left (BL) algorithm [12] proposed by Baker et al. is the earliest heuristic. The main idea is to start from the top right corner of the container, making each item continuously slide as far as possible downwards and then as far as possible to the left until the item is placed in a stable position. Some BL algorithms have improved heuristic variants such as bottom-left-fill (BLF) [13], deepest bottom-left-fill (DBLF) [14], improved bottom-left (IBL) [15], and bottom-left decreasing (BLD) [16]. The lowest horizontal line algorithm (LHLA) [17] proposed by Jia et al. queries the horizontal line with the lowest height when laying out the rectangle and places the rectangle on it. However, taking account of the lack of iterative optimization, in general, the packing quality of the heuristic approach is poor.
In order to improve the packing quality, the key part of the second method is how to use meta-heuristics combined with a layout representation approach to optimize the packing sequence. Hopper et al. conducted empirical research, combining SA and GA with BL and BLF approaches [18]. The best fit algorithm (BF) [19] proposed by Burke et al. describes the sheet as a set of dynamic slots, places items on the lowest available slot at each iteration step, and then combines them together. Later, Burke’s team also proposed a simulated annealing enhancement to the BF algorithm [20]. He et al. suggested an efficient deterministic heuristic [21] using the action space. Wei et al. investigated an adaptive selection approach [22] without any control parameter to address the 2D rectangle packing area minimization problem. Recently, Xia et al. proposed an adaptive genetic simulated annealing algorithm [23] applied to the problem of packing optimization of rectangles.
In view of the premature problem of Simple Genetic Algorithm (SGA) in practical applications, it is easy to fall into local optimal solution prematurely as well as poor local search ability [24]. Srinivas et al. [25] proposed an Adaptive Genetic Algorithm (AGA) that dynamically adjusts the crossover probability and mutation probability according to the fitness of the individual. However, if the fitness of the individual is close to or equal to the maximum fitness of the population, the crossover probability and mutation probability will be close or equal to zero, making the evolution of genetic algorithm stagnant. Ren proposed an improved AGA [26] for this problem. However, when the average fitness is close to the maximum fitness of the contemporary population, it is easy to cause a large number of individuals to have a lower crossover probability and mutation probability, which will stagnate the evolution. This improved AGA has also been applied to many fields such as the three-dimensional container loading problem [27] and the laminate stacking sequence optimization [28]. In addition, the algorithm proposed by Ren is only in view of individual fitness. This algorithm adaptively changes the crossover probability and mutation probability from the local perspective, but the dynamic adjustment of crossover and mutation are not considered whether they have a positive impact on the population evolution process from the overall perspective of population evolution. According to the evolution of later generations, the AGA [29] proposed by Jiang recorded the number of algebras in which the fitness of the optimal individual of the population did not change and dynamically adjusted the crossover and mutation probabilities. However, the algorithm has two shortcomings: (1) the incremental value and decrement value of crossover probability and mutation probability are greatly affected by fitness, and if the value range of the fitness function is not between 0 and 1, the adaptive algorithm will no longer be applicable; (2) although the crossover probability and mutation probability of each generation are dynamically adjusted, the crossover probability and mutation probability of all individuals in a certain generation are the same, and the performance is consistent for individuals with different fitness.
In this paper, in order to overcome the shortcomings of the two kinds of adaptive genetic algorithms, an improved method called hybrid adaptive genetic algorithm (HAGA) is proposed to supplement Ren and Jiang’s algorithms. It is the key for HAGA to work through the joint action of individual fitness from local perspective and the global perspective of population evolution. The presented algorithm not only can obtain differential performance for individuals but also deals with the impact of dynamic changes on population evolution to quickly find a further improved solution. First of all, through the research and analysis of the 2DRP, a two-dimensional packing model is established to maximize the filling rate with relevant constraints. Then, the initial population is constructed by two-stage encoding, and the heuristic lowest horizontal line algorithm is used in the process of placement to decode the packing solution and calculate the individual fitness. After the termination rules of the design are satisfied in the iterative optimization process of HAGA, the packing scheme with the largest filling rate is selected in the feasible solutions. To verify the performance of the proposed algorithm, zero-waste and non-zero-waste instances are tested. The computational results show that the proposed HAGA is more efficient than the compared algorithms.
The rest of this paper is organized as follows. In Section 2, the mathematical model of 2DRP is built. The improved method, HAGA, for the 2DRP problem is introduced in detail in Section 3. Then, Section 4 provides the computational results and comparisons. Finally, the conclusion of this paper is given in Section 5 with some closing remarks.

2. Problem Statement

Assume that there is a set of n rectangle ( R = r 1 , r 2 , , r n ) items with w i × h i for i = 1 , 2 , , n . The task is to orthogonally place the items without overlapping in the sheet with W × H to maximize the filling rate of the sheet, i.e., to maximize the total area of the placed items divided by the area of the sheet. The paper addresses the 2DRP with the following assumptions [30,31]:
(1)
For any two rectangular items put in, they cannot overlap each other.
(2)
When the rectangle is put into the sheet, it cannot exceed the boundary of the sheet.
(3)
The side of the rectangular items must be parallel to the side of the sheet.
(4)
The rectangular can be rotated 90 ° .
Based on the problem description and assumptions, a two-dimensional rectangular coordinate system is established with the bottom left corner of the sheet as the origin of the coordinates, and the coordinates of the bottom left corner of the rectangle r i are x i , y i , as shown in Figure 1. Use variable g i to indicate whether the rectangle r i is rotated; g i = 0 means no rotation, and g i = 1 means rotation. If the rectangle r i is rotated, the width and height of the rectangle are interchanged.
Therefore, the actual width and height of the rectangle placed change to w i ( 1 g i ) + h i g i and w i g i + h i ( 1 g i ) respectively, and the coordinates of the top right corner of the rectangle are ( x i + w i ( 1 g i ) + h i g i , y i + w i g i + h i ( 1 g i ) ) . It can be seen that the rectangle r i is represented by ( x i , y i , w i , h i , g i ) , which can determine the accurate position of the rectangle in the sheet.
Let θ i be a decision variable, taking the value 1 or 0 accordingly as rectangle r i is or is not placed. The filling rate F of the sheet is defined as the ratio of the total area of the rectangles placed in it to the area of the sheet. The mathematical model of the 2DRP is as follows:
max   F = i = 1 n w i h i θ i W × H
s. t.
(1)
x i + w i ( 1 g i ) + h i g i W , y i + w i g i + h i ( 1 g i ) H
(2)
max { x i 1 x j 2 , x j 1 x i 2 , y i 1 y j 2 , y j 1 y i 2 } θ i θ j 0
(3)
( x i 2 x i 1 , y i 2 y i 1 ) { ( w i , h i ) , ( h i , w i ) }
(4)
θ i { 0 , 1 } , g i { 0 , 1 }
(5)
0 x i W , 0 y i H .
In constraints (1)–(4), i , j applies to 1 , 2 , , n and i j . Constraint (1) implies that the boundaries of the placed rectangles do not exceed the width and height boundaries of the sheet. Constraint (2) means that the placed rectangles cannot overlap each other. ( x i 1 , y i 1 ) and ( x i 2 , y i 2 ) represent the coordinates of the bottom left corner and the top right corner of the placed rectangles, respectively. The coordinates of the top right corner can be calculated with the coordinates of the bottom left corner and the width and height of the actual size of the rectangle. Constraint (3) implies that the placed rectangle is parallel to the side of the sheet and can be rotated by 90 ° . To sum up, the 2DRP problem can be described as figuring out the best packing solution that satisfies the constraints and maximizes the filling rate of the sheet.

3. Improved Adaptive Genetic Algorithm

It is representative for 2DRP to combine heuristic placement strategies and meta-heuristic algorithms such as GA. The GA usually includes SGA and various improved genetic algorithms such as AGA. The SGA is prone to premature problems that cannot escape the local optimal solution. Then, some adaptive genetic algorithms such as AGA [25], AGA [26], and AGA [29] were proposed to solve this problem. However, these also have some problems. Since the AGA [26] is an improvement to the AGA [25], this section mainly focuses on some problems in AGA [26] and AGA [29], presenting further improved AGA for 2DRP by combining heuristic placement strategy.
The packing sequence of rectangles and whether they are rotated are the most important factors that affect the results of the final packing solution. This paper proposes an improved adaptive genetic algorithm as a rectangle sequencing algorithm to determine the packing sequence and rotation state of the rectangles, with the heuristic lowest horizontal line algorithm used as the placement algorithm to determine the position coordinates of the rectangle. First of all, in terms of the genetic algorithm, two-stage encoding is constructed, i.e., the packing sequence is coded by continuous integers from 1 to n , and the rotation state is coded with 0 and 1. The initial population is constructed through a combination of sorting rules and random generation. The heuristic lowest horizontal line algorithm is applied to decode, so as to provide the packing solution and calculate the individual fitness. Then, it uses a sort-based method for selection and improved adaptive crossover and mutation operations for evolution. The process of iterative optimization continues until the designed termination rule is reached, and finally, the result decoded by the optimal individual is taken as the final packing solution.

3.1. Encoding and Population Initialization

Assuming there are n rectangles { r 1 , r 2 , , r n } to be packed, the chromosome adopts a two-stage encoding method consisting of the packing sequence and placement state of the rectangles, and the encoding length is 2 n . The former n uses an integer permutation code, and the packing sequence adopts integer numbers, which is the order of the rectangles to be packed. The latter n uses integer coding, and the rectangle placement status is numbered with 0 and 1, in which 1 means the placement rectangle rotates, and 0 represents that it does not rotate. So, s n + 1 , s n + 2 , , s n + i , , s 2 n are the rotation state of n rectangles to be packed. The overall encoding of individual chromosomes are as follows:
E = s 1 , s 2 , , s i , , s n , n s n + 1 , s n + 2 , , s n + i , , s 2 n n
where s i { 1 , 2 , , n } , s n + i { 0 , 1 } , and s i s j . For example, there are eight rectangles numbered 1, 2, 3, 4, 5, 6, 7, and 8 to be loaded into the sheet, and each rectangle can be rotated. The packing sequence and rotation status of the two-stage encoding approach for individual chromosome are shown in Figure 2. The order of rectangular packing is 4, 2, 5, 1, 8, 6, 3, and 7, and the rectangles numbered 2, 5, 6, and 7 need to be rotated during the packing process.
The above encoding approach accurately describes the factors that affect the packing solution. Considering that the packing sequence sorted by certain attributes tends to be the optimal solution, the following sorting rules [32] are fully utilized to generate the initial population in combination with random generation to speed up the algorithm when initializing the population.
(1)
Sort by area in decreasing order.
(2)
Sort by width in decreasing order.
(3)
Sort by height in decreasing order.
(4)
Sort by perimeter in decreasing order.
(5)
Sort by maximum of width and height in decreasing order.
(6)
Sort by length of diagonal + width + height in decreasing order.
Figure 3 shows the initial population constructed by P S individuals. The individuals from E 1 to E p s 6 are generated randomly. The packing sequence of the remaining six individuals is generated by the six sorting rules, and the corresponding rotation state of the rectangles is generated randomly. The P S is set to 100 in this paper.
Once the chromosome encoding sequence of the individuals in the population is determined, the heuristic placement algorithm can be used to decode and place, and then the individuals can be evaluated through the fitness function.

3.2. Heuristic Placement Algorithm

When using the fitness function to evaluate individuals in the population, it is necessary to arrange the rectangles into the sheet according to a certain heuristic algorithm for the packing sequence, rotation state, the width and height of rectangles, and the width and height of the sheet to calculate the sheet filling rate and figure out the fitness.
Liu proposed the IBL algorithm [15] to solve the problem that the left side of the BL algorithm [12] is too high and the unfilled cavity area can not be effectively used. Although it can overcome the disadvantage of the BL algorithm, which is prone to the waste area of the sheet, it will lead to the problem of a high right side. In contrast, the lowest horizontal line algorithm proposed in this paper can effectively solve the shortcomings of the BL and IBL algorithms and improve the filling rate [33]. Therefore, the placement algorithm in this paper adopts the heuristic lowest horizontal line algorithm of Ref. [23], and the procedure is as follows in Algorithm 1.
Algorithm 1 Heuristic packing procedure
HeuristicPacking(R, sheet):
1 Initialize the lowest level line l is 0
2 while R is not empty or l is beyond the sheet H:
3  Get filling area on l and hollow area under l , the area size store 2-tuple set (AW, AH)
4  Priority to sorting hollow area in increasing order of AW for (AW, AH)
5  Prepare to place r i from R in order and rotation state
6  if r i need to rotate:
7   Exchange the width w i and height h i of r i
8  if AW w i and AH h i :
9   Place r i , update area size (AW, AH)
10   Record r i the left-bottom corner position coordinates ( x i , y i ) ,
   placed state, size, rotation state, etc.
11   Remove r i from R
12  else:
13   If exist the next area:
14    Move the next area to continue placing
15   else:
16    Sort these placed r i in increasing order of y i
17    Update l and the area size (AL, AH)
18 return the placed information for R

3.3. Fitness Function and Selection Operator

Generally, the fitness function of the genetic algorithm is often determined by the objective function. In this paper, the fitness function refers to the sheet filling rate of the objective function, and its definition can be seen in the 2DRP mathematical model in Section 2.
Selection operation is the process of the genetic algorithm to evaluate the survival of the fittest. Its purpose is to keep the individuals with better fitness in the parent population as much as possible to keep good genes. The traditional roulette [34] selection method gives every individual the opportunity to make a copy, which does not reflect the competitiveness of excellent individuals and cannot realize the principle of survival of the fittest by the genetic algorithm. This paper uses an improved selection method sorted by individual fitness [35] to replace the roulette selection method. The sort-based selection method is described as follows:
Step1. Calculate the fitness of each individual in the population.
Step2. Sort the individuals in the population in descending order of fitness.
Step3. Divide the sorted individuals into three parts, and the first one was duplicated into two copies.
Step4. Make a copy of the individuals in the middle.
Step5. The remaining individuals ranked behind are not copied.

3.4. Adaptive Crossover Operator and Mutation Operator

This subsection gives an improved genetic algorithm, in which the crossover probability and mutation probability can be adjusted adaptively. The crossover operation is to randomly exchange some genes between two individuals in the population based on the crossover probability so as to combine excellent genes to produce new and better individuals, which is the main part of the genetic algorithm. The mutation operation is to replace genes of an individual with other alleles under a certain mutation probability, thereby forming a new individual, ensuring the diversity of the population and preventing the phenomenon of premature.
Crossover probability and mutation probability are the most important parameters for crossover and mutation operations. Their selection is the key to influencing the behavior and performance of the algorithm and directly affecting the convergence of the algorithm. Regarding the crossover probability, if the crossover probability is too small, the search process will be slow and will easily cause stagnation. However, if the crossover probability is too large, the chromosomal structure of an individual with high fitness will be quickly destroyed and replaced. For the mutation probability, if it is too small, a new individual chromosome structure is not easy to be generated, and the search space will become narrower. Otherwise, if the mutation probability is too large, the genetic algorithm becomes a purely random search algorithm, which makes it easy to fall into a local optimal solution.
The AGA [26] proposed by Ren is to adaptively change the crossover probability and mutation probability from the local point according to individual fitness without considering whether the dynamic adjustment of crossover and mutation has a positive impact on population evolution from the whole point of population evolution. The AGA [29] proposed by Jiang dynamically adjusts the crossover probability and mutation probability according to the fitness changes of the optimal individual from the whole point of the evolution of the population offspring. However, the crossover probability and mutation probability of all individuals of a certain generation of population are still the same, and the performance of individuals with different fitness of the generation is consistent, so there is no difference. Moreover, the AGA [29] is greatly affected by the contemporary optimal fitness and the range of fitness function, which will limit the wide application of the algorithm.
Inspired by Ren and Jiang, this paper proposes an improved method called hybrid adaptive genetic algorithm (HAGA) to solve the 2DRP problem. The adaptive description of the crossover probability is as follows:
P c ( t ) = P c 2 + ( P c 1 P c 2 ) 1 e c t 1 + e c t , t 0
P c ( f ) = P c 1 ( P c 1 P c 2 ) ( f f a v g ) f max f a v g , f f a v g P c 1 , f < f a v g
P c = λ P c ( t ) + ( 1 λ ) P c ( f )
where P c 1 and P c 2 are the upper bound and lower bound of P c . In general, the recommended parameters for these two crossover probabilities are 0.9 and 0.6 respectively [36]; i.e., P c 1 = 0.9 and P c 2 = 0.6 . The parameter t is the cumulative number of generations in which the optimal fitness value of the population has not changed. When the optimal fitness value of a certain generation changes, it will be set to 0 for re-accumulation. For example, in the process of iterative optimization, if the best fitness value lasts for ten times without changing, the t is set to 10. The parameter c is a constant to determine the slope of the ( 1 e c t ) / ( 1 + e c t ) function, and c = 0.2 in the experiment. f is the fitness value of the larger individuals that are ready to implement crossover; f max is the maximum fitness value of the current population; f a v g is the average fitness value of the current population. The λ is an adjustable weight parameter with the range of 0 < λ < 1 , and λ = 0.6 in the experiment.
( 1 e c t ) / ( 1 + e c t ) in Formula (2) has a value range of 0–1 when t is greater than or equal to 0, which ensures that P c ( t ) changes between P c 2 and P c 1 . It also helps to solve the problem for AGA [29] that is greatly affected by the contemporary optimal fitness, representing the fitness function range with appropriately adjusting P c 1 and P c 2 . It is beneficial to combine with AGA [26]. The t is recorded after each iteration to determine the change of P c ( t ) . If t becomes larger, it shows that the optimal fitness of the population evolution has not changed, and the crossover probability needs to be increased to promote the change of the optimal fitness. If t = 0 , it reveals that the optimal fitness of the population evolution has increased, and the crossover probability P c ( t ) will drop to P c 2 for increasing more possible solutions. Then, combining Formula (3) to increase the difference of crossover operation for different individuals. Combining Formula (2) and Formula (3), it works together to find a better solution from the global perspective of population evolution and the local perspective of individual fitness. In addition, because it can increase the crossover probability from the perspective of the population evolution process, it is also helpful to overcome the problem that evolution is likely to stagnate when f a v g is close to f max . The effect of the adaptive mutation probability change in the latter part is similar to this.
When carrying out crossover, the packing sequence gene string adopts the partial matching crossover (PMX), and the rotating state gene string adopts the two-point crossover method. An example of the crossover process is shown in Figure 4. The procedure of the hybrid adaptive crossover algorithm is described in Algorithm 2.
Algorithm 2 Hybrid adaptive crossover algorithm
HACA( t , P , P S ):
1 Initialize the parameter P c 1 , P c 2 , c , λ
2 Copy population P from the population P with P S individuals
3 Compute P c ( t ) with formula (2)
4 Compute f max , f a v g for P
5  for i in range( 0 , P S , 2 ):
6   Randomly select two different parents E 1 , E 2 from P
7   Compute greater fitness f from E 1 , E 2
8   Compute P c ( f ) with formula (3) and P c with formula (4)
9   Generate a random number r between [0, 1] with rand() function
10  if r < P c :
11   Generate different random numbers r 1 , r 2 within [ 1 , n ] and r 3 , r 4 within [ n + 1 , 2 n ]
12   Get two crossed children using the same method of Figure 4
13   Put two crossed children with Heuristic Packing Procedure
14   Update P [ i ] , P [ i + 1 ] using two crossed children
15 Add P to P , Sort them in decreasing order of fitness
16 Delete P S individuals with small fitness and get crossed population P
17 return crossed population P
The adaptive description of mutation probability is as follows:
P m ( t ) = P m 2 + ( P m 1 P m 2 ) 1 e c t 1 + e c t , t 0
P m ( f ) = P m 1 ( P m 1 P m 2 ) ( f f a v g ) f max f a v g , f f a v g P m 1 , f < f a v g
P m = λ P m ( t ) + ( 1 λ ) P m ( f )
where P m 1 and P m 2 are the upper bound and lower bound of P m . In the experiment, these two mutation probability parameters recommended are 0.1 and 0.5 respectively [36]; i.e., P m 1 = 0.5 and P m 2 = 0.1 . f is the fitness value of the individual to be mutated; f max is the maximum fitness value of the current population; and f a v g is the average fitness value of the current population. For other parameters, refer to the section on adaptive crossover probability. Similarly, we can be aware that Formula (5) is the adaptive mutation probability from the whole point of population offspring evolution, and Formula (6) is the adaptive mutation probability for individual fitness from a local perspective. The hybrid adaptive mutation probability is used to work together to dynamically adjust the mutation probability.
When mutating, the packing sequence gene string adopts the exchange mutation method, and the rotating state gene string takes the two-point basic position mutation method. An example of the mutation process is shown in Figure 5.
The procedure of the hybrid adaptive mutation algorithm is described in Algorithm 3. In Algorithms 2 and 3, P represents the population in the genetic algorithm; P S means the size of the population, i.e., the number of individuals in the population; The parameter t is obtained by comparing the fitness of the best individual in the previous and next generations in the population evolution process. If the optimal individual fitness of the previous generation and the next generation are equal, t = t + 1 ; otherwise, t is reset to 0.
Algorithm 3 Hybrid adaptive mutation algorithm
HAMA( t , P , P S ):
1 Initialize the parameter P m 1 , P m 2 , c , λ
2 Copy population P from the population P with P S individuals
3 Compute P m ( t ) with formula (5)
4 Compute f max , f a v g for P
5 for i in range( P S ):
6  Get parent E 1 from P and compute its fitness f
7  Compute P m ( f ) with formula (6) and P m with formula (7)
8  Generate a random number r between [0, 1] with rand() function
9  if r < P m :
10   Generate different random numbers r 1 , r 2 within [ 1 , n ] and r 3 , r 4 within [ n + 1 , 2 n ]
11   Get mutated child using the same method of Figure 5
12   Put mutated child with Heuristic Packing Procedure
13   Update P [ i ] using mutated child
14 Add P to P , Sort them in decreasing order of fitness
15 Delete P S individuals with small fitness and get mutated population P
16 return mutated population P
In summary, Algorithm 2 plays a role of constructing the hybrid adaptive crossover algorithm (HACA) and Algorithm 3 structures the hybrid adaptive mutation algorithm (HAMA), which are two main parts of HAGA. From the local aspect of individual fitness and the whole evolution of later generations’ population, the crossover probability and mutation probability can be adjusted adaptively to quickly find a further improved solution.

3.5. Termination Rules

The improved adaptive genetic algorithm we proposed shows a convergence trend in the process of searching and optimizing the solution space. For the iterative optimization calculation of 2DRP problem, there are the following termination rules:
(1) After the iterative calculation reaches a certain level, the optimal fitness value has no obvious change in the continuous T iterations, and the calculation can be stopped in advance. For example, the T is set to 150 in this paper, which means the calculation is terminated if the optimal fitness value does not change through 150 continuous iterations;
(2) Set the desired packing rate in advance. In the process of calculating, the pre-set filling rate is reached, and the calculation can be terminated early. For the expected filling rate, if the theoretical filling rate is known before the experiment, e.g., the theoretical filling rate of the C benchmark instances proposed by Hopper is 100% [18], it can be set to the theoretical value; otherwise, the user’s expected value can be set according to actual needs;
(3) Set the maximum number of iterations in advance. If the algorithm does not terminate prematurely, when the genetic algebra reaches the maximum number of iterations, the calculation is terminated, and the packing solution and filling rate are obtained.
The combination of the above three termination rules can not only fully optimize within the maximum number of iterations but also terminate the iterative optimization of the algorithm early when the expected value or fitness value is reached and there is no obvious change, which is beneficial to reduce the calculation time of the algorithm. When the iterative optimization of the algorithm is terminated, the packing solution corresponding to the chromosome with the largest fitness value is the optimal packing solution, and the corresponding filling rate is calculated.

3.6. Related Discussion

The proposed algorithm firstly overcomes the problem that is greatly affected by the contemporary optimal fitness and fitness function range for AGA [29] to expand its application; especially, the fitness function range is not between 0 and 1. Moreover, this algorithm not only obtains the differential performance of a certain generation of individuals by combining AGA [26] but also handles the impact of dynamic changes on population evolution to find adaptively an improved solution. However, the presented algorithm is not perfect in this paper; it has the following drawbacks:
(1) There are some parameters that need to be controlled, including P c 1 , P c 2 , P m 1 , P m 2 , λ , and c . The P c 1 , P c 2 , P m 1 , and P m 2 may be obtained through existing experience. It is necessary to do sets of comparative experiments to establish consistent parameters λ , c to obtain good benefits.
(2) From Formulas (2) and (5), if t = 0 , it can be concluded that P c ( t ) suddenly drops to the minimum of crossover probability and mutation probability P c 2 and P m 2 . In the early stage of evolution, the optimal individual is easy to change frequently; that is, there are more times where t = 0 , which leads to lower crossover probability and mutation probability that are not beneficial to rapid population evolution.
We can set up a series λ and c to determine the appropriate parameters through many experiments. In addition, it is possible for t = 0 to make continuous descent changes for different evolutionary periods.

4. Computational Experiments

In this section, to evaluate the effectiveness of the proposed improved method, HAGA, four computational experiments are designed and implemented. The rectangle packing instances, which include zero-waste and non-zero-waste datasets, are used for testing. The first three benchmark instances as zero-waste are the J instances ( J 1 J 2 ) proposed by Jakobs [37], the C instances ( C 11 C 73 ) proposed by Hopper et al. [18], and the N instances ( N 1 N 13 ) proposed by Burke et al. [19]. The scale and optimization difficulty of these three benchmark instances increase sequentially. The optimal solution for each instance is known beforehand, in which the total area of the given items is equivalent to the area of the sheet, resulting in a 100% filling rate. So, they all theoretically have a 100% filling rate but are not balanced dimensionally. However, considering that non-zero-waste problems often occur in real application, the non-zero-waste datasets, including 4 instances (cgcut1-cgcut3) given in Ref. [38], 13 instances (gcut1-gcut13) in Ref. [39], 12 instances (ngcut1-ngcut12) in Ref. [40], and 10 instances (beng1-beng10) in Ref. [41], are used for further testing.
The SGA, AGA [26], AGA [29], and HAGA involved in the experiment are implemented in Python language programming and calculated on an Intel Core i5 CPU at 2.5 GHz with 8 GB memory. We tested the effects of SGA and AGA [26] for each individual fitness proposed by Ren, AGA [29] for the evolutionary process proposed by Jiang, and the HAGA proposed in this paper. Then, a comparison of HAGA with some recent algorithms is provided. In order to balance the calculation accuracy and efficiency of the test algorithm, the number of iterations N I N D is set to 2000, and the calculation result is the average of twenty operations.

4.1. Computational Experiment for Zero-Waste Instances

4.1.1. Computational Experiment for J Instances

We know that Ref. [42] divides the J benchmark instances into two groups of problem instances, which are called J 1 and J 2 . The size of the large rectangular sheet is 40 × 15 . The number of items in the first group is 25, and the number of items in the second group is 50. For more detailed information on the instances, refer to the original paper published by Jakobs [37].
In this subsection, we compare the performance of the proposed HAGA with SGA, AGA [26], and AGA [29] on the J instances. The AGA [26] is an adaptive genetic algorithm that dynamically adjusts the crossover probability and mutation probability for each individual. The AGA [29] is an adaptive genetic algorithm that dynamically adjusts the crossover probability and mutation probability for the evolution process. In the comparative experiment, the crossover probability and mutation probability in SGA are 0.9 and 0.1, respectively. The parameters P c 1 , P c 2 , P m 1 and P m 2 of the AGA [26] remain consistent with that in this paper, and the parameter c in AGA [29] also remains consistent with this paper. The computational results are shown in Table 1, where F represents the filling rate of the sheet. Figure 6 and Figure 7 show the rectangular packing layouts corresponding to the optimal solution obtained by the HAGA.
From the results shown in Table 1, it can be seen that the average calculation time of the three adaptive genetic algorithms of AGA [26], AGA [29], and HAGA are 16.45 s, 16.4 s, and 14.45 s respectively, which is less than that of the SGA. It shows that the adaptive genetic algorithm can accelerate the convergence speed of the algorithm by dynamically adjusting the crossover probability and mutation probability. The average filling rate of the adaptive genetic algorithm is higher than that of SGA, which shows that the adaptive genetic algorithm can address the problem that SGA may fall into a local optimal solution. Next, by comparing three adaptive genetic algorithms, we can realize that they have almost the same average filling rate on the J instances, but the average time consumed for HAGA is 2 s, which is less than AGA [26] and 1.95 s less than AGA [29]. The results show that the HAGA can overcome the shortcomings of the two types of adaptive genetic algorithms including AGA [26] and AGA [29] through the joint effect of the local aspects of individual and the overall aspects of evolution, and the convergence speed of the algorithm is accelerated to show the effectiveness of the proposed algorithm.

4.1.2. Computational Experiment for C Instances

The number of items per instance for C benchmark instances ranges from 16 to 197. According to the area of the sheet, these instances can be classified into seven groups with three instances each. For detailed information on the C instances, refer to Hopper et al. [18]. The experimental comparison results are shown in Table 2.
It can be inferred from the results in Table 2 that as the scale n of the problem instances becomes larger and larger, the difficulty of the algorithm convergence increases, and some instances cannot achieve a 100% filling rate. The HAGA can obtain a 100% filling rate for all instances except for C71, but AGA [26] fails to obtain a 100% filling rate for C13, C71, C72, and C73. The scale of the C13 instance is not large, but the 100% filling rate is not obtained because the algorithm fell into a possible local optimal solution during a certain test. In addition, the AGA [29] fails to obtain a 100% filling rate for C71, C72, and C73. It is obvious that the HAGA is better than AGA [26] and AGA [29].
Then, by comparing SGA and the adaptive genetic algorithm, it can be realized that AGA [26], AGA [29], and HAGA save 74.59, 71.9, and 108.91 s respectively in comparison to SGA. The average filling rate of the adaptive genetic algorithm is generally higher than that of SGA, which shows that the adaptive genetic algorithm can overcome the “premature” phenomenon to which SGA is prone. Through the analysis of the results of the three adaptive genetic algorithms, it can be found that the HAGA uses 34.32 s and 37.01 s less than AGA [26] and AGA [29] in the average calculation time, and it increases the average filling rate by 0.15% and 0.11%, respectively. This shows that the improved method, HAGA, can speed up the convergence of the algorithm and relatively increase the filling rate of the sheet.

4.1.3. Computational Experiment for N Instances

The N benchmark instances were generated by Burke et al., and optimal solutions were also known beforehand. It includes 13 groups of test instances, and the number of items to be packed increases from 10 in the first group to 3152 in the thirteenth group. For detailed information on N instances, refer to Burke et al. [19]. The comparison results of our experiments are shown in Table 3. It should be noted that the ‘-’ in N13 means that no experimental calculation has been performed.
We can recognize from the results shown in Table 3 that SGA can only obtain a 100% filling rate for N1–N3 instances with a small scale. Both AGA [26] and AGA [29] fail to obtain a 100% filling rate in five instances, and HAGA fails to obtain a 100% filling rate in three instances N10~N12. Comparing the N5 and C41–C43 instances of almost the same scale, you will find that the N5 instance consumes a lot more time than the C41–C43 instances. For example, the calculation time of AGA [26] is 22.37 s on the C43 instance, but it takes 33.98 s on the N5 instance. These indicate that solving N instances is more difficult than solving the C instances, but the HAGA is still better than the two types of adaptive methods AGA [26] and AGA [29] to solve the 2DRP problem.
Then, by comparing SGA and the adaptive genetic algorithm, we figure out that AGA [26], AGA [29], and HAGA reduce the time by 90.46, 114.08, and 154.49 s, respectively compared with SGA, and the average filling rate of the adaptive genetic algorithm is generally higher than that of SGA. We compare the computational results of the three adaptive genetic algorithms again, and it can be seen that the HAGA saves 64.03 s and 40.41 s in the average calculation time than AGA [26] and AGA [29], and it increases the average filling rate by 0.1% and 0.05%, respectively. Therefore, it further shows that the HAGA can better improve the convergence speed and filling rate for 2DRP, thereby improving the packing efficiency and quality.

4.2. Computational Experiment for Non-Zero-Waste Instances

The 38 non-zero-waste instances including cgcut1-cgcut3, gcut1-gcut13, ngcut1-ngcut12, and beng1-beng10 are evaluated to further verify the effectiveness of the HAGA. These datasets have been used by other authors to verify the performance of the algorithm. Although some of the area of the stock sheet is wasted in these instances, the optimal solution of problem can be known from Ref. [43]. It should be noted that the filling rate needs to be obtained through the ( 1 t r i m   l o s s ) × 100 formula conversion for the trim loss indicator in Ref. [43]. The data can be downloaded from http://people.brunel.ac.uk/~mastjjb/jeb/info.html.
Table 4 reports the comparison results of AGA [26], AGA [29], and HAGA for non-zero-waste instances. From Table 4, we can observe that the number of instances in which HAGA, AGA [26], and AGA [29] obtained the optimal filling rate is 22, 20, and 21, respectively. The HAGA obtains the optimal filling rate except for cgcut3 on the cgcut1-cgcut3 instances, ngcut6, ngcut9, and ngcut11 on the ngcut1-gcut12 instances, and beng10 on the beng1-beng10 instances. The worst performance of HAGA is that it only obtains the optimal filling rate on gcut1 and gcut3 for the gcut1-gcut13 instances. The filling rate of HAGA is not lower than that of AGA [26] except for five instances (gcut5, gcut9, gcut11, gcut12, ngcut11). Similarly, the filling rate of HAGA is not lower than that of AGA [29] except for six instances (gcut2, gcut7, gcut9, gcut10, ngcut12, beng10). By comparing the computational results of the three adaptive genetic algorithms, it can be observed that the HAGA saves 19.5 s and 15.8 s in average calculation time compared with AGA [26] and AGA [29], and it improves the average filling rate by 0.2% and 0.06%, respectively. The computational results show that the HAGA is still effective for non-zero-waste instances.

4.3. Compare the Results with Other Algorithms

We compare the proposed algorithm with the algorithms in Ref. [43,44,45]. A hybrid simulated annealing algorithm (HSA) proposed by Leung et al. [43] uses a greedy strategy and simulated annealing to obtain an improved solution. A least-waste-first heuristic algorithm (LWF) proposed by Wei et al. [44] presents a least wasted first heuristic algorithm to find the desirable solution. An iterative bidirectional heuristic placement (IBHP) proposed by Shiangjen et al. [45] combines the constructive heuristic algorithms of bidirectional heuristic placement (BHP) and iterated local search (ILS) with a shift strategy to improve the solution. Considering that Ref. [44] lacks some test instances, the results of LWF and HSA are taken directly from Ref. [43]. The HSA and LWF in C++ programming language were run on a Dell GX270 with 2.60 GHz CPU and 512 MB memory. The IBHP in C programming language was performed on an Intel Core i5 CPU at 2.90 GHz with 4 GB of RAM running on the Ubuntu 12.04 operating system. The comparisons of the average filling rate and the average calculation time between LWF, HSA, IBHP, and HAGA are shown in Table 5. The ‘-’ in Table 5 means that the results are not reported by the corresponding algorithm.
From Table 5, it can be observed that the average filling rate of HAGA on the C11-C73, cgcut1-cgcut3, and ngcut1-ngcut12 instances is 99.8%, 97.5755%, and 86.5549%, respectively, which outperforms LWF, HSA, and IBHP. Compared with LWF for these instances, the average filling rate of HAGA can be increased by 0.5356%, 1.6604%, and 0.999%, respectively. The maximum average filling rate can be improved by 1.6604% on cgcut1-cgcut3 for LWF. The average filling rate of HAGA is better than HSA except for N1-N12. Compared with IBHP for C11-C73, cgcut1-cgcut3, and ngcut1-ngcut12 instances, the average filling rate of HAGA can be increased by 0.0527%, 0.486%, and 1.1835%, respectively. Therefore, the HAGA achieved better quality for C11-C73, cgcut1-cgcut3, and ngcut1-ngcut12 instances within reasonable time, with the elimination of equipment and language differences.
However, the average filling rate of HAGA on the N1-N12, gcut1-gcut13, and beng1-beng10 instances is worse than LWF and IBHP. For example, the average filling rate of HAGA is only 0.23%, 0.0252%, and 0.0897% lower on these instances for IBHP, respectively. Overall, the HAGA is relatively superior to these three algorithms within a reasonable duration of computational time, especially on the C11-C73, cgcut1-cgcut3, and ngcut1-ngcut12 instances.
In order to observe the performance of different changes of the proposed algorithm, we just run the proposed algorithm on the N1-N12 instances. We first set c = 0.1 and perform the experiments with λ = { 0 , 0.3 , 0.6 , 0.9 , 1 } . For each λ , the calculation result is the average of twenty operations for each instance. Figure 8 with the y-axis representing the average filling rate reports the results of different λ . From Figure 8, we can observe that λ = 0.6 is better. Now, we fix λ = 0.6 and perform the experiments with c = { 0.05 , 0.1 , 0.2 , 0.4 , 0.8 , 1.6 } . Similarly, Figure 9 shows the computational results of different c . From Figure 9, we can observe that c = 0.2 is better.
Furthermore, from Figure 8 and Figure 9, it can be seen that the change of parameters has a greater impact on the performance of HAGA as the scale of the instance increases. However, the parameter changes for different problems may achieve better results. In addition, if λ = 0 , the algorithm just changes to AGA [26] from the local perspective of the individual fitness; if λ = 1 , the algorithm happens to be an adaptive genetic algorithm that changes from the overall perspective of the population evolution. We can see that the proposed algorithm, HAGA, has better performance. According to the results of parameter changes, we can establish a consistent parameter setting for HAGA to obtain good benefits.

5. Conclusions

In this paper, in order to better solve the 2DRP problem, we analyzed the respective shortcomings of the current two types of adaptive genetic algorithms in detail and proposed an improved method named hybrid adaptive genetic algorithm (HAGA). In the process of providing the solution, the crossover probability and mutation probability of chromosomes are adaptively adjusted according to the collective effect of individual fitness and population evolution process. When using HAGA, the initial population is constructed through a combination of sorting rules and random generation, and operators with better performance are fully used for selection, crossover, and mutation. The heuristic lowest horizontal line algorithm is used as the positioning algorithm to place rectangles. Through continuous iterative optimization of the algorithm, the final packing layout and sheet filling rate are obtained.
The proposed improved method is compared with other representative algorithms. The computational experiments on a wide range of benchmark instances from zero-waste to non-zero-waste problems are implemented. The computational results show that HAGA outperforms the comparison of two adaptive genetic algorithms. Compared with some recent algorithms, the results reveal that HAGA is relatively better than HSA, LWF, and IBHP, especially on the C11-C73, cgcut1-cgcut3, and ngcut1-ngcut12 instances. Moreover, in view of observing the performance of different changes, the experiments were designed a series of λ and c parameters to determine the consistent parameter settings for HAGA. The presented algorithm, which works adaptively through the two perspectives of individual and population evolution, can also be applied to cutting, the Travelling Salesman Problem (TSP), Vehicle Routing Problem (VRP), etc. In the future, the focus of research is to further improve the calculation speed and filling rate of the algorithm for 2DRP problem and strive to find a satisfactory solution for larger scale and difficult benchmark instances.

Author Contributions

Conceptualization, Y.-B.L. and X.X.; methodology, H.-B.S. and Y.-B.L.; software, H.-B.S. and X.X.; validation, H.-B.S. and Y.-B.L.; data curation, Y.-R.L. and X.X.; writing—original draft, Y.-R.L. and H.-B.S.; writing—review and editing, H.-B.S. and Y.-B.L.; supervision, Y.-B.L. and X.X. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by National Key Research and Development Program of China (No.2018YFF0212201).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The test source data comes from an existing data set. The test source data can be downloaded from http://people.brnel.ac.uk/~mastjjb/jeb/info.html or related literature. The test source data does not belong to us. The experimental result data is calculated by applying the algorithm of this paper to the test source data.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Chen, M.; Tang, X.; Zeng, Z.; Liu, S. An efficient heuristic algorithm for two-dimensional rectangular packing problem with central rectangle. J. Ind. Manag. Optim. 2020, 16, 495. [Google Scholar] [CrossRef] [Green Version]
  2. He, K.; Ji, P.; Li, C. Dynamic reduction heuristics for the rectangle packing area minimization problem. Eur. J. Oper. Res. 2015, 241, 674–685. [Google Scholar] [CrossRef]
  3. Chen, M.; Wu, C.; Tang, X.; Peng, Z.; Liu, S. An efficient deterministic heuristic algorithm for the rectangular packing problem. Comput. Ind. Eng. 2019, 137, 106097. [Google Scholar] [CrossRef]
  4. Leung, T.W.; Chan, C.K.; Troutt, M.D. Application of a mixed simulated annealing-genetic algorithm heuristic for the two-dimensional orthogonal packing problem. Eur. J. Oper. Res. 2003, 145, 530–542. [Google Scholar] [CrossRef]
  5. Bortfeldt, A. A genetic algorithm for the two-dimensional strip packing problem with rectangular pieces. Eur. J. Oper. Res. 2006, 172, 814–837. [Google Scholar] [CrossRef]
  6. Bansal, J.C.; Deep, K. A modified binary particle swarm optimization for knapsack problems. Appl. Math. Comput. 2012, 218, 11042–11061. [Google Scholar] [CrossRef]
  7. Zhu, Y.; Luo, Y.; Tan, K.C.; Qiu, X. An intelligent packing programming for space station extravehicular missions. IEEE Comput. Intell. Mag. 2017, 12, 38–47. [Google Scholar] [CrossRef]
  8. Aljarah, I.; Faris, H.; Mirjalili, S. Optimizing connection weights in neural networks using the whale optimization algorithm. Soft Comput. 2018, 22, 1–15. [Google Scholar] [CrossRef]
  9. Khalilpourazari, S.; Khalilpourazary, S. Optimization of time, cost and surface roughness in grinding process using a robust multi-objective dragonfly algorithm. Neural Comput. Appl. 2020, 32, 3987–3998. [Google Scholar] [CrossRef]
  10. Salgotra, R.; Singh, U. The naked mole-rat algorithm. Neural Comput. Appl. 2019, 31, 8837–8857. [Google Scholar] [CrossRef]
  11. Kaur, K.; Singh, U.; Salgotra, R. An enhanced moth flame optimization. Neural Comput. Appl. 2020, 32, 2315–2349. [Google Scholar] [CrossRef]
  12. Baker, B.S.; Coffman, E.G., Jr.; Rivest, R.L. Orthogonal packings in two dimensions. SIAM J. Comput. 1980, 9, 846–855. [Google Scholar] [CrossRef]
  13. Fırat, H.; Alpaslan, N. An effective approach to the two-dimensional rectangular packing problem in the manufacturing industry. Comput. Ind. Eng. 2020, 148, 106687. [Google Scholar] [CrossRef]
  14. Araujo, L.J.P.; Panesar, A.; Ozcan, E.; Atkin, J.; Baumers, M.; Ashcroft, I. An experimental analysis of deepest bottom-left-fill packing methods for additive manufacturing. Int. J. Prod. Res. 2019, 58, 6917–6933. [Google Scholar] [CrossRef]
  15. Liu, D.; Teng, H. An improved BL-algorithm for genetic algorithm of the orthogonal packing of rectangles. Eur. J. Oper. Res. 1999, 112, 413–420. [Google Scholar] [CrossRef]
  16. Burke, E.K.; Kendall, G.; Whitwell, G. A new placement heuristic for the orthogonal stock-cutting problem. Oper. Res. 2004, 52, 655–671. [Google Scholar] [CrossRef] [Green Version]
  17. Yang, J. Two-dimensional irregular parts packing with genetic algorithm. J. Comput. Des. Comput. Graph. 2002, 14, 467–470. [Google Scholar]
  18. Hopper, E.; Turton, B.C.H. An empirical investigation of meta-heuristic and heuristic algorithms for a 2D packing problem. Eur. J. Oper. Res. 2001, 128, 34–57. [Google Scholar] [CrossRef]
  19. Hopper, E. Two-Dimensional Packing Utilising Evolutionary Algorithms and Other Meta-Heuristic Methods. Ph.D. Thesis, University of Wales, Cardiff, UK, 2000. [Google Scholar]
  20. Burke, E.K.; Kendall, G.; Whitwell, G. A simulated annealing enhancement of the best-fit heuristic for the orthogonal stock-cutting problem. INFORMS J. Comput. 2009, 21, 505–516. [Google Scholar] [CrossRef] [Green Version]
  21. He, K.; Huang, W.; Jin, Y. An efficient deterministic heuristic for two-dimensional rectangular packing. Comput. Oper. Res. 2012, 39, 1355–1363. [Google Scholar] [CrossRef]
  22. Wei, L.; Zhu, W.; Lim, A.; Chen, X. An adaptive selection approach for the 2D rectangle packing area minimization problem. Omega 2018, 80, 22–30. [Google Scholar] [CrossRef]
  23. Xia, Y.C.; Chen, Q.L.; Song, R.K. Packing of rectangles using adaptive genetic simulated annealing algorithm. Comput. Eng. Appl. 2018, 54, 229–232. [Google Scholar]
  24. Xu, H.J.; Tan, H.S.; Hu, X.M. Research of packing method based on AGA and concentrated surplus rectangle area strategy. Appl. Res. Comput. 2016, 33, 3235–3239. [Google Scholar]
  25. Srinivas, M.; Patnaik, L.M. Adaptive probabilities of crossover and mutation in genetic algorithms. IEEE Trans. Syst. 1994, 24, 656–667. [Google Scholar] [CrossRef] [Green Version]
  26. Ren, Z.W.; San, Y. Improved adaptive genetic algorithm and its application research in parameter identification. J. Syst. Simul. 2006, 1, 41–43. [Google Scholar]
  27. Xiang, X.; Yu, C.; Xu, H.; Zhu, S.X. Optimization of heterogeneous container loading problem with adaptive genetic algorithm. Complexity 2018, 2018, 2024184. [Google Scholar] [CrossRef] [Green Version]
  28. An, H.; Chen, S.; Huang, H. Laminate stacking sequence optimization with strength constraints using two-level approximations and adaptive genetic algorithm. Struct. Multidiscip. Optim. 2015, 51, 903–918. [Google Scholar] [CrossRef]
  29. Jiang, J.; Yin, S. A Self-Adaptive Hybrid Genetic Algorithm for 3D Packing Problem. Glob. Congr. Intell. Syst. IEEE 2012, 76–79. [Google Scholar] [CrossRef]
  30. Bortfeldt, A. A reduction approach for solving the rectangle packing area minimization problem. Eur. J. Oper. Res. 2013, 224, 486–496. [Google Scholar] [CrossRef]
  31. Deng, J.K.; Wang, L.; Yin, A.H. A quasi-human global optimization algorithm for solving the two dimensional rectangle packing problem. Comput. Eng. Sci. 2018, 40, 331–340. [Google Scholar]
  32. Wei, L.; Oon, W.C.; Zhu, W.; Lim, A. A skyline heuristic for the 2D rectangular packing and strip packing problems. Eur. J. Oper. Res. 2011, 215, 337–346. [Google Scholar] [CrossRef]
  33. Wei, P.; Liu, B. The rectangular packing and optimization on parallel genetic algorithm. Modul. Mach. Tool Autom. Manuf. Tech. 2011, 1, 78–82. [Google Scholar]
  34. Huang, K.M. Analysis and improvement on roulette wheel method of genetic algorithm. Comput. Eng. Appl 2009, 45, 60–63. [Google Scholar]
  35. Guo, H.; Zhou, Y. An algorithm for mining association rules based on improved genetic algorithm and its application. Int. Conf. Genet. Evol. Comput. IEEE 2009, 117–120. [Google Scholar] [CrossRef]
  36. Dong, D.W.; Yan, Y.H.; Zhao, Y. Adaptive genetic simulated annealing algorithm in optimal layout of rectangular parts. N. A. Mech. Eng. 2013, 24, 2499–2504. [Google Scholar]
  37. Jakobs, S. On genetic algorithms for the packing of polygons. Eur. J. Oper. Res. 1996, 88, 165–181. [Google Scholar] [CrossRef]
  38. Christofides, N.; Whitlock, C. An algorithm for two-dimensional cutting problems. Oper. Res. 1977, 25, 30–44. [Google Scholar] [CrossRef]
  39. Beasley, J.E. An exact two-dimensional non-guillotine cutting tree search procedure. Oper. Res. 1985, 33, 49–64. [Google Scholar] [CrossRef]
  40. Beasley, J.E. Algorithms for unconstrained two-dimensional guillotine cutting. J. Oper. Res. Soc. 1985, 36, 297–306. [Google Scholar] [CrossRef]
  41. Bengtsson, B.E. Packing rectangular pieces—A heuristic approach. Comput. J. 1982, 25, 353–357. [Google Scholar] [CrossRef] [Green Version]
  42. Peng, B.T.; Zhou, Y.W. Recursive heuristic algorithm for the 2D rectangular strip packing problem. J. Softw. 2012, 23, 2600–2611. [Google Scholar] [CrossRef]
  43. Leung, S.C.H.; Zhang, D.; Zhou, C.; Wu, T. A hybrid simulated annealing metaheuristic algorithm for the two-dimensional knapsack packing problem. Comput. Oper. Res. 2012, 39, 64–73. [Google Scholar] [CrossRef]
  44. Wei, L.; Zhang, D.; Chen, Q. A least wasted first heuristic algorithm for the rectangular packing problem. Comput. Oper. Res. 2009, 36, 1608–1614. [Google Scholar] [CrossRef]
  45. Shiangjen, K.; Chaijaruwanich, J.; Srisujjalertwaja, W.; Unachak, P.; Somhom, S. An iterative bidirectional heuristic placement algorithm for solving the two-dimensional knapsack packing problem. Eng. Optimiz. 2018, 50, 347–365. [Google Scholar] [CrossRef]
Figure 1. Coordinate system.
Figure 1. Coordinate system.
Applsci 11 00413 g001
Figure 2. Individual chromosome two-stage encoding ( n = 8 ).
Figure 2. Individual chromosome two-stage encoding ( n = 8 ).
Applsci 11 00413 g002
Figure 3. Initial population with P S individuals ( n = 8 ).
Figure 3. Initial population with P S individuals ( n = 8 ).
Applsci 11 00413 g003
Figure 4. Partial matching crossover (PMX) and two-point crossover ( n = 8 , r 1 = 4 , r 2 = 6 , r 3 = 11 , r 4 = 14 ).
Figure 4. Partial matching crossover (PMX) and two-point crossover ( n = 8 , r 1 = 4 , r 2 = 6 , r 3 = 11 , r 4 = 14 ).
Applsci 11 00413 g004
Figure 5. Exchange mutation and two-point basic position mutation ( n = 8 , r 1 = 2 , r 2 = 6 , r 3 = 11 , r 4 = 15 ).
Figure 5. Exchange mutation and two-point basic position mutation ( n = 8 , r 1 = 2 , r 2 = 6 , r 3 = 11 , r 4 = 15 ).
Applsci 11 00413 g005
Figure 6. Full packing layouts on J 1 instance.
Figure 6. Full packing layouts on J 1 instance.
Applsci 11 00413 g006
Figure 7. Full packing layouts on J 2 instance.
Figure 7. Full packing layouts on J 2 instance.
Applsci 11 00413 g007
Figure 8. The effect of HAGA parameter λ .
Figure 8. The effect of HAGA parameter λ .
Applsci 11 00413 g008
Figure 9. The effect of HAGA parameter c .
Figure 9. The effect of HAGA parameter c .
Applsci 11 00413 g009
Table 1. Comparison of the filling rate (%) and calculation time (s) on the J instances.
Table 1. Comparison of the filling rate (%) and calculation time (s) on the J instances.
InstancesnSheetSGAAGA [26]AGA [29]HAGA
F/%Time/sF/%Time/sF/%Time/sF/%Time/s
J125 40 × 15 10010.711008.371007.691005.59
J250 40 × 15 99.6527.1899.87524.5399.9025.1199.91723.3
Average99.82518.9599.9416.4599.9516.499.9614.45
Table 2. Comparison of the filling rate (%) and calculation time (s) on the C instances.
Table 2. Comparison of the filling rate (%) and calculation time (s) on the C instances.
InstancesnSheetSGAAGA [26]AGA [29]HAGA
F/%Time/sF/%Time/sF/%Time/sF/%Time/s
C1116 20 × 20 1002.411002.141002.161001.64
C1217 20 × 20 1002.491002.331002.431001.7
C1316 20 × 20 1002.2899.652.141002.11001.62
C2125 40 × 15 10010.831008.551007.791005.54
C2225 40 × 15 1009.031007.871007.411005.22
C2325 40 × 15 1009.191007.581007.231005.37
C3128 60 × 30 10013.4110011.8210010.721008.92
C3229 60 × 30 10013.7310011.5410010.941009.12
C3328 60 × 30 10012.8110010.8110010.661008.86
C4149 60 × 60 10022.5210021.9410021.0710019.8
C4249 60 × 60 10023.2810021.5510020.910019.17
C4349 60 × 60 10022.3710021.8710021.3210020.14
C5173 60 × 90 99338.1310046.2310070.1110041.82
C5273 60 × 60 10057.4610042.5310040.2710038.31
C5373 60 × 60 99.62327.1710044.0710068.4410042.19
C6197 80 × 120 98.69483.98100127.85100106.97100100.85
C6297 80 × 120 100243.4810053.43100132.5410054.78
C6397 80 × 120 100386.6100111.63100187.37100105.42
C71196 160 × 240 98.431686.1398.941643.4899.081603.9699.521551.02
C72197 160 × 240 98.671825.5898.971779.6599.231748.541001501.37
C73196 160 × 240 98.341672.3798.821619.8898.941572.381001335.34
Average99.65341.299.83266.6199.87269.399.98232.29
Table 3. Comparison of the filling rate (%) and calculation time (s) on the N instances.
Table 3. Comparison of the filling rate (%) and calculation time (s) on the N instances.
InstancesnSheetSGAAGA [26]AGA [29]HAGA
F/%Time/sF/%Time/sF/%Time/sF/%Time/s
N110 40 × 40 1001.571001.231001.31000.94
N220 30 × 50 1006.891004.651004.231003.37
N330 30 × 50 10014.3110011.7210010.861009.46
N440 80 × 80 99.7556.6310020.5910019.5510016.9
N550 100 × 100 99.477.0110033.9899.9360.810027.61
N660 50 × 40 99.64152.57100135.93100123.5610041.2
N770 80 × 100 99.45207.0599.86184.5999.95158.22100114.96
N880 100 × 80 99.16227.6799.89190.0910092.4710047.28
N9100 50 × 150 98.76323.84100224.58100183.23100131.4
N10200 70 × 150 98.631582.7699.091454.2199.281433.9799.231378.05
N11300 50 × 150 98.392998.5898.762728.498.872713.6199.082724.25
N12500 100 × 300 97.677170.0898.026743.5698.266648.2798.546469.66
N133152 640 × 960 --------
Average99.241068.2599.64977.7999.69954.1799.74913.76
Table 4. Comparison of the filling rate (%) and calculation time (s) on the non-zero-waste instances.
Table 4. Comparison of the filling rate (%) and calculation time (s) on the non-zero-waste instances.
InstancesnWHOpt.AGA [26]AGA [29]HAGA
F/%Time/sF/%Time/sF/%Time/s
cgcut116102397.826197.82612.497.82612.2397.82611.31
cgcut223706398.503498.50346.3398.50347.1998.50344.17
cgcut3627063699.955195.5931291.9995.5034297.2696.3971293.18
gcut110250101664.394564.39451.0964.39450.9464.39450.27
gcut220250113396.933190.140778.991.760274.1791.522372.21
gcut330250180390.438490.4384117.5890.4384119.2590.4384111.95
gcut450250293499.714893.3675217.7894.1787220.1594.8336212.34
gcut510500117293.054685.787133.6487.127936.9384.344733.86
gcut620500251498.015793.203970.2993.546971.7894.300369.82
gcut730500464186.394884.1737117.0484.7101119.2984.5164119.01
gcut850500570398.385594.121225.6794.4197219.4294.7485215.17
gcut9101000202299.991695.169633.8994.279941.3392.630534.77
gcut10201000535699.988491.253173.1491.973277.8891.638271.28
gcut11301000653799.992794.7406112.1993.6346116.2593.9769113.58
gcut125010001252299.999992.012216.8892.3138210.7891.4614227.23
gcut13321000477299.996694.5067143.6894.2138150.7796.1827127.13
ngcut110102382.608782.60871.1882.60870.8782.60870.26
ngcut217103092.333392.33333.8992.33333.2792.33332.34
ngcut321102898.928698.92864.2598.92864.6698.92862.99
ngcut47102081.000081.00000.6981.00000.581.00000.16
ngcut514103698.055698.055648.5798.055650.4198.055645.2
ngcut6151029100.00093.703461.2294.344853.9494.827653.59
ngcut78202043.750043.75000.3943.75000.3443.75000.2
ngcut813203298.906398.906345.898.906343.3298.90635.97
ngcut918204999.387895.914761.6296.122463.497.306131.49
ngcut1013308071.666771.66670.6471.66670.671.66670.29
ngcut1115305098.866792.333351.7391.066746.9991.306737.85
ngcut1222308787.969385.670581.6887.486676.4987.969340.19
beng120253098.800098.80004.8398.80004.6798.80003.19
beng240255799.649199.649121.5899.649122.4999.649116.42
beng360258499.523899.523884.9799.523873.3499.523849.58
beng4802510799.925299.925230.6399.925234.0499.925220.39
beng51002513499.403099.4030196.1399.4030228.5699.4030116.13
beng640403698.611198.611110.8498.611114.9298.611112.6
beng780406799.738899.738853.0399.738842.2399.738824.97
beng81204010199.678298.9697184.2698.8132193.0799.6782123.85
beng91604012699.365198.83961063.1199.3651880.5299.3651735.11
beng102004015699.631498.62381197.3598.79031206.4798.73421178.83
Average91.6365130.2991.7819126.691.8369110.76
Table 5. Comparison of results in least-waste-first heuristic algorithm (LWF), hybrid simulated annealing algorithm (HSA), iterative bidirectional heuristic placement (IBHP), and hybrid adaptive genetic algorithm (HAGA).
Table 5. Comparison of results in least-waste-first heuristic algorithm (LWF), hybrid simulated annealing algorithm (HSA), iterative bidirectional heuristic placement (IBHP), and hybrid adaptive genetic algorithm (HAGA).
InstancesLWFHSAIBHPHAGA
F/%Time/sF/%Time/sF/%Time/sF/%Time/s
J1-J2------99.9614.45
C11-C7399.444436.7999.807841.2799.9273-99.98232.29
N1-N1299.74829.8399.911335.2399.97-99.74913.76
cgcut1-cgcut395.915133.4296.534140.0097.0895-97.575599.55
gcut1-gcut1390.631842.8989.565360.0289.6397-89.6145108.36
ngcut1-ngcut1285.55592.7685.141825.0185.3714-86.554918.38
beng1-beng1099.37786.0799.33126.0599.4326-99.3429228.12
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Li, Y.-B.; Sang, H.-B.; Xiong, X.; Li, Y.-R. An Improved Adaptive Genetic Algorithm for Two-Dimensional Rectangular Packing Problem. Appl. Sci. 2021, 11, 413. https://doi.org/10.3390/app11010413

AMA Style

Li Y-B, Sang H-B, Xiong X, Li Y-R. An Improved Adaptive Genetic Algorithm for Two-Dimensional Rectangular Packing Problem. Applied Sciences. 2021; 11(1):413. https://doi.org/10.3390/app11010413

Chicago/Turabian Style

Li, Yi-Bo, Hong-Bao Sang, Xiang Xiong, and Yu-Rou Li. 2021. "An Improved Adaptive Genetic Algorithm for Two-Dimensional Rectangular Packing Problem" Applied Sciences 11, no. 1: 413. https://doi.org/10.3390/app11010413

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop