Acessibilidade / Reportar erro

A MODEL-BASED HEURISTIC FOR THE IRREGULAR STRIP PACKING PROBLEM

ABSTRACT

The irregular strip packing problem is a common variant of cutting and packing problems. Only a few exact methods have been proposed to solve this problem in the literature. However, several heuristics have been proposed to solve it. Despite the number of proposed heuristics, only a few methods that combine exact and heuristic approaches to solve the problem can be found in the literature. In this paper, a matheuristic is proposed to solve the irregular strip packing problem. The method has three phases in which exact mixed integer programming models from the literature are used to solve the sub-problems. The results show that the matheuristic is less dependent on the instance size and finds equal or better solutions in 87,5% of the cases in shorter computational times compared with the results of other models in the literature. Furthermore, the matheuristic is faster than other heuristics from the literature.

Keywords:
matheuristics; irregular strip packing; mixed integer programming models

1 INTRODUCTION

Irregular cutting and packing problems have been extensively studied over the last five decades. The problem consists of cutting irregular pieces from a given object. Overlaps between pieces must be avoided, and the pieces must be entirely inside the object. The irregular strip packing problem is a common variant of this problem where the object is a rectangular board with fixed width and a length that is to be minimized. This problem is found in several industries, such as garment and shoe manufacturing, sheet metal cutting and furniture. From an economic point of view, the solution to the problem reduces the amount of material necessary to produce the pieces, decreasing the waste and hence the production costs.

The irregular strip packing problem is NP-complete (Fowler et al., 198112 FOWLER RJ, PATERSON M & TANIMOTO SL. 1981. Optimal packing and covering in the plane are np-complete. Inf. Process. Lett., 12(3): 133-137.), and because of its difficulty only a few exact approaches have been proposed to solve it. (Carravilla et al., 20037 CARRAVILLA MA, RIBEIRO C & OLIVEIRA JF. 2003. Solving nesting problems with nonconvex polygons by constraint logic programming. International Transactions in Operational Research, 10: 651-663.) presented an approach based on implicit enumeration and constraint logic programming. The first mixed integer programming model was presented by (Fischetti & Luzzi, 200911 FISCHETTI M & LUZZI I. 2009. Mixed-integer programming models for nesting problems. Journal of Heuristics, 15(3): 201-226.). (Alvarez-Valdes et al., 20132 ALVAREZ-VALDES R, MARTINEZ A & TAMARIT J. 2013. A branch & bound algorithm for cutting and packing irregularly shaped pieces. International Journal of Production Economics, 145(2): 463- 477.) improved this last model and proposed a branch and cut method to solve it. The authors also described a mixed integer programming model based on the compaction model presented by (Gomes & Oliveira, 200614 GOMES A & OLIVEIRA JF. 2006. Solving irregular strip packing problems by hybridising simulated annealing and linear programming. European Journal of Operational Research, 171(3): 811-829.). A new MIP model that represents the board by a mesh of dots (grid) was introduced by (Toledo et al., 201326 TOLEDO FMB, CARRAVILLA MA, RIBEIRO C, OLIVEIRA JF & GOMES AM. 2013. The dottedboard model: a new MIP model for nesting irregular shapes. International Journal of Production Economics, 145(2): 478-487.). In this model, the pieces can only be positioned at the dots of a grid, and consequently, the solution optimality is subject to the grid used. Recently, (Leão et al., 201620 LÊAO AAS, TOLEDO FMB, OLIVEIRA JF & CARRAVILLA MA. 2016. A semicontinuous MIP model for the irregular strip packing problem. International Journal of Production Research, 54(3): 712-721.) proposed a model where the pieces can be placed continuously along the x-axis and at discrete positions along the y-axis to combine the best characteristics of the previous models.

In contrast to the number of exact approaches, many heuristics have been proposed to solve the problem. These methods can be classified as constructive heuristics or improvement heuristics (Bennell & Oliveira, 20094 BENNELL JA & OLIVEIRA JF. 2009. A tutorial in irregular shape packing problems. Journal of the Operational Research Society, 60: S93-S105.). Constructive heuristics aim to build a solution to the problem using some particular strategy. “Bottom-left-fill” heuristic (Burke et al., 20066 BURKE E, HELLIER R, KENDALL G & WHITWELL G. 2006. A new bottom-left-fill heuristic algorithm for the two-dimensional irregular packing problem. Operations Research, 54(3): 587-601.), “2-exchange heuristic” (Gomes & Oliveira, 200215 GOMES AM & OLIVEIRA JF 2002. A 2-exchange heuristic for nesting problems. European Journal of Operational Research, 141(2): 359-370.) and “TOPOS” (Oliveira et al., 200024 OLIVEIRA JF, GOMES AM & FERREIRA JS. 2000. Topos - a new constructive algorithm for nesting problems. OR Spektrum, 22: 263-284.) are examples of constructive heuristics. Given a feasible solution, improvement heuristics search for better-quality solutions. The fast neighborhood search developed by (Egeblad et al., 20079 EGEBLAD J, NIELSEN BK & ODGAARD A. 2007. Fast neighborhood search for two- and threedimensional nesting problems. European Journal of Operational Research, 183(3): 1249-1266.) and the simulated annealing heuristic proposed by (Oliveira & Ferreira, 199323 OLIVEIRA JF & FERREIRA J 1993. Algorithms for nesting problems, applied simulated annealing. In Vidal RVV. (Ed., Lecture Notes in Economics andMaths Systems), 396: 255-274.) are examples of improvement heuristics. A complete review of heuristics is presented in (Bennell & Oliveira, 20094 BENNELL JA & OLIVEIRA JF. 2009. A tutorial in irregular shape packing problems. Journal of the Operational Research Society, 60: S93-S105.).

