Abstract

Packing orthogonal unequal rectangles in a circle with a mass balance (BCOURP) is a typical combinational optimization problem with the NP-hard nature. This paper proposes an effective quasiphysical and dynamic adjustment approach (QPDAA). Two embedded degree functions between two orthogonal rectangles and between an orthogonal rectangle and the container are defined, respectively, and the extruded potential energy function and extruded resultant force formula are constructed based on them. By an elimination of the extruded resultant force, the dynamic rectangle adjustment, and an iteration of the translation, the potential energy and static imbalance of the system can be quickly decreased to minima. The continuity and monotony of two embedded degree functions are proved to ensure the compactness of the optimal solution. Numerical experiments show that the proposed QPDAA is superior to existing approaches in performance.

1. Introduction

2D rectangle packing problems are derived from the industry and antiaircraft field [13]. They occur in logistics packing, plate cutting, the layout design of the very large scale integration (VLSI), and satellite modules. They can be divided into unconstrained rectangle packing problems [1] and constrained ones [3]. Both are NP-hard problems and are difficult to be solved. However they have attracted much attention and some packing approaches for different containers have been reported in literatures.

For the 2D rectangle container, the packing approaches mainly include graph theories [47], branch-and-bound methods [810], dynamic planning [11], heuristics [1215], artificial intelligent [16], evolutionary approaches [17], and hybrid approaches [1820]. Regarding the strip container, main packing approaches are branch-and-bound methods [21], heuristics [22, 23], and evolutionary approaches [24, 25]. On the 2D polygon or 3D polyhedron container, the existing packing approaches have heuristics [26], evolutionary approaches [2729], and integer programming [30]. Some scholars are interested in the packing problem of the convex region and have proposed heuristics [26] and branch-and-bound approaches [31].

The layout design problem of the satellite module described in [32] is an important packing problem, which can be transformed into the problem of packing 2D orthogonal unequal rectangles within a circular container with the mass balance (BCOURP). In 1999, Feng et al. [33] built a mathematical model of this problem and analyzed the isomorphism and equivalent intrinsic properties among its layout schemes by using the graph theory and group theory and proposed a theoretical global optimization algorithm. In 2007, Xu et al. [34] defined embedded degree functions between two rectangles and between the rectangle and circular container and presented a compaction algorithm with the particle swarm local search (CA-PSLS). Their idea is that a feasible solution with a smaller envelope radius obtained through the gradient method is taken as an elite individual and the optimal solution is obtained by the PSO iteration. In 2010, Xu et al. [35] suggested a heuristic algorithm ordered by GA (GA-HA, see its algorithm steps in Appendix A and Figure 1). Its key technology is the positioning strategy of constructing the feasible solution. By combining it with GA, the computational efficiency and solution quality are improved.

Generally, there exist strong points and deficiencies for each type of approaches.(i)For approaches based on the graph theory, there exists combinatorial explosion when the adjacent topological relation is transformed into the layout diagraph without a size limit for the large-scale layout problem. This is because only two limited relations called the vicinity and distance can be used in pruning branch.(ii)The heuristic method can be used to quickly construct a feasible solution. But it is generally not easy to devise a good heuristic strategy, unless the designer makes a long time painstaking effort and has good luck.(iii)Stochastic algorithms have the global search ability, but there exists the bottleneck of time-costing overlapping area calculation for them [33]. By combining the heuristic method with the stochastic algorithm, their respective advantages can be exerted to the utmost. Based on this mechanism, CA-PSLS and GA-HA are consecutively proposed to solve this problem. According to No Free Lunch Theory [36], how to obtain the knowledge from the problem itself and its area and fuse it into the heuristic and stochastic search mechanism is a way of designing a high performance approach for this problem.

