two‐stage approach for nesting in two‐dimensional cutting problems using neural network and...

12
http://pib.sagepub.com/ Manufacture Engineers, Part B: Journal of Engineering Proceedings of the Institution of Mechanical http://pib.sagepub.com/content/210/6/509 The online version of this article can be found at: DOI: 10.1243/PIME_PROC_1996_210_150_02 1996 210: 509 Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture G-C Han and S-J Na Simulated Annealing Two-Stage Approach for Nesting in Two-Dimensional Cutting Problems Using Neural Network and Published by: http://www.sagepublications.com On behalf of: Institution of Mechanical Engineers can be found at: Manufacture Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Additional services and information for http://pib.sagepub.com/cgi/alerts Email Alerts: http://pib.sagepub.com/subscriptions Subscriptions: http://www.sagepub.com/journalsReprints.nav Reprints: http://www.sagepub.com/journalsPermissions.nav Permissions: http://pib.sagepub.com/content/210/6/509.refs.html Citations: What is This? - Dec 1, 1996 Version of Record >> at UNIV OF VIRGINIA on May 31, 2014 pib.sagepub.com Downloaded from at UNIV OF VIRGINIA on May 31, 2014 pib.sagepub.com Downloaded from

Upload: sj

Post on 25-Dec-2016

216 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Two‐stage approach for nesting in two‐dimensional cutting problems using neural network and simulated annealing

http://pib.sagepub.com/Manufacture

Engineers, Part B: Journal of Engineering Proceedings of the Institution of Mechanical

http://pib.sagepub.com/content/210/6/509The online version of this article can be found at:

 DOI: 10.1243/PIME_PROC_1996_210_150_02

1996 210: 509Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering ManufactureG-C Han and S-J Na

Simulated AnnealingTwo-Stage Approach for Nesting in Two-Dimensional Cutting Problems Using Neural Network and

  

Published by:

http://www.sagepublications.com

On behalf of: 

  Institution of Mechanical Engineers

can be found at:ManufactureProceedings of the Institution of Mechanical Engineers, Part B: Journal of EngineeringAdditional services and information for

   

  http://pib.sagepub.com/cgi/alertsEmail Alerts:

 

http://pib.sagepub.com/subscriptionsSubscriptions:  

http://www.sagepub.com/journalsReprints.navReprints:  

http://www.sagepub.com/journalsPermissions.navPermissions:  

http://pib.sagepub.com/content/210/6/509.refs.htmlCitations:  

What is This? 

- Dec 1, 1996Version of Record >>

at UNIV OF VIRGINIA on May 31, 2014pib.sagepub.comDownloaded from at UNIV OF VIRGINIA on May 31, 2014pib.sagepub.comDownloaded from

Page 2: Two‐stage approach for nesting in two‐dimensional cutting problems using neural network and simulated annealing

509

Two-stage approach for nesting in two-dimensional cutting problems using neural network and simulated

~~

annealing

C-C Han, MSc and S-J Na, Dr Ing Department of Precision Engineering and Mechatronin, Korea Advanced Institute of Science and Technology, Taejon, Korea

Nesting of two-dimensional patterns on a given raw sheet has applications in a number of industries. It is a common problem oftenfaced by designers in the shipbuilding, garment making, blanking die design, glass and wood industries. This paper presents a new two-stage layout approach for nesting two-dimensional patterns by using the self-organization assisted layout and simulated annealing. The proposed nesting approach consists of two stages: initial layout stage and layout improvement stage. This heuristic algorithm generates a 'good' initial layout by using the self-organization assisted layout (SOAL) algorithm and then improves the layout by using the simulated annealing ( S A ) algorithm. Some examples are treated for showing the effectiveness of this approach in nesting the two- dimensional irregular patterns with and without holes.

Key words: nesting, neural networks, self-organization assisted layout algorithm, simulated annealing algorithm, initial layout, layout improvement

hPi, k 7 h P j , I

iTEMP

m

N

nLIMIT NE,

nOVER

NOTATION

area of pattern Pi cost function, which assigns a real number x and y components of movement vector cluster cost total overlap area among patterns in cost function holes of the patterns Pi and Pi respec- tively number of times by which the anneal- ing is performed weighting exponent of fuzzy member- ship total number of patterns neighbourhood of a pattern at time t maximum number of new solutions to be accepted at each temperature maximum number of solutions evalu- ated at each temperature overlap area between two smallest rec- tangular boundaries (SRB) net overlap area between patterns Pi and Pj an arbitrary ith pattern nearest pattern from input vector configuration space, set of all possible layouts iteration limit amount of fuzziness x and y coordinates of reference point of pattern Pi, where ( w l i , wzi) =

x and y coordinates of an arbitrary input vector at time f