Recently, rather complex and sophisticated heuristic methods have been developed. (Umetani et al., 200927 UMETANI S, YAGIURA M, IMAHORI S, IMAMICHI T, NONOBE K & IBARAKI T. 2009. Solving the irregular strip packing problem via guided local search for overlap minimization. International Transactions in Operational Research, 16(6): 661-683.) presented an overlap minimization algorithm based on translations of pieces along vertical and horizontal directions. The algorithm is incorporated into a guided local search in order to solve the strip packing problem. (Imamichi et al., 200917 IMAMICHI T, YAGIURA M & NAGAMOCHI H. 2009. An iterated local search algorithm based on nonlinear programming for the irregular strip packing problem. Discrete Optimization, 6(4): 345- 361.) proposed an iterated local search heuristic to solve the problem. The local search swaps the position of a pair of pieces in the solution, and a non-linear programming separation algorithm ensures non-overlap between the pieces. An extended local search heuristic to solve the problem was proposed by (Leung et al., 201219 LEUNG SC, LIN Y & ZHANG D. 2012. Extended local search algorithm based on nonlinear programming for two-dimensional irregular strip packing problem. Computers & Operations Research, 39(3): 678-686.). Two neighborhoods are used to change piece positions during the local search. The feasibility of the solution is reached by non-linear programming separation and compaction models. To solve the problem, (Sato et al., 201225 SATO AK, MARTINS TC & TSUZUKI MSG 2012.An algorithm for the strip packing problem using collision free region and exact fitting placement. Computer-Aided Design, 44(8): 766-777.) proposed two constructive heuristics using the concept of collision-free regions and identifying pieces that fit well. These heuristics are combined with a simulated annealing algorithm in order to obtain better solutions. A compaction model is used to reduce the length of the solutions obtained in each iteration of the algorithm. (Elkeran, 201310 ELKERAN A. 2013. A new approach for sheet nesting problem using guided cuckoo search and pairwise clustering. European Journal of Operational Research, 231(3): 757-769.) proposed a heuristic where in the first step the pieces are clustered in pairs and then a guided cuckoo search heuristic is used to pack the pieces into the board. This heuristic achieves the best results in the literature for the irregular strip packing problem.

Exact and heuristic methods have been successfully combined to solve combinatorial optimization problems (Maniezzo et al., 200921 MANIEZZO V, STÜTZLE T & VOSS S. 2009. Matheuristics: Hybridizing Metaheuristics and Mathematical Programming. Annals of Information Systems. Springer.). In this paper, a model-based heuristic is proposed to solve the irregular strip packing problem. The method has three phases: construction, improvement and compaction. In the constructive phase, a heuristic inspired on the relax-and-fix approach combined with the dotted board model (Toledo et al., 201326 TOLEDO FMB, CARRAVILLA MA, RIBEIRO C, OLIVEIRA JF & GOMES AM. 2013. The dottedboard model: a new MIP model for nesting irregular shapes. International Journal of Production Economics, 145(2): 478-487.) is applied to build an initial solution to the problem. Following the constructive phase, the improvement phase is applied. This phase also uses the dotted board model that is now combined with a Variable Neighborhood heuristic to find better-quality solutions. Finally, in the compaction phase, a model based on the compaction model presented in (Gomes & Oliveira, 200614 GOMES A & OLIVEIRA JF. 2006. Solving irregular strip packing problems by hybridising simulated annealing and linear programming. European Journal of Operational Research, 171(3): 811-829.) with additional constraints is solved in order to compact the solution found in the improvement phase removing some gaps resulting from the grid dependence of the dotted board model.

The contributions of this paper are the following: (1) a method that constructs a solution for instances with several items using an iterative procedure based on a mixed integer programming model; (2) new constraints are proposed for the (Toledo et al., 201326 TOLEDO FMB, CARRAVILLA MA, RIBEIRO C, OLIVEIRA JF & GOMES AM. 2013. The dottedboard model: a new MIP model for nesting irregular shapes. International Journal of Production Economics, 145(2): 478-487.) model in order to perform local searches with different grids. (3) Using a model based on (Gomes & Oliveira, 200614 GOMES A & OLIVEIRA JF. 2006. Solving irregular strip packing problems by hybridising simulated annealing and linear programming. European Journal of Operational Research, 171(3): 811-829.), a new compaction model is proposed, and (4) a model where the pieces are continuously placed on the board is integrated with models that consider pieces placed on discrete points.

This paper is organized as follows: section 2 provides a problem definition and describes the dotted board model that is used in the solution method. The model-based heuristic is presented in section 3. Section 4 contains the computational experiments performed on instances from the literature. Finally, section 5 provides conclusions and presents some highlights.

2 PROBLEM DEFINITION

The irregular strip packing problem consists of cutting irregular pieces from a rectangular board of fixed width (W) and infinite length. The objective is to minimize the board length (L) used.

Each piece is represented by a set of points corresponding to its vertices. One of these vertices is chosen to be its reference point, which is used to allocate the piece on the board. Given a piece of type t at rotation r, consider lleft tr (lright tr ), the horizontal distance from the leftmost (rightmost) piece vertex to the reference point, and wbottom tr (wtop tr ), the vertical distance from the bottom (top) piece vertex to the reference point. These distances are important for defining the feasible region in the board where the piece can be allocated. Figure 1 illustrates these constants.

Figure 1
Defining the constants lleft tr , wbottom tr , lright tr and wtop tr.

Two necessary conditions must be satisfied to guarantee the solution feasibility. The first, that the pieces must not overlap, is ensured using the nofit polygon (NFP) structure. The construction of the NFP is illustrated in Figure 2. Considering the pieces t at rotation r and u at rotation s as in Figure 2a, the NFPtr us is the polygon drawn by the reference point of u while u orbits around t, always touching but not overlapping t, as illustrated in Figure 2b. The complete NFPtr us is presented in Figure 2c. With this structure, verifying if the pieces t at rotation r and u at rotation s overlap is now reduced to analyzing the relative position between the reference point of piece u and the polygon NFPtr us .

Figure 2
The nofit polygon structure. (a) presents the pieces used to build the NFP, which is built in (b). In (c), the NFP is displayed.

The second condition is that the pieces must be entirely inside the board. This condition is ensured with the inner-fit polygon (IFP) structure of a piece with respect to the board. The inner-fit polygon of a piece t at rotation r (IFPtr ) represents all the positions where the reference point of piece t at rotation r can be placed keeping the piece entirely inside the board, as shown in Figure 3. In the figure, the gray area defines the IFPtr . Note that as we have an upper bound for the board length L, the IFP limits the placement of the pieces. More details on these geometric structures can be found in (Bennell & Oliveira, 20083 BENNELL JA & OLIVEIRA JF. 2008. The geometry of nesting problems: A tutorial. European Journal of Operational Research, 184(2): 397-415.).

