You are on page 1of 8

ELSEVIER

EUROPEAN
JOURNAL
OF OPERATIONAL
RESEARCH
European Journal of Operational Research 87 (1995) 57-64

Theory and Methodology

Improved heuristics for sequencing cutting patterns


Boon J. Yuen
Department of Econometrics, Monash University, Melbourne, Vic. 3168, Australia
Received November 1993; revised February 1994

Abstract

Heuristics have been suggested as a means to sequence cutting patterns. Further heuristics are presented which
appear to improve on the objective of minimizing the maximum queue of partially cut orders. Salient features of
previous heuristics are adopted but other enhancements are also implemented. Computing experience is used as a
means of substantiating the improvements achieved and establishing the optimality of the heuristics.

Keywords: Scheduling; Manufacturing industries; Heuristics

I. Introduction

T h e r e has been a substantial amount of research carried out on the two dimensional trim
loss or cutting stock problem. Generally the solution to this would consist of a n u m b e r of different
patterns along with the n u m b e r of repeats of
these patterns. The piece sizes, their corresponding quantities and their placement define a cutting pattern. At this stage a further problem is
encountered, this being the sequencing of cutting
the generated patterns or pattern allocation. Different piece sizes are queued or stacked and only
removed when all patterns involving that size
have been cut. The glass industry in Australia has
avoided the problem of sequencing largely by
addressing the pattern generation stage instead
of the sequencing stage (Yuen, 1991), this being
achieved by severely restricting the number of
piece types allowed in a pattern. However this
incurs a high cost and a significant increase in
wastage.
Elsevier Science B.V.

SSDI 0 3 7 7 - 2 2 1 7 ( 9 4 ) 0 0 0 6 8 - N

Addressing the problem at the sequencing


stage has been suggested through the use of
heuristics. Four new heuristics are introduced. A
sequence of cutting which produces the smallest
queue of stacks is the desired outcome as this will
help minimize handling and space problems. The
minimization of the n u m b e r of piece stacks
formed over the course of sequencing a set of
patterns is the principal concern and forms the
primary objective. Let Q = [qij] be the matrix of
all possible sequences where qij = stack queue
for s(i), sequence i after j different pattern types
have been cut. T h e r e are n different patterns and
m = n! possible sequences. The objective may be
expressed as
qMAX = m a x ( q / l ,

qi2 . . . . . qij . . . . . qin),

q* = min (qlMAX, qMAX2, . - . , qMAX,, . . . , qMAX ),


i

where q * is the optimal queue over all the possible sequences. A complete sequence of cutting

B.J. Yuen / European Journal of Operational Research 87 (1995) 57-64

58

when reversed produces the same stacks queues


except in the reverse order. Hence there will
always be at least two best sequences, each the
reverse of the other.
Besides minimizing the maximum stacks queue,
minimizing the overall stacks queue is also of
concern and relevance. This is achieved by minimizing a secondary criterion, the 'stacks number'.
The stacks number is the cumulative sum of the
product of the queue length by the number of
repeats of the corresponding sequenced pattern
summed over all pattern types. Let rij = the number of times the j-th pattern type cut is repeated
in sequence i. The stacks number is minimized in
the optimal sequence and is formulated as
n

Min ~ rijqi j.
i

ated based on the algorithms of Gilmore and


Gomory (1961, 1963, 1965, 1966) and Farley
(1983). Computing experience is reported on the
data given by Yuen (1991) which serves as a basis
for comparison. Four sequencing heuristics were
developed and coded in Microsoft F O R T R A N
and implemented on IBM compatible 386-SX
and 386-DX microcomputers which were rated at
25 MHz and 40 MHz respectively. These heuristics were made more exhaustive by starting the
sequencing from each pattern type in turn. Another relevant aspect examined is the amount of
CPU time required to run the heuristics and
whether it allows acceptable or real time runs.

2. Previous work

j=l

An implicit exhaustive search to test for the


