A Linear Programming Approach to the Cutting Stock Problem-Part II
P.C. Gilmore; R. E. Gomory
Operations Research, Vol. 11, No. 6. (Nov. - Dec., 1963), pp. 863-888.
Stable URL
hitp:/Mlinks.jstor-org/sici?sici=0030-364X%28 19631 1%2F12%29 1 1%3A6%3C863%3A ALPATTS3E:
CO%3B2-G
Operations Research is currently published by INFORMS.
Your use of the ISTOR archive indicates your acceptance of JSTOR's Terms and Conditions of Use, available at
hup:/www,jstororglabout/terms.hml. ISTOR’s Terms and Conditions of Use provides, in part, that unless you
have obtained prior permission, you may not download an entire issue of a journal or multiple copies of articles, and
you may use content in the JSTOR archive only for your personal, non-commercial use.
Please contact the publisher regarding any further use of this work. Publisher contact information may be obtained at
hupulwww.jstor-org/jourals/informs. html,
ch copy of any part of'a JSTOR transmission must contain the same copyright notice that appears on the sereen or
printed page of such transmission,
ISTOR is an independent not-for-profit organization dedicated to creating and preserving a digital archive of
scholarly journals. For more information regarding JSTOR, please contact support @ jstor.org.
hupulwww jstor.org/
‘Sat Mar 11 23:11:22 2006Operations Research
November-December 1963
A LINEAR PROGRAMMING APPROACH TO THE
CUTTING STOCK PROBLEM—PART II*
P. C. Gilmore and R. E, Gomory
IBM Corporation, Yorktown Heights, New York
(Received May 27, 1963)
Tin thie paper, the methods for stock eutting outlined in an earlier paper in
this Jourwat. [Ops Res. 9, 849-859 (1961)] are extended and adapted to the
specific ful-serle paper trim problom. ‘The paper describes » new and
faster knapeack method, experiments, and formulation changes
‘experiments ineludo ones used to evaluate speod-up devices and to explore a
connection with integer programming. Other experiments give waste as a
function of stock length, examine the effect. of multiple stock Iengt
waste, and the effect of a cutting knife Himitation. ‘The formul
‘changes discussed are: i) limitation on the numberof eutting knives avall-
ble, Gi) balancing of multiple machine usage when orders are being filed
from more than one machine, and (ii) introduction ofa rational objective
funetion when customers’ orders are not for fixed amounts, but rather for 8
range of amounts. ‘The mothods developed are also applicable to variety
‘of cutting problems outside of the paper industry.
NAN earlier paper" we outlined ® column generating procedure to
‘overcome one of the basic difficulties associated with the cutting stock
problem, the problem of too many eutting pattems, or, in linear program-
ming terms, the problem of too many columns. In this paper we describe
the adaptation and application of this method to the specific problem of
paper trim, ‘The changes that were required to make the application
possible were of two kinds, changes in the algorithm itself and ehanges in
formulation, and are deseribed below. The final algorithm ean be used in
‘any other situations such as the slitting of steel rolls, cutting of metal
pipe, cellophane rol slitting, tect
* "This research was supported in part by the Office of Naval Research under
Contract No. Nonr 3775000), NR 047010,
1 Refereness to earlier work ea be found in reference 1. "Tho refore has kindly
brought to our attention the even eatier work of, V. Kawronovien, “Mathematical
Methods of Organizing and Planning Production,” reprinted in Monagenent Se. 6,
30-12 (1002).
03864 P. . Gilmore and R. E, Gomory
(a) Algorithm Changes. ‘The large sizo of many of the paper industry
problems has required a whole series of modifications that: were needed to
get the calculation done more rapidly or even to do it at all on the small
‘computers that are usually available in a paper mill. For this purpose we
evolved a new and rapid algorithm for the knapsack problem, which proved
to be markedly superior to dynamie programming, developed ways of
‘cutting down the size of the knapsack problem, methods of speeding con-
vergence of the linear programming ealeulation, and a reasonable cutott.
‘The new calculations are sufficiently rapid that real problems ean now be
solved and with a considerable saving in paper. Programs written by
W.E. Winans* and Darren, Murr are being used in a routine manner
at paper mills on computers installed specifically to deal with the paper
‘rim problem.
(6) Changes in the Formulation. Special circumstances in the paper
industry provide limits on the number of eutting knives, bring in machine
balance considerations, and introduce @ tolerance or indeterminaney in
the customers’ orders. We will show how these conditions ean be dealt
‘with as modifications of the knapsack problem, modifications of the linear
programming formulation, or by a programming formulation involving, a
rational objective function.
Finally, we will give some experiments, made possible by the completed
algorithm, showing the economy that can be obtained from the use of
more than one stock length, indenting the extreme sensitivity of the waste
to the exact stock length available, and showing the effect of limiting the
number of eutting knives.
CHANGES IN THE ALGORITHM
‘Tun cureina stock problem in mathematical form is the problem of mini-
mizing 2,2, subject to
DiayzBNo
where Ni, i=1, --+ , m, is the number of rolls of length 1, demanded, 2, is
the number of times the jth cutting pattern is used, and a, is the number
of rolls of length [; produced each time the jth way of cutting up a rol is
cused.
If there are different longth parent rolls available to be eut up, their
costs may be different. In this case, the objective function becomes
+ TBM, Green Bay, Wisconsin,
{ IBM, Tyler, Texas.
#'The parent program for these 1620 programs was» 7090 and 700 FORTRAN
program written by Mas, C, 8, Wane of the T, J. Watson Research Center. ‘The
7004 program was used in the tests in this paper. We are greatly indebted to Mrs.
Wade for excellent programming and for many helpful suggestions.The Cutting Stock Problem 865
Chey where cys the cost of the parent roll from which the jth cutting
pattern is cut
‘The difficulty of the problem lies in the lage number of cutting pat-
ters (columns) that may be encountered. For example, with a standard
roll of 200 in, and demands for 40 diferent lengths ranging from 20 in. to
80 in, the number of eutting patterns ean easly exceed 10 or even 100
milion, “And this size problem is encountered in prnetce. Thus, we are
faced with a linear programming problem involving 10 or 100’ milion
olumas,
In an earlier paper,” we outlined a column generating procedure that
in principle enables one to avoid this difficulty in the sense that one ealeu-
lates alternately with an mXm matric (the bass inverse) and a subroutine
that produces the next column when needed, and never with the entte list
of columns.
‘To produce the next column, one has to find that column whose scalar
product with the eurzent linear programming price is maximal. Since any
string of nonnegative integers a, i = 1 m is a column provided only
that
it has,
where L is the standard stock length and J; the demanded lengths, the
‘maximization problem is
maximize Dit ba: a
subject to {Phas L.
Flere the b; are the current linear programming prices, and the a; must be
nonnegative integers. Following Daxtaa," we call (1) the knapsack
problem. Tf the maximum 37 in (1) is greater than the cost. of the
standard stock length Z, an improving column has been found, if 17 Se, no
improvement is possible and the cutting stock problem has been solved.
Ti there are several standard stock lengths 1, with eosts cs, several prob-
lems like (1) must be solved.
In reference 1 we outlined a method that consisted of using @ short-cut
method for a solution followed by dynamic programming in the event the
short-cut method did not produce s solution, Unfortunately, even
dynamic programming is often too ponderous for the size of problem
generated by the paper industry. Consider a problem involving a 200 in,
parent roll and orders specifying lengths to 3¢ of an inch as is customary.
‘The fundamental recursion of the dynamic programming ealeulation is
Foy(a)=maxlr bat R (ere), [OSS (a/lus)) (2)
‘where F,4:(2) has the intuitive interpretation of being the value of the866 P. G. Gilmore and R, B, Gomory
‘most valuable combination that ean be fitted into a knapsack of length
if only the first ¢-+1 lengths can be used.
In carrying out this recursion, most of the time will be spent on the
inner loop of the ealeulation, which will involve
(1) multiplying bss times 7,
(2) fetching and adding F.(2—rleys) to rbasss
(8) subtracting the current maximum of the expression in parentheses in
equation (2) from the sum in Step (2),
(4) making a conditional transfer depending on whether or not this
difference is negative,
(5) adjusting an index and returning to Step (1).
In programming this, we seem to require 10 elementary machine orders
(orders such as add), so we will allot to this calculation the time 107.
(Reasonable 1s are for the 7090, 4.5 microseconds, for the 7004, 4 micro-
seconds, and for the 1620, 470 microseconds.*) This loop must, be gone
‘through (/lesi] times and then repeated 81, timesif 1 isin inches and order
lengths are given to ¥¢ in. as is customary. ‘This provides Fesi(z) for all
251. This routine is then repeated m times if there are m lengths, in
‘order to solve one knapsack problem. A reasonable average figure for
UL/1) is 5 for paper problems that: we have seen, so the time per knapsack
may be estimated as 10X8X5 Lm’. With an Z.of 200 and m=30, we get
24X10'T. If we find the Tinear programming calculation requires 2.5 m
simplex steps, which is both a conventional estimate and about what we
have actually observed, we get a time for the knapsack parts of one prob-
lem of 1000 L'n?. For the thirty-length problem, this is 16X10".
Beeause of the necessity of using the tape in doing the backtracking
part of the dynamie programming ealeulation, our actual dynamie pro-
gramming runs have exceeded twice this estimate.t However, even
this estimate gives about a 13 minute run on the 7090 and a run of 1357
‘minutes on the 1620 for a typieal 30 length, 200-inch roll problem,
‘These figures show the need for a faster method for the knapsack prob-
lem if paper industry problems are to be dealt with. A method related to
reference 6, and which has proved to be about five times as fast as dynamic
programming for our set of problems, is deseribed next.
Knapsack Method
In what follows, we will denote the maximum of the cost ¢ and of the
previously defined 1 by M. If there are several standard stock lengths
* This ia @ weighted average of the add and multiply times actually needed for
the loop.
4 The actual runs on the 7000 fora single dynamic progeamming caleul-tion were
18 seconds with 25 lengths and Z=150, and 2 seoonds with 40 length and L=150
{In the firat problem, the tape time was about 7 seconds, in the second about 1024
seconds,The Cutting Stock Problem 867
1, it is necessary to solve a series of knapsack problems like (1) with I:
replaced by 1,. We will denote the corresponding maxima of ¢; and if,
by My, ‘The algorithm we have employed for the knapsack problem will
first be deseribed in form that permits one to ealeulate all the M, simul:
taneously. Following the description and justification of the algorithm,
‘wo will show how it ean be modified to caleulate max {JM,—e) with pos:
sibly less computation.
“The stops of the ealeulation are as follows:
(1) Reorder the variables ar, --,@m 80 that b/h2by/hz---2
bra/lay and reorder the stock lengths $0 that a> Ta>++>L4. Introduce
fa variable dys with coefficients bay. 0 and quam. Let d and g be the
mevectors with coefficients hy ley -*ybe and by bs -+-,bm respectively.
For an s-vector (a), of nonnegative intogers a, da ---,a., where 13S,
by \-(a)sis meant {21 l,acand by -(a), is meant Doi=i bea. A vector
(a)m is an extension of a veetor (a),, 8m, ifthe firsts eoeficients of (a)
are just the eoeflicents of (a)... In the algorithm sequenee of vectors
(q),, for various values of s, satisfying, a -(a), is generated in lexieo-
sraphically decreasing order, where (a'), is lexioographieally larger than
(aay if and only if for some #, 1Sialsa. A simple test [Step (5)] permits one to ignore many of
the possible veotors. ‘The first vector (cm in the sequence is the lexi
cographically largest m-veetor satisfying L;22-(a)u for any j. ‘That is,
(2) Tet a= [a/b], = [(La—He a)/h, +, and a= { [Ta (hart
Ini dnei)I/lgl. Let t=1 and let Mj=e, j=1,---yk. This veetor (a)
is then tested to determine whether for it 8-(a)» exeeeds the eurrent best
values IM; for applicable j, and if so these current best values are redefined.
(3) For those j, , for which L)22-(a)m and 8-(a)n>dM,,
redefine M; to be B-(a)x
(4) Let s be the largest #, 1SiSm, such that ajx0. ‘Thus (a), has
among its coefficients all the nonzero coefficients of (a)m and its last coe
cient is nonzero. The lexieographically langest m-vector lexicographically
smaller than (a). necessarily has its sth coefficient one less than a,; that
is, it is an extension of a veetor (a'),, which differs from (a), only in having
‘4,—1 as its sth coefficient. In the first part of (5), (a)q is redefined to be
(el).
In the test in the second part of Step (5) below, one determines if itis
possible for any extension of (a), to lend to an improvement of at least one
of the current maximams AZ). A necessary condition for an improvement
of M, to be possible, assuming that L)2A-(a),, is that an improvement
result when the integer restriction on ayy: is relaxed and aay: set equal to
(L;-d-(a),)/le. Because of the ordering chosen for the variables, the
condition for an improvement is that 8-(4).-HBey(Lj—-(a)s)/le> My
‘This necessary condition is tested for in (5); if it holds for some j one trans868 Pe
1ore and RE. Gomory
fers to (7) and calculates the lexicographically largest extension (a) of
(a)s, which satisfies L:2A-(a)., where ¢ is the smallest integer j for which
the condition holds for the jth stock length; i it fails to hold for any j, then
a successor of (a). in the sequence of vectors, if there is one, is calculated
in (6). A successor to (a). is ealeulated in (6) only when s>1. ‘Then the
successor is the lexicographically largest (s~1)-vector which is lexieo-
raphieally smaller than (a)... ‘This successor is chosen because from the
failure of the necessary condition in (5), one ean conclude that it is the
lexicographically largest (s—1)-veetor which may have an extension im.
proving at least one of the current maximums M,.
(5) Redefine a, to be a—1 and let ¢ be the smallest j, 1<)=k, such
that 1,2%-(a), and such that (Zj—A-(a),)bsas > (Bs B- (a), oss, and
go to (7). If there is no such j then go to (6).
(6) Redefine «to be the largest i, 15i:52—1, such that asx0, and go
to (5). If there is no such #, then the current values of Mj, j=
are the maximums to be found.
(7) Let dy4s=[(Ls=X-(a))/leth, 75 4
+E in-s))/ludy and go t0 (3)-
‘That the final values of the maxima M, are the desired maxima when
the algorithm terminates in Step (6) is clear from the order in which the
rmevectors are generated and then tested in (3) for possible improvement
of the M. For the first vector tested in (3) is the lexicographically largest
vector (a)m that can satisfy Z122-(a)m and 8-(a)m>¢, for some j, and
each suceceding vector tested in (3) is the lexicographically next largest
mevector that can satisfy 1:2A-(a)m and -(a)u> My for some j.
In order to determine the eutting pattern a, as, +++, dq which actually
maximizes M;, itis only necessary to keep a record for each J of how the
current maximum has been obtained and update these records each time an
improvement is made in (3) in the current maximums.
‘The modification that ean be brought to the algorithm to compute
max(M;—c; rather than My, j=1, ---, k, ean now be simply described.
‘The modification is only in Step (3), which should be replaced with:
(3°) For those, tS 7S, for which Lj22- (am, let AMs=8:(a)u—~M
and let AM=maxi0, AM / yh}. Redefine I; to be My-+AM, for
for j=1, 2, +++).
((La- (Can) Het es +
Identical Prices
In our knapsack diseussion so far we have tried to speed up the ealeula-
tion by using a more rapid knapsack method. Another approach is to
speed up through eutting down on the size of the knapsack problem that
must be solved. We have been able to do this because of the phenomenon
of identical prices.The Cutting Stock Problem 869
Clearly, identical pries, if they oceur, ean be exploited in the knapsack
problem. For if two lengths i; and 1), l: