A Local Search Approach To A Circle Cutting Problem
A Local Search Approach To A Circle Cutting Problem
www.palgrave-journals.com/jors
sheets re-use existing patterns, while the remaining third are as the system was to be run in parallel with the manual
produced from scratch. Each new sheet takes around one operation, with the layouts being archived for potential re-
and a half man-hours to plan. Typically around 32–34% of use as a part of the cutting plan for future orders, there was a
the material is waste, including the material wasted by the general consensus that the layouts should be of a similar
milling-cutter, the gaps between the discs, and the waste type. It is also worth noting that such layouts are unlikely to
material necessary for fixing the sheet. This translates to compromise the quality of the solutions in terms of sheet
about 81–83% density for the circle packing problem using utilization. This is because orders tend to consist of large
the adjusted diameters and the reduced sheet dimensions. numbers of circles of a given diameter where the range of
Figure 2 shows a typical set of layout patterns for a small diameters is usually small. In these circumstances, layouts
order requiring five sheets. based on hexagonal patterns are also likely to yield dense
packings.
The balance between low inventory and waste minimiza-
Formalization of the problem
tion also needs addressing. Intuitively inventory will be
The objective of this study is not to produce a computerized minimized if the number of sheets used is the minimum
system to replace the manual operation but to provide an required to meet the order quantities. Conversely extra
automatic system that is able to support the current expertise. sheets will allow more flexibility in the quantities of each
For example, by relieving the pressure during busy times, or diameter to be cut and this may result in improved sheet
covering periods when experienced staff are unavailable due utilization. Furthermore, due to the set-up times on the
to holidays, illness, etc. In order to build an automatic tooth-cutting machine, sufficient inventory to supply small
system, the objectives and constraints on the problem need quantities of a particular diameter is viewed as a positive
further formalization. In particular, two issues need to be advantage. The company stated that they were satisfied with
addressed. The first concerns the types of layout that are the levels of wastage and inventory produced by the current
required and the second concerns the balance between the system. However, no figures for the relationship between
objectives of minimizing waste and keeping inventory down inventory costs and material costs, or for the mean or
to a ‘reasonable’ level. maximum amount of inventory that would be acceptable,
Figure 2 is typical of the types of layouts currently in use. were available.
The most obvious feature of these layouts is that they are The current manual approach does not involve any formal
based on a hexagonal lattice made up of blocks of circles of guidelines, but consultation with the layout designers
the same diameter, with some adjustments within rows or allowed us to estimate the amount of over-production they
around the edges. Although the operation of the cutting would expect to produce in different circumstances. This
equipment does not impose any restrictions on the structure typically translates to between 5 and 30% of the total area
of the layout, it was deemed desirable to produce layouts packed, with the higher figures corresponding to orders with
similar to those in Figure 2 for two reasons. Firstly, after several small order quantities. However, for very small
cutting, the pieces are sorted manually for loading onto the orders (ie less than five sheets) the surplus can amount to
tooth cutter. The advantage of layouts consisting of large more than 50%. Typically, the manual approach starts with
blocks of circles of equal diameter is self-evident. Secondly, the design of an initial cutting plan based on hexagonal
nestings. These are built up row-by-row, and all the circles of
a given diameter are allocated before the next diameter is
considered. Incomplete rows are filled with surplus circles of
that diameter. This procedure determines the number of
sheets that will be used, which in turn has a direct influence
on the surplus production.
Our approach is similar in that we determine an upper
bound, Q, on the minimum number of sheets required by
applying a fast packing heuristic based closely on the logic
used in the manual approach. Full details of this heuristic are
given in the next section. Our objective is then to find an
efficient packing of the Q sheets that includes a sufficient
number of circles of each diameter. Thus, the problem can
now be stated formally as follows.
Let Di, di, bi, si and qi be defined as in the previous section.
Given a set of n diameters di such that bi4si let Q be the
number of sheets required to pack at least qi circles of
Figure 2 A typical layout produced by the current manual diameter di using an appropriate packing heuristic. Then our
solution approach. objective is to find a set of Q layouts of the required format
432 Journal of the Operational Research Society Vol. 58, No. 4
(one for each sheet) that maximizes specific decisions for the solution space, S, the starting
solution s0, the neighbourhood structure, N, and the
PQ
j¼1 uj X
Q evaluation function f. The way in which a suitable
such that aij Xqi ; for i ¼ 1; n neighbour, sAN þ (sc) is selected must also be defined. This
Q j¼1
section focuses on the problem-specific decisions. We start
by considering three variants of a construction heuristic for
where aij is the number of copies of circle diameter di in
the initial solution based on the current manual approach.
layout j and uj is the packing density of layout j. Note that
We then go on to develop a series of complex neighbour-
the set of diameters under consideration is restricted to those
hood moves designed to allow sufficient flexibility to find
for which qiX1 in order to avoid additional set-up times on
improved solutions while ensuring that the layouts produced
the tooth cutter.
are similar to those in Figure 2. As the quantity of each circle
in the final solution is not known a priori these moves must
allow for these quantities to change. This leads us to
The solution approach
consider relaxing the definition of the solution space, S, to
Local search, or hill climbing, is a heuristic approach that include solutions that violate the lower-bound constraints on
starts from an initial solution, s, and tries to improve it by the quantities of each diameter to be cut and to develop an
making a series of small changes or perturbations. When an evaluation function, f, that penalizes these violations in such
improvement is found the improved solution becomes the a way as to guide the search to high-quality feasible
incumbent solution and the process is repeated until a solutions.
solution with no improving perturbations is reached. The set
of solutions that can be obtained by applying an allowable
perturbation to a solution, s, is known as the neighbourhood
The initial solution
of s, and the replacement of s by one of its neighbours is The initial solution is based on the initial solution produced
known as a neighbourhood move. The local search process by the manual approach and is used to determine the
can be summarized as follows. number of sheets, Q. It is generated deterministically and is
composed of blocks of circles, each block consisting of
circles of a single diameter, nested in a hexagonal pattern.
Local search for minimisation
Three variants of this approach are considered. The first two
Definitions: differ in the way the changeover between blocks is handled.
The best of these two options is then subdivided according to
S=space of feasible solutions
whether the circles types are ordered randomly, or by
N(s)=the neighbourhood of s
diameter. In all cases the initial layout is constructed so as to
f(s)=cost of solution s
obey the lower-bound constraints by taking each piece type
N þ (s)= {tAN(s): f(t) o f(s)}
in turn, and, starting from the bottom of the stock sheet,
Procedure: filling rows in the required pattern until qi circles are packed.
{Select s0AS If the last row is incomplete then it is completed with
Set sc ¼ s0 additional circles of the same type. The process then
While N þ (s) a+ continues with the next type, starting a new sheet whenever
{Select s A N þ (sc) the current sheet cannot accommodate a row of the required
Set sc ¼ s} diameter. The requirement to nest circles of different sizes on
Endwhile the same sheet needs special consideration as the hexagonal
Stop (sc is the approximation to the optimal solution)} lattice given by the centres of the circles will obviously
change with the circle diameter. There are two ways of
Local search is often criticized for being unable to move dealing with this, as shown in Figure 3. The first, which we
sufficiently far from the starting solution without the use of will denote NEST is to continue the nest as the diameters
uphill moves and/or additional diversification strategies such change by maintaining the same x-coordinate for the centres,
as those inherent in simulated annealing (Reeves, 1993) or as in Figure 3a. The second, which we will denote BLOCK,
tabu search (Glover and Laguna, 1997). However, in this is to start a new nest for each type by placing the bottom of
case, this limitation can be viewed as a positive advantage, in the first row of the new type along a line defined by the top
that if we select an initial layout with the right characteristics of the last row of the previous type, as in Figure 3b. Both
we can attempt to improve it with a series of small changes approaches have their disadvantages. In NEST, space will be
that will not be disruptive enough to destroy its underlying wasted as the horizontal distance between circles in each row
structure. will be determined by the largest circle on the sheet. In
In order to implement the above local search algorithm BLOCK, space will be wasted at the changeover between
for a given problem, it is necessary to determine problem- types, which may result in fitting a smaller number of rows.
KA Dowsland et al—A local search approach to a circle cutting problem 433
slotted into the appropriate place in the layout rather types are considered randomly without replacement, until a
than being placed along the top. The exception to this diameter that will allow an extra row to be fitted is found or
is where the diameter of the new row is larger than the the list is exhausted.
maximum diameter on the sheet. In this case, the new
row is placed along the top edge of the sheet,
effectively separating it from the nested pattern in Sheet completion
the rest of the sheet and thereby allowing the
Whether or not the add operation was successful, each of
hexagonal lattice in the rest of the sheet to be
the altered sheets is then considered for the completion
preserved. If the resulting layout exceeds the bound-
operation. This consists of a series of moves that are
aries of the sheet then the move is not executed.
considered in order, and accepted when an improvement
Otherwise, the move will have created additional space
is made. All the moves in the list are attempted whether
along the top of one of the sheets, which may be
or not an improvement has been found. The order in
sufficient for an extra row.
which the moves are considered is important and the
R2 Swap the last two rows of two different sheets. This
list is ordered so that the moves that are likely to have the
move is similar to the above except that the two top
greatest impact are considered first. The moves are described
rows are involved in the swap. This has the potential
below.
of creating twice as much space as R1, but it does not
replace it as it is more likely to be infeasible.
C1 Add a column of extra circles. Because the layouts are
R3 Replace one or two rows by a circle of different
built in a hexagonal pattern no attempt is made to
diameter. This simply replaces the top one or two
spread the layout across the width of the sheet. As the
adjacent rows by circles of a randomly selected
layout is built from the bottom left this means that
diameter. Once again the new rows are inserted in
there is often free space on the right of the sheet. This
the appropriate place to maintain the ordering of
move attempts to fill this space with a column of
diameters in the sheet. This move will make a
circles.
substantial change to the numbers of circles of each
C2 Add a column of extra circles after making additional
type, but is effective in situations, where just one sheet
space. In some cases there is not sufficient space to
has a poor utilization, and the swap moves would
execute move C1. However, if the first column is
result in a worse utilization for the remaining sheets.
replaced by circles of a smaller diameter, then the
R4 Remove the row with the biggest circles. This move
remaining circles can be shifted to the left, and
stems from the observation that when there is a sheet
sufficient space for an extra column may result.
with just one row of large circles the packing density
C3 Replace the last column by a column of larger circles.
tends to be poor, due to the gaps enforced in all other
If there is insufficient space for a new column the
rows by the hexagonal arrangement. If this row is
packing density may be increased by removing the
removed the remaining pieces can be moved closer
last column and replacing it by a column of larger
together, leaving space along the vertical edges that
circles.
could be utilized by pieces of the same or another type.
C4 Stretch the pattern. In some cases it may be better to
Note that this phase of the move includes redefining
utilize the full width of the sheet by stretching the
the horizontal spacing of the lattice according to the
pattern so that the circles are nested at an angle greater
largest remaining diameter but does not include
than 601. The effect of this will be to create extra
adding extra circles to each row as this will be
space at the top of the sheet, which may be sufficient
attempted during the completion phase.
for an additional row. This move involves stripp-
R5 Repeat the row with the biggest circles. This move is the
ing the layout of all but those pieces that conform
opposite of (R4) and is based on the observation that
to the hexagonal row layout, stretching that,
all rows apart from those with the biggest circles have
and then attempting to add an extra row, or rows of
wasted space between adjacent pieces. This move is
circles.
designed to extend that part of the stock sheet covered
C5 Filling the top right corner. Because the layout is built
by the densest packing. The new row is inserted on top
from the bottom left there is often free space in the top
of the last row with the given diameter and the rest of
right corner. If there is sufficient space to fit an
the layout is moved upwards. Any rows that exceed
extra circle then a circle is added. If not, an attempt is
the top of the sheet are removed.
made to increase the size of the circle closest to this
corner.
Add operation
In all cases, the circles considered for each move are
After each row operation, all modified sheets are subjected selected randomly without replacement from those diameters
to the add operation. This attempts to add a row. The circle that satisfy the move definition.
KA Dowsland et al—A local search approach to a circle cutting problem 435
Maintaining feasibility Allow infeasible solutions in the solution space and repair
the final solution only.
The above moves will change the number of circles of each
Restrict the solution space to the set of feasible solutions
diameter in the packing. This is obviously necessary in order
by disallowing infeasible moves.
to improve the packing density in a fixed set of sheets.
Relax the definition of S to allow infeasible solutions in
However, it is possible that any search based on the
the search space but penalise them with a penalty based
unrestricted use of these moves will visit solutions that do
on the cost of repair. The final solution is then repaired
not obey the lower-bound constraints on the quantities that
physically.
need to be produced. In order to balance the conflicting
demands of maintaining feasibility while ensuring sufficient Experiments with each of these options are reported in the
flexibility to seek out good solutions a number of approaches next section.
are possible. These include
Table 1 Mean packing density over 10 runs for different neighbourhoods and search strategies
Data set 1 2 3 4 5 6 7 8 9
Sheets 3 16 5 2 5 5 20 2 12
move to move, suggesting that spending time looking for repaired, and packing densities dropped by only between 0.5
better neighbours, that is, a steeper descent strategy could be and 0.8% . These results are given in the final row (labelled
beneficial. Given the size and complexity of the neighbour- Penalty) of Table 1.
hoods a true steepest descent approach, in which all As illustrated by the final row of Table 1, local search
neighbours are evaluated at each iteration, will be compu- incorporating all five row operations using probabilistic
tationally expensive. Instead, we tried a form of probabilistic steepest descent based on sampling 10 neighbours per
steepest descent (PSD) in which at each iteration 10 elements iteration and penalising violations of the lower-bound
of N are considered. If the best belongs to N þ , then it is constraints using a penalty based on the repair cost, is able
selected. Otherwise, a further 10 moves are sampled, with to produce solutions with packing densities that are close to
this process continuing until a move is selected or N is that of a human expert.
exhausted. The results are shown in row PSD, in the table. The algorithm is coded in Visual C þ þ and typical run
While this does not always show an improvement the results times on an Intel Pentium 4 2.2 GHz processor vary between
are better for six out of nine instances and equal on a further 2 and 30 s depending on the size of the problem, whereas
one. What the table does not show is that in all cases except typical man-hours required to produce manual cutting plans
for data set 1, PSD always found the best solution at least are around 10.5 h for a problem of 20 sheets (assuming
once. Therefore, probabilistic steepest descent, based on 10 approximately seven of these would need to be produced
moves per iteration, and using all five row operations was from scratch). The layouts produced by the local search also
used exclusively for the remaining experiments. conform to the required format. Figure 4 shows the initial
The remaining experiments are concerned with meeting and final solutions for one of the runs on data set 6. The
the lower bounds on the number of circles of each diameter. density of the initial solution is 76.6% while the density of
As expected using the unrestricted neighbourhood, without the final solution shown is 81.7%. This solution violates the
any penalty or repair, frequently resulted in solutions that lower-bound constraint for the third largest circle for which
violated the lower-bound constraints. The frequency of there is a shortfall of five units. This can be repaired by
feasible solutions was greater in the less-effective variants replacing five circles of the next diameter (which is in
using limited neighbourhoods, especially R1 and R2. Again, surplus). The density of the repaired layout is 81.4%.
this is as expected as these moves do not make such large In order to confirm this performance a further 100
changes in the numbers of circles of each type. Where problem instances were solved using this variant of the
solutions were infeasible, it was usually possible to repair algorithm. The mean sheet utilization using the adjusted
them using the repair operator outlined in the previous dimensions was 81.76%, which translates to 67.14% when
section. The densities achieved after repairing the final the waste due to the thickness of the cutter, the space
solution were typically 1.5–2% lower than those shown in between disks and the unuseable area around the border of
Table 1. As stated above two other approaches were tested. the sheet is taken into account. This falls within the range of
Experiments with a restricted solution space resulted in a 32–34% waste currently generated by the company. The
drop in packing densities over those in Table 1 of around amount produced for inventory also falls within the guide-
3%, suggesting that the search does require the added lines with a total of 17% of production being surplus to that
flexibility of visiting infeasible solutions. The results using ordered. For eight of the 100 orders, the surplus exceeded
the repair-based penalty function proved to be the most 30% but these were all orders requiring five or less sheets,
successful. All runs resulted in final solutions that could be and the surplus is therefore in line with current performance.
KA Dowsland et al—A local search approach to a circle cutting problem 437
Burke EK, Kendall G and Whitwell G (2004). A new placement Huang WQ, Li Y, Akeb H and Li CM (2005). Greedy algorithms
heuristic for the orthogonal stock cutting problem. Opns Res for packing unequal circles into a rectangular container. J Opl
52: 655–671. Res Soc 56: 539–548.
Chen DZ, Hu X, Huang Y and Li Y (2001). Algorithms for Huang WQ, Li Y, Jurkowiak B, Li CM and Xu RC (2003). A two-
congruent sphere packing and applications. In: Souvaine D (ed). level search strategy for packing unequal circles into a circle
Proceedings of the Seventeenth Annual Symposium on Computa- container. In: Rossi F (ed). Proceedings of the Ninth Inter-
tional Geometry, Medford, Massachusetts, United States. ACM national Conference on Principles and Practice of Constraint
Press, New York, pp 212–221. Programming (CP’03), Kinsale, Ireland. Lecture Notes in
Collins CR and Stephenson K (2003). A circle packing algorithm. Computer Science 2833. Springer Verlag, Berlin, pp 868–872.
Comput Geometry: Theory Appl 25: 233–256. Kantorovitch LV (1939, 1960). Mathematical methods of organis-
Conway JH and Sloane NJA (1992). Sphere Packings, Lattices, and ing and planning production. Mngt Sci 6: 366–422.
Groups, 2nd edn. Springer-Verlag: New York. Koebe P (1936). Kontaktprobleme der Konformen Addildung,
Correia MH, Oliveira JF and Ferreira JS (2000). Cylinder packing Abh. Sächs. Akad. Wiss. Leipzig. Math. Natur. Kl. 88: 141–164.
by simulated annealing. Pesquisa Operacional 20: 269–286. Kravitz S (1967). Packing cylinders into cylindrical containers.
Cui Y (2005). A cutting stock problem and its solution in the Math Magazine 40: 65–70.
manufacturing industry of large electric generators. Comput Lodi A, Martello S and Monaci M (2002). Two-dimensional
Opns Res 32: 1709–1721. packing problems: a survey. Eur J Opl Res 141: 241–252.
Dowsland KA (1991). Optimising the palletisation of cylinders in Nurmela KJ and Östergård PRJ (1997). Packing up to 50 Equal
cases. OR Spektrum 13: 204–212. Circles in a square. Discrete Comput Geometry 18: 111–120.
Dowsland KA, Bennell J and Dowsland W (1998). Jostling for Reeves C (1993). Modern Heuristic Techniques for Combinatorial
position—local improvement for irregular cutting patterns. Problems. Blackwell Scientific Press: Oxford, UK.
J Opl Res Soc 49: 647–658. Steinhaus H (1999). Mathematical Snapshots, 3rd edn. Dover:
Dowsland KA, Herbert E, Kendall G and Burke EK (2006). Using New York, p 202.
tree search bounds to enhance a genetic algorithm approach to Stephenson K (2003). Circle packing: a mathematical tale.
two rectangle packing problems. Eur J Opl Res 168: 390–402. Notices—Am Math Soc 50: 1376–1388.
Dowsland KA, Vaid S and Dowsland W (2002). An algorithm for Stoyan YG and Yas’kov G (2004). A mathematical model and a
polygon placement using a bottom-left strategy. Eur J Opl Res solution method for the problem of placing various-sized circles
141: 371–381. into a strip. Eur J Opl Res 156: 590–600.
Dowsland KA and Dowsland WB (1992). Packing problems. Eur J Sweeney E and Paternoster RE (1992). Cutting and packing
Opl Res 56: 2–14. problems: a categorized, application-orientated research biblio-
George JA, George JM and Lamar BW (1995). Packing different- graphy. J Opl Res Soc 43: 691–706.
sized circles into a rectangular container. Eur J Opl Res 84: Wang H, Huang W, Zhang Q and Xu D (2002). An improved
693–712. algorithm for the packing of unequal circles within a larger
Gilmore PC and Gomory RE (1961). A linear programming containing circle. Eur J Opl Res 141: 440–453.
approach to the cutting-stock problem. Opns Res 9: 849–859. Wells D (1991). The Penguin Dictionary of Curious and Interesting
Glover F and Laguna M (1997). Tabu Search. Kluwer Academic Geometry. Penguin: London, pp 30–31.
Publishers: Boston, USA. Wildemuth BM (2004). The effects of domain knowledge on search
Glover FW and Kochenberger GA (2003). Handbook of Metaheur- tactic formulation. J Am Soc Inform Sci Technol 55: 246–258.
istics. Kluwer Academic Publishers: Boston, USA. Williams R (1979). The Geometrical Foundation of Natural
Graham RL and Lubachevsky BD (1996). Repeated patterns of Structure: A Source Book of Design. Dover Publications:
dense packings of equal disks in a square. Electronic J Combin New York, pp 34–47.
3: R16. Wright MB (1991). Scheduling English cricket umpires. J Opl Res
Huang WQ, Li Y and Xu RC (2001). Local search based Soc 42: 447–452.
on a physical model for solving a circle packing problem.
In: de Sousa JP (ed). Proceedings of the fourth Metaheuristics
International Conference 2001 (MIC’2001), July 2001. Kluwer, Received March 2005;
Boston, pp 455–459. accepted December 2005 after two revisions
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.