optimality of the heuristics has also been developed. In the majority of data sets the absolute
optimum has been established.
To maintain naming consistency with the two
heuristics of Yuen (1991) the four heuristics to be
introduced will be called 3, 4, 5 and 6. The
previous techniques of starting from each pattern
type in turn as well as the use of hierarchical
tie-breaking rules (Yuen, 1991) are adopted.
Another refinement incorporated into all the
new heuristics is the 'all-common' rule which
should apply universally to sequencing heuristics.
It takes precedence over the current rule and
comes into effect whenever a remaining pattern
has no new piece types to introduce to the current piece stacks. It selects the first such occurring pattern as the pattern to next sequence. This
can only favourably impact upon the stacks queue
(fewer pieces to finish the stacks). In addition the
technique of pattern rearrangement is introduced.
The four heuristics to be introduced are based
on two measures, the first, Cj or 'common', is the
number of piece types common to both the pattern and the current stacks. The second, Nj or
'new' measure, is the number of piece types in
the pattern not included in the current stacks.
The data used in the sequencing were gener-

Dyson and Gregory (1974) developed a pattern


sequencing heuristic procedure to generate patterns that simultaneously minimized waste and
also their sequencing objective of minimizing discontinuities. They reported practical difficulties
with an alternative approach using an exact travelling salesman algorithm. In a case study Madsen (1988) sought to minimize the number of
discontinuities and order spread. Using a travelling salesman formulation and a near optimal
heuristic the order spread was reduced in the
majority of the test runs. Yuen (1991) demonstrated the use of sequencing heuristics to minimise the number of stacks formed.

3. Heuristic 3

To determine the next pattern to sequence,


this heuristic compares all unsequenced patterns
in turn to the current queue or stacks. The pattern selection is based on a measure of 'matching'
which may be said to represent how well the
piece types of any unsequenced pattern match
the current (incomplete) stacks. The greater the
number of common pieces, the better the matching of the pattern to the current stacks. Conversely, the larger the number of new piece types,
the more it fails to satisfy the minimum stacks
objective and the poorer the match to the current

B.J. Yuen / European Journal of Operational Research 87 (1995) 57-64

stacks. Mj, the 'matching' of a pattern, may now


be defined as the n u m b e r of piece types common
to both the pattern and the current stacks less the
number of new piece types or potential stacks
contained in the pattern. In short, it is the common measure less the new measure, i.e.

Mj=Cj-Nj.
The selection rule is to next sequence the pattern
with the maximum Mj measure. In the tied case
where more than one pattern has the maximum
Mj measure the rule is to select the tied pattern
with the lowest new measure. If the tie is still not
resolved, then the tie-break selects the first occurring doubly tied pattern.

59

the Mj measure is maximized not for one step


but two steps ahead. That is, it maximizes an
aggregated Mij+I value. It selects the next pattern as being the root pattern which starts off the
best aggregated Mj,j+ 1 value. In a tie the rule is
to select the tied root pattern with the minimum
new measure. If the tie is not resolved, the tiebreak selects the first occurring doubly tied root
pattern. Note, the aggregate measure is symmetrical, for example, patterns 4 and 7 have the same
aggregate measure as patterns 7 and 4. Incorporating this property into the heuristic saves computing time.

7. Pattern rearrangement
4. Heuristic 4

This heuristic is based solely on Nj, the new


measure. It selects the pattern with the minimum
new measure to sequence next. In the event of a
tie the tie-break selects the first occurring tied
pattern.

Pattern rearrangement may be said to be a


method to produce a more exhaustive set of
sequences using the same heuristic. Let K be the
set of pieces in pattern j where k is a piece size.
If k ~ K, 6jk = 1, otherwise ~jk = O. Let the number of patterns in which piece k occurs be given
by
x k = EcSjk.
/

5. Heuristic 5

Define for pattern j,


This heuristic is an extension of the basic idea
as given in heuristic 3. T h e Mi value is calculated
in the same manner. However, in the case of a tie
in the maximum Mj measure, the rule then is to
calculate and maximize a following Mj measure
for the remaining patterns another step ahead,
with each of the tied patterns forming the just
prior patterns also referred to as the root patterns in turn. T h e rule selects the tied (root)
pattern having the maximum following Mj measure. If there is a further tie in the second Mj
measure, then the tie-break selects the first occurring doubly tied root pattern as the pattern to
sequence next.

6. Heuristic 6

This heuristic could be said to be a variation of


the basic idea as given in heuristic 3. In this case

g = Ex~ajk.
k

Pj may be taken to be a measure of the amount