(xr(Pi), Yr(Pi) 1

The M S was received on 4 March 1995 and was accepted for publication on 28 March 19%.

801595 @ IMechE 1996

X configuration vector, giving the coor- dinate of all patterns in an arbitrary layout finite increment in position update of pat terns cooling rate parameter ( y < 1) small positive numbers as the stop cri- terion learning rate for pattern Pi

ak

Y Ell 1 Es

'li

1 INTRODUCTION

For a number of industries, material saving is one of the most important factors to be considered, and it is well known that a well-nested pattern layout can result in a substantial saving of the resource sheet. Although each industry requires different functional constraints due to its own characteristics, one common goal is to minimize the wastage of resource sheets by finding the most desir- able layout of patterns.

During the last twenty years, a number of nesting methods have been developed, ranging from a semi- automatic to a fully automatic computer nesting. In semi-automatic methods, the nesting is carried out by using an interactive graphics device. The operator can translate and rotate the patterns on the screen by using an appropriate input device. During the nesting process, the computer continuously checks the possible errors such as overlapping and calculates the amount of material wastage. In most methods developed for auto- matic nesting, the computational time has proved to be very large. In recent years, a number of successful nesting approaches have been developed using the heu- ristic algorithms, and due to their application potential several commercial CAD/CAM (computer aided design/ manufacture) packages include a nesting module for solving the layout problem.

Generally, the nesting of two-dimensional patterns is divided into the rectangular and irregular pattern layout. Most of the layout techniques reported in earlier

Proc Instn Mech Engrs Vol 210

at UNIV OF VIRGINIA on May 31, 2014pib.sagepub.comDownloaded from

Page 3: Two‐stage approach for nesting in two‐dimensional cutting problems using neural network and simulated annealing

510 G-C HAN AND S-J NA

literature have concentrated on the nesting of rectangu- lar patterns or rectangular modules. In investigations of the rectangular layout and cutting stock problem, con- siderable work has been done since the papers were published by Gilmore and Gomory (1, 2). They solved one-, two- and three-dimensional cutting stock prob- lems by using a linear programming technique and knapsack functions. Herz (3) solved the multi-stage guil- lotine cutting problem through a recursive search algo- rithm which showed an improvement over the exhaustive iterative approach. Adamowicz and Albano (4) proposed a heuristic algorithm to obtain a near- optimal solution of rectangular cutting stock problems. The algorithm employs a two-stage approach: the first stage, where a number of rectangles are formed into strips, and the second stage, where the optimal layout of the strips is obtained using a dynamic programming algorithm. Christofides and Whitlock (5) solved a two- dimensional cutting stock problem using a tree search algorithm based on dynamic programming. Madsen (6) solved a cutting problem for the glass industry using a near-optimal double one-dimensional knapsack pro- cedure and ordered step-off algorithm (2).

In investigations of the layout problem of irregular patterns, Adamowicz and Albano (7) proposed a two- stage approach. The first stage is concerned with producing the optimal rectangular enclosures, called modules, for the irregular patterns and also for various clusterings of the patterns. The second stage searches for an optimal layout of the modules on the rectangular sheet. Albano (8) presented a method improved from his previous work (7). The method is organized in such a way that first a tentative solution is automatically gen- erated through a combination of heuristic and dynamic programming techniques and then interactive improve- ments are allowed by a conversational display unit. Albano and Sapuppo (9) presented an automatic approach using a heuristic search method typical of the artificial intelligence discipline. In their study the alloca- tion problem was transformed into a problem of finding an optimal path. Nee (10) solved the blank layout problem for the metal stamping process using a heuris- tic algorithm. Nee et al. (11) solved the problem of nesting the irregular shapes with and without boundary constraints. The method includes the approximate shaping routine, pairwise clustering routine and rec- tangular packing routine.

An important problem making the layout difficult to handle is that the computation time required to obtain an optimal solution increases exponentially as the number of patterns (NP) increases. The layout problems are known to be N P complete, and consequently cannot be solved exactly in polynomial time. Additionally, there are many constraints in the actual problem which are usually difficult and not feasible to be incorporated mathematically. Because of these reasons, a number of researchers have, until now, investigated various heuris- tic search methods which do not use the optimizing technique but use the heuristic information obtained through experiences and near-optimizing techniques.

Recent advances in artificial neural network research provide the new techniques for pattern recognition, optimization problems and other applications. In very large scale integration (VLSI) and printed circuit board (PCB) layout designs, impressive results were obtained Part B: Journal of Engineering Manufacture

by applying the neural network. Sriram and Kang (12) introduced a modified Hopfield network for the two- dimensional module placement problem. Zhang and Mlynski (13) proposed a placement algorithm using the topology mapping property of the neural model sug- gested by Kohonen (14). Kim and Kyung (15) presented an algorithm called the self-organization assisted place- ment (SOAP) for circuit placement in the region with an arbitrary shape, which is also based on the learning algorithm proposed by Kohonen.

The simulated annealing (SA) algorithm and the genetic algorithm (GA) have recently been developed for the solution of optimization problems. They are general combinatorial optimization techniques which adopt the probabilistic hill-climbing method and are well suited to problems with a large search space. The simulated annealing (SA) technique proposed by Kirk- patrick et al. (16) has been applied for the standard cell placement problem (17), machine layout problem (18) and two-dimensional nesting problem (19, 20). Down- sland (21) experimented with the SA algorithm on the two-dimensional packing problem and described the appropriate neighbourhood structure to be used and the best parameters to be applied. The GA formulations for the two-dimensional nesting problem have been recently reported by Ismail and Hon (22) and Fujita et al. (23). Fujita et al. proposed a hybrid approach com- bining a GA and a local minimization algorithm for hard nesting problems.

Two main heuristic nesting algorithms described in this paper are the SOAL (self-organization assisted layout) and SA algorithms. The SOAL process is based on the learning algorithm of the neural networks pro- posed by Kohonen (14), called the self-organization algorithm, and uses the fuzzy membership values from the fuzzy c-means (FCM) as the learning rates (24). For a high-quality solution, the SA process was applied to the initial layout obtained from the SOAL stage.

2 PROPOSED LAYOUT SCHEME

2.1 Overview The proposed nesting routine is a global layout process which consists of two stages: the initial layout, where a reasonably fine pattern layout is obtained by the SOAL algorithm, and the layout improvement, where the final layout is obtained by the SA algorithm. For the purpose of increasing the layout efficiency and the use- fulness of the resource sheet remainder, the leftmost lowest layout is implemented in SOAL. Though this layout result is relatively rough and permits some over- laps among patterns, it is a reasonably good initial layout configuration for the next layout improvement stage by SA. The SA process is based on the probabil- istic state transition, which makes the transitions out of a local minimum possible. Because of this, SA is intro- duced to find a near-optimal layout solution without greatly destroying the initial layout. Therefore, the layout solutions were obtained from the combination of the SOAL algorithm’s very fast learning ability and the SA algorithm’s excellent searching ability.

2.2 Pattern representation Since a large portion of the complexity of the pattern layout problem stems from the overlap computation, a

Q IMechE 1996

at UNIV OF VIRGINIA on May 31, 2014pib.sagepub.comDownloaded from

Page 4: Two‐stage approach for nesting in two‐dimensional cutting problems using neural network and simulated annealing

TWO-STAGE APPROACH FOR NESTING IN TWO-DIMENSIONAL CUTTING PROBLEMS 51 1

number of researchers have investigated the possibility of developing a fast and reliable means for performing the overlap computation. This complexity of the overlap computation strongly depends on the pattern representation methods. Therefore, pattern representa- tion is one of the most important factors used to reduce the complexity of the pattern layout problem.

Generally, the pattern representation method of irregular two-dimensional shapes in the nesting problem is divided into the polygon and grid approx- imation. The approximate polygon representation was developed by Adamowicz and Albano (7), Albano (8) and others (10, 25). Each irregular two-dimensional pattern is represented by a sequence of points and the accuracy of approximation can be improved by choos- ing more points in the actual pattern. Cho (20) and Ismail (22) proposed a grid approximation represented by a number of connected squares of equal size. Sand- gren and Dworak (26) used a quadtree representation in the pattern layout problem. The primary goals of these pattern representation methods are generally to reduce the overlap computation time and algorithm complex- ity.

The polygon approximation and pattern decomposi- tion into rectangles and circles are used in this study, because they simplify the shape identification algorithm and reduce the amount of processed data and run time, and consequently turn out to be reasonable in the con- sidered application. Two main entities are handled in this paper: basic components and irregular patterns. A basic component may be either a rectangle, described by its length and width, or a circle, described by its radius. The reference point of a rectangle or circle is originally assumed to be its centre (see Fig. 1). As shown in Fig. 2, an irregular pattern can be obtained by com- bining the appropriate basic components. It is rep- resented by the smallest rectangular boundary (SRB), inner holes, outer holes and vertices of the polygon approximation of the pattern, and can be manipulated to translate or rotate as a whole. Then the pattern is described by providing a list of the vertices of the polygon approximation. The decomposed basic com- ponents in Fig. 2 are 17 rectangles including SRB and 1 circle. In this study, the shape of a pattern is entered by means of the simple drafting routine and the pattern decomposition is performed manually by using an inter- active graphics device. The accuracy of the decomposed

Reference Point

L R i 4 --ci

(a) Rectangle (b) Circle

Fig. 1 Representation of basic components

Polygonal approximation of pattern

Outer holes

~ Smallest rectangular boundary(SRl3) Fig. 2 Irregular pattern approximated by basic components

of eleven rectangles and one circle

irregular pattern can be improved by increasing the number of basic components, but this is, however, limited by the computer memory capacity and algo- rithm complexity. At this stage the initial good orienta- tion of the pattern is also defined. This is achieved by finding the minimum area of the SRB for each pattern (7, 22) and is interactively given by an operator prior to the nesting process.

2.3 Computation of the overlap area The overlap calculation is a computationally intensive operation, as mentioned above. The SOAL and SA algorithms will require several overlap computations at each iteration, depending on the number of patterns and the number of basic components forming the irregular pattern. In the computational geometry, it has been shown that the calculation of the overlap between two irregular patterns composed of k basic components requires a time of the order of the k2 value. Addi- tionally, the computational difficulty of the problem is apparent, since the pattern layout problem requires the overlap calculation for each pattern with other patterns.

There are several algorithms that have been devel- oped to compute the overlap area in computer graphic applications. Most of these algorithms are related to the scan line based or area subdivision algorithm used to perform the hidden surface removal, but are clearly computationally expensive. Sandgren and Dworak (26) suggested an approximate algorithm based on a quadtree representation of the patterns to reduce the computational complexity of the problem. An alterna- tive approach proposed by Jain et al. (19) is as follows: first the boundary of the overlap region is determined and then its area is computed.

The present approach is based on considering the combination of the possible overlap cases between two patterns. The overlap area of the basic components such as the rectangle and circle is obtained by trivial com- parisons of the maximum and minimum coordinates which is adopted also for the irregular patterns. This requires much less CPU (central processing unit) time than the previous approaches. Figure 3 shows an overlap example between patterns Pi and Pi, where the

Proc Instn Mech Engrs Vol 210 Q IMechE 1996

at UNIV OF VIRGINIA on May 31, 2014pib.sagepub.comDownloaded from

Page 5: Two‐stage approach for nesting in two‐dimensional cutting problems using neural network and simulated annealing

512 G-C HAN AND S-J N A

Fig. 3 Computation of net overlap area between parts Pi and Pi

net overlap area Onet(Pi, Pj) is given as follows:

OnedPi 9 Pj) = 9 - 1 o(Pi 9 hPj . k ) [ k

+ c o(pj I hP, . I ) - 1 c o(hPi , k > h P j , I ) ] ( I k I

where O(P,, Pi) denotes the overlap area between two SRBs of the patterns Pi and Pj, and bpi,, and h,,,, are the holes of the patterns Pi and Pj respectively.

2.4 Cost function The effectiveness of a given heuristic algorithm and the quality of the resulting layout strongly depend on the cost function used. The cost function adopted in this paper is the overlap area and the moment of area driving the patterns to the left end and bottom of the resource sheet.

The layout optimization problem can be character- ized by the configuration space W, denoting the set of the possible configuration space X, and a cost function C: W + R, which assigns a real number C(X) to each configuration (X). C is assumed to be lower, as the cor- responding configuration is better placed. The cost function C, which is to be minimized, contains two terms as follows:

(2) where f,, is the total overlap area among patterns. The patterns are allowed to overlap during the calculations, but it is required that the total overlap area is to be zero at the end of the run in order to obtain a feasible layout. A good way to do this is to assign a weight to the overlap area and this term is defined as follows:

C(X) = f d X ) + fcc(X)

