You are on page 1of 13

COMPUTER-AIDED

DESIGN
Computer-Aided Design 33 (2001) 879891

www.elsevier.com/locate/cad

A generic approach for nesting of 2-D parts in 2-D sheets using genetic
and heuristic algorithms
A. Ramesh Babu, N. Ramesh Babu*
Manufacturing Engineering Section, Department of Mechanical Engineering, Indian Institute of Technology, Madras 600 036, India
Received 25 November 1999; revised 14 July 2000; accepted 31 July 2000

Abstract
In this paper, a genetic and heuristic approach is proposed for the nesting of multiple two-dimensional (2-D) shaped parts in multiple 2-D
shaped sheets with the aim of minimizing the wastage of the sheet material. The paper proposes a new method of representing the sheet and
part geometries in discrete form to arrange the parts on the sheet quickly, irrespective of the complexity in the geometry of the sheets and
parts. The proposed heuristic approach considers the sheets and parts in a sequential manner and arranges the parts on the sheets using the
bottom-left strategy. The genetic algorithm generates the best sequence of the sheets and parts for nesting the parts on multiple sheets,
utilizing the sheet material optimally. The effectiveness of the proposed approach is shown by comparing the results obtained with the present
approach to those obtained with the approaches proposed by Jakobs (Eur J Oper Res, 88 (1996) 165), Ramesh Babu and Ramesh Babu (Int J
Prod Res, 37(7) 1999 1625), and Jain and Chang (Engng Comput, 14 (1998) 206). The generic nature of the present approach is illustrated by
considering a variety of parts, ranging from a simple rectangular shape to a highly irregular shape, in different combinations with or without
grain orientation constraint, apart from nesting of multiple irregular shaped parts in multiple sheets of complex geometry. q 2001 Elsevier
Science Ltd. All rights reserved.
Keywords: Nesting; Genetic algorithm; 2-D cutting

1. Introduction
In the present manufacturing scenario, cutting of twodimensional (2-D) shaped parts from 2-D sheets, with a
minimum wastage of material, is an important task. The
task of arranging the parts on the sheet, known as nesting,
is being attempted by several researchers employing several
methods and implementing them using digital computers.
While developing the nesting methods for a given set of
parts and sheets, one should consider certain geometrical
and technical aspects. The geometry of the parts to be cut
may vary from a simple rectangular shape to a highly irregular one. In the case of irregular parts, the geometry may
contain a straight line and curvilinear features. Further, 2-D
parts may also contain internal features (either holes or
cutouts) being regular or irregular in geometry. In a similar
manner, the geometry of the sheet material can vary from
regular to irregular shapes with or without defective regions.
The defective areas on the sheet material are nothing but the
defects on certain naturally occurring materials like granite,
* Corresponding author. Tel.: 191-44-4458540; fax: 191-44-2352545.
E-mail addresses: a_ramesh_babu@hotmail.com (A. Ramesh Babu),
nrbabu@acer.iitm.ernet.in (N. Ramesh Babu).

wood, etc. and certain sheets produced by different manufacturing processes. While nesting the parts in sheets it is
essential to avoid these regions.
Apart from the geometry of the sheets and parts, several
technical aspects such as the cutting process employed, the
nature of application of parts for further processing, such as
bending, impose certain constraints in generation of nested
pattern. Based on the cutting process employed, various
cutting allowances, such as bridge width in press working
operations and kerf width in unconventional cutting
processes, should be included in the actual geometry of
the parts considered for nesting. In certain applications, it
is important to consider the direction of grain orientation
while nesting the parts in the sheets.
By considering these aspects, several researchers attempted
to develop methods for nesting of different shaped parts in
different shaped sheets. Nesting of rectangular shaped parts
in rectangular sheets is quite an easy task in view of the geometry being simple. Different mathematical techniques such
as dynamic programming [1], integer programming [5] and
integer linear programming [16,18] were employed for the
nesting of rectangular shaped parts in rectangular sheets.
These techniques are impractical and computationally
infeasible when a large number of parts are to be arranged in

0010-4485/01/$ - see front matter q 2001 Elsevier Science Ltd. All rights reserved.
PII: S 0010-448 5(00)00112-3

880

A. Ramesh Babu, N. Ramesh Babu / Computer-Aided Design 33 (2001) 879891

sheets of larger sizes. Further, these approaches cannot handle


sheets and parts of irregular shape.
In view of these limitations, attempts were made to
employ heuristic approaches for nesting of 2-D shaped
parts in 2-D sheets. Yanasse et al. [21] addressed a
sequence-dependent heuristic algorithm that sorts out
rectangular parts according to certain priority rules based
on the physical attributes of parts such as length, width and
area, and arranges each part from the bottom-left corner of
the sheet. Heuristic techniques for nesting of irregular
shaped parts are quite complex in view of the difculty in
nding out the best relative position of the parts with respect
to the sheet geometry. For a given number of arbitrarily
shaped parts, Cheng and Rao [4] proposed a heuristic
method that clusters the irregular parts into a minimal
area of convex enclosure. This cluster is formed by sliding
one part over the other and maintaining the minimum
distance between the centroids of the two parts.
In a similar way, Lamousin and Waggenspack [12] developed a heuristic method for the nesting of irregular parts in
irregular sheets using the concept of No Fit Polygon (NFP).
The NFP is the path traced by the outer most vertex of a part,
as the part slides in contact with the boundary of the sheet.
Then the part is placed at the bottom-left position on the
NFP. With this particular method, it is not possible to place
the parts at narrow regions of the sheet. Considering this,
Lamousin and Waggenspack [13] proposed a heuristic
method to nest irregular parts in irregular sheets by matching convex features of the part with concave features on the
boundary of the sheet material. However, it was reported
that the utilization of the sheet material, with this approach,
is inferior to the heuristic method that uses NFP concept.
Whelan and Batchelor [20] used the machine vision technique and proposed a sequence dependent heuristic for
arranging irregular shaped parts in sheets with irregular
boundaries. The purpose of this machine vision technique
is to identify the overlapping of the parts on the sheet easily,
irrespective of the complexity in the geometry of the parts
and sheets.
In general, the heuristic approaches follow certain xed
deterministic procedures in the nesting of 2-D shaped parts
in 2-D sheets. Moreover, these approaches consider the
parts in only one particular sequence. Hence, there is no
possibility of considering the different sequences of the
parts for generating different patterns of nesting. Thus, the
nested pattern generated with any heuristic that considers
the parts in one particular sequence may not give out the
optimal utilization of sheet material.
In view of the above limitations with heuristic methods,
several researchers attempted to employ certain modern
heuristic approaches such as Articial Neural Networks
(ANN), Simulated Annealing (SA) and Genetic Algorithms
(GA) for nesting of 2-D parts in 2-D sheets. Jakobs [11]
employed a genetic and heuristic approach for nesting of
polygons, enclosed in rectangular modules, in a single
rectangular sheet. The heuristic algorithm arranges the

