11th IFAC Workshop on Intelligent Manufacturing Systems The International Federation of Automatic Control May 22-24, 2013. São Paulo, Brazil
FrAT1.1
Irregular Packing Problems: Industrial Applications and New Directions Using Computational Geometry ? A. Miguel Gomes ∗ ∗
INESC-TEC, Faculdade de Engenharia, Universidade do Porto, Rua Dr. Roberto Frias s/n, 4200-465 Porto, Portugal, (e-mail:
[email protected])
Abstract: Cutting and Packing problems are hard Combinatorial Optimization problems that naturally arise in all industries and services where raw-materials or space must be divided into smaller non-overlapping items, so that waste is minimized. All the Cutting and Packing problems have in common the existence of a geometric sub-problem, originated by the natural item non-overlapping constraints. An important class of Cutting and Packing problems are the Irregular Packing problems that occur when raw materials have to be cut into items with irregular shapes. Irregular Packing problems, also known as Nesting problems, naturally arises in the garment, footwear, tools manufacturing and shipbuilding industries, among others. Each industrial application has its owns particular issues mainly related to the raw material’s specific characteristics. Several challenges remain open in the Irregular Packing problems field. Some are due to the combinatorial nature of these problems. Others are of geometric nature, due to the nonconvex and non-regular geometry of the items involved. Moreover these geometric challenges do not allow the combinatorial ones being properly tackled. This paper is mainly focused on presenting and discussing efficient tools and representations to tackle the geometric layer of nesting algorithms that capture the needs of the real-world applications of Irregular Packing problems. Keywords: Cutting and Packing, Irregular Packing, Nesting, Geometry. 1. INTRODUCTION Cutting and Packing (C&P) problems are hard Combinatorial Optimization problems that naturally arise in all industries and services where a given resource, raw material or space, must be divided into smaller nonoverlapping items, so that waste is minimized. All C&P problems have in common the existence of a geometric subproblem, originated by the natural item non-overlapping constraints. In this geometric sub-problem the number of relevant dimensions and the geometry of the items play an important role. Another crucial issue is the type of assignment, maximizing output or minimizing input. In the first case, maximizing output, one wishes to obtain the maximum number (or value) of small items from a limited set of large objects. In the second case, minimizing input, one wishes to minimize the amount of resource needed to produce a given set of small items. These characteristics are synthesized in the C&P typology proposed by Wäscher et al. (2007). Container Loading, Rectangular Strip and Bin Packing and Circle Packing are classical examples of C&P problems. In the Container Loading problem a set of given ? This research was partially supported by FP7-PEOPLE-2009IRSES Project No. 24688 and by Fundação para a Ciência e Tecnologia (FCT) Projects PTDC/EME-GIN/105163/2008 (EaGLeNest) and PTDC/SEN-TRA/121715/2010 (StableCargo).
978-3-902823-33-5/13/$20.00 © 2013 IFAC
boxes need to be packed inside a container or a truck. In the Rectangular Strip and Bin Packing problems a set of rectangles need to be packed, respectively, on a minimum length strip or a minimum number of boards. The Circle Packing problem deals with the packing of a set of circles inside a circular or rectangular container. In the Irregular Packing problem the major difference comes from the more complex items’ geometry, which can be irregular (i.e., nonconvex and non-regular). These problems arise when a set of irregular items need to be packed, without overlapping, inside a minimum strip or an irregular board. From the previous examples one can derive the main characteristic which distinguish the Irregular Packing problem from the remaining C&P problems: the items’ complex and nonregular geometry. This characteristic leads to the necessity of using efficient geometric tools and representations to achieve good quality feasible solutions. This paper focus on presenting and discussing geometric tools and representations needed to develop efficient nesting algorithms to tackle real-world Irregular Packing problems. This paper is structured in five sections, being this the first one. Section two is devoted to presenting the Irregular Packing problem in detail. Geometric representations are presented in the third section, while the fourth section is devoted geometric tools. Section five introduces the use of graphical processing approaches to the Irregular
378
Figure 1. Irregular Packing problem layout example. packing problem. Finally, the last section discusses industrial applications and presents some concluding remarks. 2. IRREGULAR PACKING PROBLEM The Irregular Packing problem, also known as Nesting problem, is a hard combinatorial optimization problem where a set of two-dimensional irregular items need to be packed in minimum length strip or inside an irregular board. The irregular items cannot overlap each other and must be entirely placed inside the strip or board. Like in other C&P problems, the solution of a Irregular Packing problem is a cutting pattern or a layout (Fig. 1). Irregular items are usually defined by just simple polygons (i.e., non-regular polygons), although they may also have internal holes (i.e., multi-connected regions) or even nonstraight outlines. Both internal holes and non-straight outlines are removed on a pre-process stage. Internal holes are filled by smaller irregular items and afterwards eliminated. Non-straight outlines are approximated by a set of external edges. An alternative geometric representation is the raster representation, where irregular items are discretized and represented in matrices. These issues will be further discussed on section three. The irregularity of the items presents a major challenge in developing nesting algorithms, increasing the difficulty of the underlying geometric problem. In fact, given two non-convex polygons and their relative positions, to know if they overlap is a non-trivial time-consuming task that enormously limits the computational effort that can be dedicated to optimizing nesting solutions. A detailed and comprehensive discussion on algorithms and approaches for the Irregular Packing problem is presented in (Bennell and Oliveira, 2009). The simplest Nesting algorithms are based on constructive heuristic. These heuristics place items one by one, selecting, in each iteration, the next item to be placed (selection heuristics) and where to place it (placement rules). Selection heuristics can be static, where the items’ order is previously set by a fixed rule, or dynamic, where in each iteration an item is chosen accordingly to the previous placed items (Oliveira et al., 2000). Placement rules actually place the items in the layout one by one, following a greedy rule, like the bottom-left placement (Dowsland et al., 2002) and the bottom-left-fill placement (Burke et al., 2006). The ability to fill holes among the previous placed items in the layout is one of the most important issues for placement rules. Constructive heuristics are quite fast, being able to deal with large instances. 978-3-902823-33-5/13/$20.00 © 2013 IFAC
Improvement approaches, like local search algorithms and metaheuristics frameworks, are another type of Nesting algorithms. In these approaches a better solution is searched in a neighborhood defined by a one or movements. In pure local search algorithms only better solutions are accepted (Gomes and Oliveira, 2002), which usually leads to local optima solutions. To overcome this limitation, metaheuristics approaches can accept poorer solutions. The balance between intensification, the search for a better solution in the current neighborhood (i.e, achieving local optima solutions), and diversification, moving to a different neighborhood in the solution space (i.e., escaping from local optima solutions), plays an important role in the design and implementation of any metaheuristic. Egeblad et al. (2007) propose a very effective approach to the Irregular Packing problem, where a fast neighborhood search algorithm based on a guided local search metaheuristic. A recent trend in the combinatorial optimization field is the hybridization between metaheuristics and mathematical programming models (Maniezzo et al., 2010). These approaches, named Matheuristics, try to incorporate mathematical programming techniques into metaheuristic frameworks, metaheuristic concepts inside mathematical programming solvers or use both approaches cooperatively. Examples of nesting matheuristics are the hybridization between simulated annealing and linear programming models proposed by Gomes and Oliveira (2006) and the iterated local search based on nonlinear programming presented by Imamichi et al. (2009). A final word about mathematical models for Irregular Packing problems. Until recently only very small toy instances (up to 7 items) where solved optimally using mixed integer programing models. However, due to the continuously increasing in the available computational power and the improvements in modern solvers a new generation of mathematical models for Irregular Packing problems is starting to appear. Martinez et al. (2012) uses a branch and bound algorithm that solves a mixed-integer programming model based on the horizontal slices formulation (H-Slice), being able to solve optimally instances up to 16 items. Toledo et al. (2013) propose a flexible mixedinteger programming model based on a discretization of the board. This approach takes advantage not only of the board discretization, but also of the existence of repeated items, to solve instances up to 56 items.
3. GEOMETRIC REPRESENTATIONS An important issue that needs to be tackled by any nesting algorithm is the ability to deal with the geometric problem raised by the non-regularity and non-convexity of the irregular items. In the heart of this geometric problem is the necessity to achieve feasible placements for all irregular items, which means that items have to be checked against each other for overlaps and must be placed inside a strip or an irregular board. This necessity leads to the necessity of developing efficient and robust geometric tools and representations. Bennell and Oliveira (2008) present a tutorial on the geometric issues of irregular packing problems. This section and the next one are mainly based on that work, updating it when necessary.
379
Analysing the matrix of pixels, one can easily detect the best feasible placements and overlapping situations, without requiring complex calculations, although, a grid representation always means a loss of precision that depends on the matrix resolution. Fig. 7 – Sliding vector trimming []. identifying feasible placements in a polygonal representation requires complex and repetitive trigonometric calculations whose calculation time depends on the geometric complexity ofrepresentation. the polygons. On the other (a) Raster Fig. 5 this – Raster representation piece. [?] hand, representation does not limitof theaprecision.
2.2.2.
Polygonal representation
A polygonal representation only stores the polygon’s vertices sequentially (figure 6), which makes it much more economical in terms of memory. However, (b) Polygonal representation. Fig. 6 – Polygonal representation of a piece.
(a) Item to be placed (i).
Mahadevan’s algorithm, however, has a limitation: it does not detect the holes of the NFP. If A has a concavity where B fits but the entrance is too narrow, that placement is not detected as B can’t slide in. Burke et (b) problem NFP’s ofby, item (i)determining with the other al [] solves this after theitems. outer hull of the NFP using a procedure similar to Mahadevan’s (with some improvements), searching the non traversed edges for a new place where B fits and from where it can start again the sliding process (figure 8).
id identify s sentatio ri ric calc g geomet hand, ht
Figure 2. Geometric representations (Bennell and Oliveira, 2008).3. Related work
for NFP calculation There are3.1. two Algorithms basic distinct ways of representing the geometry of nesting problems: a raster representation, where Many recent approaches use the concept of NFP to identify the feasible placements of a piece. The NFP’s a grid of pixels is used to represent irregular items, or a f a piece. [?] be calculated in a pre-processing stageonly beforethe run- polygons’ polygonalcan representation, which saves of that piece with ning theapproaches nesting algorithm and stored for future usage, vertices. Both have advantages and disadvanece with the stock saving up execution time. There are two distinct methtages. r the piece on the ods to obtain the NFP: one based on the sliding algo-
(c) IFP of that item with the strip.
Fig
3
3. [? R Fig. 4 – Feasible placements of a piece.
rithm methods, which makes a polygon slide around In a raster representation, the irregular items are reprethe other, and other based on the Minkowski sums from sented on which a matrix pixels whose values differ 3 (a) Piece to be placed. (b) NFP’s of that3.1. piece we can of deduce the NFP, according to Gosh []. according to what is present on that spot (figure 2a), it can be the other pieces. (c) IFP of that piece with the space it can be an item or overlapped items; Mao 3.1.1. orSliding algorithm (d) Feasible placements item on the current layout. epresenting theempty gesheet. for (d)the Feasible placements for the piece in some representations the contours of the items are ter representation, id identify The sliding algorithm was firstly proposed by Ma44––Feasible placements ofofitem aapiece. [?] current layout. Fig. 4Fig. –Fig. Feasible placements ofofa an piece. [?] Feasible placements piece. [?] and by a grid of also pix- represented by distinct pixel values. Analyzing the Figure 3. Feasible placements (Gomes hadevan [] and begins with two pieces, A and B, in can bec hich saves onlymatrix the Oliveira, 2002). of contact pixels, can e.g. easily detect best feasible withone each other, placing togetherthe one ver(a) Piece to be placed. (b) NFP’s of that piece with (a) Piece to be placed. (b) NFP’s of that piece with h approaches have (a) Piece to be placed. (b) NFP’s of that piece with ning thn tex and of each. From this configuration, B slides around requiring placements overlapping situations, without the (c) ofof that piece with the other pieces. (c)the IFP ofIFP that piece with stock A, maintaining contact with it, describing N F PAB the other pieces. (c) IFP thatrepresentation piece with thestock stockis savings ofother N F Ppieces. items will touch but the the placement complex calculations. However, a gridtherepresentation al-the edge 2.2. Nesting AB contours with its reference point, R sheet. (d) Feasible placements for the piece on the B . In case of one feasible. However, if B’splacements reference is on placed inside (d) Feasible placements for thepoint piece theon ways means a loss of precision than can be more or lesssheet. sheet. (d) Feasible for the piece the ods too of the polygons having concavities, there are some recurrent layout. N F P , the two items will overlap, which means that There are two distinct ways of representing th significantstrictions depending on the matrix resolution. Another AB current layout. current layout. rithm ri m to the sliding operation. For instance, if there olygons are reprefeasible. Every placement importantisissue of the rasterA,representation its flexibility the placement is not ometry of nesting problems:outside a rasterof represent a concavity in polygon B may not be able toisslide th the oth e values differand ac- independence of the actual geometry of the irregular N F PAB is feasible.where the polygons are represented by a grid o the whole length of an edge at a time as it will collide spot (figure 5): it whichw with another edge of A’s concavity. For this situations items 2.2. representation iece or more over2.2.The Nesting IFP Nesting ofNesting arepresentation surface A an item representation, B (IF PAB ) delimits els or and a polygonal which saves on 2.2. representation Mahadevan’s algorithms evaluates how far B can slide ns the contours of the region of B’s placements where B does not exceed the A polygonal representation only without overlapping A (figure 7). stores the polygon’s verpolygons’ vertices’ coordinates. Both approaches stinct pixel values. There are two distinct ways ofof representing the geThere are two distinct ways of representing the gelimits of A. Therefore, B must be placed inside IF P . 3.1.1. 3 There are two distinct ways representing the getices sequentially (figure 2b), which makes it much more AB one can easily deadvantages and disadvantages. ometry of nesting problems: a raster representation, An ometry IFP is ofobtained through ana analogous process to in terms of memory. However, identifying fea-ometry of nesting problems: a raster representation, nesting problems: raster representation, d overlappingeconomical sitThe thewhere NFP’s. places B represented inside surface and slides placements in a polygonal representation, due towhere x calculations,sible althe polygons are by aaofgrid the polygons are represented by a grid pix-of where theOne polygons are represented byA grid ofpixpix-it hadevah s means a loss of non-convex and non-regular items’ geometry, requires around a way 2.2.1. that it Raster is always in contact withthe the the els ororin aapolygonal representation, which saves only representation a boundaries, polygonal representation, which saves only the polygonal representation, whichIf saves only the contact resolution. complex and repetitive trigonometric calculations. Theels or c A’s els but never crosses them. B’s reference polygons’ vertices’ coordinates. Both approaches have polygons’ vertices’ coordinates. Both approaches have polygons’ vertices’ coordinates. Both approaches have IF aPAB , Brepresentation, will be inside the A and if texare calculations time depends on the geometric complexity of point is placed inside In grid polygons oftee and and disadvantages. advantages anddisadvantages. disadvantages. Fig. 7 – other Sliding vector []. B’sadvantages reference point is on IF ’s edgesofBpixels is touching the polygons. On the hand,trimming this representation doesadvantages sented onPAB a matrix whoseA’s values diff A, maiA limits. These are both feasible placements. If B’s reference not limit the precision. whatis isnot present on that spot (figure contouc Mahadevan’s algorithm, however, has a limitation: point is outside IFcording PAB , thetoitem completely inside 2.2.1. Raster representation 2.2.1. RasterRaster representation can be empty space or it a piece orofmore it does not the holes of the NFP. If A has a conrepresentation theop 4.detect GEOMETRIC TOOLS the 2.2.1. surface and, therefore, the placement is can not be feasible. of a piece. [?]
cavity where B fits but the entrance is too narrow, that lapped pieces;the in some representations thestrictio contos In grid polygons are repreplacement is not detected as B can’t slide in. Burke et When searching for a feasible placement an item in In a grid the polygons areforrepreInaarepresentation, gridrepresentation, representation, the polygons are repreThere arealsome geometric tools that simplify the placeis the pieces are also represented by distinct pixel v is a con [] solves this problem by, after determining the outer a partial layout, algorithms can use these tools sented on ofofpixels values differ acon a matrix ofNesting pixels whosewhose values differ acsented onaamatrix matrix pixels whose values differ acment of irregular items allow theto Mahadedevelopment ofsented hull of the NFP using aand procedure similar th the wh Analysing the matrix of pixels, one can easi to ensure the feasibility of the layout (i.e., all items cording totowhat isispresent on that spot (figure it efficient nesting algorithms based on polygonal y stores the polyvan’s (with some improvements), searching the non represen-cording tothe what iswhat present on that spot 5): it 5): cording present on that(figure spot (figure 5): w strip or board no overlap between items). with an tect theitand best feasible placements anditoverlappin traversed edges for new No-Fit place where B fits and (NFP), from 6), which makes it tations. One of those is athe Polygon whichcaninside can be empty space or can be a piece or more overbe can empty space or it can be a piece or moreoroverbe empty space or it can be a piece more overAdditionally, to obtain compact layouts efficiently, Nesting M memory. However, where it can start again the sliding process (figure 8). Mahad uations, without requiring complex calculation prevents the item currently being placed from overlapping
inin some the contours ofof lappedlapped pieces;pieces; in some representations theand contours of and should analyze all the IFP NFP edges lapped pieces; somerepresentations representations the contours the already placed items. Another one is the Inner-Fit- algorithms withou though, a gridby representation always means aw lo the pieces are also represented distinct pixel values. intersections that lie inside the IFP and are not inside of are alsoare represented by distinct pixel values. the pieces also represented by distinct pixel values. Polygon (IFP) that prevents the item currently beingthe pieces precision that depends on the matrix resolution. any NFP. Figure 3 illustrates this Analysing the matrix ofofpixels, one can easily deAnalysing the matrix of pixels, one situation can easily deplaced from exceeding the boundaries. Analysing the matrix pixels, one canwhen easilyusing dea polygonal representation. This idea can also be used in tect the best feasible placements and overlapping sittect the best feasible placements and overlapping sittect the best feasible placements and overlapping sitThe NFP of items A and B (N F PAB ) delimits the region a raster representation by discretizing all NFPs and IFPs uations, without requiring complex calculations, without requiring calculations, al- aluations, without complex calculations, alof B’s placements that will make the two items overlap.uations, in matrices. To obtainrequiring thecomplex feasible the feasible placements, though, a grid representation always means a a gridbetween means a loss of Therefore, B must be placed outside N F PAB . N F PAB isthough, the though, NFPs next always item toalways place and items already arepresentation grid the representation means aloss lossofof precision that the polygon drawn by B’s reference point when B slidesprecision placed should bedepends added to the IFP ofresolution. the next item to that depends on theon matrix resolution. precision that depends onthe thematrix matrix resolution. around A in a way that the two items always touch but place. An example of using NFPs and IFPs with a raster never overlap. Hence, if B’s reference point is placed on the representation is shown in section five.
Fig. 5 – Raster representation of a piece. [
978-3-902823-33-5/13/$20.00 © 2013 IFAC
380
2.2.2.
Polygonal representation
Ma it doesit Arepresentation polygonal only stores thec 55––Raster representation ofofaapiece. Fig. 5Fig. –Fig. Raster representation of arepresentation piece. [?] Raster piece.[?] [?] cavity
calculates the is NFP’s these sub-polygons. in convex decomposition (second paragraph section sub-polygons doneofgraphically. Instead ofofUnlike composments. calculations are even more complicated dependent the shapes complexity. Polygonal reptest. OnThese thefrom current implementation, this procedure is other approaches, theNFP’s composition of NFP’sinof the 3.1). This approach decomposes thethe pieces coning analytically the of the sub-polygons these if the shapes arerender complex there are more to resentations require a lot ofasrepetitive trigonometrical replaced by the of the partial layout andedges the imsub-polygons is done graphically. of composvex sub-polygons using a the decomposition and are directly rendered with sameInstead color, strategy forming the test. On the to current implementation, this procedure is calculations determine region of feasible placeage processing, which are the independent from the geoming analytically the NFP’s of theprocess sub-polygons these calculates thecomplete NFP’s ofNFP. these sub-polygons. Unlike in image of the This is much simreplaced byrendering thecalculations render of the and the imments. These arepartial even layout more complicated etry since complex polygons and extracting are rendered the sameanalytical forming other the with composition ofcolor, the NFP’s of the plerdirectly asapproaches, it avoids a time-consuming composiage processing, are independent from geomif shapesofare complex as region there are more edges to thethe contours awhich complicated from an the image are image NFP. This process much simsub-polygons is done graphically. Insteadisof compostion. of the complete etry since rendering complex and extracting test. On the current implementation, procedure is not significantly slower than inpolygons case ofthis simpler shapes. plerSmall as it avoids athe time-consuming composiing analytically NFP’s of[] the sub-polygons these side angle bisector wasanalytical the strategy used to the contours of arender complicated region layout from anand image are replaced by the of the partial the imtion. are directly the rendered withbecause the sameit color, forming decompose polygons was the fastestthe of not significantly slowerare than in case of from simpler age processing, which independent theshapes. geomAdditionally, NFPs between allside pairs ofbisector items and IFPs for image of the complete NFP. This process iswere much simSmall angle [] was the strategy used to the tested ones and the one whose results closer etry since rendering complex polygons and extracting all items can de calculated a the pre-processing stage. pler it avoids a time-consuming decompose polygons because itanalytical was This the composifastest of to theasin optimal decomposition. the contours of a complicated region from an image are should be done for alltion. admissible orientations. However, the tested ones and the one whose results were Two distinct algorithms - Minkowski sumscloser and not significantly slower than in case of simpler shapes. obtaining a robust NFP generator for bisector general non-convex to the optimal Small side decomposition. angle was the strategy to slope diagram, mentioned in[] section 3.1, haveused been the polygons because the fastest of items is non-trivial. Andecompose alternative is the to NFP’s decompose Two algorithms - Minkowski sums and used to distinct calculate ofit was the nonconvex subthe tested ones and thesimilar one in whose results were slope diagram, mentioned section 3.1, have been polygons, both taking amounts of time tocloser comconvex items in convex ones, since computing the NFP to theis optimal decomposition. used to calculate the NFP’s ofItthe convex subplete the between two convex items aoperation. trivial operation. should both taking similar amounts of to comTwo distinct algorithms - Minkowski and The problem data is loaded from settime ofsums files that (a) Current layout and next item to place (p). be noted that obtainingpolygons, the complete NFP from the apartial plete the operation. slope diagram, section 3.1, have been describe the surface and theinpiece types available, inNFPs between convex sub-items is mentioned a non-trivial operation used to calculate NFP’s of type the convex The is loaded from a set ofdesignate files subthat dicate theproblem numberdata ofthe pieces of each and due to degenerated cases. Bennell and Oliveira (2008) polygons, both takingand similar amounts of available, time to comdescribe the surface piece types inthe rotations permitted forthe each piece. The calculation A detailed discussion plete algorithms to incompute operation. dicate the number of done pieces ofthis each type NFP and designate ofon thethe NFP’s is also pre-processing phase between two irregular items. the permitted piece. calculation Thethe problem data isfor loaded from a The set filesrotathat for rotations all possible pairs ofeach piece types in of every of NFP’s is also done in this phase describe the surface and piecepre-processing types intionthe allowed. Finally, the the polygon data is available, stored on the Another powerful geometrical tool, ofproposed bytype Stoyan for allmemory, the number possible of of piece in rotadicate the pieces eachtypes andevery designate GPU usingpairs display lists, for a more efficient et al. (2002), is the Φ-function, which in fact ispiece. aalgorithm. generaltion allowed. Finally, the polygon data is stored on the the rotations for each The calculation render duringpermitted the execution of the (b) Contour of NFP/IFP’s image of the current ization of the NFP. Φ-functions are mathematical GPU display lists,pre-processing forexpresa more efficient of thememory, NFP’s is using also done in this phase layout and the selected bottom-left placement. sions that represent the relative positions two objects. render the execution of the algorithm. for all during the possible pairs ofof piece types in every rota5.2. Individual piece placement When its value is positive the two items are separated, tion allowed. Finally, the polygon data is stored on the GPUToitems using display forwe a more when it is zero the two when it isefficient place aoverlap piecepiece p onand a lists, layout must identify 5.2. memory, Individual placement Fig. 12 – Placement of a piece on a partial layout. render during the execution theΦ-function algorithm. the overlap. places where it fits. Asofintroduced in the end of negative the two items Normalized a.Current partial layout. b.Contour of NFP/IFP’s To place a piece p on a layout we must identify section 2.1, the NFP’s of p with the placed polygons gives the actual Euclidean distance between two items, Fig. 12of–the Placement of a piece on aselected partialbottomlayout. image current layout and the the places where it fits. As introduced in the end of and the IFP of p with the surface are drawn (using while non-nomalized Φ-function gives an estimate of the 5.2. Individual piece placement a.Current partial layout.with b.Contour NFP/IFP’s left placement. c.Layout the pieceofplaced. section 2.1,with the the NFP’s of color. p with The the placed OpenGL) same NFP’s polygons represent distance. Bennell et al. (2010) present Φ-functions for a set image the current and the selected bottomand To theplace IFP of p with the asurface drawnidentify (using a piece p on layout are we must (c)ofLayout withlayout the new item placed. of primary objects (circles, rectangles, polygons, left placement. c.Layout placed. Fig. 12 – Placement of awith piecethe onpiece a partial layout. OpenGL) with theit same color. The NFP’s represent the places where fits.regular As introduced in the end of partial b.Contour NFP/IFP’s convex polygons and their complement). that not section 2.1, the NFP’s Items of p with the are placed polygons Figure 4.a.Current Placement oflayout. an item on a ofpartial layout by image of the current layout and the selected bottomprimary objects are represented union intersection and the IFP as of pa with the or surface are drawn (using the graphical processing approach using a bottom-left left placement. c.Layout with the piece placed. of the primary objects.OpenGL) with the same color. The NFP’s represent placement rule (Sampaio, 2012).
NFPs/IFPs and Φ-functions can also be used to construct mathematical models for the Irregular Packing problem. The linear programming models used to compact and separate layouts in (Gomes and Oliveira, 2006) are based on NFPs and IFPs. The H-Slice model on (Martinez et al., 2012) is based on partitioning the feasible placement region for two items (i.e., the complement of the NFP) in horizontal slices. Chernov et al. (2010) presents a nonlinear mathematical model based on Φ-functions that it is able to rotate items.
Time/nes(ng*(ms)*
100000# 10000#
Gomes#and#Oliveira# (Pen3um#III#450#MHz)#
1000#
Burke#et#al.# (Pentuim#4#2#GHz)# Graphical#processing## approach#(i5#2.27#GHz)#
100# 10# fu#
shapes#
shirts#
trousers#
swim#
Figure 5. Nesting time comparison (times in ms and using a logarithmic scale). 5. EXPLORING GRAPHICAL PROCESSING IN IRREGULAR PACKING PROBLEMS Raster representations were popular in the eighties and early nineties mainly due to the limited computing power available and their simplicity. With the escalade in the computing power, they become less used in favor of polygonal representations. Raster representations are becoming once again attractive due to the development of graphical processing devices (often referred to as GPU – Graphical Processing Unit or General-Purpose Graphics Processing Units). These devices have evolved a lot lately, not only concerning its graphical processing capabilities but also regarding parallel processing. A natural approach to solve Irregular Packing problems with GPU devices is to transfer the geometry processing to the GPU, using a raster representation of the cutting pattern. The layout is rendered in the graphical device and the image produced processed. An image processing step detects the feasible placements for an item by “drawing” the NFPs and IFP for the next item to be placed. This analysis efficiently identifies the possible placements of an item and is independent from the items’ geometry since it is done over over the raster layout. Finally, a placement 978-3-902823-33-5/13/$20.00 © 2013 IFAC
rule chooses the actual placement. Figure 4 illustrates the using of a GPU device to place one item on a partial layout. Sampaio (2012) compares this graphical processing approach against the bottom-left placement heuristic presented in (Gomes and Oliveira, 2002) and the bottom-leftfill placement heuristic presented in (Burke et al., 2006). This comparison uses 5 data sets taken from ESICUP web site – EURO Special Interest Group on Cutting and Packing 1 : fu, shapes, shirts, trousers, and swim (problems are ordered by increasing items complexity). Results obtained by Sampaio (2012) are presented on figure 5. These results allow concluding that the time needed to place an item in a partial layout by this graphical processing approach is smaller than traditional approaches and, more importantly, it is almost completely independent from the items’ geometric complexity. Additionally, the computational times in the graphical approach does not tend to increase with the number of already placed items. Polygonal representations, even when using NFPs and IFPs, require a lot of repetitive trigonometric calculations to determine the region of feasible placements. 1
http://www.fe.up.pt/esicup
381
These calculations take more time if the items are more complex and when the number of already placed items increases, as there are more edges to test. On the graphical processing implementation, these computations are replaced by rendering the partial layout, memory mapping and image processing, processes whose performance is not influenced by the problem’s formulation. In fact, rendering complex irregular items and extracting the contours of a complicated region from an image is not significantly slower than in case of simpler items.
process is performed with the plate suspended by an “electrified copper string” in continuous way. This means that when an item is completed cut it falls, leading to necessity to cut the items in such a way that they fall one by one and completed cut. This problem was tackled in a two-stage approach. In the first stage, the Irregular Bin Packing problem is tackled by the bottom-left placement heuristic presented in (Gomes and Oliveira, 2002). The second stage deals with the non-trivial cutting path determination and is tackled by a constructive heuristic (Moreira et al., 2007).
Nesting algorithms based on GPU devices can be further enhanced by exploiting the parallel processing capabilities of these devices.
The continuous increasing in the computing power available, together with the development of new and more powerful geometrical tools and mathematical models will allow the development of new nesting algorithms. Not only by improving previous results, but also by allowing tackling more complex Irregular Problems. Particularly interesting are the GPUs with the graphical processing and parallel processing capabilities.
6. INDUSTRIAL APPLICATIONS AND CONCLUDING REMARKS Like all other C&P problems, the Irregular Packing problem is an applied problem with several industrial applications. Each industrial application has its own specific characteristics that can be used to overcome the complex geometric and combinatorial nature it of the Irregular packing problem, leading to the development of successful nesting algorithms. In the following paragraphs three different industrial applications are presented and discussed. The variant of the Irregular Packing problem that appears on the garment and apparel industry is clearly the most well studied. This variant is modeled as an Irregular Strip Packing problem, since the raw material (fabric) is available in rolls with fixed width and a long length. Another important characteristic is the existence of drawing patterns and the physical properties of the fabric’s weave, which limits the possible orientations just to two: 00 or 180o . A few degrees tilting is usually allowed. This industrial application is well suited for using NFPs due to the discrete nature of the possible orientations. The tilting by a few degrees are usually tackled in a post-processing phase. The team led by Milenkovic developed a successful application to a specific type of problem in the garment industry: the production of trousers. Li and Milenkovic (1995) present a compaction algorithm able to improve garment layouts made by human-experts with years of experience. (Daniels and Milenkovic, 1996) developed a successful constructive heuristic that builds columns of items. In the footwear industry natural leather hides have irregular outlines, which leads to a Irregular Bin Packing problem. Additionally, they usually also have defective areas and different quality levels that need to be considered when items’ placing. This variant is clearly more complex due not only to the irregular outline of the hides but also to defective areas. Pre-placed items can model defective areas, while different quality areas can be tackled with computing different IFPs. Heistermann and Lengauer (1995) present an greedy constructive heuristic able to compete with layouts generated human-experts. Another variant of the Irregular Packing problem appear in a high precision tools factory. In this application a set of irregular items need to be placed on a circular plate made tungsten with a thin diamond dust layer. The cutting 978-3-902823-33-5/13/$20.00 © 2013 IFAC
REFERENCES Bennell, J., Scheithauer, G., Stoyan, Y., and Romanova, T. (2010). Tools of mathematical modeling of arbitrary object packing problems. Annals of Operations Research, 179(1), 343–368. Bennell, J. and Oliveira, J.F. (2008). The geometry of nesting problems: A tutorial. European Journal of Operational Research, 184(2), 397–415. Bennell, J. and Oliveira, J.F. (2009). A tutorial in irregular shape packing problems. Journal of the Operational Research Society, 60, S93–S105. Burke, E., Hellier, R., Kendall, G., and Whitwell, G. (2006). A New Bottom-Left-Fill Heuristic Algorithm for the Two-Dimensional Irregular Packing Problem. Operations Research, 54(3), 587–601. Chernov, N., Stoyan, Y., and Romanova, T. (2010). Mathematical model and efficient algorithms for object packing problem. Computational Geometry, 43(5), 535–553. Daniels, K.L. and Milenkovic, V. (1996). Column-based strip packing using ordered and compliant containment. In M.C. Lin and D. Manocha (eds.), Applied Computational Geormetry, Towards Geometric Engineering, FCRC’96 Workshop, WACG’96, 91–107. Springer. Dowsland, K.A., Vaid, S., and Dowsland, W.B. (2002). An algorithm for polygon placement using a bottomleft strategy. European Journal of Operational Research, 141(2), 371–381. Egeblad, J., Nielsen, B.K., and Odgaard, A. (2007). Fast neighborhood search for two- and three-dimensional nesting problems. European Journal of Operational Research, 183(3), 1249–1266. Gomes, A.M. and Oliveira, J.F. (2002). A 2-exchange heuristic for nesting problems. European Journal of Operational Research, 141(2), 359–370. Gomes, A.M. and Oliveira, J.F. (2006). Solving irregular strip packing problems by hybridising simulated annealing and linear programming. European Journal of Operational Research, 171(3), 811–829. Heistermann, J. and Lengauer, T. (1995). The nesting problem in the leather manufacturing industry. Annals of Operations Research, 57(1), 147–173. Imamichi, T., Yagiura, M., and Nagamochi, H. (2009). An iterated local search algorithm based on nonlinear
382
programming for the irregular strip packing problem. Discrete Optimization, 6(4), 345–361. Li, Z. and Milenkovic, V. (1995). Compaction and separation algorithms for non-convex polygons and their applications. European Journal of Operational Research, 84(3), 539–561. Maniezzo, V., Stützle, T., and Voß, S. (eds.) (2010). Matheuristics - Hybridizing Metaheuristics and Mathematical Programming, volume 10 of Annals of Information Systems. Springer. Martinez, A., Alvarez-Valdes, R., and Tamarit, J.M. (2012). A branch and bound algorithm for the nesting problem. Technical report, Department of Statistics and Operational Research. University of Valencia. Moreira, L.M., Oliveira, J.F., Gomes, A.M., and Ferreira, J.S. (2007). Heuristics for a dynamic rural postman problem. Computers & Operations Research, 34(11), 3281–3294. Oliveira, J.F., Gomes, A.M., and Ferreira, J.S. (2000). TOPOS – A new constructive algorithm for nesting problems. OR Spektrum, 22(2), 263. Sampaio, S. (2012). Exploração de processamento gráfico para posicionamento de formas irregulares em problemas de corte (in Portuguese), MSc. Thesis, Faculdade de Engenharia da Universidade do Porto. Stoyan, Y., Terno, J., Scheithauer, G., Gil, N., and Romanova, T. (2002). Phi-functions for primary 2dobjects. Studia Informatica Universali, 2(1), 1–32. Toledo, F.M.B., Carravilla, M.A., Ribeiro, C., Oliveira, J.F., and Gomes, A.M. (2013). The dotted-board model: a new mip model for nesting irregular shapes. International Journal of Production Research, (submitted). Wäscher, G., Haußner, H., and Schumann, H. (2007). An improved typology of cutting and packing problems. European Journal of Operational Research, 183(3), 1109– 1130.
978-3-902823-33-5/13/$20.00 © 2013 IFAC
383