Lv = penalty x 1 Onet(Pi7 Pj) (3)

where One1(Pi, Pj) is the net overlap area between the Pi-th and Pj-th patterns. Usually, a number of simula- tions are helpful to determine a satisfactory set of the penalty. In general layout problems, the overlap should be the most strongly penalized. The term fCc is the cluster cost which is based on a simple idea borrowed

i # j

Part B: Journal o i Engineering Manufacture

from physics. If a tank of water has a uniform acceler- ation in the gravitational field, all water particles tend to move in the direction of the balance between the gravity and acceleration. In this case, there are gravity and inertia forces which act on the particles to move them to the position of the minimum potential energy. From this phenomena of the physical system, an analogy is assumed between the physical many-particle system and the pattern layout problem, and the follow- ing idea is applied to minimize the wastage in the nesting problem:

L~ = acceleration x 1 x,(i)A(i) + gravity x C y,(i)~(i)

(4) where x,(Pi) and y,(Pi) are the coordinates of the refer- ence point of the pattern Pi and A(Pi) its area. For each configuration r , the potential energy of each pattern is computed with respect to the left end and bottom line. The area of a pattern is analogous to the mass of a particle in the physical system. The weights associated with the monent of area, x,(Pi)A(Pi) and yr(Pi)A(Pi), in the cost function are analogous to the acceleration and gravity. As the moment of area of the system decreases, the cluster cost also decreases. This term drives the pat- terns to move leftward and downward, and decreases the inter-pattern distance. In this study, the weight penalty is set at 10 and the two weights acceleration and gravity at 1.