parts on the sheet at the bottom-left position by moving


them, in bottom-left-bottom direction, from the top-right
corner of the sheet. In this particular work, the GA gives
out the best sequence of parts for their optimal nesting in the
sheet. Similarly, Ramesh Babu and Ramesh Babu [15]
proposed a genetic and heuristic approach for the nesting
of multiple rectangular parts in multiple rectangular sheets
with a view to arrive at the optimal number of sheets
required for the nesting of the parts, apart from minimizing
the wastage of the sheet material. The heuristic, proposed in
this particular approach, identies the new possible positions for the next part, each time after the part is located
at the bottom-left position of the sheet. Hence, the parts can
reach interior regions existing in the previously nested area,
which can thus improve the utilization of the sheet material.
Han and Na [8] employed neural network and simulated
annealing (SA) techniques for nesting of multiple irregular
shaped parts in a single rectangular sheet. In this approach,
neural networks generate initial good layout by moving the
parts to the left and bottom position of the sheet and SA
improves this layout by translating, rotating and swapping
of the parts. Similarly, certain hybrid approaches, using
local heuristics and genetic algorithms, were proposed for
the nesting of irregular shaped parts in regular and irregular
sheets [2,6]. In all these approaches, the parts were arranged
very close to each other based on the geometry of the parts.
But, in practice, unanticipated geometry of the parts and
sheets may be expected, for each order of parts to be
produced. In such a situation, these geometry dependent
heuristics may not generate the optimal nested patterns.
In view of the above, attempts were made to represent the
geometry of the parts and sheets in discrete form, which
permits to consider any shape of the parts/sheets and then
to use genetic approaches for the nesting of 2-D parts in 2-D
sheets [9,10,14]. In these approaches, a limited number of
orientations of the parts were considered. Hence, they
cannot generate optimal nested patterns for irregular shaped
parts. Further, the nature of the discrete representation
scheme and the parts arrangement strategy adopted, in
these approaches, make the nesting process computationally
expensive. Moreover, these methods considered only a
single sheet for nesting of the multiple parts, thus leaving
a scope for developing nesting algorithms considering
different parts with different orientations and the sheets of
different geometry and quantity.
The proposed work focuses on developing effective and
geometry independent approach for nesting of multiple 2-D
complex parts in multiple 2-D complex sheets, considering
the parts with or without internal features and the sheets
with or without defective regions. The internal features
can vary from simple holes to cutouts of any geometry.
Similarly, the defective regions on the sheets can range
from simple to complex in their geometry. Both the parts
and sheets considered may comprise line and curvilinear
features. The parts and sheets are represented in discrete
form with novel integer coding to make the algorithm faster

A. Ramesh Babu, N. Ramesh Babu / Computer-Aided Design 33 (2001) 879891

in generating the nested pattern and to work independent of


the geometry of the parts and sheets. In order to handle the
above, the proposed approach attempts to employ both heuristic and genetic algorithms that can select the best sequence
of parts and sheets and arrange the parts in sheets utilizing
the sheet material optimally.
2. Methodology
The proposed method includes: (1) a heuristic algorithm
to arrange multiple 2-D shaped parts in multiple 2-D shaped
sheets, in a sequential manner, with bottom-left strategy, i.e.
parts are to be located at the bottom-left most acceptable
positions on the sheet; (2) a genetic algorithm to generate
the best sequence of sheets and parts along with their best
orientations, in order to produce the effective nested pattern
using the heuristic algorithm, with a view to minimize the
wastage of the sheet material. First, each 2-D part and sheet
is created in AutoCAD environment and their geometry is
interpreted using their DXF les. Then, the geometry of the
sheets and parts are converted into discrete form in order to
make the nesting process quick and independent of the
actual geometry of the sheets and parts. For the purpose
of arranging the parts in sheets, in a sequential manner,
each sheet and part is identied with an integer number
starting from one. These numbers are used by genetic algorithm in formulating the strings, containing the sequence of
sheets and parts. The sequence of sheets and parts given by
GA are used by heuristic algorithm to arrange the parts in
sheets with bottom-left positioning strategy. In this way,
both GA and heuristic algorithms interact with each other
to generate an optimal nested pattern utilizing the sheet
material optimally.
As the present work aims at developing an effective
approach for nesting of multiple 2-D parts in multiple 2-D
sheets, it is essential to represent them in a manner that aid
in generating the nested patterns quickly with the proposed
approach. For this purpose, the present work suggests a new
method of representing both the sheets and parts in a
discrete form with novel integer coding.
2.1. Representation of the geometry of parts and sheets
Though the proposed approach can consider the parts and
sheets of any geometry, the geometry of both the parts and
sheets is limited to have only straight line and curvilinear
features. These features can be either regular or irregular in
nature. Further, the parts may have certain internal features
and the sheets may contain certain defective regions. The
internal features in the parts may range from simple holes to
cutouts of complex geometry. The defective regions may
contain any geometry from simple to complex.
When the geometry of the part is rectangular, it can take
up any of the two orientations, i.e. 0 or 908. If the grain
orientation is the constraint, the rectangular part is not
allowed to rotate by 908. In contrast to the rectangular

