Solution approaches to irregular nesting problems

Solution approaches to irregular nesting problems

EUROPEAN JOURNAL OF OPERATIONAL RESEARCH European Journal of Operational Research 84 (1995) 506-521 ELSEVIER Invited Review Solution approaches to ...

1MB Sizes 12 Downloads 53 Views

EUROPEAN JOURNAL OF OPERATIONAL RESEARCH European Journal of Operational Research 84 (1995) 506-521

ELSEVIER

Invited Review

Solution approaches to irregular nesting problems Kathryn A. Dowsland

*, W i l l i a m B . D o w s l a n d

Statistics and Operational Research Group, European Business Management School, University College of Swansea, Swansea SA2 8PP, UK

Abstract

This paper reviews some of the approaches which have been adopted in the solution of problems involving the nesting of irregularly shaped pieces. Such problems arise in a wide variety of application areas and the purpose of this paper is to bring together problems and solution approaches from a number of diverse domains. Keywords: Nesting; Packing; Heuristics; Optimisation; Survey

1. Introduction

Cutting and packing problems occur across the full spectrum of business activity, from design, through various aspects of the manufacturing process, to distribution and sales. For example, cutting a given set of parts from a stock sheet, packing goods into a fixed loading area, and designing the layout of a newspaper page are all practical problems in which a set of demanded items are to be placed in a given region without overlap. In some cases both the pieces and the containing region are rectangular, and the last 30 years have seen a considerable amount of research leading to effective solutions for many of the problems in this class. These are surveyed in Dyckhoff and Finke (1992), Dowsland and Dowsland (1.992) and Coffman, Garey and Johnson (1984). However there are many situations where either the pieces or the containing region

* Corresponding author.

are irregular in shape. Although less well studied than the rectangular version of the problem, there is a considerable volume of literature on this topic. The basic problem is that of determining an efficient arrangement of the pieces in a containing region or stock-sheet without overlap. However, practical considerations mean that different industries work within different constraints, and with differing objectives. Thus the goal of a general all-purpose irregular cutting-stock algorithm is not a sensible one, and each industry has tended to develop its own approach, with little input from other application areas. This has been further intensified by the trend for the publication of research in industry specific journals or in journals relating to the methodology used, for example computational geometry, computer graphics, or CAD. Locating suitable articles written with reference to a different industry from one's own is further complicated by the differences in terminology. For example the ship-building industry refers to the problem as parts nest-

0377-2217/95/$09.50 © 1995 Elsevier Science B.V. All rights reserved SSDI 0377-2217(95)00019-4

ICA. Dowsland, W.B. Dowsland/ European Journal of Operational Research 84 (1995) 506-521

ing, while in the garment industry it is usually known as the marker layout problem. It is interesting to note that this problem was foreseen by Gurel (1968a) who suggests that the term marker layout could be replaced by template layout so that "it may appeal to individuals in other fields such as the steel and glass industry... ". However Gurel did not heed his own advice and his paper is rarely quoted in research outside the garment industry! The purpose of this paper is to bring together material from a number of these publications. It is not our aim to provide a comprehensive review of all the recent work in the area, but to use a number of examples to illustrate the diversity of the problems tackled and the different strategies applied. In doing so we hope to generate further cross-fertilisation of ideas and methodologies among the different application areas, and to point those working within a specific industry, or using a particular technique, to those journals outside their own field which are worth consulting. In the next section we outline some of the major application areas and highlight the differences and similarities between the problems they generate. We then go on to discuss the different basic strategies for solving the problem and outline some of the computational methods which have been suggested for dealing with the geometric aspects of the problem.

2. Application areas

A vast number of different industries are regularly faced with the problem of cutting two-dimensional objects from a stock-sheet as the first stage of their manufacturing process. The problem of forming a cutting plan by laying out the pieces onto the stock-sheet has traditionally been solved manually by an 'expert'. H u m a n intelligence is well able to tackle such problems and many studies comparing layouts obtained using automatic processes with those produced by an in-house expert show the computer generated solutions to be inferior in terms of trim-loss. However, there is still considerable interest in generating automatic computerised solutions. In

507

some industries the expertise required to beat the best packages often takes several years to acquire, and in others the time required to produce a manual solution may be many times that of the automatic process. As computers become an increasingly integrated part of the manufacturing process, a system which can take a computer generated design, produce the cutting patterns, and then control the actual cutting process, is seen as a more desirable option than one which involves manual intervention. Published research into the problem tends to concentrate on a small number of application areas. Not surprisingly these are for the most part industries in which raw materials form a large proportion of the cost of the finished product. The two most common are the garment and ship-building industries. The parts nesting problem in the ship-building industry involves determining a cutting pattern for a given set of parts, each of which consists of a number of different pieces, from a series of metal stock-sheets. The pieces from a single part must be kept together. As more than one sheet is usually required, the way in which the different parts are combined together has a significant effect on the efficiency of the overall cutting problem. This problem is known as the sequencing problem. Arbel (1993) suggests an integer programming approach based on estimated packing efficiencies to solve this problem prior to actually nesting the pieces. The cutting operation involves a cutting torch and requires that 'bridges' or gaps are left between the pieces to avoid problems of heat distortion. Many of the pieces are rectangular, or close to rectangular, and therefore do not nest well with highly curved or non-convex pieces. Although the primary objective is to minimise waste, large areas of waste at the end of the stock-sheet may be re-useable and therefore will not contribute to cost. Cutting time may also be taken into account, and Tfivora (1989) suggests an algorithm based on a clustered travelling salesman model to minimise the movement of the cutter between cutting operations. The marker layout problem in the garment industry is very different. Here there is no need for bridges between pieces, but the grain and pattern of the fabric means that the orientation is

508

K.A. Dowsland, W.B. Dowsland / European Journal of Operational Research 84 (1995) 506-521