of involvement of a pattern type with the other
pattern types. For the r e a r r a n g e m e n t adopted the
pattern types are ordered according to their ascending Pj values. The sorting procedure used to
implement the rearrangement, known variously
as exchange, straight selection or minimum entry
sort, is standard textbook material.

8. A small example

The following example (see Table 1) is taken


from Yuen (1991). Sequencing for the non-rearranged patterns is demonstrated starting from
pattern 1 but only done to the succeeding pattern. For the full sequences starting from pattern
1 of both rearranged and non-rearranged pat-

60

B.J. Yuen / European Journal of Operational Research 87 (1995) 57-64

Table 3
Matching, new and common measures after pattern 1 is
sequenced

Table 1
Example data set
Piece i
1

Pattern j

NR

2
3
4
5

2
8
0
0

5
0
0
0

0
5
0
8

0
0
3
0

1
0
2
0

5
0
0
0

0
0
0
9

0
0
4
0

2
1
5
1

Xk

NR = Number of repeats of a pattern type.


x k = Number of pattern types piece type k occurs in
=prior to start NUPT, number of unsequenced pattern
types in which a piece occurs.

Pattern j
2
3
4
5

Cj
1
1
1
1

Ni
3
1
2
1

Mi
-2
0
-1
0

Cj = Common measure of pattern j.


Nj = New measure of pattern j.
Mj= Matching measure of pattern j = Cj - 8 .

t e r n s see S e c t i o n 8.6. N o t e t h a t s e q u e n c i n g starts


f r o m all p o s s i b l e p a t t e r n types for all heuristics.

c u r r e n t stacks a r e 1, 3 a n d 5 with t h e i r r e s p e c t i v e
N U P T s o f 1, 1 a n d 2 (see T a b l e 2).
N o t e , as n o n e o f t h e new m e a s u r e values w e r e
z e r o a f t e r p a t t e r n 1 was s e q u e n c e d , t h e all-comm o n rule d i d n o t c o m e into effect.

8.1. Heuristic 3

8.2. Heuristic 4

A f t e r p a t t e r n 1 is s e q u e n c e d t h e r e a r e 2 curr e n t p i e c e stacks, 3 a n d 5 (see T a b l e 2). T h e


N U P T s ( n u m b e r o f u n s e q u e n c e d p a t t e r n types)
o f b o t h stacks a r e 2. A m o n g t h e u n s e q u e n c e d
p a t t e r n s , p a t t e r n 2 has f o u r p i e c e types, 1, 2, 5
a n d 6. Its c o m m o n m e a s u r e is 1 ( p i e c e 5) a n d its
n e w m e a s u r e is 3 ( p i e c e s 1, 2 a n d 6). Its m a t c h i n g
v a l u e is

A f t e r p a t t e r n 1 is s e q u e n c e d , p a t t e r n s 3 a n d 5
tie on t h e m i n i m u m Nj value, b o t h on 1. T h e
t i e - b r e a k t h e n selects p a t t e r n 3 as it is t h e first
o c c u r r i n g p a t t e r n . T h e u p d a t e d c u r r e n t stacks a r e
as for h e u r i s t i c 3.

Mj=Cj-Nj=

1-3

= -2.

L i k e w i s e t h e M r m e a s u r e is e v a l u a t e d for t h e
remaining unsequenced patterns. The maximum
M r m e a s u r e is z e r o a n d it is a tie b e t w e e n p a t t e r n s 3 a n d 5. T h e s e v a l u e s a r e given in T a b l e 3.
A s t h e r e is a tie t h e rule t h e n selects t h e t i e d
p a t t e r n with t h e m i n i m u m Nj.. But p a t t e r n s 3 a n d
5 tie a g a i n with a n e q u a l Nj o f 1. T h e t i e - b r e a k
t h e n selects t h e first o c c u r r i n g o f these, p a t t e r n 3.
At the completion of sequencing pattern 3 the

Table 2
NUPTs (number of unsequenced pattern types) of current
stacks only
Piece
Patterns sequenced

1-3

8.3. Heuristic 5

T h i s h e u r i s t i c starts off similar to heuristic 3.