Figure 3
The inner-fit polygon structure.

In order to make this text self-contained, the dotted board model proposed in (Toledo et al., 201326 TOLEDO FMB, CARRAVILLA MA, RIBEIRO C, OLIVEIRA JF & GOMES AM. 2013. The dottedboard model: a new MIP model for nesting irregular shapes. International Journal of Production Economics, 145(2): 478-487.) is presented next. For this model, the piece reference points can only be positioned on dots from a given set D that represents the board. The refinement of this grid is defined by the constants gx for horizontal distances and gy for vertical distances.

To define the positioning of the pieces on the board, consider T a set of piece types, i.e., types of pieces with different shapes. Consider also Rt , the set of rotations of piece t. The binary variable δd tr is 1 if the reference point of a piece of type tT at rotation rRt is on dot dD and 0 otherwise. It is important to highlight that the grid D is defined using the distances gx and gy . The number of variables δd tr depends on these constants. The feasible placement positions for each piece type t at rotation r are the dots dD inside , IFPtr which define the DJFPtr set.

For each pair of piece types t at rotation r and u at rotation s, the points that overlap when piece t is placed at dot dDJFPtr are represented by dots inside NFPtr us IFPus , that is, dDJFPd , trus .

The Dotted Board Model (DBM) is the following:

(1)

(2)

(3)

(4)

(5)

(6)

where dx is the x-coordinate of dot d.

The objective function (1) together with constraints (2) minimizes the board length. Constraints (3) guarantee that the pieces do not overlap. Constraints (4) ensure that the demand qt for each piece type t is met. The domain of the variables is defined by constraints (5) and (6). Further details on the dotted board model can be found in (Toledo et al., 201326 TOLEDO FMB, CARRAVILLA MA, RIBEIRO C, OLIVEIRA JF & GOMES AM. 2013. The dottedboard model: a new MIP model for nesting irregular shapes. International Journal of Production Economics, 145(2): 478-487.).

The Dotted Board Model, (1)-(6), is independent on the type of grid that is used. In the following, instead of using regular grids as in (Toledo et al., 201326 TOLEDO FMB, CARRAVILLA MA, RIBEIRO C, OLIVEIRA JF & GOMES AM. 2013. The dottedboard model: a new MIP model for nesting irregular shapes. International Journal of Production Economics, 145(2): 478-487.), the grid of dots based on the piece dimensions proposed by (Cherri et al., 20168 CHERRI LH, CHERRI AC, CARRAVILLA MA, OLIVEIRA JF, TOLEDO FMB & VIANNA ACG. 2016. An innovative data structure to handle the geometry of nesting problems. Technical report, Instituto de Ciências Matemáticas e de Computação, Universidade de São Paulo.) is used, aiming to reduce the number of board dots.

For each piece of type tT at rotation rRt , a grid Dtr is created based on the constants gtr x and gtr y that define the distance between the dots along the horizontal and vertical axes respectively. The value of gtr x is given by the minimum horizontal distance between each pair of vertices of piece of type t at rotation r, but limited by the minimum grid resolution gmin . The constant gtr y is obtained by the same procedure, but by using the minimum vertical distance between each pair of vertices of piece of type t at rotation r. The minimum grid resolution impacts directly the solution quality. The grid for each piece type t at rotation r is generated using the constants gtr x and gtr y .

Figure 4 represents an example of a grid by piece generated for the piece type in Figure 4 (a). For this piece, gtr y = 6 and gtr x = 4. Along the vertical axis, the horizontal lines are generated in intervals of gtr y units and two starting points are used, the lowest point of the board (Fig. 4 (b)) and the highest point of the board (Fig. 4 (c)). This strategy ensures that the pieces can always touch the boundaries of the board. Along the horizontal axis, the vertical lines are equally spaced by gtr x units, starting from the leftmost point of the board (Fig. 4 (d)). The Dtr set comprises the intersection points between the horizontal and vertical lines.

Figure 4
Building the mesh by piece for the piece in (a)

3 3-PHASE MATHEURISTIC (3PM)

The 3-Phase Matheuristic is based on two mathematical models, the Dotted Board Model of (Toledo et al., 201326 TOLEDO FMB, CARRAVILLA MA, RIBEIRO C, OLIVEIRA JF & GOMES AM. 2013. The dottedboard model: a new MIP model for nesting irregular shapes. International Journal of Production Economics, 145(2): 478-487.) and the compaction model of (Gomes & Oliveira, 200614 GOMES A & OLIVEIRA JF. 2006. Solving irregular strip packing problems by hybridising simulated annealing and linear programming. European Journal of Operational Research, 171(3): 811-829.). Our objective is to obtain good-quality solutions in a short computational time. The proposed method has three phases:

  • Constructive Phase: finding an initial feasible solution using the Dotted Board Model;

  • Improvement Phase: improving the initial solution using the Dotted Board Model;

  • Compaction Phase: improving the best solution found so far using the linear compaction model.

In the subsections (3.1)-(3.3), the three phases of 3PM are described in detail.

3.1 3PM - Constructive Phase

The objective of the constructive phase is to build an initial feasible solution for the problem. The grid used is a grid by piece with a minimum resolution g min, large enough to ensure a good trade-off between the computational time and solution quality. The value of g min was defined using preliminary computational experiments.

This phase is based on the relax-and-fix strategy. Consider the decision variables δd tr , which are 1 (one) if a piece of type t at rotation r is assigned to dot d and 0 (zero) otherwise. These variables are split into four sets:

  • Г) set of variables associated with pieces that are already fixed on the board;

  • ∆) set of variables associated with pieces that are positioned on the board, but can still perform some movements;

  • Θ) set of variables associated with pieces that can be freely positioned on the board;

  • Ω) set of variables associated with waiting pieces, that are not considered in the resolution step.

Initially, sets Г, ∆ and Θ are empty, set Ω includes all the pieces, and the parameters μ and μ', the limits in the x-axis for the sets Г and ∆, are set to zero.