usually fixed (or a 180° rotation is allowed). Typically the pieces in a given marker will be for several copies of the same garment and will consist of a few large pieces, corresponding to the main sections of the garment (e.g. trouser legs), and some very small pieces corresponding to the trim (e.g. pockets and waistbands). The stocksheets also tend to be longer and thinner than those encountered in sheet-metal applications. Other application areas explored in the literature include the stamping of metal components for a variety of engineering applications, cutting boards in the lumber and furniture industries and cutting leather hides for large objects such as furniture upholstery and for footwear and other small goods. In the case of metal stamping the requirement is often for large numbers of identical complex shapes and orientation is not usually

a restriction. The problem is basically that of finding an efficient way of nesting a given (small) number of copies of the piece together and then repeating this pattern along the stock-sheet. The stamping operation will be efficient if all the pieces are in the same orientation, whereas nesting alternate pieces in opposite orientations may be more efficient in terms of trim-loss. Thus a trade-off between the two costs must be evaluated. In some cases a bridge is required between pieces. Fig. 1 illustrates two solutions to the nesting problem given in Prasad and Somasundaram (1991). In the lumber cutting industry orientation may be important due to the grain of the wood. There is also a problem caused by imperfect or unusable areas on the stock-sheet. The leather industry faces these constraints, and additional complexities as the stock-sheets are in fact indi-

Fig. 1. Two solutions to a 'key' nesting problem.

K.A. Dowsland, W.B. Dowsland/ European Journal of Operational Research 84 (1995) 506-521

vidual hides which are themselves irregular. The quality of the hide is unlikely to be uniform and certain items must be cut from sections of a given quality. If the hide is not to be dyed then colour differences may also occur and it is important to cut pieces which will be together in the finished product from adjacent parts of the hide. In spite of these differences all these problems have the common requirement of finding a feasible layout of the pieces on the stock-sheet. Although the number of feasible positions and orientations for a given piece will differ according to the application area, the techniques used for one problem will frequently be applicable to the others, but computational speed and solution quality may differ from one application to another. Whatever the constraints or secondary objectives there are basically three approaches to finding a suitable layout. The pieces may be considered one at a time and placed directly onto the stock-sheet, or may be nested either singly or in groups into a set of enclosing polygons which are then placed onto the stock-sheet, or an initial allocation (which may involve some overlap) is improved iteratively. Each of these basic strategies can be applied in a variety of ways, and all require efficient handling of the computational geometry involved in determining the relationships between the pieces in the layout. In the next three sections we illustrate the basic strategies using examples from the literature and finally discuss the different computational methods which have been applied in their implementation.

3. Nesting Problems involving irregular pieces comprise the most difficult class of packing problems. Rather than deal directly with this level of complexity a number of researchers have considered an alternative approach in which the irregular pieces are nested inside other more regular shapes, and these simpler shapes are then packed into the available area. The most popular shape for nesting is the rectangle, which can then be packed using one of the many rectangle packing methods. If the orientation of the piece is not

509

restricted then it is sensible to enclose it in a rectangle of minimum area. This problem is tackled by Freeman and Shapira (1975). Given any shape defined by a close curve (i.e. a shape without holes) they first enclose it in a convex polygon and then find the required rectangle by iteratively basing the rectangle on each of the edges of the polygon. In practice solutions of this type will only prove satisfactory if the pieces themselves are close to rectangular so that the wasted area inside the enclosure is small. They were first developed for the shipbuilding industry where many of the given pieces are rectangular and will not nest easily with the remaining irregular shapes. If many of the pieces are far from rectangular in shape a more effective option is to nest more than one piece together. This is the approach taken by Adamowicz and Albano (1976). They place a threshold on the amount of waste they are willing to accept in any enclosure. If a shape can be enclosed on its own within this limit then the enclosure is accepted. Otherwise an attempt is made to nest the piece with a 180° rotation of itself. If neither of these two options is good enough an attempt is made to fill the remaining space with some of the remaining pieces. An alternative to using rectangles is to nest all the pieces into identical polygons which can be used to tile the plane. The complete set of plane-tiling polygons is well-known and include triangles, quadrilaterals, pentagons and hexagons. Dori and Ben-Bassat (1984) base their packing algorithm on tessellations using hexagons. They firstly nest the required shape (or shapes) into a polygon which minimises the wasted area and then surround this with a hexagon which is suitable for tiling the plane. They limit themselves to convex polygons, although they state that nonconvex shapes could be nested in a similar manner, and suggest using interactive computer graphics to achieve the nesting. Karoupi and Loftus (1991) have extended these ideas to include automatic nesting of curved and non-convex polygons. This is achieved by simply nesting them into an appropriate convex polygon and then following a method similar to that of Dori and BenBassat to first achieve a hexagonal nesting and then transforming the resulting arbitrary hexagon

510

K.A. Dowsland, W,B. Dowsland/ European Journal of Operational Research 84 (1995) 506-521

into one which will tile the plane. If the hexagons can be made to closely reflect the contours of the original shape this approach does seem to give reasonable quality solutions for little computational cost. It is more appropriate for problems involving large numbers of small pieces as the enclosing hexagons form perfect tessellations of an infinite two-dimensional region but will give rise to some waste around the edges when fitted into a finite rectangular region.

4. Packing The rationale behind nesting methods is to simplify the calculations and to speed up computational time. However, they cannot hope to compete in terms of solution quality with direct methods which base all calculations on suitable representations of the pieces themselves. Straightforward single pass packing strategies involve taking the pieces in order and placing them on the stock-sheet according to a given placement policy. This may be repeated several times for different orderings or different placements and the best solution chosen, or a more intelligent method may be used in a single pass. The simplest such approach is the Monte Carlo method which forms the basis of a parts nesting package described by B/Shme and Graham (1979). The pieces from each part in turn are 'thrown' onto the stock-sheet at random. It is suggested that around 2000 of these random trials are required to obtain good answers. The best solution is then further improved by small random perturbations. Once the arrangement of pieces from the current part is completed the system moves on to the next. Others have designed placement policies adapted from successful rectangular methods. For example Qu and Sanders (1987) compare the performance of two rectangle strategies with a specially modified method. This strategy was originally considered for an application in ship-building and instead of nesting the non-rectangular pieces into an enclosing rectangle they suggest approximating its shape by a union of rectangular sections. Clearly if a sufficiently large number of rectangles per original shape are allowed then