881

parts, the irregular shaped parts with orthogonal edges can


take up any of the eight possible orientations. These orientations include the mirror images of the part about the x- and
y-axis, considering the part with both 0 and 908 rotations.
When the rotation of the part is restricted due to the grain
orientation constraint, only four mirror images are allowed
with zero degree rotation of the part. These orientations for
the rectangular parts and the orthogonal edged parts ensure
the orthogonal cutting of the nested parts, i.e. the cut takes
place parallel to the edges of the sheet.
In the case of the nesting of irregular shaped parts without
grain orientation constraint, it is essential to consider the
parts with all possible orientations in the range of 03608.
Apart from this, the part can be orientated with its mirror
images for each of its rotation angle. Fig. 1 shows a typical
example of an irregular shaped part and its eight possible
mirror images for the rotation angle of 108. In these eight
mirror images, the rst four are mirror images about the xand y-axis with the part's rotation angle considered as 108.
The next four are again mirror images about the x- and
y-axis when the part is rotated by 908, i.e. at 1008 rotation.
From this illustration, it is clear that these mirror images
include the rotation of the part at 1908(10 1 180) and
2808(10 1 270). Thus, it is sufcient to consider the rotation
of the part from 0 to 898 with its mirror images to cover the
entire range of rotation of parts from 0 to 3608.
Once the orientations of the parts are considered for nesting, it is necessary to represent the geometry of the parts and
sheets in such a way that the nesting process should work
independent of the geometry of the parts and sheets. The
method proposed to represent the geometry of the sheets and
parts in the discrete form is as follows.
Consider a rectangular, an orthogonal edged and an
irregular part, with a particular orientation, as shown in
Fig. 2(a). Since it is very difcult to consider any point on
the orthogonal/irregular shaped parts as the reference point
for arranging the parts on the sheet, these parts are enclosed
in an imaginary rectangle. Then, this imaginary rectangular
area is divided into a uniform grid of 1 mm 1 mm size as
shown in Fig. 2(a). Each element in the grid is referred to as
a pixel. A specic value is assigned to each pixel based on
its position with respect to the geometry of the part. The
value of a pixel is chosen to be `0' if the pixel lies on the part
either partially or completely. Otherwise, the value of the

Fig. 1. Different mirror images of an irregular shaped part with its rotation
at 108.

882

A. Ramesh Babu, N. Ramesh Babu / Computer-Aided Design 33 (2001) 879891

located on the sheet by means of the bottom-left positioning


heuristic, this particular assignment of numbers would help
to skip those many pixels indicated in the leftmost pixel
chosen by heuristic for placing the part on the sheet.
After dening the geometry of the sheets and parts in the
form of pixels, the nesting process will be carried out using
these pixel values.
2.2. Heuristic algorithm

Fig. 2. (a) Discrete representation of the parts enclosed in an imaginary


rectangle. (b) Discrete representation of the sheet enclosed in an imaginary
rectangle.

pixel is considered as a positive integer value, which starts


from one for the rightmost pixel and incremented by one as
it moves to the leftmost pixel of the rectangular enclosure.
For irregular shaped parts, the above representation procedure is followed for each angle of rotation.
To illustrate the representation of sheet geometry in the
form of pixels, consider an irregular sheet with two defective areas as shown in Fig. 2(b). This irregular sheet is
enclosed in an imaginary rectangle for the sake of obtaining
the reference points during the nesting process. Then, this
particular rectangular area is divided into a uniform grid of
1 mm 1 mm size. The manner in which the values for
pixels are assigned in the case of the sheet geometry is
quite different from that of the part geometry. In this case,
the value of a pixel is `0' when the material of the sheet
exists on the pixel completely. Otherwise, the value of the
pixel is considered as a positive integer value starting from
one at the rightmost pixel and proceeding to the left by
incrementing the value of each pixel by one.
The arrangement of any positive integer number to the
part or sheet represents the non-availability of the material
on the part and sheet. These numbers are assigned in the
direction from right to left on the part and sheet to ensure
quick location of the parts on the sheets. As the part is

To arrange the 2-D shaped parts with any particular orientation, on multiple 2-D sheets, with bottom-left positioning
strategy, the sheets and parts are considered in a sequential
manner. Fig. 3(a) shows the procedure followed by the
heuristic algorithm in arranging the parts on the sheet. This
procedure works based on the assumption that sufcient
number of sheets are available for the nesting of the given
parts and each part can t into at least one of the given sheets.
In order to position each part at the acceptable bottom-left
position on the sheet, the part should be located from the
bottom-left corner of the sheet. The bottom-left position
strategy ensures the arrangement of the parts in the space
available between the nested parts thus leading to close
arrangement of the parts in the sheets. For this purpose,
the staring position for each part is considered as the one
where the bottom-left corner of the imaginary rectangular
enclosure of the part coincides with the imaginary rectangular enclosure of the sheet. To arrange the parts on the
sheet, each part from its starting position moves along the
x-direction with an incremental movement at each and every
incremental position of one grid size (1 mm) in the y-direction of the sheet. This is done until the part is located on the
sheet at an acceptable position. An acceptable position of a
part on the sheet is indicated as the one where the part is
within the sheet boundary and does not overlap with the
parts nested previously. For any position of the part on
the sheet, the following scanning algorithm nds whether
the position of the part is acceptable or not.
2.3. Scanning technique
Fig. 3(b) shows the procedure adopted by the scanning
algorithm. For any position of the part on the sheet, the grid
of the part overlaps with a certain portion of the grid on the
sheet. The position of a part on the sheet is acceptable only if
all the pixels of the part with values of `0' matches exactly
with the pixels of the sheet with values of `0'. To identify
this, all the pixels of the part and pixels of the sheet in a
particular region where the part overlaps on the sheet, are
scanned. At this point, the positive values assigned to the
pixels on the part, which are incremented leftwards, help to
identify the position of the pixel on the part with `0' value
quickly. This avoids scanning of each pixel of the part and
reduces the scanning time.
The proposed heuristic approach moves each part
along the x-direction at every incremental distance in the
y-direction. The positive pixel values on the sheet, which are

A. Ramesh Babu, N. Ramesh Babu / Computer-Aided Design 33 (2001) 879891

883

Fig. 3. (a) Heuristic algorithm to arrange the parts on the sheet with bottom-left positioning strategy. (b) Scanning algorithm to identify the acceptance of the
position of a part for any location on the sheet.

incremented leftwards, help to skip the part along the


x-direction quickly, avoiding the tediousness involved in
its movement in incremental form of one pixel size every
time and thus arranges the parts in the sheets quickly. After
placing each part on the sheet, the values of the pixels on the
sheet are modied from `0' to positive values. The modication of these pixel values is based on the method that was
explained earlier for the initial representation of the sheet
geometry. The purpose of modifying the pixel values after
placing each part, in incremental form, is to reduce time for
scanning and arranging the parts on the sheet, as explained
earlier. Fig. 4 shows the arrangement of the parts (Fig. 2(a))
on the sheet (Fig. 2(b)) in a sequence of 1, 3, 2. After
placing these parts on the sheet, the values of the pixels are
modied and are shown in bold. The same procedure is
followed for placing all the parts on the sheet. If any part

