An algorithm for polygon placement using a bottom-left strategy

https://doi.org/10.1016/S0377-2217(02)00131-5Get rights and content

Abstract

This paper describes a fast and efficient implementation of a bottom-left (BL) placement algorithm for polygon packing. The algorithm allows pieces to be nested within the partial layout produced by previously placed pieces, and produces an optimal BL layout in the sense that the positions considered are guaranteed to contain the bottom-left position of the infinite set of possibilities. Full details of the way in which these positions are calculated are given. Computational experiments comparing the results of different orderings on a variety of datasets from the literature are reported, and these illustrate that problems having in excess of 100 pieces of several piece types can be solved within one minute on a modern desktop PC. The procedure can easily be incorporated into algorithms that apply more sophisticated piece selection procedures.

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)

There are more references available in the full text version of this article.

Cited by (105)

View all citing articles on Scopus
View full text