any shape can be approximated with reasonable accuracy. However, Qu and Sanders are largely concerned with pieces which can be accurately represented in this way using a small number of sections. They consider two extensions to standard strip packing policies which performed well in some comprehensive tests carried out by Israni and Sanders (1985). In the first the pieces are sorted into decreasing length order and then placed along two adjacent edges of the stock sheet. The resulting L-shaped region is then considered packed and effectively removed from consideration, and the process is repeated for the remaining rectangular region. The second method uses the same placement policy but orders the pieces according to their heights. They also suggest a modification to a simple strip packing method in which the pieces are sorted into decreasing height order and laid in strips across the bottom of the stock-sheet. The modification is designed to ensure that full advantage is taken of the possible interlock between pairs of non-rectangular pieces. This is achieved by starting each strip with the tallest remaining piece but then ordering the pieces dynamically so that a well-fitting piece is chosen for each placement. The area of each piece is expressed as a proportion of the space remaining to the right of the current packing profile and extending to the right as far as the rightmost extent of this piece if it were to be placed next. The piece which maximises this ratio is chosen for placement. Once the strip has been packed as far as possible along the stock-sheet smaller pieces are considered for filling the spaces above the current placement as long as they do not extend above the current height of the strip. The same process is then repeated for a new strip. Extensive tests show that this method does improve on the simpler orderings and placement policies. They also give some indication as to how the mix of pieces in the problem is likely to affect packing efficiency. Other common policies are to use a leftmost placement rule or to concentrate on building good combinations of pieces in 'columns' or 'breaks' across the width of the stock sheet. In one of the earliest papers on marker layout, Art (1966) uses a leftwards placement policy, but sug-

K~A. Dowsland, W.B. Dowsland/ European Journal of Operational Research 84 (1995) 506-521

gests that a weighted combination of different factors be used to determine the exact location. These include minimising the leftmost point of the piece, minimising the rightmost point, and minimising the wasted area. He also suggests that combinations of pieces should be put together manually to form meta-pieces which could be broken up during the algorithm if this appeared to be beneficial. Pieces are considered for placement according to a set of rules which take account of the possible positions for the piece, its size and expected waste. Dowsland and Dowsland (1993) also use a leftmost placement policy together with a random ordering of the pieces but unlike many other researchers they do not limit placements to the packing profile and allow new pieces to effectively 'jump' over pieces already placed to fill holes which have been left between larger pieces. This strategy is used in conjunction with a random ordering of the pieces. If more than one position with the same left coordinate is available then that nearest to the top or bottom edge of the stock sheet is chosen. The original layout is then improved by a 'jostle' procedure which will be described in the next section. Amaral et al. (1990) use a more sophisticated method which does not allow hole filling but attempts to ensure that such holes will not be generated by selecting the next piece dynamically. Their method is based on a 'sliding' process in order to find a suitable position for the next piece. Pieces are ordered in decreasing order of their areas and two different placement policies are used for large and small pieces, the rationale being that small pieces can be used to fill holes left between the larger pieces in the layout. This is in line with the strategy used by experts working on the problem manually. A profile of those pieces already packed is created as the union of their 'visible' edges. However, in order to simplify the initial calculations this is approximated by the profile of the bounding rectangles of these pieces. The piece to be packed next is not necessarily the next piece on the list. Instead a set of placement zones is calculated. Each zone is rectangular and has its leftmost edge determined by a vertical segment of the profile, and extends vertically in either direction until blocked by a horizontal

511

segment of the profile or by the perimeter of the stock-sheet. The first piece which will fit into the leftmost placement zone is then selected. A sliding vector and initial position are then chosen so that the vector terminates in the upper lefthand corner of the zone, and the piece is slid into position along this vector until it touches the pieces already in the layout. When a piece classed as 'small' is chosen it is only placed if it does not extend into any of the other regions formed by the profile, thus ensuring that it is in effect filling up a hole which would have been left by the larger pieces and not encroaching on any of the areas which could usefully be used for a bigger piece. The actual piece dimensions, rather than those of the bounding rectangles, are used to position the new piece accurately. The algorithm was developed for the marker layout problem and so rotations of 180° are allowable. Improvements in layout efficiency were noted if each alternate piece is rotated in this way. Performance can be improved further if pairs of shapes are nested together into a polygon of smallest area. However, layouts produced in this way were unable to match those of a human expert but computation times were far faster. Albano and Sapuppo (1980) are concerned with the more complex problem in which the pieces may be placed in a number of different orientations. They also use leftward placement but attempt to improve on a single pass algorithm by allowing some backtracking. They assume that the pieces to be packed are convex polygons which can be placed in any orientation. Thus the full state space of solutions would consist of every permutation of piece types with each one packed in every feasible position in every orientation. It is clearly not possible to search the whole space in feasible time for even moderately sized problems. The search is therefore guided by two bounds. The first represents the quality of the partial solution obtained so far and is a measure of the wasted area behind the current packing profile. The second is a rough estimate on the waste which will be generated by the remaining pieces and is approximated by a fixed proportion of their area. The branch which minimises the sum of these two bounds is chosen next. The

512

K.A. Dowsland, W.B. Dowsland/ European Journal of Operational Research 84 (1995) 506-521

number of options at each node in the search tree is restricted by allowing each piece to be placed in just one of its possible orientations and this is chosen as the one which results in the smallest extension to the right. Each remaining piece will thus generate one branch at each node in the search tree and this is further restricted by allowing only a fixed number of these branches to be explored. These are chosen as those which result in the smallest rightwards projection. The tree is then further pruned by insisting that when the process backtracks it does so to nodes which are significantly further up the tree. This avoids wasting time evaluating layouts which are similar to those already discarded. Obviously some experimentation is needed to set the parameters in this model for a specific problem but comparison with other methods available at the time showed promising results. Much of the research which attempts to emulate marker layouts generated by human experts often favours an approach based upon the generation of good columns. For example Gurel (1968a, b, 1969). Gurel starts by packing the two opposite edges of the stock sheet by choosing combinations of pieces which make good use of the available width. Other width combinations are then generated and allocated to the right or left as appropriate, and finally the combinations are fitted together to form a layout. He uses a graphtheoretic representation of his layouts in which the nodes correspond to the pieces and two nodes are adjacent if the pieces they represent touch. He defines a number of different measures to estimate how well pairs of pieces will fit together in order to form a dense packing and these are represented by edge weights in the graph. He also defines a circular disk around the graph which represents the perimeter of the stock-sheet. Any piece in contact with an edge of the stocksheet is also adjacent to a point on this circular disc. More recently there has been a major research project into efficient computerised marker layout at Harvard University and Milenkovic et al. (1992) describe an algorithm which seeks to approximate the approach of an experienced worker for the marker layout problem. Like Gurel they note that