Huang et al. [3740] presented a quasiphysical and quasihuman heuristic algorithm and its variants for the circle packing problem. They obtained excellent results. For BCOURP, Xu et al. [34] proposed CA-PSLS based on embedded degrees between circumcircles of two rectangles and between the container and rectangle’s circumcircle. But due to the discontinuity of the two embedded degree functions, it is difficult to obtain a high quality solution by using CA-PSLS. That is, constructing the continuous rectangular embedded function and exploring a better optimized mechanism are necessary for this problem. Therefore, in this paper, we consider two definitions of monotonous and continuous embedded degrees between two orthogonal rectangles and between an orthogonal rectangle and the container and suggest a dynamic adjustment strategy. We merge them into the proposed QPDAA to improve the solution quality of BCOURP. Numerical experiments will test effectiveness of the considered QPDAA.

The remainder of this paper is organized as follows. The problem statement and mathematical model are in Section 2. The compact and feasible solution strategy and dynamic adjustment strategy are given in Sections 3 and 4, respectively. This algorithm is presented in Section 5. Section 6 is experiments and analysis. The conclusion is shown in Section 7. The final part is acknowledgment.

2. Problem Statement and Mathematical Model

Consider the following two related definitions where and is the number of rectangles.

Definition 1. As shown in Figure 2, let the origin of the Cartesian coordinate system be the center of the container. Let denote the th () rectangle and let (), , , , and be its center, length, width, mass, and direction angle between its long side and the positive direction of the -axis, respectively. Then a layout scheme of rectangles () () can be denoted by ().

Definition 2. For a layout scheme , if or 90°, then is an orthogonal rectangle packing scheme, () is an orthogonal rectangle, and the packing is the orthogonal rectangle packing (see Figure 3).

Herein this paper considers only orthogonal rectangle packing schemes.

Suppose that the center of each rectangle coincides with its mass center. Let be a rectangle set ; then the mathematical model of this problem can be described as follows. Find a solution and satisfies Formulas (1)–(4). Consider

In Formula (1), denotes the radius of the enveloping circle of the scheme whose circular center is at . Formula (2) indicates that there is no overlap region between two rectangles and . Formula (3) indicates that all rectangles are contained in the container. In Formulas (2) and (3), denotes the interior region of the rectangle . Formula (4) means that the static imbalance of the solution is less than its threshold , where .

3. Compact and Feasible Solution Strategy

Based on the potential energy function of the embedded degree between two circles, Huang et al. [3840] proposed the quasiphysical strategy and its variants for the circle packing problem. Inspired by the quasiphysical idea, we suggest a compact and feasible strategy for BCOURP.

3.1. Embedded Degree Function and Related Properties

Xu et al. [34] defined the embedded degrees between two rectangles and between the rectangle and container by Definitions 3 and 4, respectively.

Definition 3. Let and ( and ) denote the radii of the circumscribed circles of two rectangles and , respectively, and (see Figure 4(a)) the embedded degree between them (see Figure 4(a)); then can be calculated by

Definition 4. Let and () denote the radii of the container and circumscribed circle of the rectangle , respectively, and (see Figure 4(b)) the embedded degree between the rectangle and container; then can be calculated by

Both of the above two embedded degree functions are discontinuous in the critical state from overlapping to separating, as has been discussed by Stoyan and Yaskov [41]. For example, as shown in Figure 5, by moving one rectangle along a direction, two rectangles with the overlap area of (state 1) are changed into and (state 2). By Formula (5), we know that for state 1, but for state 2. So, in Definition 3 is discontinuous where ( and ). Similarly, () in Definition 4 is also discontinuous (see Figure 6). Owing to their discontinuity, it is difficult to select an appropriate step length to obtain the feasible and compact layout scheme for the gradient iteration of CA-PSLS. Inspired by [41], Definitions 5 and 6 are given for the considered QPDAA.

Definition 5. For two rectangles and ( or , and ) (shown in Figure 7), let and be the radii of their circumscribed circles, respectively, and let denote their embedded degree; then can be calculated by In Formula (7), , . Here, if , , , , and (see Figure 7(a)); otherwise, , , , and (see Figure 7(b)).

In Formula (7), the embedded degree between two rectangles is the moving distance of the rectangle from an overlap state with the stationary to the separation state along the direction from the center to the center . If and are two squares, and the center of is on the diagonal line of and enough close to its center (i.e., and ), the moving distance of from the initial state (shown in Figure 8(a)) to the separate state (shown in Figure 8(b)) along the direction of their diagonal lines is about . Thus in the initial state, their embedded degree is close to the maximal value . In addition, when and/or , and/or . That is, .