Since p a t t e r n s 3 a n d 5 tie on t h e m a x i m u m Mj
m e a s u r e w h i c h is 0, t h e y b e c o m e t h e r o o t patt e r n s a n d a f u r t h e r Mj m e a s u r e is o b t a i n e d b a s e d
on e a c h root. R o o t p a t t e r n 3 has t h r e e p o s s i b l e
following p a t t e r n s , 2, 4 a n d 5. Its m a x i m u m Mj+ 1
v a l u e is 0 f r o m following p a t t e r n s 2 o r 5 (see
T a b l e 4). F o r r o o t p a t t e r n 5 t h e m a x i m u m Mj+ l
m e a s u r e also t u r n s o u t to b e 0 f r o m following
p a t t e r n 3. T h e result is a f u r t h e r tie. T h e t i e - b r e a k
selects p a t t e r n 3 as it is t h e first o c c u r r i n g d o u b l y
tied p a t t e r n . T h e c u r r e n t stacks a r e as for heuristic 3.
8.4. Heuristic 6

On
there
Their
0 (see

the completion of sequencing pattern 1


a r e 4 p o s s i b l e r o o t p a t t e r n s , 2, 3, 4 a n d 5.
r e s p e c t i v e M r m e a s u r e s a r e - 2, 0, - 1 a n d
T a b l e 3). R o o t p a t t e r n 2 has t h r e e possible

B.J. Yuen/ European Journal of Operational Research 87 (1995) 57-64

61

Table 4
Root patterns and their immediate follow patterns Mj values

Table 6
Example set sequences as picked by heuristics 3 to 6

Root
pattern j

Heuristic

Pattern
immediately
following
root j + 1

Cy+i

Nj+ I

Mj+ I M a x j ( M j + , )

3
4
5

2
1
1

0
2
1

2
-1
0

2
4
5

2
1
1

2
2
1

0
-1
0

2
3
5

1
1
1

3
1
1

-2
0
0

2
3
4

1
1
1

3
1
2

-2
0
-1

3
4
5
6

Pattern
rearrangement

Sequence

Maximum
queue

Stacks
number

No
Yes
No
Yes
No
Yes
No
Yes

1-3-5-2-4
1-5-3-2-4
1-3-5-2-4
1-5-3-4-2
1-3-2-5-4
1-5-3-2-4
1-3-5-2-4
1-5-3-2-4

4
4
4
4
5
4
4
4

34
33
34
38
35
33
34
38

8.5. Pattern rearrangement

N j + l = New m e a s u r e for pattern immediately following root.


Cy+l = C o m m o n m e a s u r e for pattern immediately following
root.
Mj+l= Matching measure for pattern immediately following
root.
Maxy(Mj+ l ) = M a x i m u m matching value of immediate follow
patterns j + 1 with root pattern j.

The x k of piece 1 is two as it is cut from


patterns 2 and 3. See Table 1 for the full set of x k
values. The Pj of a pattern is the sum of its piece
types x k. For pattern 1 it is 3 + 3 = 6. Table 5
lists the Pj values. At the completion of sorting,
the order of the patterns denoted in their original
occurrence is 5, 3, 4, 1 and 2.

8.6. Example set results


following patterns 3, 4 and 5. The maximum
Mi+ 1 measure is 2 (see Table 4). Hence the
maximum aggregated Mj.,j+I measure with root
pattern 2 = 0 ( - 2 + 2). In a similar manner the
best aggregated My,j+~ measures using root patterns 3, 4 and 5 are obtained. They are 0 (0 + 0),
-1 (-1+0)
and 0 ( 0 + 0 ) respectively. Root
patterns 2, 3 and 5 tie on the maximum aggregated Mi,j+ 1 measure all having a value of 0. The
rule then is to select the tied root pattern with
the minimum Nj. However patterns 3 and 5 remain tied on 1. The tie-break then selects the
first occurring of these two which is pattern 3.
The updated stacks are as for heuristic 3.

Table 5
Pj values for sample data patterns

The results of sequencing from pattern


heuristics 3 to 5 are presented in Table
indicates that pattern rearrangement does
duce different sequences from those of the
rearranged patterns.

1 for
6. It
pronon-

9. Results
The results for heuristics 1 and 2 from Yuen
(1991) are included for comparison. The group A
sets have an approximate average piece's area to
stock plate area of 1:4 while the group B sets
have a ratio of 1:25. There are 14 group A sets
and 28 group B data sets. Their parameters are
summarised in Tables 7 and 8.