the larger pieces of similar dimensions are placed in columns. Each piece within a column may be flipped or placed as a mirror image, giving 4 orientations per piece. They also note that the smaller pieces are usually placed in gaps between the larger pieces, although these may have to be moved slightly in order to accommodate all the small pieces. Their method involves placing pieces which are thought to be more difficult first and determining suitable combinations and orientations to make up columns. Each column butts onto the previous column and so the total length of the marker can be approximated as the ratio of the total length of the large pieces divided by the number of pieces per column. All possible stacks are evaluated at each iteration and the stack of maximum height is chosen. The precise y-coordinates of the pieces are calculated once all the stacks have been decided, but the feasibility of any stack in terms of its y-coordinates must be checked before a stack is accepted. This can be achieved by calculating a set of constraints for the interaction of each piece with the pieces immediately above and below it in its own and adjacent columns. A dynamic programming approach is used to condense the constraints of all previous columns into constraints for the latest column only. These are then used to obtain constraints for the next column. Once all the columns have been chosen a suitable set of actual values satisfying all the constraints can be chosen. A heuristic method is used to determine whether or not a suitably straight righthand margin will result from a feasible arrangement of the remaining pieces. Once the large pieces have all been placed in this way the smaller pieces are placed in the gaps. If this is not possible the improvement methods described in the next section are adapted to open up gaps between the large pieces without extending the total length of the layout. This method is computationally expensive when selecting the first column for a trouser marker, in which there are 4 pieces per column and 24 pieces, around 65 million combinations must be considered. However, results suggest that it is able to match the quality of layout generated by an expert in 45 minutes, in just 5 minutes using a 28 mip work-station. Typical layouts gen-

K,4. Dowsland, W.B. Dowsland/ European Journal of Operational Research 84 (1995) 506-521

erated by manual and the automated methods respectively are shown in Figs. 2a and 2b. The above approaches are all geared towards rectangular stock sheets of fixed width. The more complex problem of determining cutting patterns for leather hides is tackled by Heistermann and Lengauer (1993). The objective is to find a fast solution method as no two hides are identical and a new pattern must be generated for each. Both the hides and the demanded pieces are very irregular and the first step of the algorithm is to use a smoothing routine to approximate the shapes by polygons with fewer points, and hence fewer 'deep' concavities. The pieces are then coded with a set of parameters which gives a rough estimation of the profile of the piece. This is then used to evaluate the suitability of each piece for placing against the current packing pro-

513

file. Like many other methods the size of the piece is also taken account of at this stage. The entire method is driven by a series of user defined parameters, which determine factors ranging from the accuracy of the smoothed representations to the relative weights placed on the different rules used to determine the next piece to be placed and its position.

5. Improvement methods All the methods described so far either produce one or a series of different layouts based on piece orderings and placement policies. A second approach which has become increasingly popular in recent years is to produce an initial layout (which may be feasible but suboptimal, or infeasi-

(a) Name: z2out Width: 59.75in Length: 271.12 in Pieces" 24 m ~ ' n ~ : 69.66~

(b) ~rsme: zlout lt/Idth: 59.75in t.,ength: 271.05 in Pieem: 24 g~eieacy: 69.68%

Fig. 2. (a) Leftwards compaction of human-generated marker; (b) leftwards compaction of machine-generated marker.

514

K~t. Dowsland, W..B.Dowsland / European Journal of Operational Research 84 (1995) 506-521

ble) and then to use small changes in order to improve it. Such an approach may either continuously seek for improvement, or may incorporate a metaheuristic technique such as simulated annealing or tabu search in order to allow uphill, or non-improving moves. Further details of such techniques can be found in Reeves (1993). Most of the contributions in the latter category have been largely experimental in nature and there are no reports of their incorporation into commercial systems. Ismail and Hon (1992) and Jain et al. (1992) tackle the blanks nesting problem using a genetic algorithm and simulated annealing respectively. Ismail and H o n only consider two parts, while Jain et al. allow any number of parts to be nested together. Copies of these nests are then repeated at equidistant points along the stock sheet. The problem considered by Ismail and Hon is the simpler of the two in that they only allow 180 ° degree rotations and flips of the pieces. They define an individual solution by the relative coordinates and orientation code of each of the two pieces, and code this information into a single binary string. The fitness value of each solution is a combination of the area utilisation and an overlap penalty. Standard genetic operators of onepoint crossover and mutation are used on populations of 20 individual solutions. The results suggest that this type of approach is worthy of further investigation. Jain et al. (1992) tackle a more complex version of the same problem in which more than two pieces may be involved, and these may take on any orientation. They assume that the position of a reference point on the first piece is fixed. Thus all the information needed to construct a particular nesting is given by the angle of orientation of the first piece, the coordinates and rotations of the other pieces and the displacement between successive copies of the nesting. An individual solution is defined by associating a set of values with these parameters. Like Ismail and H o n (1992) the quality of a nesting is measured as a linear combination of area utilisation and a penalty for overlap. A neighbouring solution is defined by changing one of the parameters, and therefore corresponds to a change in the orienta-