Definition 6. For the rectangle ( or , ) and the circle container as shown in Figure 7, let denote the embedded degree between the rectangle and container; then can be calculated by
The geometric interpretation of Definition 6 is that when the farthest vertex of the rectangle () from the coordinate origin is within the container, their embedded degree ; otherwise it is the length of the straight line segment pointed by in Figure 9.

For embedded degree functions in Definitions 3 and 5, their geometric figures are two curved semi-cone surfaces shown in Figures 10(a) and 10(b), respectively, where it is obvious that there is a gap between the semi-cone surface and plane in Figure 10(a) but there is no gap between them in Figure 10(b). It is not difficult to assert that the difference of geometric figures of two embedded degree functions in Definitions 4 and 6 is the same as the above one. After describing Lemma 7, we propose properties of two embedded degree functions in Definitions 5 and 6, respectively.

Lemma 7. If a binary function is continuous for each variable in a domain, respectively, and is monotonous for the variable or , then the function is continuous in the domain.

Property 1. , let and ( and or ) be two rectangles, and the domain . Then in Definition 5 is a continuous binary function in the domain .

Proof. and , set . From Definition 5, we know that the function is continuous on both and . Here, we prove that it is continuous on the domain .
For , Simultaneously, This is because
According to Lemma 7, the binary function is continuous on the domain . Therefore, is continuous on the domain .

Property 2. and , for the container with the radius and rectangle ( or , ), set and ; then the binary function in Definition 6 is continuous on the domain .

3.2. Extruded Force and Energy Function

In order to quickly decrease the overlapping area of the rectangle packing system, we define the extruded forces between two rectangles and between the rectangle and container.

Definition 8. Let and be two rectangles with the embedded degree ( and ). Then the extruded force between and is calculated by

Definition 9. Let () and denote the rectangle and container. Then the extruded force between and can be calculated by Formula (13), whose direction is the direction from the center of the container to the furthermost rectangular vertex (see Figure 6):
By experiments, we can know that .
So, the extruded resultant force of () in the rectangle packing scheme can be calculated by

Definition 10. Let and ( and ) denote extruded potential energies of with respect to and the container, respectively. Then can be calculated by Formula (15), where and denote two embedded degrees between two rectangles and and between the rectangles and container:

Definition 11. The total extruded potential energy of can be calculated by
Let be the area of the rectangle ; then and () are its absolute and relative extruded potential energies, respectively.

3.3. Compact and Feasible Solution Strategy

By predetermining envelope radius of this problem, the extruded force and direction can be calculated by Formula (13). The extruded force of the envelope circle makes each rectangle close to the center of the container in the direction. For each rectangle, the extruded forces of all others with respect to the rectangle drive away themselves to relieve the pressure in respective direction and their extruded resultant force is calculated by Formula (12). In this paper, the above two steps are used to decrease the overlapping area of the packing scheme and make it compact.

4. Dynamic Adjustment Strategy

Considering the problem of the low efficiency and possible local optimum (e.g., large static imbalance) of the iteration of two steps in Section 3.3, we propose Property 3 and dynamic adjustment strategy for QPDAA.

4.1. Related Property

For optimizing the static imbalance of the layout scheme, we introduce Property 3.

Property 3. Assume is the mass center of an orthogonal packing scheme of this problem and and is another scheme obtained by interchanging centers of two rectangles with a mass and ( and ) with a mass in . If , , centers and satisfy Formula (17), then , where (): In Formula (17), .

Proof . Consider
Property 3 indicates that, for selecting rectangle , we can find a rectangle in the sector area with an angle (shown as in Figure 11) and interchange them to obtain whose static imbalance is less than . Here, the angle satisfies

4.2. Dynamic Adjustment Strategy

Let ; we consider the following dynamic adjustment strategy.

4.2.1. Rectangle-Interchanging

According to Property 3, the static imbalance of the packing scheme can be decreased by interchanging positions of two rectangles.