9.1. Maximum queue

Pattern j

Pieces
Pj

3, 5
6

1, 2, 5, 6
7

1, 3
5

4, 5, 8
5

3, 7
4

of a pattern = Sum of all its piece types' x k.

Table 9 lists the number of best or equal best


maximum queue sets from amongst the results of
the heuristics summed for each heuristic. Heuristics 3 and 5 are the best for group A, being best

B.J. Yuen / European Journal of Operational Research 87 (1995) 57-64

62

Table 7
Summary of parameters for G r o u p A data sets

Average
Minimum
Maximum

SQ

LB

UB

PTP

NPT

NPR

66.29
31.1
125.9

3.43
2
5

32.5
18
40

2.22
1.12
3.11

31.14
14
49

391.64
144
829

SQ

= Sequencing complexity = Product of the n u m b e r of


pattern types by the average n u m b e r of piece types for
pattern type.
LB = Lower Bound, greatest n u m b e r of piece sizes in any
pattern.
U B = U p p e r Bound, total n u m b e r of piece sizes.
PTP = Average n u m b e r of piece types per pattern type.
N P T = N u m b e r of pattern types in a data set.
N P R = N u m b e r of patterns, including repeats in a data set.

Table 10
Group A - Optimality of the heuristics expressed as the
n u m b e r of data sets in defined categories
Heuristic
Case

Opt
Opt + 1
Opt + 2

7
4
0

6
5
0

10
1
0

4
6
1

10
1
0

6
5
0

Opt = O p t i m u m m a x i m u m stacks queue.

Table 11
Group B - Optimality of the heuristics expressed as the
n u m b e r of data sets in defined categories
Heuristic

Table 8
Summary of parameters for G r o u p B data sets

Average
Minimum
Maximum

SQ

LB

UB

PTP

NPT

NPR

85.72
48.0
156.9

8.25
5
12

31.79
15
50

3.99
1.79
8.15

24.79
8
46

60.93
10
208

Table 9
N u m b e r of best or equal best m a x i m u m queue sets from
amongst the results of the heuristics listed u n d e r each heuristic
Data

No. of sets

Heuristic

group

tested

A
B

14
28

8
9

7
9

13
22

4
9

13
20

8
14

or equal best in 13 of the 14 sets tested. In group


B heuristics 3 and 5 were best, with 22 and 20
best or equal best queues respectively out of a
possible 28.
An implicit exhaustive search procedure was
developed to determine the optimality of the
heuristics. In searching a data set it used the best
queue amongst all six heuristics as an initial UB.
The principal constraint was the amount of CPU
time required on an IBM compatible 386-DX
microcomputer. Most of the data sets that were
successfully searched required less than one and
a half days of C P U time. The results of the
search are given in Tables 10 and 11.

Case

Opt
Opt+l
Opt + 2
Opt + 3 and above

6
7
6
2

5
8
6
2

15
6
0
0

6
7
3
5

12
9
0
0

7
12
2
0

Heuristics 3 and 5 have picked sequences with


optimal queues in the majority of data sets tested.
For both heuristics ten group A sets are optimal
and one sub-optimal by one. In group B heuristic
3 had fifteen sets optimal and another six sub-optimal by one. This is followed by heuristic 5 with
twelve optimal and nine sub-optimal by one.
Hence, it may be said that heuristics 3 and 5 are
near optimal. In general, the CPU time required
to run an exhaustive search tends to vary exponentially with the number of pattern types. So far
it has only been possible to do complete exhaustive searches on data sets with up to 30 pattern
types.
On the criterion of average best maximum
queues, heuristics 3 and 5 have fairly similar
outcomes and are the best overall in both groups
A and B (see Table 12).

Table 12
Averaged best maximum queues
Average best m a x i m u m queue for heuristic
Group

A
B

6.79
12.96

6.86
12.96

6.36
11.86

7.21
13.36

6.36
11.93

7.21
12.25

B.J. Yuen / European Journal of Operational Research 87 (1995) 57-64


Table 13
Group A - Results of pattern rearrangement compared to the
non-rearranged ease expressed as the number of data sets
Number of data sets
Heuristic

1 below

equal to

1 above

