0% found this document useful (0 votes)
37 views39 pages

(1991) Cutting Stock Problems and Solution Procedures

Uploaded by

tuan.vuhai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views39 pages

(1991) Cutting Stock Problems and Solution Procedures

Uploaded by

tuan.vuhai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Two-Dimensional Cutting Problem

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

I Basic Complexity Results and Algorithms for Irregular


Shapes 1
1 Introduction 1

2 Basic Concepts, Definitions and Results for One-Dimensional Case 1


2.1 Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 1
2.2 ComputationalComplexityIssues . . . . . . . . . . . . . . . . . . . . . .. 2
2.3 One-Dimensional Problem Analysis . . . . . . . . . . . . . . . . . . . . .. 5

3 Two-Dimensional Regular Cutting Problem 6


3.1 Introduction . . . . . . . . . . . . . . . . . . . ................ 6
3.2 Iterative Combinatorial Algorithms . . . . . . ................ 7
3.3 Approximation Algorithms . . . . . . . . . . . ................ 9

4 Irregular Two-Dimensional Cutting Problem 12


4.1 Introduction . . . . . . . . . . . . . . . . . . . . . .. . . ... . . . .
... 12
4.2 Algorithm by Albano-Sapuppo . . . . . . . . . . . .. . . ... . . . ...
. 12
4.3 Algorithm by Art . . . . . . . . . . . . . . . . . . .. . . ... . . . ...
. 15
4.4 Optimal Algorithm by Adamowicz . . . . . . . . .. . . ... . . . ...
. 17
4.5 Algorithm by Gurel . . . . . . . . . . . . . . . . . .. . . ... . . ..... 18

5 Conclusions 20

I1 Decision Support System for Cutting Irregular Shapes


- Implementation and Experimental Comparison 21
6 Introduction 21

7 How to Use DSS ROZKROJ 22

8 Data File Format 23

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.

2 Basic Concepts, Definitions and Results for One-


Dimensional Case
2.1 Problem Formulation
One-dimensional cutting problem is the easiest version of the problem. It can be
stated in the following way: given rods of unit lengths cut them into the set of elements
'Technical University of Poznari, Institute of Computing Science, Poznari, Poland.
J . Blaiewicz et al. Two-Dimensional Cutting Problem

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.

2.2 Computational Complexity Issues


As was mentioned the complexity analysis is the basis for further studying problem. Thus,
we will recall basic complexity definitions mainly with respect to decision problems, i.e.
those requiring an answer of the "yesn-"no" type. Bin-packing (cutting) problem may be
formulated in this way by asking a question if packing elements into the known number of
bins is possible. On the other hand, plenty of optimization problems where some function
is to be minimized (maximized), are known. Bin-packing in the original formulation is the
optimization problem. There exists a close relation between decision and the optimization
problems. If the optimization problem is easy to solve, then corresponding decision version
is easy too. If decision version is difficult, then optimization problem is also difficult. We
are going to use this relation further on. We consider only time complexity since space
limitations are not of the great importance and may be avoided. Now we present basic
definitions.
Decision problem II is a set of parameters (sets, graphs, numbers) with values not
necessarily assigned and a question with an "yes" or "no" answer. Assigning values to
parameters creates instance I of problem II. Dn is a set of all instances. Data of I are
encoded as a limited string x ( I ) of symbols from known alphabet C according to some
encoding rules. By an input size N ( I ) we understand here the length of string x(I).
Only compact and precise encoding rules are allowed - redundant symbols are excluded,
numbers are encoded with a base greater than 1. In practice N ( I ) is assumed to be a
number of the most important objects of the instance (tasks, polygons, nodes in a graph).
Computational complexity of algorithm A solving problem II one defines as a
function j A ( n ) = max{t : t is a number of elementary computer steps needed to solve the
problem for I E Dn and n = N(I)).
Polynomial algorithm has computational complexity function (or complexity for
short) O(p(k)) on deterministic Turing machine - DTM (or RAM model), where p ( k ) is
a polynomial, k is a size of the instance. Now we define classes of decision problems.
Class P consists of all problems solvable on DTM in polynomial time. (Hence, this
class contains all problems solvable in polynomial time in.practice).
Class NP consists of all problems solvable in polynomial time by nondeterministic
Turing machine (NDTM). (In practice it is equivalent to the existence of a polynomial
height branching tree in a branch and bound algorithm solving the problem) By the
definition P C N P .
J. Blaiewicz et al. Two-Dimensional Cutting Problem

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