Two rectangles, with a smaller mass and with a larger mass , are selected from . If and satisfy Formula (17), then we update by , , .

4.2.2. Rotation and Off-Trap

(i) A rectangle with a larger pain degree is found out from and is rotated 90° round its center counterclockwise direction to relieve its pain. (ii) A rectangle with a larger pain degree is found out from and is moved to such a place in the container where its pain degree is smaller. We know that the role of (ii) is similar to a construction of the nonisomorphic layout pattern [42, 43].

4.2.3. Center Translation

If its mass center , then .

5. The Proposed Algorithm

Through an organic combination of the compact and feasible solution strategy and dynamic adjustment strategy, we present QPDAA for BCOURP.

Let and be the predetermined value and an allowable maximum of the envelope radius of the solution, respectively; is the number of rectangles. , , and denote the mass center, envelope radius, and extruded potential energy of the packing scheme , respectively. () is the extruded potential energy of the rectangle ; is the step length; is the maximum translation times. Then steps of the proposed QPDAA are shown in Algorithm 1.

Definite , , , , , , , , , , , , and initialize , , , , , , , ;
Do
{
 Randomly generate with the envelope radius and calculate ; ;
 If
  Continue;
 Else break;
 While (1)
 {   Do
  {  ; for , calculate of and ;
    Calculate and ;
    If ( and )
    Else if
      Else if   ; break;}
  } While <  1 and );
  If ( or ) break;
  If find and which satisfy Formula (17) in and , , ;
  Find so that ;
  If () {by rotating , is obtained;
       If () update   by moving (), ;}
  Else find so that , and update   by rotating ;
  If (), update by moving () out, ;
 }
} while ();
Calculate the mass center , and , and calculate ;
Output the layout scheme and envelope radius ;
End the algorithm.

6. Experiments and Analysis

6.1. Experiments

The proposed QPDAA is coded in VC++ 6.0 and carried on a Pentium 3 GHZ PC with 512 MB memory. CA-PSLS [34], GA-HA [35] are coded in VC++ 6.0 and two algorithms are carried on a Pentium 1.83 GHZ with 512 MB memory; IGA [44] is carried on an IBM 586 166 MHz.

Experiment 1. Five examples are taken from [33, 35] and are used in testing the performance of the proposed QPDAA. Data of all examples are shown in Table 1. For the proposed algorithm, we take , , , , , and , respectively. For Examples , we take = 11.4, 14.3, 17.5, 22.3, and 115.5 and take , , , , and , respectively. Running the proposed QPDAA 30 times for each example (the success rate is 100%), we show its average running time, average envelope radius, standard variance of the radius, and the maximum and minimum envelope radii in Table 2; for each example, its layout scheme diagraph is shown in Figure 12; the other data in Table 2 is taken from [3335]. The optimal layout schemes of the proposed QPDAA are shown in Tables 3, 4, 5, and 6 for 5 examples.

Experiment 2. For testing the effects of and on the minimal radius and running time with the proposed QPDAA, we take another set of and (five examples and other parameters are the same as those of  Experiment 1) and run the proposed QPDAA procedure 30 times for each example. The minimal radii and running times are given in Table 7. Their layout schemes and layout diagraphs are shown in Tables 8, 9, 10, and 11 and Figure 13. It can be found from Table 7 that changing values of and we can obtain the packing scheme with a smaller envelop radius, but it costs more time for each example. So, values and in Experiment 1 can be applied to make a tradeoff between the computational effectiveness and solution quality.

In order to further test the effectiveness of the proposed QPDAA, we consider Experiment 3.

Experiment 3. Numbers of rectangles (generated randomly) of three examples are 50, 55, and 60 and their lengths and widths are between 20 and 40. For the proposed QPDAA, we take , , , , , , = 125.9, 133.8, 137.2, and = 126.8, 134.6, 138.8 for Examples , respectively. For GA + HA, the population size, mutation probability, and max number of the iteration are 30, 0.125, and 50, respectively. By running HA + GA and the proposed QPDAA 30 times for three examples, respectively, their optimal envelop radii and average times are shown in Table 12, respectively. The optimal packing scheme diagrams of GA + HA and the proposed QPDAA are shown in Figures 14(a)14(c) and Figures 14(d)14(f). We can know from Table 12 that both the solution quality and computational quality of the proposed QPDAA are obviously higher than those of GA + HA.