In each step of the constructive phase a small number of pieces belonging to the set Ω is assigned to Θ, the sets Г and ∆ are redefined based on the parameters μ' and μ, i.e. the pieces with the reference point positioned in the interval [0, μ') define set Г, the pieces with the reference point positioned in the interval [μ', μ] define set ∆, and the sub-problem defined by the sets Г, ∆ and Θ is solved. In the final step, set Θ is empty and a feasible solution to the complete problem is obtained by solving the associated sub-problem.

Figure 5 illustrates the steps of the constructive phase based on an example with seven piece types and a total of 29 pieces. The pieces associated with sets Г and ∆ are represented in black and dark gray, respectively. The pieces in set Ω are represented in white above the board and the number of repetitions is written below each piece. The pieces in light gray, at the right-hand side of the board, represent set Θ. In Figure 5 (a) sets Г, ∆ and Θ are empty. In Figure 5 (b), some pieces from the set Ω are selected to form set Θ. Figure 5 (c) represents the solution for the problem in Figure 5 (b), the set ∆ and the new set Θ.

Figure 5
Steps of the Constructive Phase.

Figure 5 (d) shows the solution of sub-problem in 5(c) where the pieces with reference point in the interval [0, μ) are fixed and new pieces are positioned on the board. The solution of the complete problem is presented in Figure 5 (e).

In each step, a subset of elements from set Ω is selected for set Θ. The size of these subsets is σ, a number small enough to provide a fast solution and big enough for the pieces to fit well. Furthermore, the size is calculated so as to reduce the difference between the sizes of the subsets, and details are provided in Section 4.1. To form each set Θ, the pieces are included one by one in the subset. The piece type selected is the one with the largest rate:

This criterion was used in order to homogeneously distribute the different piece types in the solution.

To define each sub-problem model, consider subsets MD and WD containing the board dots in the intervals [0, μ') and [μ', μ], respectively. The previous step solution is defined by dM, tT, rRt } and ∆ = {(d, t, r), W, tTrRt .}. The partial demand is represented by , tT, that is, the number of pieces of type t in the sets Г, ∆ and Θ. Finally, αt is the number of pieces of type t with the reference point in subset W. The constructive phase model (3PM-CPM) is given by (7)-(10): = 1, d ∈ = 1, , d ∈ D, t ∈ T, r ∈ Rt. Note that Г = {(d, t, r),

(7)

(8)

(9)

(10)

In the model (7)-(10), constraints (8) ensure that the partial demand will be met. Constraints (9) restrict the movements over the variables of set W. Specifically, one move is counted when a piece previously allocated in set W is moved outside set W or when a piece from set Θ is allocated into set W. Two moves are counted when a piece previously allocated in set W is moved into set W. The upper bound for the moves is αt . Constraints (10) fix to the board the pieces types with the reference point positioned on a dot from the set M. Algorithm 1 summarizes the constructive phase.

Algorithm 1
Constructive Phase

3.2 3PM - Improvement Phase

The Improvement Phase starts with the solution of the Constructive Phase and it is also performed in steps. In the first step, g min is equal to that used in the constructive phase, and after each step, g min is divided by two. Note that, as stated in Section 2, g min is only a lower bound of the grid resolution value. At the end of each step, the dots that contain reference points of pieces allocated are included into the grid of the next step. This ensures that the best solution found so far is feasible for the next step and leads to a good initial solution for the search. The search ends when g min is smaller than a threshold mr. In each step, a variable neighborhood descent heuristic (VND) is applied to improve the quality of the best solution found so far.

The VND heuristic is defined by applying successive local search procedures over K different neighborhoods. The choice of a neighborhood is performed in a deterministic way. A final solution is a local optimum with respect to all K neighborhoods. The neighborhoods are defined allowing the pieces to move in the dots that are inside a small board region around the solution of the previous step, d, t, r)| md. Finally, the third neighborhood is a rectangle with the length of the board. The height of the rectangle is also chosen so that the number of dots in the region is limited by md. Figure 6 illustrates these three neighborhoods, where the dot represents the piece reference point and the highlighted rectangle the region where this reference point can move. = 1}. The shape of these regions defines the neighborhood that will be explored during the search. The first neighborhood is a small square with its center in the dot where the piece was positioned. The second neighborhood is a rectangle with the same height as the width of the board. The width of the rectangle is chosen so that the number of dots in the region is limited by = {(

Figure 6
Representation of the neighborhoods for a piece reference point.

These three neighborhoods were chosen in order to explore a diversified set of dots and then find better solutions. The first neighborhood is small and hence results in a fast search. The second neighborhood is created to allow the pieces to move vertically. Finally, the third neighborhood aims to change the piece’s position over the layout length.

The sequence of the neighborhoods starts by the first neighborhood to restrict the feasible piece placement and then solve the problem. If the solution is not better than the best solution found so far, then the second neighborhood structure is applied. If the search over the second neighborhood structure does not improve the solution quality, then the third neighborhood structure is applied. If the third neighborhood does not improve the solution quality, then the step is terminated. During the process, if any of the three neighborhoods yields a solution better than the best solution found so far, then the search process restarts with the first neighborhood.

Each neighborhood can be represented by a model. Consider Λdtr as the set of dots belonging to one neighborhood of dot d where the reference point of piece t at rotation r was allocated in the previous iteration. The improvement phase model (3PM-IPM) is given as follows.

(11)

(12)

Constraints (12) limit the search domain to move each piece within the chosen neighborhood. Given a feasible solution , the best solution of the model (11)-(12) is its best neighbor.

When there are no more neighborhoods to explore in VND, the grid is refined. With more dots to represent the board, there is a new range of feasible placement positions for each piece. The VND heuristic is performed again to improve the solution further. Algorithm 2 summarizes the improvement phase.

Algorithm 2
Improvement phase

3.3 3PM - Compaction Phase

As the solution obtained in the Improvement Phase has the piece reference points positioned on specific dots, gaps may appear between pieces. Taking this into account, a compaction of this solution is essential to move the pieces as close as possible to each other. To compact a solution, we use the mixed integer linear model based on (Gomes & Oliveira, 200614 GOMES A & OLIVEIRA JF. 2006. Solving irregular strip packing problems by hybridising simulated annealing and linear programming. European Journal of Operational Research, 171(3): 811-829.) with some additional constraints. In this model, the positioning of each piece reference point is represented by a pair of continuous variables (xi, yi). To avoid overlaps between pieces i and j, the authors consider the set Eij with all the lines that contain an edge of NFPij; then, an integer variable vije is used to ensure that the pieces are on different sides of at least one of the lines e ∈ Eij. More details on this model can be found in (Gomes & Oliveira, 200614 GOMES A & OLIVEIRA JF. 2006. Solving irregular strip packing problems by hybridising simulated annealing and linear programming. European Journal of Operational Research, 171(3): 811-829.) and (Alvarez-Valdes et al., 20132 ALVAREZ-VALDES R, MARTINEZ A & TAMARIT J. 2013. A branch & bound algorithm for cutting and packing irregularly shaped pieces. International Journal of Production Economics, 145(2): 463- 477.). In order to define the additional constraints to be added to the (Gomes & Oliveira, 200614 GOMES A & OLIVEIRA JF. 2006. Solving irregular strip packing problems by hybridising simulated annealing and linear programming. European Journal of Operational Research, 171(3): 811-829.) model, consider the pieces individually, i.e., each piece is mapped according to its type and rotation by an unique integer. The total number of pieces is given by N = Σt ∈ T r ∈ Rt, dtr. All the pieces can be found on the interval [1, N]. In addition, consider dD. The new constraints imposed in (Gomes & Oliveira, 200614 GOMES A & OLIVEIRA JF. 2006. Solving irregular strip packing problems by hybridising simulated annealing and linear programming. European Journal of Operational Research, 171(3): 811-829.) model ensure that the pieces can move only over a small region of the board. These regions are defined as squares around the points where each piece is positioned. The side λi of each square is given based on the size of the bounding box of each piece i and the number of pieces allocated and is defined in Section 4.1. = 1, ∀, i=1,…, N, the position on the x-axis (y-axis) for each,

The Compaction Phase Model (3PM-CPM) is given as (13)-(19):

(13)

(14)

(15)

(16)

(17)

(18)

(19)

(20)

(21)

(22)

where αije, βije , and γije are the coefficients of the line e associated with an edge of NFPij and BigM is large enough to make the constraint (16) a dummy constraint if vije = 0.

Constraints (14) associated with (13) define the objective function. Constraints (14) and (15) ensure that the piece is entirely inside the board, and constraints (16) and (17) guarantee that the pieces do not overlap. Constraints (18) and (19) allow the piece to move only within a given square. Finally, the variable domains are given by (20), (21) and (22).

The compaction phase is an iterative process, i.e., if an improved solution is found at the end of the compaction, the compaction is run again, starting from this improved solution. Algorithm 3 presents an outline of the compaction phase.

Algorithm 3
Compaction phase

4 COMPUTATIONAL RESULTS

The computational experiments were performed on an Intel(R) Xeon(R) E5-2620 2.00GHz processor with 64 GB of memory running an Ubuntu 12.04 operating system. The methods were implemented in the C/C++ programming language, and the mathematical models were solved using IBM ILOG CPLEX 12.5. To perform the tests, instances from the literature, presented in Table 1, were used. The first column presents the instance name. Columns two and three present the number of piece types and the TOTAL number of pieces, respectively. The available rotations for the pieces and the height of the board are, respectively, presented in columns four and five. Finally, column six presents the reference in the literature of the instance.

Table 1
Instances used in the benchmark.

The following subsection presents the parameters used to run the matheuristic. An analysis of the proposed matheuristic showing the influence of each phase in the solution method is presented in Subsection 4.2. The proposed matheuristic performance is compared with exact models and heuristic methods in Subsections 4,3 and 4.4, respectively.

4.1 Defining parameters and sets

In this section, the parameters used in the matheuristic are defined. These parameters were chosen based on preliminary computational experiments and on the features of each instance.

The initial value of gmin is two in order to generate a grid with a limited number of dots. The idea is to lead the constructive phase to quickly obtain a solution. This parameter can generate some gaps among the pieces, but these gaps should be reduced in the improvement phase.

In each step of the constructive phase, σ elements of Ω must be selected to form Θ. The idea is to define σ such that the subsets Θ of each iteration have a similar number of elements. After preliminary tests, we verified that problems with five pieces (in absolute number) or less are solved very fast using the model while problems with more than 12 pieces are difficult to solve within a time span adequate for a constructive phase. The value of sigma is defined as stated in Algorithm 4, where a mod b is the remainder of the division of a by b.

Algorithm 4
Defining sigma

In Algorithm 4, if the instance has less than five pieces, only one set with all the pieces is created. Otherwise, the subset size is given by the largest integer number σ ∈ [5, min(12, Σ tTqt - 1)] so that the remainder of Σt T qt /σ is zero. If the remainder is not zero, σ is chosen such that the remainder is the largest possible, ensuring that the number of pieces in the final step will be the largest possible.

After the constructive phase, the improvement phase runs while , where gmin mr = 0.5 to make the pieces closer to each other. The number of dots in each neighborhood of the improvement phase must not be larger than the parameter md. In the initial tests, md = 3000, which results in the improvement model performing a fast local search.

Several preliminary tests were run to determine the value of λi for each piece of type i, where λi is a parameter of the compaction phase model (CPM). Depending on the position of the pieces and on the size of the region where these pieces can move, a pair of pieces could even change their relative positions.

These values are based on i) the number of pieces in the instance and ii) the size of the piece bounding box.

  • For instances with less than 13 pieces the square around the reference point of piece i has a side equal to λi = max (lleft i+ lright i, wbottom i + wtom i );

  • For instances with 13 to 20 pieces the square around the reference point of piece i has a side equal to λi = max (lleft i+ lright i, wbottom i + wtop i )/2;

  • For instances with more than 20 pieces the square around the reference point of piece i has a side equal to λi = min(lleft i+ lright i, wbottom i + wtop i )/2.

