2 1 Improved orthogonal array based simulated annealing for design optimization Chan, K.Y. Kwong, C.K.* and Tsim, Y.C. Department of Industrial and Systems Engineering, The Hong Kong Polytechnic University, Hung Hom, Kowloon Hong Kong, PRC Abstract Recent research shows that simulated annealing with orthogonal array based neighbourhood functions can help in the search for a solution to a parametrical problem which is closer to an optimum when compared with conventional simulated annealing. Previous studies of simulated annealing analyzed only the main effects of variables of parametrical problems. In fact, both main effects of variables and interactions between variables should be considered, since interactions between variables exist in many parametrical problems. In this paper, an improved orthogonal array based neighbourhood function (IONF) for simulated annealing with the consideration of interaction effects between variables is described. After solving a set of parametrical benchmark function problems where interaction effects between variables exist, results of the benchmark tests show that the proposed simulated annealing algorithm with the IONF outperforms significantly both the simulated annealing algorithms with the existing orthogonal array based neighbourhood functions and the standard neighbourhood functions. Finally, the 2 improved orthogonal array based simulated annealing was applied on the optimization of emulsified dynamite packing-machine design by which the applicability of the algorithm in real world problems can be evaluated and its effectiveness can be further validated. Keywords: Orthogonal array, interaction analysis, neighbourhood functions, simulated annealing, design optimization Corresponding author: Dr. C.K. Kwong Department of Industrial and Systems Engineering, The Hong Kong Polytechnic University, Hung Hom, Kowloon, Hong Kong, PRC Tel: (852) 27666610 Fax: (852) 23625267 Email: mfckkong@polyu.edu.hk 3 1. Introduction Simulated annealing (SA) is a point-based stochastic optimization method, which explores iterationally from an initial solution to the optimum [4, 14]. Each iteration employs a neighbourhood function to generate a candidate solution by a randomized perturbation on a current solution. Therefore, design of neighbourhood functions plays an important role in developing an effective simulated annealing. The searching mechanism of SA has a very good convergent property [19] and SA has been widely applied in solving many hard optimization problems [32, 33]. However, it can be noted in many previous researches [1, 17, 26] that SA can find good or reasonable solutions, but in many cases it cannot search for a global optimum. The searching ability of SA improves in the earlier stages of the searching process, but it saturates or even terminates in later stages. Therefore, it is difficult to obtain any substantial improvements by examining neighbouring solutions in the later stage of the search. Vaessens et al. [34] put this searching method into the context of a local, or neighbourhood search. Also it has been noted in some previous researches that long computational time is commonly required for SA to search for an acceptable solution for solving hard optimization problems [29, 38, 39]. Various approaches have been proposed to improve the searching mechanism by modifying neighbourhood functions [8, 38, 39, 30], modifying criterion of accepting a new candidate solution [28], incorporating with other optimization methods [7, 21, 36] and parallelized computing [1]. A recent approach to improving the searching mechanism of SA has been proposed by introducing orthogonal arrays into neighbourhood functions of SA [9, 10, 12, 27]. The Orthogonal arrays exploit the neighbourhood of a current solution by 4 analyzing the main effect of variables in the current solution. The neighbourhood function, which uses the orthogonal array for exploiting solution spaces, is called orthogonal array based neighbourhood function (ONF) in this paper. It has been shown that ONF can speed up the search of SA and determine a more accurate candidate solution for electromagnetic problems [27], floorplanning problems [10] and controller design problems [9, 12] compared with other neighbourhood functions. However, we found that the exploitation of candidate solutions can be further improved by considering not only the main effects of variables but also the interaction effects between variables. It is due to the fact that strong interaction effects could exist between variables in many optimization problems. If strong interaction effects exist in localized features of a search space, poor results may be obtained by considering main effects only in variables [6, 23, 24, 25]. In this paper, an improved orthogonal array based neighbourhood function (IONF) for SA which considers both main effects in variables and interaction effects between variables is proposed. Application of the proposed simulated annealing algorithm with the IONF on the optimization of emulsified dynamite packing-machine design is also described. IONF employs the approach of interaction plots [22] to analyze interaction effects between variables. Interaction plots have been commonly used to analyze interaction effects between parameters in industrial systems [31, 13, 18, 20, 40]. The background of orthogonal arrays and ONF, as well as the proposed IONF are described in Section 2 and 3 respectively. Benchmark results of solving a set of hard benchmark problems [37, 11] using the three simulated annealing algorithms with employing ONF, IONF and the standard neighbourhood function respectively are shown in Section 4. Application of the improved simulated annealing on the optimization of 5 emulsified dynamite packing-machine design and further validation of the effectiveness of the algorithm are described in Section 5. 2. Orthogonal Experimental Design and Neighbourhood Function The use of orthogonal arrays in planning experiments and analyzing experimental data is briefly described in Section 2.1. In Section 2.2, background and limitations of the orthogonal array based neighbourhood functions (ONF), that has been applied in solving many hard optimization problems [9, 10, 12 and 27], are presented. 2.1 Orthogonal Experimental Design One major objective of an experimental design is to find the best combination of parameter levels for optimal performance of a system or a model. If an experimental design is based on the full factorial one and the number of parameters to be investigated is large, a large number of experimental runs always are required to be carried out. To reduce the number of experimental runs, a fractional factorial design is an alternative in which the experimental design can be based on orthogonal arrays [2]. An experimental plan based on an orthogonal array L2N+1(pN) involves a maximum N parameters and p levels in each parameter for 2N+1 experimental runs. If an orthogonal array L2N+1(3N) with 3 levels is considered, for j=1,2,…N and k = 1,2,3, main effect Mjk of the parameter j for level k is defined as: ∑ + = ×= 12 1 N t tFtyjk M (1) where yt denotes an objective function value of the combination corresponding to experiment t, and 6    = .not is experiment of parameter of level if 0 . is experiment of parameter of level if 1 ktj ktj t F For smaller-the-better type problems, the best level Best(j) of the j-th parameter is denoted as: ( )( )321 ,,minarg)( jjj MMMjBest = (2) where 'arg(min(..))' is a function that returns the index of the minimum value. For example, if the value of Mj2 is the smallest among the values of Mjk where k=1,2 and 3, then Best(j)=2. For larger-the-better type problems, the best level Best(j) of the j-th parameter is denoted as: ( )( )321 ,,maxarg)( jjj MMMjBest = (3) where ' arg(max(..))' is a function that returns the index of the maximum value. 2.2 Orthogonal Array based Neighbourhood Function (ONF) Ho et al [9, 10, 12] and Shu et al [27] proposed an orthogonal array based neighbourhood function (ONF) which aims at generating a candidate solution by using the combinations of the orthogonal array ( )NNL 312 + . ONF generate a candidate solution Q=ONF(P1) from P1, where ( )mSSP ,...,11 = is the current solution. First two temporary solutions, P2 and P3 are generated by perturbing P1 as follows: ( )1112 ,..., mSSP = and ( )2213 ,..., mSSP = , (4) where iiiiii SSSSSS −=+= 21 and , i=1,...,m. All iS are generated based on the Cauchy- Lorentz probability distribution [29]. Consequently, Q is produced by a combination of variables of P1, P2, and P3. 7 In ONF, P1, P2 and P3 are considered as level 2, level 1 and level 3 of an experimental design. To assign the m variables from P1, P2 and P3 into the N parameters in ( )NNL 312 + , the m variables are divided into N non-overlapping groups. Each non- overlapping group of variables is considered as a parameter in ( )NNL 312 + . The number of variables in each group is determined by a generated random integer li, i=1,2,…N, where ml N i i =∑ =1 (5) ONF then uses the t-th combination of ( )NNL 312 + to compute yt corresponding to the t-th experiment with t=1,...2N+1, and computes all main effects jkM with j=1,2,..,N and k=1,2,3 based on (1). Finally, it determines the best level of each parameter based on the computed main effects by (2) for smaller-the-better type problems or (3) for larger-the- better type problems. The algorithm of the ONF, Q=ONF(P1), is shown in the Appendix 1. ONF uses the analysis of main effects to determine the optimal levels of parameters which is the simplest approach to analyze experimental results [2, 22]. However, it is quite common that an interaction effect exists between two parameters in a function [6]. Further studies of interaction effects and main effects in a function have been done by [23, 24, 25] based on ‘analysis of variance (ANOVA)’. The parametrical effects of a function are analyzed using a total sum of squared deviations SS, which can be divided into SS of main effects and interaction effects as shown below: Total SS = SS of main effects + SS of interactions With the higher SS of interactions, the lack of provision of adequacy dealing with the potential interactions between parameters is a major weakness of ONF. To solve the 8 optimization problems where low interaction effects exist between parameters, ONF could work properly. However, if strong interaction effects exist between parameters in optimization problems, the optimal combination based on ONF may not be reproducible. 3 An Improved Orthogonal Array Based Neighbourhood Function In this paper, an improved orthogonal array based neighbourhood function (IONF) is proposed with the consideration of interaction effects between parameters. In the ONF, the children are produced by considering only the largest main effects of parameters. But, in IONF, the children are produced by considering both main effects of parameters and interaction effects between parameters. Interaction plots [22] are adopted to investigate the magnitudes of interaction effects between parameters. In the IONF, an interaction matrix MIij is generated to estimate the magnitudes of interaction effects between parameters i and j, where i, j=1,2,..N. It can be expressed as: ( )( ) 33 3nm,1for ;, × ≤≤= nmIMI ijij (6) where the numbers of rows and columns of the interaction matrix MIij are both equal to the number of levels of L2N+1(3N) which is 3. The elements of MIij, ( )nmIij , , which represents the average fitness of the thi parameter with level m and thj parameter with level n, are defined as: ( ) ( ) ( ) ∑ =           + ∑ =           +⋅ = N p nthj mthiNNL thp N p nthj mthiNNL thp pf nmIij 1 isparameter theand isparameter theof level the,312 ofn combinatio In the 1 isparameter theand isparameter theof level the,312 ofn combinatio In the , (7) 9 where fp denotes an objective function value of the combination corresponding to the p-th row of L2N+1(3N), 3,1 ≤≤ nm and [ ]    = otherwise. 0 true.isbracket theinsidestatement theif 1 condition Then interaction plots are used to investigate the magnitude of interaction effects between parameters i and j. The thr line of the interaction plot is defined as: ( ) ( ) ( )( ) 3. 2, 1, where,3,,2,,1 == rrIrIrI(r)Line ijijijij (8) Figure 1 shows that the lines cross indicating the existence of strong interactions. If strong interaction effects do not exist in all parameter pairs, only the main effects of parameters need to be studied. The candidate solution Q of the IONF is generated by the combination of the parameters with the largest main effects based on (2) for smaller-the- better type problems or (3) for larger-the-better type problems. In this case, the algorithm of IONF is identical to the one of ONF. However, if strong interaction effects exist in any one of the parameter pairs, the candidate solution Q is first generated by the best level combinations of the orthogonal array L2N+1(3N) with the optimal yt. For those parameters without strong interaction effects between each other, the level combinations in Q are replaced by the parameters with the largest main effects based on (2) or (3). The algorithm of the IONF, Q=IONF(P1), is given as follows: Algorithm Q=IONF(P1) Step 1) Generate P2 and P3 with ( )mSSP ,...,11 = based on (4). Step 2) Divide P1, P2 and P3 into N groups based on (5). Step 3) Represent levels 2, 1 and 3 of the j-th parameter of ( )NNL 312 + by the j-th group of P1, P2 and P3 respectively. 10 Step 4: Compute yt based on the t-th combination of ( )NNL 312 + of the t-th experiment. Step 5: Compute the main effects Mjk where j=1,...,N and k=1,2 and 3 based on (1). Step 6: Construct the interaction matrices ijMI by (6), where i, j=1,2,…N with ji ≠ . Step 7: Construct the interaction plot for ijMI where i, j=1,2,…N with ji ≠ . Step 8: Check whether the parameters i and j have a strong interaction effect of each other, where i, j=1,2,…N with ji ≠ . Step 9: If strong interaction effect exists in any one of the parameter pairs, goto Step 10, otherwise goto Step 13. Step 10: Form the candidate solution Q by the combination of the ( )NNL 312 + with the optimal yt. Step 11: For the parameter pair with no strong interaction effect, the level combinations in Q are replaced by the level combinations with the largest main effects based on (2) or (3). Step 12: Output Q as the resulting solution of IONF. Then goto step 15. Step 13: Determine the best level Best(j) on the j-th parameter based on (2) for smaller-the-better type problems and (3) for larger-the-better type problems. Step 14: The candidate solution Q is produced by the combinations of best levels of parameters. Step 15: Terminate the algorithm. 11 4 Benchmark results based on non-separable functions To evaluate the effectiveness of the proposed IONF, benchmark tests based on the three simulated annealing algorithms, which employ the standard neighbourhood function SNF [32], ONF [9, 10, 12, 27], and the proposed IONF respectively, were conducted to solve a set of selected parametrical benchmark functions. Those benchmark functions ( 61 ff − ) is shown in Table 1, in which interaction effects exist between variables. 41 ff − were collected from [12], while 65 ff − were collected from [37]. They cannot be decomposed into linear combinations of independent sub-functions since variables interact with each other and cannot be enumerated completely. They can be classified as good test suites for the algorithms since they are non-separable in which each sub-function contains at least two variables [35]. To evaluate the performance of the three neighbourhood functions (SNF, ONF and IONF), the simulated annealing algorithm used by [12, 27] was employed in this research which is shown below. 12 Algorithm of simulated annealing Begin i=1 Randomly generate a candidate solution s Repeat t=T0; I=I0 Repeat:- Q = neighbour_function(s) if f(Q)< f(s) then replace s with Q else generate a random number r if exp(-(f(s)-f(Q))/t)>r then replace s with Q endif endif t=t*CR until t