Note that, in Experiment 3, the procedure of GA + HA is coded by author and is carried on a Pentium 3 GHZ with 512 MB memory.

6.2. Analysis

From data of Tables 2, 7, and 12, we know that the solution quality of the proposed QPDAA algorithm is higher than those of CA-PSLS and GA-HA. Compared with those of CA-PSLS, embedded degree functions of the proposed QPDAA can make the layout scheme more compact. Due to the fixed candidate positions of GA + HA, it is difficult to find the best position for some rectangles close to the marginal region of the container. The deficiency of a mechanism of decreasing the static balance in the process of packing rectangles also limits the solution quality of GA + HA. The experimental results illustrate the effectiveness of the proposed QPDAA.

The computational efficiency of the proposed QPDAA is one magnitude higher than those of CA-PSLS. There are two reasons. (i) Owing to orthogonal packing, searching the optimal solution in the 2D solution of the proposed QPDAA is easier than that in the 3D solution space of CA-PSLS. (ii) In order to improve the solution quality of CA-PSLS, PSO is used to optimize the feasible solution obtained through the gradient method based on two discontinuous embedded degree functions, but the proposed QPDAA need not do the PSO optimization without reducing its solution quality. Except for Example 1, the computational efficiency of the proposed QPDAA is higher than that of GA + HA. And with the increase of the size of the packing problem, the advantage of the proposed QPDAA is more obvious. This is because computational complexities of the extruded resultant force and potential energy are in this paper, but the computational complexity of noninterference judgment is . In addition, for GA + HA, with the increasing of the number of rectangles, the number of candidate positions of each rectangle increases dramatically. These reasons lead to the computational efficiency of the proposed QPDAA higher than that of GA + HA for the BCOURP with a large size.

7. Conclusions

Taking the layout design of a satellite module as the application background, we have proposed the QPDAA for the BCOURP problem in this paper. Two continuous embedded functions between orthogonal rectangles and between the rectangle and container are constructed to overcome the weakness of embedded functions in [34]. And the suggestion of the extruded resultant force formula and the potential energy function of the rectangle packing system based on the proposed embedded functions make solving the BCOURP problem simple and effective as solving the circle packing problem [3740]. The proposed dynamic adjustment strategy can quickly decrease the static imbalance of the packing scheme and make the iteration skip the local optimum. The experiment results show that the proposed QPDAA is superior to existing algorithms in performance for the BCOURP problem, especially for the BCOURP problem with the large size. The next work is to extend the above algorithm into solving the 3D satellite module payload packing problem.

Appendices

A. HA + GA [35]

Input the length, width, and mass of the rectangle () in turn, initialize the number of the maximal iteration times, and generate their placing sequence set .

Step 1. Set .

Step 2. Set the center of at and its long side is parallel to -axis, , .

Step 3. For , calculate centers and direction angles of 16 candidate positions (see Figure 1) of the rectangle with respect to the rectangle . From its candidate positions eliminate unfeasible ones and calculate the optimal one (i.e., compared with other feasible candidate positions, it makes the packing scheme of the first rectangles have less envelop radius).

Step 4. If then update the current packing scheme, , and go to Step 3; otherwise, go to Step 5.

Step 5. If then update the optimal packing scheme and use GA to generate a new placing sequence set and go to Step 2; otherwise, go to Step 6.

Step 6. Output the optimal packing scheme and envelop radius; algorithm ends.

B. Results of Experiment 2

See Tables 8, 9, 10, and 11 and Figure 13.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

This work is supported by the National Natural Science Foundation of China (Grant no. 61272294) and Research Foundation of Education Bureau of Hunan Province, China (Grant no. 11A120), and the Construct Program of the Key Discipline in Hunan Province. And the authors are also grateful to the anonymous referees for their advice and reviews for this paper.