i i

3 INITIAL LAYOUT STAGE

The aim of the initial layout stage is to obtain a rough but reasonable layout configuration which is based on the successful heuristic strategy. In this paper, the SOAL is adopted as the initial layout technique, because it provides a reasonable result within a time which is much shorter than that of other iterative improvement techniques such as SA and GA.

3.1 Self-organization assisted layout (SOAL) The SOAL algorithm is based on the integration of the Kohonen’s self-organizing feature maps (SOM) and fuzzy c-means (FCM), which has been considered by

Q IMechE 1996

at UNIV OF VIRGINIA on May 31, 2014pib.sagepub.comDownloaded from

Page 6: Two‐stage approach for nesting in two‐dimensional cutting problems using neural network and simulated annealing

TWO-STAGE APPROACH FOR NESTING IN TWO-DIMENSIONAL CUITING PROBLEMS 513

A Y

21

Overlap between

(a) (b) Fig. 4 Correspondence of items between (a) Kohonen’s model and (b) the

layout algorithm

Bezdek e t al. (24). This algorithm yields the automatic control of the learning rate distribution. The SOM network has an unsupervised learning architecture, con- sists of only a single layer and is a feedforward, so that its learning speed is very high [see reference (14)]. The relationship between the Kohonen model (SOM) and the proposed layout model (SOAL) is described in Fig. 4. The output neurons correspond to the patterns’ refer- ence points, while the connections between output neurons in the neural network correspond to the over- laps among patterns on the resource sheet. The number of input nodes (11, c 2 ) corresponds to the dimension- ality of the layout region. In this algorithm, the layout patterns are numbered from 1 to N and the position of each pattern is denoted by a vector Wi = { w l i , wZi}. In the case of the two-dimensional layout, the number of components of the vector Wi (for all i) is 2, where w l i and wzi denote the x and y coordinates of the ith pattern respectively. The learning input vectors in the neural network correspond to the points randomly selected in the legal layout region. The procedure of the proposed pattern layout algorithm, SOAL, is as follows : S t e p 1. Initialization: t = 0. Patterns are randomly dis-

S t e p 2. Rotation of a randomly selected pattern for

Step 3. Swap two patterns for reducing the moment of

Step 4. Present a new input:

tributed near the resource sheet centre.

overlap reduction.

inertia of areas.

x(t ) = { X l W , xz(t))

S t e p 5. Select the pattern that is the nearest from the

Step 6. Update the position of the nearest pattern and

S t e p 7. Increase t :

input.

its neighbourhoods.

if overlap area < E , or t = t,, Stop else go to Step 2

Initially, all patterns are gathered around the centre of the region by setting small random values to the posi- tion vectors of all patterns. These position vectors are then modified during the self-organization process by Q IMechE 1996

the input vectors which are uniformly distributed over the whole layout region allowed. Whenever an input vector is defined, the Euclidean distances from the input vector to all position vectors (reference points) of the patterns are calculated and the nearest pattern Pj*, for which the Euclidean distance is the smallest, is found. The positions of the pattern Pi* and other patterns in its neighbourhood are then modified to make these pat- terns closer to the current input. Here, the selected pat- terns are also rotated and swapped with each other to minimize the overlap area and the moment of area about the left end axis. In step 2, the rotation is allowed only in 90” steps. Because each pattern initially lies with a relatively good orientation, it is reasonable to ignore a number of other possible orientations in the nesting process.

The position of the nearest pattern and its neighbour- ing patterns are updated in step 6. In the SOAL, only the movement direction of patterns is obtained. The actual movement is determined such that the overlap amount of the patterns is minimal. Figure 5 shows the position updating method, where the new movement vector is given by (d’li, JZi) = (akdli, a,&), as denoted

Fig. 5 Position updating method

Proc Instn Mcch Engrs Vol 210

at UNIV OF VIRGINIA on May 31, 2014pib.sagepub.comDownloaded from

Page 7: Two‐stage approach for nesting in two‐dimensional cutting problems using neural network and simulated annealing

514 G-C HAN AND S-J NA

by the shaded box. The overlap area along the moving direction is checked for a finite increment and the posi- tion that has the minimum overlap is selected. If a pattern Pi lies within the neighbourhood of the pattern Pf , the position of the pattern Pi is updated according to the following rule:

W 1 i . t = w 1 i . t - 1 + a k V i , t ( X 1 , 1 - W 1 i . t - 1 )

w 2 i . I = w 2 i , I ~ 1 + ak ?i. r(x2. r - w 2 i , t ~ 1) ( 5 )

where qi is the learning rate and ak (0 < ak ,< 1, for all i) is determined from the condition that the overlap amount of the pattern i with other patterns is minimal. The finite increment of ak was set at 0.2.

3.2 Learning rate Figure 6 shows the movement vectors represented by arrows showing the direction and magnitude of the movement of the selected pattern and its neighbouring patterns moving together. The nearest pattern and its neighbourhood patterns are moved towards the input vector position, with the magnitude indicated by the length of the arrows. Here, the movement magnitude is determined by the fuzzy membership values (relative to the Euclidean distances) between an input vector and the position vectors of all the patterns. Whenever an input vector is given, the fuzzy membership values are calculated for all its neighbourhoods and the learning rate of the SOAL can be obtained. Huntsberger and Ajjimarangsee (27) first considered this approach and later extended their idea to a new family of algorithms by Bezdek et al. (24), called the fuzzy Kohonen clus- tering network (FKCN). In the present study, the fuzzy membership values are calculated in the following form :