3
5

1
2

12
10

1
2

Table 14
Group B - results of pattern rearrangement compared to the
non-rearranged case expressed as the number of data sets
Number of data sets
Heuristic

2below

1 below equal to

1 above 2 above

3
5

0
2

2
3

2
3

23
20

1
0

63

Table 15
Averaged best stacks number
Average best stacks number for heuristic
Group

A
B

1513
467

1494
463

1410
435

1628
507

1405
436

1575
464

9.2. Stacks n u m b e r
T h e averaged stacks n u m b e r indicate heuristics 3 a n d 5 had very similar results a n d were the
best or lowest in both groups A a n d B (see T a b l e
15).

9.3. C P U time

T h e results of p a t t e r n r e a r r a n g e m e n t for
heuristics 3 a n d 5 are given for d a t a of groups A
a n d I3 in T a b l e s 13 a n d 14 respectively. T h e y
show that in a small p r o p o r t i o n of d a t a sets
tested ( 7 - 1 8 % ) the p a t t e r n r e a r r a n g e m e n t chosen did p r o d u c e slightly b e t t e r m a x i m u m q u e u e s
c o m p a r e d to the n o n - r e a r r a n g e d case.

Fig. 1 plots the logarithm of the execution


times for the heuristics against the n u m b e r of
p a t t e r n types w h e n r u n o n an I B M c o m p a t i b l e
386-SX m i c r o c o m p u t e r . All four heuristics' C P U
times a p p e a r to vary e x p o n e n t i a l l y with the n u m b e r of p a t t e r n types. T h e significant a m o u n t of
C P U time r e q u i r e d by heuristics 5 a n d 6 m e a n
that they may n o t be suited to real time applica-

10000
Key:
Numeric charater is the heuristic n u m b e r
A - small n u m b e r of pieces per plate
B - large n u m b e r of pieces per plate

6A

1000

q~
tO0
Q.

10

10

20

30

Number of Pattern Types per Set


Fig. 1. C P U t i m e versus n u m b e r o f p a t t e r n types p e r set.

40

50

64

B.J. Yuen / European Journal of Operational Research 87 (1995) 57-64

tions. As an extreme
exhaustive search done
tern types required in
days of CPU time as
heuristic 3.

comparison the implicit


on a data set of 26 patexcess of six and a half
against 13 seconds for

I0. Conclusions
Heuristics 3 and 5 have been shown to meet
the objective of minimizing the maximum queue
better than those currently available. Refinements to sequencing heuristics have been suggested and implemented including pattern rearrangement based on the patterns' P/s and the
all-common rule. Results of the implicit exhaustive search indicate that heuristics 3 and 5 are
near optimal for sets with up to 30 pattern types.
Heuristic 5 however has the drawback of requiring substantial CPU time, notably for sets with a
large number of pattern types.

Acknowledgements
The author thanks Ken Richardson for his
help and counselling on improving the write up of

this paper. Thanks are also due to Alan Farley


for access to his software and to the anonymous
referee for his valued comments.

References
Dyson, R.G., and Gregory, A.S. (1974), "The cutting stock
problem in the fiat glass industry", Operations Research
Quarterly 25, 41-54.
Farley, A.A. (1983), "A note on modifying a two-dimensional
trim-loss algorithm to deal with cutting restrictions", European Journal of Operational Research 14, 393-395.
Gilmore, P.C., and Gomory, R.E. (1961), "A linear programming approach to the cutting-stock problem", Operations
Research 9, 849-859.
Gilmore, P.C., and Gomory, R.E. (1963), "A linear programming approach to the cutting-stock problem - Part II",
Operations Research 11,863-888.
Gilmore, P.C., and Gomory, R.E. (1965), "Multistage cutting
stock problems of two or more dimensions", Operations
Research 13, 94-120.
Gilmore, P.C., and Gomory, R.E. (1966), "The theory and
computation of knapsack functions", Operations Research
14, 1045-1074.
Madsen, O.B.G. (1988), "An application of travelling-salesman routines to solve pattern-allocation problems in the
glass industry", Journal of the Operational Research Society
39, 249-256.
Yuen, B.J. (1991), "Heuristics for sequencing cutting
patterns", European Journal of OperationalResearch 55/2,
183-190.

You might also like