Fig. 4. Values of the pixels on the sheet (Fig. 2(b)) after locating three parts
(Fig. 2(a)) in a sequence of part 1, part 3 and part 2.

884

A. Ramesh Babu, N. Ramesh Babu / Computer-Aided Design 33 (2001) 879891

Fig. 5. A typical genetic string for three sheets and ve parts.

does not nd a place on the sheet, it is placed on the next


sheet employing the same heuristic procedure.
By using the heuristic algorithm, different parts with
different orientations can be arranged on multiple sheets.
But, arranging the parts in multiple sheets utilizing the
sheet material optimally, it is essential to consider the best
sequence of the sheets and parts with the best orientation for
nesting. As this selection becomes computationally intensive with a complete enumeration algorithm, the present
work proposes to employ a genetic algorithm for generating
the best sequence of sheets and parts with the best orientations.
2.4. Genetic approach
As the genetic algorithm [3,7,17] (GA) attempts to give
out an optimal solution through several genetic operations
such as coding of the string, initial population, reproduction,
evaluation of the tness function, crossover and mutation,
the specic nature of these operations for the present work is
explained.
2.4.1. Coding of the string
As the genetic approach is to generate the best sequence
of the sheets and parts with their best orientations, the
genetic string contains the sequence of the sheets and
parts that are represented by integer numbers. In fact, the
rotation angle of a part is represented with a number in the
range of 0898, whereas the mirror image position is indicated with a number in the range of 18.
Fig. 5 shows an example of representing a string for three
sheets and ve parts. Here, the rst three numbers 3, 1, 2
represent the set of sheets considered. The next three
numbers 4, 30, 8 represent the fourth part with a 308
rotation angle and the eighth mirror image position. Similarly, the remaining numbers represent the other parts with
their rotation angle and mirror image positions, respectively. The part numbers 4, 1, 5, 2, 3 are shown in bolditalics which are considered in the same sequence for nesting them on the sheets considered above.
2.4.2. Initial population
As the size of the population strongly inuences the
search space and the time needed to obtain an optimal solution, the population size is considered equal to the length of

the string [17]. The initial population is generated randomly


using the random number generator.
2.4.3. Evaluation of the tness function
To evaluate the utilization of the sheet material, the total
area occupied by the parts, nested on the sheets, is considered. When the nested pattern occupies n number of sheets,
the total area of the nested pattern (A) is estimated by
A A1 1 A2 1 1 Ai 1 1 An21 1 Pn
where Ai is the area of the ith sheet i 1; 2; 3; ; n 2 1
and Pn the area of the nth sheet up to the length of the nested
pattern.
The tness function for any string represents the effectiveness of the string in utilizing the sheet material. Among
the patterns generated with GA, the nested pattern that occupies the minimum total area (A) can be considered as the one
with a higher tness value. During the genetic process, the
strings with higher tness values will survive and those with
lower tness value will die satisfying the survival of ttest
principle in GA.
2.4.4. Reproduction population a tournament selection
The main purpose of reproduction is to preserve the good
string in the population. In other words, the reproduction
population should contain more strings with high tness
values. In the present work, the tournament selection
process that chooses the strings considering their actual
tness values is used [7]. In fact, the tournament selection
for reproduction gives higher priority to the strings with
higher tness values. In this procedure, the rst half of the
reproduction population is lled with the copies of the string
with highest tness value in the initial population. In the
remaining population, half of it is lled with the string
having the next higher tness value. The same procedure
is repeated until the entire reproduction population is
obtained. After the reproduction operation, each string in
the reproduction is subjected to crossover operation.
2.4.5. Crossover
Each string in the reproduction population is subjected to
crossover with the probability of crossover (pc). Fig. 6
illustrates the crossover operation for two strings, i.e.
parent 1 and parent 2, which are chosen for the purpose of
crossover. By choosing two random sites in which one falls

A. Ramesh Babu, N. Ramesh Babu / Computer-Aided Design 33 (2001) 879891

in the sequence of the sheets and the other one in the


sequence of the parts, the crossover operation is performed.
In this operation, the elements, right side to the rst and
second crossover site of parent 1, are copied into the beginning of the offspring. In Fig. 6, step 1 shows the offspring
generated after copying the sheet numbers 1 and 2 that are
the right sides to the site 1 of parent 1. Similarly, step 2
shows the new positions of the part numbers with their
orientations that are present in the right side to the second
crossover site of parent 1. The remaining empty positions in
the offspring (step 2) are lled with the elements considered
from the parent 2 in the same sequence as they appear but
not considered already. In this way, the offspring are
generated for each string in the reproduction population.
2.4.6. Mutation
As the crossover operation changes only the sequence in
which the sheets and parts are considered for nesting, it is
necessary to change the orientation, i.e. rotation and mirror
image position of the part, for obtaining the best orientation
of the parts in order to utilize the sheet material effectively.
Hence, this could be achieved by means of the mutation
operation that modies the orientation of the parts apart
from changing the sequence of the parts and sheets. This
operation also considers the grain orientation constraint
imposed by the parts during the nesting. In this work,
three mutation operators are introduced for: (1) modifying
the sequence of the sheets and parts by means of the rst
mutation operator; (2) changing the mirror image position of
the parts by the second mutation operator; and (3) changing
the rotation angle of the parts by the third mutation operator.
With the probability of mutation (pm), each string in the
reproduction population is subjected to the rst mutation
operation and each part in the string is subjected to the