j = l \ ! A l

where x1 and x2 represent the x and y coordinates of an arbitrary input vector respectively and w l i and w2i those of the centre of the ith cluster, namely the refer- ence point of the ith pattern, and rn is the weighting exponent (1 < m < co) of each fuzzy membership. This parameter (m) controls the amount of fuzziness in ui., and the performance of the algorithm is strongly depen- dent on a good choice for m. The membership values have a tendency to increase as the size of the neighbour- hood decreases. However, it is desirable that the learn- ing rate decreases as the time (t) increases. Therefore, the combination of FCM with SOM is obtained by defining the learning rate for the Kohonen updating rule as follows :

Vi. t = (Ui, IY'"''

m, = mi - (m. ' - m f)l"max (7)

where ui,, is calculated from equation (6) for i = 1, 2, . . . , N , mi and mf are some positive constants and t,,, is iteration limit. Therefore, the pattern position even- tually converges and is fixed after the learning rate is reduced to zero.

3.3 Neighbourhood function The SOAL algorithm uses the neighbourhood control as in SOM. The neighbourhood of a pattern i at the

,

/-'- ,/

',

U

Fig. 6 Learning rates according to neighbourhood size and membership values (magnitude of arrow)

time t is a set of patterns lying within the distance N E , from the pattern i, where N E , is a time-decreasing func- tion which determines the size of the neighbourhood and is defined as follows:

N E , = N E , ( "EEi)II(...

where N E , is the initial size of the neighbourhood and N E , the final size. The size of the neighbourhood N E , is initially large and slowly decreases with the increasing computation time (Fig. 6). In this paper, two parameters N E i and N E , were set at N and 1 respectively, and con- sequently the updating range decreases from N to 1.

4 LAYOUT IMPROVEMENT STAGE

4.1 Simulated annealing (SA) The general iterative improvement algorithm is a downhill-only style which can be trapped in local minima, because each new perturbation moves to a con- figuration downhill from the previous one. To overcome this, a number of random starts are needed, but there is still no guarantee that a good solution can be found.

The SA algorithm offers a strategy very similar to the general iterative improvement algorithm, with one major difference : the annealing allows the perturbations to move uphill in a controlled fashion. Because each movement can now change the configuration into a worse one, it is possible to jump out of local minima and potentially fall into a more promising downhill path. The relevant analogy here is the physical anneal- ing of a solid. To coerce a material into a low energy state, it is first heated and then cooled very slowly, while it is allowed to come to the thermal equilibrium at each temperature. The way in which the temperature decreases is called the cooling schedule and the prob- ability of energy states is determined by the Boltzmann law.

The annealing algorithm is based on the Monte Carlo technique proposed by Metropolis et al. (28) and can be mathematically modelled by using the concept of the theory of Markov chains (25). The technique of SA

@ lMcchE 1996 Part B : Journal of Engineering Manufacture

at UNIV OF VIRGINIA on May 31, 2014pib.sagepub.comDownloaded from

Page 8: Two‐stage approach for nesting in two‐dimensional cutting problems using neural network and simulated annealing

TWO-STAGE APPROACH FOR NESTING IN TWO-DIMENSIONAL CUTTING PROBLEMS 515

and its theoretical background is fully described by Aarts and Korst (29).

The SA process starts with an arbitrary initial con- figuration r,, and the initial control parameter To. The control parameter T is analogous to the temperature in a physical system and decreases as the algorithm prog- resses. At each temperature T, the algorithm generates a new configuration r’, calculates the cost difference AC = C(r’) - C(r) and determines the acceptance prob- ability P of the new configuration given by

i f A C < O Ac/r otherwise (9)

This Metropolis acceptance criterion can be described in the following manner. When AC < 0, the system con- figuration is improved and the new configuration is accepted with the probability 1. When AC > 0, the new configuration is accepted with the limited probability. The latter half of the acceptance scheme is implemented by picking a random number from a uniform distribu- tion between zero and one and comparing it with P = ,-“IT. If the random number is smaller than P , the new configuration r’ is accepted (30). The probability of this limited acceptance is 1 when T = co and decreases to zero as the temperature is lowered down to T = 0.

The implementation of the SA algorithm can be rea- lized by generating the homogeneous Markov chains of finite length for a finite sequence of descending values of the temperature. To achieve this a set of parameters that governs the convergence of the algorithm must be specified. These parameters are combined into a so- called cooling schedule: initial value of the temperature, cooling rule for decreasing the temperature, final value of the temperature specified by a stop criterion and finite length of each homogeneous Markov chain (finite number of transitions at each temperature). Since the quality of solutions is sensitive to a number of different parameters, the best schedule will vary from one problem type to another.

4.2 Implementation of SA to the nesting problem The sequence of probabilistic transitions is executed at each temperature until the quasi-equilibrium is attained (inner loop). Then the temperature T is lowered accord- ing to the temperature cooling rule, and the sequence of probabilistic transitions is repeated. The whole process continues until the stop criterion is satisfied (outer

In practical applications, SA is an approximation algorithm because of its finite number of transitions and temperature steps. Therefore, the convergence to an optimal solution is not always guaranteed. The anneal- ing algorithm for this task needs some basic com- ponents such as neighbourhood structure, cost function, Metropolis criterion and cooling schedule. The imple- mented SA algorithm for the pattern nesting is rep- resented as follows:

loop).

generate random configuration, X;

while(stoppingsriterion(1oop-count) < i T E M P and T > E,) {

< nOVER and nsucc < nLIMIT) { while(inner-loop-cri terion

Q IMechE 1996

translate, X,;

AC = cost(X)-cost(X,);

if (AC < 0 or exp(AC/T) > R) accept(X = A’,); else {

rotate, X,;

AC = cost(X)-cost(X,);

if (AC < 0 or exp(AC/T) > R) accept(X = X,); } swap two patterns, X, AC = cost(Xj-cost(X,);

if (AC c 0 or exp(AC/T) > R) accept(X = Xs); } update T ; }

where iTEMP is the number of times the annealing is performed, tzS a small positive number as the stop cri- terion, nOVER the maximum number of solutions evaluated at each temperature and nLIMIT the maximum number of new solutions to be accepted at each temperature. The inner-loop is repeated nOVER times or until the number of new solutions accepted is equal to nLIMIT, whichever occurs first. Press et a/. (31) suggested the guidelines for setting the values of the parameters in the travelling salesman problem (TSP). The present proposed approach greatly reduces the values of iterations through a two-stage approach scheme. Based on the experiments nOVER was set at 10N and nLIMIT at 5N, where N is the number of pat- terns in the nesting problem. The computations com- firmed that the setting for nOVER and nLlMIT generally produces a high-quality solution in a short time.

4.3 Neighbourhood structure The neighbourhood structure defines a set of configu- rations obtained by moving a pattern to any random position. Two methods are used to generate the new configuration from the current configuration: single- pattern displacement and swapping two patterns ran- domly selected. The single-pattern displacement includes both the translation and rotation, while the swap of two patterns includes the exchange of their ref- erence points. In the present study, the single-pattern rotation is allowed by 90” steps in the same way as at the initial layout stage and the single-pattern trans- lation adopts two range-limiting functions as follows:

wli . = random(0, length)

wti, = random(0, width)

wli , I = wli, ,- - random(0, length x 0.025) wzi ,r = wzi ,,-, - random(0, width x 0.025) (1 1)

where length and width are the horizontal and vertical sizes of the resource sheet used. The position updating of a pattern i consists of two types: large perturbation within the entire region [equations (lo)] and small per- turbation in the lower leftward direction [equations (1 l)]. The former is usually used to approach the global layout optimization, while the latter is used to approach the local layout optimization, which decreases the inter-

Proc lnstn Mech Engrs Vol 210

at UNIV OF VIRGINIA on May 31, 2014pib.sagepub.comDownloaded from

Page 9: Two‐stage approach for nesting in two‐dimensional cutting problems using neural network and simulated annealing

G-C HAN AND S-J NA 516

pattern distance, and to produce the leftmost lowest layout. In implementation of the SA algorithm, cost dif- ferences are calculated incrementally at each iteration for speeding up the algorithm. The random bits func- tion which generates a random number of either zero or one was used to perform the large or small perturbation with equal probability (31). The new configuration after perturbation is accepted according to the given prob- ability function (the Metropolis acceptance criterion), which decreases as the algorithm progresses.

4.3.1 Starting temperature The proposed layout strategy uses a two-stage switch- ing technique for the initial layout and layout improve- ment. Since the initial solution to be used by the SA algorithm is generated by applying the SOAL algo- rithm, the determination of the starting temperature for SA in a two-stage algorithm is the key feature of this approach. If the temperature is too high, some of the structures created by the SOAL will be destroyed and extra work will be unnecessarily done in the SA phase. If the temperature is too low, however, the solution quality is low, similar to the case of the cooling schedule in quenching. The determination of the starting tem- perature for SA in a two-stage system has been investi- gated by Rose et al. (32), who first proposed a theoretical foundation for determining the starting tem- perature in the standard cell placement. That approach is based on the measurement of the probability distribu- tion of the cost function change and on the assumption that the placement is in equilibrium at each tem- perature. However, the cooling schedule implemented in SA to produce the layout is normally not perfect, so that the equilibrium state of the layout at each tem- perature cannot be realized in the normal cooling schedule.

In this two-stage approach, since the initial layout configuration obtained by the SOAL has a reasonably good quality solution, the starting temperature of SA can be set at a very low value. Actually, a number of experiments confirmed that extremely low values of the starting temperature created a fairly good switching scheme and reduced the run time. In the present study a constant starting temperature was adopted, which was determined through a number of experiments.

4.3.2 Temperature decrement The cooling rate can be explained by an analogy to the crystallization process. To achieve a perfect crystal structure, it is important that the temperature is decreased very slowly around the melting point. Aarts and co-workers (33, 34) introduced a cooling rate requiring relatively little computational effort, which is described as follows. At each temperature, a number of movements proportional to the number of patterns was attempted, while the temperature was decreased accord- ing to the fixed schedule. This method appears to be the most common in the current literature (35). The tem- perature decrement function considered in this study is one of the normal schedules as follows:

T + , = Y?; (12) Part B: Journal of Engineering Manufacture

where y is the cooling rate parameter less than 1, which is determined experimentally to give a good result. In these simulation experiments, very good solutions were obtained with y values of 0.98 and 0.85. In the early portion of SA, the temperature is reduced relatively slowly (y = 0.98), while it is reduced more rapidly (y = 0.85) in the later portion of SA.

4.3.3 Stopping criterion The algorithm is stopped when the outer-loop reaches iTEMP or the temperature has a given value E,. These parameters determine the number of times by which the SA schedule is to be performed. In this study the parameters iTEMP and E, were set at 100 and O.OOO1 respectively.

5 EXPERIMENTAL RESULTS AND DISCUSSION In this section, several simulation results of the pro- posed nesting algorithm are described for various types of pattern. The proposed algorithm was implemented on an IBM-compatible personal computer as a global layout package for two-dimensional patterns using the C language. This includes a colour graphic display of the patterns, showing the instantaneous result as the nesting algorithm runs. Computational results with the SOAL algorithm for 23 irregular patterns are provided in Table 1. This shows the performance comparison for the fixed parameter m = 7 and the variable mi = 1.0,0.7, 0.5 and ml = 2.5, 2.0, 1.5, 1.0. Figure 7 shows that the overlap area is reduced with the increasing iteration in the SOAL stage for the fixed value of m = 7, with mi = 0.7 and m, = 1.5. The small changes of m in the SOAL affected the results only slightly in this study. Figure 8 shows the pattern layout at four different computation times during the SOAL process for these 23 irregular patterns. The initial positions of the patterns are gath- ered at the centre, as shown in Fig. 8a, which are finally spread out over the whole region, as shown in Fig. 8d. It can be shown that the pattern movement is large at the early stage and gradually decreases as the SOAL process continues. As the process goes on, the algorithm converges the layout in the desired fashion, because the size of the neighbourhood and the magnitude of the learning rate distribution are decreased. Since the learn- ing is a stochastic process, the final layout quality

Table 1 Computational results of SOAL for 23 patterns with m = 7, mi = 1.0, 0.7, 0.5 and mf = 2.5, 2.0, 1.5, 1.0 (for an average of 10 runs)

Average number of Average cost mi m, iterations function value

~

1.0 2.5 2.0 1.5

0.7 2.5 2.0 1.5 1 .o

0.5 2.0 1.5 1 .o

~

1423 1398 1262 816 659 47 1

1653 1666 323 28 1

51 19 2841 2600 2324 1884 905

5409 5962 2075 1177

Q IMechE 1996

at UNIV OF VIRGINIA on May 31, 2014pib.sagepub.comDownloaded from

Page 10: Two‐stage approach for nesting in two‐dimensional cutting problems using neural network and simulated annealing

TWO-STAGE APPROACH FOR NESTING IN TWO-DIMENSIONAL CUTTING PROBLEMS 517

300 -

200 -

100 -

Overlap area I

I

j 1 I 1

1- I

I

ll

depends on the number of steps, which must be reason- ably large. In the present experiments, the iteration limit t,,, = 2000 was used and another stopping criterion E,

was set at 1 per cent of the resource sheet area. In the initial layout stage, the holes of the pattern are not con- sidered in the overlap area computation in order to speed up the calculation. The elapsed CPU time was then 15 s on an IBM PC/486DXII(66 MHz).

To overcome a possible mismatch between the SOAL and SA algorithms, the starting temperature of the annealing process should be carefully determined. On the basis of the previous experiments, a constant start- ing temperature of To = 0.05 was used in this study. Figure 9 shows the result of the SA process simulated from the initial layout obtained by the SOAL (Fig. 8d). The CPU time was 186 s on an IBM PC(486DXII-66), while the number of patterns and their complexity are limited only by the memory capacity of the computer.

Fig. 8 SOAL optimization process: intermediate results with increasing time from (a) to (d)

Fig. 9 Nesting result for irregular patterns obtained from initial layout of Fig. 8d

Q IMcchE 1996 Proc Instn Mcch Engrs Vol 210

at UNIV OF VIRGINIA on May 31, 2014pib.sagepub.comDownloaded from

Page 11: Two‐stage approach for nesting in two‐dimensional cutting problems using neural network and simulated annealing

518

s= 1

G-C HAN AND S-J N A

C=6 S=l S=l s=10 S=l

S=6 S=6 5=13 C=l .- __

s=10

m h 7 g I s=l

--L __ I S=l S=lO

Fig. 10 Irregular pattern sets used in experiments (where S = number of rec- tangles and C = number of circles)

s=10 s=3 s=4

Figure 10 shows a set of irregular patterns used in these experiments, which are composed of different numbers of basic components such as the rectangle and circle. They have a considerable effect on the performance of the algorithm, because the CPU time of the SOAL and SA algorithms strongly depends on the number of basic components representing the irregular patterns for the overlap computation. In addition, some of the charac- teristics of patterns affect the performance in the nesting process. These characteristics include the number of total patterns, the geometric complexity of patterns, the patterns size relative to the resource sheet, etc. The sig- nificant factors for algorithm performance were the number of patterns and basic components. In the present experiments the average CPU times were 1 and 50 s in SOAL and SA respectively, for ten identical irregular patterns with two basic components. However, the CPU times were increased to 4 s/180 s and 29 s/220 s for 20 and 30 identical patterns respectively. In addi- tion, the material utilization varied from 56.5 per cent to a maximum of 89.0 per cent according to the number of patterns (from 25 to 50) and basic components (from 2 to 5).

6 CONCLUSIONS

In this paper, a new nesting strategy was proposed for the two-dimensional pattern layout by using a two- stage approach, which can be effectively used for thermal cutting processes such as flame, plasma and laser cutting. This paper makes two major contribu- tions. Firstly, the proposed algorithms can easily handle patterns with widely varying geometrical shape by using the pattern decomposition technique. One major reason for the efficiency of the proposed nesting approach is the use of this flexible approximate representation for the irregular patterns. This considerably reduces the Part B: Journal of Engineering Manufacture

amount of processed data and, consequently, the run time of the computer, when compared with the polygon and grid approximation of the patterns. Secondly, the proposed approach saves much CPU time through a two-stage approach scheme, while other annealing- based algorithms so far reported for a nesting problem are computationally expensive.

According to the circumstances, such as the case of a simple identical pattern layout, the non-annealing-based deterministic technique can be better with regard to the CPU time than the annealing-based technique. However, the proposed nesting approach uses the sto- chastic process and has a much higher possibility of obtaining a global solution than the non-annealing- based nesting algorithms. In addition, the annealing- based layout scheme has proved to be successful in the case of complex patterns with concave features and inner holes.

Two main heuristic nesting algorithms were con- sidered in this study. In the initial layout stage, a self- organization assisted layout algorithm, based on the combination of FCM and SOM, was adopted. For a finer layout, the simulated annealing-based approach was adopted in the layout improvement stage.

From the experimental results, it could be concluded that the switching from the SOAL to the SA process can be successfully carried out and consequently the final layout result is very effective in material saving. The results may be used to generate the NC (numerical control) part program for driving a CNC (computer NC) cutting machine.

REFERENCES 1 Gilmore, P. C. and Gomory, R. E. Multistage cutting stock prob-

2 Gilmore, P. C. and Gomory, R. E. The theory and computation of lems of two and more dimensions. Ops Res., 1965,13,94-120.

knapsack functions. Ops Res., 1966,14(62), 1045-1074.

Q IMechE 1996

at UNIV OF VIRGINIA on May 31, 2014pib.sagepub.comDownloaded from

Page 12: Two‐stage approach for nesting in two‐dimensional cutting problems using neural network and simulated annealing

TWO-STAGE APPROACH FOR NESTING IN TWO-DIMENSIONAL CUlTING PROBLEMS 519

3 Herz, J. C. Recursive computational procedure for two- dimensional stock cutting. IBM J. Res. Deuice, September 1972,

4 Adamowicz, M. and Albano, A. A solution of the rectangular cutting-stock problem. IEEE Trans. on Systems, Man and Cyber- netics, April 1976, SMC-6(4), 202-210.

5 Cbristofides, N. and Whitlock, C. An algorithm for two- dimensional cutting problems. Ops Res., January-February 1977,

6 Madsen, 0. B. G. Glass cutting in a small firm. Math. Pro- gramming, 1979,17,85-90.

7 Adamowicz, M. and Albano, A. Nesting two-dimensional shapes in rectangular modules. Computer-Aided Des., January 1976, 8(2),

8 Albano, A. A method to improve two-dimensional layout Computer-Aided Des., January 1977,9(1), 48-52.

9 Albano, A. and Sapuppo, G. Optimal allocation of two- dimensional irregular shapes using heuristic search methods. IEEE Trans. on Systems, Man and Cybernetics, May 1980, SMC-lqS),

10 Nee, A. Y. C. A heuristic algorithm for optimum layout of metal stamping blanks. Ann. CIRP, 1984,33(1), 317-320.

11 Nee, A. Y. C., Seow, K. W. and Long, S. L. Designing algorithm for nesting irregular shapes with and without boundary con- straints. Ann. CIRP, 1986,35(1), 107-1 10.

12 Sriram, M. and Kang, S. M. A modified hopfield network for two- dimensional module placement. Proceedings of IEEE Internation- al Symposium on Circuits system, 1990, pp. 1664-1667.

13 Zhang, C. and Mlynski, D. A. VLSI-placement with a neural network model. Proceedings of IEEE International Symposium on Circuits system, 1990, pp. 475-418.

14 Kobonen, T. The self-organizing map. Proc. IEEE, September

15 Kim, S. S. and Kyung, C. M. Circuit placement on arbitrarily shaped regions using the self-organization principle. IEEE Trans. on Computer Aided Des., July 1992,11(7), 844-854.

16 Kirkpatrick, S., Celatt, C. D. and Veechi, M. P. Optimization by simulated annealing. Science, May 1983,220(4598), 671-680.

17 Sbahookar, K. and Mazumber, P. VLSI cell placement techniques. ACM Computing Sum, June 1991,23(2), 143-164.

18 Heragu, S. S. and Alga, A. S. Experimental analyses of simulated annealing based algorithms for the layout problem. European J . Opl. Res., 1992,57, 190-202.

19 Jain, P, Fenyes, P. and Richter, R. Optimal blank nesting using simulated annealing. Trans. ASME, J. Mech. Des., March 1992,

l6(5), 462-469.

25( I), 30-44.

27-33.

242-248.

1990,78(9), 1464-1480.

114, 160-165.

20 Cbo, K. H. Integrated CAD/CAM system for fabrication of sheet metal parts. PhD thesis, Seoul National University, 1993.

21 Downsland, K. A. Some experiments with simulated annealing techniques for packing problems. European J . Opl Res., 1993, 68,

22 Ismail, H. S. and Hon, K. K. R New approach for the nesting of two-dimensional shapes for press tool design. Int. J. Prod. Res.,

23 Fuji-, K. and Gakkai, S. Approach for optimal nesting algorithm using genetic algorithm and local minimization algorithm. Trans. Jap. SOC. Mech. Engrs, Part C, 1993,59(564), 2576-2583.

24 Bezdek, J. C, Tsao, E. C. K. and Pal, N. R. Fuzzy Kohonen clus- tering networks. IEEE International Conference on Fuzzy system,

25 C m y , V. Thermodynamical approach to the traveling salesman problem: an eflicient simulation algorithm. J . Opt. Theory and Applic., January 1985,45(1), 41-51.

26 Sandgreo, E. and Dworak, T. Part layout optimization using a quadtree representation. Proceedings of 1988 Design Automation Conference, Dissimmee, Florida, 1988, pp. 21 1-219.

27 Huntsberger, T. and Ajjimarangsee, P. Parallel self-organizing feature maps for unsupervised pattern recognition. Int. J. Gen. System, 1989,16,357-372.

28 Metropolis, N., Rosenbluth, A. W., Rosenbluth, M. N. and Teller, A. H. Equation of state calculations by fast computing machines. J. Chem. Physics, 1953, 20(1334), 1087-1092.

29 Aarts, E. H. L. and Korst, J. H. M. Simulated annealing and Boltz- mann machines, 1989, pp. 13-114 (John Wiley, New York).

30 Wasaerman, P. D. Neural computing: theory and practice, 1989, pp. 77-92 (Van Nostrand Reinhold, New York).

31 Press, W. H, Flannery, B. P, Teukolsky, S.A. and Vetterling, W.T. Numerical recipes in C : the art of scientific computing, 1990, pp. 224-352 (Cambridge University Press, New York).

32 Rose, J, Klebseh, W. and Wolf, J. Temperature measurement and equilibrium dynamics of simulated annealing placements. IEEE Trans. on Computer Aided Des., March 1990,9(3), 253-259.

33 Aarts, E. H. L. and van Laarhoven, P. J. M. A new polynomial- time cooling schedule. Proceedings of International Conference on Computer-aided design, November 1985, pp. 206-208.

34 Aarts, E. H. L., Korst, J. H. M. and van Laarhoven, P. J. M. A quantitative analysis of the simulated annealing: a case study for the traveling salesman problem. J. Statist. Physics, 1988, 50(1/2),

35 Rutenbar, R. A. Simulated annealing algorithms: an overview.

389-399.

1992,30(4), 825-837.

1992, pp. 1035-1043.

187-206.

IEEE Circuits and Devices Mag., January 1989, 19-26.

g3 IMechE 1996 Proc Instn Mech Engrs Vol 210

at UNIV OF VIRGINIA on May 31, 2014pib.sagepub.comDownloaded from