Asymptotical performance ratio ST is

The closer SA,ST are to the 1 the better algorithm is.


For some combinatorial problems it can be proved that there is no hope of finding an
approximation algorithm of certain accuracy (i.e. this question is as hard as finding a
polynomial-time algorithm for any NP-complete problem).
J . Blaiewicz et al. Two-Dimensional Cutting Problem

Analysis of the worst case behaviour of an approximation algorithm may be comple-


mented by an analysis of its mean behaviour. This can be done in two ways . The first
consists in assuming that the parameters of the instances of the considered problem TI
are drawn from certain distribution D and then one analyzes the mean performance
of algorithm A. One may distinguish between absolute error of an approximation algo-
rithm, which is the difference between the approximate and optimal solution values and
relative error which is the ratio of the two. Asymptotic optimality results in stronger
(absolute) sense is quite rare. On the other hand asymptotic optimality in the relative
sense is often easier to establish [19, 21, 241.
It is rather obvious that the mean performance can be much better than the worst case
behaviour, thus justifying the use of given approximation algorithm. A main obstacle is
difficulty of proofs of the mean performance for realistic distribution functions. Thus, the
second way of evaluating the mean behaviour of approximation algorithms, consisting of
simulation studies, is still used very often. In the later approach one compares solutions, in
the sense of the values of a criterion, constructed by a given approximation algorithm and
by optimization algorithm. This comparison should be made for a large representative
sample of instances. There are some practical problems which follow from the above
statement and they are discussed in [23].

Cutting problem
(complexity analysis)

r
Easy problem

Complexity irnprovrnents
- I
NP- hard problem

-in the w ~ m tcaJe


-nuan (probabilistic
analysis
3
Relaxation A~~roximation Exact enumerative
.higorithms
Rrformam analysis
algorithms
(also pseudo-

-- womt mse behaviour


mean khaviour
polynomial time)

Fig.1. An analysis of cutting problem - schematic view.

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

The above discussion is summarized in a schematic way in Fig.1.


Definitions from this Section are base for further analysis of our problem.

2.3 One-Dimensional Problem Analysis


One-dimensional problem is the easiest version of the problem considered. From its anal-
ysis we can draw conclusions as to the general problem complexity.
One-dimensional cutting problem as stated in Section 2.1 is the same as bin-packing
problem so we will refer here to the results for the latter. This problem is NP-complete
in the strong sense for the decision version, this comes from pseudo-polynomial transfor-
mation of 3-partition problem [I21.
3-partition problem is:
Parameters:

limit B E Z+, set A, ] A ( = 39, q E Z+ , value s(a;) E Z+ for every a; E


A, B/4 < s(a;) < B/2, C:Z1 s(ai) = Bq.
Question:

does there exist a partition of A into q disjoint subsets sl, s 2 , . . . ,s, satisfying
CajESi = B for i = I ,...,q ?

Proof is easy we see that 3-partition is a special case of bin-packing problem.


Now we know that the problem will not be solved by a polynomial algorithm (if P #
NP), yet for the fixed number of element sizes there exists linear time solution [7].
Assume p is integer such that sizes of elements are from the set {lip,2/p,. . . , (p -
l)/p, 1) and we pack them into unit size box. Elementary instance E is a set of elements
satisfying Cy='=, s(a;) 5 1. Data of the instance may be written as a p-dimensional vector
-
v = [vl, . . . ,v,] where v; is a number of elements of size ilp. Thus every solution is
a set of elementary instances and the problem can be stated as a partition of a set of
elements into the minimal number of elementary instances. We see that the number I( -of
elementary instances is fixed. We will denote them as p-dimensional vectors 51, 6,. . . ,bK
called elementary vectors. Now our problem can be formulated as an integer linear
programming:

find ,
a1 a 2 , . . . ,a k that minimize K
a;,

subject to CEl a;$; = 5 and a; 2 0.

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

First fit decreasing (FFD) algorithm is a FF algorithm with elements assigned in


nonincreasing order of their sizes.
Best fit decreasing (BFD) algorithm is a BF algorithm for elements scheduled in
nonincreasing order of their sizes.
From [14, 181 the asymptotic performance ratios for FFD and BFD are known (here
sizes of the elements a are drawn from the interval (0, a] ) :

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]

(The last line of SPFD{a)is a proposition only).


Some other approximation algorithms are surveyed e.g. in [lo].
In this Section we have shown that one-dimensional cutting problem in general case is
NP-complete in the strong sense and we should not expect polynomial algorithms. Best
approximation algorithms generate solutions worse about 20% than optimum in the worst
case, in practice an average difference is less than 10%.

3 Two-Dimensional Regular Cutting Problem


3.1 Introduction
The problem of two-dimensional regular cutting defined in 2.1 has several variants. For
all the cases the common assumptions are

- pieces can not overlap each other or the edges of material


- pieces can not be inverted (as in the mirror).

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.

3.2 Iterative Combinatorial Algorithms


Christofides a n d Whitelock's b r a n c h a n d b o u n d a l g o r i t h m [8].

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.

Fin.2. a) Not normalized cut. b) Normalized cut.

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

f;(x) = min{f;-l(x), max{b;, f;-l(x - ja;))) j = 1,. . . ,min(l;, Lx/a;J)


3

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.

Wang's combinatorial algorithm [26, 211.

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

and the waste in Skis not greater than PLOWo


then F k := F k U Sk;
Lk := Lk-l U Fk;
M := k;
choose the element of LM with the least total waste.

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.

3.3 Approximat ion Algorithms


There are many approximation algorithms. We describe only some, which, in our opinion,
are the most important. If not stated otherwise the unit width of the stock sheet is
assumed, a length is to be minimized, and rotations are not allowed. For a given list L of
rectangles an approximation algorithm generates solution with stock sheet length A(L)
while optimum is OPT(L). We use the absolute performance ratio

and an asymptotic one


A(L) IaOPT(L) +P
Let us pass now to the algorithms.
Bottom left decreasing (BLD) algorithm. Rectangles given on the list L are
ordered according to nonincreasing sizes. Put the next element from L as low and as
much to the left as possible.
For every L : BL D(L) 5 2 0 P T ( L ) , thus algorithm BLD generates worst case solutions
100% worse than an optimal one.
The following two algorithms [ l l ] are so called level oriented algorithms. The
level-oriented name comes from the fact that pieces are located in layers. The first layer
bottom is a bottom of the stock sheet, the following are marked by the top of the first
(that is highest) element in the preceding layer. Elements on L are ordered according to
nonincreasing height.
Next fit decreasing height algorithm (NFDH) -if there is not enough room at the
current (top) level to place a rectangle considered, then create a new level (fig. 3).

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

First fit d e c r e a s i n g h e i g h t a l g o r i t h m (FFDH)- puts rectangles a t the lowest


possible level and if it is not possible creates new one (fig. 4).
Asymptotic performance ratio for NFDH is

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

U p d o w n a l g o r i t h m ( U D ) [4]. This algorithm is equivalent to NFDH algorithm for

Fig.5. SF algorithm layout.

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

Fig.6. UD algorithm allocation layout.

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.

Irregular Two-Dimensional Cutting Problem


4.1 Introduction
This problem admits any shapes of elements. Strong NP-completeness of decision version
of the problem implies the lack of the polynomial optimization algorithm. Worse still, as
far as we know, there are neither algorithms with known worst case behaviour bounds nor
algorithms computing optimal solution in any way. In practice, oilly experimental evalua-
tion and comparison on the base of some objective function (waste, time), is possible. The
only method optimal in some sense has been proposed by Adamowicz [I]. This method
involves iterative solution of an integer programming problem followed by an adjusting
procedure, which generate new constraints for the next iteration until an optimal solution
is constructed. However, this approach is so complex that experimental program is either
not completely usable or implements very simplified version of the method.
The other methods known for the problem in question are lleuristics using different
approaches to the problem. These algorithms though polynomial and approximate con-
sume a lot of time involving hard numerical computations. From this fact we can draw
conclusions: there is a trade-off between the solution time and quality of the solution. In
this context the importance of hybrid - semiautomatic methods increases, where tenta-
tive solution is automatically generated and the interactive improvements are allowed by
conversational display unit.
We outline below ideas of four methods: by Adamowicz and three heuristics [2, 3, 151.
The first and the second heuristics have been implemented in the program described in
second part of this report.

4.2 Algorithm by Albano-Sapuppo


This algorithm [2] is based on the search method for optimal solution in the directed
graph of all partial solutions using several heuristic techniques that increase the search
power. Pieces are assumed to be irregular polygons without holes, the sheet is a rectangle.
Discretized step rotations are allowed. The goal is to minimize the waste or (better) the
length of produced packing.
Many problems in artificial intelligence and operations research are solved by a tech-
nique based on searching through a "space" of candidate solutions. The above approach
utilizes this technique. The set of states reachable from the initial state can be seen as
a directed graph with nodes - states of allocation and arcs - allocation operations. The
J . Blaiewicz et al. Two-Dimensional Cutting Problem

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:

1. Put the start node on the list GENERATED.

2. If GENERATED is empty exit with failure


3. Select a node from GENERATED according to some rule R and put it on a list
EXPANDED, call it n.

4. If n is a final node exit with a solution path.

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

added-waste(A;) = space(A;-1) - (space(A;) + area-of (P))


where space(A;) is the area on the right side of the profile (rightmost borders of rightmost
pieces), i.e. the area which may be used to allocate piece p; (Fig. 7).
The wasteA; is recursively defined as

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

Fig.7. Partial solution pattern.


In order to transform the optimal allocation problem into the search of an optimal
path in a state space, an initial state corresponds to A. , the cost of an arc from S; to
is the added waste produced by allocation A;+1 . The procedure to implement the
heuristic search method can be stated as follow:

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

f o r all pieces left to be allocated d o


f o r all orientations d o
apply placement policy; {waste computation)
apply evaluation function and
append successor to the list GENERATED
end
end;
set the CURRENT-NODE EXPANDED;
let the CURRENT-NODE be the "best" successor in GENERATED;
end;
plot solution;
end

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.

Evaluation function discretization - continuation of the search along paths with


small differences is allowed only within some precision.

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

Fig.8. NFP for A and B.

I
allocation I
region I

point -
reference
,-,--
,,
,,
,, -J - I

Fig.9. Allocation region.

No-fit-polygon (NFP)for a pair A,B of pieces - completely describes all those


positions where the reference point of B may be placed in order to have B touching A
without overlapping (fig.8). Allocation region for a given resource and piece - the :,rea
in which the reference point of the piece can validly fall (fig.9). This algorithm has been
tested thoroughly and its performance and reliability indicates that it favourably compares
with some others.

4.3 Algorithm by Art


This algorithm [3] is very similar to the Albano-Sapuppo algorithm in the way of handling
geometrical entities. It was the base to create previous algorithm. Here, more stress is put
to geometrical problems while before mainly heuristic search organization has been con-
sidered. This Section may be both description of independent algorithm and supplement
for Albano-Sapuppo algorithm. There are the following assumptions made

1. There is distinguished piece direction (orientation) parallel to the distinguished di-


rection of the material let us say X axis. Thus rotations are not allowed.

2. Flipping of pieces is not allowed (mirror symmetry).


3. The stock sheet is a rectangle with given width, and its length is to be minimized.
Every piece is defined by the sequence of line sections approximating its edge with
a precision required. We exclude here any curve edges because of the growth of com-
putational complexity. Distinguished element direction is parallel to X axis. There is
a distinguished point in the sequence of vertices called reference point and its location
defines uniquely the element position. Both concave and convex polygons are admit-
ted but because of higher computational complexity concave objects are excluded and
approximated to the convex equivalent.
J . Blaiewicz et al. Two-Dimensional Cutting Problem

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 -

Fig.10. Modification of element B envelope after allocation of element A.

Process of allocation is deterministic and sequential. Reference point defining element


location is to be placed on the envelope - this guarantees contact with other elements
without overlap. In order to minimize total waste, elements are allocated from the left
side to the right according to the following heuristic rules:
1. Place element with the minimal envelope X dimension value first.
2. Place element in a certain place with minimal added waste.
3. Split big groups of elements into the smaller one or into the separate elements to
put in certain places separately.
4. Place element with greater area first.

5. Place element minimizing stock sheet length first.


Position on this list do not reflect importance of rules, it should be rather experimentally
adjusted to typical problem instances.
J . Blaiewicz et al. Two-Dimensional Cutting Problem

4.4 Optimal Algorithm by Adamowicz


This algorithm [:I] allows the most general version of the problem to be solved. Various
elements and stock sheets as well as multiple linear, logical and geometrical constraints
associated with them are considered. Solution is obtained by iterative application of a two-
stage procedure. The first stage is a linear programming problem; its solution minimizes
linear objective function subject to linear constraints. The second, geometrical, stage
checks if the set of elements can be allocated feasibly satisfying geometrical constraints.
If the solution does not exist, then new linear constraints resulting from the information
obtained in the second step are generated for the new iteration.
This method allows elements and stock to be holed, irregular and even not continu-
ous. There are geometrical constraints of the two types: absolute - that bound locations
on the stock area and relative - defined in relation to the other elements. Logical and
linear constraints are for example number of elements of certain type required, a maximal
number of types of elements, a ratio of quantities in which two types of elements are cut
and others. The algorithm can be stated as an iterative application of the three following
procedures.
1. A solution of a linear programming problem with rejection of redundant constraints.
2. Checking if the linear programming solution satisfies geometrical constraints and if
not saving an information about feasible allocations.

3. Creating new linear constraints, including information gained in step 2.


Elements and material area are defined by sequence of vertices on its polygonal border. If
the element is not compact (i.e. includes holes) it has to be defined as a group of compact
elements with an additional relative location constraint. A location of an element is
given by three parameters: x, y and rotation angle from an initial orientation. During
the processing phase of geometrical constraint an envelope (see Section 4.3) for absolute
constraints and NFP (Section 4.2) for relative constraints, are computed.
Linear programming phase gets into the consideration:
linear constraints of the number of types of elements;

logical constraints on the presence of types of elements, this can be converted into
linear constraint as well;

geometrical constraints on the relative location of certain types of elements - since


this is inherently nonlinear mainly geometrical phase of algorithm deals with this
kind of constraints;

linear objective function maximizing income or number of elements allocated, den-


sity of allocation and/or minimizing the cost, waste etc.
As a result of linear programming phase solution one gets a set of elements to be allocated.
Geometrical phase checks if allocation of elements chosen in the previous phase is pos-
sible. The elements are considered according to their nonincreasing areas. This procedure
searches in the space of all possible locations of elements maximizing number of elements
allocated .
J. Blaiewicz et al. Two-Dimensional Cutting Problem

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.

4.5 Algorithm by Gurel


Every element is represented in this method [15] as a node in the graph. There is an arc
between nodes if the corresponding elements are touching each other (or in other words
are in contact). Rectangular area of the stock is represented as a disk called marker disk.
Nodes corresponding to pieces in contact with the stock border are on the circle of marker
disk, while nodes inside it correspond to elements without common points with edges of
the raw material. In this way, a graph reflecting elements allocation inside the marker
disk, has been created. There are vertical paths (strings of nodes) inside marker disk with
at least one node on the border of that disk. The first string of that type corresponds
to pieces in contact with the left border of material; we denote it boundary break -
BB1 for short. The second string of that type consists of nodes in contact with the
right border of the stock area and will be denoted B B 2 . All other vertical strings of
nodes between BB1 and BB2 we name intermediate breaks (IBn -for short, n being
IB number). Interesting feature of the solution is that in the final layout there must
be at least one horizontal string of pieces forming horizontal break. This will be called
cobreak. Cobreaks as well as breaks may either lay along the boundary of marker circle
or cross the marker disk by joining BB1 and BB2. Therefore there are boundary cobreaks
or intermediate cobreaks. During the implementation of the method it has been observed
that the biggest waste is created at the (right side) end of the layout. Therefore IBs are
allocated according to minimal waste starting from both ends of the layout to the center
of area. Thus, the method by Gurel can be formulated as follows

1. Initial computations.

2. Create boundary break BB1 and then BB2.

3. While not allocated elements exist, create an internal break IB and move it to the
right or left group of breaks.

4. Join left and right groups of breaks.

The algorithm requires some additional parameters a, b, c, s. Coefficients a, b, c are used


to create four groups of elements relative to their areas. Let us denote by Pmaxarea of
the largest element and by P an area of an element considered. There are the following
groups of pieces (depending on the areas):

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

During the initial phase elements are assigned to groups L1 , L2 , M , S.

Fig.11. Object's boundary points and waste areae in Gurel's algorithm.

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

1. Every element must lay entirely in the stock sheet.

2. No overlap of elements is admitted.

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).

5. Rotations with some step depending on the algorithm, are allowed.

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:

ROZKROJ.EXE - DSS program;


ROZKROJ.TXT - short help file for the ROZKRO J.EXE;
TEST1.IN - TEST10.IN - examples, input data files;
TESTl.IN1 - TESTlO.IN1, TESTl.IN2 - TESTlO.IN2
- examples, intermediate solution 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.

1. Quit the program.


2. Gurel's method.

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.

8 Data File Format


The DSS uses files with extension "IN" as an input, with extension "OUT" as an output.
It generates also two intermediate type files with extensions "INl", "IN2". Figure 1
explains which module of the DSS utilizes and generates appropriate types of file.
Now we describe input and output data file format. Let us denote by fl - floating point
number with at most ten characters (sign, at most five digit integer part, decimal point,
at most three digits fraction), and by int - integer in the range 0 to 32767.
Input file format. Input file is a text file named with extension "IN". It must have
a structure as follows

1. Width of the stock sheet (fl).

2. Number of different element shape types (int)

3. Parameters to the algorithms (all fl):


rotation step for the Albano-Sapuppo routine;
percentage parameters for the Gurel's routine;
step length - both routines.
J . Blaiewicz et al. TwwDimensional Cutting Problem

.IN
- Initial preprocessing

+ Initial preprocebsing Al bano - Sapuppo's method

Display solutions ( w t p u t ) .OUT

Fig.12. DSS ROZKROJ data file name extensions.

4. Structure of elements. For every type of element shape one has to define:

number of elements of this kind (int);


number of vertices of the shape (int);
description of vertices in the clockwise order (fl)
- x coordinate;
- y coordinate;
- radius of the circle if the current vertex starts a section of a circle as a part
of element's edge. If the radius is negative then this sectio.1 of circle causes
element t o be concave (line section from the beginning of circle section to
the end is outside the element). Zero if it is a section of line.
- x , y coordinates of the center of that circle, if the edge is a segment of
line then components of the normal to this line vector.

Every entry of this specification is obligatory. Numbers should be separated by space


or C R character.
Input file is a text file and can be prepared with any text editor. Specialized program
for generation of input data files is described in other paper.
Output file format.
Output file has a name with an "OUT" extension. It has the following structure

1. Width of the stock sheet (fl).


2. Required length of the stock sheet (fl.).
3. Total number of allocated elements of all types (int).
4. Description of elements allocation. Elements in this file are ordered according to
the order of different shape types in the input file. For every allocated element

number of vertices (int);


description of vertices in the clockwise order (fl)
- x coordinate;
- y coordinate;
J . Bfaiewicz et al. Two-Dimensional Cutting Problem

- radius of the circle if the current vertex starts a section of a circle as a


part of element's edge. If the radius is negative then this section of a circle
causes element to be concave (line section from the beginning of circle
section to the end is outside the element). Zero if it is a section of line.
- x, y coordinates of the center of that circle, if edge is a segment of line
then components of the normal to this line vector.

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. Results of automatic element allocation with DDS ROZKROJ V.2.0.

Test file Description of Precentage Computations Sheet


name element set waste time length
TEST1 G ' 8 convex 36% < lmin 20.00
heksagons
TESTlA as above 29.5 % < 1 min 18.15
TEST2G 10 circles 36.3% 1 min 20.00
TEST2A as above 35.7% 1 min 19.80
TEST3G 10 triangles 45.5% < I min 11.00
TEST3A as above 37.6% 3 min 9.61
TEST4G 10 concave elem. 25.8% l m i n 19.65
(3 arcs,line)
TEST4A as above 18.6% 1 min 17.90
TEST5G 12 various elem. 35.3% 1 min 22.87
TEST5A as above 28.2% 2 min 20.60
TEST6G 10 concave elem. 59.6% 1 min 23.17
(6 vertices,
2 arcs, 4 lines)
TEST6A as above 57.0% < l m i n 21.78

'G stands for Gurel's method.


'A stands for Albano-Sapuppo's method.
J . Blaiewicz et al. Two-Dimensional Cutting Problem

Table 1. continued

TEST26A as above 6.5% 1 min 85.00


TEST30G TEST25G/A other 25.5% < 1 min 40.00
sheet width
P
TEST30A as above ( 14.7% 1 < 1 min ( 35.00 ,
TEST31G twice TEST3OA/G 10.5% 3 min 66.67
elements
TEST3lA as above 8.2% 1 min 65.00
TEST35G TEST25A/G other < 1 min 31.67
sheet width
< 1 min
P

TEST35A as above 20.3% 30.00


TEST36G TEST26A/G other 5.0% 9 min 50.3
sheet width
TEST36A as above 13.1% 2 min 55.00
J . Blaiewicz et al. Two-Dimensional Cutting Problem

Length : 31.478 Width : 15.008 Waste : 3 6 . 1 ~

F i g . 13. TESTlGi Gurel ' s method.

Length : 33.313 Uidth : 15.000 Uaste : 39.6z

Fig.14. TEST1n Albano-Sapuppo's method.


J. Blaiewicz et al. Two-Dimensional Cutting Problem

Length : 20.800 Width : 28.800 Waste : 46.57

Fig.15. T E S T Z l Gurrl's method.

Length : 27.877 Width : 20.800 Waste : 60.5% ,

Fig.16. TESTZl Albano-Sapuppo's method.


J . Blaiewicz et al. Two- Dim ensiona1 Cutting Problem

Length : 58.308 Uidth : 25.100

F i g . 17. TEST3b G u r e l 's m e t h o d .

L e n r t.h : 55.008 Width : 25.100 Uaste : 13.12

Fig.18. TEST36 Albano-Sapuppo's method.


J. Blaiewicz et al. Two-Dimensional Cutting Problem

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.

[5] B. S. Baker, E. G. Jr. Coffman, R. L. Rivest. Orthogonal Packings in Two Dimen-


sions. SIAM J . Comput. 9 (1980), pp 846-855.

[6] B. S. Baker, G. S. Schwartz. Shelf Algorithms for Two-Dimensional Packing Prob-


lems. SIAM J . Comput., 12 (1983), pp 508-525.
[7] J . Blaiewicz, K. Ecker. A Linear Time Algorithm for Restricted Bin-Packing and
Scheduling Problems. Operations Research Letters 2, No. 2, 1983, pp 80-83.
[8] N. Christofides, C. Whitelock. An Algorithm for Two-Dimensional Cutting Problems.
Operations Research 25, 1977, pp 30-44.
[9] F. R. K. Chung, M. N. Garey, D. S. Johnson. On Packing Two-Dimensional Bins.
SIAM J. Alg. Dis. Math. 3 (1982) No 1, pp 66 - 76.
[lo] E. G. Jr. Coffman, M. R. Garey, D. S. Johnson. Approximation Algorithms for Bin-
Packing - an updated survey. in G.Ausiello, M.Lucertin, P.Serafini (eds.) Algorithms
for Computer System Design, Springer Verlag, Wien 1984, pp 49-106.
[ll] E. G. Jr. Coffman, M. R. Garey, D. S. Johnson, R.E. Tarajan. Performance Bounds
for Level-Oriented Two-Dimensional Packing Algorithms. SIAM J . Comput. 9 (1980),
pp 808-826.
[12] M. R. Garey, D. S. Johnson. "Strong" NP-Completeness Results, Motivation, Exam-
ples and Implications. J. ACM 25, No 4, 1978, pp 499-508.

[13] P. C. Gilmore, R. E. Gomory. Multistage Cutting Stock Problems of Two and More
Dimensions. Operations Research 13 (1965), pp 94 - 120.

[14] P. C. Gilmore, R. E. Gomory. The theory and Computation of I(napsack Functions.


Operation Research 15 (1967), pp 1045-1075.
[15]-0. Gurel. Circular Graph of Marker Layout. IBM Data Processing Division, New
York Scientific Center Report No 320-2965, Feb.t 1969.
[16] S. S. Israni, J. L. Sanders. Two-Dimensional Cutting Stock Problem Research: A
Review and a New Rectangular Layout Algorithm. Journal of Manufacturing Systems
1 (1982), pp 169-.
J. Blaiewicz et al. Two-Dimensional Cutting Problem

[17] S. S. Israni, J. L. Sanders. Performance Testing of Rectangular Parts Nesting Heuris-


tics. Int. J. Prod. Res., 23 (1985), 437-456.
[18] D. S. Johnson. Near-Optimal Bin-Packing Algorithms. Ph. D. Thesis, Massachusetts
Institute of Technology, Electrical Department, 1974.
[19] R. M. Karp, J. K. Lenstra, C. J. H. McDiarmid, A. H. G. Rinnooy Kan. Proba-
bilistic Analysis of Combinatorial Algorithms: An Annotated Bibliography. in M.O'h
Eigearthaigh, J.K. Lenstra and A.H.G Rinnooy Kan (eds.), Combinatorial Optimiza-
tion: Annotated Bibliographies, J .Wiley, Chichester, 1984.
[20] H. W. Jr. Lenstra. Integer Programming With a Fixed Number of Variables., Math.
Oper. Res. 8, 1983, pp 538-548.
[21] J. F. Oliveira, J . S. Ferreira. Solving Two-Dimensional Cutting Problems and Com-
paring Diflerent Approaches. unpublished paper, Instituto de Engenharia de Sistemas
e Computadores, Porto, Portugal, 1989.
[22] A. H. G. Rinnooy Kan. Probabilistic analysis of algorithms. Annals of Discrete Math-
ematics 31 (1987), 1-60.
[23] E. A. Silver, R. V. Vidal, D. de Werra. A tutorial on heuristic methods. European
Journal of Operational Research 5, 1980, 153-162.
[24] L. Slominski. Probabilistic analysis of combinatorial algorithms: a bibliography with
selected annotation. Computing 28 (1982), 257-267.

[25] J. B. Ullman. The Performance of a Memory Allocation Algorithm. Tech. Rept. No


100 Princeton Univ., Electrical Engineering Department, 1971.
[26] P. Y. Wang. Two Algorithms for Constrained Two-Dimensional Cutting Stock Prob-
lems. Operations Research 31 (1983), pp 573-586.

You might also like