885

Fig. 6. Crossover operation to change the sequence of the sheets and parts
without disturbing the orientation of the parts.

second and third mutation operations depending on the


shape of the part and grain orientation constraint.
2.4.6.1. Mutation 1. In this operation, to modify the position of
the parts and sheets in the string, the string is subjected to
mutation operation with the probability of mutation (pm)
obtained from the adaptive probability selection procedure.
For this purpose, two random positions (Fig. 7(a)) in the
sequence of sheets as well as in the sequence of parts are
considered. By means of interchanging the location of the
sheets and parts, the sequence of sheets and parts in the
nesting process is changed. However, it does not disturb the
orientation of the parts.
2.4.6.2. Mutation 2. To modify the mirror image position of
certain parts in the string, the second mutation operator
considers the parts for mutation with the probability of
mutation (pm), chosen from the adaptive probability
selection procedure. For this purpose, a random number in
the range of 01 is generated. If this random number is less
than or equal to the probability of mutation, then the part is

Fig. 7. Mutation operation to: (a) interchange the position of two sheets and parts separately; (b) modify the mirror image position of the parts; and (c) modify
the angle of rotation of the parts.

886

A. Ramesh Babu, N. Ramesh Babu / Computer-Aided Design 33 (2001) 879891

subjected to mutation by changing its mirror image position


to any other position assigned by a random number
generated within the permissible range, i.e. 18. In
Fig. 7(b), the modied mirror image positions of part 5,
part 3 and part 4 are indicated as 6, 1, 5 from their
original positions of 3, 7 and 1.

the population. In order to provide the lower values of pc and


pm for higher tness strings and higher values of pc and pm
for lower tness strings, the expressions are modied as
follows:

2.4.6.3. Mutation 3. To change the rotation angle of each


part in the string by considering the probability of mutation,
a random number in the range of 089 is generated. Fig. 7(c)
shows the modied rotation angles of 70 and 208 for parts 1
and 3 from their initial orientations of 50 and 458,
respectively.
As the probabilities of crossover and mutation strongly
inuence the time required for converging the problem to
the nal stage and varying from problem to problem, it is
very difcult to x up the values for these probabilities.
Hence, the present work considers the probability of
crossover (pc) and the probability of mutation (pm) adaptively [19] based on the tness values of the string. As
indicated above, the purpose of crossover and mutation is
to generate a set of new strings with the help of crossover
and mutation operators. In other words, these operators
disturb the strings in the reproduction population. Generally, the reproduction population always contains the
strings of higher tness values. Hence, the disturbance
of strings, having higher tness values may not improve
their tness values further due to the fact that those strings
might have already attained the global optimum. Thus, it
may be futile to subject these strings for further crossover
and mutation, and generating the nested pattern using the
heuristic algorithm. So, the probability of crossover and
mutation are chosen proportional to the tness value of
each string. The strings with higher tness values are
subjected to crossover and mutation with low probabilities, and the strings with lower tness values are
subjected to crossover and mutation with higher probabilities. Hence, the relative tness values of the strings in the
population inuence the values of pc and pm.
When there is a variation in the tness values of the
strings in the population, it is treated as a problem that
does not converge to global/local optimum. If the tness
value of all strings is equal, the problem has either reached
to the global optimum or entrapped at the local optimum.
One possible way of detecting the convergence is to observe
the average tness value ( fave) of the population in relation
to the maximum tness value ( fmax) of the population. fmax 2
fave is likely to be less for a population that has converged
than for a population that is scattered. Hence, the pc and pm
have to be increased inversely with fmax 2 fave as follows:

pm fmax 2 fi = fmax 2 fave :

pc 1= fmax 2 fave ;

pc fmax 2 fi = fmax 2 fave ;

From the above expressions, two cases can be observed:


Case 1:
if fmax 2 fave . 0 and=or fave # fi

pc fmax 2 fi = fmax 2 fave


pm fmax 2 fi = fmax 2 fave

Case 2:
if fave fmax and=or fave . fi

p c k1
p m k2

where fi is the tness value of the ith string, fmax the maximum tness value in the population, fave the average tness
value of the population, and k1 and k2 are random numbers in
the range of 01.
By subjecting each string in the reproduction population
to crossover and mutation operations by choosing the above
probabilities, a new population is obtained. For each string
in this new population, the tness values are evaluated after
arranging the parts on the sheet by employing the proposed
heuristic method. Then, the initial population is treated as
the old population and the strings with low tness values in
the old population are replaced by the strings with high
tness values in the new population. The entire process is
treated as one generation. The next generation starts with
reproduction again. To arrive at an optimal solution, the
entire genetic process will be repeated for a certain number
of generations. Since the number of generations, after which
optimal/near solution is expected, varies with the number of
parts and sheets and the geometry of the parts and sheets, it
is very difcult to set any xed number of generations. Thus,
in the present work, the complete genetic process is repeated
until there is no improvement in the solution for 25 consecutive generations. Based on observations and experience,
the above value of 25 has been set. This is a more appropriate strategy to automatically terminate the genetic
process when the convergence nature of the algorithm is
slow. This strategy denitely ensures optimal/near optimal
solution quickly irrespective of the geometry of parts and
sheets, their quantity, population size, etc. At the end of the
genetic process, the string that gives out the best pattern of
nesting with maximum utilization of the sheet material is
considered as an optimal or near optimal solution.

