An algorithm for polygon placement using a bottom-left strategy
Introduction
The problem of packing a given set of pieces into a sheet of fixed width in such a way as to minimise the length required occurs in a range of practical situations, including sheet-metal cutting and marker layout problems in the garment industry. A popular approach to solving such problems is to order the pieces and then place them in turn, choosing the leftmost feasible position, and breaking ties by selecting the lowest. This is known as a bottom-left (BL) placement policy. Early implementations usually involved one or more orderings based on the dimensions of the pieces, or a random sample of orderings from which the best solution was chosen. The advantages of this type of approach are its speed and simplicity, when compared with more sophisticated methods that may be able to produce solutions of higher quality. As a result there are still many commercial environments where such single pass placement policies are appropriate. Moreover interest in recent years has been boosted by implementations of modern heuristics, such as tabu search or genetic algorithms, that use a bottom-left placement policy as the basis of cost/fitness evaluation.
Although there are a variety of slightly different interpretations of the bottom-left policy, these can be broadly partitioned into two classes. These are illustrated in Fig. 1, in which we assume that pieces 1–4 have already been placed and piece 5 is about to be placed using the relevant bottom-left definition. In the first class (Fig. 1(a)), pieces can only be placed to the right of the current packing front, in this case in-front of pieces 1, 3 or 4. The position shown is obviously the leftmost possibility within this region. Although this has the advantage of simplifying the calculations required, it will not allow smaller pieces later in the ordering to fill in gaps behind pieces already placed. The second class (Fig. 1(b)) remedies this by using a true leftmost placement policy, and allowing placements behind the packing front, a process sometimes referred to as hole-filling. When the pieces are rectangular the geometry in both cases is relatively simple. However, when irregular pieces are involved the calculation of the leftmost position for the next piece involves a complex geometric calculation, particularly if positions behind the packing front are to be considered. Although there are a number of published papers describing bottom-left algorithms for irregular pieces, many fail to provide details of the geometric calculations. Of those that do describe the geometry, most do not include hole-filling, or reduce the feasible positions to a finite set of points (often based on a grid). Others are restricted to very small problem instances or suggest prohibitive amounts of computational time for instances of moderate size. In this paper we present a bottom-left algorithm, complete with geometric details, that has proved to be both fast and effective on datasets of up to several hundred irregular pieces.
The next section provides an overview of the problem and cites some of the published bottom-left algorithms for its solution. This is followed by an outline of the underlying geometric concept of our algorithm, the no-fit polygon. We describe the algorithmic framework, filling in the details in the following section, before going on to outline a series of modifications designed to reduce the computational effort required. Finally computational experiments, comparing different ordering rules on a range of different datasets, are presented.
Section snippets
The problem
The problem can be stated as follows.
Given: A stock sheet of infinite length and fixed width W, and a set of irregular pieces, i=1,…,n, represented as simple polygons (i.e. polygons without holes).
Objective: To pack all of the pieces onto the sheet without overlap, so as to minimise the length required.
We assume that rotation of the pieces is not allowed and that the n pieces constitute m piece types or shapes, k=1,…,m, where there are bk copies of type k, and ∑k=1mbk=n. The vertices of each
The basic algorithm
In this section we describe the framework that forms the basis of our algorithm. Shapes are packed onto the sheet starting from the left-hand edge of the sheet and moving towards the right-hand (open) end, such that each shape assumes a bottom-left position. This process can be stated formally as follows:
Given an ordering of pieces and a partial packing of pieces 1 to (j−1), place piece j as far as to the left as possible, subject to the no overlap constraints. If there is more than one such
Improving algorithm efficiency
The set of feasible positions in the polygon packing algorithm is found by inspecting the edges of the NFPs of the moving shape and all fixed shapes already placed. It is obvious that the number of NFP edges increases as we move from the leftmost to the rightmost shape in the layout as there are more fixed shapes to consider. The number of such comparisons increases at rate that is quadratic in the number of pieces. This section considers three simple observations that can be used to reduce the
Computational experiments
The polygon packing algorithm has been used to compare the results of different static orderings on solution quality. The experiments are based on the four datasets used in Dowsland et al. (1998) together with the dataset used by Blazewicz and Walkowiak (1993). For each dataset three sheet widths were considered so as to gauge the effect (if any) of sheet aspect ratio on algorithm performance.
In each case 200 different problem instances were generated by randomly varying the quantity of pieces
Conclusions and suggestions for further research
This paper has described a fast and efficient implementation of a bottom-left placement policy for polygon packing that is capable of solving problems having around 100 pieces within one minute of computation time. An optimal bottom-left arrangement is produced (i.e. one in which each piece is placed in its leftmost, bottom-most position over the infinite set of feasible positions). Although the algorithm is stated for the case where pieces are not allowed to rotate, such a facility could
Acknowledgements
Much of the work described in this paper was carried out whilst all the authors were staff members at University of Wales, Swansea.
References (20)
- et al.
Marker making using automatic placement of irregular shapes for the garment industry
Computers and Graphics
(1990) - et al.
The irregular cutting-stock problem – A new procedure for deriving the no-fit polygon
Computers and OR
(2001) An improved BL bound
Information Processing Letters
(1980)An algebra of polygons through the notion of negative shapes
CVGIP: Image Understanding
(1991)- et al.
Nesting of two-dimensional irregular parts using a shape reasoning heuristic
Computer-Aided Design
(1997) - et al.
Compaction and separation algorithms for non convex polygons and their application
European Journal of Operational Research
(1995) - et al.
An improved BL-algorithm for genetic algorithm of the orthogonal packing of rectangles
European Journal of Operational Research
(1999) - Art, Jr., R.C., 1966. An approach to the two dimensional, irregular cutting stock problem. IBM Cambridge Scientific...
- et al.
Orthogonal packings in two dimensions
SIAM Journal of Computing
(1980) - et al.
An improved version of tabu search for irregular cutting problem
Cited by (105)
Mixed-integer programming models for irregular strip packing based on vertical slices and feasibility cuts
2024, European Journal of Operational ResearchHeuristic algorithms for the special knapsack packing problem with defects arising in aircraft arrangement
2023, Expert Systems with ApplicationsCoordinate descent heuristics for the irregular strip packing problem of rasterized shapes
2022, European Journal of Operational ResearchAn expert system to react to defective areas in nesting problems
2022, Expert Systems with ApplicationsGA and GWO algorithm for the special bin packing problem encountered in field of aircraft arrangement
2022, Applied Soft ComputingAutomatic layout of 2D free-form shapes based on geometric similarity feature searching and fuzzy matching
2020, Journal of Manufacturing Systems