Integer Programming Formulations for Approximate Packing Circles in a Rectangular Container

A problem of packing a limited number of unequal circles in a fixed size rectangular container is considered. The aim is to maximize the (weighted) number of circles placed into the container or minimize the waste. This problem has numerous applications in logistics, including production and packing for the textile, apparel, naval, automobile, aerospace, and food industries. Frequently the problem is formulated as a nonconvex continuous optimization problem which is solved by heuristic techniques combined with local search procedures. New formulations are proposed for approximate solution of packing problem. The container is approximated by a regular grid and the nodes of the grid are considered as potential positions for assigning centers of the circles. The packing problem is then stated as a large scale linear 0-1 optimization problem. The binary variables represent the assignment of centers to the nodes of the grid. Nesting circles inside one another is also considered. The resulting binary problem is then solved by commercial software. Numerical results are presented to demonstrate the efficiency of the proposed approach and compared with known results.


Introduction
Packing problems generally consist of packing of a certain number of items of known dimensions into one or more large objects or containers so as to minimize a certain objective (e.g., the unused part of the objects or waste). The shape of items and containers may vary from a circle, a square, a rectangle, and so forth.
This problem has been applied in different areas, such as the coverage of a geographical area with cell transmitters, storage of a cylindrical drums into containers or stocking them into an open area, packaging bottles or cans into the smallest box, planting trees in a given region so as to maximize the forest density and the distance between the trees, and so forth [1][2][3]. One can find other applications in the motor cycle industry, circular cutting, communication networks, facility location, and dashboard layout [4][5][6][7][8].
In this paper we address the problem of packing a set of circular items in a rectangular container. There are two principal types of objectives that have been used in the literature: (a) regard the circles (not necessary equal) as being of fixed size and the container as being of variable size and (b) regard the circles and the container as being of fixed size and minimize "waste. " Examples of the first approach include the following [9].
(i) For the square container minimize the length of the side and hence minimize the perimeter and area of the square. For the second approach various definitions of the waste can be used. The waste can be defined in relation to circles not packed (e.g., the number of unpacked circles or the perimeter/area of unpacked circles) or introducing a value associated with each circle that is packed (e.g., area of the circles packed), and so forth.
Many variants of packing circular objects in the plane have been formulated as nonconvex (continuous) optimization problems with decision variables being coordinates of the centres. The nonconvexity is mainly provided by no overlapping conditions between circles. These conditions typically state that the Euclidean distance separating the centres of the circles is greater than a sum of their radii. The nonconvex problems can be tackled by available nonlinear programming (NLP) solvers; however, most NLP solvers fail to identify global optima. Thus, the nonconvex formulation of circular packing problem requires algorithms which mix local searches with heuristic procedures in order to widely explore the search space. It is impossible to give a detailed overview on the existing solution strategies and numerical results within the framework of a single short paper. We will refer the reader to review papers presenting the scope of techniques and applications for the circle packing problem (see, e.g., [1,2,[10][11][12][13] and the references therein).
In this paper we propose a new formulation for approximate solution of packing problems based on using a regular grid to approximate the container. The nodes of the grid are considered as potential positions for assigning centers of the circles. The packing problem is then stated as a large scale linear 0-1 optimization problem. The binary variables represent the assignment of centers to the nodes of the grid. The resulting binary problem is then solved by commercial software. To the best of our knowledge, the idea to use a grid was first implemented by Beasley [14] in the context of cutting problems. Recently this approach was applied in [15,16] for packing problems. This work is a continuation of [16].

The Model
Suppose we have nonidentical circles of known radius , ∈ = {1, 2, . . . }. Let at most circles be available for packing, and at least of them have to be packed. Denote by ∈ = {1, 2 . . . , } the node points of a regular grid covering the rectangular container. Let ⊆ be the grid points lying on the boundary of the container. Denote by the Euclidean distance between points and of the grid. Define binary variables = 1 if centre of a circle is assigned to the point In what follows we will distinguish two cases of circle packing, depending on whether nesting circles inside one another is permitted or not. To the best of our knowledge, nesting problem was first mentioned in [6] in the context of packing pipes of different diameters into a shipping container. Compared to the standard packing, packing with nesting is much less investigated.
Consider first the problem without nesting. In order to let the circle assigned to the point be nonoverlapping with other circles being packed, it is necessary that = 0 for ∈ , ∈ , such that < + . For fixed , let = { , : ̸ = , < + }. Let be the cardinality of : = | |. Then the problem of maximizing the area covered by the circles can be stated as follows: Constraints (2) ensure that the number of circles packed is between and ; constraints (3) ensure that at most one centre is assigned to any grid point; constraints (4) ensure that the point cannot be a centre of the circle if the distance from to the boundary is less than ; pairwise constraints (5) guarantee that there is no overlapping between the circles; constraints (6) represent the binary nature of variables.
Similar to plant location problems [17] we can state nonoverlapping conditions in a more compact form. Summing up pairwise constraints (5) over ( , ) ∈ we get Note that constraints similar to (7) were used in [15] for packing equal circles. (5) and (6) are equivalent to constraints (6) and (7).
Thus the problem (1)-(6) is equivalent to the problem (1)-(4), (6), and (7). To compare two equivalent formulations, let Proof. Since constraints of 2 are obtained by summing up some constraints of 1 , then 1 ⊆ 2 . To show that 1 ⊂ 2 we need to find a point in 2 that is not in 1 .
with , ≥ 2. The corresponding solution is Thus this point violates corresponding constraint (5) in 1 and hence 1 ⊂ 2 as desired.
The redundant constraints can be eliminated giving a reduced pairwise nonoverlapping formulation. The overall set of the reduced constraints is independent of whether we will eliminate the first constraint above or the second. However, the way of eliminating redundant constraints will affect the corresponding compact formulation obtained by summing up the reduced constraints.
To consider nesting circles inside one another, we only need to modify the nonoverlapping constraints. In order to let the circle assigned to the point be nonoverlapping with other circles being packed (including circles places inside this circle), it is necessary that = 0 for ∈ , ∈ , such that − < < + . Note that the later condition is always fulfilled for < ( ≥ 0), such that only smaller circles can be placed inside a given circle. For fixed , let Ω = { , : ̸ = , | − | < < + }. Then the problem of packing circles with nesting can be stated as follows: Here weighting coefficients may be associated with the area of circles and/or represent the relative importance of subsets of the container.

Computational Results
A rectangular uniform grid was used in the numerical experiments, such that all grid points are defined by the grid points on its edges. Let be a horizontal dimension (length) and let be a vertical dimension (width) of the container; let be a number of the equidistant grid points on the horizontal edge of the container, while is a number of the equidistant grid points on its vertical edge. Hence the grid has × node points ( = × ). All optimization problems were solved by the system CPLEX 12.5. The runs were executed on a DELL Power Edge T410, Intel Xeon 2.53 Ghz and 16 Gb RAM.
First, we compare different formulations for the case of packing equal circles. The same set of 9 instances as in [15, Table 3] was used for the experiment. The number of circles available for packing was not limited. The following formulations were considered: pairwise formulation (1)-(6) (complete), reduced formulation (1)-(6) without redundant constraints (half ), compact formulation (1)-(4), (6), and (7) (compact), and compact formulation obtained from (1)-(6) without redundant constraints (compact half ). The results of the numerical experiment are presented in Table 1. Here the first four columns present circle radius, dimension of the quadratic cell used to construct the grid (Δ), the number As we can see from Table 1, CPU time for the complete formulation is typically much lower than for the compact formulation, especially for large problems. Note that according to Proposition 2, complete (pairwise) formulation is stronger than the compact one. Eliminating redundant constraints typically (but not always) reduces CPU time, although for complete formulation eliminating redundancy does not change the continuous relaxation. This effect is well known for users of CPLEX since simply rearranging constraints may result in increase/decrease of computational time, depending on the path selected by branch and bound algorithm. However, we may conclude that eliminating redundant constraints is useful for large problems. Figures 1, 2, 3, and 4 present packing pictures, for instance, from Table 1

Conclusions
Different integer formulations were proposed for approximate solution of the circle packing problem. We demonstrate that the pairwise formulation is stronger than the compact one obtained by summing up the nonoverlapping constraints. The presented approach can be easily generalized to the three-(and more) dimensional case and to different shapes of the container, including irregulars. We also proposed a formulation permitting nesting circles inside one another. This problem was mentioned in [7] in the context of packing pipes of different diameters into a shipping container and has not received much attention so far. An interesting direction for the future research is to study the use of Lagrangian relaxation and corresponding heuristics [3] to cope with large dimension of arising problems. Another area for future study is the use of valid inequalities for strengthening the formulations, as well as combining continuous and integer 6 Mathematical Problems in Engineering Figure 8 formulations in the solution process. Some complements in these directions are in course [16].