pm 1= fmax 2 fave :

3. Results and discussion

The above expressions give the values of pc and pm independent of the individual tness values ( fi) of the strings in

The generic nature of the proposed approach is


demonstrated by considering the nesting of: (a) different

A. Ramesh Babu, N. Ramesh Babu / Computer-Aided Design 33 (2001) 879891

887

Table 1
Different rectangular shaped parts considered for nesting
Part number

Size (mm mm)

Part number

Size (mm mm)

Part number

Size (mm mm)

1
2
3
4
5
6
7

10 15
15 10
25 10
10 15
35 10
10 30
20 10

8
9
10
11
12
13
14

15 10
25 20
20 10
35 15
5 20
10 5
5 15

15
16
17
18
19
20

25 5
15 35
10 25
35 10
10 30
5 20

rectangular parts in a single rectangular sheet and multiple


rectangular sheets; (b) different orthogonal edged parts in a
single rectangular sheet and multiple orthogonal edged
sheets; and (c) a variety of irregular parts in a single irregular sheet and multiple irregular sheets. For the purpose of
demonstrating its effectiveness, different approaches
proposed by Jakobs [11], Ramesh Babu and Ramesh Babu
[15], and Jain and Chang [10] were considered. In fact, each
of these approaches is suited for nesting of the rectangular
parts in a single rectangular sheet, single and multiple
rectangular sheets and orthogonal edged parts in a single
rectangular sheet, respectively. This sort of comparison is
justied since none of the hybrid approaches, employing
modern heuristics, can handle the nesting of a variety of
parts in a variety of sheets.
For the purpose of comparison, all these approaches are
developed using C11 programming language and implemented on the same platform, i.e. 333 MHz Pentium II

processor PC with 128 MB RAM with Windows NT operating system.


Table 1 shows different sizes of rectangular parts considered for nesting them in a rectangular sheet of
80 mm 200 mm. The sizes of these rectangular parts are
chosen in such a way that they exactly t into a rectangular
pattern of 80 mm 60 mm in the sheet considered. In
Table 2, the results obtained with the three different
approaches are presented. Different parameters such as the
height of the pattern generated, the percentage utilization of
the sheet material and the CPU time taken, after several
generations, are considered for evaluating these approaches.
Apart from these, another important parameter, i.e. the
number of times the heuristic algorithm was executed to
generate different patterns, during several generations, is
also estimated. This particular parameter aids in assessing
the effectiveness of the heuristic in generating the nested
pattern quickly.

Table 2
Performance evaluation of different approaches for the nesting of different rectangular parts in a single rectangular sheet
Number of rectangular parts 20 (Table 1); sheet size 80 mm 200 mm; optimal pattern height 60 mm
Jakobs approach [11]
Pattern number
Number of generations
Height of the pattern (mm)
% Utilization (rectangular boundary)
CPU time (s)
Number of times heuristic executed
Approximate number of patterns per second
Ramesh Babu and Ramesh Babu approach [15]
Pattern number
Number of generations
Height of the pattern (mm)
% Utilization (rectangular boundary)
CPU time
Number of times heuristic executed
Approximate number of patterns per second
Proposed generic approach
Pattern number
Number of generations
Height of the pattern (mm)
% Utilization (irregular boundary)
CPU time (s)
Number of times heuristic executed
Approximate number of patterns per second

1
1
100
60
,1
21

1
1
70
85.7
,1s
44

1
1
65
96
4
118
29.5

2
10
95
63.1
,1
30

2
10
65
92.3
,1s
242

2
10
65
99.48
21
804
38.2

3
100
80
75
1
120
120

4
200
75
80
2
320
160

3
261
60
100
7s
5764
823.4
3
50
65
100
122
4726
38.7

4
4237
60
100
10492
407,931
38.8

5
2,500,000
65
92.3
18,353
2,500,020
136.2

888

A. Ramesh Babu, N. Ramesh Babu / Computer-Aided Design 33 (2001) 879891

Table 3
Performance evaluation of different approaches for nesting of different orthogonal edged parts in a single rectangular sheet
Number of orthogonal edged parts 14; sheet size 40 mm 60 mm; optimum pattern height 20 mm
Method

Pattern
Number of generations
Pattern size (mm mm)
% Utilization
CPU time
Number of times
heuristic executed
Approximate number of
patterns per second

Proposed generic approach

Jain and Chang approach [11]

A
1
40 20
100
2s
43

B1
1
25 45
71.1
21 s
28

B2
10
25 40
80
3 min 32 s
154

B3
20
20 45
88.8
7 min 25 s
295

B4
100
20 40
100
34 min 6 s
1414

21.5

1.33

0.73

0.66

0.69

From the results presented in Table 2, it can be seen that


both the proposed approach and Ramesh Babu and Ramesh
Babu [15] approach generated an optimal solution by arranging the parts to a height of 60 mm in the sheet. But, the
Jakobs [11] approach could not generate the optimal solution even after 18,353 s, i.e. 5 h 5 min 53 s of CPU time.
This can be attributed to the nature of heuristic, i.e. bottomleft positioning heuristic, adopted in the above two
approaches that can position the parts in between the nested
parts. However, the heuristic adopted in the Jakobs
approach does not have this capability. From Table 2, the
optimal solution can be seen in terms of both the height of
the pattern and the percentage utilization. Percentage utilization is the ratio of the total area of the parts to the area of
the boundary enclosing the nested parts.
To generate the optimal pattern, the generic approach
took more time than the approach by Ramesh Babu and
Ramesh Babu [15]. This can be clearly seen from the
number of patterns generated per unit time with different
approaches. The generic approach produced lesser number
of patterns, i.e. approximately 39 patterns per second in
contrast to 823 patterns per second with the Ramesh Babu
and Ramesh Babu [15] approach and 136 patterns per
second with the Jakobs [11] approach. With all these hybrid
approaches, a certain variation is seen in the number of
patterns generated per second over several generations,