4.2 Analysing the phases of 3PM

To demonstrate the importance of each phase of the 3PM, in Table 2, we summarize the results of each phase. The instance name is in the first column. In columns two and three, the constructive phase solution and time are shown. Columns four and five show the improvement phase solution and its time, respectively. The improvement rate, the time increase and the percentage by which the computational time increases from the constructive phase to the improvement phase are depicted in columns six, seven and eight. In columns nine and ten, the solution value and its computational time are presented. Columns eleven, twelve and thirteen describe the improvement rate, the additional time and the percentage that the computational time increases compared with the constructive plus improvement phases.

Table 2
Evolution of solution values and time for the different phases of the 3PM.

As expected, the constructive phase obtained a solution with poor quality but in a short computational time. Applying the improvement phase to the constructive phase solution on average leads to 19% improvement in the solution quality. The computational time increases by 171.8 seconds on average, varying from 0.1 to 2301 seconds depending on the instance.

On average, the solutions found by the complete matheuristic are 9.7% better when compared to the solutions found by the improved constructive phase. Furthermore, the computational time increases by 200 seconds on average, varying from 0.1 to 1294 seconds depending on the instance. Specifically, the compaction phase leads on average to 9.7% improvement in the solution quality; however, the computational time doubles.

Based on the results, it can be concluded that the compaction phase obtains better solutions. However, if a fast solution that has good quality is needed and less computational time is available, the construction phase followed by the improvement phase should be used. If a moreaccurate solution is desired and using more computational time is not a problem, the complete solution method should be applied to the problem.

A variation of this matheuristic composed of only the construction and compaction phases was studied. The quality of the solutions obtained by thus variation was always worse than that of the complete matheuristic.

4.3 Performance of the matheuristic compared with mixed integer models

In this section, we analyzed the quality of the matheuristic solutions compared with the exact branch and cut method applied to three models from the literature. Table 3 presents theresults for solving instances using the HS2 model from (Alvarez-Valdes et al., 20132 ALVAREZ-VALDES R, MARTINEZ A & TAMARIT J. 2013. A branch & bound algorithm for cutting and packing irregularly shaped pieces. International Journal of Production Economics, 145(2): 463- 477.), the semi-continuous model (SCM) from (Leão et al., 201620 LÊAO AAS, TOLEDO FMB, OLIVEIRA JF & CARRAVILLA MA. 2016. A semicontinuous MIP model for the irregular strip packing problem. International Journal of Production Research, 54(3): 712-721.), the dotted board model (DBM) from (Toledo et al., 201326 TOLEDO FMB, CARRAVILLA MA, RIBEIRO C, OLIVEIRA JF & GOMES AM. 2013. The dottedboard model: a new MIP model for nesting irregular shapes. International Journal of Production Economics, 145(2): 478-487.) with the grid by pieces and by the proposed matheuristic. The results of HS2 and SCM were taken from (Alvarez-Valdes et al., 20132 ALVAREZ-VALDES R, MARTINEZ A & TAMARIT J. 2013. A branch & bound algorithm for cutting and packing irregularly shaped pieces. International Journal of Production Economics, 145(2): 463- 477.) and (Leão et al., 201620 LÊAO AAS, TOLEDO FMB, OLIVEIRA JF & CARRAVILLA MA. 2016. A semicontinuous MIP model for the irregular strip packing problem. International Journal of Production Research, 54(3): 712-721.), respectively. The specifications of their processor are better than the one used to solve the DBM and the proposed matheuristic3 3 Verified in www.cpubenchmark.net/ . Consequently, a comparison of the results is not unfair from the computational perspective. Moreover, each exact method was run for one hour.

Table 3
Comparison of the results of the exact methods with the 3-Phase Matheuristic (3PM).

In Table 3, the first column presents the instance names. The second and third (fourth and fifth) columns present, respectively, the solution and time to prove the solution optimality of the (Alvarez-Valdes et al., 20132 ALVAREZ-VALDES R, MARTINEZ A & TAMARIT J. 2013. A branch & bound algorithm for cutting and packing irregularly shaped pieces. International Journal of Production Economics, 145(2): 463- 477.) model ((Leão et al., 201620 LÊAO AAS, TOLEDO FMB, OLIVEIRA JF & CARRAVILLA MA. 2016. A semicontinuous MIP model for the irregular strip packing problem. International Journal of Production Research, 54(3): 712-721.) model). Similarly, columns six and eight show the solution and time to prove the optimality of the dotted board model. Column seven depicts the time that this model took to find the best solution of the search. Finally, in columns seven and eight, the solution obtained by the proposed matheuristic method and its computational time are shown.

The proposed matheuristic obtained better or equal solutions in 34 out of 40 instances when compared with the best solutions of the other three methods. In the table, the best solution values are highlighted. Compared only with the dotted board model, the proposed matheuristic yielded better results for 27 out of 40 instances. For the majority of the instances, the compaction phase makes a difference by removing some gaps from the grid dependence of the dotted board model, resulting in better-quality solutions.

The computational time of the matheuristic is less than that of the HS2 model and SCM model only in the larger instances. In fact, this occurs because for small instances, the exact method can quickly find and prove the optimality of a solution while the matheuristic method needs to accomplish all three phases. Comparing the computational time of the dotted board model and the matheuristic, it can be observed that the exact method spends less time on small instances. The reason for this is the same as that for the HS2 and SCM model. It is important to highlight that in several cases, the matheuristic obtained better solutions than the dotted board model as the model depends on the grid used. Its improvement in terms of the solution quality is more distinguishable for the large instances.

The advantage of the 3-Phase Matheuristic is that in comparison with the exact approaches, the time to achieve the objective is less biased by the instance size.

As the constructive and improvement phases are based on the dotted board model, instances with many different piece types and/or huge boards such as Albano, Mao and Jakobs2 can lead to longer solution times in these phases of the solution method. Moreover, in the compaction phase, the model used does not take advantage of pieces of the same type, making instances as Trousers, Shapes1 and Shapes0 more difficult to solve in this phase.

On the other hand, the additional constraints included in the models of each phase attempt to overcome the problem, reducing the computational times. Additionally, the interactions between the approaches aim to benefit the solution quality.

4.4 Performance of the matheuristic compared with those of other heuristics