tion of one of the pieces or a horizontal or vertical displacement, or a change in the displacement between nests. In order to avoid large perturbations which are unlikely to be accepted at low temperatures the magnitude of each one of these changes is bounded by a factor which decreases with temperature. Computational experiments suggest that this approach has considerable promise. Its ability to deal with efficient nesting of several parts suggests that, as well as solving the blank nesting problem, it could be used to form efficient clusters for more general irregular cutting problems. A number of experiments using simulated annealing and tabu search for different variants of the more general problem have been conducted. Lutfiyya et al. (1992) tackle the problem of packing a given set of pieces into a minimum area, where each piece may be placed in a fixed set of orientations. Their set of feasible solutions are defined by the coordinates and orientation of each piece in the layout. Infeasible solutions in which some pieces overlap are included in the solution space and are penalised in the cost function by a penalty factor multiplied by an approximation to the overlap area. The second element of the cost function tries to ensure that the pieces are nested well, by rewarding edges at similar angles which are coincident or close to one another, and the final term tries to ensure that all pieces are placed as close to the origin as possible. A neighbourhood move consists of displacing a piece, changing its orientation or swapping two pieces, and the relative probabilities of a move of each type are further parameters which have to be input into the algorithm. This algorithm is somewhat impractical for a typical stock-cutting problem where there are usually fairly tight restrictions on at least one dimension of the stock-sheet. Marques et al. (1991) attempt to overcome this problem by using a term which weights the horizontal and vertical distances of each piece from the centre of the enclosing rectangle. The ratio of these weights approximates to the desired ratio of the stock sheet. They also include a term which rewards tight nesting, but use a simpler function than that suggested by Lutfiyya et al. (1992) and measure

K.A. Dowsland, W.B. Dowsland/ European Journal of Operational Research 84 (1995) 506-521

the distances between the centres of adjacent pieces. Finally they include the square root of the area of the smallest rectangle which encloses the entire layout. They do not classify overlapping solutions as feasible, although their neighbourhood generator will allow such solutions to be generated. These are then rejected immediately. The algorithm has been tested on some small problems and the results suggest that this approach shows promise as long as the cooling rate is slow enough. Oliveria and Ferreira (1993) use a formulation which more closely meets the actual requirements of a typical practical application. They fix the width of the stock sheet and use simulated annealing to attempt to minimise the length. They allow overlap in their definition of the set of feasible solutions and the cost function is a linear combination of the length required and a penalty term for an approximation to the minimum amount of overlap. Neighbouring solutions are obtained by moving a single piece to a new position. Dowsland and Dowsland (1993) use a similar formulation but they also fix the length of the stock sheet. Thus the only cost is the penalty for overlap. Once a feasible solution is found the length is reduced and an attempt is then made to fit the layout into the new length. Their neighbourhood structure also allows pieces to be moved further than those defined by Oliveira and Ferreira. Once again performance is satisfactory. However, a second improvement technique suggested by Dowsland and Dowsland outperforms

(a)

515

both their own and Oliveira and Ferreira's simulated annealing algorithms. They suggest a 'jostle' procedure, in which the pieces from their leftmost placement algorithm, outlined in Section 4, are selected in increasing order of their rightmost points and placed according to a rightmost policy. The pieces in this layout are then ordered according to their leftmost coordinates and placed according to a leftmost policy, etc. The process is repeated for a fixed number of iterations and computational experiments suggest that around 20 jostles can give results which significantly improve upon a random layout. Figs. 3a and 3b show an initial random layout and the improvement obtained by the jostle procedure. In spite of this there is room for further research into the simulated annealing approaches. Neither Dowsland and Dowsland or Oliveira and Ferreira include any mechanism to encourage tight nesting into their cost function, while those approaches which do include such a factor do not fix the width of the stock sheet. It is possible that a simulated annealing algorithm combining all the best features of the above algorithms may prove an effective approach. Blazewicz et al. (1993) suggest a tabu search algorithm. They do not allow any overlap in their layouts and neighbouring solutions are obtained by moving a single piece into a new position. As tabu search looks for the best move, rather than a randomly generated one, pieces which extend furthest to the right are considered for moving first.

(b)

Fig. 3. (a) Initial solution before applying 'jostle' (length required = 69 units);) (b) solution obtained after 'jostling' (length required = 63 units).

516

K.A. Dowsland, W.B. Dowsland / European Journal of Operational Research 84 (1995) 506-521

If it possible to move such a piece into a hole further back in the layout then the move is accepted. Otherwise an attempt is made to move an interior piece into a well-fitting hole. If no such moves are possible then a piece can always be placed in the 'hole' extending from the right-hand edge of the layout to the edge of the stock-sheet. The results of tests on a variety of problems suggests that this approach is superior to some of the standard placement methods (e.g. Albano and Suppopo and Gurel), but sometimes missed solutions which were clearly visible. All the above studies were experimental. On a more practical note Milenkovic et al. (1992) and Li and Milenkovic (1993) suggest an improvement routine for practical problems in the garment industry. Their work is partly motivated by the fact that many problems consist of similar mixes of similar shapes, and that an experienced worker can still produce manual solutions which are more efficient than the best computer generated solutions. They therefore suggest that solutions to new problems be initialised from a database of expert solutions to similar problems. Depending on the exact dimensions used such a solution may contain small amounts of overlap or small gaps. Thus the solution may need expanding to remove the overlap, compaction to remove the gaps or a mixture of the two. The basic idea of compaction is to simulate forces on the pieces which move them in the required way. Thus if the objective is simply to minimise the length required to fit a given layout then a 'gravitational' force pulling everything to the left will have the desired effect. Conversely, if the objective is to open up a gap between two pieces in order to fit a smaller piece then a force of repulsion between the two is required. The process can be modelled either using simulation techniques developed for computer simulations of rigid objects acting under different forces, or by solving a series of differential equations. However both these approaches prove to be too slow to form the basis of a practical system. The solution finally adopted involves the use of linear programming. The displacement vectors of the pieces are calculated, and for each pair of adjacent pieces, the no overlap constraint defines a feasible region for