Fig. 8. Arrangement of different orthogonal edged parts in a single rectangular sheet with the proposed approach (Pattern A) and the Jain and Chang
[10] approach (Patterns B1B4).

which can be attributed to the randomness involved in


generating the patterns with each of these approaches.
Further, the scheme adopted for representing the parts and
sheets and scanning technique employed for positioning the
parts on the sheet is responsible for higher CPU time
requirement in the generic approach.
To demonstrate the effectiveness of the generic approach
for the nesting of the orthogonal edged parts in a rectangular
sheet, 14 orthogonal edged parts of three varieties are considered for nesting them in a single rectangular sheet of
40 mm 60 mm. These parts are considered in such a way
that they can t into a sheet of 40 mm 20 mm. The results
obtained with this approach are compared to those obtained
with the Jain and Chang [10] approach, which is suited for
arranging the orthogonal edged parts in a rectangular pattern.
Table 3 presents the results in terms of the size of the pattern
generated, the percentage utilization of the sheet material and
the CPU time taken in generating the patterns. The analysis of
the results indicates that the proposed approach generated an
optimal pattern in 2 s. In contrast to this, the Jain and Chang
[10] approach generated the optimal pattern after 34 min 6 s.
Further, it can be seen that the proposed approach generated
more number of patterns per second. The fast nature of the
generic approach can be attributed to the nature of the discrete
representation scheme adopted in it when compared to the
scheme adopted in the Jain and Chang [10] approach that
can take considerably more time in positioning the parts on
the sheet. This can be clearly seen from the number of patterns
generated with the generic approach, i.e. approximately 22
patterns per second over those generated with the Jain and
Chang [10] approach, i.e. approximately one generation per
second.
Fig. 8 shows the arrangement of different parts on the
sheet with both the approaches. In the case of the proposed
approach, the parts were arranged in a given sheet to a
height of 20 mm. But, the Jain and Chang [10] approach
arranged them in different rectangular patterns thus showing
its limitation in arranging the parts in any given sheet. This
particular feature of the generic approach would help one to
arrange the given set of parts in a given sheet.

A. Ramesh Babu, N. Ramesh Babu / Computer-Aided Design 33 (2001) 879891

889

Fig. 9. Arrangement of multiple rectangular parts in multiple rectangular sheets.

As explained earlier, the proposed generic approach is


capable of arranging a variety of parts in multiple sheets.
This is illustrated by considering the arrangement of different rectangular parts in multiple rectangular sheets, multiple
orthogonal edged parts in multiple orthogonal edged sheets
and a number of complex parts in complex sheets of different degrees of complexity.
Fig. 9 shows the arrangement of 60 different rectangular
parts in six different rectangular sheets with the proposed
approach. These results are obtained after 50 generations
utilizing a CPU time of 31 min 48 s. Similarly, the arrangement of 50 orthogonal edged parts in four orthogonal edged
sheets, obtained after 50 generations utilizing 32 min 42 s of
CPU time, is shown in Fig. 10. These results clearly indicate
the exible nature of the present approach in handling a
variety of parts and sheets.
In order to illustrate the most complex and interesting application of the proposed approach for the nesting of different
complex parts in different complex sheets, 150 parts of 15
varieties with certain internal features are considered for nest-

ing them in 10 sheets having different irregular boundaries and


defective regions. In Fig. 11, the arrangement of these parts in
four different sheets, in the order of sheet numbers 1, 6, 7 and
10, are shown along with the percentage utilization of the sheet
material. These results are obtained after 25 consecutive
generations in which there is no improvement in the tness
value of strings in the population. From this particular arrangement of the parts in the sheets, one can see the nature of the
genetic algorithm in selecting the sheets with a lower degree of
irregularities. This is due to the fact that irregular parts cannot
be accommodated easily in highly irregular regions. From the
results shown in Fig. 11, it can be noticed that the present
approach can utilize the smaller defective regions effectively
by positioning the parts with internal features (holes/cutouts)
over the defective regions on the sheet (marked as A on sheet
number 1). Similarly, it can also accommodate smaller parts
within larger internal features of another part (marked as B on
sheet number 6). The arrangement of three parts with rectangular boundaries at the bottom-left corner of the 10th sheet
clearly indicates that the generic approach ensures the alignment of these parts to one vertical edge of the sheet, even
though these parts can be rotated freely during the nesting
process.
Fig. 12 shows the arrangement of certain artistic shapes
with irregular geometry in a sheet of irregular boundary.
From the pattern shown, it is clear that the proposed
approach can position the parts on the sheet by retaining
any particular orientation desired for producing these parts
from the sheet considering the grain orientation constraint.
From the above results, it is clear that the proposed
generic approach is suitable for nesting a variety of parts
in a variety of sheets quickly and effectively. Moreover, this
approach offers a greater exibility in considering different
types of parts for arranging them in different types of sheets
in any desired manner.
4. Conclusions

Fig. 10. Arrangement of multiple orthogonal edged parts in multiple orthogonal edged sheets.

In the proposed approach, both the genetic and heuristic


algorithms were used to arrange multiple 2-D shaped parts

890

A. Ramesh Babu, N. Ramesh Babu / Computer-Aided Design 33 (2001) 879891

Fig. 11. Nested pattern generated on multiple 2-D sheets for multiple 2-D parts (number of parts 150, variety of parts 15).

in multiple 2-D shaped sheets with the objective of minimizing the wastage of the sheet material. With the method
proposed for representing the geometry of the sheets and
parts in discrete form, the nesting process is carried out
quickly irrespective of the complexity in the geometry of
the sheets and parts. The proposed heuristic algorithm, using
the bottom-left positioning strategy, arranges the parts, with
their orientations, on the sheets, in an effective manner.
With the help of the genetic algorithm, the best sequence
of the sheets and parts with their orientations can be
obtained for nesting the parts in an optimal manner. In the
genetic process, the crossover operator generates a new
sequence of the sheets and parts without disturbing the
orientation of the parts in strings. However, the mutation
helps to change the orientation of the parts selectively

depending on their shape and grain orientation constraint.


