(1991) Cutting Stock Problems and Solution Procedures
(1991) Cutting Stock Problems and Solution Procedures
3. Btaiewicz, M. Drozdowski,
B. Soniewicki, R. Walkowiak
CP-91-009
June 1991
Collaborative Papers report work which has not been performed solely at the International
Institute for Applied Systems Analysis and which has received only limited review. Views
or opinions expressed herein do not necessarily represent those of the Institute, its National
Member Organizations, or other organizations supporting the work.
EIIIASA
International Institute for Applied Systems Analysis A-2361 Laxenburg Austria
Telephone: +43 2236 715210 o Telex: 079 137 iiasa a Telefax: +43 2236 71313
Foreword
This Collaborative Paper is one of a series which presents the different software packages
designed and implemented for interactive decision support. These packages constitute the
outcome of the contracted study agreement between the System and Decision Sciences
Program at IIASA and several Polish scientific institutions. The theoretical part of these
results is presented in the IIASA Collaborative Paper CP-90-008 entitled Contributions
to Methodology and Techniques of Decision Analysis (First Stage), edited by Andrzej
Ruszczyriski, Tadeusz Rogowski and Andrzej P. Wierzbicki.
The distributable versions of the software are usually tailored for the illustration of
methodology and possible applications. However, for most of these software packages
there exists a version made for a specific application and it is possible to modify each
software package for a specific real-life application (if the corresponding mathematical
programming model is of the type for which a particular package has been designed).
All software developed within the scientific cooperation mentioned above is available
either at distribution cost or free of charge for scientific non-commercial usage by insti-
tutions and individuals from the countries which are members of IIASA. Inquiries about
more detailed information and requests for the software should be addressed to the Leader
of the MDA Project.
This volume contains the theoretical and methodological backgrounds as well as the
User's Guide for the package designed for solving a two-dimensional irregular cutting prob-
lem (elements can be of arbitrary shapes and a sheet of rectangular material is assumed
to have a constant width).
Alexander B. Kurzhanski
Chairman
System and Decision Sciences Program
Abstract
This paper deals with two-dimensional cutting problems. Firstly the complexity of the
problem in question is estimated. Then, several known approaches for the regular (rect-
angular) and irregular (not necessarily rectangular) cutting problems are described. In
the second part, a decision support system for cutting a rectangular sheet of material into
pieces of arbitrary shapes, is presented. The system uses two erlier described methods
which prefer different types of data and the user may decide which one is more suitable
for the problem in question. After brief description of system data files and its manual,
some experimental results are presented.
Contents
5 Conclusions 20
9 Operational Conditions 25
10 Experimental Results 25
References 30
vii
Two-Dimensional Cutting Problem
J. Blaiewicz, M. Drozdowski,
B . Soniewicki, R. Walkowiak *
Part I
Basic Complexity Results and
Algorithms for Irregular Shapes
1 Introduction
In this work we present basic results for two-dimensional cutting problem. This problem
consists in cutting a set of pieces from a sheet of material in order to minimize a waste.
The problem arises in various production processes, such as the glass, steel, wooden, paper
or textile industries. The problem is of combinatorial nature and, thus, can be analyzed
along the lines appropriate for this class of problems. The basis of such an analysis is
always computational complexity. Following it, one may design an appropriate algorithm
for solving the problem in question. Unfortunately, majority of cutting problems are
strongly NP-hard, thus, unlikely to admit even pseudopolynomial-time algorithms. Hence,
they must be solved by approximation algorithms. One-dimensional and regular two-
dimensional cutting problems allow for the application of approximat ion algorithms with
a given accuracy (worst case behaviour). Unfortunately, no such method is known for
irregular shapes, thus, heuristic approaches must be used. The above issues are presented
in the following Chapters.
The organization of the paper is as follow. Chapter 2 contains problem formulation and
a short introduction into the theory of computational complexity. Then, basic results for
the one-dimensional version of the problem, are presented. In Chapter 3 two-dimensional
regular (rectangular) problem is analyzed. A reference to several known algorithms is
made here. Chapter 4 deals with irregular (not necessarily rectangular) case and sev-
eral methods solving this problem are presented. Then, some hints for the use the two
algorithms described in a decision support system are given.
a;, 0 < a; < 1, i = 1 , . . . ,n , in order to minimize the number of rods used. This problem
has the same nature as memory allocation or nonpreemptive task scheduling problems
for computer systems. References to this problem can be found in [7, 10, 181. This is the
same as bin-packing problem.
Two-dimensional regular problem can be formulated as follows: given a set of
rectangles with dimensions y; and x; , i = 1, . . .,n, distribute them into the minimal
number of rectangular areas dimensioned Y and X. There are variants of this formulation.
For example rectangular area to be filled with elements may have only one dimension
limited while the other is to be minimized, rotation may be allowed or not, elements may
appear once or more times. References to this problem may be found in [4, 5, 6, 8, 9, 11,
13, 16, 17, 21, 261 .
Two-dimensional irregular problem definition differs from the above formulation
in the fact that any shapes of elements are admitted. The problem has been discussed in
[I, 2, 3, 151.
Polynomial transformation of problem lT2 to lTl (we denote 112 cx 111 ) is the
function f : Dn2 Dnl, satisfying:
1. for every Iz E Dn2 answer is "yes" if for j(12)answer is "yes" too;
2. for every I2 E Dn, time of computing f on DTM is bounded by polynomial in
N(I2).
Decision problem 111belongs to the class of NP-complete problems if 111E NP and
for every 112E NP, lT2 cx lTl. From the definition we conclude that if there is a polynomial
algorithm for any NP-complete problem then any problem from NP may be solved by
polynomial algorithm. This class contains such a problems as 3-dimensional matching,
vertex cover, clique, Hamiltonian cycle, set partition, graph coloring. Despite many trials,
no polynomial algorithm solving any NP-complete problem is known. Thus, we expect
these problems to be solvable only by exponential algorithms (and then P # NP-complete
class of problems).
On the other hand, certain NP-complete problems may be solved (quite efficiently,
e.g. by dynamic programming) for the data appearing in the practice. Complexity of
these algorithms is bounded by a polynomial of two variables - instance size N ( I ) and
maximum number value (appearing in the instance) max(I). We call them pseudo-
polynomial algorithm. Such an algorithm may only be constructed for a number
decision problem which does not have m a x ( I ) constrained by polynomial function of
N ( I ) . We say that problem is NP-complete in the strong sense if it is in the class
NP and there is polynomial p such that for Dn limited to these instances only for which
max(I) < p(N(I)), the problem remains NP-complete. From the above we see that
no pseudo-polynomial algorithm is possible for the problem being NP-complete in the
strong sense. To prove strong NP-completeness one applies strong pseudo-polynomial
transformation (in which time bound for construction of function f is allowed to be
pseudo-polynomial and some additional constraints on N ( I ) and m a x ( I ) are imposed)
and some known strongly NP-complete problem.
Now, let us consider again optimization problems. If a decision version of the problem
is NP-complete, then an exact optimization algorithm for the original (optimization)
version must be exponential. In such a case one applies polynomial approximation
algorithms to obtain approximate solution. It is desired to know how far from the
optimum is the solution generated by such an approximation algorithm, i.e. how precise
it is.
For the approximation algorithm A and instance I we define ratio SA= (for
maximization problem), where A(I) is the value of the objective function obtained by A
and O P T ( I ) is the optimal value.
Absolute performance ratio SAfor the algorithm A is
Cutting problem
(complexity analysis)
r
Easy problem
Complexity irnprovrnents
- I
NP- hard problem
The third and last way of dealing with hard cutting problems is to use exact enumer-
ative algorithms whose worst-case complexity function is exponential in the input length.
However, sometimes, when the analyzed problem is not NP-hard in the strong sense, it
is possible to solve it by a pseudo-polynomial optimization algorithm whose worst-case
complexity function is bounded from above by the polynomial in the input length and
in the maximum number appearing in the instance of problem. For reasonably small
numbers such an algorithm may behave quite well in practice and it can be used in com-
puters applications. On the other hand "pure" exponential algorithms have probably be
excluded from application, but they may be used sometimes for other cutting problems
which may be solved by off-line algorithms.
J . Blaiewicz et al. Two-Dimensional Cutting Problem
does there exist a partition of A into q disjoint subsets sl, s 2 , . . . ,s, satisfying
CajESi = B for i = I ,...,q ?
find ,
a1 a 2 , . . . ,a k that minimize K
a;,
A general version of integer linear programming is strongly NP-complete, but for a fixed
number of variables I( it can be solved in polynomial time [20]. Using the above trans-
formation of the input data one may solve the problem in question in linear time. This
is rather a theoretical result since a number of variables for practical situations may be
great. Then complexity function though linear in the number of elements has a large
constant before it. This constant grows exponentially with I(.
There exists a number of approximation algorithms for bin-packing problem (thus for
one-dimensional cutting). We are going to mention only most important.
First fit (FF) algorithm - assigns element to the box with the lowest possible number.
Best fit (BF) algorithm - assigns element to the box with the minimum remaining
capacity.
J. Blaiewicz et al. Two-Dimensional Cutting Problem
Let SFF,SBFdenote the absolute performance ratio for the FF and BF algorithms
respectively and C* - a number of boxes used by an optimal solution. Then it can be
shown 1251 that
for a E (;,I]
,,
I
71 8 1
for a E (E,Zl
SFFD( a ) = 7 for a E (a,&]
for a E (;,a]
for a E (:,I]
For some cases a raw material may consist of rectangular sheets of material then the
objective is to minimize its number. Sometimes the ribbon of material is given then one
has to minimize a length while a width is constant. On the other hand, if the area of
the material is one rectangle then the aim is to pack elements that minimize a waste.
J. Blaiewicz et al. Two-Dimensional Cutting Problem
Rotations of elements are rather not considered and if any then 90 degrees rotations are
assumed. In some cases only guillotine cuts are allowed, i.e. from edge to edge parallel to
the other pair of edges.
We know that one-dimensional version has been already NP-complete in the strong
sense. Thus in such a situation one can construct exponential and optimal algorithms or
polynomial approximation ones. In the following sections we describe two optimal algo-
rithms and several approximation ones adjusted to the different versions of the problem.
This algorithm solves a single sheet problem and it is based on a tree - search procedure.
It limits the number of nodes imposing necessary conditions on the optimality of patterns
to be cut. This is done by means of transportation routine and dynamic programming
routine.
Assume A. = (Lo, Wo) is a sheet of material with dimensions Lo (length) and Wo
(width). R is a set of rectangles R = { ( a l ,bl), . . . , (a,, b,)). Every rectangle has value
v; and maximal number of appearances in the resulting pattern 1; . Every number in
the problem is integer, cuts are of a guillotine type, and rotations are not allowed. The
problem is to
maximize z = t;v;
subject to 0 5 t; 5 l ; , i = 1,. . . , m ,ti E Z+ and there exists a sequence of
cuts of A. resulting in tirectangles of the i'th type.
The algorithm has two steps - generating the tree of all possible cuts and scanning it for
the best soldtion.
Every node of the tree represents a possible cut. During the generation phase symmet-
rical cuts are excluded. For example cutting of rectangle (p,q) in the point e is symmetrical
with the cutting in the point p-e. Such a symmetries are excluded by analyzing in the
rectangle (p,q) only points with x 5 l p / 2 ] and y 5 19/21 (where LaJ is the greatest
integer not greater than a). Repetitious cuts are eliminated by imposing succession of
cuts - for example if we cut at point x = a then every succeeding cut has to be done at
x 2 a. Only normalized c u t s are considered (cf. fig. 2) that is in points which are
linear combinations of sizes of elements. This exclude cutting wit11 waste inside a pattern.
Possible cuts of rectangle (p,q) resulting in the elements of set R are entries of set SQ
for cutting in Y direction and TP for X direction. Now we describe how to find SQ, TP
J. Btaiewicz et al. Two-Dimensional Cutting Problem
is found in the same way. We use function f,(x) to generate SQ . This function can be
computed recursively as follow (rectangles are ordered according to nonincreasing value
of b; ) : for i = 1,..., m , x = O ,..., Lo
if x 2 a,,
State of a node in the tree is described by the list L of rectangles cut on the path
from the root. Rectangle is represented on that list by vector (p,q,x,y), (p,q) being
sizes of a current rectangle and x,y are describing the following cuts if the rectangle is
chosen. In order to find an optimal solution, for every node, an upper bound estimation
of the objective function is computed. This estimation is computed in two ways. Suppose
Ho 2 L is a list of rectangles that will not be cut any more. Estimation z may be
computed as a total flow in a special transportation problem that assigns elements from
the set R to Ho . Upper bound estimation for nodes with still possible cuts can be
computed by dynamic programming procedure for relaxed version of the problem - not
considering limits 1; [13]. If computed value z* is better than previously found F , then
one substitutes previous solution with the current one and the algorithm proceeds to the
next node.
This algorithm is a combinatorial one that generates guillotine cutting pat terns by
successive adding pieces or groups of pieces to each other. These cut patterns are nor-
malized in the sense of the previous algorithm. To avoid explosive growth of number of
partial solutions the algorithm rejects solutions with a waste exceeding some percentage
of stock sheet area or for the second version with a waste exceeding a percentage of the
area of a partial solution.
Let us denote by Sk a partial solution generated at iteration k, by Fk - a list of
all partial solutions generated during iteration k, by Lk - a list of all partial solutions
generated until iteration k and by ,f3 - rejection parameter 0 5 ,f3 5 1. Wang's algorithm
can be formulated as follows
choose ,f3;
Lo, Fo := R;
k := 0;
while Fk not empty do
k := k + 1;
Fk := {);
generate all partial solutions Sk adding elements of Fk-1
to all elements of Lk-1;
for each Sk do
if Sk fits in the stock sheet
and the number element i appears in Sk is not greater than 1;
J . Blaiewicz e t al. Two-Dim en sional Cutting Problem
It is shown in [26] that if the waste of the best pattern is not greater than PLOWothen
this pattern is optimal (there is no pattern with a smaller waste). A modification of the
above algorithm (described in [21] is done by means of dynamic programming algorithm
for unconstrained number of elements [14] and it improves t h e way expected waste for
partial solution is computed. Thus, worse solutions are rejected earlier.
Fig.3. An example solution by NFDH algorithm Fig.4. An example solution by FFDH algorithm
-9-
J. Blaiewicz et al. Two-Dimension al Cutting Problem
for FFDH
F F D H ( L ) 5 1.70PT(L) + 7.3
and for sizes of elements not exceeding cr
1 1
F F D H ( L ) 5 (1 + -)OPT(L)
m
+ (2 + -)
m
where m = Ll/aJ
for squares
3
F F D H ( L ) 5 ?OPT(L) + 2.
S p l i t fit a l g o r i t h m ( S F ) [ l l ] . Let m 2 1 be the greatest integer such that all
rectangles have widths not greater than l / m . The list of pieces is ordered according to
the nonincreasing heights. Split L into two lists L1 , L2. L1 consists of elements of widths
greater than l / ( m + l ) , L2 contains the remaining elements. First, put L1 rectangles with
+ +
FFDH algorithm then move the layers wider than (m l ) / ( m 2) to the bottom of the
+ +
pattern down under layers thinner than (m l ) / ( m 2). Thus, there is a free rectangular
area l / ( m + 2) wide. P u t into this area L2 elements using FFDH algorithm. Place
remaining L2 rectangles above the pattern for L1 (fig. 5).
Asymptotical performance ratio for SF algorithm is
rectangles thinner than 115; for the wider several strategies are mixed. This algorithm is
a bit more sophisticated than previously mentioned and we will only give its brief outline.
The algorithm splits the stock into the five regions numbered from the bottom of the
+
stock to its upper part. In the regions 1 5 i 5 4 rectangles being wide l / ( i 1) through
l/i are packed according t o BL (bottom left) algorithm. Thus, there remains some free
J . Blaiewicz et al. Two-Dimensional Cutting Problem
area in the right top corner. Thus more rectangles can be placed in the column from the
top down. When all elements wider than 115 are placed in regions 1 5 i 5 4, then the
remaining rectangles are put into the slot between elements located by BL and column
algorithm (cf. fig. 6). This is done by means of generalized next fit decreasing algorithm
(GNFDH). Asymptotic worst case behaviour for rectangles not exceeding height H is
Algorithms described above have to work "off line" since it is necessary to know the set
I I l l
I 1 11111 111111111
algorithm
of rectangles before the start, and more over these pieces have to be sorted. For certain
applications however this is not possible to wait until all parts are known to sort them.
For example we can not wait for the arrival of all parts to compute their allocations in
the warehouse area. There are certain so-called shelf algorithms predestined to work
"on line" without initial sorting of elements or even knowing them. These algorithms are
modifications of NFDH and FFDH algorithms. Additional free space is created to handle
the elements of bigger size expected to come later. The parameter r is a measure of that
additional space. Every created shelf has value rk (for some k), and an element of height
h, rk+' 5 h 5 rk has to be packed into the shelf of rk height.
N e x t fit shelf a l g o r i t h m with parameter r (NFS,) - puts rectangle as far to the
left on the highest (last) shelf as possible, and if this is not possible, a new shelf is created.
F i r s t fit shelf a l g o r i t h m with parameter r ( F F S , ) - puts rectangle at the lowest
possible shelf as far to the left as possible, and if this is not possible, a new shelf is created.
It can be shown [5] that for 0 < r < 1 and rectangles not higher than H
NFS, = L OPT(L)
r
+ r ( r - 1)
11
For the case with multiple stock sheets of the same limited sizes the objective is to
minimize a number of sheets used. There exists [9] HFF a l g o r i t h m for this purpose.
HFF is a mixture of FFDII and FFD. First, according to FFDH a pattern with levels
J. Btaiewicz et al. Two-Dimensional Cutting Problem
in the unlimited height stock is constructed, then levels are assigned to the stock sheets
according to FFD algorithm. Asymptotic performance ratio for HFF is
In this section a very short insight into the group of the algorithms dealing with two-
dimensional regular cutting has been presented. There are two main groups of algorithms
- optimal exponential combinat orial ones and those based on approximation.approaches
with the worst case bounds known. Due to the progress in the computer hardware speed
the sizes of problems that can be solve by optimal algorithms are growing 1211. On the
other hand average behaviour for realistic cases of approximation algorithms is much
better than the worst case estimates suggest.
solution is a search process for a path from the initial state to the member of the set of
final nodes. Search process can be organized in the following way:
5. Expand n, that is generate all its successors. If there are no successor go to 2, otherwise
put them on GENERATED and go to 2.
Usually rule R selects a node with the smallest evaluation function which is a sum
of an estimate of the cost of the path from the starting starting to the current one and
estimate of the cost of the path from the current node to the final one.
Let us consider A. - an initial allocation containing no elements. A; is a final allocation
if there are no more elements to allocate. A d d e d w a s t e for the allocation A; of piece p;
is defined as follows
waste(A;) =
+
w a ~ t e ( A ; - ~ ) added-waste(A;) if A; is not final
wl - xi area-o f (pi) otherwise
1
piece
apace ( A i + l )
- prufile
begin
initial conditions;
input pieces and stock sheet descriptions;
let the CURRENT-NODE be the initial state;
while CURRENTBODE # final node d o
J. Blaiewicz et at. Two-Dimensional Cutting Problem
There are some techniques to increase heuristic search power because the above pro-
cedure can not be applied to any realistic applications without rejecting numerous "bad"
nodes.
Evaluation function - the problem is how to evaluate cost from the current to final
node. It should always be lower than the waste that would result in the optimal
solution if the piece in question were to be included. A possibility is 0, but it
has been preferred to drop the admissible property because the optimality of the
solution is not critical and "good" will be enough. Thus the authors suggest a
constant percentage of unplaced elements as an estimation of the cost.
Successor limitation - since the step of evaluations for all pieces and orientations is
one consuming the most of the time, several limitations have been added.
1. From unplaced pieces only the one which produces the leftmost lowest alloca-
tion will be considered in step 2.
2. Only the fixed number of leftmost allocated pieces are preserved for step 3.
3. For allocation from 2 only the fixed number of successors will be generated.
4. When the list of generated nodes becomes full, the tree is pruned by erasing
the node with the highest evaluation function.
Expansion band - when the search is at the k-th level, the next node to be expanded
has to be at level at most k-t where t is given threshold.
Termination condition - at the end of the routine after the first final node is found
the procedure develops all the possible search trees within the expansion band and
the final solution will be the best one.
Profile simplifications - at each step the profile is simplified in order to exclude all
the areas on the left side of the vertical line through the leftmost point of the last
allocation pieces.
There are several notions related to this algorithm important especially in finding piece
allocations.
J. Blaiewicz et al. Two-Dimensional Cutting Problem
reference
po~ntof B
b I
I
allocation I
region I
point -
reference
,-,--
,,
,,
,, -J - I
Important notion is the envelope - it is a sequence of line sections defined for every
piece type. This is a trace of reference points created during moving element around
allocation region in contact with its border. At the start of algorithm envelope is a
rectangle but successively after allocation of any element it is modified with the no-fit-
polygons (NFP - Section 4.2) (fig. 10). Envelope can be understood as a border of an
allocation region.
- -------,
allocation
, -n.
L -
envelope
-----------------4
[- (
mferencc
point B
NFP of B around A Initial envelope for B
allomtion
ngron
envelope -
logical constraints on the presence of types of elements, this can be converted into
linear constraint as well;
As we can see this algorithm is very complex and rather difficult to handle in practice.
Experimental programs are either completely inoperable or are simplified versions of the
method. Let us note that the computational complexity of the geometrical phase grows
exponentially in the number of objects and orientations due to the search of candidate
allocations, thus this method is rather a theoretical one.
1. Initial computations.
3. While not allocated elements exist, create an internal break IB and move it to the
right or left group of breaks.
Elements from L1 are preferred in BBl, from L2 and L1 - in BB2, M - in IBs. Elements
from S are not allocated by this algorithm and should be placed interactively by an
operator. This follows an observation that big differences of eleme.nt sizes reduce quality
J . Blaiewicz et al. Two-Dimensional Cutting Problem
of the solution. In practical cases a,b,c are set to a - 40-85%, b - 25-60%, c - 0-25%. The
bigger the differences in area sizes are, the greater a,b,c should be.
This method admits rotations of elements with a given step.
Now, in the short outline we describe some procedures of the algorithm.
During the initial phase, for every element and every orientation the following param-
eters are computed:
area,
reference point,
coordinates of boundary points BPI,.. .,BPS (fig. 1l),
waste areas 61,. . . ,&,
waste TAI,. . .,7c4for appropriate sweeping directions
In order to create BBI and BB2 we choose groups of elements minimizing waste
between the borders of stock and element. Bigger pieces from BB1, BB2 are considered
first. In order to check if the element fits into the BB1 or BB2 we evaluate how deeply
the element in question may coincide with elements previously allocated in the string and
compare the result with the width of element and width of a "slot" in the string. Internal
breaks (IBs) are created a little bit easier only with comparisons of wastes 7 ~ 3 , 7 ~. 4The
components of IB are moved to each other in the vertical direction. In order to minimize
the waste inside IB, pieces are moved horizontally within some band with a given stepts.
This method seems to be faster than previously described due to its graph theoretic
approach and good heuristic methods to carry on computations. This is done with a
little reduction of efficiency in area usage. There are several factors influencing efficiency
of algorithm, for instance number of elements, number of types of elements, parameters
a, b , c , s , width of the stock sheet etc. This method seems to fit well into semiautomatic
approach requirements.
J . Blaiewicz et al. Two-Dimensional Cutting Problem
5 Conclusions
In this paper, after preliminary complexity investigations, we have described four meth-
ods for irregular two-dimensional cutting. The first three of them are a bit similar in
the geometrical notions used. We think that Adamowicz approach though difficult to
handle in practice, shows interesting directions to create more general systems for cutting
problem. The three remaining methods are applicable in practice and broadly described
in references. In the next part a decision support system, using the two of the described
methods, will be described.
J. Blaiewicz et al. Two-Dimensional Cutting Problem
Part I1
Decision Support System for
Cutting Irregular Shapes -
Implementat ion and Experiment a1
Comparison
6 Introduction
This part contains a description of the decision support system (DSS) for cutting irreg-
ular shapes. The basis of this system are two methods described in the previous part
seriously changed and adjusted for solving the problem in question. This system has been
implemented on an IBM PC working under DOS operating system.
Given a set of elements and a sheet of rectangular material with a constant width,
find an allocation of elements in the sheet minimizing waste, that is a length of material
required. Additionally we have assumed
3. Flipping the element from "left" t o the "right" side (mirror symmetry) is not al-
lowed.
4. Edges of element are either sections of line or sections of a circle. Element can be
concave or convex (Holes in elements must be treated separately).
As we already mentioned two modified approaches have been implemented in the Decision
Support System presented.
The Albano-Sapuppo's approach [2] deals with hard irregular cases minimizing waste
generated during allocation of every element. Elements are allocated at the left end of
the stock sheet and then placed on the right side of the elements already allocated. At
the current stage of computations an element minimizing waste is chosen.
Gurel's approach [15] is well defined for elements of similar size and allowing for their
clustering into columns. Therefore the smallest elements are eliminated from automatic
allocation. This set of small elements can be allocated interactively or with other method.
It is also possible to force allocation of all elements.
Thus, the user himself is able to choose the solution or method that fits his needs best.
In general we can say that Gurel's method seem t o be faster while Albano-Sapuppo's
generate solutions with a lower waste. Gure17s algorithm deals with a class of elements
well defined to cluster, Albano-Sapuppo's algorithm does not have such a preference.
In the following Sections we describe how to use the DSS for irregular cutting, data
files formats, some operational conditions, and some test results.
J. Blaiewicz et al. Two-Dimensional Cutting Problem
7 How t o U s e D S S ROZKROJ
On the distribution disc there are folloing files:
To start the program simply write ROZKROJ. Please be aware that any data file,
solution file or auxiliary file is to be fetched from or written to the current disk and
directory. Thus, there should be enough free space.
After the start of program execution the first screen is displayed. Next the main menu
screen appears. We have several options here. Any of them can be chosen in the two ways
pressing the digit key corresponding to the option number in the menu;
moving lit up bar, up and down with cursor keys we select option and by pressing
ENTER key confirm choice.
ESC key breaks program execution at this point. There are the following options in
the main menu.
3. Albano-Sapuppo's method.
4. Display solutions.
5. Program help.
Now, every option will be described.
Option 1. Quit the program - immediately breaks program execution and exits
to DOS.
Option 2. Gurel's method - during execution of this part of the program new
solutions are computed. First of all we have to give some data to the program. All file
names with extension "IN" in the current directory contain different data sets. They are
displayed name after name. In order to choose any file we can do two things:
1. press first letter of the name - be aware that only the first file beginning with this
letter is chosen (without any additional confirmation);
2. move the lit up bar up, down, left and right to the required file and press ENTER
to start computations.
ESC key breaks execution of this part of program and returns to the main menu.
Data in the file must correspond to the format described in the next section. Data from
the file is preprocessed to find out some kind of errors and to approximate sections of circle
with segments of lines. If any error appears then special message is issued and program
breaks the execution. If there was no error new file with extension "IN1" is created, it
is an intermediate data file used by the Gurel algorithm procedure.. Then program starts
J . Blaiewicz et al. Two-Dim ensional Cutting Problem
computations. Gurel algorithm routine displays line of twenty "*" with "-" after the
initial and final phase is finished. Allocation of any element in a boundary break or an
intermediate break is certified by one "*" sign. After filling a certain column of elements,
previously issued "*" signs are followed by space and stars again up to twenty characters
in the line. An allocation of boundary break one and boundary break two is certified
with "BB1" and "BB2", respectively. An allocation of an intermediate break is certified
by "IB". After all parts are allocated the new solution file is generated with the same
name but with automatically added extension "IN2". This is a new intermediate format
file with elements still in approximated form. Then program abandons Gurel method
procedure and starts displaying solution in the graphical form. At this point program
switches to the option 4 where current solution is processed.
Option 3. Albano-Sapuppo's method - during execution of this procedure new
solutions according to the Albano-Sapuppo's algorithm are computed. The way this
routine is handled is identical to Gurel's method described above. The only difference
comes from the fact that during computations of a new solution only numbers of allocated
elements are displayed.
Option 4. Display solutions - this procedure deals mainly with graphics but not
only. In order to display any solution from certain file one has to clloose it in the same way
input data files have been chosen. Now, all files in the current directory with extension
"IN2" are considered.
When solution is displayed we can save it as the final solution or print it. If we save
the solution then it is converted from approximated format back to the initial format with
sections of circles. Program displays new file name and waits for pressing any key. Then
the new file is stored with an "OUT" extension.
Option 5. Program Help - this routine displays help text file in pages. In the
current directory "ROZKROJ.TXTV file must exist otherwise program issues appropriate
message and continues. We can swap pages with PGUP and PGDN keys. ESC returns
program to the main menu.
.IN
- Initial preprocessing
4. Structure of elements. For every type of element shape one has to define:
9 Operational Conditions
This DSS can operate on the IBM P C and compatible computers. Suggested minimal
hardware configuration is 640 kB of RAM; CGA, HGC or VGA graphic card; floppy disc
drive. Optionally hard disc drive and printer. Hard disc device simplifies data operations
because all disc operations are executed in the current (where the DSS was started)
directory.
10 Experimental Results
Results from several tests are presented in table 1. In that table description of a set of ele-
ments, quality of solution (percentage waste), time of computations, are given. Printouts
from several example allocations are attached at the end of the paper.
Table 1. continued
References
[I] M. Adamowicz. The Optimal Two-Dimensional Allocation of Irregular Multiply-
Connected Shapes with Linear Logical and Geometric Constraints. N.Y. Univ. Tech.
Report 403-9, New York 1969.
[2] A. Albano, G. Sapuppo. Optimal Allocation of Two-Dimensional Shapes Using
Heuristic Search Methods. IEEE Trans. on Systems, Man and Cybernetics, vol. SMC-
10, No. 5, May 1980.
[3] R. C. Jr. Art. An Approach to the Two-Dimensional Irregular Cutting Stock Problem.
IBM Report 320-2006, Cambridge 1966.
[4] B. S. Baker, D. S. Brown, H. P. Katseff. 5/4 - Algorithm for Two-Dimensional
Packing. J. of Algorithms, 2 (1981), 348-368.
[13] P. C. Gilmore, R. E. Gomory. Multistage Cutting Stock Problems of Two and More
Dimensions. Operations Research 13 (1965), pp 94 - 120.