the difference between their vectors, u - v. The objective is to move the pieces in such a way as to minimise the potential energy caused by the imaginary forces subject to the vectors u - v remaining within their feasible regions. In general these regions will not be convex and the resulting minimisation problem is NP-hard. However it is possible to select convex subregions which will allow some movement in the required direction. The problem can then be solved using linear programming, and once the resulting displacements have been made the process can be repeated until no further improvements are possible. A similar process can be used to move pieces apart to eliminate overlap. This type of improvement strategy is also used by Stoyan et al. (1993) as a basis of a local search technique. Rather than use the simplex method to solve the linear programme they use a direct method suggested by Gill et al. (1981) which does not limit the pivot moves to moves along 'edges' of the feasible region. Their model also incorporates unusable areas on the stock sheet. Unlike Milenkovic, they do not necessarily start from a good solution and advocate enumerating a series of starting layouts each of which will converge to a different local optimum. If all such starting points are enumerated and optimised the result is an exact solution method. Stoyan quotes a number of investigations into potential enumeration techniques. However the number of local optima are expected to exceed n! where n is the number of pieces, and thus such an approach is unlikely to be practical in guaranteeing a global optimum for realistically sized problems. Nevertheless a single local optimum can be achieved relatively quickly (times of around one minute on an 80486 machine are quoted) and practical examples from the garment and footwear industries are presented.

6. Computational geometry The discussion so far has concentrated on the different strategies which have been employed in solving irregular packing problems. However, a vital consideration in the implementation of any

K.A. Dowsland, W.B. Dowsland/ European Journal of Operational Research 84 (1995) 506-521

of these algorithms is the method used to determine the geometry of the situation. Depending on the strategy used it is necessary to find the distance between two pieces along a given vector, the set of feasible positions for one piece with respect to another, the set of feasible positions for a piece within a given hole, or the existence a n d / o r area of overlap between any two pieces. The complexity of the calculations involved depend on the types of pieces considered (i.e. convex, non-convex, simple, non-simple), and on the accuracy required. The methods used show great variability in sophistication and computational efficiency. At the simplest end of the scale pieces are approximated by unit squares on a rectangular grid, or by an approximation made up from a union of rectangles. This is the approach taken by Qu and Sanders (1987). Oliveira and Ferreira (1993) experimented with both a grid based and more accurate polygon based system for the same data. Their results clearly show that the simplicity of computation of a grid system is at the expense of solution quality. Lutfiyya et al. (1992) also use a grid based system for estimating overlap in their simulated annealing implementation. They suggest that time can be saved by increasing the accuracy of the grid as the algorithm progresses. However, such methods are obviously inaccurate and become computationally expensive for realistically sized problems even for medium resolution. The most popular approach is to use basic trigonometric formulae to do the required calculations. Algorithms for many of the required functions (e.g. the intersection of 2 lines, intersection of 2 polygons) can be found in Preparata and Shamos (1985). Other methods have also been suggested and Amaral et al. (1990), and Oliveira and Ferreira (1993) use the concept of D functions, as suggested by Konopasek (1981), as an efficient way of determining whether or not two line segments cross, and hence whether or not two pieces overlap. Actual distances and quantities can then be calculated using standard geometry. However, the problem is complicated when non-convex shapes are involved. One possibility is to cut the shape into a number of convex pieces,

517

as suggested by Cuninghame-Green (1992). This approach is taken by Dowsland and Dowsland (1993), who divide a shape with k concavities into k + 1 overlapping convex pieces. One of the most widely used concepts in determining the interaction between two pieces is the concept of the no-fit polygon. This was first introduced by Adamowicz and Albano et al. (1976) as an efficient way of determining the minimum enclosure for a cluster of two or more pieces. The no-fit polygon is obtained by fixing the position of one of the pieces and then tracing the locus of a reference point on the other piece as it moves around the perimeter of the first. The relevance of the no-fit polygon is that if the second piece is placed with the reference point anywhere inside this polygon then the two pieces will overlap, whereas if it is placed on the boundary they will touch, and if it outside there will be a gap between them. Thus the no-fit polygon can also be used to define the feasible positions for a newly placed piece, given the placements already made. However, although a number of researchers use the polygon within their algorithms, none actually describe an efficient algorithm for its computation. While this is a fairly simple procedure for convex pieces it is not so simple when the pieces involve concavities. A closely related idea used by Art and by Blazewicz et al. is to define an envelope of feasible positions. This essentially involves following the locus of a fixed point on a given piece as it moves around the edges of a hole, or the unpacked space to the right of the current partial layout. All these concepts can be unified within the framework of Minkowski or vector sums. The relationship between Minkowski sums and the no-fit polygon was first suggested by Stoyan and Ponomarenko (1977) and the concept is used extensively in the work of Milenkovic et al. (1992)

A -B

Fig. 4. An example of the Minkowski Difference.

518

K~4. Dowsland, W.B. Dowsland / European Journal of Operational Research 84 (1995) 506-521

and Li and Milenkovic (1993) in determining suitable positions for placement phases of their algorithms, and in determining the constraints for their compaction processes. Any two-dimensional region can be considered as a set of vectors, and the Minkowski sum of two regions A and B is the region given by {a+b: a ~A,

b~B},