Comparison of the results obtained with the present
approach to those obtained with the Jakobs [11], Ramesh
Babu and Ramesh Babu [15], and Jain and Chang [10]
approaches clearly indicated the effectiveness of the
proposed approach in terms of optimal utilization of the
sheet material and reduction in computational time. By
means of several illustrations, the generic nature of the
proposed approach in handling a variety of parts, ranging
from a rectangular shape to a highly irregular shape for
nesting them in sheets of simple to complex geometry, is
demonstrated.
Although the present work considered the geometry of
parts and sheets with line and arc features, the discrete
representation scheme adopted in this approach can easily

A. Ramesh Babu, N. Ramesh Babu / Computer-Aided Design 33 (2001) 879891

Fig. 12. Arrangement of irregular shaped parts with grain orientation


restriction in an irregular sheet (number of parts 20, percentage of
sheet utilization 66.6, CPU time 2 min 30 s).

incorporate free-form features for the parts and sheets.


Further, the computational complexity of the proposed
approach can be reduced with the help of parallel processing
algorithms.

[12] Lamousin H, Waggenspack WN. Nesting of complex 2-D parts


within irregular boundaries. Trans ASME, J Manuf Sci Engng
1996;118:61522.
[13] Lamousin H, Waggenspack WN. Nesting of two-dimensional irregular parts using a shape reasoning heuristic. Comput-Aided Des
1997;29(3):22138.
[14] Ramesh Babu A, Ramesh Babu N. A genetic approach for nesting of
two-dimensional complex parts. The 14th International Conference
on CAD/CAM, Robotics and Factories of the Future, PSG, Coimbatore, India, December 1998. p. 38794.
[15] Ramesh Babu A, Ramesh Babu N. Effective nesting of rectangular
parts in multiple rectangular sheets using genetic and heuristic algorithms. Int J Prod Res 1999;37(7):162543.
[16] Reda MS, Abd EA. An interactive technique for the cutting stock
problem with multiple objects. Eur J Oper Res 1994;78:30417.
[17] Reeves CR. Modern heuristic techniques for combinatorial problems.
Oxford: Blackwell, 1993.
[18] Shpitalni M, Manevich V. Optimal orthogonal subdivision of rectangular sheets. Trans ASME, J Manuf Sci Engng 1996;118:2818.
[19] Srinivas M, Patnaik LM. Adaptive probabilities of crossover and
mutation in genetic algorithms. IEEE Trans Systems, Man, Cybernetics 1994;24(4):65667.
[20] Whelan PF, Batchelor BG. Development of a vision system for the
exible packing of random shapes. Machine Vision Appl, Architect
Sys Integration, Proc SPIE 1992;1823:22332.
[21] Yanasse HH, Zinober ASI, Harris RG. Two-dimensional cutting stock
with multiple stock sizes. J Oper Res Soc 1991;42(8):67383.

References
[1] Beasley JE. Algorithms for unconstrained two-dimensional guillotine
cutting. J Oper Res Soc 1985;36(4):297306.
[2] Bounsaythip C, Maouche S. Irregular shape nesting and placing with
evolutionary approach. IEEE International Conference on Systems,
Man, and Cybernetics, Orlando, USA, vol. 4, 1997. p. 342530.
[3] Chambers L. Practical handbook of genetic algorithms. Boca Raton,
FL: CRC Press, 1995.
[4] Cheng SK, Rao KP. Quick and precise clustering of arbitrarily shaped
at patterns based on stringy effect. Comput Ind Engng
1997;33(34):4858.
[5] Farley AA. Mathematical programming models for cutting-stock
problems in the clothing industry. J Oper Res Soc 1988;39(1):4153.
[6] Fujita K, Akagi S, Hirokawa N. Hybrid approach for optimal nesting
using a genetic algorithm and a local minimization algorithm. Proceedings of the 1993 ASME Design Automation Conference, Albuquerque,
New Mexico, USA, vol. 65(1), September 1993. p. 47784.
[7] Goldberg DE. Genetic algorithms in search, optimization, and
machine learning. Reading, MA: Addition-Wesley, 1989.
[8] Han G-C, Na S-J. Two-stage approach for nesting in two-dimensional
cutting problems using neural network and simulated annealing. Proc
Inst Mech Engrs, J Engng Manuf 1996;210:50919.
[9] Ismail HS, Hon KKB. The nesting of two-dimensional shapes using
genetic algorithms. Proc Inst Mech Engrs, J Engng Manuf
1995;209:11524.
[10] Jain S, Chang HG. Two-dimensional packing problems using genetic
algorithms. Engng Comput 1998;14:20613.
[11] Jakobs S. On genetic algorithms for the packing of polygons. Eur J
Oper Res 1996;88:16581.

891

Articial Neural Networks.

A. Ramesh Babu is a doctoral student in


the Department of Mechanical Engineering, Indian Institute of Technology,
Madras, India. He received his Bachelor
of Engineering (BE) degree in Mechanical
Engineering in 1992 from the Osmania
University, Hyderabad, India; Master of
Technology (MTech) degree in Production
Engineering in 1995 from the University
of Mysore, India. His research interests
include
CAD/CAM/CAE,
Computer
Aided Process Planning, Computer Aided
Inspection, Articial Intelligence Techniques Genetic Algorithms, Fuzzy Logic,

N. Ramesh Babu is an Associate Professor


in the Department of Mechanical Engineering, Indian Institute of Technology,
Madras, India. He received his Bachelor
of Technology (BTech) degree with distinction in 1978 from the Jawaharlal Nehru
Technological University, Hyderabad;
Master of Engineering (ME) degree in
Mechanical Engineering in 1980 from the
Indian Institute of Science, Bangalore; and
Doctor of Philosophy in 1989 from the
Indian Institute of Technology, Madras.
His current research interests are in the
area of manufacturing processes, modelling
and simulation of manufacturing processes
and systems, computer aided manufacturing, applications of Articial Intelligence techniques in manufacturing. He
has published more than 50 papers in refereed journals and conference
proceedings.

You might also like