In this section, the computational experiments comparing the proposed matheuristic and the heuristics of (Leung et al., 201219 LEUNG SC, LIN Y & ZHANG D. 2012. Extended local search algorithm based on nonlinear programming for two-dimensional irregular strip packing problem. Computers & Operations Research, 39(3): 678-686.) and (Elkeran, 201310 ELKERAN A. 2013. A new approach for sheet nesting problem using guided cuckoo search and pairwise clustering. European Journal of Operational Research, 231(3): 757-769.) are presented. The results presented by heuristics from (Umetani et al., 200927 UMETANI S, YAGIURA M, IMAHORI S, IMAMICHI T, NONOBE K & IBARAKI T. 2009. Solving the irregular strip packing problem via guided local search for overlap minimization. International Transactions in Operational Research, 16(6): 661-683.), (Imamichi et al., 200917 IMAMICHI T, YAGIURA M & NAGAMOCHI H. 2009. An iterated local search algorithm based on nonlinear programming for the irregular strip packing problem. Discrete Optimization, 6(4): 345- 361.) and (Sato et al., 201225 SATO AK, MARTINS TC & TSUZUKI MSG 2012.An algorithm for the strip packing problem using collision free region and exact fitting placement. Computer-Aided Design, 44(8): 766-777.) are available in Appendix A APPENDIX A The results obtained for the heuristics presented in (Umetani et al., 2009), (Imamichi et al., 2009) and (Sato et al., 2012) are shown in Table 5. This table has the same type of content of Table 4. Table 5 Comparison of the results of the exact methods with the 3-Phase Matheuristic (3PM). Instance (Sato et al., 2012) (Umetani et al., 2009) (Imamichi et al., 2009) Solution Time Solution Time Solution Time Shapes0 61.1 7 × 21600.0 60.3 10 × 1200.0 60.2 10 × 1200.0 Shapes1 55.6 7 × 908175.0 55.0 10 × 1200.0 54.8 10 × 1200.0 Shapes2 26.7 7 × 5400.0 26.7 10 × 1200.0 26.4 10 × 1200.0 Fu 31.8 4 × 600.0 31.6 10 × 1200.0 32.6 10 × 600.0 Jakobs1 11.0 4 × 1800.0 11.0 10 × 1200.0 11.6 10 × 600.0 Jakobs2 22.8 7 × 5400.0 24.0 10 × 1200.0 24.0 10 × 600.0 Albano 10086.5 7 × 21600.0 9980.9 10 × 1200.0 9990.2 10 × 1200.0 Mao 1816.6 7 × 21600.0 1780.4 10 × 1200.0 1813.4 10 × 1200.0 Marques 78.9 7 × 5400.0 77.9 10 × 1200.0 79.7 10 × 1200.0 Trousers 248.3 7 × 86400.0 245.3 10 × 1200.0 245.6 10 × 1200.0 .

The heuristics from the literature were run within different frameworks. The authors presented the best solution and the average solution found by their methods in several runs for each instance.

Table 4 presents the results obtained by 3PM and the results obtained by the two most recent heuristics from the literature. In the table, the first column displays the instance name. Columns two and three respectively present the solution found by 3PM and the computational time to obtain this solution. Columns four and five (six and seven) present analogous information for (Leung et al., 201219 LEUNG SC, LIN Y & ZHANG D. 2012. Extended local search algorithm based on nonlinear programming for two-dimensional irregular strip packing problem. Computers & Operations Research, 39(3): 678-686.) ((Sato et al., 201225 SATO AK, MARTINS TC & TSUZUKI MSG 2012.An algorithm for the strip packing problem using collision free region and exact fitting placement. Computer-Aided Design, 44(8): 766-777.)) heuristic.

Table 4
Comparison of the results of the exact methods with the 3-PhaseMatheuristic (3PM).

As 3PM is a deterministic procedure, it is run just once for each instance. In contrast, the heuristics proposed in (Leung et al., 201219 LEUNG SC, LIN Y & ZHANG D. 2012. Extended local search algorithm based on nonlinear programming for two-dimensional irregular strip packing problem. Computers & Operations Research, 39(3): 678-686.) and (Elkeran, 201310 ELKERAN A. 2013. A new approach for sheet nesting problem using guided cuckoo search and pairwise clustering. European Journal of Operational Research, 231(3): 757-769.) are non-deterministic procedures that usually are run many times to ensure the quality of solution. The authors ran their heuristics 10 times that in the best case used 600 seconds for each time. Therefore, the proposed matheuristic is substantially faster and yields solutions in average six times faster than these heuristics.

On average, the solutions found by the matheuristic are 6.3% worse than the results obtained by (Elkeran, 201310 ELKERAN A. 2013. A new approach for sheet nesting problem using guided cuckoo search and pairwise clustering. European Journal of Operational Research, 231(3): 757-769.) and (Leung et al., 201219 LEUNG SC, LIN Y & ZHANG D. 2012. Extended local search algorithm based on nonlinear programming for two-dimensional irregular strip packing problem. Computers & Operations Research, 39(3): 678-686.), which are the most recent heuristics in the literature.

5 CONCLUSIONS

A new matheuristic to solve the irregular strip packing problem combining mixed integer programming models from the literature is presented. The matheuristic is composed of three phases that use a model to solve each sub-problem. Combining different models, the proposed method takes advantage of the speed of the integer placement model and the solution quality of the linear placement model.

The outcomes of the proposed method show that it can produce solutions with better quality in shorter computational time in most cases when compared with the models. In addition, the performance of the matheuristic is not highly dependent on the instance dimensions, indicating that it is a good approach for tackling large instances.

Comparing 3PM with heuristics form the literature, 3PM found solutions in smaller computational times. Also, the quality of these solutions generally are near to the quality of the best solutions found in the literature.