i.e. the region defined by summing all pairs of vectors, with the first being taken from A and the second from B. If two pieces A and B are to be displaced along vectors u and v respectively then the resulting pieces will not overlap if the point v - u lies outside the Minkowski difference A B. Fig. 4 illustrates the Minkowski difference A - B of two of the trouser pieces considered by Milenkovic et al. (1992). In fact this difference is simply the no-fit polygon of A with respect to B. Also of interest is the concept of Minkowski decomposition. The Minkowski decomposition of A by B corresponds to the set of feasible positions for a reference point on B if B is to be fitted wholly within region A and is given by (A' + B Y where ' denotes the complement. Minkowski decompositions are useful in determining efficient nesting of a piece within a given shape. Alternatively they could be used to define the set of feasible positions for a new piece in a hole or an area of space on the stock-sheet. As well as providing a unifying theory for all the computational geometry involved in irregular packing problems, Minkowski sums are of practical significance due to the considerable amount of research into efficient algorithms for their computation. The basis of these methods is the idea of a tracing, which essentially defines a directed tour of all the edges of a piece. Minkowski sums and decompositions can then be obtained by applying a set of rules for combining the edges in the two different tracings for the polygons under consideration. This allows many computations concerning convex polygons to be undertaken in linear time, and provides methods with greater computational efficiency than purely trigonometric methods for more complex problems such as determining the no-fit polygon. These algorithms can be found in Ghosh (1990)

and Guibas et al. (1983) and Martin and Stephenson (1988) describe an algorithm based on Minkowski operations for finding efficient nestings of a convex figure which can be placed in any orientation. They also discuss extensions of the methodology for curved surfaces. When non-convex shapes are considered the basic procedures must be modified. Ghosh shows that for decompositions these modifications are minor as long as one of the shapes is convex. However the modification he suggests when both pieces have concavities implicitly considers the piece as if it were a number of different overlapping convex pieces. Some authors use the term hodograph rather than no-fit polygon and Scheithauer and Terno (1993) discuss this concept in more detail. Minkowski sums and decompositions are in fact examples of a more general concept known as morphisms which are widely used in computer vision and image processing. Minkowski addition is defined as dilation and decomposition is known as erosion. This correspondence was the motivation for some experimental research into the possibility of using computer vision techniques for irregular packing problems by Whelan and Batchelor (1991, 1992). They define the free space on the stock sheet as region A and then erode this with the image of the piece to be packed, B. This essentially defines the feasible region for placement of B, similar to the feasible envelope utilised by Art (1966). The image of B is then placed at the first available position by selecting the reference point and dilating it by B. This is then combined with the original image to give a partial packing of all pieces up to and including piece B. Because the algorithm is formulated in terms of computer vision the pieces and the stock-sheet are defined by a set of pixels and the calculations are formulated in terms of rows of pixels. The authors state that techniques are available for fast morphological operations but they do not state whether these are pixel dependent or use techniques similar to those suggested for Minkowski calculations. Although this particular implementation does not appear to be competitive with the more direct approaches described for problems such as marker layout or parts nesting, it is capable of dealing with any shapes which

K.A. Dowsland, W.B. Dowsland / European Journal of Operational Research 84 (1995) 506-521

Fig. 5. Nesting highly irregular objects in an irregular region.

can be represented on the graphics screen to the accuracy of that representation and can deal effectively with very irregular packing areas. An example of a nesting of highly irregular objects in an irregular region produced by this methodology is given in Fig. 5.

7. Final comments and conclusions

This paper has outlined some of the approaches used to solve irregular packing problems in a variety of industries. The precise nature of the problem varies from industry to industry, but the basic requirement of fitting all the required pieces without overlap remains the same. In spite of this there appears to have been little communication between those working in different applications. This has the obvious disadvantage that it has lead to a duplication of work, and has prevented algorithms developed in one area from benefitting from the ideas generated in another. More positively, it is likely that it has also lead to the wide variety of methods now available, both in the general strategies employed and the way in which the computational detail is handled. Each new algorithm designer will obviously want to solve their own problem in the most appropriate way, taking account of their own objectives and constraints, the accuracy and speed required, and the computer power available to them. However, if anything other than a crude grid representation is to be used the no-fit polygon or Minkowski difference between two pieces appears to be the most efficient way of determining the set of feasible positions for a new or

519

moving piece, particularly if the orientations of the pieces are limited. When this is the case the calculations for each pair of pieces need only be carried out once at the start of the algorithm. For a single pass placement method with many piece types pre-processing may not be sensible, but accurate placement possibilities can be calculated efficiently for each new piece using the tracing algorithms for Minkowski sums. Other ideas from some of the newer research into the problem which are worth pursuing are meta-heuristic approaches such as simulated annealing and tabu search. It would appear that the meta-heuristic approaches surveyed here all fall short of the quality required for a commercial system. However, further research, combining the better features from each with more efficient computational or compaction algorithms, is called for. For highly irregular pieces the ideas of a morphology based algorithm are also interesting, especially if combined with some of the placement or improvement techniques suggested for more regular figures. The benefits of improved solutions to irregular packing problems will be widespread. Much work has already been undertaken in this area, but it is still difficult to outperform an experienced operator with a purely automatic algorithm. This paper shows that much work has already been done, but there are many ideas which have still to be fully explored. We hope that the work described here will enlighten those already working in the field as to ways in which they can improve or extend their solutions, and will encourage continued cross-fertilisation of ideas among the different industries involved and those experimenting on a more theoretical basis with new approaches to the problem.

References Adamowicz, M., and Albano, A. (1976), "Nesting two dimensional shapes in rectangular modules", Computer Aided Design 8/1, 27-33. Albano, A., and Sapuppo, G. (1980), "Optimal allocation of two-dimensional irregular shapes using heuristic search methods", IEEE Transactions on Systems, Man, and Cybernetics 10/5, 242-248.

520

K~A. Dowsland, W..B.Dowsland / European Journal of Operational Research 84 (1995) 506-521

Amaral, C., Bernardo, J. and Jorge, J. (1990), "Marker making using automatic placement of irregular shapes for the garment industry", Computers and Graphics 14/1, 41-46. Arbel A. (1993), "Large scale optimisation methods applied to the cutting stock problem of irregular shapes", International Journal of Production Research 31/2, 483-500. Art, R.C. (1966), "An approach to the two-dimensional irregular cutting stock problem", IBM Cambridge Scientific Centre Report 36-Y08. Blazewicz, J., Hawryluk, P., and Walkowiak, R. (1993), "Using a tabu search approach for solving the two-dimensional irregular cutting problem", Annals of Operations Research 41,313-327. B6hme, D., and Graham, A. (1979), "Practical experiences with semi-automatic and automatic partnesting methods", in: C. Kuo, K.J. MacCallum and T.J. Williams (eds.), Computer Applications in the Automation of Shipyard Operation and Ship Design III, North-Holland, Amsterdam, 213-218. Coffman, E.G., Garey, M.R., and Johnson, D.S. (1984), "Approximation algorithms for bin packing - An updated survey", in: G. Ausiello, N. Lucertini, and P. Serafini (eds.), Algorithm Design for Computer Systems Design, Springer-Verlag, Vienna, (49-106). Cuninghame-Green, R. (1992), "Cut out waste!", O.R. Insight 5/3, 4-7. Dori, D., and Ben-Bassat, M. (1984), "Efficient nesting of congruent convex figures", Communications of the ACM 27/3, 228-235. Dowsland, K.A., and Dowsland, W. (1992), "Packing Problems", European Journal of Operational Research 56, 2-14. Dowsland K.A., and Dowsland, W. (1993), "Heuristic approaches to irregular cutting problems", Working Paper EBMS/1993/13, European Business Management School, UC Swansea, UK. Dyckhoff, H., and Finke, U. (1992), Cutting and Packing in Production and Distribution, Springer-Verlag, Berlin. Freeman, H., and Shapira, R. (1975), "Determining the minimum area encasing rectangle for an arbitrary closed curve", Communications of the ACM 81/7, 409-413. Ghosh, P.K. (1990), "A solution of polygon containment, spatial planning, and other related problems using Minkowski operations", Computer IPtsion, Graphics, and Image processing 49/3, 1-35. Guibas, L, Ramshaw, L., and Stolfi, J. (1983), "A kinetic framework for computational geometry", in: IEEE 24th Annual Symposium on Foundations of Computer Science, 100-111. Gurel, O. (1968a), "Marker layout problem via graph theory: An attempt for optimal layout of irregular patterns", IBM Scientific Centre Report 320-2921, New York. Gurel, O. (1968b), "Additional considerations on marker layout problem by graph theory", IBM Scientific Centre Report 320-2945, New York. Gurel, O. (1969), "Circular graph of marker layout", IBM Scientific Centre Report 320-2965, New York.

Haistermann, J., and Lengauer, T. (1993), "Efficient automatic part nesting on irregular and inhomogeneous surfaces", in: Proceedings of 4th ACM-SIAM Symposium on Discrete Algorithms (SODA93), 251-259. Ismail, H.S., and Hon, K.K.B. (1992), "New approaches for the nesting of two-dimensional shapes for press tool design", International Journal of Production Research 30/4, 825-837. Israni, S.S., and Sanders, J.L. (1985), "Performance testing of rectangular parts-nesting heuristics", International Journal of Production Research 23/3, 437-456. Jain, P., Fenyes, P., and Richter, R. (1992), "Optimal blank nesting using simulated annealing", Transactions of the ASME 114, 160-165. Karoupi, F., and Loftus, M. (1991), "Accommodating diverse shapes within hexagonal pavers", International Journal of Production Research 29/8, 1507-1519. Konopasek, M. (1981), "Mathematical treatments of some apparel marking and cutting problems", US Dept. of Commerce Report 99-26-90857-10. Li, Z., and Milenkovic, V. (1993), "A compaction algorithm for non-convex polygons and its application", in: Proceedings of 9th Annual Symposium on Computation Geometry, ACM, San Diego, CA, 153-162. Lutfiyya, H., McMillin, B., Poshyanon, D.A.P., and Dagli, C. (1992), "Composite stock cutting through simulated annealing", Mathematical Computer Modelling 16/1, 57-74. Marques, V.M.M., Bispo, C.F.G., and Sentieiro, J.J.S. (1991), " A system for the compactation of two-dimensional irregular shapes based on simulated annealing", in: IECON-9I (IEEE), 1911-1916. Martin, R.R., and Stephenson, P.C. (1988), "Putting objects into boxes", Computer Aided Design 20/9, 506-514. Milenkovic V., Daniels, K. and Li, Z. (1992), "Placement and compaction of non-convex polygons for clothing manufacture", in: Proceedings of the 4th Canadian Conference on Computational Geometry, St. John's, Newfoundland, August 10-14, 236-243. Oliveira, J.F.C., and Ferreira, J.A.S. (1993), "Algorithms for nesting problems", in: R.V.V. Vidal (ed.), Applied Simulated Annealing, Lecture Notes in Economics and Mathematical Systems 396, Springer-Verlag, Berlin, 255-274. Prasad, Y.K.D., and Somasundaram, S. (1991), "CASNS - A heuristic algorithm for the nesting of irregular shaped sheet metal blanks", Computer Aided Engineering Journal, April, 69-73. Preparata, F.P., and Shamos, M.I. (1985), Computational Geometry - An Introduction, Springer-Verlag, Berlin. Qu, W., and Sanders, J.L. (1987), "A nesting algorithm for irregular parts and factors affecting trim losses", International Journal of Production Research 25/3, 381-397. Reeves, C. (ed.)(1993), Modern Heuristic Techniques for Combinatorial Problems, Basil Blackwell, Oxford. Scheithauer, G., and Terno, J. (1993), "Modeling of packing problems", Working Paper, Institut fiir Numerische Mathematik, Technische Universitiit Dresden.

lEA. Dowsland, W.B. Dowsland / European Journal of Operational Research 84 (1995) 506-521 Stoyan, Y.G., and Ponomarenko, L.D. (1977), "Minkowski's sum and the hodograph of the dense allocation vector function", Reports of the Ukranian SSR Academy of Science. Series A 10. Stoyan, Y.G. (1992), "A basic problem of optimal cutting of materials in blanks of arbitrary spatial form", Working Paper, Institute for Problems in Machinery, Ukranian Academy of Sciences. Stoyan, Y.G., Novozhilova, M.V., and Kartashov, A.V. (1993), "Mathematical model and method of searching for a local extremum for the non-convex oriented polygons allocation problem", Working Paper, Institute for Problems in Machinery, Ukranian Academy of Sciences.

521

Tfivora, J. (1989), "Path planning for a class of cutting operations", in: M. Trivedi (ed.), Proceedings of SPIE Meeting, Applications of Artificial Intelligence 1Ill, SPIE 1095, 405415. Whelan, P.F., and Batchelor, B.G. (1991), "Automatic packing of arbitrary shapes", in: SPIE Machine ~tsion Architectures, Integration, and Applications, Iiol. 1615, 77-86. Whelan, P.F., and Batchelor, B.G. (1992), "Development of a vision system for the flexible packing of random shapes", in: SPIE OE / Technology-92, 1Iol 1823.