Computers & Operations Research 39 (2012) 678–686
Contents lists available at ScienceDirect
Computers & Operations Research journal homepage: www.elsevier.com/locate/caor
Extended local search algorithm based on nonlinear programming for two-dimensional irregular strip packing problem Stephen C.H. Leung a, Yangbin Lin b, Defu Zhang b,n a b
Department of Management Sciences, City University of Hong Kong, Hong Kong Department of Computer Science, Xiamen University, Xiamen 361005, China
a r t i c l e i n f o
a b s t r a c t
Available online 14 June 2011
This paper presents an extended local search algorithm (ELS) for the irregular strip packing problem. It adopts two neighborhoods, swapping two given polygons in a placement and placing one polygon into a new position. The local search algorithm is used to minimize the overlap on the basis of the neighborhoods mentioned above and the unconstrained nonlinear programming model is adopted to further minimize the overlap during the search process. Moreover, the tabu search algorithm is used to avoid local minima, and a compact algorithm is presented to improve the result. The results of standard test instances indicate that when compared with other existing algorithms, the presented algorithm does not only show some signs of competitive power but also updates several best known results. & 2011 Elsevier Ltd. All rights reserved.
Keywords: Irregular strip packing problem Nesting Local search Unconstrained nonlinear programming Tabu search
1. Introduction The irregular strip packing problem, also known as the nesting problem, has a wide area of applications. Given a set of irregular shapes and a rectangular strip with a fixed width and an arbitrary length, the target of the two-dimensional irregular strip packing problem is to place all shapes within the strip such that the length of the strip is minimized and the irregular shapes do not overlap. A classic example application is clothing industry. Several pieces of clothes will be cut from a roll of fabric and the objective is to minimize the waste of fabric. The fabric has a fixed width and its length can be generally assumed infinite; so the problem is to minimize the length required for producing the specified number of irregular shapes. The irregular strip packing problem is a NP-hard combinatorial optimization problem [1]. Numerous papers on nesting problem have been published since the first paper by Art [2]. Metaheuristics are often used to solve this problem. Hopper and Turton [3] reviewed these methods, and a summary of geometric methods was published by Bennell and Oliveira [4]. As research progressed, further breakthroughs in algorithms for this problem have achieved in recent years. When compared with the previous years, these solutions have markedly improved the effect and speed of nesting results. The typical methods include Burke et al. [5], Gomes and Oliveira [6], Egeblad et al. [7], Imamichi et al. [8], etc.
n
Corresponding author. Tel.: þ86 592 5918207; fax: þ86 592 2580258. E-mail address:
[email protected] (D. Zhang).
0305-0548/$ - see front matter & 2011 Elsevier Ltd. All rights reserved. doi:10.1016/j.cor.2011.05.025
Albano and Sapuppo [9] proposed an algorithm that places each shape at the bottom-left position, and the sequence of places is obtained by tree search. Jakobs [10] proposed a two-stage solution which first generates the rectangular enclosure of each irregular shape, and then finds the placement for these enclosures through a genetic algorithm. Secondly, a shrinking algorithm moves the shapes to another one as close as possible using the idea of the bottom-left heuristic. Gomes and Oliveira [11] based on bottom-left heuristic and find a good placement by exchanging two shapes in the layout. Dowsland et al. [12] developed a compact algorithm to improve the bottom-left heuristic algorithm. The algorithm first gets the initial placement by the bottom-left heuristic, and then uses a shaking process to compact the placement. Burke et al. [5] presented a new bottom-left heuristic algorithm based on discretization, and combination with hill climbing or tabu search to get a high quality solution. This algorithm can also pack the shapes with circular arcs and holes. Egeblad et al. [7] proposed an efficient fast local search method whose neighborhood is any horizontal or vertical translation of a given shape. They also formulated a polynomial time algorithm to find a translation with minimum overlap area between the given polygon and the other polygons in the current placement. Gomes and Oliveira [6] presented a separation algorithm to locally optimize the placement based on linear programming models, and used simulated annealing to guide the search. A new separation algorithm based on unconstrained nonlinear programming is proposed by Imamichi et al. [8]. They also designed an algorithm that swaps two polygons in a placement, and then the algorithms are combined as a component into an iterated local search algorithm for the overlap minimization problem. This method
S.C.H. Leung et al. / Computers & Operations Research 39 (2012) 678–686
679
yielded several best known results on the standard test instances. Our algorithm is based on a separation algorithm presented by Imamichi et al. [8], and local search is adopted to guide the search. Moreover, a tabu search algorithm is used to avoid local minima and a compacted algorithm is used to improve the packing results.
2. Formulation In this section, some fundamental elements of geometry are first defined, before formulation of the irregular strip packing problem algorithm is given. Definition 1 (point). A point p in two-dimensional space is represented by a pair: p ¼ ðpx ,py Þ A R2 : Definition 2 (line segment). A line segment s is a point set defined by two endpoints pa and pb: Fig. 1. An example of placement of irregular strip packing problem. The right boundary of the strip can be adjusted.
s ¼ fp A R2 ,t A ½0,19p ¼ pa þ tðpb pa Þg: Definition 3 (polygon). A polygon is a plane figure bounded by a closed path composes of a finite sequence of line segments denoted by S. No cross occurs in any pair of line segments in S. Here we format a polygon P as a point set:
An example of placement of irregular strip packing problem is shown in Fig. 1. 2.3. Overlap minimization problem
P ¼ fp A R2 9fS ðpÞ ¼ 1ðmod 2Þg, where fs(p) is a count function: fS ðpÞ ¼ 9fs0 A S9(x0 o px : ðx0 ,py Þ A s0 g9: Definition 4 (). Given a polygon P and a translation vector v ¼(vx,vy), we define translation function as P v ¼ fðp0x þvx ,p0y þ vy Þ9p0 A Pg:
We relax the limit in Problem (1) and allow overlap to occur between the polygons. Given a placement (V,R), we denote fij(V,R) as the measure of the overlap between polygons Pi(ri)vi and Pj(rj)vj, and gi(V,R) as the measure of the overlap between polygons Pi(ri)vi and CðW,LÞ. The overlap minimization problem is formulated by the following equation: X X fij ðV,RÞ þ gi ðV,RÞ: ð2Þ Minimize FðV,RÞ ¼ 1riojrn
Definition 5 (rotation function). Given a polygon P and an angle r, we define the following rotation function: PðrÞ ¼ fðp0x cosðrÞ þ p0y sinðrÞ,p0x sinðrÞ þ p0y cosðrÞÞ9p0 A Pg: 2.1. Formulation of the irregular strip packing problem In irregular packing problems, the rectangle strip and irregular shapes are usually treated as the polygons, and we can only rotate the irregular shapes in a finite number of angles. Given a set of polygon P ¼ fP 1 ,. . .,P n g, a set of allowed rotation angles O, and a rectangle strip C ¼ CðW,LÞ with an arbitrary length L and a fixed width W, the irregular strip packing problem can be formally defined as follows: Minimize L, subject to ðPi ðri Þ vi Þ \ ðPj ðrj Þ vj Þ ¼ |,1 ri,j r n, ðPi ðri Þ vi Þ DCðW,LÞ,1 ri r n, ri A O,1r i rn, vi A R2 ,1r i rn:
ð1Þ
2.2. Placement In Problem (1), we let n-tuples V ¼ fv1 ,. . .,vn g and R ¼ fr1 ,. . .,rn g, then a placement of polygons can be described by pair (V,R). When given a placement (V,R), strip length L can be achieved by the following function: L ¼ LðV,RÞ ¼ maxfpx 9ðpx ,py Þ A Pi ðri Þ vi ,Pi A Pg:
1rirn
When fixing strip length L, Problem (1) can be translated into Problem (2). Solving Problem (2) effectively is the most important part in this paper; more details of this part are discussed in Sections 4 and 5. We say a placement (V,R) is feasible when F(V,R) is smaller than e. We set e ¼ 1010 W 2 ; this value is the same as Imamichi et al. [8]. Therefore our algorithm may get a placement that has a slight overlap as in the case of their algorithm.
3. Approaches to build irregular packing algorithms 3.1. Geometric approaches Compared with the regular polygon, e.g., triangle and rectangle, the irregular polygon is much more complex and more time is taken in dealing with some basic geometric problems, i.e., determining if two polygons are overlapping each other, and determining the minimum translation vector that can separate two overlap polygons. The increase in geometric complexity has a great influence on the packing problems [4]. Here are some geometric approaches to reduce the time complexity. 3.1.1. No-fit-polygon (NFP) No-fit-polygon (NFP) is a data structure often used in irregular packing problems [5–9]. Given two polygons A and B, the NFP of A in relation to B, denoted by NFP(A,B), can be constructed as follows: choose a point OB on B’s contour as a reference point, fix A, slide B around A’s contour as closely as possible without
680
S.C.H. Leung et al. / Computers & Operations Research 39 (2012) 678–686
Fig. 2. Illustration of the NFP(A,B).
3.2. Separation algorithm As the name implies, the purpose of the separation algorithm is to separate the overlapped polygons and locally minimize the overlap. There exist many different separation algorithms [6,8,18,19]. In this paper, we adopt the separation algorithm proposed by Imamichi et al. [8]. The unconstrained nonlinear programming model is used to solve the problem: X X Minimize FðVÞ ¼ fij ðVÞ þ gi ðVÞ: ð3Þ 1riojrn
Fig. 3. Illustration of PD(A,B).
intersecting; the trace of OB is the contour of the NFP. Note that the NFP may have holes (Fig. 2). When NFPs of the two polygons are given, the problem of determining their relative position is transformed into a simpler problem of determining the relative position of one point and one polygon. It attains the purpose of decreasing time and complexity. In irregular packing problems, each pair of polygons’ no-fitpolygon is constructed in advance, so we do not need to build them in the process of packing polygons. The algorithm to build NFP can be seen in Zhang et al. [13], Bennell et al. [14] and Burke et al. [15].
3.1.2. Penetration depth and penetration vector Penetration depth is an important notion used for robotics, computer vision, etc. [16,17]. If two polygons are overlapped with each other, penetration depth is the minimum translation distance to separate them; if they are separated, penetration depth is zero. The following is the definition of penetration depth. Definition 6 (penetration depth). Penetration depth of the two given polygons A and B is PDðA,BÞ ¼ minf:v:A \ ðB vÞ ¼ |g, where the note ::: means Euclidean norm. PD(A,B) can be found through the NFP of A and B, if the reference point OB is inside NFP(A,B), then PD(A,B) equals to the minimum distance between OB to NFP(A,B) (Fig. 3), otherwise PD(A,B) is zero. Penetration depth can be used to indicate the overlap between the two polygons. The variable v in definition 6 is called the penetration vector; it can be obtained in the process of finding penetration depth. When penetration depth is zero, penetration vector is (0, 0), else it may not be unique, but we can choose any v whose :v: is minimum as the penetration vector. An application of penetration vector is provided in the next section.
1rirn
where Problem (3) is transformed from Problem (2) by fixing the rotation R. Details of steps of the separation algorithm proposed by Imamichi et al. [8] are shown below. Step 1: Functions fij(V) and gi(V) in Problem (3) are represented in the penetration depth as fij ðVÞ ¼ ðPDðPi vi ,Pj vj ÞÞ2 ,1 ri,j r n, gi ðVÞ ¼ ðPDðPi vi ,CðW,LÞÞÞ2 ,1 ri r n: Step 2: Adopt penetration vector v to replace the penetration depth in step 1, and denote
rfij ðVÞ ¼ ðr1 fij ðVÞ,. . ., rn fij ðVÞÞ, rk ¼ ð@=@Vxk ,@=@Vyk Þ,1 r kr n: Then fij(V) and its gradient rfij(V) for 1 riojrn are given by 2
fij ðVÞ ¼ :v: ,
ri fij ðVÞ ¼ rj fij ðVÞ ¼ 2v, rk fij ðVÞ ¼ 0,kA f1,. . .,ng\fi,jg: In the same way, gi(V) and its gradient rgi(V) for 1rirn are given by 2
gi ðVÞ ¼ :v: ,
ri gi ðVÞ ¼ 2v, rk gi ðVÞ ¼ 0,k A f1,. . .,ng\fig, rgi ðVÞ ¼ ðr1 gi ðVÞ,. . ., rn gi ðVÞÞ, rk ¼ ð@=@Vxk ,@=@Vyk Þ,1 r kr n: Step 3: In steps 1 and 2, the L-BFGS (limited memory BFGS) method is used to solve the unconstrained nonlinear Problem (3). The idea of the separation algorithm is natural. We recognize the polygons as elastic bodies, and the overlapped bodies can be separated by themselves. When all bodies are pushed into a container, they will achieve a balanced state where the elastic potential energy is minimized. Here, we treat the penetration vector as the elastic force, treat the square of penetration depth as the elastic potential energy, and combine it with nonlinear programming to minimize the elastic potential energy. Hence, the
S.C.H. Leung et al. / Computers & Operations Research 39 (2012) 678–686
effect of separation algorithm looks as if the elastic bodies are separated to reach a balanced state.
681
4.2. Swapping two polygons
A local search algorithm is used to solve the overlap minimization Problem (2). The algorithm gets a new placement by swapping two polygons in the current placement. When swapping two polygons, we attempt to find their new positions with the least overlap.
The algorithm for swapping two polygons Pi and Pj is constructed with MovePolygon. Firstly, we remove polygon Pi from the strip by moving the polygon to position ( þN, þN); secondly, MovePolygon is invoked to move Pj to a new position (note that Pj has a big probability to be moved to the position where Pi had been); thirdly, move Pi using MovePolygon again, and there is a big probability that Pi be moved to the position where Pj had been; so we finally swap the positions of the two polygons.
4.1. Moving a polygon
Algorithm 2. Swap(Pi,Pj,V,R,C)
4. Local search
Algorithm 1 is a heuristic algorithm to move a polygonPi A P to the new position with minimum overlap. Here the overlap is calculated by the function: HðV,RÞ ¼ FðV,RÞ þ overlapðPi ,P 0 Þ, where function F(V,R) is as described in Problem (2), and P0 is denoted as the polygon after Pi moves. The function overlap(P,P0 ) is the overlap between Pi and P0 ; it is used to prevent Pi from staying at the same place. Traversing all positions in strip C is clearly impossible. So we only consider the position when the polygon moved to this position will touch (without intersect) some other polygons. This idea can come true through the not-fit-polygon. When polygon Pi has moved to the position on the boundary of NFPðPj ,Pi Þ,Pj A P, Pi and Pj will be touched (without intersect) according to the definition of NFP. Therefore we can only consider positions which are endpoints and midpoints of the NFPs’ edge (line segments). Algorithm 1. MovePolygonðPi ,V,R,CÞ. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16.
overlaps¼ þN For each rAO (O is the set of allowed rotation angles) Do For j ¼1 to n Do Get the edges of NFP(Pj(rj)vj,Pi(r)), add each edge’s endpoints and midpoint into the point set S. End for Get the edges of NFP(C,Pi(r)), add each edge’s endpoints and midpoint into S. For each point p in S Do (Vt,Rt)¼(V,R) (Vt,Rt)i ¼(p,s) If H(Vt,Rt)ooverlaps Then overlaps ¼H(Vt,Rt) (Vbest,Rbest)¼(Vt,Rt) End If End For End For Return (Vbest,Rbest)
An illustration of MovePolygon is shown in Fig. 4.
1. 2. 3. 4.
(V,R)i ¼( þN,þN) ðV,RÞ ¼ MovePolygonðPj ,V,R,CÞ; ðV,RÞ ¼ MovePolygonðPi ,V,R,CÞ; Return (V,R)
4.3. Local search algorithm Here local search algorithm is used to solve the overlap minimization Problem (2). In each iterated step, we randomly swap two polygons with SwapðPi ,Pj ,V,R,CÞ, and then separate the overlapped polygons; the better placement will be saved as the new placement in the next iterated step. Algorithm 3. LocalSearch(V,R,C) 1. 2. 3. 4. 5. 6. 7. 8. 9.
For n ¼1 to Nmo Do Randomly choose Pi and Pj from P ðV 0 ,R0 Þ ¼ SwapðPi ,Pj ,V,R,CÞ ðV 00 ,R00 Þ ¼ SeparateðV 0 ,R0 Þ If F(V00 ,R00 ) oF(V,R) Then (V,R)¼(V00 ,R00 ) End If End For Return (V,R)
Here Separate(V0 ,R0 ) is the algorithm described in Section 3.2; Nmo is an integer that can control the terminal of the search; a good value is 50–200.
5. Tabu search Tabu search was introduced by Glover [20]. It is a metaheuristic algorithm that can be used for solving combinatorial optimization problems. Tabu search can guide local search to escape the local minima using the tabu list. When purely using the local search introduced in Section 4, the solution easily falls into local minima, so we combine tabu search with MovePolygon(Pi,V,R,C) to escape it. Given a placement (V,R), its neighborhoods can be divided into m sub-neighborhoods through performing MovePolygon(Pi,V,R,C) m times by different i.
Fig. 4. Illustration of MovePolygon: (a) before move and (b) after move.
682
S.C.H. Leung et al. / Computers & Operations Research 39 (2012) 678–686
Fig. 5. An example of the solution running into a circle.
We do not use Swap(Pi,Pj,V,R,C) because it will generate n2 subneighborhoods in total and take much more time. When we have moved a polygon Pi, we add it to tabu list l1, so it cannot be moved in a short term. Next, we use another tabu list l2 to forbid same type (as Pi) polygons; otherwise, the solution will easily start moving in a circle. Fig. 5 shows an example of the solution running into a circle. We assume the length of tabu list l1 is 2, and the length of tabu list l2 is 0. In each step of tabu search, the smallest polygon is selected to move because it has the minimum overlap. The polygons in the tabu list are marked with dark color and they cannot be moved in the next 2 steps. Note that after 5 steps, the placement is almost the same as in the first step, implying it has run into a circle.
Algorithm 4. TabuSearch(V,R,C) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23.
Gbest ¼ þN For n ¼1 to Nmo Do Fbest ¼ þN Let P 0 be a set of m polygons randomly chosen from P For each PiA P 0 Do If Pi is already in ‘1 Then Continue If type id of Pi already in ‘2 Then Continue ðV 0 ,R0 Þ ¼ MovePolygonðPi ,V,R,CÞ ðV 00 ,R00 Þ ¼ SeparateðV 0 ,R0 Þ If F(V00 ,R00 )oFbest Then Fbest ¼ F(V00 ,R00 ) Pbest ¼Pi End If End For ðV 0 ,R0 Þ ¼ MovePolygonðPbest ,V,R,CÞ ðV 00 ,R00 Þ ¼ SeparateðV 0 ,R0 Þ If ‘1 is full Then remove the first element of ‘1 If ‘2 is full Then remove the first element of ‘2 Add Pi as the last element of ‘1 Add the type id of Pi as the last element of ‘2 If F(V00 ,R00 ) oGbest Then Gbest ¼ F(V00 ,R00 ) (Vbest,Rbest) ¼(V00 ,R00 )
24. End If 25. End For 26. Return (Vbest,Rbest)
The number of neighborhoods m (in line 4) is set equal to 80% of n, where n stands for the total number of polygons. An experiment to the efficiency of ‘1 against ‘2 is described in Section 7.
6. Entire algorithm for the irregular strip packing problem Firstly, we find an initial legal placement and save its strip length as the best length. Then within a time limit, we reduce the strip length and apply local search to minimize the overlap. If the current placement is feasible we have found a solution; we update the best length and further reduce the length to find even better solutions. Otherwise, we increase the strip length and go on to do local search. Moreover a tabu search is used to guide the local search escape the local minima. After the set time limit, a compact algorithm is adopted to improve the result. The entire algorithm of ELS (extend local search) is described below. Algorithm 5. ELSðP,WÞ 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19.
Generate initial legal placement (V,R) by greedy bottomleft heuristic lbest ¼L(V,R) (function LðV,RÞ in Section 2.2) While in a time limit Do l¼(1 rdec)lbest ðV,RÞ ¼ LocalSearchðV,R,CðW,lÞÞ If (V,R) is feasible Then (Vbest,Rbest)¼(V,R) lbest ¼L(Vbest,Rbest) Else l ¼(1þrinc)*lbest If l 4lbest Then (V,R)¼ (Vbest,Rbest) l¼(1 rdec)*lbest ðV,RÞ ¼ TabuSearchðV,R,CðW,lÞÞ End If End If End While ðVbest ,Rbest Þ ¼ CompactðVbest ,Rbest ,CÞ Return (Vbest,Rbest)
An experiment to compare the efficiency of rdec and rinc can be found in [8], where good values are 0.04 and 0.01.
S.C.H. Leung et al. / Computers & Operations Research 39 (2012) 678–686
Compact(V,R,C) is a heuristic algorithm to improve the solution; details are as follows. Algorithm 6. Compact(V,R,C) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24.
Sort the polygons in set P by their left-bottom-most point. t¼ 0.1 For i¼1 to q Do t ¼(t/10) l ¼(l/1 t) finish ¼false While finishisfalse Do finish ¼true For each Pi A P, according to the sort in line 1 Do 0 ðV 0 ,R0 Þ ¼ MovePolygon ðPi ,V,R,CðW,lÞÞ 00 00 0 0 ðV ,R Þ ¼ SeparateðV ,R Þ If (V00 ,R00 ) is feasible Then (V,R)¼(V00 ,R00 ) finish ¼true Go to line 5 End If If L(V00 ,R00 )oL(V,R) Then (V,R)¼(V00 ,R00 ) finish ¼false End If End For End While End For Return (Vbest,Rbest)
683
Table 1 Characteristics of instances. Strip width
Allowed rotations (deg)
7.25 6.30 3.87 4.70 3.58
4900 60 100 100 38
25
5.60
40
25
25
5.36
70
MAO
9
20
9.22
2550
MARQUES
8
24
7.37
104
SHAPES0 4 SHAPES1 4 SHAPES2 7 SHIRTS 8 SWIM 10 TROUSERS 17
43 43 28 99 48 64
8.75 8.75 6.29 6.63 21.90 5.06
40 40 15 40 5752 79
0, 180 0, 180 0 0 0, 90, 180, 270 0, 90, 180, 270 0, 90, 180, 270 0, 90, 180, 270 0, 90, 180, 270 0 0, 180 0, 180 0, 180 0, 180 0, 180
Instance
Number of different polygons
Total number of polygons
ALBANO DAGLI DIGHE1 DIGHE2 FU
8 10 16 10 12
24 30 16 10 12
JAKOBS1
25
JAKOBS2
Average vertices of polygons
In line 3, q is set to 2; it can be bigger to get a higher precision for reducing the length. In line 10, algorithm MovePolygon0 (P,V,R,C) is a slightly modified form of MovePolygon(P,V,R,C), where we change the function H(V,R) to F(V,R), so polygon P can stay at the same position.
7. Computational results The ELS algorithm is implemented in Cþþ. We adopt the data instances that have been used as benchmarks in extant research. The instances can be downloaded from the ESICUP website http:// www.apdio.pt/esicup. The characteristics of these instances are shown in Table 1. The computational environment is PC, Pentium4 2.4 GHz CPU, 2 GB RAM. Experiments are conducted about the average efficiencies against the length of tabu lists. We choose five instances (MAO, SHAPE0, JAKOBS2, SHIRTS and TROUSERS); each instance is run 5 times. The results of these experiments are shown in Figs. 6 and 7, where 9‘1 9 is the length of tabu list ‘1 and 9‘2 9 is the length of tabu list l2. In Fig. 6, we fix 9‘2 9 ¼2 and change the value of 9‘1 9. We can observe that the efficiency is almost the same for 9‘1 9A ½4,8. In Fig. 7, we set 9‘2 9 ¼8 and change the value of 9‘2 9, and we can observe that the efficiency is almost the same for 9‘2 9A ½2,3. Finally we set 9‘1 9¼8 and 9‘2 9¼ 2 for computational experiments of all instances. To the best of our knowledge, the best algorithms for irregular packing problem include SAHA by Gomes and Oliveira [6], 2DNest by Egeblad et al. [7] and ILSQN by Imamichi et al. [8]. Table 2 shows the best and average efficiency of 10 runs in per cent and the average computational time of 10 runs in seconds for ELS and ILSQN. Both algorithms use the same time limit for each run, but our algorithm needs more time because of the compact algorithm, so the computational time of ELS is a little more than that of ILSQN. The average results of ELS are in general better (12 out of
Fig. 6. Average efficiencies against 9‘1 9.
Fig. 7. Average efficiencies against 9‘2 9.
15 instances) except SHIRTS, SWIM and TROUSERS, and better solutions have been obtained for 11 out of 15 instances in terms of best results of 10 runs. Comparison of best efficiency and computational time of ELS and other algorithms (SAHA, 2DNest, ILSQN) is shown in Table 3. Both SAHA and 2DNest run 20 times while ELS and ILSQN run 10
684
S.C.H. Leung et al. / Computers & Operations Research 39 (2012) 678–686
Table 2 The efficiency in % and computational times of ELS and ILSQN. Instance
ELS
ALBANO DAGLI DIGHE1 DIGHE2 FU JAKOBS1 JAKOBS2 MAO MARQUES SHAPES0 SHAPES1 SHAPES2 SHIRTS SWIM TROUSERS
ILSQN
Average (%)
Best (%)
Time (s) 10 runs
Average (%)
Best (%)
Time (s) 10 runs
87.38 86.27 91.61 100.00 90.00 88.35 80.97 82.57 88.32 66.85 74.24 82.55 87.20 74.10 88.29
88.48 88.11 100.00 100.00 91.94 89.10 83.92 84.33 89.73 67.63 75.29 84.23 88.40 75.43 89.63
1203 1205 601 600 600 603 602 1204 1204 1207 1212 1205 1293 1246 1237
87.14 85.80 90.49 84.21 87.57 84.78 80.50 81.31 86.81 66.49 72.83 81.72 88.12 74.62 88.69
88.16 87.40 99.89 99.99 90.67 86.89 82.51 83.44 89.03 68.44 73.84 84.25 88.78 75.29 89.79
1200 1200 600 600 600 600 600 1200 1200 1200 1200 1200 1200 1200 1200
Table 3 Comparison of four algorithms’ best efficiency and computational time. Instance
ELS Best (%)
ALBANO
88.48
SAHA Pentium4 2.4 GHz 10 runs 1203
Best (%)
87.43
2DNest Pentium4 2.4 GHz 20 runs
Best (%)
2257
ILSQN Pentium4 3.0 GHz 20 runs
Best (%)
Xeon 2.8 GHz 10 runs
600
88.16
1200
600
87.40
1200
600
99.89
600
600
99.99
600
600
90.67
600
600
86.89
600
600
82.51
600
600
83.44
1200
600
89.03
1200
600
68.44
1200
600
73.84
1200
600
84.25
1200
600
88.78
1200
600
75.29
1200
600
89.79
1200
87.44b DAGLI
88.11
1205
87.15
5110 85.98b
DIGHE1
100.00
601
100.00
83 99.86
DIGHE2
100.00
600
100.00
22 99.95
FU
91.94
600
90.06
296 91.84b
JAKOBS1
89.10
603
78.89a
332 89.07
JAKOBS2
83.92
602
77.28
454 80.41b
MAO
84.33
1204
82.54
8245 85.15
MARQUES
89.73
1204
88.14
7507 89.17b
SHAPES0
67.63
1207
66.50
3914 67.09
SHAPES1
75.29
1212
71.25
10314 73.84
SHAPES2
84.23
1205
83.60
2136 81.21b
SHIRTS
88.40
1293
86.79a
10391 86.33b
SWIM
75.43
1246
74.37
6837 71.53b
TROUSERS
89.63
1237
89.96
8588 89.84b
a
Better results were obtained by a simpler greedy approach GLSHA [6]: 81.67% for JAKOBS1 and 86.80% for SHIRTS. Better results were obtained by running 2DNest once for 6 h [7]: 87.88% for ALBANO, 87.05% for DAGLI, 92.03% for FU, 81.07% for JAKOBS2, 89.82% for MARQUES, 81.59% for SHAPES2, 87.38% for SHIRTS, 72.49% for SWIM and 90.46% for TROUSERS. b
times. ELS could find the best solutions for 10 out of 15 instances, and computational time of ELS is not much longer than other algorithms. Note that Dighe1 and Dighe2 are jigsaw puzzles; the best efficiency reached is 100%. Both of them are also solved quite well by our algorithm; best efficiencies are 100%, and the average efficiency of DIGHE2 is also 100%. The best results of our algorithm in 10 runs are shown in Fig. 8.
8. Conclusions We present a new algorithm ELS for the irregular strip packing problem. This algorithm is based on local search and uses tabu search to escape the local minima. The results are further improved by a compact algorithm. The computational results of 15 instances indicate that ELS is competitive with other existing algorithms and it also updates several best known results.
S.C.H. Leung et al. / Computers & Operations Research 39 (2012) 678–686
685
Fig. 8. Best results found by ELS.
Acknowledgments The authors would like to thank the referees for their careful, serious and valuable comments that help improve this paper. This work is supported by the National Nature Science Foundation of China (Grant no. 60773126).
References [1] Nielsen BK, Odgaard A. Fast neighborhood search for the nesting problem. Technical report 03/03, DIKU, Department of Computer Science, University of Copenhagen, 2003. [2] Art Jr, RC. An approach to the two-dimensional, irregular cutting stock problem. Technical report 36.Y08, IBM Cambridge Scientific Centre, 1966.
[3] Hopper E, Turton BCH. A review of the application of meta-heuristic algorithms to 2D strip packing problem. Artificial Intelligence Review 2001;16:257–300. [4] Bennell JA, Oliveira JF. The geometry of nesting problems. European Journal of Operational Research 2008;184(2):397–416. [5] Burke E, Hellier R, Kendall G, Whitwell G. A new bottom-left-fill heuristic algorithm for the two-dimensional irregular packing problem. Operations Research 2006;54(3):587–601. [6] Gomes AM, Oliveira JF. Solving irregular strip packing problems by hybridising simulated annealing and linear programming. European Journal of Operational Research 2006;171:811–29. [7] Egeblad J, Nielsen BK, Odgaard A. Fast neighborhood search for two and three-dimensional nesting problems. European Journal of Operational Research 2007;183:1249–66. [8] Imamichi T, Yagiura M, Nagamochi H. An iterated local search algorithm based on nonlinear programming for the irregular strip packing problem. Discrete Optimization 2009;6:345–61.
686
S.C.H. Leung et al. / Computers & Operations Research 39 (2012) 678–686
[9] Albano A, Sapuppo G. Optimal allocation of two-dimensional irregular shapes using heuristic search methods. IEEE Transactions on Systems, Man and Cybernetics 1980;5:242–8. [10] Jakobs S. On genetic algorithms for the packing of polygons. European Journal of Operational Research 1996;84:539–61. [11] Gomes AM, Oliveira JFA. 2-Exchange heuristic for nesting problems. European Journal of Operational Research 2002;141:359–70. [12] Dowsland KA, Dowsland WB, Bennell JA. Jostling for position: local improvement for irregular cutting patterns. Journal of the Operational Research Society 1998;49:647–58. [13] Zhang DF, Chen JC, Liu YK, Chen HW. Discrete no-fit polygon, a simple structure for the 2-D irregular packing problem. Journal of Software 2009;20(6): 1511–20. [14] Bennell JA, Dowsland KA, Dowsland WB. The irregular cutting-stock problem—a new procedure for deriving the no-fit polygon. Computers and Operations Research 2001;28(3):271–87.
[15] Burke EK, Hellier RSR, Kendall G, Whitwell G. Complete and robust no-fit polygon generation for the irregular stock cutting problem. European Journal of Operational Research 2007;179:27–49. [16] Dobkin D, Hershberger J, Kirkpatrick D, Suri S. Computing the intersectiondepth of polyhedral. Algorithmica 1993;9(6):518–33. [17] Kim YJ, Lin MC, Manocha D. Incremental penetration depth estimation between convex polytopes using dual-space expansion. IEEE Transactions on Visualization and Computer Graphics 2004;10(2):152–63. [18] Li Z, Milenkovic V. Compaction and separation algorithms for non-convex polygons and their applications. European Journal of Operational Research 1995;84:539–61. [19] Bennell JA, Dowsland KA. Hybridising tabu search with optimization techniques for irregular stock cutting. Management Science 2001;47(8):1160–72. [20] Glover F. Future paths for integer programming and links to artificial intelligence. Computers and Operations Research 1986;13(5):533–49.