REFERENCES

  • 1
    ALBANO A & SAPUPPO G. 1980. Optimal allocation of two-dimensional irregular shapes using heuristic search methods. IEEE Transactions on Systems, Man, and Cybernetics, SMC-10(5): 242-248.
  • 2
    ALVAREZ-VALDES R, MARTINEZ A & TAMARIT J. 2013. A branch & bound algorithm for cutting and packing irregularly shaped pieces. International Journal of Production Economics, 145(2): 463- 477.
  • 3
    BENNELL JA & OLIVEIRA JF. 2008. The geometry of nesting problems: A tutorial. European Journal of Operational Research, 184(2): 397-415.
  • 4
    BENNELL JA & OLIVEIRA JF. 2009. A tutorial in irregular shape packing problems. Journal of the Operational Research Society, 60: S93-S105.
  • 5
    BOUNSAYTHIP C & MAOUCHE S 1997. Irregular shape nesting and placing with evolutionary approach. In Systems, Man, and Cybernetics, volume 4, pages 3425-3430.
  • 6
    BURKE E, HELLIER R, KENDALL G & WHITWELL G. 2006. A new bottom-left-fill heuristic algorithm for the two-dimensional irregular packing problem. Operations Research, 54(3): 587-601.
  • 7
    CARRAVILLA MA, RIBEIRO C & OLIVEIRA JF. 2003. Solving nesting problems with nonconvex polygons by constraint logic programming. International Transactions in Operational Research, 10: 651-663.
  • 8
    CHERRI LH, CHERRI AC, CARRAVILLA MA, OLIVEIRA JF, TOLEDO FMB & VIANNA ACG. 2016. An innovative data structure to handle the geometry of nesting problems. Technical report, Instituto de Ciências Matemáticas e de Computação, Universidade de São Paulo.
  • 9
    EGEBLAD J, NIELSEN BK & ODGAARD A. 2007. Fast neighborhood search for two- and threedimensional nesting problems. European Journal of Operational Research, 183(3): 1249-1266.
  • 10
    ELKERAN A. 2013. A new approach for sheet nesting problem using guided cuckoo search and pairwise clustering. European Journal of Operational Research, 231(3): 757-769.
  • 11
    FISCHETTI M & LUZZI I. 2009. Mixed-integer programming models for nesting problems. Journal of Heuristics, 15(3): 201-226.
  • 12
    FOWLER RJ, PATERSON M & TANIMOTO SL. 1981. Optimal packing and covering in the plane are np-complete. Inf. Process. Lett., 12(3): 133-137.
  • 13
    FUJITA K, AKAGJI S & KIROKAWA N. 1981. Hybrid approach for optimal nesting using a genetic algorithm and a local minimization algorithm. Advances in Design Automation; American Society of Mechanical Engineers, 65: 477-484.
  • 14
    GOMES A & OLIVEIRA JF. 2006. Solving irregular strip packing problems by hybridising simulated annealing and linear programming. European Journal of Operational Research, 171(3): 811-829.
  • 15
    GOMES AM & OLIVEIRA JF 2002. A 2-exchange heuristic for nesting problems. European Journal of Operational Research, 141(2): 359-370.
  • 16
    HOPPER E. 2000. Two-dimensional packing utilising evolutionary algorithms and other metaheuristic methods. PhD thesis, University of Wales, Cardiff.
  • 17
    IMAMICHI T, YAGIURA M & NAGAMOCHI H. 2009. An iterated local search algorithm based on nonlinear programming for the irregular strip packing problem. Discrete Optimization, 6(4): 345- 361.
  • 18
    JAKOBS S. 1996. On genetic algorithms for the packing of polygons. European Journal of Operational Research, 88(1): 165-181.
  • 19
    LEUNG SC, LIN Y & ZHANG D. 2012. Extended local search algorithm based on nonlinear programming for two-dimensional irregular strip packing problem. Computers & Operations Research, 39(3): 678-686.
  • 20
    LÊAO AAS, TOLEDO FMB, OLIVEIRA JF & CARRAVILLA MA. 2016. A semicontinuous MIP model for the irregular strip packing problem. International Journal of Production Research, 54(3): 712-721.
  • 21
    MANIEZZO V, STÜTZLE T & VOSS S. 2009. Matheuristics: Hybridizing Metaheuristics and Mathematical Programming. Annals of Information Systems. Springer.
  • 22
    MARQUES VMM, BISPO CFG & SENTIEIRO JJS. 1991. A system for the compaction of twodimensional irregular shapes based on simulated annealing. In: International Conference on Industrial Electronics, Control and Instrumentation, pages 1911-1916.
  • 23
    OLIVEIRA JF & FERREIRA J 1993. Algorithms for nesting problems, applied simulated annealing. In Vidal RVV. (Ed., Lecture Notes in Economics andMaths Systems), 396: 255-274.
  • 24
    OLIVEIRA JF, GOMES AM & FERREIRA JS. 2000. Topos - a new constructive algorithm for nesting problems. OR Spektrum, 22: 263-284.
  • 25
    SATO AK, MARTINS TC & TSUZUKI MSG 2012.An algorithm for the strip packing problem using collision free region and exact fitting placement. Computer-Aided Design, 44(8): 766-777.
  • 26
    TOLEDO FMB, CARRAVILLA MA, RIBEIRO C, OLIVEIRA JF & GOMES AM. 2013. The dottedboard model: a new MIP model for nesting irregular shapes. International Journal of Production Economics, 145(2): 478-487.
  • 27
    UMETANI S, YAGIURA M, IMAHORI S, IMAMICHI T, NONOBE K & IBARAKI T. 2009. Solving the irregular strip packing problem via guided local search for overlap minimization. International Transactions in Operational Research, 16(6): 661-683.

APPENDIX A

The results obtained for the heuristics presented in (Umetani et al., 200927 UMETANI S, YAGIURA M, IMAHORI S, IMAMICHI T, NONOBE K & IBARAKI T. 2009. Solving the irregular strip packing problem via guided local search for overlap minimization. International Transactions in Operational Research, 16(6): 661-683.), (Imamichi et al., 200917 IMAMICHI T, YAGIURA M & NAGAMOCHI H. 2009. An iterated local search algorithm based on nonlinear programming for the irregular strip packing problem. Discrete Optimization, 6(4): 345- 361.) and (Sato et al., 201225 SATO AK, MARTINS TC & TSUZUKI MSG 2012.An algorithm for the strip packing problem using collision free region and exact fitting placement. Computer-Aided Design, 44(8): 766-777.) are shown in Table 5. This table has the same type of content of Table 4.

Table 5
Comparison of the results of the exact methods with the 3-Phase Matheuristic (3PM).

Publication Dates

  • Publication in this collection
    Sep-Dec 2016

History

  • Received
    10 Oct 2015
  • Accepted
    13 Sept 2016
Sociedade Brasileira de Pesquisa Operacional Rua Mayrink Veiga, 32 - sala 601 - Centro, 20090-050 Rio de Janeiro RJ - Brasil, Tel.: +55 21 2263-0499, Fax: +55 21 2263-0501 - Rio de Janeiro - RJ - Brazil
E-mail: sobrapo@sobrapo.org.br