Swarm Intelligence - Swarm Intelligence Focus on Ant and...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Swarm Intelligence Focus on Ant and Particle Swarm Optimization Swarm Intelligence Focus on Ant and Particle Swarm Optimization Edited by Felix T. S. Chan and Manoj Kumar Tiwari I-TECH Education and Publishing Published by the I-Tech Education and Publishing, Vienna, Austria Abstracting and non-profit use of the material is permitted with credit to the source. Statements and opinions expressed in the chapters are these of the individual contributors and not necessarily those of the editors or publisher. No responsibility is accepted for the accuracy of information contained in the published articles. Publisher assumes no responsibility liability for any damage or injury to persons or property arising out of the use of any materials, instructions, methods or ideas contained inside. After this work has been published by the I-Tech Education and Publishing, authors have the right to republish it, in whole or part, in any publication of which they are an author or editor, and the make other personal use of the work. © 2007 I-Tech Education and Publishing www.i-techonline.com Additional copies can be obtained from: publication@ars-journal.com First published December 2007 Printed in Croatia A catalogue record for this book is available from the Austrian Library. Swarm Intelligence: Focus on Ant and Particle Swarm Optimization, Edited by Felix T. S. Chan and Manoj Kumar Tiwari p. cm. ISBN 978-3-902613-09-7 1. Swarm Intelligence. 2. Ant Optimization. 3. Particle Swarm Optimization. V Preface In the era globalisation the emerging technologies are governing engineering industries to a multifaceted state. The escalating complexity has demanded researchers to find the possible ways of easing the solution of the problems. This has motivated the researchers to grasp ideas from the nature and implant it in the engineering sciences. This way of thinking led to emergence of many biologically inspired algorithms that have proven to be efficient in handling the computationally complex problems with competence such as Genetic Algorithm (GA), Ant Colony Optimization (ACO), Particle Swarm Optimization (PSO), etc. Motivated by the capability of the biologically inspired algorithms the present book on “Swarm Intelligence: Focus on Ant and Particle Swarm Optimization” aims to present recent developments and applications concerning optimization with swarm intelligence techniques. The papers selected for this book comprise a cross-section of topics that reflect a variety of perspectives and disciplinary backgrounds. In addition to the introduction of new concepts of swarm intelligence, this book also presented some selected representative case studies covering power plant maintenance scheduling; geotechnical engineering; design and machining tolerances; layout problems; manufacturing process plan; job-shop scheduling; structural design; environmental dispatching problems; wireless communication; water distribution systems; multi-plant supply chain; fault diagnosis of airplane engines; and process scheduling. I believe these 27 chapters presented in this book adequately reflect these topics. Recent Development of Swarm Intelligence Techniques The 1st chapter, “Chaotic Rough Particle Swarm Optimization Algorithms”, relates to the issues of generating random sequences with a long period and good uniformity. This topic is very important for easily simulating complex phenomena, sampling, numerical analysis, decision making and especially in heuristic optimization. In this chapter sequences generated from chaotic systems will substitute random numbers in all phases of PSO where it is necessary to make a random-based choice. By this way it is intended to develop the global convergence and to prevent to stick on a local solution. Furthermore, this chapter proposes a generalization of PSO based on rough values. The proposed chaotic rough particle swarm optimization algorithm (CRPSO) can complement the existing tools developed in rough computing using chaos. Definitions of basic building blocks of CRPSO such as rough decision variable, rough particle, and different chaotic maps will be provided. Applications of CRPSO in real life problems will be performed and comparisons will be made with others PSO algorithms and different optimization techniques. VI The 2nd chapter, “ Integration Method of Ant Colony Algorithm and Rough Set Theory for Simultaneous Real Value Attribute Discretization and Attribute Reduction”, first discusses the relationship between the problems of real value attribute discretization and attribute reduction in rough set theory. These two problems can be further syncretized as a unified problem based on the notion of distinction table. In this study, the authors consider that both the problems of finding a minimal set of cuts and that of finding a minimal set of attributes preserving the discernability of objects are important. Thus, an objective function with a weight parameter, which can balance these two objectives, is introduced. Secondly, the relationship between the unified problem and the set covering problem is analyzed, and a novel ant colony algorithm is proposed and employed to solve the set covering problem, which can automatically solve the problems of real value attribute discretization and attribute reduction. In order to avoid premature and enhance global search ability, a mutation operation will be added to the proposed ant colony algorithm. Moreover, a deterministic local search operation will be also adopted, which can improve the search speed of the algorithm. Thirdly, the validity and effectiveness of the proposed ant colony algorithm will be illustrated through case studies, and a comparison of different discretization algorithms will also be provided. The 3rd chapter, “A New Ant Colony Optimization Approach for the Degree-Constrained Minimum Spanning Tree Problem Using Pruefer and Blob Codes Tree Coding”, proposes a new ACO algorithm for the degree constrained minimum spanning tree (d-MST) problem that can address this challenge in a novel way. Instead of constructing the d-MST directly on the construction graph, ants construct the encoded d-MST. The authors use two wellknown tree-encodings: the Prüfer code, and the more recent Blob code. Under the proposed approach, ants will select graph vertices and place them into the Prüfer or Blob code being constructed. The proposed approach produced solutions that are competitive with state-ofthe-art metaheuristics for d-MST. The 4th chapter, “ Robust PSO-Based Constrained Optimization by Perturbing the PSO Memory” , reviews the standard PSO algorithm, and several proposals to improve both exploration and exploitation: local and global topologies, particle motion equations, swarm neighborhoods, and social interaction. For all these approaches the common shared feature is the change of the PSO main algorithm. The authors describe a rather different approach: the perturbation of the particle memory. In the PSO algorithm, the next particle position is based on its own flying experience (pbest), and the current best individual in either the entire swarm (gbest), or in a swarm neighborhood (lbest). Since the values for gbest or lbest are determined from the pbest values available at any generation, in the end, it is the pbest which is mainly responsible for the particle’s next position. Therefore, a way to reduce premature convergence is to improve the pbest of each particle. The proposed approach aims to prevent convergence to local optima by improving the swarm exploration and exploitation through two perturbation operators. These external operators improve the memory of the best visited locations, and do not modify the main PSO paradigm. The 5th chapter, “Using Crowding Distance to Improve Multi-Objective PSO with Local Search”, a local search and diversity maintaining mechanism based on crowding distance is incorporated into the Multi-Objective Particle Swarm Optimization (MOPSO). The local search procedure intends to explore the less-crowded area in the current archive to possibly obtain better non-dominated solutions nearby. The non-dominated solutions situated in the VII more-crowded area will be removed from the archive once the archive size reaches a prespecified level in order to maintain a well-balanced set of non-dominated solutions. Besides these, the non-dominated solutions in the less-crowded area are used to guide the population fly over sparse area of the current archive, such that a more uniform and diverse front might be formed by the optimizer. The proposed approach seeks to reach a reasonable compromise between the computational simplicity and efficiency. Several test problems and statistical comparison techniques are employed to check the performance of the approach. The 6th chapter, “Simulation Optimization Using Swarm Intelligence as Tool for Cooperation Strategy Design in 3D Predator-Prey Game”, the objective of this research is an automatic design of autonomous agents, which situated in inherently cooperative, but noisy and uncertain environments are capable of accomplishing complex tasks through interaction. It is adhered to the methodological holism based on the belief that any complex system or society is more than the sum of its individual entities. As an application example, a problem was taken as a basis where a predators' group must catch a prey in a threedimensional continuous ambient. A synthesis of system strategies was implemented of which internal mechanism involves the integration between simulators by PSO. The system had been tested in several simulation settings and it was capable to synthesize automatically successful hunting strategies, substantiating that the developed tool can provide, as long as it works with well-elaborated patterns, satisfactory solutions for problems of complex nature, of difficult resolution starting from analytical approaches. The 7th chapter, “Differential Meta-model and Particle Swarm Optimization”, the authors firstly give a brief introduction of the biological model of PSO, and then a differential metamodel is introduced to analysis the PSO evolutionary behavior. Under this method, differential evolutionary particle swarm optimization algorithms with two different types of controllers are discussed in third part. Finally, an extension to this model is illustrated to enhance the velocity information utilization ratio. The 8th chapter, “Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem”, introduces a relatively new member of swarm intelligence called Artificial Bee Colony (ABC). ABC tries to model natural behavior of real honey bees in food foraging. Honey bees use several mechanisms like waggle dance to optimally locate food sources and to search new ones. This makes them a good candidate for developing new intelligent search algorithms. In this chapter a review of work on ABC algorithms will be given. Afterwards, development of an ABC algorithm for solving generalized assignment problems which are known as NP-hard problems will be presented in detail along with some comparisons. The 9th chapter, “Finite Element Mesh Decomposition Using Evolving Ant Colony Optimization”, presents the application of evolving ant colony optimization to the decomposition (partitioning) of finite element meshes. The purpose of mesh decomposition is to allow large and complex finite element computations to be conducted in parallel (distributed) environment. The evolving ant colony optimization method in conjunction with a greedy algorithm and the collaboration of a neural network predictor provides the decomposition solutions to finite element meshes. This chapter also provides valuable information on ant colony optimization method which uses the evolutionary concepts in addition to swarm hypothesis for the partitioning of graph systems (special case: finite VIII element meshes). Finite element mesh partitioning (also referred to as domain decomposition or sub-domain generation) has been the subject of interest for many researchers in the areas of Civil, Structural, Aeronautical, Electrical, and Mechanical engineering. The proposed chapter also presents the application of predictive neural networks in collaboration with the ant colony optimization method for the decomposition of finite element meshes. The 10th chapter, “Swarm Intelligence and Image Segmentation”, presents a hybrid algorithm which combines SI with K-means. The authors also use the same method to combine SI with SCL. Their aim is to make the segmentation results of both K-means and SCL less dependent on the initial cluster centers and learning rate respectively, hence more stabilized and more accurate, by introducing hybrid techniques using the K-means and competitive learning algorithms, with Swarm Intelligence including ACO and PSO heuristics. This improvement is due to the larger search space provided by these techniques and their methodology of considering both spatial and intensity features of an image. In this chapter, the authors study the hybridization of PSO with each of the K-means and the SCL algorithms. A thorough comparison study on ACO-K-means, PSO-K-means, ACO-SCL, PSO-SCL, K-means, and SCL algorithms will also be provided. The 11th chapter, “Particle Swarm Optimization- Stochastic Trajectory Analysis and Parameter Selection”, proposes to investigate two important topics in Particle Swarm Optimization (PSO) which are trajectory analysis of particles and parameter selection. In the first part of this chapter, the trajectory of particle in a general PSO algorithm is theoretically investigated, considering the randomness thoroughly. By regarding each particle's position on each evolutionary step as a stochastic vector, the general PSO algorithm determined by five-dimensional parameter tuple { , c1, c2, a, b} is formally analyzed using stochastic process theory. Because the position of particle at each step is stochastic and cannot be determined directly, its expected value, variance and covariance are investigated instead of the position itself, and corresponding explicit expression of each particle’s trajectory is determined. The trajectory analysis leads to a sufficient condition to ensure the convergence of particle swarm system, which is verified by simulation experiments. At the same time, the relationship between convergent speed of particle’s trajectory and parameter sets is studied. Those results give some hints on how the chosen parameters can influence the performance of PSO algorithm, and thus parameter selection guideline is given. After that, a set of suggested parameter { =0.715, c1=c2=1.7} is given, which is compared against three sets of parameters which are proposed in literatures. The 12th chapter, “Stochastic Metaheuristics as Sampling Techniques using Swarm Intelligence”, focuses on stochastic methods, which form the majority of metaheuristics. Stochastic optimization metaheuristics can be viewed as methods manipulating a sample of the objective function, with different probabilistic operators. These operators are often met in several metaheuristics, despite the fact that they are presented as different ones, because of the metaphoric aspects of the algorithmic idea. The authors propose to consider three types of metaheuristics, according to the way they generate the sample: (i) directly; (ii) explicitly; or (iii) implicitly. The first type uses the objective function as a probability density function (pdf) to generate the sample, whereas the explicit methods make use of a specific pdf to do so. Methods of the last type construct an implicit probability density function, they IX are the most known algorithms. The different operators can be classified into three archetypal behaviors: diversification, intensification and learning. Moreover, one of the key aspects of the metaheuristics is the way these operators are designed. The authors argue that most of these algorithms make use of swarm intelligence techniques for their operators. This feature is evident for operators specialized in learning. The 13th chapter, “Artificial Ants in the Real World: Solving On-line Problems using Ant Colony Optimization”, pointed out several new future directions for Ant Colony Optimization (AGO) researches including (i) how to adjust parameters which depends on the optimization problems; (ii) how to reduce the execution time; (iii) the optimization improvement by using incremental local search; and (iv) the aggregation of different and new concepts to AGO. New Industrial Applications of Swarm Intelligence Techniques The 14th chapter, “Application of PSO to design UPFC-based stabilizers”, the objective of this chapter is to investigate the potential of particle swarm optimization as a tool in designing an unified power flow controller (UPFC) -based stabilizers to improve power system transient stability. To estimate the controllability of each of the UPFC control signals on the electromechanical modes, singular value decomposition is employed. The problem of designing all the UPFC-based stabilizers individually is formulated as an optimization problem. Particle swarm optimizer is utilized to search for the optimum stabilizer parameter settings that optimize a given objective function. Coordinated design of the different stabilizers is also carried out by finding the best parameter settings for more than one stabilizer at a given operating condition in a coordinated manner. The 15th chapter, “CSV-PSO and Its Application in Geotechnical Engineering”, introduces a new algorithm to recognize the parameters for the visco-elastic-brittle-plastic model of rock masses using a parallel improved practice swarm optimization (PSO). Using case studies, the algorithm is used to recognize parameters of surrounding rocks for a long tunnel excavated at depth of 1500-2500 m, which has serious rockburst and water burst problem during construction. The analysis on tunnel stability based the recognized parameters are good guidance to safe excavation of tunnel and to avoid accident occurrence. The 16th chapter, “Power Plant Maintenance Scheduling Using Ant Colony Optimization”, a formulation has been developed that utilizes ant colony optimization (ACO) to obtain the optimal start times of power plant maintenance tasks of fixed durations and tested on a 21 unit benchmark case study. Subsequently, the formulation has been extended to take into account a number of practical issues commonly encountered in real world optimization maintenance scheduling, such as the shortening and deferral of maintenance tasks, and tested on a 5-unit hydropower system. The above power plant maintenance scheduling optimization formulations are further tested on four case studies, including two benchmark case studies previously solved using genetic algorithms (GAs) and tabu search (TS), and modified versions of the two case studies. In particular, a general heuristic formulation is introduced and its effectiveness in solving PPMSO problems is investigated. In addition, the performance of ACO-PPMSO when coupled with two local search strategies is investigated. The usefulness of both a heuristic formulation and the two local search strategies are assessed using two different ACO algorithms, including the Elitist-Ant System (EAS) and X Max-Min Ant System (MMAS). A wide range of ACO parameters are considered. The 17th chapter, “Particle Swarm Optimization for simultaneous Optimization of Design and Machining Tolerances”, proposes a sophisticated constraints handling scheme suitable for the optimization mechanism of PSO to solve complicated engineering problems. The issue in this work concerns about the application of the constraints handling scheme in tolerances optimization. Tolerance assignment in product design and process planning (machining) affects both the quality and the cost of the overall product cycle. It is a crucial issue to determine how much the tolerance should be relaxed during the assignment process. However, this separated approach in tolerance design always suffers from several drawbacks. This chapter concerns about the simultaneous tolerance optimization in the concurrent engineering context. Generally, this problem is characterized by nonlinear objective, multiple independent variables, and tight constraints. To demonstrate the efficiency and effectiveness of the proposed approach, an example involving simultaneously assigning both design and machining tolerances based on optimum total machining cost is employed. The experimental results based on the comparison between PSO and GA show that the new PSO model is a powerful tool and can be extended into many other engineering applications. The 18th chapter, “Hybrid method for the layout problem”, proposes a method for solving a facility layout problems modeled as a Quadratic Assignment Problem (QAP). It is based upon ant colony optimization with a Guided Local Search (GLS) procedure to escape from local minima. The method is first applied to a particular industrial problem, and then, the performance is evaluated on small instances as well as large instances from the public library QAPLIB. The 19th chapter, “Selection of best alternative process plan in automated manufacturing environment: An approach based on particle swarm optimization”, attempts to solve the complex Process Plan Selection (PPS) problem using an Intelligent Particle Swarm Optimization algorithm with modified concept of Local Repeller (IPSO-LR). This chapter formulates the PPS problem in a more justifiable way by the incorporation of a new parameter termed as Similarity Attribute ( ë ) that keeps the track of similarity among part types to be manufactured. The algorithm emulates the behaviour of particles in a swarm and explores the search area by interacting with neighbours and utilizes the successes of other particles with regard to reaching towards optima. Robustness and efficacy of the proposed strategy is established by solving the problem of real dimensions and comparing the results with the established solution methodologies in process planning field. The 20th chapter, “Job-shop scheduling and visibility studies with a hybrid ACO algorithm”, solves job-shop scheduling problems and compares different types of ACO variants, namely Elitist AS (EAS), Ant Colony System (ACS), Rank-based AS (RAS), and MIN-MAX AS (MMAS). The post-processing algorithm will be included in the comparisons and similar visibility schemes will also be taken into considerations in this new work. The same well known job-shop scheduling problem MT10 (Muth-Thompson) will be used when evaluating the suitability of the different approaches for solving job-shop scheduling problems. The 21st chapter, “Particle Swarm Optimization in Structural Design”, presents the implementation and application of particle swarm optimization for constrained structural design tasks. This chapter starts by presenting a general background of the particle swarm XI algorithm, including its basic implementation and convergence properties. Subsequently, it discusses different improvements which can be made to the basic algorithm to handle constrained optimization problems. The improvements include violated point redirection, and the use of different constraint handling approaches such as penalty, adaptive penalty, and augmented Lagrangian formulations. The effect of the swarm setting parameters and the usefulness of the constraint handling improvements are shown for classic structural optimization problems. In the scope of such examples, guidelines for the setting parameters to guarantee proper convergence are shown, and the behavior of the constraint handling approaches are discussed. This chapter finalizes with discussion of outstanding issues regarding the practical application of particle swarms for constrained optimization in structures and other fields. The 22nd chapter, “Reserve-Constrained Multiarea Environmental/Economic Dispatch Using Enhanced Particle Swarm Optimization”, extends the concept of Multiarea Economic Dispatch (MAED) into Multiarea Environmental/Economic Dispatch (MAEED) by taking into account the environmental issue. The objective of MAEED is to dispatch the power among different areas by simultaneously minimizing the operational costs and pollutant emissions. In this chapter, the MAEED problem is first formulated and then an enhanced multi-objective particle swarm optimization (MOPSO) algorithm is developed to derive its Pareto-optimal solutions. The tie-line transfer limits are considered as a set of constraints during the optimization process to ensure the system security. Furthermore, the area spinning reserve requirements are incorporated in order to increase the system reliability. The reserve sharing scheme is applied to ensure that each area is capable of satisfying the reserve demand. Simulations based on a four-area test power system are carried out to illustrate the effectiveness of the proposed optimization procedure as well as the impacts caused by the different problem formulations. The 23rd chapter, “Hybrid Ant Colony Optimization for the Channel Assignment Problem in Wireless Communication”, presents a hybrid ant colony optimization (ACO) algorithm embodied with the sequential packing heuristic to take advantages of both approaches. The ACO algorithm provides an elegant framework for maintaining a good balance between exploration and exploitation during the search, while the sequential packing heuristic is customized to the channel assignment problem and is helpful in intensifying the promising area previously found. The performance of the proposed algorithm is evaluated using a set of benchmark problems named Philadelphia that has been broadly used in the relevant literature. As such the proposed algorithm can be directly compared to previous approaches. The 24th chapter, “Case Study Based Convergence Behaviour Analysis of ACO Applied to Optimal Design of Water Distribution Systems”, focuses on the application of ACO to the optimal design of water distribution systems. The emphasis of this chapter is to: (i) illustrate an example of how ACO can be applied to a long standing engineering problem; (ii) assess the performance of a number of ACO algorithms applied to this problem; and (iii) analyze the algorithms performances at a behavioral level to further understand the algorithms themselves and the nature of the optimization problem. The 25th chapter, “A CMPSO algorithm based approach to solve the multi-plant supply chain problem”, presents the idea behind this proposed CMPSO algorithm which is come from the limitations associated with the existing PSO algorithm under the discussed XII problem scenario. The proposed CMPSO algorithm has been applied in multi-plant supply chain environment which has proven to be NP hard problem. In order to prove the efficacy and robustness of the proposed CMPSO algorithm, it has been compared with the existing evolutionary algorithms. Furthermore the authors have also shown the statistically validation of CMPSO algorithm. The proposed research aims towards exploring the applicability of PSO technique under diverse situations by inheriting some new concepts. These hybrid PSO techniques (such as CMPSO) could be applied to efficiently solve number of computationally complex problems prevailing in manufacturing environment. The 26th chapter, “Ant colonies for performance optimization of multi-components systems subject to random failures”, focuses on the use of ant colonies to solve optimal design problems including (i) the reliability optimization of series systems with multiplechoice constraints incorporated at each subsystem, to maximize the system reliability subject to the system budget; (ii) the redundancy allocation problem (RAP) of binary series-parallel systems. This is a well known NP-hard problem which involves the selection of elements and redundancy levels to maximize system reliability given various system-level constraints. As telecommunications and internet protocol networks, manufacturing and power systems are becoming more and more complex, while requiring short developments schedules and very high reliability, it is becoming increasingly important to develop efficient solutions to the RAP; and (iii) buffers and machines selections in unreliable seriesparallel production lines. The objective is to maximize production rate subject to a total cost constraint. The optimal design problem is formulated as a combinatorial optimization one where the decision variables are buffers and types of machines, as well as the number of redundant machines. The 27th chapter, “Distributed Particle Swarm Optimization for Structural Bayesian Network Learning”, presents a recent study of the PSO implementation on a cluster of computers using parallel computing tools and algorithms. The PSO is used to discover the best Bayesian Network structure for diagnosing faults in airline engines. This chapter focuses on PSO implementation as well as Bayesian Network learning from large datasets. Learning Bayesian Networks from large datasets is an NP hard problem with disabling computational limits. By applying PSO in a distributed fashion, the computational limits can be eased and better networks can be generated. I find great pleasure to announce that this book has attracted a great attention and response from researchers in the area of Swarm Intelligence. In particular, these chapters constitute state of the art research-based contributes in the field of swarm intelligence with particular focus on the ant and particle Swarm Optimization techniques. I sincerely hope you find the chapters as useful and interesting as I did. I look forward to seeing another technological breakthrough in this area in the near future. Felix T. S. Chan Manoj Kumar Tiwari XIII Contents Preface ........................................................................................................................................ V Recent Development of Swarm Intelligence Techniques 1. Chaotic Rough Particle Swarm Optimization Algorithms .......................................... 001 B ilal Alatas and Erhan Akin 2. Integration Method of Ant Colony Algorithm and Rough Set Theory for Simultaneous Real Value Attribute Discretization and Attribute Reduction ......... 015 Yijun He, Dezhao Chen and Weixiang Zhao 3. A New Ant Colony Optimization Approach for the Degree-Constrained Minimum Spanning Tree Problem Using Pruefer and Blob Codes Tree Coding ....... 037 Yoon-Teck Bau, Chin-Kuan Ho and Hong-Tat Ewe 4. Robust PSO-Based Constrained Optimization by Perturbing the PSO Memory ... 057 Angel Munoz Zavala, Arturo Hernandez Aguirre and Enrique Villa Diharce 5. Using Crowding Distance to Improve Multi-Objective PSO with Local Search ..... 077 Ching-Shih Tsou and Po-Wu Lai 6. Simulation Optimization Using Swarm Intelligence as Tool for Cooperation Strategy Design in 3D Predator-Prey Game .......................... 087 Emiliano G. Castro and Marcos S. G. Tsuzuki 7. Differential Meta-model and Particle Swarm Optimization ........................................ 101 Jianchao Zeng and Zhihua Cui 8. Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem .............................................. 113 Adil Baykasoglu, Lale Ozbakor and Pinar Tapkan 9. Finite Element Mesh Decomposition Using Evolving Ant Colony Optimization ............................................. 145 A rdeshir Bahreininejad XIV 10. Swarm Intelligence and Image Segmentation ........................................................... 163 S ara Saatchi and Chih Cheng Hung 11. Particle Swarm Optimization: Stochastic Trajectory Analysis and Parameter Selection .............................................. 179 M. Jiang, Y. P. Luo and S. Y. Yang 12. Stochastic Metaheuristics as Sampling Techniques using Swarm Intelligence ............................................................ 199 Johann Dreo and Patrick Siarry 13. Artificial Ants in the Real World: Solving On-line Problems Using Ant Colony Optimization ............................................ 217 B runo R. Nery, Rodrigo F. de Mello, Andre P. L. F. de Carvalho and Laurence T. Yan New Industrial Applications of Swarm Intelligence Techniques 14. Application of PSO to Design UPFC-based Stabilizers ............................................ 235 A li T. Al-Awami, Mohammed A. Abido and Youssef L. Abdel-Magid 15. CSV-PSO and Its Application in Geotechnical Engineering .................................... 263 B ing-rui Chen and Xia-ting Feng 16. Power Plant Maintenance Scheduling Using Ant Colony Optimization ................ 289 Wai Kuan Foong, Holger Robert Maier and Angus Ross Simpson 17. Particle Swarm Optimization for Simultaneous Optimization of Design and Machining Tolerances .............................. 321 L iang Gao, Chi Zhou and Kun Zan 18. Hybrid Method for the Layout Problem ....................................................................... 331 Y asmina Hani, Lionel Amodeo, Farouk Yalaoui and Haoxun Chen 19. Selection of Best Alternative Process Plan in Automated Manufacturing Environment: An Approach Based on Particle Swarm Optimization ........................... 343 F.T.S. Chan, M.K. Tiwari and Y. Dashora 20. Job-shop Scheduling and Visibility Studies with a Hybrid ACO Algorithm ......... 355 Heinonen, J. and Pettersson, F. 21. Particle Swarm Optimization in Structural Design .................................................... 373 Ruben E. Perez and Kamran Behdinan 22. Reserve-Constrained Multiarea Environmental / Economic Dispatch Using Enhanced Particle Swarm Optimization ............................................... 395 L ingfeng Wang and Chanan Singh XV 23. Hybrid Ant Colony Optimization for the Channel Assignment Problem in Wireless Communication .......................................... 407 Peng-Yeng Yin and Shan-Cheng Li 24. Case Study Based Convergence Behaviour Analysis of ACO Applied to Optimal Design of Water Distribution Systems .............................. 419 A aron C. Zecchin, Holger R. Maier and Angus R. Simpson 25. A CMPSO Algorithm based Approach to Solve the Multi-plant Supply Chain Problem ............................................ 447 Felix T. S. Chan, Vikas Kumar and Nishikant Mishra 26. Ant Colonies for Performance Optimization of Multi-components Systems Subject to Random Failures ......................................... 477 Nabil Nahas, Mustapha Nourelfath and Daoud Ait-Kadi 27. Distributed Particle Swarm Optimization for Structural Bayesian Network Learning ............................................... 505 Ferat Sahin and Archana Devasia 1 Chaotic Rough Particle Swarm Optimization Algorithms Bilal Alatas and Erhan Akin Firat University Turkey 1. Introduction The problem of finding appropriate representations for various is a subject of continued research in the field of artificial intelligence and related fields. In some practical situations, mathematical and computational tools for faithfully modeling or representing systems with uncertainties, inaccuracies or variability in computation should be provided; and it is preferable to develop models that use ranges as values. A need to provide tolerance ranges and inability to record accurate values of the variables are examples of such a situation where ranges of values must be used (Lingras, 1996). Representations with ranges improve data integrity for non-integral numerical attributes in data storage and would be preferable due to no lose of information. Rough patterns proposed by Lingras are based on an upper and a lower bound that form a rough value that can be used to effectively represent a range or set of values for variables such as daily weather, stock price ranges, fault signal, hourly traffic volume, and daily financial indicators (Lingras, 1996; Lingras & Davies, 2001). The problems involving, on input/output or somewhere at the intermediate stages, interval or, more generally, bounded and set-membership uncertainties and ambiguities may be overcome by the use of rough patterns. Further developments in rough set theory have shown that the general concept of upper and lower bounds provide a wider framework that may be useful for different types of applications (Lingras & Davies, 2001). Generating random sequences with a long period and good uniformity is very important for easily simulating complex phenomena, sampling, numerical analysis, decision making and especially in heuristic optimization. Its quality determines the reduction of storage and computation time to achieve a desired accuracy. Chaos is a deterministic, random-like process found in non-linear, dynamical system, which is non-period, non-converging and bounded. Moreover, it has a very sensitive dependence upon its initial condition and parameter (Schuster, 1998). The nature of chaos is apparently random and unpredictable and it also possesses an element of regularity. Mathematically, chaos is randomness of a simple deterministic dynamical system and chaotic system may be considered as sources of randomness. Chaotic sequences have been proven easy and fast to generate and store, there is no need for storage of long sequences (Heidari-Bateni & McGillem, 1994). Merely a few functions (chaotic maps) and few parameters (initial conditions) are needed even for very long sequences. In addition, an enormous number of different sequences can be generated simply 2 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization by changing its initial condition. Moreover these sequences are deterministic and reproducible. The choice of chaotic sequences is justified theoretically by their unpredictability, i.e., by their spread-spectrum characteristic, and ergodic properties. In this chapter, a generalization of particle swarm optimization (PSO) based on rough values has been proposed. Furthermore, sequences generated from chaotic systems substitute random numbers in all phases of PSO where it is necessary to make a random-based choice. By this way it is intended to develop the global convergence and to prevent to stick on a local solution. The proposed chaotic rough particle swarm optimization algorithm (CRPSO) can complement the existing tools developed in rough computing using chaos. Definitions of basic building blocks of CRPSO such as rough decision variable, rough particle, and different chaotic maps have been provided. Application of CRPSO in data mining has also been performed. 2. Rough Particle Swarm Optimization (RPSO) Objects, instances, or records can be described by a finite set of attributes. The description of an object is an n-dimensional vector, where n is the number of attributes that characterizes an object. A pattern is a class of objects based on the values of some attributes of objects belonging to the class. Let x be an attribute in the description of an object and x, x represent lower and upper bounds (endpoints) of x such that x ≤ x . A rough pattern value of each attribute variable consists of lower and upper bounds and can be presented as Eq. (1). It can be diagrammatically seen in Figure 5. It is as a closed, compact, and bounded subset of the set of real numbers R. x = x, x () (1) x x Figure 1. A rough value x If 0 ≤ x the rough value is called a positive rough value, and we write x > 0. Conversely, if x ≤ 0 we call the rough value a negative rough value, and write x < 0. Positive or negative rough values are the two types of sign coherent rough values. If x = 0 or x = 0 we call the rough value a zero-bound rough value. A zero-bound positive rough value is called a zeropositive rough value. Similarly, a zero-bound negative rough value is called a zero-negative rough value. A rough value that has both positive and negative values is called a zerostraddling rough value. These definitions are summed up in Table 1. Chaotic Rough Particle Swarm Optimization Algorithms 3 Definition positive rough value (x>0) negative rough value (x<0) zero-positive rough value (x ≥ 0) zero-negative rough value (x ≤ 0) zero-straddling rough value (x<>0) Table 1. Definitions on rough values Condition Iff Iff Iff Iff Iff x >0 x <0 x =0 x =0 x >0 and x <0 The midpoint (mid), radius (rad), and width of a rough value x are defined as: mid ( x ) = ( x + x ) / 2 (2) (3) (4) rad ( x ) = ( x − x ) / 2 width(x ) = ( x − x ) =2rad(x) Since x = (mid(x)-rad(x), mid(x)+rad(x)) rough values can also be represented in terms of midpoint and radius instead of endpoints. Rough values are useful in representing an interval or set of values for an attribute, where only lower and upper bounds are considered relevant in a computation. It may be very popular for many areas of computational mathematics. For example, by computing with rough values, it is possible (with some error) to evaluate a function over an entire interval rather than a single value. In other words, if we evaluate a function f(x) over some interval of x (e.g. x ∈ ( x, x )), we know what the possibly overestimated bounds of the function are within that interval. Since working with rough values always produces exact or overestimated bounds, it cannot miss a critical value in a function. Therefore, it is very useful for robust root finding, global maximum/minimum finding, and other optimization problems. In fact, a conventional pattern can be easily represented as a rough pattern by using both lower and upper bounds to be equal to the value of the variable. Some operations on rough values can be implemented as: x + y = x, x + y , y = x + y , x + y ( )( )( ) (5) x − y = x, x + − y, y = x − y, x − y ( ) ( ( )) ( ) (6) x × y = min x y, x y, x y, x y , max x y, x y, x y, x y 1 1 1 = , , x x x 0 ∉ x, x (( ) ( )) (7) (8) (9) () 0 ∉ y, y x x, x x, x = = , y y, y 1 1 , y y ()() () () 4 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization c × x, c × x c × x = c × x, x = x, x × c = c × x, c × x ( )( ) ( ( ) ) if if c≥0 c<0 (10) In fact, these operations are borrowed from the conventional interval calculus (Lingras & Davies, 1999). The algebraic properties of addition and multiplication operations on rough values have been described in Table 2. Algebraic properties Commutativity xy=yx (x+y)+z=x+(y+z) Associativity (xy)z=x(yz) Neutral Element 0+x=x No condition 1.x=x x(y+z)=xy+xz x(y+z)=xy+xz x(y+z)=xy+xz Distributivity x(y+z)=xy+xz x(y+z)=xy+xz x(y-z)=xy-xz x(y-z)=xy-xz Table 2. Algebraic properties A rough particle r is string of rough parameters ri: r = (ri | 1 ≤ i ≤ n ) Description x+y=y+x Condition No condition No condition If x=x If y ≥ 0 and z ≥ 0 (non-negative terms) If y ≤ 0 and z ≤ 0 (non-positive terms) If x ≥ 0, If x ≤ 0, y =0 and z =0 (positive factor, zero-straddling terms) y =0 and z =0 (negative factor, zero- straddling terms) If y ≥ 0 and z ≤ 0 (non-negative terms variation) If y ≤ 0 and z ≥ 0 (non-positive terms variation) (11) A rough parameter ri is a pair of conventional parameters, one for lower bound called lower parameter ( ri ) and the other for upper bound called upper parameter ( ri ): Chaotic Rough Particle Swarm Optimization Algorithms 5 ri = ri , ri Figure 2 shows examples of rough particles. () (12) Figure 2. Rough particles The value of each rough parameter is the range for that variable. The use of range shows that the information represented by a rough particle is not precise. Hence, an information measure called precision may be useful when evaluating the fitness levels (Lingras, 1996; Lingras & Davies, 2001). ri − ri precision(r ) = − ∑ 1≤i ≤ n Rangemax (ri ) (13) Here, Rangemax (ri ) is the length of maximum allowable range for the value of rough parameter ri. The conventional parameters and particles used in PSO algorithms are special cases of their rough equivalents as shown in Figure 3. For a conventional particle p, precision(p) has the maximum possible value of zero. Figure 3. Conventional particle and its rough equivalent In boundary constraint problems, it is essential to ensure that values of decision variables lie inside their allowed ranges after velocity or position update equations. This technique can also be generalized for RPSO algorithm. Constraint that the lower bounds in rough variables should be less than the upper bounds is already satisfied with RPSO algorithm. 3. Chaotic Particle Swarm Optimization (CPSO) Generating random sequences with a long period and good uniformity is very important for easily simulating complex phenomena, sampling, numerical analysis, decision making and especially in heuristic optimization. Its quality determines the reduction of storage and computation time to achieve a desired accuracy. Generated such sequences may be “random” enough for one application however may not be random enough for another. 6 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Chaos is a deterministic, random-like process found in non-linear, dynamical system, which is non-period, non-converging and bounded. Moreover, it has a very sensitive dependence upon its initial condition and parameter (Schuster, 1998)]. The nature of chaos is apparently random and unpredictable and it also possesses an element of regularity. Mathematically, chaos is randomness of a simple deterministic dynamical system and chaotic system may be considered as sources of randomness. A chaotic map is a discrete-time dynamical system x k +1 = f ( x k ), 0 < x k < 1, k = 0, 1, 2, L (14) running in chaotic state. The chaotic sequence {x k :k = 0, 1, 2, L } can be used as spread- spectrum sequence as random number sequence. Chaotic sequences have been proven easy and fast to generate and store, there is no need for storage of long sequences (Heidari-Bateni & McGillem, 1994). Merely a few functions (chaotic maps) and few parameters (initial conditions) are needed even for very long sequences. In addition, an enormous number of different sequences can be generated simply by changing its initial condition. Moreover these sequences are deterministic and reproducible. Recently, chaotic sequences have been adopted instead of random sequences and very interesting and somewhat good results have been shown in many applications such as secure transmission (Wong et al., 2005; Suneel, 2006), and nonlinear circuits (Arena et al., 2000), DNA computing (Manganaro & Pineda, 1997), image processing (Gao et al., 2006). The choice of chaotic sequences is justified theoretically by their unpredictability, i.e., by their spread-spectrum characteristic and ergodic properties. One of the major drawbacks of the PSO is its premature convergence, especially while handling problems with more local optima. In this paper, sequences generated from chaotic systems substitute random numbers for the PSO parameters where it is necessary to make a random-based choice. By this way, it is intended to improve the global convergence and to prevent to stick on a local solution. For example, the value of inertia weight is the key factors to affect the convergence of PSO. Furthermore the values of random numbers that affect the stochastic nature are also key factors that affect the convergence of PSO. In fact, however, these parameters can’t ensure the optimization’s ergodicity entirely in phase space, because they are random in traditional PSO. New approaches introducing chaotic maps with ergodicity, irregularity and the stochastic property in PSO to improve the global convergence by escaping the local solutions have been provided. The use of chaotic sequences in PSO can be helpful to escape more easily from local minima than can be done through the traditional PSO. When a random number is needed by the classical PSO algorithm it is generated by iterating one step of the chosen chaotic map that has been started from a random initial condition at the first iteration of the PSO. New chaos embedded PSO algorithms may be simply classified and described as Table 3. In this table first column represents the name of PSO. The second column represents which values it effect to. And the last column, divided in to three sub columns, represents the bounds of the values they can take from the selected chaotic maps. For example CPSO3 only effects to second acceleration coefficient (c2) and the values taken from the selected chaotic map is scaled between 0.5 and 2.5. When rough representation is used these names take a “R” for representing the “Rough” after “C” that represents “Chaotic”. Namely when rough representation is used for “CPSO1” it is named as “CRPSO1”. Chaotic Rough Particle Swarm Optimization Algorithms 7 Name CPSO1 CPSO2 CPSO3 CPSO4 CPSO5 CPSO6 CPSO7 CPSO8 CPSO9 CPSO10 CPSO11 CPSO12 Effect Initial velocities and position c1 c2 c1 and c2 r1 r2 r1 and r2 w, r1, and r2 w w and c1 w and c2 w, c1, and c2 Scaled Values of Chaotic Maps Lower bound - upper bound of each decision variable 0.5 – 2.5 0.5 – 2.5 0.5 – 2.5 0.5 – 2.5 0.0 – 1.0 0.0 – 1.0 0.0 – 1.0 0.0 – 1.0 0.0 – 1.0 0.0 – 1.0 0.0 – 1.0 0.0 – 1.0 0.0 – 1.0 0.5 – 2.5 0.0 – 1.0 0.5 – 2.5 0.0 – 1.0 0.5 – 2.5 0.5 – 2.5 Table 3. Characteristics of CPSO algorithms Note that CPSO1 can be used together with the other CPSO classes. The chaotic maps that generate chaotic sequences in PSO phases used in the experiments are listed below. Logistic Map: One of the simplest maps which was brought to the attention of scientists by Sir Robert May in 1976 that appears in nonlinear dynamics of biological population evidencing chaotic behavior is logistic map, whose equation is the following (May, 1976): Xn+1 = aXn(1 – Xn) (15) In this equation, Xn is the n-th chaotic number where n denotes the iteration number. Obviously, Xn ∈ (0, 1) under the conditions that the initial X0 ∈ (0, 1) and that X0 ∉ {0.0, 0.25, 0.5, 0.75, 1.0}. a=4 have been used in the experiments. Sinusoidal Iterator: The second chaotic sequence generator used in this paper is the socalled sinusoidal iterator (Peitgen et al., 1992) and it is represented by 2 X n +1 = axn sin(πxn ) (16) When a=2.3 and X0=0.7 it has the simplified form represented by X n +1 = sin(πx n ) (17) It generates chaotic sequence in (0, 1) Gauss Map: The Gauss map is used for testing purpose in the literature (Peitgen et al., 1992) and is represented by: 0 , Xn = 0 X n +1 = 1 / X n mod(1) , X n ∈ (0,1) 1 / X n mod(1) = 1 1 − Xn Xn (18) (19) and z denotes the largest integer less than z and acts as a shift on the continued fraction representation of numbers. This map also generates chaotic sequences in (0, 1). 8 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Zaslavskii Map: The Zaslavskii Map (Zaslavskii, 1978) is an also an interesting dynamic system and is represented by: X n +1 = X n + v + aYn +1 mod(1) ( Yn +1 = cos 2πX + e n () ) (20) (21) −r Yn Its unpredictability by its spread-spectrum characteristic and its large Lyapunov exponent are theoretically justified. The Zaslavskii map shows a strange attractor with largest Lyapunov exponent for v=400, r=3, a=12. Note that in this case, Yn+1 ∈ [-1.0512, 1.0512]. 4. CRPSO in Data Mining CRPSO has been used for mining numeric association rules (ARs) from databases in which records concerned are categorical or numeric. In a numeric AR, attributes are not limited to being Boolean but can be numeric (e.g. age, salary, and heat) or categorical (e.g. sex, brand). Thus, numeric ARs are more expressive and informative than Boolean ARs (Ke et al., 2006). An example of a numeric AR in an employee database is: “Age ∈ [25, 36] ∧ Sex=Male ⇒ Salary ∈ [2000-2400] ∧ Have_Car=Yes” (Support = 4%, Confidence = 80%). In this numeric AR, “Age ∈ [25, 36] ∧ Sex=Male” is antecedent and “Salary ∈ [20002400] ∧ Have_Car=Yes” is consequent part. This numeric AR states that “4% (support) of the employees are males aged between 25 and 36 and earning a salary of between $2.000 and $2.400 and have a car”, while “80 % (confidence) of males aged between 25 and 36 are earning a salary of between $2.000 and $2.400 and have a car”. Following subsections are description of CRPSO for mining numeric ARs. 4.1 Particle representation In this work, the particles which are being produced and modified along the search process represent rules. Each particle consists of decision variables which represent the items and intervals. A positional encoding, where the i-th item is encoded in the i-th decision variable has been used. Each decision variable has three parts. The first part of each decision variable represents the antecedent or consequent of the rule and can take three values: ‘0’, ‘1’ or ‘2’. If the first part of the decision variable is ‘0’, it means that this item will be in the antecedent of the rule and if it is ‘1’, this item will be in the consequent of the rule. If it is ‘2’, it means that this item will not be involved in the rule. All decision variables which have ‘0’ on their first parts will form the antecedent of the rule while decision variables which have ‘1’ on their first part will form the consequent of the rule. While the second part represents the lower bound, the third part represents the upper bound of the item interval. The structure of a particle has been illustrated in Figure 4, where m is the number of attributes of data being mined (Alatas et al., 2007). AC1 Variable1 LB1 UB1 AC2 Variable2 LB2 UB2 ... ACm Variablem LBm UBm Figure 4. Particle representation Chaotic Rough Particle Swarm Optimization Algorithms 9 Rounding operator that converts a continuous value to an integer value for the first parts of this representation by truncation is performed when evaluating. Rounded variables are not elsewhere assigned in order to let CRPSO algorithm work with a swarm of continuous variables regardless of the object variable type for maintaining the diversity of the swarm and the robustness of the algorithm. In the implementation of this particle representation, the second and third part of decision variables will be considered as one value, namely rough value. At first glance, this representation seems to appropriate for only numeric attributes. However it is very straightforward to extend it for discrete, nominal, and numeric attributes. The numeric attributes locates at the beginning of the representation and discrete ones at the end. For discrete attributes only ACi and Vi where Vi is the value of the attribute are used. Namely, instead of LBi and UBi, only Vi is used for values of discrete or nominal attributes. 4.2 Fitness Function The mined rules have to acquire large support and confidence. CRPSO has been designed to find the intervals in each of the attributes that conform an interesting rule, in such a way that the fitness function itself is the one that decides the amplitude of the intervals. That is why, the fitness value has to appropriately shelter these and it has been shown in Eq. (22). Fitness = α1 × cover (Ant+Cons)+ α 2 × cover(Ant + Cons) + α 3 × (NA)- α 4 × cover(Ant) Int- α 5 × marked (22) This fitness function has four parts. Here, Ant and Cons are distinct itemsets that are involved in the antecedent and consequent part of the rule respectively. cover (Ant+Cons) is ratio of the records that contain Ant+Cons to the total number of records in the database. The first part can be considered as support of the rule that is statistical significance of an AR. In fact, the second part can be considered as confidence value. The third part is used for number of attributes in the particle. NA is number of attributes in the database that has not ‘2’ in first parts of decision variable of particles. The motivation behind this term is to bias the system to give more quality information to the final user. The last part of the fitness is used to penalize the amplitude of the intervals that conform the itemset and rule. In this way, between two particles that cover the same number of records and have the same number of attributes, the one whose intervals are smaller gives the best information. Int has been computed as shown in Eq. (23) where ampm is the amplitude factor determined for each attribute for balancing the effect of Int to the fitness. UBm − LBm ampm (23) marked is used to indicate that an attribute of a records has previously been covered by a rule. Algorithm is forced to mine different rules in later searches by this way. α1 , α 2 , α 3 , α 4 , α 5 are user specified parameters and one might increase or decrease the effects of parts of fitness function by means of these parameters. Int part of the fitness calculation concerns particles parts representing numeric attributes. 10 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 4.3 Mutation Mutation has also been performed in this study. Mutation operator is introduced which mutates a single decision vector of a particle with probability pmut. Four possible mutations (Mata et al., 2002) have been used for CRPSO algorithms: • Shifting the whole interval towards the right: The values in lower and upper bounds are increased. • Shifting the whole interval towards the left: The values in lower and upper bounds are decreased. • Incrementing the interval size: The value of lower bound is decreased and the value of upper bound is increased. • Reducing the interval size: The value of lower bound is increased and the value of upper bound is decreased. When a particle is chosen to be mutated each decision value is then mutated by one of this four mutation types or not with probability l/m, where m is the number of decision value in the particle. Particle positions are updated only if the mutated particles have better fitness. 4.4 Refinement of bound intervals At the end of the CRPSO search, a refinement in the attributes bounds that belong to the covered rule is performed. This refinement process consists reducing the interval size until the support value is smaller than the support of the original rule encoded in the related particle. 4.5. Parameter Control The used parameter values for the experiments have been shown in Table 4. Minimum and maximum values for velocity and position depend on the bounds of the decision values. α1 , α 2 , α 3 , α 4 , and α 5 that have been used in fitness values were selected as 0.8, 0.8, 0.05, 0.1, and 0.2 respectively. Parameters Values Swarm size 20 No. of generations 1000 Mutation Probability 0.5 Table 4. Used parameters for PSO algorithms 5. Experimental Results Synthetic database is created using the function 2 (Agrawal et al., 1993) to distribute the values in records in such a way that they are grouped in pre determined sets. The function is shown in Figure 5. The goal is to most accurately find the intervals of each of the created regions. Namely, a group is assigned to each record, depending on the values that the attributes age and salary take. Figure 6 shows a graphic representation of the distribution of 5000 records according to the function where only records belong to Group A are presented. Chaotic Rough Particle Swarm Optimization Algorithms 11 If ((age < 40) ∧ (50K ≤ salary ≤ 100K)) ∨ ((40 ≤ age<60) ∧ (75K ≤ salary ≤ 125K)) ∨ ((age ≥ 60) ∧ (25K ≤ salary ≤ 75K)) ⇒ Group A else ⇒ Group B Figure 5. Function used for the experiment Figure 6. Graphic representation of the function for the experiment The database has been generated by uniformly distributing the records between the lower and upper values of its domains. For attribute salary the extreme values are from 20000 to 150000 and for attribute age salary the extreme values are from 20 to 80. The third attribute for the group has also been added. According to the function almost 37.9% of the records belong to Group A. the ARs are those that have the attrşbutes salary and age in the antecedent and the attribute Group in the consequent. That is why, representation of the particle respects to this case. For a fair comparison of the results initial swarm is initialized in a different way. A same record of the database is chosen and the rule is generated departing from it, defining for each value of vi of the selected attribute ai, lower limit vi- θ and upper limit vi + θ . θ is a percentage of the value vi. In this way the swarm is conditioned to cover at least one record. This has not been performed for CRPSO1. An intuitive measure to verify the efficacy of the CRPSO algorithms, verifying that the mined ARs have larger quality, consists of checking that the intervals of the rules accord to the ones synthetically generated. Mean support and confidence values of mined rules from rough PSO algorithm are 12.21 and 93.33. Acceleration coefficients have been selected as 2 and inertia weight has been gradually decreased from 0.9 to 0.4 for CRPSO1 algorithm. 12 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The obtained results from the proposed CRPSO algorithms are shown in Tables 5. All of the algorithms have mined three rules and mean support and confidence values of these rules have been depicted in this table. If the mean support values are multiplied by 3, values close to 37.9% may be found, which means that the rules have practically covered all the records. Confidence values are also close to 100%, since in the regions there are no records of other groups. Interesting result is that, CRPSO7, CRPSO8, and CRPSO12 have the best performances. CRPSO7 using Zaslavskii map seems the best PSO among others. The mined rules from CRPSO7 using Zaslavskii map is shown in Table 6. Logistic Map CRPSO1 CRPSO2 CRPSO3 CRPSO4 CRPSO5 CRPSO6 CRPSO7 CRPSO8 CRPSO9 CRPSO 10 CRPSO 11 CRPSO 12 Sup (%) Conf (%) 11.24 98.14 10.64 98.12 10.96 97.01 11.98 97.64 10.78 97.42 10.80 97.96 12.48 99.01 12.28 98.98 10.82 98.42 10.66 98.24 11.02 98.56 11.54 99.08 Sinusoidal Iterator CRPSO1 CRPSO2 CRPSO3 CRPSO4 CRPSO5 CRPSO6 CRPSO7 CRPSO8 CRPSO9 CRPSO 10 CRPSO 11 CRPSO 12 Sup (%) Conf (%) 11.20 98.48 11.24 98.46 10.86 98.08 11.62 98.06 10.86 97.56 10.96 97.02 Gauss Map 12.38 99.08 12.28 98.96 10.58 98.54 10.90 97.98 11.06 99.02 11.24 98.96 CRPSO1 CRPSO2 CRPSO3 CRPSO4 CRPSO5 CRPSO6 CRPSO7 CRPSO8 CRPSO9 CRPSO 10 CRPSO 11 CRPSO 12 Sup (%) Conf (%) 11.91 97.22 11.05 97.62 10.86 98.68 10.24 98.16 10.84 98.26 10.97 97.64 12.28 99.04 12.23 99.06 10.81 98.48 10.23 97.86 9.99 97.56 11.98 98.62 Zaslavskii Map CRPSO1 CRPSO2 CRPSO3 CRPSO4 CRPSO5 CRPSO6 CRPSO7 CRPSO8 CRPSO9 CRPSO 10 CRPSO 11 CRPSO 12 Sup (%) Conf (%) 11.05 97.56 11.26 97.55 10.24 97.22 10.22 98.08 10.97 98.48 10.96 98.69 12.62 99.65 12.41 99.12 10.96 98.62 10.82 98.86 10.88 97.16 11.94 98.84 Table 5. Mean support and confidence values of the rules mined by different CRPSO algorithms Rule If age ∈ [20, 40] ∧ salary ∈ [50136, 99869] ⇒ Group A If age ∈ [41, 59] ∧ salary ∈ [76779, 12469] ⇒ Group A If age ∈ [61, 80] ∧ salary ∈ [25440, 73998] ⇒ Group A Table 6. ARs mined by CRPSO7 using Zaslavskii map Sup(%) 12.63 12.62 12.61 Conf(%) 98.94 100 100 6. Conclusions In this chapter chaotic rough PSO, CRPSO, algorithms that use rough decision variables and rough particles that are based on notion of rough patterns have been proposed. Different chaotic maps have been embedded to adapt the parameters of PSO algorithm. This has been done by using of chaotic number generators each time a random number is needed by the classical PSO algorithm. Twelve PSO methods have been proposed and four chaotic maps have been analyzed in the data mining application. It has been detected that coupling Chaotic Rough Particle Swarm Optimization Algorithms 13 emergent results in different areas, like those of PSO and complex dynamics, can improve the quality of results in some optimization problems and also that chaos may be a desired process. It has been also shown that, these methods have somewhat increased the solution quality, that is in some cases they improved the global searching capability by escaping the local solutions. The proposed CRPSO algorithms can complement the existing tools developed in rough computing using chaos. These proposed methods seem to provide useful extensions for practical applications. More elaborated experiments by using optimized parameters may be performed with parallel or distributed implementation of these methods. 7. Acknowledgements This work is supported by Firat University Scientific Research and Projects Unit (Grant. No. 1251) and is supported in part by a grant from Scientific and Technological Research Council of Turkey, National Scholarship Program for PhD Students. 8. References Agrawal, R., Imielinski, T., Swami, A. (1993). Database Mining: A Performance Perspective, IEEE Transactions on Knowledge and Data Engineering, Vol. 5, No. 6, p.914-925 Alatas, B., Akin E., Karci, A. (2007). MODENAR: Multi-objective differential evolution algorithm for mining numeric association rules, Applied Soft Computing, Elsevier, http://dx.doi.org/10.1016/j.asoc.2007.05.003 Arena P., Caponetto R., Fortuna L., Rizzo A., La Rosa M. (2000). Self Organization in non Recurrent Complex System, Int. J. Bifurcation and Chaos, Vol. 10, No. 5, 1115–1125 Gao H., Zhang Y., Liang S., Li D. (2006). A New Chaotic Algorithm for Image Encryption, Chaos, Solitons and Fractals, 29, 393-399 Heidari-Bateni G. & McGillem C. D. (1994). A Chaotic Direct-Sequence Spread Spectrum Communication System, IEEE Trans. on Communications, Vol. 42 No. (2/3/4), 15241527 Ke, K., Cheng, J. Ng, W. (2006). MIC Framework: An Information-Theoretic Approach to Quantitative Association Rule Mining, ICDE '06, 112-114. Lingras, P. (1996). Rough Neural Networks, International Conference on Information Processing and Management of Uncertainty, Granada, Spain, pp. 1445-1450 Lingras, P. & Davies, C. (1999). Rough Genetic Algorithms, 7th International Workshop on New Directions in Rough Sets, Data Mining, and Granular-Soft Computing RSFDGrC 1999, Lecture Notes In Computer Science; Vol. 1711, 38-46 Lingras, P. & Davies, C. (2001). Applications of Rough Genetic Algorithms, Computational Intelligence: An International Journal, Vol . 3, No. 17, 435-445 Manganaro G. & Pineda de Gyvez J. (1997). DNA Computing Based on Chaos, IEEE International Conference on Evolutionary Computation. Piscataway, NJ: IEEE Press, 255–260 Mata, J., Alvarez, J., Riquelme, J. (2002). Discovering Numeric Association Rules via Evolutionary Algorithm, Lecture Notes in Computer Science, Volume 2336, Springer Verlag, 40-51. May R. M. (1976). Simple Mathematical Models with very Complicated Dynamics. Nature 261: 459 14 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Peitgen H., Jurgens H., Saupe D. (2004). Chaos and Fractals, Springer-Verlag, 0387202293, Berlin, Germany Schuster H. G. (1995). Deterministic Chaos: An Introduction, Physick- Verlag GmnH, John Wiley & Sons Ltd, 3527293159, Federal Republic of Germany Suneel M. (2006). Chaotic Sequences for Secure CDMA, Ramanujan Institute for Advanced Study in Mathematics, 1-4 Wong K., Man K. P., Li S., & Liao X. (2005). More Secure Chaotic Cryptographic Scheme based on Dynamic Look-up Table, Circuits, Systems & Signal Processing, Vol. 24, No. 5, 571-584 Zaslavskii G. M. (1978). The Simplest Case of a Strange Attractor, Physic Letters A, Vol. 69, 145-147 2 Integration Method of Ant Colony Algorithm and Rough Set Theory for Simultaneous Real Value Attribute Discretization and Attribute Reduction 2Department of Chemical Engineering, Zhejiang University of Mechanical and Aeronautical Engineering, University of California, Davis 1People’s Republic of China, 2U.S.A 1Department Yijun He1, Dezhao Chen1 and Weixiang Zhao2 1. Introduction Discretization of real value attributes (features) is an important pre-processing task in data mining, particularly for classification problems, and it has received significant attentions in machine learning community (Chmielewski & Grzymala-Busse, 1994; Dougherty et al., 1995; Nguyen & Skowron, 1995; Nguyen, 1998; Liu et al., 2002). Various studies have shown that discretization methods have the potential to reduce the amount of data while retaining or even improving predictive accuracy. Moreover, as reported in a study (Dougherty et al., 1995), discretization makes learning faster. However, most of the typical discretization methods can be considered as univariate discretization methods, which may fail to capture the correlation of attributes and result in degradation of the performance of a classification model. As reported (Liu et al., 2002), numerous discretization methods available in the literatures can be categorized in several dimensions: dynamic vs. static, local vs. global, splitting vs. merging, direct vs. incremental, and supervised vs. unsupervised. A hierarchical framework was also given to categorize the existing methods and pave the way for further development. A lot of work has been done, but still many issues remain unsolved, and new methods are needed (Liu et al. 2002). Since there are lots of discretization methods available, how does one evaluate discretization effects of various methods? In this study, we will focus on simplicity based criteria while preserving consistency, where simplicity is evaluated by the number of cuts. The fewer the number of cuts obtained by a discretization method, the better the effect of that method. Hence, real value attributes discretization can be defined as a problem of searching a global minimal set of cuts on attribute domains while preserving consistency, which has been shown as NP-hard problems (Nguyen, 1998). Rough set theory (Pawlak, 1982) has been considered as an effective mathematical tool for dealing with uncertain, imprecise and incomplete information and has been successfully applied in such fields as knowledge discovery, decision support, pattern classification, etc. However, rough set theory is just suitable to deal with discrete attributes, and it needs discretization as a pre-processing step for dealing with real value attributes. Moreover, attribute reduction is another key problem in rough set theory, and finding a minimal 16 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization attribute reduction has also been shown as a NP-hard problem (Komorowski et al., 1998). Two main approaches to find a minimal attribute reduction can be categorized as discernibility functions-based and attribute dependency-based, respectively (Han et al., 2004). These algorithms, however, suffer from intensive computations of either discernibility functions or positive regions. An alternative way to find a minimal attribute reduction is to adopt meta-heuristic algorithms, such as genetic algorithm (Wróblewski, 1995), particle swarm optimization (Wang et al., 2007), and ant colony algorithm (Jensen & Shen, 2003). To our knowledge, there are rare studies about how discretization pre-processing influences attribute reduction and how one integrates these two steps into a unified framework. In this chapter, we will try to give a systematic view into this problem, and will introduce ant colony algorithm to solve it. Ant colony algorithm (Colorni et al., 1991; Dorigo et al., 1996) is a kind of meta-heuristic algorithms and has been successfully applied to solve many combinatorial optimization problems, such as travelling salesman problem (Gambardella & Dorigo, 1995; Dorigo et al., 1996; Dorigo & Gambardella, 1997; Stützle & Hoos, 1997), sequential ordering problem (Gambardella & Dorigo, 2000), generalized assignment problem (Lourenço & Serra, 2002), scheduling problem (Stützle, 1998; Merkle et al., 2002; Merkle & Middendorf, 2003), network routing problem (Schoonderwoerd et al., 1996; Di Caro & Dorigo, 1998; ), set covering problem (Hadji et al., 2000; Rahoual et al., 2002; Lessing et al., 2004), etc. Great achievements of ant colony algorithm have attracted lots of attentions from different disciplinary researchers, and its application fields have been expanded from combinatorial optimization to continuous optimization problems, single-objective problems to multi-objective problems, static problems to dynamic problems, etc.. In this chapter, we just focus on the discrete style of ant colony algorithm, and it is reconstructed to be adapted to simultaneously solve real value attribute discretization and attribute reduction. This chapter is structured as follows. In section 2, preliminaries of rough set theory will be shortly described firstly, secondly the mathematical definition of real value attribute discretization and attribute reduction will be introduced, and then the relationship between discretization and reduction will be discussed and a unified framework will be proposed by introducing a weight parameter. The relationship between the unified framework and set covering problems will be analyzed in section 3. A detailed implementation of ant colony algorithm for simultaneously solving attribute discretization and reduction will be presented in section 4. The experimental results and discussion will be given in sections 5. Section 6 will make conclusions and provide future research directions. 2. Rough set theory, discretization and reducts 2.1 Preliminaries of rough set theory In rough set theory, table, also called information system, is often used to organize sample data, where rows and columns of a table denote objects and attributes, respectively. If attributes in a table consist of conditional attributes and decision attribute, the information system will be called a decision table. The mathematical definition of an information system and a decision table can be shown as follows. Information system and decision table (Komorowski et al., 1998) : an information system is a pair Α = (U , A) , where U is a non-empty finite set of objects called a universe and A is a non-empty finite set of attributes such that a : U → Va for every a ∈ A . The set Va is called Integration Method of Ant Colony Algorithm and Rough Set Theory for Simultaneous Real Value Attribute Discretization and Attribute Reduction 17 the value set of a . A decision table is an information system of the form Α = (U , A U {d }) , where d ∉ A is the decision attribute. The elements of A are called conditional attributes. Let U = {x1 ,L, xn } , Vd = {1,2, L , r (d )} , and A = {a1 ,L, a m } , where n , r ( d ) and m are the numbers of samples, decision classes, and attributes, respectively. The decision attribute d determines a partition { X 1 ,L, X r ( d ) } of the universe U , where X k = {x ∈ U : d ( x) = k } for k = 1,L, r (d ) . The set X k is called the k th decision class of Α . Intuitively, a decision table Α is considered consistent if the following statement is satisfied. If ∀ x1 , x2 ∈ U and d ( x1 ) ≠ d ( x2 ) , then ∃a ∈ A , a ( x1 ) ≠ a ( x2 ) . In other words, for any two objects with different decision class, there at least exists one attribute to discern them. In this study, we assume that the decision table Α is consistent, if not specifically denoted. Before the discussion of attribute reduction, the notion of relative indiscernibility relation based on decision table Α is briefly introduced as follows. Relative indiscernibility relation: for any subset of attributes B ⊆ A , an equivalence relation called the relative B -indiscerniblity relation, denoted by IND( B, d ) , is defined by IND( B, d ) = {( xi , x j ) ∈U × U : ( d ( xi ) = d ( x j )) ∨ ( Inf B ( xi ) = Inf B ( x j ))} . where Inf B ( x) = {( a, a( x )) : a ∈ B for x ∈ U } is called B -information function. For any two objects xi and x j satisfying relation IND( B, d ) are either belonging to the same decision class, or having the same value for every attribute a in subset B . Hence, if any objects xi and x j fitting relation IND( A, d ) are belonging to the same class, the decision table Α is considered consistent. 2.2 Reduct and Discretization In this subsection, the notions of reduct and discretization will be firstly introduced, and then the relationship between them will be discussed based on the notion of a distinction table. An attribute a ∈ B is relative dispensable in a subset of attributes B ⊆ A , if IND( B − {a}, d ) = IND( B, d ) , otherwise attribute a is relative indispensable. It means that attribute a can not influence the indiscernibility relation if it is dispensable. A reduct of decision table Α is a minimal set of attributes B ⊆ A such that IND( B, d ) = IND( A, d ) (Komorowski et al., 1998). In other words, a reduct is a minimal set of attributes from A that preserves the partitioning of the universe and hence the ability to perform classifications as the whole attribute set A does. Meanwhile, the minimal set of attributes B ⊆ A means that every attribute a ∈ B is indispensable with respect to B . Now, a formal description of the real value discretization can be presented as follows (Komorowski et al., 1998). We assume Va ∈ [l a , ra ) ⊂ ℜ to be a real interval for any a ∈ A and a given decision table Α = (U , A U {d }) to be consistent. Any pair of (a, c) where a ∈ A and c ∈ ℜ will be called a cut on Va . For a ∈ A , any set of cuts: {(a, c1a ),L, (a, cka )} on Va defines a partition Pa of Va a into subintervals expressed a a by Pa = {[c0 , c1a ),[c1a , c2 ),L,[cka , cka +1 )} , a a where 18 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization a a a a la = c0 < c1a < c2 < L < cka < cka +1 = ra , and Va = [c0 , c1a ) U [c1a , c2 ) U L U [cka , cka +1 ) . C a = {c1a ,L, cka } a a a a a is used to represent the set of cuts on Va for convenience, which can uniquely define the partition Pa . Hence any family P = {Pa : a ∈ A} is called a partition on decision table Α and can be represented by P = U a∈A C a . Moreover, according to the notion of the set of cuts, a new decision table Α P = (U,A P U {d }) can be defined, where A P = {a P : a P ( x) = i ⇔ a ( x) ∈ [cia , cia+1 ) , x ∈ U , i = {0,L, k a }} . Using meta-heuristic algorithms for real value attribute discretization, usually one needs to identify an initial set of cuts first and then screen these cuts. In this paper, each cut in an initial set of cuts is also called candidate cut. Assuming an arbitrary attribute a ∈ A defines a a sequence of its different attribute values ( x1a < L < xn ) and the length of this sequence is a denoted by Ca = { a 1 a 2 na a ( n a ≤ n ), the initial set of cuts on a a xn −1 + xn a Va can be represented by x +x , L, } which includes na − 1 elements, and the initial set of cuts on 2 2 decision table Α will be P = U a∈A C a . Then, a new decision table Α P = (U,A P U {d }) can be established. It should be noticed that the new decision table with the initial set of cuts is consistent if the original decision table Α is consistent. In order to select cuts from the initial set of cuts, the effect of each cut on classification performance should be analyzed to construct a distinction table DT . Each pair of two objects with different decision classes correspond to a row in distinction table, so the total r ( d ) −1 number of rows in a distinction table is N = ∑ card ( X ) ∑ card ( X p p =1 q = p +1 r(d ) q ) , where card ( X p ) denotes the number of objects in decision class p . Each cut from the initial set of cuts corresponds to a column in distinction table, so the total number of columns is M= ∑ (n a∈ A a − 1) . Let the i th row and j th column of a distinction table represent one pair of two objects, such as ( x p , x q ) where d ( x p ) ≠ d ( x q ) , and one cut of initial set of cuts, respectively. Hence, if the j th column (or cut) can discern these two objects ( x p , x q ) , the entry value of the distinction table corresponding to the i th row and j th column, denoted by dt ij , is equal to 1; otherwise, dt ij is equal to 0. Obviously, a decision table is considered consistent if each row of the distinction table has at least one entry with the value of 1, which also means that there at least exists one discernable cut for any pair of objects from different decision classes. According to the definition of distinction table, a real value attribute discretization problem can be equivalently represented as searching a minimal set of cuts J ⊆ {1,L, M } such that for any row i ∈ {1,L, N } of the decision table, there at least exists one cut j ∈ J whose value of dt ij is equal to 1. That is to say the minimal set of cuts J from the whole initial set of cuts can preserve the consistence of decision table. Correspondingly, an attribute reduction problem can also be represented as searching the set of cuts J ⊆ {1,L, M } corresponding to the minimal number of attributes such that for any row i ∈ {1,L, N } of the decision table, there at least exists one cut j ∈ J whose value of dt ij is equal to 1. Integration Method of Ant Colony Algorithm and Rough Set Theory for Simultaneous Real Value Attribute Discretization and Attribute Reduction 19 According to the above definitions, it is concluded that both the real value attribute discretization and reduction can be defined as finding a minimal set of cuts from the initial set of cuts, and the only difference between them is the computation of objective function. Hence, let f1 ( J ) and f 2 ( J ) denote the number of cuts in J and the number of attributes corresponding to the set of cuts J , respectively. Consequently, a weight parameter w is introduced to balance these two objective functions, and thus both the real value attribute discretization and reduction can be further syncretised into a unified framework, which can be described as equation (1). J ⊆{1,L, M } min F ( J ) = [ f 1 ( J )] + [ f 2 ( J )] w 1− w s.t. ∑ dt j∈J ij ≥ 1, ∀i ∈ {1, L , N } (1) where the i th constraint, ∑ dt j∈J ij ≥ 1 , represents that there at least exists a cut in J that can discern the pair of two objects in the i th row. This insures the consistence of the obtained reduct decision table with regard to J . In general, the weight parameter w is dependent on a practical problem and user’s preference, so it is usually determined empirically. However, the above problem can also be described as a bi-objective optimization problem, which can be further solved by multiobjective optimization methods to provide a Pareto-optimal solution set. Thus the decision maker can decide to choose one Pareto-optimal solution based on his preference and justification. In this study, we just focus on a single objective optimization problem through introducing the weight parameter w . Moreover, the costs of attributes may be different, so the objective function in equation (1) should be modified while taking account of the costs of attributes. An attribute associated with lower cost will be favored. The proposed algorithm of this study is able to deal with different costs of attributes, but we just focus on the problem with the same costs of all attributes in the case studies of this study. 3. Set covering problem The set covering problem (SCP) is an NP-hard problem combinatorial optimization problem that arises in a large variety of practical applications, such as resource allocation (Revelle, et al., 1970), airline crew scheduling (Housos & Elmoth, 1997), and so on. In this subsection, we study the relationship between SCP and the unified problem shown as equation (1), which can help us to design a more efficient ant colony algorithm profiting from the existing different heuristic and local search methods for solving SCP. Given a zero-one matrix S with m rows and n columns, let cost j be the cost of column j , where j = 1,L, n . The i th row is said to be covered by column j if the entry sij is equal to 1. The problem of set covering is to find a subset of columns with a minimal cost to cover all rows, and can be formulated as equation (2), where x = [ x1 , L , x n ]T denotes a solution of SCP and x j denotes the j th element of the solution x indicating whether column j belongs to the solution based on the value of x j (“1”, belonging while “0”, not belonging). 20 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization min f ( x ) = s.t. ∑ cost j =1 n j ⋅ xj (2) ∑s x ij j =1 n j ≥ 1, i = 1,L, m j = 1,L, n x j ∈ {0,1}, If the distinction table DT is regarded as matrix S , the unified problem of simultaneous real value attribute discretization and reduction shown as equation (1) can be handled as SCP, whose main goal is also to find a subset of columns via a minimal objective function to cover all rows. The only minor difference between them is the definition of the objective function. Hence, the existing heuristic methods for solving SCP should be modified to be suited to solve the unified problem shown as equation (1). Now, we will reformulate the unified problem in equation (1) based on the description form of SCP, as shown in equation (3). In this study, we assume the candidate cuts belonging to the same attribute are arranged together. min f ( x ) = [ f 1 ( x )] + [ f 2 ( x )] w 1− w f1 ( x ) = ∑ x j j =1 L n f 2 ( x ) = ∑ cost l ⋅ y l l =1 0, l = 1 n l −1 1, if ∑ x Index + p ≥ 1, Index = p =1 s.t. y l = ∑ q =1 n q , l > 1 0, otherwise l = 1, L , L l (3) ∑ s ij x j ≥ 1, i = 1, L , m j =1 n x j ∈ {0,1}, j = 1, L , n where L is the number of attributes; nl is the number of candidate cuts on the l th attribute domain; n = ∑n l =1 L l is the total number of candidate cuts on the whole attributes domain, also called the number of columns; yl is the indicator whether the l th attribute is selected with regard to solution x ; m is the number of rows. In the case studies, we assume costs of all attributes to be the same. Up to now, the relationship between SCP and the unified framework is analyzed, and the similarities and differences between them are discussed. In the next section, we will propose a novel ant colony algorithm for solving the problem shown in equation (3). Integration Method of Ant Colony Algorithm and Rough Set Theory for Simultaneous Real Value Attribute Discretization and Attribute Reduction 21 4. Ant colony algorithm For simultaneously solving real value attribute discretization and reduction shown as equation (3), solution construction and pheromone update are two key issues for an ant colony algorithm. In the solution construction step, heuristic information should be reasonably designed to improve the optimization efficiency. Moreover, we will also introduce a local search strategy to improve the search speed of algorithm. 4.1 Fundamental notions In this subsection, we will introduce some notions which will be used for the description of the algorithm. Search domain, feasible domain and feasible solution: a search domain consists of 2 n solutions, where n denotes the total number of candidate cuts on the whole attributes domain; those solutions in search domain meeting the constraints of equation (3) are denoted as feasible solutions, and all feasible solutions form a feasible domain. Cover: if sij is equal to 1, we can say the i th row is covered by the j th column. Let κj = ∑s i =1 m ij denote the number of rows covered by the j th column. In general, the larger the value of κ j , the more important the j th column. Node, taboo node set and feasible node set: every element of set {1,L, n} is called a node, let node j denote the j th node, where j = 1,L, n . Let tabu k denote the set of nodes that has been visisted by the k th ant and be called taboo node set which is set equal to null initially. Let allowk denote the set of nodes that remain to be visisted by the k th ant and be called feasible node set which is set equal to an all columns set {1,L, n} initially. In nature, the solution construction is a process of iteratively selecting unvisited node from allowk until a feasible solution is constructed. From another point of view, if tabu k covers all rows, the solution construction ends and tabu k is a feasible solution. Covered rows set and uncovered rows set: Let CRS = {i | ∃j ∈ tabu k , sij = 1} and UCRS = {1,L, m} \ CRS denote the set of covered rows and that of uncovered rows by tabu k respectively. During the process of solution construction, the number of covered rows will increase, and the number of uncovered rows will decrease. The solution construction will continue until the set of uncovered rows UCRS is equal to null set. Pheromone: let τ j (t ) denote the quantity of pheromone defined in the j th column at time t . At time 0, all columns’ pheromones τ 0 are set equal to 0.5. Heuristic information: the heuristic information adopted in this study differs from that in other combinatorial optimization problems. Generally, in other combinatorial optimization problems, such as travelling salesman problem, the heuristic information is calculated before the solution construction step, while in this study, it is dynamically calculated during solution construction. Let η j denote the heuristic information in the j th column, where j ∈ allowk . In this study, the calculation of heuristic information not only depends on cut infomation (which is usually adopted by the existing heuristic methods in literatures), but 22 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization also depends on extra attribute information. The concrete implementation for each solution construction step by ant k is shown below. 1. For each cut or column, i.e. j ∈ allowk , determine which attribute it belongs to, for example, assume the j th column belong to the l th attribute. 2. 3. Obtain the value of CN l , which denotes the number of selected candidate cuts of the l th attribute during solution contruction. Calculate extra attribute information ν l , defined by equation (4). νl = c / cost l , if 0 < CN l ≤ CN max 1 / cost l , otherwise (4) where c (c>1) is a prescribed parameter. It means that if none candidate cuts of l th attribute are selected or the number of selected cuts of l th attribute is larger than CN max , the value of ν l is set equal to 1 / costl , otherwise, it is set equal to c / costl . On the one hand, we tend to choose a candidate cut of an attribute whose several candidate cuts have been selected during solution construction, because this may help decrease the number of selected attributes; on the other hand, we would not like to choose too many candidate cuts of an attribute, because this is not conducive to understanding the decision model and could decreases the robustness of the decision model as well. Hence, a prescribed parameter, CN max , which denotes the maximum number of selected candidate cuts for each attribute, is introduced to decrease the probability of the above phenomenon. In this study, the values of c and CN max are empiricallly set equal to 4 and 5, respectively. 4. Calculate cut information κ j defined by equation (5), which denotes the number of rows covered by the j th column from the set of uncovered rows UCRS . κj = 5. i∈UCRS ∑s ij , j ∈ allowk (5) Calculate the heuristic information η j defined by equation (6), using cut information and extra attribute information. η j = κ j ⋅ν l , j ∈ allowk 6. Nomalize the heuristic information via equation (7). (6) ηj = q∈allowk ∑η ηj , j ∈ allowk q (7) Selection probability: in the solution construction step, let pk ( j , t ) denote the selection probability of column j by the k th ant at time t , and be expressed by equation (8). Integration Method of Ant Colony Algorithm and Rough Set Theory for Simultaneous Real Value Attribute Discretization and Attribute Reduction 23 pk ( j, t ) = q∈allowk ∑τ τ j (t ) ∗ [η j ] β q (t ) ∗ [η q ] β , j ∈ allowk (8) where β is a heuristic factor, which determines the relative importance of pheromone versus heuristic information. In this study, it is set equal to 2. 4.2 Solution construction Unlike the solution construction of travelling salesman problems, where each ant must visit each city node, in this study, each ant will end the solution construction when all rows are covered by the selected column nodes. The detailed implementation of solution construction by ant k is shown as follows. Step1 set tabu k = Φ , allowk = {1,L, n} , CRS = Φ , UCRS = {1,L, m} , and CN l = 0 for all l ∈ {1, L, L} ; Step2 calculate the heuristic information η j based on section 4.1, where j ∈ allowk ; Step3 generate a uniform random number r in [0, 1]. If the value of r is less than q 0 , the next node u is selected by equation (9); otherwise, the next node u is selected based on the probability shown as equation (8). It should be noticed that q 0 can be considered as an exploitation probability factor and is used to control how strongly an ant exploit deterministically the combined past search experience and heuristic information. By adjusting parameter q 0 , we can balance the trade-off between exploitation and biased exploration. u = arg max{τ j (t ) ∗ [η j ] β } j∈allowk (9) Step4 implement local pheromone update operation for column u by using equation (10). τ u (t ) = (1 − ξ )τ u (t ) + ξτ 0 (10) where ξ , 0 < ξ < 1 , is a parameter called local pheromone update strength factor. The effect of local pheromone update is to make the desirability of columns change dynamically: each time when an ant choose a column, this column becomes slightly less desirable for the other ants. Hence, this can prevent ants from converging to a common solution and help increase exploration. Step5 determine which attribute the selected node u belongs to If this node belongs to CN l = CN l + 1 , tabu k = tabu k U {u} , allowk = allowk \ {u} , attribute, set the l th CRS = CRS U {i | s ij = 1, i ∈ UCRS , j = u} , and UCRS = UCRS \ {i | s ij = 1, i ∈ UCRS , j = u} ; Step6 if UCRS is not a null set, go back to Step2; otherwise, solution construction is finished, and return a feasible solution tabu k . 4.3 Redundant columns remove After a feasible solution tabu k is constructed, all redundant columns will be removed from the solution. Column j is considered redundant if tabu k \ { j} is also a feasible solution. Let 24 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization σ j = min (ω i − 1) represent an associate variable to judge whether column j is redundant, i∈Cover ( j ) where j ∈ tabu k , Cover ( j ) = {i | sij = 1} denotes the subset of rows covered by column j , and ω i is the number of selected columns covering row i . It should be noticed that column j is redundant if and only if σ j > 0 . If there is only one redundant column, it is easy to remove this column from the solution. However, if there are several redundant columns, we will remove the redundant column step by step until there is none redundant column. The detailed implementation is shown as follows. Step1 calculate the value of σ j , where j ∈ tabu k , and determine the set of redundant columns, RCS = { j | σ j > 0} . If RCS is equal to null set, stop; otherwise, go to Setp2; Step2 for each column j ∈ RCS , determine which attribute it belongs to. And also let RAS denote the subset of attributes at least one of whose selected candidate cuts is redundant; Step3 calculate the value of CN l defined in subsection 4.1, where l ∈ RAS , and sort them by ascending. If the minimal value is equal to 1, go to Step4; otherwise, go to Step5; Step4 find the subset of attributes RAS min with minimal value CN l from RAS . If there exist several attributes with the same largest cost in RAS min , randomly remove one column which belongs to one of attributes in RAS min ; otherwise, remove the column corresponding to the largest attribute cost. Set tabu k = tabu k \ { j} , and go back to Step1; Step5 find the subset of attributes RAS max with maximal value CN l from RAS . If there exist several attributes with the same largest cost in RAS max , randomly remove one column which belongs to one of attributes in RAS max ; otherwise, remove the column with largest corresponding attribute cost. Set tabu k = tabu k \ { j} , and go back to Step1. Based on the above discussion about the redundant column removal, it should be noticed that the goal of Step4 is to decrease the number of attributes in the final solution while taking account of the costs of attributes; moreover, the goal of Step5 is conducive to creating a final decision model with smaller number of cuts on each attribute domain. 4.4 Local search To improve the solution quality and global convergence speed, a simple local search procedure is applied after solution construction. The introduced local search consists of two phases, removing columns and adding columns. In the phase of removing columns, a number of columns determined by a user-defined parameter λ , 0 < λ < 1 , are removed from the constructed feasible solution. However it may result in the infeasibility of a new partial solution because some rows will not be covered. The parameter λ is used to control how many columns will be removed from the solution tabu k , and the new partial solution tabu knew consists of ceil (| tabu k | ×(1 − λ ) ) columns, where | tabu k | denotes the number of columns in set tabu k , ceil denotes a function of round an element to the nearest integer. In the phase of adding columns, firstly, a size reduction problem is constructed, which is based on the uncovered rows and the columns that could cover these rows, and then this size reduction problem is solved by a greedy algorithm based on the heuristic information Integration Method of Ant Colony Algorithm and Rough Set Theory for Simultaneous Real Value Attribute Discretization and Attribute Reduction 25 discussed in subsection 4.1. The column with the largest heuristic information will be selected step by step until the all rows are covered by the selected columns. The main steps of the column adding procedure are the same as the solution construction described in subsection 4.2, and the only difference between them is the step of column selection. Therefore we just briefly introduce the implementation below. Let LLmt denotes the local search iteration number, which is set equal to 5 in this study. Step1 set t = 1 ; Step2 randomly remove ceil (| tabu k | ×λ ) columns from solution tabu k , and construct a size reduction problem. Let tabu knew denotes the new partial infeasible solution; Step3 solve this size reduction problem by a greedy algorithm based on the dynamically calculated heuristic information. Let tabu k' denotes the solution of this reduced size ' problem, and set tabu k' = tabu k U tabu knew ; Step4 remove the redundant columns from tabu k' ; ' Step5 if the objective function value of tabu k' is less than that of tabu k , set tabu k = tabu k ; Step6 set t = t + 1 , and if t is less than LLmt , go back to Step2; otherwise, stop the local search procedure and return tabu k . 4.5 Pheromone update When all ants finish the solution construction procedure and the local search procedure, the operation of global pheromone update will be implemented, which includes pheromone release and pheromone evaporate. In nature, pheromone release reflects the positive feedback mechanism in ant colony algorithm; while pheromone evaporate operation follows ant biology background and helps avoid excessive pheromone drowned heuristic information to some extent. In this study, in addition to the local pheromone update operation discussed in Step4 of the solution construction in subsection 4.2, two types of global pheromone update operations (iteration-best based and global-best based) are also adopted, defined by equations (11) and (12), respectively. τ j (t + 1) = (1 − ρ )τ j (t ) + ρ∆τ ijb , f ( S ib ) , if j ∈ S ib ∆τ ib = j 0, otherwise −1 [ (11) τ j (t + 1) = (1 − ρ )τ j (t ) + ρ∆τ gb j f ( S gb ) −1 , if j ∈ S gb ∆τ gb = j 0, otherwise [ (12) where ρ , 0 < ρ < 1 , is the pheromone evaporate factor; S ib denotes the best solution in current iteration; S gb denotes the global best found solution since the start of the algorithm; 26 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization f ( S ib ) and f ( S gb ) are the objective function vale of S ib and S gb , respectively; ∆τ ijb and ∆τ gb are the quantities of pheromone released to column j based on these two pheromone j update operations, respectively. The global-best based pheromone update operation could make the search be concentrated around a current solution and limit the exploration of possible better ones, hence it is prone to trap into local optima; while the iteration-best based pheromone update operation could alleviate the danger of trapping into local optima but it may adversely reduce the convergence speed. Therefore, a mixed strategy, proposed by Stützle & Hoos (2000), is adopted in this study. Moreoever, in this study, another regulating strategy for these two types of pheromone update operations is also introduced, and the probability of the implementation of iteration-best based pheromone update operation is based on a bellfunction defined by equation (13). In each iteration, if a generated uniform random number in the interval [0, 1] is less then the value of p ib , the iteration-best based pheromone update operation will be executed; otherwise, the global-best based pheromone update operation will be executed. p ib = 1 t −c 1+ a 2b (13) where a , b and c are three parameters, specified by user. In this study, a , b and c are set equal to Lmt / 3 ( Lmt denotes the maximal iteration number), 2.5 and 0, respectively. When Lmt is set equal to 100, the curve of number of iteration vs. p ib is shown as Fig.1. In the early stage, the value of probability p ib is relatively large, so the algorithm can benefit from stronger exploration of the search space, which can help escape from local optima and avoid the stagnation phenomenon. In the later stage, the value of probability p ib is relatively small, so the algorithm can benefit from stronger exploitation of all best solution candidates, which can be conducive to improving the convergence speed. 4.6 Framework of ant colony algorithm In this subsection, we will briefly present the whole framework of ant colony algorithm for simultaneous real value attribute discretization and reduction as follows. 1. Determine the candidate cuts and construct distinction table based on samples. 2. Parameters setting, such as weight parameter w , exploitation probability factor q 0 , local pheromone update strength factor ξ , pheromone evaporate factor ρ , local search magnitude factor λ , number of ants ANum , and maximum iteration number Lmt . Pheromone initialization. Set t = 1 . For each ant, implement solution construction operation. For each feasible solution, remove all redundant columns. For the set of best solutions in this iteration, implement local search operation. Determine the iteration-best solution, and update the global-best solution. Implement pheromone update operation. 3. 4. 5. 6. 7. 8. 9. Integration Method of Ant Colony Algorithm and Rough Set Theory for Simultaneous Real Value Attribute Discretization and Attribute Reduction 27 10. Set t = t + 1 , if t is less than Lmt , go back to step 5; otherwise, terminate and return the best solution. Figure 1. The curve of number of iteration vs. p ib ( Lmt = 100) 5. Experimental results and discussion In this section, firstly, four datasets used for this study are briefly described; secondly, the effect of parameters on performance are studied and some suggestions for setting these parameters are presented; finally, the comparisons of our method with other three rough set theory based heuristic methods are provided. 5.1 Description of datasets In this study, four datasets are used to validate the effectiveness of the proposed method, one dataset is nature spearmint essence (NSE), while the other three datasets are Glass, Wine and Iris obtained from the UCI (University of California, Irvine) machine learning repository available by the link: http://www.ics.uci.edu/~mlearn/MLRepository.html. The main characteristics of these four data sets are summarized in Table 1. The last column shows the number of initial cuts for these four datasets. Dataset Cases Categorical attributes 0 0 0 0 Continuous Attributes 56 9 13 4 Classes Number of Initial cuts 770 930 1263 119 NSE Glass Wine Iris 55 214 178 150 3 6 3 3 Table 1. Four datasets used for this study 28 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 5.2 Parameters setting in ant colony algorithm In this subsection, we will use the NSE dataset for studying the effect of parameters on performance, and some suggestions for setting these parameters will also be presented. In this study, we focus on the four controllable parameters which affect the performance of ant colony algorithm, exploitation probability factor q 0 shown in subsection 4.2, local pheromone update strength factor ξ shown in equation (10), pheromone evaporate factor ρ shown in equations (11) and (12), and local search magnitude factor λ shown in subsection 4.4. The number of ants ANum is also an important parameter in ant colony algorithm. Dependent on the complexcity of a problem, this parameter must be sufficiently large to explore all potential solutions. In general, the larger the value of ANum , the better the final solution quality obtained by ant colony algorithm, and also the longer the execution time. Hence, the selection of number of ants should balance the trade-off between the solution quality and execution time. According to empirical studies, the value of ANum is suggested to set equal to between [5, 20]. In order to study the effect of the parameters on the performance on the NSE dataset, a base value for each parameter is arbitrarily set as: w = 0.5 , q 0 = 0.5 , ξ = 0.1 , ρ = 0.05 , λ = 0.2 , ANum = 10 , Lmt = 100 . When tuning one parameter, the other parameters are kept as their base values. Moreover, to reduce the influence of incidental variation, the tests for each parameter are all executed 10 times independently, and both the average value of objective function and the average iteration number of the first finding of the best solution are used for evaluating the effect of each parameter on performance. However, due to the existence of random factors, the tests can only reflect to some extent the impact of the various parameters on the final results. 5.2.1 Exploitation probability factor Exploitation probability factor q 0 is used to control how strongly an ant deterministically exploits the combined past search experience and heuristic information. The larger the value of q 0 , the larger the exploitation probability. Fig.2 and Fig.3 show the effect of exploitation probability factor q 0 on the average value of the objective function and the average iteration number, respectively. Fig.2 shows that the best algorithm performance when q 0 is equal to 0.4 or 0.7. Fig.3 shows that with the increase of the value of q 0 , the average iteration number decreases. The possible reason could be with the large value of q 0 , ant colony algorithm focuses on exploiting the space around the best found solution, so the convergence speed may be improved. However, a large value of q 0 may also lead to stagnation and the decrease of the probability of finding global optimum. Hence, the selection of “optimal” exploitation probability factor should balance the trade-off between exploration and exploitation performance. According to this study, the value of q 0 is suggested to set equal to between [0.4, 0.8], but it could vary in other cases. Integration Method of Ant Colony Algorithm and Rough Set Theory for Simultaneous Real Value Attribute Discretization and Attribute Reduction 29 Figure 2. Effect of exploitation probability factor q 0 on average value of objective function for the NSE dataset Figure 3. Effect of exploitation probability factor q 0 on average iteration number for the NSE dataset 5.2.2 Pheromone evaporate factor In ant colony algorithm, cooperation among ants is based on pheromone, and global pheromone update operation can help ants maintain a well coordinated pheromone mediated cooperation. Fig.4 and Fig.5 show the effect of pheromone evaporate factor ρ on the average value of objective function and the average iteration number, respectively. Fig.4 shows that the average quality of final solution is the best when ρ is equal to 0.05. On the one hand, according to equations (11) and (12), the larger the value of ρ , the more the amount of pheromone released in the best found solutions, which will attract more ants in the next iteration but probably also lead to stagnation. On the other hand, as shown in Fig.5, a large value of ρ can enhance the amount of different pheromone between the relative better solutions and relative worse solutions, so the convergence speed can be improved. However, the final solution could be a local optimum. Extremely, if the value of ρ is set equal to 0, the cooperation among ants will disappear, which would lead to a bad performance. Balancing the trade-off between the solution quality and execution time, the value of ρ is suggested to set between [0.05, 0.2]. 30 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Figure 4. Effect of pheromone evaporate factor ρ on average value of objective function for the NSE dataset Figure 5. Effect of pheromone evaporate factor ρ on average iteration number for the NSE dataset 5.2.3 Local pheromone update strength factor Similar to the function of pheromone evaporate factor, local pheromone update strength factor ξ also helps ants maintain a well coordinated pheromone mediated cooperation. Local pheromone update operation helps ants choose those columns that have never been explored previously, which can prevent the ants from converging to a common premature solution. Fig.6 and Fig.7 show the effect of the local pheromone update strength factor ξ on the average value of the objective function and the average iteration number, respectively. Fig.6 shows that the best average quality of final solution is obtained at ξ being 0.01 or 0.1, and Fig.7 shows the least average iteration number when ξ is equal to 0.05. In general, the local pheromone update operation just changes the desirability of columns for following ants, which can be conducive to increasing exploration. The larger the value of ξ , the more likely the probability for the system pheromone to go back to the initial level. Although it can enhance the exploration performance, it also weakens the pheromone level released by previous ants and leads to a lower convergence speed. Hence, we should reasonably select the value of ξ to balance the trade-off between exploration and convergence speed. The value of ξ is suggested to set between [0.05, 0.2] for this study. Integration Method of Ant Colony Algorithm and Rough Set Theory for Simultaneous Real Value Attribute Discretization and Attribute Reduction 31 Figure 6. Effect of local pheromone update strength factor ξ on average value of objective function for the NSE dataset Figure 7. Effect of local pheromone update strength factor ξ on average iteration number for the NSE dataset 5.2.4 Local search magnitude factor Local search operation usually can improve both the final solution quality and the speed of finding the best solution. Local search magnitude factor λ plays an important role in determining neighbourhood magnitude of a current solution. The larger the value of λ , the larger the neighbourhood magnitude. However, due to a limited iteration number of local search, a large value of λ could decrease the probability of finding a better solution in the neighbourhood area of the current solution. Fig.8 and Fig.9 show the effect of local search magnitude factor λ on the average value of the objective function and the average iteration number, respectively. Fig.8 shows that the best average quality of final solutions is obtained at λ being 0.3. As shown in Fig.9, with the increase of the value of λ , the average iteration number decreases. Balancing the trade-off the final solution quality and execution time, the value of λ is suggested set between [0.2, 0.4]. 32 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Figure 8. Effect of local search magnitude factor λ on average value of objective function for the NSE dataset Figure 9. Effect of local search magnitude factor λ on average iteration number for the NSE dataset 5.3 Performance comparison In this subsection, the other three rough set theory based heuristic methods are used for performance comparison with ant colony algorithm. These three methods include greedy method (Nguyen & Skowron, 1995), modified greedy method, and attribute importance based method (Hou et al., 2000). All of these three methods are deterministic methods, so their obtained results are unique for a given problem. The parameters setting for ant colony algorithm is shown as follows: q 0 = 0.5 , ξ = 0.1 , ρ = 0.05 , λ = 0.2 , ANum = 10 , and Lmt = 100 . To reduce the influence of incidental variation, the tests for each dataset are all executed 10 times independently. For performance comparison, on the one hand, we will provide the attribute numbers AttrNum and cut numbers CutNum obtained by these four methods; on the other hand, by introducing the weight parameter, we will give an exponential weighted value EWV , where EWV = CutNum w + AttrNum1− w , for a comprehsneive examination of the results obtained by these four methods. Due to the Integration Method of Ant Colony Algorithm and Rough Set Theory for Simultaneous Real Value Attribute Discretization and Attribute Reduction 33 stochastic character of ant colony algorithm, the three performance comparison metrics are the average results of the 10 executations. Table 2 shows the performance comparison of four methods for the NSE, Glass, Wine and Iris datasets, where the weight parameter w is set equal to 0.5 for computing exponential weighted value. It can be seen from Table 2 that (1) the attribute numbers obtained by ant colony algorithm are remarkably less than those obtained by greedy method and modified greedy method for all the four datasets, (2) although ant colony algorithm yields a little more cuts than the greedy method and modified greedy method for the NSE and Glass datasets, the cut numbers generated by ant colony algorithm are less than or equal to those obtained by these two methods for the Wine and Iris datasets, (3) the cut numbers obtained by ant colony algorithm are remarkably less than those obtained by attribute importance based method for the NSE, Glass and Wine datasets, and (4) although ant colony algorithm requires a little more attributes than the attribute importance based method for the Wine dataset, the attribute numbers obtained by ant colony algorithm are less than or equal to those obtained by that method for the NSE, Glass, and Iris datasets. These superiorities of ant colony algorithm could be supported by the fact that both greedy method and modified greedy method more focus on finding the minimal number of cuts while attribute importance based method more focus on finding the minimal number of attributes. Different from them, ant colony algorithm can simultaneously consider both objectives, minimal numbers of cuts and attributes. It can also be seen from Table 2 that the exponential weighted value EWV obtained by ant colony algorithm is better than those obtained by the other three methods for the NSE, Glass and Wine datasets; and for the Iris dataset, the exponential weighted value EWV obtained by ant colony algorithm and attribute importance based method both rank top 1. Moreover, in our experiments, the standard deviations of these three metrics in 10 runs are very close to 0 for all the four datasets, which illustrates the stability of the ant colony algorithm. Attribute Importance Based Method 3 19 6.091 5 41 8.639 2 21 5.997 3 6 4.182 Greedy Method Methods Modified Greedy Method 6 7 5.292 8 14 6.570 5 6 4.686 4 10 5.162 Ant Colony Algorithm Metrics NSE Glass Wine Iris AttrNum CutNum EWV AttrNum CutNum EWV AttrNum CutNum EWV AttrNum CutNum EWV 7 7 5.095 8 14 6.570 6 6 4.899 4 10 5.162 3 8 4.560 4.4 15.6 6.043 3 6 4.182 3 6 4.182 Table 2. Performance comparison with four methods for four datasets ( w = 0.5 ) 34 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Fig.10 shows the exponential weighted values of the four methods for the NSE dataset with different weight parameters. Through changing the relative importance between the cut number and the attribute number by employing the weight parameter w , ant colony algorithm can easily find the optimal cut and attribute numbers, whose corresponding exponential weighted value is better than those obtained by the other three methods. Hence, from a balanced choice of optimal attributes and cuts, ant colony algorithm outperforms the other three methods. Figure 10. Performance comparison of four methods for the NSE dataset with different weight parameter w 6. Conclusions In this study, ant colony algorithm is proposed for simultaneous real value attributes discretization and reduction. Based on the concept of distinction table in rough set theory, the relationship between discretization and reduction is discussed, and these two different problems can be integrated into a unified framework. Moreover, the relationship between this unified framework and set covering problem is analyzed. The detailed strategy for ant colony algorithm to solve this problem is proposed and applied to the four datasets. The obtained results demonstrate the effectiveness of the proposed method, showing the better performance than those of the other three rough set theory based heuristic methods. However, this is a preliminary study, because we only considered the pre-processing step for pattern classification, and how this pre-processing step influences the final classification prediction performance has not been studied. Hence in the future research direction, we will focus on improving the performance of ant colony algorithm including global convergence performance and convergence speed and apply these proposed methods to problems with mass data. Meanwhile, we will combine the present method with any classification methods, such as rough set theory, decision tree, support vector machine, etc., for practical pattern classification problems. Integration Method of Ant Colony Algorithm and Rough Set Theory for Simultaneous Real Value Attribute Discretization and Attribute Reduction 35 7. Acknowledgements This project was supported by the National Natural Science Foundation (20276063) of China. 8. References Chmielewski, M.R. & Grzymala-Busse, J.W. (1994). Global discretization of attributes as preprocessing for machine learning. Proceedings of the III International Workshop on Rough Set and Soft Computing, pp. 294-301, San Jose, CA, November 1994 Colorni, A.; Dorigo, M. & Maniezzo V. (1991). Distributed optimization by ant colonies. Proceeding of the First European Conference on Artificial Life, pp. 134-142, Paris, France, 1991 Di Caro G. & Dorigo M. (1998). AntNet: distributed stigmergetic control for communications networks. Journal of Artificial Intelligence Research, Vol. 9, 317-365. Dougherty J.; Kohavi R. & Sahami M. (1995). Supervised and unsupervised discretization of continuous features. Proceedings of the Twelfth International Conference on Machine Learning, pp. 194-202, Tahoe, CA, July 1995, Morgan Kaufmann Dorigo, M. & Gambardella, L.M. (1997). Ant colony system: a cooperative learning approach to the travelling salesman problem. IEEE Transactions on Evolutionary Computation, Vol.1, No.1, 53-66. Dorigo, M.; Maniezzo, V. & Colorni A. (1996). Ant system: optimization by a colony of cooperation agents. IEEE Transaction on Systems, Man, and Cybernetics-Part B, Vol. 26, No. 1, 29-41. Gambardella, L.M. & Dorigo, M. (1995). Ant-Q: a reinforcement learning approach to the travelling salesman problem. Proceedings of the Twelfth International Conference on Machine Learning, pp. 252-260, Tahoe, CA, July 1995, Morgan Kaufmann Gambardella, L.M. & Dorigo, M. (2000). Ant colony system hybridized with a new local search for sequential ordering problem. INFORMS Journal on Computing, Vol. 12, No. 3, 237-255. Hadji, R.; Rahoual, M.; Talbi, E. & Bachelet, V. (2000). Ant colonies for the set covering problem. Proceedings of ANTS’ 2000 -- From Ant Colonies to Artificial Ants: Second International Workshop on Ant Algorithms, pp. 63-66, Brussels, Belgium, September 2000, Springer-Verlag Han, J.C.; Hu, X.H & LIN T.Y. (2004). Feature Subset Selection Based on Relative Dependency between Attributes. Proceedings of the Fourth International Conference on Rough Sets and Current Trends in Computing, pp. 176-185, Uppsala, Sweden, June 2004, Springer-Verlag Hou, L.J.; Wang G.Y. & Nie. N. (2000). The discretization problems of rough set theory. Computer Science, Vol.27, No.12, 89-94. Housos, E. & Elmoth T. (1997). Automatic optimization of subproblems in scheduling airlines crews. Interfaces, Vol. 27, No. 5, 68-77. Jensen, R. & Shen, Q. (2003). Finding Rough Set Reducts with Ant Colony Optimization. Proceeding of 2003 UK Workshop on Computational Intelligence, pp. 15-22, Bristol, UK, September 2003 Komorowski, J.; Pawlak, Z.; Polkowski, L. & Skowron, A. (1998). Rough sets: A Tutorial. In: Rough-fuzzy hybridization: a new trend in decision making, Pal S.K. & Skowron A, pp. 3-98, Springer Verlag 36 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Lessing, L.; Dumitrescu, I. & Stützle, T. (2004). A Comparison between ACO Algorithms for the Set Covering Problem. ANTS' 2004, Fourth Internatinal Workshop on Ant Algorithms and Swarm Intelligence, pp. 1-12, Brussels, Belgium, September 2004, Springer Verlag Liu, H.; Hussain, F.; Tan, C.L. & Dash, M. (2002). Discretization: an enabling technique. Data Mining and Knowledge Discovery, Vol. 6, No. 4, 393-423. Lourenço, H.R. & Serra, D. (2002). Adaptive search heuristics for the generalized assignment problem. Mathware and Soft Computing, Vol. 9, No. 2-3, 209-234. Merkle, D.; Middendorf, M. & Schmeck, H. (2002). Ant colony optimization for resourceconstrained project scheduling. IEEE Transaction on Evolutionary Computation, Vol. 6, No. 4, 333-346. Merkle, D. & Middendorf, M. (2003). Ant colony optimization with global pheromone evaluation for scheduling a single machine. Applied Intelligence, Vol. 18, No. 1, 105111. Nguyen, S.H. & Skowron, A. (1995). Quantization of real value attributes: rough set and boolean reasoning approach. Proceedings of the Second Joint Annual Conference on Information Sciences, pp. 34-37, Wrightswille Beach, NC, September 1995 Nguyen, H.S. (1998). Discretization problem for rough sets methods. Proceedings of the First International Conference on Rough Sets and Current Trends in Computing, pp. 545-552, Warsaw, Poland, June 1998, Springer-Verlag Pawlak, Z. (1982). Rough sets. International Journal of Information and Computer Science, Vol.11, No.5, 341-356. Rahoual, M.; Hadji, R. & Bachelet V. (2002). Parallel Ant System for the Set Covering Problem. Proceedings of the Third International Workshop on Ant Algorithms, pp. 262267, Brussels, Belgium, September 2002, Springer-Verlag Revelle, C.D.; Marks, D. & Liebman, J.C. (1970). An analysis of private and public sector facilities location models. Management Science, Vol. 16, 692-707. Schoonderwoerd, R.; Holland, O.; Bruten, J. & Rothkrantz, L. (1996). Ant-based load balancing in telecommunications networks. Adaptive Behavior, Vol. 5, No. 2, 169-207. Stützle, T. & Hoos, H.H. (1997). The Max-Min ant system and local search for the travelling salesman problem. Proceeding of the 1997 IEEE International Conference on Evolutionary Computation, pp. 309-314, Piscataway, NJ, April 1997, IEEE Press Stützle, T. (1998). An ant approach to the flow shop problem. Proceeding of the Sixth European Congress on Intelligent Techniques & Soft Computing, pp. 1560-1564, September 1998, Aachen, Germany, Verlag Mainz, Wissenschaftsverlag Stützle, T. && Hoos, H.H. (2000). MAX-MIN ant system. Future Generation Computer Systems, Vol. 16, No. 8, 889-914. Wang, X.Y.; Yang, J.; Teng, X.L.; Xia, W.J. & Jensen, R. (2007). Feature selection based on rough sets and particle swarm optimization. Pattern Recognition Letters. Vol. 28, No. 4, 459-471. Wróblewski, J. (1995). Finding minimal reducts using genetic algorithms. Proceeding of the Second Annual Join Conference on Information Sciences, pp.186-189, September 1995, Wrightsville Beach, NC 3 A New Ant Colony Optimization Approach for the Degree-Constrained Minimum Spanning Tree Problem Using Prüfer and Blob Codes Tree Coding Yoon-Teck Bau, Chin-Kuan Ho and Hong-Tat Ewe Faculty of Information Technology, Multimedia University Malaysia 1. Introduction This chapter describes a novel ACO algorithm for the degree-constrained minimum spanning tree (d-MST) problem. Instead of constructing the d-MST directly on the construction graph, ants construct the encoded d-MST. Two well-known tree codings are used: the Prüfer code, and the more recent Blob code (Picciotto, 1999). Both of these tree codings are bijective because they represent each spanning tree of the complete graph on |V| labelled vertices as a code of |V|-2 vertex labels. Each spanning tree corresponds to a unique code, and each code corresponds to a unique spanning tree. Under the proposed approach, ants will select graph vertices and place them into the Prüfer code or Blob code being constructed. The use of tree codings such as Prüfer code or Blob code makes it easier for the proposed ACO to solve another variant of the d-MST problem with both lower and upper bound constraints on each vertex (lu-dMST). A general lu-dMST problem formulation is given. This general lu-dMST problem formulation could be used to denote d-MST problem formulation also. Subsequently, Prüfer code and Blob code tree encoding and decoding are presented and then followed by the design of two ACO approaches using these tree codings to solve d-MST and lu-dMST problems. Next, results from these ACO approaches are compared on structured hard (SHRD) graph data set for both d-MST and ludMST problems, and important findings are reported. 2. Problem Formulation In this chapter, a special case of degree-constrained minimum spanning tree where the lower and upper bound of the number of edges is imposed on each vertex is considered. This similar to the problem being solved by Chou et al. (2001), and is named lu-dMST in this chapter. Chou et al. (2001) named this problem as DCMST. The d-MST problem is different since it has only the upper bound constraint. Chou et al. (2001) also proposed the following notation to be used for the lu-dMST problem formulation: G = (V, E) connected weighted undirected graph. i, j = index of labelled vertices i, j = 0, 1, 2, …, |V – 1|. 38 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization V = {v0, v1, ..., v|V|-1} is a finite set of vertices in the G. E = {eij | i ∈ V, j ∈ V, i ≠ j} is a finite set of edges in the G. T = set of all spanning trees corresponding to the G. x = a subgraph of G. Cij = nonnegative real number edge cost that connect vertex i and vertex j. Ld(i) is lower bound degree constraint on vertex i. Lower bound can vary from vertex to vertex. Ud(i) is upper bound degree constraint on vertex i. Upper bound can vary from vertex to vertex. min z( x ) = i , j∈V i< j ∑ C X . ij ij (1) subject to: ∑X j∈V i≠ j ij ≥ Ld(i ), i ∈ V . (2) ∑X j∈V i≠ j i , j∈N i< j ij ≤ Ud(i ), i ∈ V . (3) ∑X ij ≤ N − 1, N ⊂ V . = V − 1. (4) i , j∈V i< j ∑X ij (5) 1, if edge eij is part of the subgraph x | i , j ∈ V , x ∈ T ; Xij = 0, otherwise. (6) The objective function (1) seeks to minimize the total connection cost between vertices. The total cost could be distance, material cost, or customers’ requirement cost. The subconstraint (i < j) shows that graph is symmetric because vertex i must be less than vertex j where i, j ∈ V. Constraints (2) and (3) specify the lower and upper bounds degree constraints on the number of edges connecting to a vertex. The lower and upper bounds can vary from vertex to vertex. In the d-MST problem, there is only a degree constraint on each vertex. This is given by a constant value d. For the d-MST problem, the lower bound equals 1 and the upper bound equals d on each vertex. Therefore the lu-dMST problem formulation is a generalization of d-MST. At the same time, the lu-dMST problem is also NP-hard because the lu-dMST problem is a general problem formulation that can be used to represent d-MST problem (Garey & Johnson, 1979; Sipser, 2006). Constraint (4) is an anticycle constraint and constraint (5) indicates that the number of edges in a spanning tree is always equal to the number of vertices minus one. At the same time, the designed networks should not have self-loop, cycles and missing vertices. Equation (6) expresses the binary decision variable Xij equals to one if the edge between vertices i to j is part of the subgraph x, and x is a spanning tree in T; zero, otherwise. A subgraph x of G is said to be a spanning tree in T if x: A New Ant Colony Optimization Approach for the Degree-Constrained Minimum Spanning Tree Problem Using Prüfer and Blob Codes Tree Coding 39 a. contains all the vertices of G and the vertices can be in non-order form; b. is connected and graph contains no cycles. Note that in a complete graph having |V| vertices, the number of edges, |E|, is |V|(|V|1)/2, and the number of spanning trees is |V||V|-2. 3. Prüfer code and Blob code tree codings The Prüfer code of spanning trees is based on Prüfer’s constructive proof of Cayley’s Formula. Cayley showed that the number of distinct spanning trees in a complete undirected graph on |V| vertices is |V||V|-2 (Cayley, 1889; Gross & Yellen, 2006). Prüfer described a one-to-one mapping between these trees and strings of length |V|-2 over an integer of |V| vertex labels (Prüfer, 1918; Gross & Yellen, 2006). Thus, a Prüfer code of length |V|-2 whose vertices are the labels {0, 1, …, |V|-1} from a spanning tree of the complete graph on |V| vertices for |V| ≥ 2 is any sequence of integers between 0 and|V|-1, with repetitions allowed. The following Fig. 1 shows Prüfer tree encoding algorithm that constructs a Prüfer code from a given standard C|V|-2 from the set T|V| of trees on |V| labelled tree. It defines a encoding function fe : T|V| labelled vertices to the set C|V|-2 of Prüfer code of length |V|-2. For example, a Prüfer code (3, 3, 6, 4, 0) corresponds to a spanning tree on seven vertices graph in Fig. 2. The first position value for Prüfer code is 3 because the Prüfer encoding algorithm finds the neighbour of vertex v of degree 1 with the smallest label in the spanning tree T is 3 whereby v = 1. Then the vertex labelled v = 1 is removed from the spanning tree T. This process is repeated to find the second position value for Prüfer code until only two vertices are remained in the spanning tree T. Two vertices remained in the spanning tree T as in the example mentioned below are vertices labelled 0 and 6. Notice also for example in Fig. 2 that the degree of each vertex in the spanning tree can be easily checked because it is one more than the number of times its label appears in the Prüfer code. Fig. 3 shows the Prüfer decoding algorithm that maps a given Prüfer code to a standard labelled tree. The Prüfer decoding algorithm defines a function fd : C|V|-2 T|V| from the set of Prüfer code of length |V|-2 to the set of labelled trees on the |V| vertices. For example, the Prüfer decoding algorithm identifies the tree’s edges in this order: (1, 3), (2, 3), (3, 6), (5, 4), (4, 0), and (0, 6) as in Fig. 2. The Prüfer code’s integers appear as the second vertices in the tree’s first five edges. The last edge (0, 6) is joined by remaining two integers in list L (line 12 of Fig. 3) to produce the spanning tree with its vertex-labelling. Notice that the tree obtained in Fig. 2 by Prüfer decoding of the sequence (3, 3, 6, 4, 0) is the same as the tree that used by Prüfer-encoded sequence of (3, 3, 6, 4, 0) at the beginning. This inverse relationship between the encoding and decoding functions asserts that the decoding function fd : C|V|-2 T|V| is the inverse of the encoding function fe : T|V| C|V|-2. 1 2 3 4 5 6 7 8 labelledTreeToPruferCode(T = (V, E), Cij) code ( ) Initialise T to be the given tree. for i = 1 to |V|-2 do Let v be the vertex of degree 1 with the smallest label in T. Let code[i-1] be the label of the only neighbour of v. T T – {v} return code Figure 1. The pseudocode of Prüfer encoding from the labelled tree to its Prüfer code 40 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Figure 2. A Prüfer code and the spanning tree on seven vertices that it represents and vice versa via Prüfer encoding and decoding algorithms 1 2 3 4 5 6 7 8 9 10 11 12 13 pruferCodeToLabelledTree(code) Initialise code as the Prufer input sequence of length |V|-2. Initialise forest F as |V| isolated vertices, labelled from 0 to |V|-1. L {0, 1, …, |V|-1} ET { } for i = 1 to |V|-2 do Let k be the smallest integer in list L that is not in the code. Let j be the first integer in the code. ET ET ∪ {(k, j)} L L – {k} Remove the first occurrence of j from the code. Add an edge joining the vertices labelled with the two remaining integers in list L. return ET Figure 3. The pseudocode of Prüfer decoding from the Prüfer code to its labelled tree There are many other mappings from integers of |V|-2 vertex labels to spanning trees. Picciotto (1999) has described three tree codings, different from Prüfer code. One of the tree codings is called the Blob code. In Picciotto’s presentation, Prüfer codes decoded as Blob codes represent directed spanning trees rooted at vertex 0. In such a tree, there is a directed path from every vertex to vertex 0, and only vertex 0 has no out-edge. Ignoring the edges’s direction yields an undirected spanning tree. Figure 4 shows the Blob encoding algorithm for finding Blob code for a spanning tree. A blob is an aggregation of one or more vertices. This algorithm is progressively identifying vertices, starting at |V|-1 and ending with a blob-vertex consisting of all the vertices from 1 to |V|-1. As the blob grows, so does the code; meanwhile, the number of directed edges shrinks. At first, an undirected spanning tree is temporarily regarded as a directed spanning tree rooted at vertex labelled 0 to determine the successor succ(v) of every vertex v ∈ [1, |V|-1] where succ(v) is the first vertex on the unique path from vertex v to vertex 0 in a spanning tree. The Blob encoding algorithm uses this directed spanning tree rooted at vertex labelled 0 as a set of directed edges whose vertices are the labels {0, 1, ..., |V|-1} as its input. The algorithm uses two functions: succ(v) returns the first vertex on the unique path from vertex v to vertex 0 in a spanning tree, and (path(v) ∩ blob) returns TRUE if the directed path (an ordered list of vertices) using those directed edges from vertex v toward vertex 0 intersects the blob, FALSE otherwise. A New Ant Colony Optimization Approach for the Degree-Constrained Minimum Spanning Tree Problem Using Prüfer and Blob Codes Tree Coding 41 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 labelledTreeToBlobCode(T = (V, E), Cij) blob {|V|-1} blobCode ( ) //an array of length |V|-2 for i = 1 to |V|-2 do if path(|V|-1–i) ∩ blob ≠ Ø then blobCode[|V|-2-i] succ(|V|-1-i) ET ET – {(|V|-1-i succ(|V|-1-i))} blob blob ∪ {|V|-1-i} else blobCode[|V|-2-i] succ(blob) ET ET – {(blob succ(blob))} ET ET ∪ {(blob succ(|V|-1-i))} ET ET – {(|V|-1-i succ(|V|-1-i))} blob blob ∪ {|V|-1-i} return blobCode Figure 4. The pseudocode of Blob encoding from the labelled tree to its Blob code An example of a Blob code corresponds to a directed spanning tree on seven vertices graph is given in Fig. 5. The successor succ(v) information for this directed spanning tree is shown in Table 1. Once this table has been constructed, the Blob code corresponding to this directed spanning tree on seven vertices graph is equal to (3, 3, 6, 4, 0). Initially on line 2 of Fig. 4, a blob containing a single vertex 6 is created, the vertex 6 is the largest label and blobCode = ( ). The blobCode is an array of length |V|-2. The Blob encoding algorithm’s first iteration (path(|V|-1-i) ∩ blob) = (path(5) ∩ blob) is FALSE on line 5 of Fig. 4. So the else 0) edge; add an edge from blob block is followed whereby blobCode[4] = 0; delete (blob 4) and put 5 into the blob. The second iteration succ(5) which is 4; delete the edge (5 (path(4) ∩ blob) is also FALSE. So the else block is followed whereby blobCode[3] = 4; delete (blob 4) edge; add an edge from blob succ(4) which is 0; delete the edge (4 0) and put 4 into the blob. The third iteration (path(3) ∩ blob) is TRUE. The then block is followed in the 6) and put 3 in the algorithm whereby blobCode[2] = 6 which is succ(3); delete the edge (3 blob. This process continues through two more iterations which blobCode[1] = 3 and blobCode[0] = 3 are obtained, and hence the Blob code of length |V|-2 is equal to blobCode = (3, 3, 6, 4, 0) is determined. It happened that this Blob code is the same with Prüfer code as in Fig. 2 using the same spanning tree as an example. 5 4 0 1 6 2 3 (3, 3, 6, 4, 0) Figure 5. A Blob code and a rooted directed spanning tree on seven vertices that it represents and vice versa via Blob encoding and decoding algorithms 42 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization v 1 2 3 4 5 6 succ(v) 3 3 6 0 4 0 Table 1. The successor succ(v) information of every vertex v ∈ [1, |V|-1] Nevertheless Blob code is already proven to be a different coding system from the Prüfer code by Picciotto (1999) in his PhD thesis even tough Blob code contains the same number of times of its vertex label as it appears in the Prüfer code for the same spanning tree representation. The reason for this is the sequences of both Blob code and Prüfer code can have distinct vertex label for each of their sequence position to represent the same spanning tree. An example suffices to prove that Blob code = (2, 4, 4, 6, 2, 4) is different from the Prüfer code = (6, 2, 4, 2, 4, 4) even though these codes are used to represent the same spanning tree. To identify the directed spanning tree that a Blob code represents, the Blob decoding algorithm begins with a single directed edge from a blob to vertex 0. This blob contains all the other vertices except vertex labelled 0, and as the algorithm proceeds, it always contains vertices numbered i, i+1, …, |V|-2 as i moves from 1 to |V|-2. The algorithm scans the code and adjusts the developing spanning tree depending on whether or not the directed path from each vertex in Blob code toward vertex 0 intersects the blob, which shrinks by one vertex on each iteration. The following Fig. 6 summarizes the Blob decoding algorithm, which also uses the same two functions as Blob encoding algorithm: succ(v) and (path(v) ∩ blob). The edges directions are ignored to obtain the undirected spanning tree that the Blob code represents. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 blobCodeToLabelledTree(blobCode) blob {1, 2, …, |V|-1} ET {(blob 0)} for i = 1 to |V|-2 do blob blob – {i} if path(blobCode[i–1]) ∩ blob ≠ Ø then ET ET ∪ {(i blobCode[i–1])} else ET ET ∪ {(i succ(blob))} ET ET – {(blob succ(blob))} ET ET ∪ {(blob blobCode[i–1])} // now blob is a vertex labelled |V|-1 blob {|V|-1} in any edges where the blob appears. return ET Figure 6. The pseudocode of Blob decoding from the Blob code to its labelled tree A New Ant Colony Optimization Approach for the Degree-Constrained Minimum Spanning Tree Problem Using Prüfer and Blob Codes Tree Coding 43 Figure 5 shows the Blob code (3, 3, 6, 4, 0) and the spanning tree to which it decodes via the Blob decoding algorithm. The algorithm identifies the tree’s (directed) edges in this order: (1, 3), (2, 3), (3, 6), (4, 0), (5, 4), and (6, 0). Initially on line 2 of Fig. 6, the blob contains vertices 0). The algorithm’s first iteration 1 through 6 and the tree consists of the single edge (blob removes vertex 1 from the blob. The blobCode[0] = 3 and the blob contains vertex 3, so that 3) is added to the tree. The second iteration (path(3) ∩ blob) is TRUE and the edge (1 removes vertex 2 from the blob. The blobCode[1] = 3, (path(3) ∩ blob) is also TRUE, and the edge (2 3) is added to the tree. The third iteration removes vertex 3 from the blob. The blobCode[2] = 6, (path(6) ∩ blob) is TRUE, and the edge (3 6) is added to the tree. The fourth iteration removes vertex 4 from the blob. The blobCode[3] = 4, (path(4) ∩ blob) is FALSE. So the else block is followed whereby succ(blob) which is 0; an edge (4 0) is added to the tree; 0) and add an edge (blob 4). This process continues through one delete the edge (blob more iteration, each of which increases the number of the tree’s edges by one. Then, the blob itself is replaced by vertex 6 as on line 13 of Fig. 6. The Blob code’s integers appear as the destination vertices of the first five edges. An efficient implementation of the algorithm represents the directed edges in an array that is indexed by the vertex labels. If (i j) is an edge, then the array entry indexed i holds j. As in Prüfer codes, the degree of each vertex in the spanning tree is one more than the number of times its label appears in the Blob code decoded by the Blob decoding algorithm. This is the same directed spanning tree that was encoded by the Blob encoding algorithm as shown as example above. So, the Blob decoding algorithm has indeed reversed the Blob encoding algorithm. 4. An ACO algorithm using Prüfer code and Blob code tree codings for dMST problem In the design of an ACO algorithm, it has been customary to have the ants work directly on the construction graph. For pheromones associated with the graph edges, a common difficulty is the number of pheromone updates is in the order of O(|V|2), V being the set of vertices of the construction graph. A new ACO algorithm for the d-MST problem is proposed that can address this challenge in a novel way. Instead of constructing the d-MST directly on the construction graph, ants construct the encoded d-MST as solution components. Two well-known tree codings either by using the Prüfer code or the more recent Blob code is used. Under the proposed approach, ants will select graph vertices and place them into the Prüfer code or Blob code being constructed. The advantages of using tree codings as ACO solution components are it reduces the complexity of the number of pheromone update operations to O(|V|-2) attributed to the length of the Prüfer or Blob codes, capable of representing all possible spanning trees from these tree codings, capable of representing only graph spanning trees, and the degree of each vertex in the decoded spanning tree is easily determined whether it’s satisfied the degree constraint, d or not. The degree of each vertex in the spanning tree is one more than the number of times its label appears in the Prüfer or Blob codes. The pseudocode of the proposed ACO approach for d-MST problem is given in Fig. 7. Both of the Prüfer coding and the Blob coding can be applied using this pseudocode. This ACO approach uses local search procedure. The pseudocode of the local search procedure using exchange mutation is given in Fig. 8. Two separate experiments are conducted for the ACO approach in Fig. 7. The first experiment uses the Prüfer encoding and decoding algorithms. 44 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The second experiment uses the Blob encoding and decoding algorithms. Lines from 2 to 4 of Fig. 7 set several parameters for the ACO approach. The parameters are: τ0 is the initial pheromone, • maximum edge weight cost for SHRD graph is set to 20*|V|, • • pheromone trails τvr be the desirability of assigning vertex v to a tree code of array index r is initially set to a small value as τ0 = |V|2*20*|V|, where v ∈ [0, |V|-1] and r ∈ [0, |V|-3]. Note that, [0, |V|-1] is the vertex labels in the spanning tree from 0 to |V|-1 and [0, |V|-3] is the array indices of the tree code (in array structure) of length |V|-2 from 0 to |V|-3, • mAnts is the number of ants, • antDeg[k][v] is the array of ant k degree for each vertex v in the spanning tree where k ∈ [1, mAnts] and v ∈ [0, |V|-1], ant[k].avlVtx is the list of ant k available vertices to be selected from the spanning tree • vertices where k ∈ [1, mAnts], • antTreeCode[k][r] is the array of ant k tree code of length |V|-2 where k ∈ [1, mAnts] and r ∈ [0, |V|-3], • d-PrimCode[r] is the tree code of d-Prim degree-constrained spanning tree (d-ST) of length |V|-2 where r ∈ [0, |V|-3]. The d-Prim algorithm as described in (Narula & Ho, 1980; Knowles & Corne, 2000) is a greedy algorithm and might not always find the globally optimal solution. It is based upon alterations or additions to Prim’s algorithm (Prim, 1957) for finding a MST. The d-PrimCode is encoded from its d-Prim d-ST by using tree encoding algorithms, • d-STgbCode[r] is the tree code of global-best degree-constrained spanning tree of length |V|-2 where r ∈ [0, |V|-3]. Initially d-STgbCode d-PrimCode, • ant_d-STCost[k] is the total weight cost of d-STk of antTreeCode[k] where k ∈ [1, mAnts]. The antTreeCode[k] cost is computed from its d-ST by using tree decoding algorithm, • d-PrimCost is the total weight cost of d-Prim d-ST. The d-Prim d-ST is determined by using d-Prim algorithm, • Lgb is the total weight cost of d-STgb. Initially Lgb d-PrimCost, a positive integer which governs the influences of pheromone trails α, • • evaporation rate ρ, • a positive integer Q, and • termination_cond is the termination condition where it can be either a predefined number of iterations has been reached or a satisfactory solution has been found. The ACO algorithm starts by initialising d-STgbCode of length |V|-2 to be equal to the dPrimCode as on line 3 of Fig. 7. d-Prim d-ST is encoded by using tree encoding algorithm to obtain its d-PrimCode. Then, the ants start to construct their tree code solutions. Initially, antDeg[k][v] is set to 1 where k ∈ [1, mAnts] and v ∈ [0, |V|-1] as on line 8 of Fig. 7. The reason for this is the degree of each vertex in the spanning tree is one more than the number of times label of vertices appears in the Prüfer or Blob codes and initially for each ant their antTreeCode[k] is emptied. Next, for each ant their ant[k].avlVtx is initially set to {0, 1, …, |V|-1} where the spanning tree vertex labels start from 0 to |V|-1 (line 9 of Fig. 7). Line 12 of Fig. 7 the ants start to construct their first (index 0) tree code solutions by selecting a vertex v from ant[k].avlVtx randomly. A particular vertex v will be removed from ant[k].avlVtx so that the vertex v won’t be available anymore if (antDeg[k][v] = Ud(v)). The reason for this is to ensure that degree constraint is not violated. For the remaining tree code A New Ant Colony Optimization Approach for the Degree-Constrained Minimum Spanning Tree Problem Using Prüfer and Blob Codes Tree Coding 45 position value that is starting from its second position (index 1) to its last position (index |V|-3) as lines from 16 to 32 of Fig. 7, every ant will select a vertex v among the available vertices from ant[k].avlVtx probabilistically by applying the roulette wheel selection (Goldberg, 1989; Michaelwicz, 1996; Dorigo & Stützle, 2004) method. According to the probability on line 25 of Fig. 7, only the pheromone trail τvr indicates the desirability of assigning vertex v to a tree code at array index r is being used. Notice also that this probability formula does not use any visibility measure because the pheromone trail τvr does not means that an edge cost connecting from vertex v (the ant k tree code array value) to vertex r (the ant k tree code array index) always exists. After every ant k has completed their antTreeCode[k] of length |V|-2, then the ant_dSTCost[k] is determined from their antTreeCode[k] where antTreeCode[k] is decoded by using the tree decoding algorithm to obtain the ant k d-STk. If the ant_d-STCost[k] is less costly than the current Lgb as on line 36 of Fig. 7, then the current d-STgbCode will be replaced to be equal to antTreeCode[k]. Next, the local search procedure by using exchange mutation is applied as on line 39 of Fig. 7. The new mutated tree code will always produce a new feasible d-ST. The detail of exchange mutation is given in Fig. 8. The exchange mutation used here takes the current d-STgbCode and the current Lgb as its inputs. Then, two different positions from d-STgbCode are being selected randomly so that both of the position values can be exchanged. As on line 10 of Fig. 8, the number of times for the exchange mutation procedure that takes the mutated code as its input to be repeated is equal to |V|/2 if |V| is an even number, else (|V|+1)/2. Notice that, lines from 14 to 30 of Fig. 8, the exchange mutation will be stopped even if the number of repetition has not been completed; if the current new mutated d-ST code is less costly than the current d-STgb code. Then, the current d-STgb code will be replaced by the better mutated d-ST code. If the mutated d-ST code is not better than the current d-STgb code, the current d-STgb code will be remained without any changes made to its spanning tree code as implied on line 31 of Fig. 8. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 procedure ACO for d-MST Set parameters. d-STgbCode d-PrimCode //d-Prim d-ST is encoded by using tree encoding algorithm Lgb d-PrimCost while termination_cond = false do for k = 1 to mAnts do for v = 0 to |V|-1 do antDeg[k][v] = 1 //each ant k spanning tree vertices initial degree is set to 1 ant[k].avlVtx {0, 1, …, |V|-1} for k = 1 to mAnts do v select from ant[k].avlVtx randomly antTreeCode[k][0] = v antDeg[k][v] = antDeg[k][v] + 1 if antDeg[k][v] = Ud(v) then ant[k].avlVtx ant[k].avlVtx – {v} r0 while (r < |V|-2) do rr+1 for k = 1 to mAnts do 46 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 The ant k tree code of array index r of iteration t will select a vertex v among the list of available vertices from ant[k].avlVtx, according to probability: [τ vr (t )]α , if ∀l ∈ ant[k ].avlVtx; ∑ [τ lr (t )]α k pv (tr ) = l∈ant [ k ]. avlVtx , if ∀l ∉ ant[k ].avlVtx. 0 antTreeCode[k][r] = v antDeg[k][v] = antDeg[k][v] + 1 if antDeg[k][v] = Ud(v) then ant[k].avlVtx ant[k].avlVtx – {v} for k = 1 to mAnts do ant_d-STCost[k] compute the d-STk cost from antTreeCode[k] by using tree decoding algorithm if ant_d-STCost[k] < Lgb then Lgb ant_d-STCost[k] d-STgbCode antTreeCode[k] d-STgbCode Local search by using exchange mutation(d-STgbCode, Lgb) //Fig. 8 The pheromone trails are updated: k τ vr (t + 1) = (1 - ρ ) τ vr (t ) + Σ ∆τ vr , k =1 mAnts where Q/Lgb ; ∆τ = as global update only. 0, otherwise. k vr where Lgb is the total weight cost of decoded d-STgbCode by using tree decoding algorithms to obtain its d-STgb cost. end while end procedure Figure 7. The pseudocode of the proposed ACO approach for d-MST problem. Both tree codings can be applied using this pseudocode Back to the last step in an iteration of ACO on line 40 of Fig. 7 is the pheromone update. Only global pheromone update procedure is applied. The global update pheromone procedure decreases the value of the pheromone trails on τvr by a constant factor ρ and at the same time also deposit pheromone of an amount Q/Lgb. The v and r of τvr is corresponding to be the desirability of assigning vertex v in d-STgb code of length |V|-2 at array index r where v ∈ [0, |V|-1] and r ∈ [0, |V|-3]. Q is a positive integer and Lgb is the total weight cost of decoded d-STgb tree code of the current iteration by using tree decoding algorithm to obtain its d-STgb cost. A New Ant Colony Optimization Approach for the Degree-Constrained Minimum Spanning Tree Problem Using Prüfer and Blob Codes Tree Coding 47 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 procedure Local search by using exchange mutation(d-STgbCode, mutatedCode d-STgbCode //tree code of length |V|-2 indexFirst random[0, |V|-3] do { indexSecond random[0, |V|-3] } while (indexFirst = indexSecond) tempInteger mutatedCode[indexSecond] mutatedCode[indexSecond] mutatedCode[indexFirst] mutatedCode[indexFirst] tempInteger if (|V|%2 = 0) then //if |V| is an even integer numberOfTimes |V|/2 else numberOfTimes (|V|+1)/2 count 0 do { count count + 1 mutatedCodeCost compute the mutated tree code length from its mutatedCode by using tree decoding algorithm if (mutatedCodeCost < Lgb) then Lgb = mutatedCodeCost return mutatedCode else indexFirst random[0, |V|-3] do { indexSecond random[0, |V|-3] } while (indexFirst = indexSecond) tempInteger mutatedCode[indexSecond] mutatedCode[indexSecond] mutatedCode[indexFirst] mutatedCode[indexFirst] tempInteger } while (count < numberOfTimes) return d-STgbCode Lgb) Figure 8. The pseudocode of the local search procedure by using exchange mutation 5. An ACO algorithm using Prüfer code and Blob code tree codings for ludMST problem Four modifications have been made to the algorithm mentioned in section 4 to solve another variant of the d-MST problem with both lower and upper bound constraints on each vertex. The pseudocode of the proposed ACO approach for lu-dMST problem is given in Fig. 9. The Prüfer coding and Blob coding can be applied using this pseudocode. Again, two separate experiments are conducted. The first experiment is using the Prüfer coding and the second experiment is using the Blob coding. The use of tree codings such as Prüfer and Blob codes have made it easier to solve lu-dMST problem because the degree of the spanning tree is equal to one more of the number of times label of vertices appears in the Prüfer or Blob codes. It is also easy to determine if both the lower and upper bound constraints on each vertex are satisfied. 48 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The first modification is to add new parameter ant[k].lwrBndList for each ant. The ant[k].lwrBndList parameter is the ant k lower bound list where k ∈ [1, mAnts]. The intention is that each ant will populate the vertices from ant[k].lwrBndList into antTreeCode[k] before selecting vertices from ant[k].avlVtx. This ant[k].lwrBndList parameter is needed for the ants to meet their lower bound degree constraint requirement. Each ant initialises their ant[k].lwrBndList as ant[k].lwrBndList ant[k].lwrBndList ∪ {v} if Ld(v) > 1 for each v in V. Because the Ud(v) can be vary from vertex to vertex and be equal to one, the ant k also need to initialises their ant[k].avlVtx as ant[k].avlVtx ant[k].avlVtx ∪ {v} if Ud(v) ≠ 1 for each v in V. The second modification (line 4 of Fig. 9) is that the d-PrimCode is used to initialise the pheromone trails instead of being used as the starting solution for d-STgb code as in Fig. 7. The reason for this is most of the time, the d-Prim algorithm generates spanning tree that does not satisfy the lower bound degree constraint requirement for lu-dMST problem. The degree constraint for d-Prim is set to the maximum value of Ud(i) where i ∈ V. The d-Prim dST is encoded to d-PrimCode by using tree encoding algorithm. The third modification (lines 25 to 45 of Fig. 9) is the ants’ tree code solution construction process to obtain their antTreeCode[k]. According to probability on line 35 of Fig. 9, the ant k will select a vertex v from ant[k].lwrBndList if ant[k].lwrBndList ≠ { } before the ant k can select a vertex v from ant[k].avlVtx for their antTreeCode[k]. The reason for this is to do away with repair function. If the repair option is used extensively it may be computationally expensive to repair infeasible ants’ tree code solutions instead of the computation time could be better used for the ants to explore a better solution. A particular vertex v will be removed from ant[k].lwrBndList if (antDeg[k][v] = Ld(v)) and at the same time the vertex v will also be removed from ant[k].avlVtx if (antDeg[k][v] = Ud(v)). This is to ensure that both the lower and upper bound degree constraints during the ants’ solutions construction process are adhered to. The objective function returns the cost of the lower and upper degree-constrained spanning tree (lu-dST). After every ant has completed their antTreeCode[k] of length |V|-2, then the best antTreeCode[k] will become the lu-dSTgbCode. The cost of the best antTreeCode[k] is determined by using tree decoding algorithms. Then, the same local search procedure by using exchange mutation as for d-MST problem is applied. This local search procedure is already given in Fig. 8. The final modification is to add an extra pheromone update. The pheromone trails τvr are updated by using the v and r of d-PrimCode as follows: τvr(t+1) = (1 – ρ)τvr(t) + Q/d-PrimCost. (7) where the d-Prim degree constraint is set randomly between two and the maximum value of Ud(i) where i ∈ V. The d-Prim d-ST is encoded to d-PrimCode by using tree encoding algorithm. This d-PrimCode can be differed from the d-PrimCode as on line 4 of Fig. 9. This additional pheromone update idea is to enable the ants to consider others possible vertex v for their tree code solutions. 1 2 3 4 5 procedure ACO for lu-dMST Set parameters. Set Lgb to the maximum real number. The pheromone trails τvr are initialised by using v and r of d-PrimCode as follows: τvr(t+1) = (1 – ρ)τvr(t) + Q/d-PrimCost A New Ant Colony Optimization Approach for the Degree-Constrained Minimum Spanning Tree Problem Using Prüfer and Blob Codes Tree Coding 49 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 where d-Prim degree constraint is set to the maximum value of Ud(i) where i ∈ V. The d-Prim d-ST is encoded to d-PrimCode by using tree encoding algorithm. while termination_cond = false do for k = 1 to mAnts do for v = 0 to |V|-1 do antDeg[k][v] = 1 //each ant k spanning tree vertices initial degree is set to 1 if Ld(v) > 1 then ant[k].lwrBndList ant[k]. lwrBndList ∪ {v} if Ud(v) ≠ 1 then ant[k].avlVtx ant[k].avlVtx ∪ {v} for k = 1 to mAnts do v select from ant[k].avlVtx randomly antTreeCode[k][0] = v antDeg[k][v] = antDeg[k][v] + 1 if antDeg[k][v] = Ld(v) then ant[k].lwrBndList ant[k]. lwrBndList – {v} if antDeg[k][v] = Ud(v) then ant[k].avlVtx ant[k].avlVtx – {v} r0 while (r < |V|-2) do rr+1 for k = 1 to mAnts do The ant k tree code of array index r of iteration t will select a vertex v from the spanning tree vertices, according to probability: [τ vr (t )]α , if ∀l ∈ ant[k ].lwrBndList ; α ∑ [τ lr (t )] ,if ant[k ].lwrBndList ≠ {}; l∈ant[ k ].lwrBndList 0 , if ∀l ∉ ant[k ].lwrBndList. pvk (tr ) = α [τ vr (t )] , if ∀l ∈ ant[k ].avlVtx; ∑ [τ lr (t )]α , otherwise. l∈ant [ k ].avlVtx , if ∀l ∉ ant[k ].avlVtx. 0 antTreeCode[k][r] = v antDeg[k][v] = antDeg[k][v] + 1 if antDeg[k][v] = Ld(v) then ant[k].lwrBndList ant[k]. lwrBndList – {v} if antDeg[k][v] = Ud(v) then ant[k].avlVtx ant[k].avlVtx – {v} for k = 1 to mAnts do ant_lu-dSTCost[k] compute the lu-dSTk cost from its antTreeCode[k] by using tree decoding algorithm if ant_lu-dSTCost[k] < Lgb then Lgb ant_lu-dSTCost[k] lu-dSTgbCode antTreeCode[k] 50 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization lu-dSTgbCode Local search by using exchange mutation(lu-dSTgbCode, Lgb) //Fig. 8 52 53 Then, the pheromone trails are updated as global update as follows: mAnts 54 k τ vr (t + 1) = (1 - ρ ) τ vr (t ) + Σ ∆τ vr , 55 k =1 56 where 57 58 Q/Lgb ; k ∆τ vr = 59 as global update. 60 0, otherwise. 61 where Lgb is the total weight cost of decoded lu-dSTgbCode by using tree decoding 62 algorithms to obtain its lu-dSTgb cost. 63 The pheromone trails τvr are updated by using v and r of d-PrimCode as follows: 64 τvr(t+1) = (1 – ρ)τvr(t) + Q/d-PrimCost 65 where the d-Prim degree constraint is set randomly between two and the maximum 66 of Ud(i) where i ∈ V. The d-Prim d-ST is encoded to d-PrimCode by using tree 67 encoding algorithm. 68 end while 69 end procedure Figure 9. The pseudocode of the proposed ACO approach for lu-dMST problem. Both tree codings can be applied using this pseudocode 6. Performance comparisons of Prüfer ACO and Blob ACO on structured hard (SHRD) graph data set for d-MST problem The Prüfer-coded ACO and Blob-coded ACO are tested on structured hard (SHRD) graphs as used in (Raidl, 2000; Mohan et al., 2001; Bui & Zrncic, 2006) for the d-MST problem. The SHRD graphs are constructed by using non-Euclidean distance as follows. The first vertex is connected to all other vertices by an edge of length l; the second vertex is connected to all vertices bar the first by an edge of length 2l and so on. Then SHRD is randomised slightly by adding a uniformly distributed perturbation between 1 and 18 where l = 20. The details to generate a SHRD graph is given in Fig. 10. This reduces the likelihood of a large number of optimal solutions existing but doesn’t change the underlying complexity of the problem. These are difficult to solve optimally compared to other data sets such as Euclidean data sets of degree 3 or more (Mohan et al., 2001). The MST for SHRD is a star graph where one vertex has degree |V|-1 and the all other vertices have degree 1. The SHRD graphs are complete graphs with undirected non-negative weighted edges. The parameter ρ for Prüfer-coded ACO and Blob-coded ACO is tuned from 0.0 to 0.9. For each ρ, average solution costs over 50 independent runs are recorded. Each run terminates after 274 (50 * | V | ) iterations. The setting that produced the lowest average solution cost will be the Prüfer-coded ACO and Blob-coded ACO parameter value used for SHRD data set. Table 2 shows the parameter tuning results for Prüfer-coded ACO and Blob-coded ACO approaches on SHRD data set. The lowest ρ values for Prüfer-coded ACO and Blob-coded ACO from Table 2 are in bold print. Separate parameter values are used for Prüfer-coded ACO and Blob-coded ACO on the SHRD problem instances. The parameter value of ρ = 0.1 is chosen for Prüfer-coded ACO while value of ρ = 0.9 is chosen for Blob-coded ACO. There A New Ant Colony Optimization Approach for the Degree-Constrained Minimum Spanning Tree Problem Using Prüfer and Blob Codes Tree Coding 51 is so much difference between Prüfer-coded ACO and Blob-coded ACO parameter value of ρ. One of the probable reasons is the Blob code exhibits higher locality under mutation of one symbol compares to Prüfer code. On average only about two edges for a spanning tree is changed after changing one symbol in a Blob code to be decoded by the Blob decoding algorithm (Julstrom, 2001). Table 3 shows the values of the ACO parameters. All results are obtained using a PC with Pentium 4 processor with 512 megabytes of memory, running at 3.0 GHz under Windows XP Professional. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 procedure generateSHRDgraph Let total number of vertices as |V| Let graph edges as edge[|V|][|V|] for i = 0 to |V|-1 do for j = 0 to i do if i = j then edge[i][j] = 1000000000.000000 else edge[i][j] = 20*j + random[1, 18] edge[j][i] = edge[i][j] // Print lower left SHRD triangular graph matrix only for i = 1 to |V|-1 do for j = 0 to i-1 do Print edge[i][j] and “ ”. Print newline. end procedure Figure 10. The pseudocode to generate a SHRD graph Prüfer-coded ACO Blob-coded ACO ρ = 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1554.74 1551.96 1532.66 1533.74 1532.22 1532.04 1533.66 1533.66 1535.20 1533.52 1535.26 1530.34 1554.14 1556.68 1553.48 1554.92 1553.94 1553.90 1552.70 1552.00 Table 2. Parameter ρ tuning for Prüfer-coded ACO and Blob-coded ACO average results, problem shrd305, d = 5, |V| = 30, number of iterations = 50 * | V | = 274, number of runs = 50 52 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Prüfer-coded ACO Blob-coded ACO ρ mAnts Q 0.1 |V| 1.0 1 20*|V| |V|2*20*|V| 50 * | V | 0.9 |V| 1.0 1 20*|V| |V|2*20*|V| 50 * | V | α SHRD maxEdgeCost τ0 iterations Table 3. The ACO parameters and their values for artificial ant k using Prüfer code and Blob code tree codings on SHRD problem instances Problem Prüfer ACO avg. 16.94 9.94 8.04 8.74 6.45 5.70 16.26 3.36 5.45 9.14 8.20 3.59 8.48 Prüfer ACO best 18.89 12.01 9.60 10.74 7.79 7.15 18.67 4.82 7.19 10.71 10.04 5.40 10.25 Prüfer ACO time 15 15 15 38 38 38 87 87 87 145 145 145 855 Blob ACO avg. 17.95 12.25 7.87 10.22 7.05 6.46 17.82 4.40 7.39 9.88 9.63 4.68 9.63 Blob ACO best 19.84 14.37 9.60 11.39 8.47 8.03 19.13 5.55 8.29 11.52 11.06 5.96 11.10 Blob ACO time 21 21 21 52 52 52 118 118 118 197 197 197 1164 Enhanced k-ACO avg. 20.26 12.29 8.95 11.72 9.22 8.17 19.81 6.41 8.91 12.30 11.61 6.37 11.34 Enhanced k-ACO best 21.19 15.35 9.60 12.12 9.48 8.47 20.40 6.72 9.02 12.46 11.80 6.58 11.93 Enhanced k-ACO time 120 120 120 180 180 180 360 360 360 660 660 660 3960 SHRD153 SHRD154 SHRD155 SHRD203 SHRD204 SHRD205 SHRD253 SHRD254 SHRD255 SHRD303 SHRD304 SHRD305 Total Average: Table 4. Average and best results (quality gains over d-Prim in %), and total times (in seconds) on SHRD problem instances. Label SHRD153 means SHRD graph 15-vertex with degree constraint, d=3 and so on Table 4 summarises the results of Prüfer-coded ACO and Blob-coded ACO on SHRD data set. The Prüfer-coded ACO and Blob-coded ACO were run 50 independent times on each problem instance. Each run is terminated after 50 * | V | iterations. The number of vertices are in the range 15, 20, 25, and 30. The maximum degree was set to 3, 4 and 5. The results for the enhanced kruskal-ACO are adopted from (Bau et al., 2007). At this time, the enhanced kruskal-ACO is used as a performance benchmark. It is one of the best approaches for the dMST problem on the SHRD graphs (Bau et al., 2007). Besides average gains, the gains of the best run and total times (in seconds) that are required for 50 runs are reported in Table 4. A New Ant Colony Optimization Approach for the Degree-Constrained Minimum Spanning Tree Problem Using Prüfer and Blob Codes Tree Coding 53 The total times in seconds for 50 runs is recorded so that the time required between ACO without tree coding and ACO using tree coding can be compared. The enhanced kruskalACO is referred to as Enhanced k-ACO but the Prüfer-coded ACO and Blob-coded ACO are referred to as Prüfer ACO and Blob ACO. Between Prüfer ACO and Blob ACO, the highest average gains are underlined. It can be concluded that Enhanced k-ACO has higher total average results compared to Blob ACO. In turn, Blob ACO has higher total average results compared to Prüfer ACO. Between Prüfer ACO and Blob ACO, Blob ACO almost always identifies trees of higher gains except on a SHRD155 d=5 problem instance. Between Blob ACO and Enhanced k-ACO, Blob ACO achieves results very close to Enhanced k-ACO. On all the problem instances, the maximum average result difference between them is only by 2.42 on a SHRD303 d=3. When all three ACO approaches are compared, the Enhanced k-ACO attains the highest total average compared to the Prufer ACO and Blob ACO. The reason for this is probably due to the fact that Enhanced k-ACO uses visibility measure during the ants’ solution construction. However on all problem instances, the Prüfer ACO and Blob ACO performed faster in terms of computation time compared to the Enhanced k-ACO. The Prüfer ACO requires only about 22% and Blob ACO requires only about 29% as much time as does the Enhanced kACO. 7. Performance comparisons of Prüfer ACO and Blob ACO on structured hard (SHRD) graph data set for lu-dMST problem Four networks of varying sizes based on SHRD graphs are generated. The number of vertices are 20, 40, 60, and 80, similar to those used in (Chou et al., 2001). The SHRD 20vertex problem instance set is labelled as SHRD20, the SHRD 40-vertex problem instance set is labelled as SHRD40 and so on. For each vertex, an integer from a range of one to four is randomly generated for the lower bound degree constraint, Ld(i), and one to eight is randomly generated for the upper bound degree constraint, Ud(i) where i ∈ V. This means that the maximum value for the upper bound degree constraint is eight. The minimum value of Ld(i) and Ud(i) is always equal to 1, and Ud(i) is always greater than or equal to Ld(i). In order to ensure that the network forms at least one feasible solution, the sum for each vertex of lower bound degree constraint is set between |V| and 2(|V|-1) as follows: |V | ≤ | |−1 V i =0 ∑ L (i ) ≤ 2(|V |−1) . d (8) And, the sum for each vertex of upper bound degree constraint is set between 2(|V|-1) and |V|(|V|-1) as follows: 2(|V |−1) ≤ | |−1 V i =0 ∑ U (i ) ≤|V |(|V |−1) . d (9) The reason for this is that a spanning tree always consists of |V|-1 edges, an edge consists of exactly two distinct vertices, and the total number of the degrees of an edge is two. Therefore, the sum over the degrees deg(i) of a spanning tree on each vertex i in V as given in (Gross & Yellen, 2006) can be calculated as follows: 54 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization | |−1 V i =0 ∑ deg(i ) = 2(|V |−1) . (10) Table 5 summarises the results of these Prüfer-coded ACO and Blob-coded ACO approaches on SHRD graph. The Prüfer-coded ACO and Blob-coded ACO approaches were each run 50 independent times on each problem instance. Each run is terminated after 50 * | V | iterations. The numbers of vertices are in the range 20, 40, 60, and 80. For each i ∈ V, the 1 ≤ Ld(i) ≤ 4, 1 ≤ Ud(i) ≤ 8, and Ud(i) ≥ Ld(i). Besides average solution cost, the solution cost of the best run and total times (in seconds) required for 50 independent runs are reported in Table 5. The solution cost is used here for performance comparison rather than the quality gain. The Prüfer-coded ACO and Blob-coded ACO approaches are referred to as Prüfer ACO and Blob ACO. The parameter values of Prüfer ACO and Blob ACO for lu-dMST problem are the same as the parameter values of Prüfer ACO and Blob ACO for d-MST problem. As shown in Table 5, it can be concluded that Blob ACO always has the better results compared to Prüfer ACO. The Blob ACO always identifies trees of lower solution cost for all the problem instances in the SHRD graphs. The overall effectiveness of the Blob ACO compared to Prüfer ACO is probably due to the fact that it uses better tree coding scheme. Prüfer code is a poor representation of spanning trees for EA (Gottlieb et al., 2001; Julstrom, 2001). Small changes in Prüfer code often cause large changes in the spanning trees they represent. However on all problem instances, the Prüfer ACO requires lesser time than the Blob ACO. This does not bring to a conclusion that Blob tree coding always requires more time compared to Prüfer tree coding. In a recent study of the Blob code spanning tree representations, Paulden and Smith (2006) have described linear-time encoding and decoding algorithms for the Blob code, which supersede the usual quadratic-time algorithms. Problem SHRD20 SHRD40 SHRD60 SHRD80 Total Average: Prüfer ACO avg. 1429.28 5573.04 12167.48 16683.12 35852.92 Prüfer ACO best 1304 4941 11003 14839 32087 Prüfer ACO Time (secs) 33 330 1345 3483 5191 Blob ACO avg. 1391.56 5034.32 11448.68 15013.24 32887.80 Blob ACO best 1286 4673 10625 13844 30428 Blob ACO Time (secs) 50 458 1715 4610 6833 Table 5. Average solution cost on SHRD problem instances with both lower and upper bound degree constraints. Label SHRD20 means SHRD graph 20-vertex and so on 8. Conclusion The design and implementation of Blob-coded ACO and Prüfer-coded ACO for d-MST and lu-dMST problems have been presented. This ACO approaches is different because it constructs the encoded of the solution and can speed up computation time. Performance studies have revealed that Blob-coded ACO is almost always better than Prüfer-coded ACO for both types of problems for the SHRD graphs. However for the d-MST problem, Blobcoded ACO does not perform better than the enhanced kruskal-ACO approach in any single A New Ant Colony Optimization Approach for the Degree-Constrained Minimum Spanning Tree Problem Using Prüfer and Blob Codes Tree Coding 55 problem instance for SHRD graphs. Finally, the Blob code may be a useful coding of spanning trees for ants’ solution construction in ACO algorithms for the d-MST and ludMST problems in terms of computation time. There may be other codings of spanning trees even more appropriate for ants’ solution construction such as Happy code or Dandellion code as mentioned by Picciotto (1999) in his PhD thesis. 9. References Bau, Yoon Teck; Ho, Chin Kuan, & Ewe, Hong Tat (2007). Ant Colony Optimization Approaches to the Degree-constrained Minimum Spanning Tree Problem. Journal of Information Science and Engineering (in press) Bui, T. N. & Zrncic, C. M. (2006). An Ant-Based Algorithm for Finding Degree-Constrained Minimum Spanning Tree. Proceedings of the 8th Annual Conference on Genetic and Evolutionary Computation, 11-18 Cayley (1889). A theorem on trees. Quarterly Journal of Mathematics, 23, 376-378 Dorigo, M. & Stützle T. (2004). Ant Colony Optimization. A Bradford Book, The MIT Press, Cambridge, MA, London, England Garey, M. R. & Johnson, D. S. (1979). Computers and Intractability: A Guide to the Theory of NPCompleteness. Freeman, San Francisco, CA Goldberg, D. E. (1989). Genetic Algorithms in Search, Optimization, and Machine Learning. Addison-Wesley, Reading, MA Gottlieb, J.; Julstrom, B. A., Raidl, G. R. & Rothlauf, F. (2001). Prüfer numbers: A poor representation of spanning trees for evolutionary search. In: Proceedings of the Genetic and Evolutionary Computation Conference GECCO-2001, Lee, Spector, Goodman, E. D., Annie, Wu, Langdon, W. B., Hans-Michael, V., Mitsuo, Gen, Sandip, Sen, Dorigo, M., Pezeshk, S., Garzon, M. H. & Burke, E. (Eds.), (343-350), Morgan Kaufmann, San Francisco, California, USA Gross, J. L. & Yellen, J. (2006). Graph Theory and its Applications 2nd ed., CRC Press, Boca Raton, London, New York, Washington, D.C. Hsinghua Chou; G. Premkumar & Chao-Hsien Chu (2001). Genetic Algorithms for Communications Networks Design – An Empirical Study of the Factors that Influence Performance. IEEE Transactions on Evolutionary Computation, Vol. 5, No. 3, 236-249 Julstrom, B. A. (2001). The Blob Code: A better string coding of spanning trees for evolutionary search. In: 2001 Genetic and Evolutionary Computation Conference Workshop Program, Annie, S. Wu (Ed.), (256-261), San Francisco, CA Knowles, J. & Corne, D. (2000). A new evolutionary approach to the degree-constrained minimum spanning tree problem. IEEE Transactions on Evolutionary Computation, 4(2), 125-134 Michalewicz Z. (1996). Genetic Algorithms + Data Structures = Evolution Programs 3rd Rev. and Extended ed., Springer Verlag Mohan, Krishnamoorthy; Andreas, T. Ernst & Yazid, M. Sharaiha (2001). Comparison of Algorithms for the Degree-constrained Minimum Spanning Tree. Journal of Heuristics, 7(6), 587-611 Narula, S. C. & Ho, C. A. (1980). Degree-constrained minimum spanning tree. Computer Operation Research, 7(4), 239-249 56 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Paulden, T. & Smith, D. K. (2006). Recent advances in the study of the Dandelion code, Happy code, and Blob code spanning tree representations, In Proceeding IEEE Congress on Evolutionary Computation, 2111- 2118 Picciotto, S. (1999). How to encode a tree, Ph.D. Thesis, University of California, San Diego Prim, R. (1957). Shortest connection networks and some generalizations. Bell System Technical Journal, 36, 1389-1401 Prüfer, H. (1918). Neuer Beweis eines Satzes über Permutationen [New proof of a counting labelled tree sequence over permutations]. Architecture Mathematics Physics, 27, 742744 Raidl, G. R. (2000). An efficient evolutionary algorithm for the degree-constrained minimum spanning tree problem. IEEE Transactions on Evolutionary Computation, 1, 104-111 Sipser, M. (2006). Introduction to the Theory of Computation 2nd ed., Course Technology 4 Robust PSO-Based Constrained Optimization by Perturbing the Particle’s Memory Angel Muñoz Zavala, Arturo Hernández Aguirre and Enrique Villa Diharce Centro de Investigación en Matemáticas (CIMAT) México 1. Introduction A successful evolutionary algorithm is one with the proper balance between exploration (searching for good solutions), and exploitation (refining the solutions by combining information gathered during the exploration phase). Diversity maintenance is important in constrained search space algorithms because the additional pressure set on the population to reach the feasible region reduces the diversity. Since reduced diversity promotes premature convergence, new exploration and exploitation techniques have been incorporated into the PSO main paradigm. In this chapter the authors review the standard PSO algorithm, and several proposals to improve both exploration and exploitation: local and global topologies, particle motion equations, swarm neighbourhoods, and interaction models. For all these approaches the common shared feature is the modification of the PSO main algorithm. The present chapter, however, describes a rather different approach: the perturbation of the particle memory. In the PSO algorithm, the next particle’s position is based on their flying experience (pbest), and the current best individual in either the entire swarm (gbest), or in a swarm neighbourhood (lbest). Since the values for gbest or lbest are determined from the pbest values available at any generation, in the end, it is the pbest which is mainly responsible for the particle’s next position. Therefore, a way to reduce premature convergence is to improve the pbest of each particle. Our approach aims to prevent convergence to local optima by improving the swarm exploration and exploitation through two perturbation operators. These external operators improve the memory of the best visited locations, and do not modify the main PSO paradigm. The rest of this Chapter is organized as follows: In Section 2, we introduce the premature convergence problem. We extend this discussion in the context of constrained optimization, in Section 3. Our approach is introduced in Section 4; giving a brief explanation about every component adopted in the PSO algorithm. In Section 5, a well-known benchmark is used to compare our approach against other PSO based methods and evolutionary algorithms representative of the state-of-the-art. The conclusion is given in Section 6, complemented with future work guidelines in Section 7. 58 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 2. Premature Convergence A natural problem in evolutionary computation is the premature convergence. It means that the evolutionary algorithm could stay trapped in a region containing a local optimum. Premature convergence can be caused by the lost of diversity, which occurs when the population reaches a suboptimal state where evolutionary algorithm can no longer produce offspring which outperforms their parents (Fogel, 1994). A way to attain diversity maintenance is by keeping a balance between exploration and exploitation (Holland, 1975). 2.1 Exploration and Exploitation The balance between exploration and exploitation is a well known issue in evolutionary computation (Michalwicz & Fogel, 2000). But, why is it hard to find an optimal balance? First, we review the classical concepts: exploration is the act of searching for the purpose of discovery; and exploitation is the act of utilizing something for any purpose (Agnes, 2004). Then, at the context of evolutionary computation, we could define exploration as the act of searching through all space regions for discovering promissory solutions; and exploitation as the act of utilizing local information for refining the solution. Accord with the given definition, Downing explained: exploitation is encouraged by elitist selection and smaller population sizes or by using lower mutation rates to promote correlation between parent and offspring. Conversely, exploration is encouraged by promoting greater population diversity and selecting parents less discerningly, or by increasing mutation rate. (Downing, 2006). We can observe that exploration and exploitation are opposite goals; both compete for limited resources, for instance, the number of fitness function evaluations. So, a trade-off between exploration and exploitation is necessary. The search horizon has to be sufficiently close for maintaining exploitation and at the same time sufficiently distant to discover significant novelty (Jacoby, 2005). The common approach in evolutionary computation about the control of exploration and exploitation is framed in terms of balancing variation and selection processes. There are several works focused to solve the equilibrium dilemma between variation and selection. Even more, there are proposals from other areas (e.g. management, economics) for solving related problems (March, 1991). In the following sections, we review some approaches and propose a new solution for balancing variation and selection in the PSO algorithm. 2.2 Diversity Control in PSO In PSO, the diversity comes from two sources. One is the difference between the particle’s current position and its best neighbor, and the other is the difference between the particle’s current position and its best historical value. Although variation provides exploration, it can only be sustained for a limited number of generations because convergence of the flock to the best is necessary to refine the solution (exploitation). In an early analysis, Angeline shows that PSO may not converge, neither refine solutions when variation is null, that is, when all the particles rest near by the best spot (Angeline, 1998). A few months after Angeline’s work, the first formal analysis of a simple PSO was developed by Ozcan and Mohan (Ozcan & Mohan, 1998), which obtained the PSO trajectories. Based on this work, Clerc and Kennedy analyzed a particle’s trajectory and determined the relationship between the acceleration parameters that avoid the divergence of the particle (Clerc & Kennedy, 2002). But, when the problem of converge premature seemed solved; Van Den Bergh proves that the PSO trajectories does not converge to the Robust PSO-Based Constrained Optimization by Perturbing the Particle’s Memory 59 global optimal (Van Den Bergh, 2002). In his Ph.D. thesis, Van Den Bergh explains the attributes that a hybrid PSO must accomplish to become a global search algorithm. There are several proposes related with developing a global search based on the PSO algorithm. In this context, we can find approaches for dealing with constraints, which is the topic of this chapter. 3 Constraint-Handling in PSO Real optimization problems are subject to a number of equality and inequality constraints, which can be linear or nonlinear. These constraints determine which areas of the search space are feasible and which are infeasible. In addition to these constraints, boundary constraints are usually imposed to the search space (Michalewicz, 1992). Also, there is the possibility that the feasible space is fragmented and separated by infeasible regions, requiring that both the feasible and infeasible regions be searched. PSO is an unconstrained search technique. Thus, adopting a constraint handling technique into the main PSO algorithm is an open research area. There is a considerable amount of research regarding mechanisms that allow the evolutionary algorithms to deal with equality and inequality constraints. Some constraint-handling approaches tend to incorporate either information about infeasibility or distance to the feasible region, into the fitness function in order to guide the search. These techniques are based on penalty functions (Parsopoulos & Vrahatis, 2002). In their work Parsopoulos and Vrahatis used a multi-stage assignment penalty function without diversity control. Other approaches propose a constraint handling technique based on maintaining a feasible population (EI-Gallad et al., 2001), and also some algorithms require a feasible initial population (Hu & Eberhart, 2002; He et al., 2004). In 2003, Coath and Halgamuge presented a comparison of the two constraint-handling methods in PSO: penalty function and feasibility preservation (Coath & Halgamuge, 2003). Their experiments clearly detect the need of some form of diversity control. In a more sophisticated approach, Zhang et al. introduced a special technique, called periodic mode, to handle inequality constraints. This method consists in keeping the global-best near the boundary thus the flock which is constantly pulled to the border, can sustain exploration (Zhang et al., 2004). A few more sophisticated approaches include applying multi-objective optimization techniques to handle constraints. For instance Toscano and Coello (Toscano & Coello, 2004), use a feasibility tournament proposed by Deb (Deb 2000) to handle constraints with PSO. The feasibility tournament applies a set of rules similar to the Pareto dominance concept used in multi-objective optimization. Notably, equality and inequality constraints demand an intelligence exploration of the search space to find the global optimum region. Likewise, an efficient and effective exploitation is required in the boundaries of the feasible region, whenever the inequality constraints are active or equality constraints are present. PSO should find a solution that both optimizes the objective function and satisfies all constraints. 4. Constrained Optimization via Particle Swarm Optimization A brief analysis of the state-of-the-art in PSO to solve constrained optimization problems was presented. Now, we are going to introduce our approach called Particle Evolutionary Swarm Optimization (PESO) (Muñoz et al., 2005). In this section we explain our approach; 60 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization and in the next section we perform a comparison with another PSO-based constraint optimization works. 4.1 Interaction Model First we should choose an appropriate interaction model for solving constrained optimization problems. In an early analysis, Kennedy provided empirically evidence that the social-only model is faster and more efficient than the full and cognitive-only models (Kennedy, 1997). These models were defined by omitting components of the velocity formula. The full model is composed by the cognition component and the social component. Dropping the social component results in the cognition-only model, whereas dropping the cognition component defines the social-only model. In a fourth model, selfless model, the neighbourhood best is chosen only from the neighbours, without considering the current individual. Carlisle and Dozier tested these four models in dynamic changing environments (Carlisle & Dozier, 2000). They empirically prove that the social-only model consistently found solutions faster than the full model, but the reliability of the social-only model is lower than the full model. We test the four models proposed by Kennedy, (Kennedy, 1997). We confirm that the socialmodel is faster than the full model, but it is not enough robust due to its premature convergence behaviour. Therefore, we adopt the full model which is more reliable for constrained optimization. 4.2 Social Network Structure In the PSO topology, each particle moves following a leader; this fact is modelled by one of three components of the velocity formula. A leader can be global to all the flock, or local to a flock’s neighbourhood. In the latter case there are as many local leaders as neighbourhoods. Having more than one leader in the flock translates into more attractors or good spots in space. Therefore, the use of neighbourhoods is a natural approach to fight premature convergence (Mendes et al., 2004). Particles in the same neighbourhood communicate with one another by exchanging information for moving towards a better position. The flow of information through the flock, depends on the neighbourhood structure. Figure 1 presents a few neighbourhood structures developed for PSO. In a highly connected neighbourhood structure, the information about the best particle in the swarm is quickly transmitted through the whole flock. This means faster convergence, which implies a higher risk to converge to a local minimum. Also, Kennedy & Mendes empirically shows that the star neighbourhood is faster than the other topologies, but it meets the optimal fewer times than any other one (Kennedy & Mendes, 2002). They suggest trying the Von Neumann neighbourhood structure, which performed more consistently in their experiments than the topologies commonly found in current practice. However, in the experiments developed by Kennedy & Mendes, they used a set of unconstrained optimization problems. However, based on their recommendation, we propose a new neighbourhood structure, which we define as singly-linked ring. The singly-linked ring rises from analysing the ring neighbourhood as a double-linked list; like it is showed in Figure 2-a. Suppose that every particle is assigned a permanent label which is used to construct the neighbourhoods. Then, a particle k has two neighbours, particles k-1 and k+1. In turn, particles k-1 and k+1 have particle k as a neighbour. In this way, there is a Robust PSO-Based Constrained Optimization by Perturbing the Particle’s Memory 61 mutual attraction between consecutive particles, forming overlapped clusters. Also, the slow convergence of the ring structure has been empirically showed (Kennedy, 1999; Kennedy & Mendes, 2002; Carlisle & Dozier, 2000). Figure 1. Neighbourhood Structures. A representation of the social networks applied in PSO The successful of the Von Neumann neighbourhood is due to the interaction that each particle has with other particles, an average of 5 neighbours. This promotes the exploitation, but unfortunately fails to provide the exploration required by the constrained optimization problems. Thus, we propose the topology presented in Figure 2b. The singly-linked ring keeps two neighbours for each particle, but breaks the mutual attraction between neighbours. Besides, the information through the whole swarm is transmitted faster than in the original ring topology. Therefore, the singly-linked ring keeps the exploration at the search space, and increases the exploitation of the best solutions (Hernández et al., 2007). 62 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Figure 2. Ring Neighbourhood Structures. a) Original ring topology, b) Singly-Linked ring 4.3 Feasibility Tournament The first step for developing a PSO-based constraint optimization is to choose a constrainthandling method. There are three methods that have been used by other approaches: penalty function, feasibility preservation and feasibility tournament. The penalty function method involves a number of parameters which must be set right in any problem to obtain good solutions. This fact has motivated sophisticated penalty function approaches and extensive experimentation for setting up appropriate parameters (Michalewicz & Schoenauer, 1996). According with Deb (Deb, 2000), there are two problems associated with the static penalty function: the optimal solution depends on penalty parameters and the inclusion of the penalty term distorts the objective function. Now, we give the details of the feasibility preservation method. There are two main problems associated with this method: it needs a feasible initial population and special operators to keep the population into the feasible region. Also, the method could be unreliable handling problems with active constraints, since it does not allow unfeasible solutions and has not information about the boundaries. The feasibility tournament proposes to use a tournament selection operator, where two solutions are compared at time, and the following criteria are always applied: 1. Any feasible solution is preferred to any infeasible solution. 2. Among two feasible solutions, the one having better objective function value is preferred. 3. Among two infeasible solutions, the one having smaller sum of constraint violation is preferred. The feasibility tournament does not require tuning parameters or applying special operators. Just a simple comparison is used to choose the best individual. Even, in any of the above three scenarios, solutions are never compared in terms of both objective function and sum of constraint violation. This method was implemented by Toscano and Coello in a PSO with global topology, obtaining competitive results (Toscano & Coello, 2004). Our approach Robust PSO-Based Constrained Optimization by Perturbing the Particle’s Memory 63 applies this method in a local topology, allowing feasible and infeasible solutions in the pbest particles. It enriches the information about the search space, especially at boundaries. Nevertheless, for handling equality constraints, it is not enough just converting them into inequality constraints: g(x) = δ-|h(x)| (1) Our approach applies a dynamic tolerance for handling equality constraints. First, we rewrite them as inequality constraints of the form |h(x)|< δ, where δ is called the tolerance. Then, the tolerance is linearly decremented from 1.0 to a specified target value (1E-06 in our experiments) during the first 90% of function evaluations. For the last 10% the tolerance is kept fixed; thus, the particles have additional time to achieve convergence. This technique proved to be very effective in the test problems that we present in the Section 5. 4.4 Perturbing the PSO Memory In Section 2, we mention the Van Den Bergh’s PhD thesis and his contributions in the PSO context. He gives a set of requirements that an evolutionary algorithm must accomplish to be a global search algorithm. Also, he shows that the PSO algorithm is not in fact a global search algorithm (Van Den Bergh, 2002). Nevertheless, Van Den Bergh gives a theorem which specifies under which conditions an algorithm can be considered a global optimization method. The theorem implies that a general algorithm, without a priori knowledge, must be able to generate an infinite number of samples distributed throughout the whole of S in order to guarantee that it will find the global optimum with asymptotic probability 1 (Van Den Bergh, 2002). This can be achieved by periodically adding randomised particles to the swarm. Nevertheless, resetting the position of the particles is not a trivial task; a bad decision affects directly in the exploitation of the best solutions. We propose, based on the observation that the pbest particles drive the swarm, perturbing the pbest of each particle. Our approach has three stages. In the first stage, an iteration of the standard PSO algorithm with the features described in this Section 4 is applied. Then the perturbations are applied to pbest in the next two stages. The goal of the second stage is to add a perturbation generated from the linear combination of three different particles for every dimension. This perturbation is preferred over other operators because it preserves the distribution of the population. This operator is used for reproduction by the Differential Evolution algorithm (Price et al., 2005). In our approach this perturbation is called C-Perturbation. It is applied to the members of pbest to yield a set of temporal particles tempC. Then each member of tempC is compared with its corresponding father and pbest is updated applying the feasibility tournament. Figure 3 shows the pseudo-code of the C-Perturbation operator. In the third stage every vector is perturbed again so a particle could be deviated from its current direction as responding to external, maybe more promissory, stimuli. This perturbation is implemented by adding small random numbers to every design variable. The perturbation, called M-Perturbation, is applied to every member of pbest to yield a set of temporal particles tempM. Then each member of tempM is compared with its corresponding father and pbest is updated applying the feasibility tournament. Figure 4 shows the pseudocode of the M-Perturbation operator, where LL and UL are the lower and upper limits of the search space. The perturbation is added to every dimension of the decision vector with probability 1/d, where d is the dimension of the decision variable vector. 64 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization For k = 0 To n For j = 0 To d r=U(0,1) p1 = k p2 = random ( n ) p3 = random ( n ) Temp [ k , j ] = Pi+1 [ p1 , j ] + r * ( Pi+1 [ p2 , j ] - Pi+1 [ p3 , j ] ) End For End For Figure 3. C-Perturbation Operator. Pseudo-code of the C-Perturbation applies by PESO These perturbations have the additional advantage of keeping the self-organization potential of the flock since they only work on the pbest particles, as we can observe in Figure 5. The current PSO population is not perturbed, but few or may be several pbest particles have been moved to a better position. This is an improved form for adding randomised particles to the swarm, compared with those propose by Van Den Bergh (Van Den Bergh, 2002). Our approach not only resets the position of the pbest particles, also improves them; probably driving the swarm to a promise region. For k = 0 To n For j = 0 To d r=U(0,1) If r < 1/d Then Temp [ k , j ] = Random ( LL , UL ) Else Temp [ k , j ] = Pi+1 [ k , j ] End For End For Figure 4. M-Perturbation Operator. Pseudo-code of the M-Perturbation applies by PESO Robust PSO-Based Constrained Optimization by Perturbing the Particle’s Memory 65 Figure 5. Effects of the perturbation operators. (a) Shows the movement of particle at iteration T+1 without perturbing the PBest in the iteration T. (b) Shows the movement of particle at iteration T+1 with the influence of PBest at iteration T+1, which is the final position after applying the perturbation operators on the PBest in the iteration T 4.5 PSO Parameters The parameters play an important roll in the successful of any evolutionary algorithm. There are several works that discuss a number of control parameters like swarm size (Van Den Bergh, 2001), neighbourhood size (Suganthan, 1999), or acceleration coefficients (Ratnaweera et al., 2002a; Ratnaweera et al., 2002b). Our approach generally uses a swarm size of n=100 particles, a neighbourhood size of k=2, and the following set of acceleration coefficients: w=U(0.5, 1.0), c1=1.0, c2=1.0, where U is a uniform distribution. These parameters have not been deeply studied; only the neighbourhood size, which has been explained in this Section. Nevertheless, the acceleration coefficients accomplish the mathematical model gave by Clerc & Kennedy to avoid divergence of the particle trajectories (Clerc & Kennedy, 2002). 4.6 Our Approach PESO In summary the proposed algorithm, PESO, is a local PSO with a singly-linked ring neighbourhood. PESO handles constraints adopting a feasibility tournament complemented with a dynamic tolerance for handling equality constraints. The main components of PESO are the C-Perturbation and M-Perturbation operators applied to the pbest population. 66 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 5. Experiments PESO is applied to solve the benchmark used in the Special Session on Constrained RealParameter Optimization, CEC-06 (Liang et al., 2006). The benchmark is an extended version of 24 functions from the original benchmark of Runnarson and Yao, with 13 functions (Runnarson & Yao, 2000). It is integrated by linear and non-linear functions with linear and non-linear constraints. The benchmark was proposed by Mezura, in his Ph.D. thesis (Mezura, 2004). TP g01 g02 g03 g04 g05 g06 g07 g08 g09 g10 g11 g12 g13 g14 g15 g16 g17 g18 g19 g20 g21 g22 g23 g24 Optimal -15.000000 -0.803619 -1.000000 -30665.538 5126.49811 -6961.8138 24.306209 -0.095825 680.630057 7049.248 0.750000 -1.000000 0.053950 -47.764411 961.715172 -1.905155 8876.98068 -0.8660 32.386 0.096737 193.778349 382.902205 -400.0025 -5.508013 Best -15.000000 -0.803619 -1.000005 -30665.53867 5126.498096 -6961.813876 24.306209 -0.095825 680.630057 7049.248020 0.749999 -1.000000 0.053950 -47.761108 961.715171 -1.905155 8856.502344 -0.866025 32.349645 *0.204095 205.852693 *157.5136 -361.856637 -5.508013 Median -15.000000 -0.803617 -1.000005 -30665.53867 5126.498096 -6961.813876 24.306210 -0.095825 680.630057 7049.248638 0.749999 -1.000000 0.053950 -47.747212 961.715171 -1.905155 8863.875542 -0.866025 32.386872 *0.209711 279.309106 *3161.1026 -136.564268 -5.508013 Mean -15.000000 -0.801320 -1.000005 -30665.53867 5126.498096 -6961.813876 24.306212 -0.095825 680.630057 7049.250087 0.749999 -1.000000 0.053950 -47.741430 961.715171 -1.905155 8877.812811 -0.866001 32.411596 *0.212003 273.298016 *5376.2265 -138.407772 -5.508013 Worst -15.000000 -0.786566 -1.000003 -30665.53867 5126.498096 -6961.813876 24.306219 -0.095825 680.630057 7049.263662 0.749999 -1.000000 0.053965 -47.670921 961.715171 -1.905155 8941.344349 -0.865568 32.571543 *0.233281 303.454837 *18732.7838 3.775736 -5.508013 S.D. 0 4.59E-03 3.15E-07 0 0 0 3.34E-06 0 0 3.61E-03 0 0 2.76E-06 2.15E-02 0 0 30.1195 8.74E-05 6.30E-02 6.94E-03 23.8556 5.01E+03 84.5217 0 Table 1. PESO results in the Benchmark. *Infeasible Solution 5.1 PESO Results In Table 1, we present the results of PESO in the benchmark problems, where S.D. means standard deviation. For every test problem 30 runs was developed, and in each run 350,000 fitness function evaluations were applied to test our. In only two test problems, g20 and g22, PESO did not find a feasible solution. These problems have 14 and 19, equality constraints respectively. Also, PESO presents a poor performance in test problems g21 and g23, where it did not reach the optimal value, but always found a feasible solution at the 30 runs. In the rest of the benchmark, PESO attains the global optimal. PESO was able to outperform the best know solution in test problems g03, g05, g11, g13, g17 and g19, due the conversion of Robust PSO-Based Constrained Optimization by Perturbing the Particle’s Memory 67 equality constraints to inequality constraints with a tolerance value of 1E-06. The whole benchmark was resolved using the same parameters, but there are several test problems, which were solved with less than 350000 fitness function evaluations. This fact is showed in Table 2. TP g01 g02 g03 g04 g05 g06 g07 g08 g09 g10 g11 g12 g13 g14 g15 g16 g17 g18 g19 g20 g21 g22 g23 g24 Best 90800 142900 315100 59600 315100 47100 185500 3600 69900 167200 315100 400 315100 326900 315100 37200 315100 102200 206800 NR NR NR NR 14900 Median 95000 175800 315100 65100 315100 54200 227600 6850 78500 221300 315100 6900 315150 326900 315100 41000 316100 153600 259650 NR NR NR NR 19350 Mean 95396.67 179395.45 315123.33 65086.67 315256.67 53410.00 233400.00 6470.00 79570.00 224740.00 315100.00 6646.67 315546.67 326900.00 315100.00 40960.00 316608.70 167088.89 264414.29 NR NR NR NR 19156.67 Worst 99400 232100 315600 70000 315900 57000 304500 8500 102400 307200 315100 10400 318100 326900 315100 45400 318800 252900 331000 NR NR NR NR 22200 S.D. 2613.29 28120.18 97.14 2713.28 245.91 2577.80 32253.97 1381.94 7154.65 38407.87 0 2606.98 710.87 0 0 2210.88 1061.69 43430.30 36456.84 NR NR NR NR 1927.24 F.R. 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0 30 0 30 30 S.R. 30 22 30 30 30 30 30 30 30 30 30 30 30 1 30 30 23 27 14 0 0 0 0 30 Table 2. Convergence of PESO in the Benchmark. NR Optimal not reached In Table 2, we present the number of fitness function evaluations that PESO requires to attain a value within 1E-4 of the optimal. Also, the number of feasible runs, F.R. and the number of successful runs, S.R. are showed. We define like F.R. that run, which finds at least one feasible solution in less than 350000 fitness evaluations. On the other hand, when the best value found is within 1E-4 of the optimal the run is successful. Only the successful runs were used to calculate the measures presented in Table 2. Test problems with equality constraints require at least 315000 fitness function evaluations, due the dynamic tolerance applied in PESO. The experiments show a poor performance of PESO in test problems g20, g21, g22 and g23. These problems have several equality constraints; in fact the problems g20 and g22 have more than 10 of them. Now, we compare our approach against other PSO based methods and evolutionary algorithms representative of the state-of-the-art. 68 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 5.2 Comparison PESO versus Turbulent PSO First we compare PESO against another PSO approach which applies feasibility tournament to handle constrained optimization problems. In Section 3, we mention that Toscano and Coello proposed a constraint handling technique for PSO (Toscano & Coello). Their approach handles constraints through a feasibility tournament, and keeps diversity by adding mutations to the velocity vector using a turbulence operator. They test the original benchmark with 13 test functions (Runnarson & Yao, 2000). The comparison is shown in Table 3. TC-PSO (Toscano and Coello’s PSO) performed 340,000 fitness function evaluations, 10,000 less than PESO, but it is not significative for the comparison. The performance of PESO is better than TC-PSO on test problems g02, g05, g07, g09, g10 and g13. TP g01 g02 g03 g04 g05 g06 g07 g08 g09 g10 g11 g12 g13 Optimal -15.000000 -0.803619 -1.000000 -30665.538 5126.49811 -6961.8138 24.306209 -0.095825 680.630057 7049.248 0.750000 -1.000000 0.053950 PESO -15.000000 -0.803619 -1.000005 -30665.53867 5126.498096 -6961.813876 24.306209 -0.095825 680.630057 7049.248020 0.749999 -1.000000 0.053950 TC-PSO -15.000000 -0.803432 -1.004720 -30665.500000 5126.640000 -6961.810000 24.351100 -0.095825 680.638000 7057.590000 0.749999 -1.000000 0.068665 Table 3. Comparison of two PSO with feasibility tournament for handling constraints. Best results of PESO and TC-PSO into 30 runs 5.3 Comparison PESO versus Feasible PSO Now, we compare PESO against the approach proposes by Hu and Eberhart (Hu & Eberhart, 2002). They apply a global PSO based on feasibility preservation for handling constraint problems. They only test the first 12 test functions of the benchmark. The comparison is shown in Table 4. HE-PSO (Hu and Eberhart’s PSO) performed 100,000 fitness function evaluations. For developing a real comparison, PESO performed 100,000 fitness function evaluations. Nevertheless, the comparison is not equal since we do not take into account the number of constraint evaluations that HE-PSO performs to preserve feasibility. Also, we must mention that the randomly initialized particles are not always in the feasible space. So initialization may take a longer time. The performance of PESO is better than HE-PSO on test problems g02, g06, g07, g09 and g10. Even, there is not available information about the performance of HE-PSO at test problem g05. We should observe that PESO is robust to the number of fitness function evaluations. It is not a surprise, since in Table 2 we can observe the convergence rate of PESO for every test problem. In the first 12 test problems there are 3 with equality constraints; therefore, their convergence rate is driven by the dynamic tolerance. In the rest, there are 6 test problems with a best convergence rate lower than 100,000 fitness function evaluations. Only test problems g02, Robust PSO-Based Constrained Optimization by Perturbing the Particle’s Memory 69 g07 and g10 have a best convergence rate upper than 100,000, which cause a little decrease in their best solution found around 30 runs. TP g01 g02 g03 g04 g05 g06 g07 g08 g09 g10 g11 g12 Optimal -15.000000 -0.803619 -1.000000 -30665.538 5126.49811 -6961.8138 24.306209 -0.095825 680.630057 7049.248 0.750000 -1.000000 PESO -15.000000 -0.803613 -1.000005 -30665.53867 5126.498096 -6961.813876 24.306248 -0.095825 680.630057 7049.250802 0.749999 -1.000000 HE-PSO -15.0 -0.7130 -1.0 -30665.5 -6961.7 24.4420 -0.0958250 680.657 7131.01 0.75 -1.0 Table 4. Comparison of PESO against HE-PSO. Best results of PESO and HE-PSO into 30 runs 5.4 Comparison PESO versus Periodic Mode PSO In Section 3, we mention the special technique for handling inequality constraints introduced by Zhang et al., called periodic mode (Zhang et al., 2004). Their method keeps the global-best near the boundary thus the flock which is constantly pulled to the border, can sustain exploration. They only tested the 9 functions with inequality constraints of the benchmark proposed by Runnarson and Yao (Runnarson & Yao, 2000). The comparison is shown in Table 5. TP g01 g02 g04 g06 g07 g08 g09 g10 Optimal -15.000000 -0.803619 -30665.538 -6961.8138 24.306209 -0.095825 680.630057 7049.248 PESO -15.000000 -0.803613 -30665.53867 -6961.813876 24.306248 -0.095825 680.630057 7049.250802 PM-PSO -15.000000 -0.64330 -30665.54 -6961.814 24.306 -0.095825 680.630 7049.5 Table 5. Comparison of PESO against PM-PSO. Best results of PESO and PM-PSO into 30 runs The PM-PSO algorithm (periodic mode PSO) performed 1,500,000 fitness function evaluations. Although, PESO performed four times less fitness function evaluations than PM-PSO, we did not increase the number of fitness function evaluations, because PESO performance is competitive with the general parameters applied in these experiments. The performance of PESO is better than PM-PSO on test problems g02 and g10. 70 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 5.5 Comparison PESO versus Diversity-DE Now, we compare PESO against other evolutionary algorithms. We believe that could be interesting a comparison against a Differential Evolution algorithm, since PESO applies a CPerturbation similar to the operator used for reproduction in this algorithm. Mezura et al. modified the Differential Evolution algorithm in a way that every parent may have more than one offspring (Mezura et al., 2005). The winner is the best child but then the child is compared to the current parent. Another tournament is performed but this time the winner is found by tossing a coin and comparing by fitness value, or by constraint violation; similar to Stochastic Ranking (Runnarson & Yao, 2000). The comparison of the first 13 test functions is shown in Table 6; the number of fitness evaluations for both algorithms is 225,000. The performance of PESO and Diversity-DE is very similar. A little advantage is shown by PESO on test problems g09 and g13. TP g01 g02 g03 g04 g05 g06 g07 g08 g09 g10 g11 g12 g13 Optimal -15.000000 -0.803619 -1.000000 -30665.538 5126.49811 -6961.8138 24.306209 -0.095825 680.630057 7049.248 0.750000 -1.000000 0.053950 PESO -15.000000 -0.803618 -1.000005 -30665.53867 5126.498096 -6961.813876 24.306211 -0.095825 680.630057 7049.248435 0.749999 -1.000000 0.053950 Diversity-DE -15.000000 -0.803619 -1.000 -30665.539 5126.497 -6961.814 24.306 -0.095825 680.638 7049.248 0.75 -1.000000 0.053941 Table 6. Comparison of PESO against Diversity-DE. Best results of PESO and Diversity-DE into 30 runs 5.6 Comparison PESO versus SMES The extend benchmark was proposed by Mezura in his Ph.D. thesis (Mezura, 2004). Therefore, it is interesting to compare PESO against the approach developed by Mezura, called SMES. SMES works over a simple multimembered evolution strategy: (µ+λ)-ES. The modifications introduced into SMES are the reduction of the initial step size of the sigma values to favour finer movements in the search space. A panmictic recombination operator based on a combination of the discrete and intermediate recombination operators. Also, SMES changes the original deterministic replacement of the ES, sorting the solutions by applying a comparison mechanism based on feasibility. This allows remaining in the next generation, the best infeasible solution, from either the parents or the offspring population. In Table 7 we show the comparison of PESO and SMES. In this case both algorithms performed 240,000 fitness function evaluations. It can be seen that PESO is clearly better than SMES in problems g05, g07, g10, g13, g14, g15, g17, g19, g21 and g23. PESO and SMES Robust PSO-Based Constrained Optimization by Perturbing the Particle’s Memory 71 were unable to find feasible solutions for test problems g20 and g22. But, PESO finds feasible solutions for test problems g17, g21 and g23, where SMES could not find feasible solutions in any single run. TP g01 g02 g03 g04 g05 g06 g07 g08 g09 g10 g11 g12 g13 g14 g15 g16 g17 g18 g19 g20 g21 g22 g23 g24 Optimal -15.000000 -0.803619 -1.000000 -30665.538 5126.49811 -6961.8138 24.306209 -0.095825 680.630057 7049.248 0.750000 -1.000000 0.053950 -47.764411 961.715172 -1.905155 8876.98068 -0.8660 32.386 0.096737 193.778349 382.902205 -400.0025 -5.508013 PESO -15.000000 -0.803618 -1.000005 -30665.53867 5126.498096 -6961.813876 24.306211 -0.095825 680.630057 7049.248871 0.749999 -1.000000 0.053950 -47.760600 961.715171 -1.905155 8860.030895 -0.866025 32.351376 *0.204095 236.928359 *157.5136 -369.765012 -5.508013 SMES -15.000000 -0.803601 -1.000000 -30665.539 5126.599 -6961.814 24.327 -0.095825 680.632 7051.903 0.750000 -1.000000 0.053986 -47.535 *961.698 -1.905 *8890.1826 -0.866 34.223 *0.211364 *347.9809 *2340.6166 *-1470.1525 -5.508 Table 7. Comparison of PESO against SMES. Best results of PESO and SMES into 30 runs. *Infeasible Solution 5.7 Comparison PESO versus ISRES An algorithm representative of the state-of-the-art is the Stochastic Ranking algorithm was proposed by Runarsson and Yao (Runnarson & Yao, 2000). Later, the authors provided a new improved version, called Improved Stochastic Ranking Evolution Strategy, (ISRES) (Runnarson & Yao, 2005). The algorithm is a simple evolution strategy enhanced with a stochastic sorting, which decides, through a probability fixed value, performing a comparison using only the function value or the constraint violation. The ISRES’s code is available at Runarsson’s page, and we used it, for developing the experiments for test problems g14 through g24. The parameters used were the same as the suggested by the authors (Runnarson & Yao, 2005). The comparison is shown in Table 8. Both algorithms performed the same number of fitness function evaluations, 350000. Note that ISRES finds the best values for test problems g21 and g23. But PESO is better in problems g13 and g17. In test problem g21, PESO found feasible solutions in all 30 runs, whereas ISRES only had 5 72 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization successful runs. Both PESO and ISRES were unable to find feasible solutions for test problems g20 and g22. TP g01 g02 g03 g04 g05 g06 g07 g08 g09 g10 g11 g12 g13 g14 g15 g16 g17 g18 g19 g20 g21 g22 g23 g24 Optimal -15.000000 -0.803619 -1.000000 -30665.538 5126.49811 -6961.8138 24.306209 -0.095825 680.630057 7049.248 0.750000 -1.000000 0.053950 -47.764411 961.715172 -1.905155 8876.98068 -0.8660 32.386 0.096737 193.778349 382.902205 -400.0025 -5.508013 PESO -15.000000 -0.803619 -1.000005 -30665.53867 5126.498096 -6961.813876 24.306209 -0.095825 680.630057 7049.248020 0.749999 -1.000000 0.053950 -47.761180 961.715171 -1.905155 8856.502344 -0.866025 32.349645 *0.204095 205.852693 *157.5136 -361.856637 -5.508013 ISRES -15.000000 -0.803619 -1.001 -30665.539 5126.497 -6961.814 24.306 -0.095825 680.630 7049.248 0.750 -1.000000 0.053942 -47.761129 961.715171 -1.905155 8889.9003 -0.866025 32.348689 193.785034 -400.000551 -5.508013 Table 8. Comparison of PESO against ISRES. Best results of PESO and ISRES into 30 runs. *Infeasible Solution 6. Conclusion In this chapter, we described a robust PSO for solving constrained optimization problems. We discussed the premature convergence problem, which still is an issue in evolutionary computation. A brief trip was made through several proposals to attain a balance between exploration and exploitation. Also, we briefly review recent works that contribute with interesting ideas for handling-constraints in PSO. This work presents an algorithm called PESO to handle constrained optimization problems. Based on the empirical and theoretical results of several works, we explain and validate every component applied in PESO. We empirically show the performance of PESO in a wellknow benchmark. PESO has shown high performance in constrained optimization problems of linear or nonlinear nature. Three important contributions of PESO are worth to mention: A new neighbourhood structure for PSO, the incorporation of perturbation operators without modifying the essence of the PSO, and a special handling technique for equality constraints. Robust PSO-Based Constrained Optimization by Perturbing the Particle’s Memory 73 The first contribution is the singly-linked neighbourhood structure. It increases the exploitation of the algorithm, breaking the double-link that exists between the particles using the original ring neighbourhood structure. PESO implements a singly-linked ring with a neighbourhood of size n = 2, but a general algorithm to build neighbourhoods of size n is given by Hernández et al. (Hernández et al., 2007). Another relevant idea developed by PESO, is the perturbation of the target to keep flock’s diversity and space exploration. Two perturbation operators, C-perturbation and Mperturbation are applied to the pbest. It is equivalent to perturb the particle’s memory and not its behaviour; as it is performed by other approaches that tend to destroy the flock’s organization capacity. The last feature of PESO is its special technique to handle equality constraints. It is performed through a dynamic tolerance that allows unfeasible particles at the first generations, but it decreases the tolerance value until reach a desired error. The dynamic tolerance helps to keep the flock near the feasible region, while exploring promising regions. The results on the benchmark problems provide evidence that PESO is highly competitive. So far, PESO performed very well at solving the current state-of-the-art problems, but it should be improved to handle problems with a higher number of equality constraints. 7. Future Research PESO shows a competitive performance solving constrained optimization problems, so global (unconstrained) optimization and multi-objective optimization problems are attractive topics for future research. But, there are other research areas that could be explored in this approach. As we mention in Section 4, the acceleration parameters have not been studied yet. A set of sub-swarms could improve the robustness of the PSO (Liang & Suganthan, 2006). One of the main research areas in evolutionary computation is the application to real optimization problems. In that field, we used PESO to solve system reliability optimization problems (Muñoz, 2004). 8. References Agnes, M. (2004). Webster's New World College Dictionary, Webster's New World, ISBN 0764571257, May 2004. Angeline, P. (1998). Evolutionary Optimization versus Particle Swarm Optimization: Philosophy and Performance Differences, Proceedings of the Seventh Annual Conference on Evolutionary Programming, EP VII, pp. 601–610, ISBN 3-540-64891-7, March 1998, Springer, San Diego, California, USA. Carlisle, A. & Dozier, G. (2000). Adapting Particle Swarm Optimization to Dynamic Environments, Proceedings of the International Conference on Artificial Intelligence, ICAI2000, pp. 429-434, ISBN 1892512564, Monte Carlo Resort Hotel, June 2000, CSREA Press, Las Vegas, Nevada, USA. Clerc, M. & Kennedy, J. (2002). The Particle Swarm: Explosion, Stability, and Convergence in a Multi-Dimensional Complex Space, IEEE Transactions on Evolutionary Computation, Vol. 6, No. 1, February 2002, pp. 58-73, ISSN 1089-778X. 74 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Coath, G. & Halgamuge, S. (2003). A comparison of Constraint-Handling Methods for the Application of Particle Swarm Optimization to Constrained Nonlinear Optimization Problems, Proceedings of the 2003 Congress on Evolutionary Computation, pp. 2419–2425, ISBN 0-7803-7804-0, Rydges Lakeside Hotel, December 2003, IEEEPress, Canberra, Australia. Deb, K. (2000). An efficient constraint handling method for genetic algorithms, Computer Methods in Applied Mechanics and Engineering, Vol. 186, No. 2-4, June 2000, pp. 311338, ISSN 0045-7825. Downing, R. (2006). Neutrality and Gradualism: Encouraging Exploration and Exploitation Simultaneously with Binary Decision Diagrams, Proceedings of IEEE Congress on Evolutionary Computation 2006, CEC 2006, pp. 615-622, ISBN 0-7803-9487-9, Sheraton Vancouver Wall Centre Hotel, July 2006, IEEE-Press, Vancouver, BC, Canada. El-Gallad, A.; El-Hawary, M. & Sallam, A. (2001). Swarming of intelligent Particle for Solving the Nonlinear Constrainted Optimization Problem. International Journal of Engineering Intelligent Systems for Electrical Engineering and Communications, Vol. 9, No. 3, 2001, pp. 155–163, ISSN 0969-1170. Fogel, D. (1994). An Introduction to Simulated Evolutionary Optimization. IEEE Transaction on Neural Networks, Vol. 5, No. 1, January 1994, pp. 3–14, ISSN 1045-9227. He, S.; Prempain, E. & Wu, Q. (2004). An Improved Particle Swarm Optimizer for Mechanical Design Optimization Problems, Engineering Optimization, Vol. 36, No. 5, October 2004, pp. 585–605, ISSN 1029-0273. Hernández, A.; Muñoz, A.; Villa, E. & Botello, S. (2007). COPSO: Constrained Optimization via PSO Algorithm, Technical Report of the Computer Sciences Department, I-07-04 (CC), February 2007, Centro de Investigación en Matemáticas, Guanajuato, México. Holland, J. (1975). Adaptation in Natural and Artificial Systems, University of Michigan Press, ISBN 0-262-08213-6, Ann Arbor, MI, USA. Hu, X. and Eberhart, R. (2002). Solving Constrained Nonlinear Optimization Problems with Particle Swarm Optimization, Proceedings of the 6th World Multiconference on Systemics, Cybernetics and Informatics 2002 (SCI 2002), pp. 203-206, ISBN 980-07-81501, Sheraton World, July 2002, The International Institute of Informatics and Systemics, Orlando, Florida, USA. Jacoby, N. (2005). Exploration and Exploitation Strategies. What kind of analytical models?, Technical Report Cahiers de la Maison des Sciences Economiques, May 2005, Université Panthéon-Sorbonne (Paris 1). Kennedy, J. (1997). The Particle Swarm: Social Adaptation of Knowledge, Proceedings of the IEEE International Conference on Evolutionary Computation, ICEC’97, pp. 303-308, ISBN 0-7803-3949-5, University Place Hotel, April 1997, IEEE-Press, Indianapolis, IN, USA. Kennedy, J. (1999). Small Worlds and Mega-Minds: Effects of Neighborhood Topology on Particle Swarm Performance, Proceedings of the 1999 Congress on Evolutionary Computation, pp. 1931–1938, ISBN 0-7803-5536-9, Mayflower Hotel, July 1999, IEEEPress, Washington, DC, USA. Kennedy, J. & Mendes, R. (2002). Population Structure and Particle Swarm Performance, Proceedings of the 2002 Congress on Evolutionary Computation, CEC02, pp. 1671-1676, ISBN 0-7803-7282-4, Hilton Hawaiian Village Hotel, May 2002, IEEE-Press, Honolulu, HI, USA. Robust PSO-Based Constrained Optimization by Perturbing the Particle’s Memory 75 Liang, J.; Runarsson, T.; Mezura-Montes, E.; Clerc, M.; Suganthan, P.; Coello, C. & Deb, K. (2006). Problem Definitions and Evaluation Criteria for the CEC 2006, Special Session on Constrained Real-Parameter Optimization, Technical Report, Nanyang Technological University, Singapore, 2006. Liang, J. & Suganthan, P. (2006). Dynamic Multi-Swarm Particle Swarm Optimizer with a Novel Constraint-Handling Mechanism, Proceedings of the 2006 IEEE Congress on Evolutionary Computation, CEC 2006, pp. 9-16, ISBN 0-7803-9487-9, Sheraton Vancouver Wall Centre Hotel, July 2006, IEEE Press, Vancouver, Canada. March J. (1991). Exploration and Exploitation in Organizational Learning, Organization Science, Vol. 2, No. 1, February 1991, pp. 71-87, ISSN 1047-7039. Mendes, R.; Kennedy, J. & Neves, J. (2004). The Fully Informed Particle Swarm: Simpler, Maybe Better, IEEE Transactions on Evolutionary Computation, Vol. 8, No. 3, June 2004, pp. 204–210, ISSN 1089-778X. Mezura, E. (2004). Alternatives to Handle Constraints in Evolutionary Optimization, Ph.D. thesis, CINVESTAV-IPN, DF, Mexico. Mezura, E.; Velazquez, J. & Coello, C. (2005). Promising Infeasibility and Multiple Offspring Incorporated to Differential Evolution for Constrained Optimization, Proceedings of the Genetic and Evolutionary Computation Conference, GECCO 2005, pp. 225-232, ISBN 1-59593-010-8, L'Enfant Plaza Hotel, June 2005, ACM, Washington DC, USA. Michalewicz, Z. (1992). Genetic Algorithms + Data Structures = Evolution Programs, SpringerVerlag, ISBN 3-540-60676-9, Germany Michalewicz, Z. & Schoenauer, M. (1996). Evolutionary Algorithms for Constrained Parameter Optimization Problems, Evolutionary Computation, Vol. 4, No. 1, 1996, pp. 1-32, ISSN 1063-6560. Michalewicz, Z. & Fogel, D. (2000). How to Solve It: Modern Heuristics, Springer-Verlag, ISBN 3-540-22494-7, Germany. Muñoz, A. (2004). Diseño Optimo para la Confiabilidad, Master thesis, Department of Computer Sciences, CIMAT, Guanajuato, Gto, Mexico. Muñoz, A.; Hernández, A. & Villa, E. (2005). Constrained Optimization Via Particle Evolutionary Swarm Optimization Algorithm (PESO), Proceedings of the Genetic and Evolutionary Computation Conference, GECCO 2005, pp. 209-216, ISBN 1-59593-010-8, L'Enfant Plaza Hotel, June 2005, ACM, Washington DC, USA. Munoz-Zavala, A.; Hernandez-Aguirre, A.; Villa-Diharce, E. & Botello-Rionda, S. (2006). PESO+ for Constrained Optimization, Proceedings of the 2006 IEEE Congress on Evolutionary Computation, CEC 2006, pp. 231-238, ISBN 0-7803-9487-9, Sheraton Vancouver Wall Centre Hotel, July 2006, IEEE Press, Vancouver, Canada. Ozcan, E. & Mohan, C. (1998). Analysis of a Simple Particle Swarm Optimization System, Intelligent Engineering Systems Through Artificial Neural Networks: Proceedings of the 1998 Artificial Neural Networks in Engineering Conference. ANNIE98, pp. 253-258, ISBN 0-7918-0064-4, Marriott Pavilion Hotel, November 1998, ASME Press, St. Louis, Missouri, USA. Parsopoulos, K. & Vrahatis, M. (2002). Particle Swarm Optimization Method for Constrained Optimization Problems, In: Intelligent Technologies from Theory to Applications: New Trends in Intelligent Technologies, P. Sincak, J. Vascak, V. Kvasnicka, and J. Pospichal, Ed. 76 of Frontiers in Artificial Intelligence and Applications, pp. 214-220, IOS Press, ISBN 1-5860-3256-9, Amsterdam ; Washington DC. 76 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Price, K.; Storn, R. & Lampinen, J. (2005). Differential Evolution: A practical Approach to Global Optimization, Springer Verlag, ISBN 3540209506, Berlin, Germany. Ratnaweera, A.; Halgamuge, S. & Watson, H. (2002a). Particle Swarm Optimization with Time Varying Acceleration Coefficients, Proceedings of the First International Conference on Soft Computing and Intelligent Systems, pp. 240-255, At the Auditorium of AIST, October 2002, Tsukuba, Japan. Ratnaweera, A.; Halgamuge, S. & Watson, H. (2002b). Particle Swarm Optimization with Self-Adaptive Acceleration Coefficients, Proceedings of the First International Conference on Fuzzy Systems and Knowledge Discovery, pp. 264-268, ISBN 981-04-75209, Orchid Country Club, November 2002, Singapore. Runarsson, T. & Yao, X. (2000). Stochastic Ranking for Constrained Evolutionary Optimization, IEEE Transactions on Evolutionary Computation, Vol. 4, No. 3, September 2000, pp. 284–294, ISSN 1089-778X. Runarsson, T. & Yao, X. (2005). Search Biases in Constrained Evolutionary Optimization, IEEE Transactions on Systems, Man and Cybernetics - Part C: Applications and Reviews, Vol. 35, No. 2, May 2005, pp. 233–243, ISSN 1094-6977. Suganthan, P. (1999). Particle Swarm Optimiser with Neighborhood Operator, Proceedings of the 1999 Congress on Evolutionary Computation, pp. 1958-1962, ISBN 0-7803-5536-9, Mayflower Hotel, July 1999, IEEE-Press, Washington, DC, USA. Toscano, G. & Coello, C. (2004). A Constraint-Handling Mechanism for Particle Swarm Optimization, Proceedings of the 2004 Congress on Evolutionary Computation, pp. 1396–1403, ISBN 0-7803-8515-2, Portland Marriott Downtown, June 2004, IEEEPress, Portland, Oregon, USA. Van Den Bergh, F. & Engelbrecht, A. (2001). Effects of Swarm Size on Cooperative Particle Swarm Optimisers, Proceedings of the Genetic and Evolutionary Computation Conference, GECCO 2001, pp. 892-899, ISBN 1-55860-774-9, Holiday Inn Golden Gateway Hotel, July 2001, Morgan Kaufmann, San Francisco, California, USA. Van Den Bergh, F. (2002). An Analysis of Particle Swarm Optimizers, PhD thesis, Department of Computer Science, University of Pretoria, Pretoria, South Africa. Zhang, W.; Xie, X. & Bi, D., Handling Bloundary Constraints for Numerical Optimization by Particle Swarm Flying in Periodic Search Space, Proceedings of the 2004 Congress on Evolutionary Computation, pp. 2307–2311, ISBN 0-7803-8515-2, Portland Marriott Downtown, June 2004, IEEE-Press, Portland, Oregon, USA. 5 Using Crowding Distance to Improve Multi-Objective PSO with Local Search 1Department 2Department of Business Administration, National Taipei College of Business of Information Management, Shih Hsin University Taiwan Ching-Shih Tsou1, Shih-Chia Chang1 and Po-Wu Lai2 1. Introduction Biology inspired algorithms have been gaining popularity in recent decades and beyond. These methods are based on biological metaphor such as Darwinian evolution and swarm intelligence. One of the most recent algorithms in this category is the Particle Swarm Optimization (PSO). PSO is a population-based approach using a set of candidate solutions, called particles, which move within the search space. The trajectory followed by each particle is guided by its own experience as well as by its interaction with other particles. Specific methods of adjusting the trajectory are motivated by the observations in birds, fishes, or other organisms that move in swarms. Multi-objective optimization (MOO) is an important field to apply swarm intelligence metaheuristics because there is not only one solution for MOO ingeneral. The solution of a MOO problem is generally referred as a non-dominated solution, which is different from the optimal solution of single-objective optimization problem. A solution is said to be nondominated over another only if it has superior, at least no inferior, performance in all objectives. Hence, non-dominance means that the improvement of one objective could only be achieved at the expense of other objectives. This concept always gives not a single solution, but rather a set of solutions called the non-dominated set or non-dominated archive. Generally speaking, there are two approaches to MOO: classical methods and evolutionary methods. Classical methods first convert separate objective functions into a single objective function by weighted sum method, utility function method, or goal programming method, and then solve them by traditional optimization techniques. Such modelling puts the original problem in an inadequate manner, using a surrogate variable with incomplete information. Subsequent optimization techniques also contradicts our intuition that singleobjective optimization is a degenerate case of MOO (Deb, 2001). The result of classical approach is a compromise solution whose non-dominance can not be guaranteed (Liu et al., 2003). Lastly, but not the least, a single optimized solution could only be found in each simulation run of traditional optimization techniques such that it limits the choices available to the decision maker. Therefore, using a population of solutions to evolve towards several non-dominated solutions in each run makes evolutionary algorithms, such as swarm intelligence methods, popular in solving MOO problems. 78 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization One of the successful applications of PSO to MOO problems, named Multi-Objective PSO (MOPSO), is the seminal work of Coello-Coello and Lechuga (2002). In a subsequent study done by them, MOPSO is not only a viable alternative to solve MOO problems, but also the only one, compared with the Non-dominated Sorting Genetic Algorithm-II (NSGA-II) (Deb et al., 2002), the Pareto Archive Evolutionary Strategy (PAES) (Knowles and Corne, 2000), and the micro-Genetic Algorithm (microGA) (Coello-Coello and Pulido, 2001) for MOO, can cover the full Pareto-optimal front of all the test functions therein. The goal of generating the non-dominated front is itself multi-objective. That is, designing a Pareto optimizer usually has two major goals – how to converge to the true Pareto-optimal front while achieving a well-distributed set of solutions (Zitzler et al., 2004). Tsou et al. (2006) proposed an improved MOPSO with local search and clustering procedure trying to attain to these goals. Although the best way to obtain a well-distributed set of solutions would be probably to use some clustering algorithm, this effort is usually computationally expensive (Kukkonen and Deb, 2006). This paper extends the research of Tsou et al. (2006), but the clustering algorithm is dropped out. A local search and flight mechanism based on crowding distance is incorporated into the MOPSO. The local search procedure intends to explore the less-crowded area in the current archive to possibly obtain more non-dominated solutions nearby. Besides this, the non-dominated solutions in the less-crowded area are used to guide the population fly over sparse area of the current archive. Such that a more uniform and diverse front might be formed by the optimizer. In a short, mechanisms based on the crowding distance not only implicitly maintain the diversity of the external archive, but also facilitate the convergence of MOPSO to the true Pareto-optimal front. Our approach seeks to reach a reasonable compromise between the computational simplicity and efficiency. Several test problems are employed to verify the performance of our approach. The rest of this paper is organized as follows. Section 2 reviews the basic concept of MOO. MOPSO with a random line search is described in Section 3.1. Extensions based on crowding distance are presented in Section 3.2. Section 4 reports the experimental results against four test problems. Finally, conclusions and future research are drawn out in Section 5. 2. Multi-objective Optimization Without loss of generality, a MOO problem (also known as a vector optimization problem) r is the problem of simultaneously minimizing K objectives f k (x) , k = 1, 2,L , K , of a vector r x in the feasible region Ω . That is, rr r r rT Vector rminimize f (x) = [ f1 (x), f 2 (x),..., f K (x) ] x∈Ω (1) r T r , where x = [ x1 , x2 ,..., xD ] is a D -dimensional vector and f k (x ) ( k = 1, 2,..., K ) are linear or nonlinear functions. A decision vector u = (u1 , u2 ,..., uD ) is said to strongly dominate r r r r rr v = (v1 , v2 ,..., vD ) (denoted by u p v ) if and only if ∀i ∈ {1, 2,..., K } , fi (u) < fi ( v ) . Less r r rr stringently, a decision vector u weakly dominates v (denoted by u p v ) if and only if r r r r ∀i ∈ {1, 2,..., K } , fi ( u) ≤ fi ( v ) and ∃i ∈ {1, 2,..., K } , fi ( u) < fi ( v ) . Using Crowding Distance to Improve Multi-Objective PSO with Local Search 79 Certainly, we are not interested in solutions dominated by other solutions. A set of decision vectors is said to be a non-dominated set if no member of the set is dominated by any other member. The true Pareto-optimal front is the non-dominated set of solutions which are not dominated by any feasible solution. One way to solving a MOO problem is to approximate the Pareto-optimal front by the non-dominated solutions generating from the solution algorithm. 3. MOPSO with Local Search To speak of MOPSO, let us start with the PSO. In PSO, a population is initialized with random solutions, called “particles”. All particles have fitness values that are evaluated by the function to be optimized. Each particle flies through the problem space with a velocity, which is constantly updated by the particle’s own experience and the experience of the particle’s neighbors, to search for optima iterations by iterations. Compared to genetic algorithms, the advantages of PSO are that it is easy to implement and there are fewer parameters to adjust. In every iteration, the velocity of each particle is updated by two best values. The first one is the best solution it has achieved so far. This value is called pbest. Another best value tracked by the optimizer is the best value obtained so far by the neighbourhood of each particle. This best value is a local best and is called lbest. If the neighbourhood is defined as the whole population, each particle will move towards its best previous position and towards the best position ever been in the whole swarm, this version is called gbest model. In this paper, we use the global version of PSO. The velocity and position of each particle are updated by the following equations. i i i i i vd( new) = ω ⋅ vd(old ) + c1 ⋅ RAND ⋅ ( pd − xd ) + c2 ⋅ RAND ⋅ ( g d − xd ) (2) i i i xd( new) = xd + vd( new) , (3) where i vd( old ) is the old velocity of particle i along dimension d , i vd( new) is the new velocity of particle i along dimension d , ω is the inertia weight which is usually between 0.8 and 1.2, c 1 and c 2 are the learning factors (or acceleration coefficients), usually between 1 and 4, i xd is the current position of particle i along dimension d , i pd is the personal best solution of particle i along dimension d , g d is the global best solution the whole population ever been along dimension d , and RAND is a random number between 0 and 1. 80 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The difficulty in extending the PSO to MOO problems is how to select a global guide for each particle. Because there is not a single optimum in MOO, the non-dominated solutions found by MOPSO so far are all stored in an archive. Each particle can randomly select a nondominated solution from the archive as the global guide of its next flight. Although this selection method is simple, it can promote convergence (Alvarez-Benitez et al., 2005). The pseudo-code of MOPSO is shown in Fig. 1. MOPSO() 01: Initialize() 02: iter ← 1 03: while iter < MAXITER do 04: 05: 06: 07: Flight() CalculateObjVector() UpdateNondominatedSet() iter = iter + 1 08: end while Figure 1. The pseudo-code of MOPSO 3.1 Local search Local search plays a role in adding an exploitative component allows algorithms to make use of local information to guide the search towards better regions in the search space. This feature leads to faster convergence with less computational burden. One of the simplest local search algorithms is the random line search. It starts with calculating the maximum step length according to the parameter δ . For a non-dominated solution, improvement is r sought coordinate by coordinate. The temporary D - dimensional vector, z , first holds the initial information of each particle. Next, two random numbers are generated to set moving r direction and step length for each coordinate, respectively. If the vector z observes a better non-dominated solution, the non-dominated set is updated and the local search for particle i ends. The local search procedure (shown in Fig. 2) incorporated into the MOPSO is so called MOPSO-LS. Using Crowding Distance to Improve Multi-Objective PSO with Local Search 81 LocalSearch( δ ) 01: L = δ ⋅ max {u d − l d } d ( ) % % 02: S = random(10% of A) % 03: for i = 1 to S 04: 05: 06: 07: 08: 09: 10: 11: 12: 13: 14: 15: 16: 17: 18: rr z = xi for d = 1 to D do λ1 = RAND(0,1) λ2 = RAND(0,1) if λ1 > 0.5 then z d = z d + λ2 L else z d = z d − λ2 L end if end for r CalculateObjVector( z ) rr r r if z p xi or z pf xi then r UpdateNondominatedSet( z ) rr xi = z end if 19: end for Figure 2. The pseudo-code of local search procedure 82 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 3.2 Enhancements from crowding distance The crowding distance of a non-dominated solution provides an estimate of the density of solutions surrounding it (Deb et al., 2002). It is calculated by the size of the largest cuboid enclosing each particle without including any other point. After normalizing the crowding distance for each non-dominated solution, we sort them in ascending order (Line 01 in Fig. 4). As mentioned earlier, the selection of global guide is a critical step in MOPSO. It affects both the convergence to the true Pareto-optimal front and a well-distributed front. Instead of randomly choosing a global guide from the whole non-dominated archive, it is randomly selected from the top 10% less crowded area of the archive for each particle that is dominated by any solution located in this area. Global guides of other particles are randomly selected from the whole archive as usual. This is the flight procedure used in MOPSO-CDLS (Line 03 in Fig. 4). Raquel and Naval (2005) were the first ones to incorporate the crowding distance into the global best selection in MOPSO, however, each particle associated with its own global guide solely selected from the top 10% less crowded area of the archive. It is too restrictive for those particles far away from the less crowded area and could possibly perturb their happy flight. Flight() 01: SortArchiveByCrowdingDistance() 02: for i = 1 to m do r % 03: if xi is dominated by the top 10% less crowded area in A 04: 05: 06: 07: 08: 09: 10: 11: 12: 13: then r Gbest % ( xi ) = Random(top 10% less crowded area in A) else r (x ) i Gbest % = Random( A) end if for d = 1 to D do i i i i i i vd ← ω vd + c1 ⋅ RAND ⋅ ( pd − xd ) + c2 ⋅ RAND ⋅ ( g d − xd ) i i i xd ← xd + vd end for r UpdateNondominatedSet( xi ) r CalculateObjVector( xi ) 14: end for Figure 4. The pseudo-code of flight procedure Using Crowding Distance to Improve Multi-Objective PSO with Local Search 83 Besides the flight mechanism based on crowding distance, the local search procedure is also modified to only be executed on the non-dominated solutions in the top 10% less crowded area of the archive. That is, Line 02 in Fig. 2 is modified as % % S = top 10% less crowded area of A . It is expected that better solutions, at least nondominated, could be found by the random line search around the less crowded area. Dual effects of pushing further towards the true Pareto-optimal front as well as maintaining a diverse and well-distributed archive might be arisen. 4. Experimental Results The well-known ZDT test problems (Zitzler et al., 2000) were used to validate the MOPSOCDLS. ZDT1 is an easy bi-objective problem and has a convex and continuous Paretooptimal front. ZDT2 has a non-convex but still continuous front. The front of ZDT3 is convex, however, it is discontinuous. In other words, it has several disconnected Paretooptimal front. The last test problem, ZDT4, is convex but has many local fronts. The population size for MOPSO-LC and MOPSO-CDLC are set to 25 with a step size 25 till 75. The numbers of iterations are set to 30 with a step size 10 till 50. To compare all results in a quantitative way, we use the following performance measures: archive count A , set % coverage metric C(U,V) , spacing ( S ), and maximum spread ( D ) (Okabe et al., 2002). C (U ,V ) = {b ∈V | ∃ a ∈U : a p b} V (4) , where ⋅ means the number of components in the set. 2 i S= 1 % A ∑(d i =1 % A −d) (5) , where d = min i % j∈A∧ j≠i ∑f k =1 K i k − fkj and d is the mean value of the absolute distance measure d= ∑ i =1 % A di . % A % % A A D = ∑ max fki − min f ki i=1 i =1 k =1 K 2 (6) Tables 1-4 are the results of four test problems for both algorithms. C and L in the parentheses of the first row stand for MOPSO-CDLS and MOPSO-LS, respectively. Some findings are explained in the following. 84 Iter. 30 30 30 40 40 40 50 50 50 Pop. 25 50 75 25 50 75 25 50 75 C(C,L) 0.901639 0.785714 0.071429 0.125 0.811594 0.830986 0.876923 0.104478 0.1 C(L,C) 0 0 0.114286 0.138889 0 0 0 0.044776 0.1125 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization S(C) 0.170416 0.029987 0.026999 0.045418 0.057449 0.059604 0.045133 0.04486 0.046662 S(L) 0.088285 0.086507 0.033471 0.044254 0.064995 0.077409 0.08563 0.063149 0.067414 D(C) 1.417687 1.414402 1.414214 1.41424 1.414903 1.414214 1.414563 1.414214 1.414214 D(L) Count(C) Count(L) Time(C) Time(L) 1.52305 61 55 0.89 0.843 1.519982 70 55 1.078 0.969 1.414214 70 68 1.203 1.047 1.414214 72 73 1.313 1.188 1.519977 69 56 1.406 1.313 1.519981 71 59 1.672 1.391 1.519915 65 57 1.656 1.468 1.414214 67 68 1.937 1.671 1.414214 80 72 2.125 1.797 Table 1. Computational results of ZDT1 problem Iter. 30 30 30 40 40 40 50 50 50 Pop. 25 50 75 25 50 75 25 50 75 C(C,L) 0.609756 0.885714 0.125 0.939394 0.228571 0.222222 0.894737 0.27027 0.228571 C(L,C) 0 0 0.025 0 0.028571 0.027778 0 0.027027 0 S(C) 0.074917 0.13882 0.093266 0.108248 0.123745 0.052225 0.05814 0.047095 0.123088 S(L) 0.123052 0.087169 0.116607 0.14694 0.138773 0.10615 0.104946 0.110726 0.138386 D(C) 1.414265 1.414214 1.414214 1.413647 1.414214 1.414212 1.412791 1.414142 1.414227 D(L) Count(C) Count(L) Time(C) Time(L) 1.417507 41 34 0.921 0.843 1.3933 35 34 0.985 0.906 1.414063 40 35 1.047 0.937 1.373224 33 31 1.25 1.109 1.414332 35 34 1.344 1.25 1.414 36 37 0.688 0.594 1.392065 38 36 1.593 1.453 1.414255 37 35 1.015 0.797 1.414231 35 40 1.781 1.562 Table 2. Computational results of ZDT2 problem Iter. 30 30 30 40 40 40 50 50 50 Pop. 25 50 75 25 50 75 25 50 75 C(C,L) 0.473684 0.410256 0.142857 0.5 0.2 0.163265 0.870968 0.266667 0.148936 C(L,C) 0 0.025641 0.119048 0.033333 0.228571 0.204082 0 0.088889 0.170213 S(C) 0.032093 0.093437 0.053984 0.122377 0.030287 0.006431 0.37742 0.097678 0.16836 S(L) 0.291718 0.337072 0.107845 0.53802 0.159101 0.008037 0.183748 0.169007 0.135811 D(C) 0.335081 1.95883 1.961352 1.934344 1.950184 1.95511 1.953586 1.931062 1.958623 D(L) Count(C) Count(L) Time(C) Time(L) 1.864763 19 18 0.672 0.734 1.884636 39 36 0.922 0.812 1.927156 42 51 1.047 0.891 1.947032 30 20 1.094 0.969 1.94119 35 41 1.203 1.141 1.949345 49 47 1.328 1.235 2.028031 31 27 1.438 1.313 1.955391 45 43 1.609 1.453 1.962591 47 53 1.688 1.531 Table 3. Computational results of ZDT3 problem Iter. 30 30 30 40 40 40 50 50 50 Pop. 25 50 75 25 50 75 25 50 75 C(C,L) 0.583333 0.428571 0.513514 0.612903 0.452381 0.589286 0.575758 0.565217 0.433333 C(L,C) 0.027778 0.071429 0.162162 0.032258 0.214286 0.142857 0.212121 0.173913 0.1 S(C) 0.085428 0.070559 0.054137 0.124403 0.083199 0.073391 0.088226 0.079993 0.037096 S(L) 0.120843 0.070263 0.11659 0.212547 0.076452 0.101297 0.082615 0.097561 0.077393 D(C) 1.415008 1.438755 1.409016 1.417124 1.412184 1.422002 1.440936 1.43185 1.42348 D(L) Count(C) Count(L) Time(C) Time(L) 1.431134 36 29 0.844 0.782 1.429762 42 31 0.875 0.813 1.430743 37 36 0.922 0.844 1.453333 31 26 1.093 1.078 1.410637 42 39 1.172 1.156 1.416985 56 54 1.282 1.156 1.437883 33 33 1.438 1.328 1.429264 46 47 1.562 1.422 1.417994 60 59 1.656 1.516 Table 4. Computational results of ZDT4 problem 1. In view of the set coverage metric in Tables 1-4, MOPSO-CDLS exhibit better results than MOPSO-LS even in more difficult problem such as ZDT3 and ZDT4. That is, the non-dominated solutions generated by MOPSO-CDLS are closer to the Pareto-optimal front than those by MOPSO-LS. Using Crowding Distance to Improve Multi-Objective PSO with Local Search 85 2. 3. 4. For the maximum spread in Tables 1-4, there is no significant difference for both algorithms. However, MOPSO-CDLS outperforms MOPSO-LS in the spacing metric. This implies MOPSO-CDLS can generate well-distributed front than MOPSO-LS. It is not surprising that particles flying towards sparse area and gathering local information around it make MOPSO-CDLS find more non-dominated solutions than MOPSO-LS on the average. Certainly, crowding distance calculation need additional time to execute. Although the execution time (in second) of MOPSO-CDLS is a little bit longer than that of MOPSO-LS in all tables, MOPSO-CDLS is still a reasonable simple and efficient algorithm for MOO. 5. Conclusions It is well known that local search, even in its simplest form, prevents search algorithms from premature convergence and, therefore, possibly drives the solution closer to true Paretooptimal front. A local search procedure and a flight mechanism both based on crowding distance are incorporated into the MOPSO, so called MOPSO-CDLS, in this paper. Computational results against ZDT1-4 problems show that it did improve the MOPSO with random line search in all aspects except the execution time. Local search in less crowded area of the front not only reserves the exploitation capability, but also helps to achieve a well-distributed non-dominated set. Global guides randomly selected from the less crowded area help the particles dominated by the solutions in this area to explore more diverse solutions and in a hope to better approximate the true front. This study intends to highlight a direction of combining more intelligent local search algorithms into a Pareto optimization scheme. Mechanisms based on crowding distance employed here did not explicitly maintain the diversity of non-dominated solutions which is its original intention, but they indeed facilitate the possibilities of flying towards the Paretooptimal front and generating a well-distributed non-dominated set. Further researches include comparisons with other multi-objective evolutionary algorithms and accommodating constraints-handling mechanism in the Pareto optimizer. 6. References Alvarez-Benitez, J.E., Everson, R.M. & Fieldsend, J.E. (2005). A MOPSO algorithm based exclusively on Pareto dominance concepts. Lecture Notes in Computer Science, 3410, 459-473. Coello Coello, C.A. and Lechuga, M.S. (2002), MOPSO: A proposal for multiple objective particle swarm optimization, Proceedings of the 2002 IEEE Congress on Evolutionary Computation, pp. 12-17, Honolulu, U.S.A., May 2002, IEEE Press, New Jersey. Coello Coello, C.A. & Pulido, G.T. (2001), Multiobjective optimization using a micro-genetic algorithm, Proceedings of the 2001 Conference on Genetic and Evolutionary Computation Conference, pp. 274-282, San Francisco, CA, July 2001, IEEE Press, New Jersey. Deb, K. (2001). Multi-Objective Optimization using Evolutionary Algorithms, John Wiley & Sons, New York. Deb, K.; Pratap, A.; Agarwal S. & Meyarivan, T. (2002). A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Transactions on Evolutionary Computation, Vol. 6, 182-197. 86 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Knowles, J.D. & Corne, D.W. (2000). Approximating the nondominated front using the Pareto archived evolution strategy. Evolutionary Computation Journal, Vol. 8, 149172. Kukkonen, S. And Deb, K. (2006). Improved pruning of non-dominated solutions based on crowding distance for bi-objective optimization problems, Proceedings of the 2006 IEEE Congress on Evolutionary Computation, pp.1179-1186, Vancouver, Canada, July 2006, IEEE Press, New Jersey. Liu, G.P.; Yang, J.B. & Whidborne, J.F. (2003). Multiobjective Optimisation and Control, Research Studies Press, Hertfordshire. Okabe, T.; Jin, Y. & Sendhoff, B. (2003). A critical survey of performance indices for multiobjective optimization, Proceedings of the 2003 IEEE Congress on Evolutionary Computation, pp. 878-885, December 2003, IEEE Press, New Jersey. Raquel, C.R. & Naval, P.C. Jr. (2005). An effective use of crowing distance in multiobjective particle swarm optimization, Proceedings of the 2005 Conference on Genetic and Evolutionary Computation, pp. 257-264, Washington D.C., U.S.A., June 2005, ACM Press, New York. Tsou, C.-S.; Fang, H.-H.; Chang, H.-H. & Kao, C.-H. (2006). An improved particle swarm Pareto optimizer with local search and clustering. Lecture Notes in Computer Science, 4247, 400-406. Zitzler, E.; Deb, K. & Thiele, L. (2000). Comparison of multiobjective evolutionary algorithms : empirical results. Evolutionary Computation Journal, Vol. 8, No. 2, 125148. Zitzler, E.; Laumanns, M. & Bleuler, S. (2004). A tutorial on evolutionary multiobjective optimization, in Gandibleux, X.; Sevaux, M.; Sörensen, K. & T’kindt, V. (Ed.), Metaheuristics for Multiobjective Optimisation, Springer, Heidelberg, pp. 3-37. 6 Simulation Optimization Using Swarm Intelligence as Tool for Cooperation Strategy Design in 3D Predator-Prey Game Emiliano G. Castro and Marcos S. G. Tsuzuki Polytechnic School of University of São Paulo Brazil 1. Introduction It has long been established that simulation is a powerful tool for aiding decision making. This is due to a number of factor, such as the inherent ability to evaluate complex systems with large number of variables and interactions for which there is no analytical solution. It is considered as a tool to answer “what if” questions, not a solution generator technique. This scenario could be changed with the aid of optimization procedures, and so simulation could answer not only “what if” questions but also answers “how to” questions, providing the best set of input variables and maximize or minimize some performance measure. For the purposes of optimization, the simulation is simply a “black box” which computes a realization of the (stochastic) function value for a given combination of the parameter values (Magoulas et al., 2002). Simulation optimization is the process of finding the best values of some decision variables for a system where the performance is evaluated based on the output of a simulation model of this system. The components of a typical optimization system are present in a simulation optimization system: decision variables, objective function and constraints. The decision variables must be contained in some feasible region defined by the constraints. The objective function is a real valued function defined on these variables, but due to the complexity and stochastic nature of the underlying system an analytical expression can not be determined and the value returned by the stochastic simulation must be used instead. The predator-prey game is a multi-agent system, which originally came from the field of Artificial Intelligence (AI). At first, this field was called Distributed Artificial Intelligence (DAI); instead of reproducing the knowledge and reasoning of one intelligent agent as in AI, the objective became to reproduce the knowledge and reasoning of several heterogeneous agents that need to jointly solve planning problems. Some researchers have focused more on the agent and its autonomy (for instance, the definition of an agent proposed by Wooldridge and Jennings (1999): “an agent is a computer system that is situated in some environment, and that is capable of autonomous action in this environment in order to meet its design objectives”), while others, engaged in the field of multi-agent systems, have focused more on the organization of multiple agent interactions (Huhns & Stephens, 1999). The aiming of this work is to propose a simulation optimization tool for solutions' synthesis to a problem involving a dynamic and complex system (to bring forth strategies for a 88 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization hunting game between predators and prey in a three-dimensional environment) whose solution involves their agents' emergent behavior (in this case, the predators'). Moreover, this simulation optimization uses the PSO as optimization algorithm which in turn, is also based on emergent behavior. That is, a tool that employs emergence to project emergence. The organization of this work is as follows: Section 2 contains a review of the Particle Swarm Optimization (PSO). Section 3 describes the 3D predator-prey game: the predator and prey behaviors, the parameter of the hunting game and predator's model of strategy. Section 4 presents the developed tool. The results are presented in Section 5, and some concluding remarks are given in Section 6. 2. Particle Swarm Optimization (PSO) PSO is based on the collective motion of a flock of particles: the particle swarm. Each member of the particle swarm is moved through a problem space by two elastic forces. One attracts it with random magnitude towards the best location so far encountered by any member of the swarm. The position and velocity of each particle are updated at each time step (possibly with the maximum velocity being bounded to maintain stability) until the swarm as a whole converges. The update rule for PSO contains only two parameters: the relative importance of the influences on a particle of the particle best and the swarm best solutions, and the number of particles to be used as neighbor. A particle can use as reference the best result obtained by any particle of the swarm, or just for their neighbor particles. In that case, the analogy is in the topological mean, and not for the eventual momentary proximity in the parameter space. Thus, the size of this neighborhood to be considered is a variable in the algorithm. Perhaps inspired by the original derivation of PSO (an abstract version of the factors involved in the feeding behavior of flocks of birds), early progress in PSO often took the form of adding terms based on biological or physical analogies. One of the most successful of these was the “inertia weight” (a friction coefficient added to the velocity update rule). It is employed to control the impact of the previous history of velocities on the current velocity. In this way, the “inertia weight” regulates the trade-off between the global and local exploration of the swarm. A large inertia weight facilitates global exploration, while a small one tends to facilitate local exploration, fine-tuning the current search space. The PSO happens in accordance to the following formula: vi(t)=w vi(t-1) + ϕ1 [pi – xi(t-1)] + ϕ2 [pg – xi(t-1)] (1) Where pi is the best position found by the particle i so far, pg is the best position among all particles, and ϕ1 and ϕ2 are positive random variables, evenly distributed in the intervals [0, ϕ1max] and [0, ϕ2max], calculated at each iteration for each particle. w is the inertia weight. The position of each particle is updated at every iteration using the vector of velocity (adopting the time unit as the iteration step): xi(t) = xi(t-1) + vi(t) (2) PSO belongs to the class of the evolutionary algorithms based on population, as well as the genetic algorithms. However, unlike those, that uses as a metaphor the survival of the better-adapted ones, in PSO the motivation is the simulation of social behavior. Such as the Simulation Optimization Using Swarm Intelligence as Tool for Cooperation Strategy Design in 3D Predator-Prey Game 89 other evolutionary algorithms, PSO is initialized with a population of random solutions. The main difference is that in PSO, each potential (individual) solution is also associated to a random velocity in the initialization process; the potential solutions, designated as particles, may therefore “fly” through the parameter space of the problem. 3. The Hunting Game DAI is a field that has been quickly unfolded and diversified since its beginning in the second half of the 1970's decade. It still represents a promising research and application domain as well, characterized by its multi-disciplinary nature, gathering concepts from fields such as Computer Science, Sociology, Economy, Administration, Work Management and Philosophy. DAI's primary focus is on the coordination as interaction form, particularly significant to reach the goal or to fulfill the tasks. And the two basic and contrasting standards of coordination are competition and cooperation. In the competition, several agents work against each others because their goals are conflicting. In the cooperation, the agents work together and they congregate their knowledge and capacities to reach a joint objective (Weiss, 2000). In this work, by the own nature of the application chosen (group hunting), only cooperative strategies will be considered. The hunting's problem (or persecution's game) is a classical theme in AI. Just as originally proposed (Benda & Jagannathan, 1985), it is made of two classes of agents (predators and preys, classically four predators and a single prey) disposed in a rectilinear grid (plane and discrete domain), all at the same velocity. The predators' purpose is to catch the prey. To encircle it, each predator should occupy an adjacent “square” to the prey in the rectilinear grid. The prey, in turn, “wins” the game if it gets to escape away from the “board's” domain borders before being caught. In this classic version, the agents' movement is quite simple: at each “step” or simulation cycle, each agent can move a “square” in vertical or horizontal direction, since this square is not occupied yet. In general the prey is programmed with random movement, while the predators' strategy is the focus on the approaches of AI. This kind of problem acts as an excellent benchmark for comparative evaluation on different approaches of artificial intelligence, using central, local or distributed control (Manela & Campbell, 1995). Given the nature of the problem, each individual influences and is influenced by the whole system and, since that the goal cannot be reached by a single agent separately, it is only natural the emergence of cooperative strategies. This work proposes an evolution in the game in its classical form, so that the hunt and the persecution extrapolate the discrete plane, expanding to a continuous and three-dimensional domain. Another evolution point consists of a more elaborated formulation for the behaviors and the strategies, for both predators and prey. 3.1 Behavior of Prey and Predators In this section, the concepts for the three dimensional hunting are defined. Catching is the situation in which at least one of the predators reaches the prey. Technically speaking, it invades a kind of “vital bubble”, a small sphere related to the prey's body volume and having it as the center. The prey, in its turn, has as a goal to avoid being caught by the predators for a determined period. Time limiting is due to a series of practical circumstances, among them all the fact that the performance in the game will serve, in the 90 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization end, as a target function of the algorithm's optimization; and it should naturally have a foreseen stop criterion to the cases of which predators are unable to succeed in catching the prey. The prey's behavior in this 3D pursuing game in the continuous space also evolved in relation to its classical version. It is under the control of a Finite State Machine (FSM). The projected machine to describe the prey's behavior has three states: • Free walk: Initial state of the game. In this state, the prey behaves as it does in the classical version, having random movement at a low velocity given by vyw. • Escape: The prey, when noticing that is being hunted, because at least a predator is inside of its “perception bubble” with velocity above certain limit given by vdc or had it settled whatever the velocity, in its “proximity bubble”, begins to move in its maximum velocity given by vye, to a calculated direction considering the two closest predators' standings. The perception and proximity bubbles are spheres centered in the prey with radius of Rye and Ryx, respectively (Figure 1). If the conditions that determined to get into this state have dropped away, the prey turns in to the Free Walk state. • Caught: In this state, at least one predator has already invaded the prey's “vital bubble”. It is considered being caught and its action is ceased. The game is closed. The vital bubble is a sphere centered at the prey with radius of Ryv (Figure 1). Predators' behavior is controlled by a FSM set by the following three states described below: • Hunt: Initial state of the game. The predator moves with a velocity that has direction and module defined by its strategy. This strategy's synthesis what will be exactly the target of this work, the product of the synthesis' tool that involves a simulator and an optimization algorithm. • Pursue: The predator sets itself in this state when the prey sets in escaping mode, perceiving the approach of this one or even another predator. When pursuing, the predator has its moving direction exclusively based on the prey's position, and it moves itself at maximum velocity given by vdp, thereon, having no more any kind of strategy. • Capture: The predator invaded the prey's “vital bubble” and its catching proceeded. The game is over. 3.2 Hunting Game's Parameters Given the general rules, the game of three-dimensional hunt still has certain versatility margin. Several combinations can be checked and compared, depending on how some free parameters are defined; this joined to some simulation parameters arranges the configuration's settings of the game: number of predators nd, game time limit tmax, initial distance D0 and coefficient of inertia C. The predators have to capture the prey under the considered time limit; in case this time has passed, the prey is considered as the winner. The initial distance defines the distance between the prey and each one of the predators in the beginning of the game. The coefficient of inertia must be between 0 and 1, and it simulates the inertia effect, both for the predators and prey, at each simulation step. It is applied accordingly to the following expression: v(t) ← C v(t-1) + (1 - C) v(t) (3) Simulation Optimization Using Swarm Intelligence as Tool for Cooperation Strategy Design in 3D Predator-Prey Game 91 Figure 1. Perception, proximity and vital bubbles of the prey It is natural to expect that, for each (coherent) group of free parameters, the strategies' synthesis tool presents a different result, since the circumstances aroused by these parameters in the hunt conditions be sufficiently distinct. 3.3 The Predators' Strategies The predators do not need to move in-group, but to increase their survival chances they should be capable of self-organize in order to encircle and to capture a prey, thus guaranteeing their food. Evidently, without using any type of direct communication during the task. Police officers' teams use the radio to coordinate their encircling maneuvers, but wolves do not use walkie-talkies at the time they leave in pack for hunting a moose (Parunak, 1997). Through some rules based on visual tracks about the moose's grounding and of the other wolves, they must be able to encircle the moose without any explicit form of communication or negotiation (nothing such like “I'll go to the northward; why don't you go southward?”). All of the predators should share (as part of the problem's definition) the same hunt strategy, which does not involve memory or direct communication among the agents. Taking as a base the predators' sensorial world at the hunting time, the strategy ought to, at most, take into consideration the following parameters: direction of the prey qy, direction of the closest predator (neighbor) qn and distance of the prey Dy. As the kinematical reference for the predators are their own positions, the first two parameters should be calculated in the following way: qy = (Py – Pd)/(|Py - Pd|) qn = (Pn – Pd)/(|Pn – Pd|) Where Py, Pd and Pn are the vectors of position (in relation to the center of the coordinate system) of the prey, the current predator and its closest neighbor, respectively. The only (4) 92 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization capacity of allowed decision to the predators in the game is to control its own moving, that is, dynamically change its vectorial velocity using the parameters provided by its sensorial system (qy, qn and Dy ). The strategy formulation developed for this work obeys to the following expression: D = min ( Dy / D0 , 1) vd(d) = vdp dX1 (dX2 qy + X3 d qn) / (| dX2 qy + X3 d qn|) Where vd(d) is the velocity of the predator as a function of normalized distance to the prey; and X1, X2 and X3 are decision parameters (provided by the strategies' synthesis tool). The variable X1 is related to the influence of the predator's distance to the prey in the module of its velocity; X2 reflects the importance of the prey's direction in the vectorial composition of the velocity's direction, whilst X3 represents the influence of the closest neighbor’s direction. The strategies are then defined by triple ordinates (X1, X2,X3) that define the behavior of the predators' movement. The presented formulation allows no-linearity and a wide range of possibilities both for the module and the vectorial composition of the velocity as a function of the predators' distance to the prey. Evidently, the same problem would hold other countless strategy formulations. Amplifying the sensorial capacity, for instance, the predators' velocity could also be a function of the distance to the closest neighbor. Or even maintaining the defined sensorial group in this work, quite diverse mathematical expressions could be formulated. (5) 4. Synthesis of Strategies by the Particle Swarm Simulation environments are important to evaluate the performance of strategies that could not be tested in any type of analytical expression. The same strategy is used by a predators' group, each influencing towards movement of another, in a chain reaction. The hunt can only be verified through the strategies' effects overtime. Based on this model, a simulation environment was implemented, and beside an optimization algorithm, it composes a synthesis tool that will provide, at the end of the process, a satisfactory solution for the initial problem. That tool was implemented in the program called PREDATOR. During the process of strategies' synthesis, the simulator changes information continuously with the optimizer. The optimizer, tracking its algorithm (particle swarm), defines some “points” in the space of solutions and it submits, one by one, these solution-candidates to the simulator, that receives and interprets them as the entry parameters for the simulation. At the end of the simulation, the outcomes of this are sent back to the optimizer, which interprets this information as the objective function of the solution-candidate that had been sent. It processes this information inside the algorithm routine and sends the next solutioncandidate, restarting a cycle that only ends when the optimizer finds some of its stopping criteria. Figure 2 shows the optimization flow diagram. To illustrate the simulation of the hunt game in the program PREDATOR, all agents were represented by fishes. These animals were chosen because, unlike humans, they are subject to huntings that can only be modeled in three-dimensional domains. In the simulation, predators and prey's velocities possess a term of “momentum”, which emulates a kind of “inertia”, even without processing the dynamic equations that would necessarily involve forces and the agents' masses. This mechanism avoids that the agents (in Simulation Optimization Using Swarm Intelligence as Tool for Cooperation Strategy Design in 3D Predator-Prey Game 93 this case the fishes) might be moved in an implausible way in the simulation setting, executing curves and maneuvers visibly out of the dynamic reality that should reign in a real situation. The program PREDATOR was designed in a way to present a quite simple and intuitive interface (Figure 3). All of the buttons and displays were clustered in a control panel, in which their buttons allows the user to load a file containing one of the three types of possible configurations: simulation, optimization and animation (of the particles' movement resulting from an optimization process). In the illustrated example in Figure 3, the strategy used in the simulation is the correspondent to the particle of number 1 of the 40th iteration (40-01), the line right below exhibits their parameters' strategy (X1, X2 and X3) and the inferior line presents the predators' medium distance in pursuing (the number of predators in pursuing is presented between parenthesis). There are two chronometers to the right in the panel. The first indicates the hunting 1 time; and the second, which starts only when the first one stops, marks the pursuing 2 time. There is also a field indicating the prey's current state (in the example, in escape). Figure 2. Optimization flow diagram 1 2 All agents are in the first state of their FSMs. All agents are in the second state of their FSMs. 94 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization In spite of the interface's detailed information about positions and the fishes' velocities, to follow the simulation through the observation of tables is a superhuman task. To help the user to understand the simulation, the program PREDATOR provides four visualization windows, which exhibit the perspective projections of the tracking cameras (Figure 3). Even with all of the visualization resources implemented, it is not easy to process the visual information of the four (or even three) images in real time. Behind this difficulty there is probably a hidden evolutionary reason. The user (that is a human being) didn't have, unlike what probably happened with the fishes, his cognitive system adapted to process visual information coming from all directions. In an attempt to build a “bridge” among these differences in visual processing, a “3D radar” was implemented. This radar consists of two disks, being the superior used to represent the front part of the prey and the inferior the back part, working as if it was a rear-view mirror. Figure 3. Window of the program PREDATOR The optimization algorithm, “embedded” in the PREDATOR program, in order to evaluate the result of the simulation, uses the following rule that works as the objective function: • For strategies that get to capture the prey in an available time (the free variable tmax), the result of the simulation is: f(X1,X2,X3) = thunt + tpurs (6) Where thunt is the time used in the hunt and tpurs the time spent in the pursuing (both in seconds), that are exhibited in the two chronometers of the control panel; Simulation Optimization Using Swarm Intelligence as Tool for Cooperation Strategy Design in 3D Predator-Prey Game 95 • For strategies that don't get to capture the prey inside of the available time, the result of the simulation is: f(X1,X2,X3) = tmax ( 1 + Daverage / D0 ) (7) Where tmax is the time limit allowed for the simulation (in seconds), Daverage is the medium distance of the predators to the prey at the end of the simulation and D0 the initial distance between the predators and the prey (both in meters). Besides the simulations' configuring information, necessary for the simulating that will evaluate the strategies generated by PSO, the program also reads the adjustment parameters in the configuration file from PSO's algorithm itself. Moreover, besides the kinematics' variables of the particles, they comprise the maximum number of iterations, the number of particles, the number of simulations by particle and the size of the neighborhood (number of particles of the subset considered as each particle's “neighborhood”, including itself, for the comparison among the best individual results obtained as yet). 5. Results Dozens of optimization tests were accomplished, varying not only the simulation's configuration features, in order to analyze different “rules” for the three-dimensional hunting game, but also the optimizing configuration, to study the sensibility of the parameters of the PSO. The parameter “number of simulations by particle” revealed itself, soon in the preliminary tests, of fundamental importance within the optimization process. In some tests considering just a single simulation run by particle, it was common that some particles presented performance of difficult reproduction, which were resultants from simulator initializations extremely advantageous (all of the predators already actually encircling the prey, for instance). As the initialization of the predators' positions is stochastic, that is a phenomenon hard to avoid. And, as a consequence, these results got registered in the algorithm and they “pulled”, in a certain measure, the swarm for a solution often far from being the most appropriate, but only “lucky” when first (and only) evaluated. Although the PSO's algorithm is strong enough to escape from these traps, its performance gets quite harmed, once several iterations are wasted while the influence of these exceptional results does not weaken. Increasing this parameter from 1 to 5, these situations were practically eliminated, and as the performance's average of the simulations is the one to be considered as the particles' objective function, this repetition ends up working as a type of filter against the results derived from extraordinary random conditions. The optimization’s amount of time, considering as stop criterion the maximum number of iterations, is certainly a function of a series of parameters, that might be divided in two groups: the simulation and optimization one. In the first group, the most evident is the simulation time limit (45 seconds to most tests). In the second, they are preponderantly the maximum number of iterations (50 or 100), the number of particles (tests were made with 10 and 20) and the number of simulations for particle (5 in most of the tests). The parameter tmax limits the time for the simulation, and consequently affects the hunting. Its value is intrinsically related to the velocity of the fishes and the several bubbles radius. 96 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The parameter tmax has a fundamental influence in the objective function. A tmax with a small value will not allow the development of some strategies which are not so interesting initially. However, these strategies can generate very interesting solutions at the end. A larger value of tmax can reduce the problem; however, values too large of tmax will increase exaggeratedly the computational time. Finally, it is suggested that before the optimization, a sequence of preliminary simulations must be done, so that it is possible to estimate the impact of the parameters in the hunting. A basic simulation setting was made (see Table 1), for reference, and tested with a series of preliminary tests. Variations of this basic setting were elaborated with the purpose of detecting the sensibility of some parameters. The simulations could be watched in the Predator’s visualization windows, real time. The program also renders three views of the paths described by the agents during the pursue, condensing all the animation in a single picture. An example can be seen in Fig. 4, which shows the trajectories of all agents in a successful hunt. The sudden trajectory change made by all fishes (easily seen in the path of agent number 5 in the top view) is related to the moment the fishes stop moving to encircle the prey and start pursuing it. np tmax vpw vye D0 Rpe Rpr Rv vdw vdp C =6 = 45 s = 0,2 m/s = 1,0 m/s = 10 m =5m =3m = 0,3 m = 1,0 m/s = 0,6 m/s = 0,95 (number of predators) (time limit of the game) (prey's walk velocity) (prey's escape velocity) (initial distance) (radius of the prey’s bubble of perception) (radius of the prey’s bubble of proximity) (radius of the prey’s vital bubble) (predators’ pursuing velocity) (predators’ critical approach velocity) (inertia coefficient) Table 1. Basic scenario configuration Some optimizer configurations were tested to generate the best strategy for this basic simulation setting, taking as base values suggested by the literature of this area (Kennedy & Eberhart, 2001). Different PSO's adjustments took to strategy parameters with very much alike performances, all providing very fast hunts. These configurations (and results) are shown in Table 2. Figure 5 allows an analysis of the convergence from four different adjustment settings of used PSO. Simulation Optimization Using Swarm Intelligence as Tool for Cooperation Strategy Design in 3D Predator-Prey Game 97 Configuration A has a slower convergence as a consequence of the reduced number of simulations, while configurations B and C (with very similar adjusts) presented convergence curves very similar. Configuration D showed a faster convergence, which can be a consequence of the greater number of particles allowing an efficient exploration of the parameter space. Figure 4. Trace of 6 predators (blue) hunting the prey (red) The strategy parameters created in these tests are triple ordinates very similar, indicating “points” in the universe of solutions very close to one another. One of those tests, for instance, generated as the best strategy (for the particle number 14, in the 50th iteration) that one capable of capturing the prey after a hunt of, on average, 10.2 seconds, and defined by the parameters (X1, X2, X3) = (0.0753; 1.6763; -0.2653). 98 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization CfgOtim A Number of Particles Number of Simulations/Particle Neighborhood Size Inertia weight (w) ϕ1max ϕ2max Vmax Hunt time of the best generated strategy (s) 10 1 5 1,0 0,5 0,2 1,0 11,63 CfgOtim B CfgOtim C CfgOtim D 10 5 5 1,0 0,5 0,2 2,0 10,4 10 5 5 1,0 0,4 0,2 2,0 11,4 20 5 5 1,0 0,7 0,4 2,0 10,2 Table 2. Generated strategies for the basic scenario Figure 5. Convergence Analysis Besides the results shown in Fig. 4, it is possible to visually observe the PSO optimization process through the animation mode of the PREDATOR program. Fig. 6 presents 4 frozen 3 Value obtained at iteration number 163. Simulation Optimization Using Swarm Intelligence as Tool for Cooperation Strategy Design in 3D Predator-Prey Game 99 moments of an animation basic scenario, with PSO configured with 20 particles. Each frame contains three cameras illustrating the three views (top, front and rear) of the parameter space, represented as a gray box with dimensions defined by the constraints. Figure 6. Twenty particles (PSO) searching for better strategies at four frozen moments: t=1 (upper left), t=6 (upper right), t=11 (lower left) and t=16 (lower right) 6. Conclusions The problem solving capability of the multiagent systems using co-operative strategies expands the solution universe of some classes of problems to beyond some human limits of reasoning and intuition. The hard time we have trying to mentally process, in a parallel fashion, the several “instances” sensorial-cognitive-motor that represents the agents is the reason that makes invariably surprising the system’s behavior as a whole. That is the emergent behavior. In this work, we tried to demonstrate that it is possible to project these Distributed Artificial Intelligence systems knowing just how to model the problem. The “fine tuning” of the project details was accomplished by a synthesis tool, using an optimization systems that also takes advantage of the emergent behavior (of the PSO particles). Therefore, part of the problem’s complexity was solved without any analytical approach, but using instead an intelligent and automatic solution searching process. The results obtained in this work can attest that the tool of synthesis developed is really capable to provide, as long as working with well elaborated models, satisfactory solutions for problems of complex nature, of difficult resolution by analytical approaches. 100 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Delegating the task of solving a problem for a tool in the moulds proposed in this work means, in a final analysis, to trust in the emergent properties of a complex system to produce solutions for another system (not coincidentally, also complex). These solutions are not pre-defined in the program. Neither are we capable to easily understand the solutions generated in terms of the program code. This tends to go in the opposite direction of the essence from traditional engineering. However, will eventually unveils a field still poorly explored in the area of project development. 7. References Benda, R. D. M. & Jagannathan, V. (1985) On optimal cooperation of knowledge sources. In Technical Report BCS-G2010-28, Boeing AI Center, Boeing Computer Services, Bellevue. Washington. Huhns, M. N. & Stephens, L. M. (1999) Exploiting expertise through knowledge networks. IEEE Internet Computing, Vol. 3, Number 6, pp. 89-90. Kennedy, J. & Eberhart, R. C. (2001) Swarm Intelligence. Ed. Morgan Kaufmann, Sao Francisco. Magoulas, G. D.; Eldabi, T.; Paul, R. J. (2002) Global search for simulation optimisation. Proceedings of the 2002 Winter Simulation Conference, Ed. Ycesan, E.; Chen, C. H.; Snowdon, J. L.; Charnes, J. M. pp. 1978-1985. Manela, M. & Campbell, J. A. (1995) Designing good pursuit problems as testbeds for distributed AI: a novel application of genetic algorithms. In Lecture Notes on Artificial Intelligence 957, Springer Verlag. Parunak, H. V. D. (1997) Go to the ant: Engineering principles from natural agent systems. In Annals of Operations Research. Weiss, G. (2000) Multiagent Systems: a modern approach to Distributed Artificial Intelligence. Ed. MIT Press, Massachusetts. Wooldridge, M. J. & Jennings, N. R. (1999) Software engineering with agents: Pitfalls and pratfalls. IEEE Internet Computing, Vol. 3, Number 3, pp. 20-27. 7 Differential Meta-model and Particle Swarm Optimization of System Simulation and Computer Application, Taiyuan University of Science and Technology 2State Key Laboratory for Manufacturing Systems Engineering, Xi’an Jiaotong University China 1. Introduction Optimization has been an active area of research for several decades. As many real-world optimization problems become increasingly complex, better optimization algorithms are always needs. Without loss of generally, the unconstrained optimization problem is identified with the discovery of the global minimizer of a real valued objective function (1) i.e. finding a point such that (2) Where is a nonempty compact set. There are two main categories for global optimization methods: deterministic and probabilistic methods. Traditionally, the deterministic methods need some information to determine the optima such as grads etc. However, for many real-world optimization problems, the optimization function may be discontinuous. Furthermore, the deterministic methods only can be applied into the problems with slow dimension because of the huge time-cost for large dimensionality. Therefore, from the 1960's, many researchers pay their attentions to the probabilistic methods. All of these rely on probabilistic judgements to determine whether or not search should depart from the neighbourhood of a local optimum (Forgo, 1988; Hansen, 1992; Rao, 1996). Different from adaptive stochastic search algorithms, evolutionary computation (EC) is a new kind of probabilistic method. They exploit a ser of potential solutions (called population), and detect the optimal problem solution through cooperation and competition among the individuals of the population. The well-known EC methods are all inspired from the evolution of nature such as: genetic algorithm (GA) (Goldberg, 1989; Michalewica, 1994), evolution strategy (ES) (Back, 1996; Schwefel, 1975), evolutionary programming (EP) (Fogel, 1996), and artificial life methods. Recently, particle swarm optimization (PSO) method (Kennedy and Eberhart, 1995) is proposed known as a member of the wide category of swarm intelligence methods 1Division Jianchao Zeng1 and Zhihua Cui2,1 102 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization (Kennedy and Eberhart, 2001). It simulates the animal social behaviour such as birds flocking, fish schooling, and animal herding. In this paper, the basic concept of particle swarm optimization is explained. Then, a new framework for PSO - differential meta-model is proposed. Thirdly, a new modified variants — differential evolutionary PSO with PID controller is designed. Finally, we provide a conclusion and some future search topic. 2. Particle Swarm Optimization In a PSO system, multiple candidate solutions coexist and collaborate simultaneously. Each solution called a "particle", flies in the problem search space looking for the optimal position to land. A particle, as time passes through its quest, adjusts its position according to its own "experience" as well as the experience of neighbouring particles. Tracking and memorizing the best position encountered build particle's experience. For that reason, PSO possesses a memory (i.e. every particle remembers the best position it reached during the past). PSO system combines local search method (through self experience) with global search methods (through neighbouring experience), attempting to balance exploration and exploitation. Each particle maintains two character items: velocity and position. Both of them are updated as follows: (3) (4) where vj (t) denotes the velocity vector of particle j at time t. xj (t) represents the position vector of particle j at time t . Vector pj is the memory of particle j at current generation, and vector pg is the best location found by the whole swarm. Cognitive coefficient 1 and social coefficient 2 are known as acceleration coefficients. 1 and 2 are two random number with uniform distribution. To reduce the likelihood, a threshold is introduced to limit the value of vjk (t +1) ( kth value of velocity vector) so that (5) The well-known earliest modification is the introduction of inertia weight w (Shi and Eberhart, 1998). The inertia weight is a scaling factor associated with the velocity during the previous time step, resulting a new velocity update equation, so that (6) Therefore, the original PSO can be obtained by setting w =1. Empirical experiments have been performed with an inertia weight set to decrease linearly from 0.9 to 0.4 during the course of a simulation. There are still many other variants to improve the convergence speed, such as PSO with constriction factor (Clerc, 1999), Spatial neighbourhood (Suganthan, 1999), etc. The details please refer to the corresponding references. 3. Differential Meta-model Particle Swarm Optimization In this section, a uniform model -differential meta-model (Zeng and Cui, 2005) is presented based on the analysis of the standard PSO and its several variants. Then, the convergence Differential Meta-model and Particle Swarm Optimization 103 performance is analyzed with linear control theory, and the upper bound estimate of the convergence speed is given using Lyapunov function. Finally, an adaptive parameters adjusted algorithms is given to improve the global optimality of convergence. 3.1 Differential Meta-model Consider the following differential equations: (7) If Euler numeral integral method is used with step length one, we can obtain the following results: 1. When w = 1 and = 1 , the original PSO is obtained; 2. The standard PSO with inertia weight w is obtained with w 1 and = 1. 3. When w = 1 and , the PSO with constriction factor is obtained. 4. When w = 0 and = 1, the stochastic PSO is obtained (Cui and Zeng,2004). , the different PSO evolutionary Therefore, based on the choice of the parameters w and model is represented by equation (7). In other words, equation (7) can be used to express the meta-model for PSO, called differential meta-model of PSO. For convenience, the following symbols are defined as: (8) (9) (10) (11) Then, equation (7) can be expressed as (12) which is the standard form of differentia meta-model of PSO. 104 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 3.2 Analysis of PSO Evolutionary Behavior The first-order approximate for v(t +1) is used to replace v(t + 1), i.e., then resulting the following equation (12): (13) Define: (14) The standard state equation of linear system is obtained: (15) and its solution is solved as follows: (16) From linear system theory, if all eigenvalues of matrix A have negative real part, equation (16) is convergence. The eigen-equation of matrix A is listed as follows: (17) and its eigenvalues are solved: (18) Therefore, both eigenvalues of matrix A have negative real part if < 0 is true. < 0 is satisfied, the differential PSO evolutionary model In other words, if described by equation (13) is convergent, and the limit is obtained by the follows. (19) that is: Differential Meta-model and Particle Swarm Optimization 105 (20) (21) Equation (21) implies that following conclusion is true: (22) Because of the randomness of is true. and , the above equation is satisfied if and only if It can be seen that all the particles according to the evolutionary equation (13) is convergent < 0 is satisfied. In to the best position pg discovered by any of the particles when other words, if the best position pg keeps constant within the test generation, the positions of all particles will converge to pg. Meanwhile, from equation (15) and , the behavior of PSO is actually identical to the trajectory of a linear system under the step signal inputs with stochastic disturbance, and the amplitude of step signal inputs is increased or not decreased within the evolution of PSO. In following section, the upper bound estimate of convergence speed for equation (15) is deduced. A Lyapunov function is defined as follows (23) and (24) where P is a positive definite matrix and Q is a positive definite symmetrical matrix, and following Lyapunov equation is satisfied: (25) From the view of linear system, the convergence performance of system can be evaluated by: (26) Evidently, the less is and the larger for absolute convergence speed, and vice versa. Integrate equation (26) with t from 0 to t, resulting: , the larger value , the faster (27) 106 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Further, (28) Equation (28) is hard to solve, since then, we suppose (29) in equation (28) is replaced by , may result (30) It can be seen that when is determined, the upper bound estimate of time can be evaluated. From equations (23) and (24), we have convergent (31) Then, for linear constant system, (32) where, (•) is the minimum eigenvalue of ( • ). 3.3 Adaptive Parameter Adjustment Strategy A differential form of PSO is given in equation (12), and the convergence condition is easy to satisfy. In order to improve the global convergence performance, an adaptive parameter adjustment strategy is discussed in this part. From the conducted convergence condition < 0 , we have the less value < 0 , the faster convergence speed it is. By this way, we select the parameter values so that the convergence condition Further, we let < 0 is always true in the evolutionary iteration. < 0 has little absolute value in the earlier stage, while in the later < 0 has a larger absolute value. In other words, there is a slow stage of evolution, convergence speed and a powerful global exploration capacity in the earlier period of evolution, as well as in the later period of evolution, the local exploitation capacity is addressed and convergence speed is faster. In order to balance the ability of the global exploration and the local exploitation, an adaptive parameter adjustment strategy is proposed. With the definition of , (33) Differential Meta-model and Particle Swarm Optimization 107 The convergence condition implies . Evidently, the differential PSO algorithm has three parameters , and . From the experiment results, + =4 can make a better performance. Therefore, the parameters are adjusted as follows: (34) (35) (36) Where t is evolutionary generation, a and /? are two adjusted parameters to control the change rate. Generally, =0.01~0.001, =0.01~0.005. 4. Differential Evolutionary Particle Swarm Optimization with Controller (Zeng & Cui, 2005) With the same model (7), we suppose then euation (7) can be changed as follows: (37) The PSO algorithm described by differential evolutionary equations (37) is called differential evolutionary PSO (DEPSO). The analysis of the evolutionary behavior of DEPSO is made by transfer function as follows. The first order difference approximation of vi (t + 1) is vi (t + 1) = —, then equation (37) will be (38) Laplace transformation is made on equation (38), and suppose the initial values of vi (t) and xi (t) are zero, we have (39) (40) From equation (39), it is known that 108 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization (41) Substituting (41) into (40) yields (42) Suppose and are two input variables, is output variable, then the system structure reflecting by equation (42) can be shown as in Fig.l. Figure 1. The System Diagram of DEPSO The open-loop transfer function from to is (43) And the eigenequation is 1 + GK (s) = 0, thus results in (44) the two eigenvalues are (45) DEPSO will converge when 1 and 2 have negative real parts. This is obtained with (46) So, the convergence of DEPSO with as input can be guaranteed if (47) Differential Meta-model and Particle Swarm Optimization 109 By the same way, the convergence of DEPSO with respectively can be guaranteed if DEPSO is From Fig.l, it is obvious that and as input and output > 0 . Therefore, the convergence condition of (48) (49) From (48), we have (50) it means (51) Since only if 1 and 2 are stochastic variables, it is obviously that the above equation is satisfied (52) To improve the dynamic evolutionary behaviour of DEPSO, the evolutionary function of DEPSO is considered as a control plant and PID controller is introduced. The parameter of PID controller can be dynamically adjusted in the evolutionary process, and the new algorithm is called PID-DEPSO. The system structure is showed in Fig.2. Figure 2. The System Diagram of PID-DEPSO 110 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization From Fig.2, we have (53) Where . as input is : (54) The open-loop transfer function taking its eigenequation is , then (55) According to Routh's stability criteria, the stability condition of the system with as input and output respectively are and (56) As a result, the stability of PID-DEPSO is stability if (57) Similarly, if (57) is satisfied, . From Fig.2, we have (58) Thus (59) The evolutionary equation of PID-DEPSO is deduced as follow: (60) Differential Meta-model and Particle Swarm Optimization 111 it means: (61) Suppose (62) then , substituting it into (61), we have (63) Let (64) then , substituting it into (63), we have (65) Let Laplace inverse transformation of are zero, then (66) Let are (67) , then the evolutionary equations of PID-DEPSO , and the (68) (69) 112 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 5. Conclusion This chapter introduces one uniform differential meta-model, and a new variant development for PSO combined with PID controller is proposed. The current results show it is an interesting area with the control theory to improve the performance. The future research includes incorporating some other controllers into the PSO methodology. 6. References Back, T. (1996). Evolutionary Algorithms in Theory and Practice. Oxford University Press, New York. Clerc, M. (1999). The Swarm and the Queen: Towards a Deterministic and Adaptive Particle Swarm Optimization. Proceedings of the Congress on Evolutionary Computation, pp.1951- 1957, Washington DC, USA, July 1999. IEEE Service Center, Piscataway, NJ. Cui, Z.H. & Zeng, J.C. (2004). A New Particle Swarm Optimizer. Proceedings of the 2004 Congress on Evolutionary Computation, pp.316-319. IEEE Service Center, Piscataway, NJ. Fogel, D. (1996). Evolutionary Computation: Towards a New Philosophy of Machine Intelligence. IEEE Press, Piscataway, NJ. Forgo, F. (1988). Nonconvex Programming. Akademiai Kiado, Budapest. Goldberg, D. (1989). Genetic Algorithms in Search, Optimization, and Machine Learning. Addison Wesley, Reading, MA. Hansen, E.R. (1992). Global Optimization Using Interval Analysis. Marcel Dekker, New York. Kennedy, J. & Eberhart, R.C. (1995). Particle Swarm Optimization. Proceedings of IEEE International Conference on Neural Networks, IV: pp. 1942-1948. IEEE Service Center, Piscataway, NJ. Kennedy, J. & Eberhart, R.C. (2001). Swarm Intelligence. Morgan Kaufmann Publishers. Michalewica, Z. (1994). Genetic Algorithms + Data Structures = Evolution Programs. Springer, Berlin. Rao, S.S. (1996). Engineering Optimization-Theory and Practice. Wiley. Schwefel, H.P. (1975). Evolutionsstrategie und numerische Optimierung. Technical University of Berlin, Department of Process Engineering, Dr.-Ing.Thesis. Shi, Y. & Eberhart, R.C. (1998). A Modified Particle Swarm Optimizer. In: Porto VW, Saravanan N, Waagen D and Eiben AE (eds) Evolutionary Programming VII, pp. 611616, Springer. Suganthan, P.N. (1999). Particle Swarm Optimizer with Neighbourhood Operator. Proceedings of the Congress on Evolutionary Computation, pp.1958-1961, Washington DC, USA, July 1999. IEEE Service Center, Piscataway, NJ. Zeng, J.C. & Cui, Z.H.(2005). A Differential Meta-model for Particle Swarm Optimization. Progress in Intelligence Computation & Applications, pp.159-164, Wuhan, China. Zeng, J.C. & Cui, Z.H. (2005). A Differential Evolutionary Particle Swarm Optimization with Controller. In: Wang, L., Chen K. and Ong, Y.S. (eds) Lecture Notes in Computer Science, Vol.3612, pp.467-476, Changsha, China. 8 Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 1University Adil Baykasoğlu1, Lale Özbakır2 and Pınar Tapkan2 2Erciyes of Gaziantep, Department of Industrial Engineering University, Department of Industrial Engineering Turkey 1. Introduction There is a trend in the scientific community to model and solve complex optimization problems by employing natural metaphors. This is mainly due to inefficiency of classical optimization algorithms in solving larger scale combinatorial and/or highly non-linear problems. The situation is not much different if integer and/or discrete decision variables are required in most of the linear optimization models as well. One of the main characteristics of the classical optimization algorithms is their inflexibility to adapt the solution algorithm to a given problem. Generally a given problem is modelled in such a way that a classical algorithm like simplex algorithm can handle it. This generally requires making several assumptions which might not be easy to validate in many situations. In order to overcome these limitations more flexible and adaptable general purpose algorithms are needed. It should be easy to tailor these algorithms to model a given problem as close as to reality. Based on this motivation many nature inspired algorithms were developed in the literature like genetic algorithms, simulated annealing and tabu search. It has also been shown that these algorithms can provide far better solutions in comparison to classical algorithms. A branch of nature inspired algorithms which are known as swarm intelligence is focused on insect behaviour in order to develop some meta-heuristics which can mimic insect's problem solution abilities. Ant colony optimization, particle swarm optimization, wasp nets etc. are some of the well known algorithms that mimic insect behaviour in problem modelling and solution. Artificial Bee Colony (ABC) is a relatively new member of swarm intelligence. ABC tries to model natural behaviour of real honey bees in food foraging. Honey bees use several mechanisms like waggle dance to optimally locate food sources and to search new ones. This makes them a good candidate for developing new intelligent search algorithms. In this chapter an extensive review of work on artificial bee algorithms is given. Afterwards, development of an ABC algorithm for solving generalized assignment problem which is known as NP-hard problem is presented in detail along with some comparisons. It is a well known fact that classical optimization techniques impose several limitations on solving mathematical programming and operational research models. This is mainly due to inherent solution mechanisms of these techniques. Solution strategies of classical optimization algorithms are generally depended on the type of objective and constraint 114 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization functions (linear, non-linear etc.) and the type of variables used in the problem modelling (integer, real etc.). Their efficiency is also very much dependent on the size of the solution space, number of variables and constraints used in the problem modelling, and the structure of the solution space (convex, non-convex, etc.). They also do not offer general solution strategies that can be applied to problem formulations where, different type of variables, objective and constraint functions are used. For example, simplex algorithm can be used to solve models with linear objective and constraint functions; geometric programming can be used to solve non-linear models with a posynomial or signomial objective function etc. (Baykasoğlu, 2001). However, most of the optimization problems require different types of variables, objective and constraint functions simultaneously in their formulation. Therefore, classic optimization procedures are generally not adequate or easy to use for their solution. Researchers have spent a great deal of effort in order to adapt many optimization problems to the classic optimization procedures. It is generally not easy to formulate a real life problem that suits a specific solution procedure. In order to achieve this, it is necessary to make some modifications and/or assumptions on the original problem parameters (rounding variables, softening constraints etc.). This certainly affects the solution quality. A new set of problem and model independent nature inspired heuristic optimization algorithms were proposed by researchers to overcome drawbacks of the classical optimization procedures. These techniques are efficient and flexible. They can be modified and/or adapted to suit specific problem requirements (see Figure 1). Research on these techniques is still continuing all around the globe. Not easy Classical Optimisation Techniques Problem dependent PROBLEM Modifications SOLUTION TECHNIQUE IF Linear Programming Model USE (Simplex); IF Integer Programming Model USE (Branch and Bound); ... Easy Nature Inspired Heuristic Optimisation Techniques General purpose PROBLEM Modifications SOLUTION TECHNIQUE Any model Any Model Any Model Any Model ... USE USE USE USE (Genetic Algorithms) (Simulated Annealing) (Ant Colony Optimization) (Artificial Bee Colony) Figure 1. A pictorial comparison of classical and modern heuristic optimisation strategies (Adapted from Baykasoğlu, 2001) A branch of nature inspired algorithms which are called as swarm intelligence is focused on insect behaviour in order to develop some meta-heuristics which can mimic insect's problem solution abilities. Interaction between insects contributes to the collective intelligence of the social insect colonies. These communication systems between insects have been adapted to Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 115 scientific problems for optimization. One of the examples of such interactive behaviour is the waggle dance of bees during the food procuring. By performing this dance, successful foragers share the information about the direction and distance to patches of flower and the amount of nectar within this flower with their hive mates. So this is a successful mechanism which foragers can recruit other bees in their colony to productive locations to collect various resources. Bee colony can quickly and precisely adjust its searching pattern in time and space according to changing nectar sources. The information exchange among individual insects is the most important part of the collective knowledge. Communication among bees about the quality of food sources is being achieved in the dancing area by performing waggle dance (Figure 2). Figure 2. Waggle dance of honey bees The previous studies on dancing behaviour of bees show that while performing the waggle dance, the direction of bees indicates the direction of the food source in relation to the Sun, the intensity of the waggles indicates how far away it is and the duration of the dance indicates the amount of nectar on related food source. Waggle dancing bees that have been in the hive for an extended time adjust the angles of their dances to accommodate the changing direction of the sun. Therefore bees that follow the waggle run of the dance are still correctly led to the food source even though its angle relative to the sun has changed. So collective intelligence of bees based on the synergistic information exchange during waggle dance. Observations and studies on honey bee behaviours resulted in a new generation of optimization algorithms. In this chapter a detailed review of bee colony based algorithms is given. Afterwards a bee based algorithm that we name as "artificial bee colony" is explained in detail along with an application to "generalized assignment problem" which is known as a NP-hard problem. 2. Description of the Behaviour of Bees in Nature Social insect colonies can be considered as dynamical system gathering information from environment and adjusting its behaviour in accordance to it. While gathering information 116 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization and adjustment processes, individual insects don't perform all the tasks because of their specializations. Generally, all social insect colonies behave according to their own division labours related to their morphology. Bee system consists of two essential components: • Food Sources The value of a food source depends on different parameters such as its proximity to the nest, richness of energy and ease of extracting this energy. • Foragers • Unemployed foragers: If it is assumed that a bee have no knowledge about the food sources in the search field, bee initializes its search as an unemployed forager. There are two possibilities for an unemployed forager: Scout Bee (S in Figure 3): If the bee starts searching spontaneously without any knowledge, it will be a scout bee. The percentage of scout bees varies from 5% to 30% according to the information into the nest. The mean number of scouts averaged over conditions is about 10% (Seeley, 1995). Recruit (R in Figure 3): If the unemployed forager attends to a waggle dance done by some other bee, the bee will start searching by using the knowledge from waggle dance. • Employed foragers (EF in Figure 3): When the recruit bee finds and exploits the food source, it will raise to be an employed forager who memorizes the location of the food source. After the employed foraging bee loads a portion of nectar from the food source, it returns to the hive and unloads the nectar to the food area in the hive. There are three possible options related to residual amount of nectar for the foraging bee. If the nectar amount decreased to a low level or exhausted, foraging bee abandons the food source and become an unemployed bee. If there are still sufficient amount of nectar in the food source, it can continue to forage without sharing the food source information with the nest mates Or it can go to the dance area to perform waggle dance for informing the nest mates about the same food source. The probability values for these options highly related to the quality of the food source. • Experienced foragers: These types of forager use their historical memories for the location and quality of food sources. It can be an inspector which controls the recent status of food source already discovered. It can be a reactivated forager by using the information from waggle dance. It tries to explore the same food source discovered by itself if there are some other bees confirm the quality of same food source (RF in FigureS). It can be scout bee to search new patches if the whole food source is exhausted (ES in Figure 3). It can be a recruit bee which is searching a new food source declared in dancing area by another employed bee (ER in Figure 3). Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 117 Figure 3. Typical behaviour of honey bee foraging 3. Review and Categorization of Studies on Artificial Bee Systems The foraging behaviour, learning, memorizing and information sharing characteristics of bees have recently been one of the most interesting research areas in swarm intelligence. Studies on honey bees are in an increasing trend in the literature during the last few years. After a detailed literature survey, the previous algorithms are categorized in this work by concerning the behavioural characteristics of honey bees. • Foraging behaviours • Marriage behaviours • Queen bee concept 118 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The researches, their main contributions and applications are summarized as shown in Table 1. Type Honey Bee Literature Yonezawa and Kikuchi (1996) Seeley and Buhrman (1999) Schmickl et al. (2005) Lemmens (2006) Sato and Hagiwara (1997) Karaboga (2005) Yang (2005) Basturk and Karaboga (2006) Pham et al. (2006a) Lucic and Teodorovic (2001) Foraging Behaviour Lucic (2002) Lucic and Teodorovic (2002) Lucic and Teodorovic (2003a) Lucic and Teodorovic (2003b) Algorithm Application Biological simulation Genetic Algorithm Improvement Continuous Optimization Continuous Optimization Continuous Optimization Continuous Optimization Travelling Salesman Problem(TSP) TSP and Stochastic Vehicle Routing Problem TSP TSP Stochastic Vehicle Routing Bee System Artificial Bee Colony Algorithm (ABC) Virtual Bee Algorithm (VBA) ABC Bees Algorithm (BA) Bee System (BS) BS BS BS BS + Fuzzy Logic Bee Colony Teodorovic and Dell'Orco (2005) Optimization (BCO) + Ride-Matching Problem Fuzzy Bee System (FBS) Dynamic Allocation of Nakrani and Tovey (2003) A Honey Bee Algorithm Internet Service Telecommunication Network Wedde et al. (2004) BeeHive Routing Large Scale Precise Bianco (2004) Navigation Job Shop Scheduling Chong et al. (2006) Max-W-Sat Problem Drias et al. (2005) Bees Swarm Pham et al. (2006b) Pham et al. (2006c) Pham et al. (2006d) Quijano and Passino (2007) Markovic et al. (2007) BA BA BA BCO Based LVQ-Neural Network MLP- Neural Network Neural Network Dynamic Resource Max-Routing and Wavelength Assignment Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 119 Abbass (2001a,b,c) Teo and Abbass (2001, 2003) Marriage Behaviour Bozorg Haddad and Af shar (2004) Bozorg Haddad et al. (2006) Chang (2006) Afshar et al. (2007) Fathian et al. (2007) Koudil et al. (2007) Benatchba et al. (2005) Sung (2003) Queen Bee Qin et al. (2004) Kara (2004) Azeem and Saad (2004) Marriage in Honey-Bees 3-Sat Problem Optimization (MBO) Modified MBO MBO Honey-Bees Mating Optimization -HBMO MBO Based Improved HBMO HBMO Based MBO Based MBO Based Queen-Bee Evolution Algorithm(QBE) QBE Based Bee Crossover Modified QBE 3-Sat Problem Water Resources Management Problems Nonlinear constrained and unconstrained optimization Stochastic Dynamic Programming Continuous Optimization Data Mining -Clustering Integrated Partitioning/Scheduling Data Mining Genetic Algorithm Improvement Economic Power Dispatch Genetic Algorithm Improvement Genetic Algorithm Improvement Table 1. Categorization of literature and applications In this section, contributions of these researches are explained in detailed to clarify the background of honey bees based optimization algorithms. Yonezawa and Kikuchi (1996) examine the foraging behaviour of honey bees and construct an algorithm to indicate the importance of group intelligence principals. The algorithm is simulated with one and three foraging bees and the computational simulation results showed that three foraging bees are faster than the system with one foraging bee at decision making process. They also indicate that the honey bees have an adaptive foraging behaviour at complex environment. Seeley and Buhrman (1999) investigated the nest site selection behaviour of honey bee colonies. The nest site selection process starts with several hundred scout bees that search for potential nest sites. The scouts then return to the cluster, report their findings by means of waggle dances, and decide the new nest site. The type of waggle dance depends on the quality of the site being advertised. The authors repeated the observations of Lindauer in 1955 by taking advantage of modern video-recording and bee-labelling techniques on three honey bee colonies. Many of the results confirmed with the previous study and some of the results provided new and important insights. They pointed out that a colony's strategy of decision making is a weighted additive strategy which is the most accurate but most 120 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization information demanding one. This strategy evaluates each alternative according to the relative attributes, gives weights to each attribute according to its importance, sums the weighted attributes for each alternative, and finally chooses the alternative whose total valuation is the highest. Similarly, the bee colony considers a dozen or more alternative nest sites, evaluates each alternative nest site with respect to at least six distinct attributes with different weightings e.g. cavity volume, entrance height, entrance area, entrance direction etc. Consequently, the bee colony uses this strategy by distributing among many bees both the task of evaluating the alternative sites and the task of identifying the best of these sites. Schmickl et al. (2005) evaluate the robustness of bees' foraging behaviour by using a multiagent simulation platform. They investigate how the time-pattern of environmental fluctuations affects the foraging strategy and the efficiency of the foraging. They conclude that the collective foraging strategy of a honeybee colony is robust and adaptive, and that its emergent features allow the colony to find optimal solutions. Lemmens (2006) investigated whether pheromone-based navigational algorithms (inspired by biological ant colony behaviour) are outperformed by non-pheromone-based navigational algorithms (inspired by biological bee colony behaviour) in the task of foraging. The results of the experiments showed that (i) pheromone-based navigational algorithms use less time per iteration step in small-sized worlds, (ii) non-pheromone-based algorithms are significantly faster when finding and collecting food and use fewer time steps to complete the task, and (iii) with growing world sizes, the non-pheromone-based algorithm eventually outperforms pheromone-based algorithms on a time per time step measure. In spite of all these profits it is mentioned that non-pheromone-based algorithms are less adaptive than pheromone-based algorithms. Sato and Hagiwara (1997) proposed an improved genetic algorithm based on foraging behaviour of honey bees. In a honey bee colony, each bee looks for the feed individually. When a bee finds feed, then it notifies the information to the other many bees by dance and they engage in a job to carry the feed. When they finish the work, each bee tries to find new one individually again. Similarly in the proposed algorithm, named Bee System, global search is done first, and some chromosomes with pretty high fitness (superior chromosomes) are obtained using the simple genetic algorithm. Second, many chromosomes obtain the information of superior chromosomes by the concentrated crossover and they search intensively around there using multiple populations. In the conventional crossover each pair is made randomly, while in the concentrated crossover all of the chromosomes make pair with superior chromosome. Lastly, pseudo-simplex method is contributed to enhance the local search ability of the Bee System. If the solution found by one cycle is not satisfactory, the global search is repeated. As it is known genetic algorithms have good global search ability, however they lack the local search ability. On the other hand with Bee System probability of falling into a local optimum is low because of the combination of local and global search since the aim of the algorithm is to improve the local search ability of genetic algorithm without degrading the global search ability. In the experimental studies Bee System is compared with the conventional genetic algorithm and it is found that Bee System shows better performance than the conventional genetic algorithm especially for highly complex multivariate functions. Karaboga (2005) analyzes the foraging behaviour of honey bee swarm and proposes a new algorithm simulating this behaviour for solving multi-dimensional and multi-modal optimization problems, called Artificial Bee Colony (ABC). The main steps of the algorithm are: 1) send the employed bees onto the food sources and determine their nectar amounts; 2) calculate Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 121 the probability value of the sources with which they are preferred by the onlooker bees; 3) stop the exploitation process of the sources abandoned by the bees; 4) send the scouts into the search area for discovering new food sources, randomly; 5) memorize the best food source found so far. In the algorithm, an artificial bee colony consists of three groups of bees: employed bees, onlookers and scouts. Employed bees are associated with a particular food source which they are currently exploiting. They carry the information about this particular source and share this information with a certain probability by waggle dance. Unemployed bees seek a food source to exploit. There are two types of unemployed bees: scouts and onlookers. Scouts search the environment for new food sources without any guidance. Occasionally, the scouts can accidentally discover rich, entirely unknown food sources. On the other hand onlookers observe the waggle dance and so are placed on the food sources by using a probability based selection process. As the nectar amount of a food source increases, the probability value with which the food source is preferred by onlookers increases, too. In the ABC algorithm the first half of the colony consists of the employed bees and the second half includes the onlookers. For every food source, there is only one employed bee. Another issue that is considered in the algorithm is that the employed bee whose food source has been exhausted by the bees becomes a scout. In other words, if a solution representing a food source is not improved by a predetermined number of trials, then the food source is abandoned by its employed bee and the employed bee is converted to a scout. The algorithm is tested on three well known test functions. From the simulation results, it is concluded that the proposed algorithm can be used for solving uni-modal and multimodal numerical optimization problems. Yang (2005) presents a virtual bee algorithm (VBA) which is effective on function optimization problems. The main steps of the algorithm are: 1) create an initial population of virtual bees where each bee is associated with a memory; 2) encode the optimization function into virtual food; 3) define the criterion for communicating food location with others; 4) march all the virtual bees randomly to new positions for virtual food searching, find food and communicate with neighbouring bees by virtual waggle dance; 5) evaluate the encoded intensity /locations of bees; 6) decode the results to obtain the solution to the problem. However the proposed algorithm is similar with genetic algorithm, it is much more efficient due to the parallelism of the multiple independent bees. To realize this statement, the VBA algorithm is tested on two functions with two parameters, one is singlepeaked and the other is multi-peaked. The results show that the new algorithm is much efficient than genetic algorithm. Basturk and Karaboga (2006) presented another ABC algorithm and expanded the experimental results of Karaboga (2005). The performance of the algorithm is tested on five multi-dimensional benchmark functions and the results were compared with genetic algorithms. It is pointed out that ABC algorithm outperforms genetic algorithm for functions having multi-modality and uni-modality. Pham et al. (2006a) proposed an optimization algorithm inspired by the natural foraging behaviour of honey bees, called Bees Algorithm. The proposed algorithm is also applicable to both combinatorial and functional optimization problems. In real life, foraging process begins by scout bees being sent to search for promising flower patches. When they return to the hive, unload their nectar and go to the dance floor to perform a dance known as the waggle dance which is essential for colony communication. After waggle dancing, the dancer goes back to the flower patch with follower bees that were waiting inside the hive. More follower bees are sent to more promising patches. This allows the colony to gather food quickly and efficiently. 122 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Similarly Bees Algorithm starts with scout bees being placed randomly on the search space. The main steps of the algorithm are: 1) initialize population with random solutions; 2) evaluate fitness of the population; 3) determine a certain number of fittest bees and select their sites for neighbourhood search; 4) recruit a certain number of bees for selected sites, evaluate their fitness; 5) select the fittest bee from each site to form the new population; 6) assign remaining bees to search randomly and evaluate their fitness. The Bees Algorithm is applied to two standard functional optimization problems with two and six dimensions, respectively. The results showed that the Bees Algorithm is able to find solutions very close to the optimum. The algorithm is also applied to eight benchmark functions and the results were compared with deterministic simplex method, stochastic simulated annealing optimization procedure, genetic algorithm and ant colony system. Bees Algorithm generally outperformed other techniques in terms of speed of optimization and accuracy of results. On the other hand Bees Algorithm has too many tuneable parameters. Luck and Teodorovic (2001) published the first study on Bee System based on the PhD thesis of Luck for 6 Travelling Salesman Problem (TSP) test problems. Luck (2002) aimed to explore the possible applications of collective bee intelligence in solving complex traffic and transportation engineering problems. In this context, (TSP) and stochastic vehicle routing problem (SVRP) were studied. TSP is an NP-hard problem that aims to find the minimum distance circuit passing through each node only once. The algorithm starts with locating the hive in one of the nodes on the graph that the bees are collecting nectar i.e. the graph in which the travelling salesman route should be discovered. The artificial bees collect the nectar during a certain prescribed time interval and the position of the hive is randomly changed. The bees start to collect the nectar from the new location and again the location of the hive is randomly changed. The iteration in the searching process represents one change of the hive's position and the iteration ends when one or more feasible solution is created. The artificial bees live in an environment characterized by discrete time and consequently each iteration is composed of a certain number of stages. During any stage, bees choose nodes to be visited in a random manner. By this probability function it is provided that the greater the distance between two nodes, the lower the probability that a bee chooses this link. The influence of the distance is lower at the beginning of the search process. The greater the number of iterations, the higher the influence of the distance. On the other hand the greater the total number of bees that visited by certain link in the past, the higher the probability is of choosing that link in the future. This represents the interaction between individual bees in the colony. During one stage the bee visits a certain number of nodes, create a partial travelling salesman tour, and return to the hive. In the hive the bee participates in a decision making process. The bee decides whether to recruit the nest mates by dancing before returning to the food source, to continue to forage at the food source without recruiting the nest mates, or to abandon the food source. The second alternative has very low probability since bees are social insects and communicate each other. The probability that a bee uses the same partial tour (or abandons it) depends on the length of the partial tour. The longer the tour that the bee has discovered, the smaller is the probability that the bee will fly again along the same tour. It is noted that the nectar quantity along a certain link is inversely proportional to the link length. At the beginning of any stage if a bee does not use the same partial travelling salesman tour, the bee goes to the dancing area and follows another bee according to a probability function. This function depends on the total length of the partial route and the number of bees that are advertising this route. Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 123 Additionally, before relocating the hive, 2-opt and 3-opt heuristic algorithms are applied to improve the solution obtained by the bees in the current iteration. On the other hand in nature, not all bees start foraging simultaneously and in the algorithm it is assumed that at the beginning of each iteration all bees are in the hive and the number of foraging bees in every subsequent stage is increased. The performance of the algorithm was tested on 10 benchmark problems. Experimental results showed that in all instances with less than 100 nodes, the Bee System produced the optimal solution and the times required to find the best solutions by the Bee System were low. At the second part of this thesis Bee System was integrated with fuzzy logic and this approach was applied to Vehicle Routing Problems (VRP). The procedure and the results were presented at Luck and Teodorovic (2003b). Luck and Teodorovic (2002, 2003a) published their second and third study on Bee System based on Luck's (2002) 8 and 10 TSP test problems. Luck and Teodorovic (2003b) combined Bee System algorithm, which was first proposed by Luck and Teodorovic (2001), and fuzzy logic approach to obtain good solutions for stochastic VRP. The proposed approach contains two steps: 1) solve VRP as a TSP by using Bee System and obtain frequently an infeasible solution to the original problem; 2) decide when to finish one vehicle's route and when to start with the next vehicle's route by using the solution created at the previous step and fuzzy rule base generated by Wang-Mendel's algorithm. Stochastic VRP is to find a set of routes that would minimize transportation cost where the locations of the depot, nodes to be served and vehicle capacity are known, and demand at the nodes only approximated. Due to the uncertainty of demand at the nodes, a vehicle might not be able to service a node once it arrives there due to insufficient capacity. It is assumed in such situations that the vehicle returns to the depot, empties what it has picked up thus far, returns to the node where it had a failure, and continues service along the rest of the planned route. Consequently, demand at nodes is treated as a random variable and actual demand value is known only after the visit to the node. The developed model was tested on 10 TSP examples. In order to convert the original TSP problems into the corresponding VRPs, the first node was treated as a depot. The results were compared with the best solution obtained by the heuristic algorithm based on Bee System. The results were found to be very close to the best solution assuming that the future node demand pattern was known. Teodorovic and Dell'Orco (2005) proposed Bee Colony Optimization (BCO) meta-heuristic which was the generalization of the Bee System presented by Luck (2002). The BCO was capable to solve deterministic combinatorial problems, as well as combinatorial problems characterized by uncertainty. The primary goal of their paper was to explore the possible applications of collective bee intelligence in solving combinatorial problems characterized by uncertainty. In this respect Fuzzy Bee System (FBS) was introduced where the agents use approximate reasoning and rules of fuzzy logic in their communication and acting. The performance of FBS algorithm was tested on ride-matching problem which aims to constitute routing and scheduling of the vehicles and passengers by minimizing the total distance travelled by all participants, minimizing the total delay, or equalizing vehicle utilization. There were no theoretical results that could support proposed approach but preliminary results were very promising. Nakrani and Tovey (2003) proposed a honey bee algorithm for dynamic allocation of internet services. In the proposed algorithm, servers and HTTP request queues in an Internet server colony were modelled as foraging bees and flower patches respectively. The 124 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization algorithm was compared with an omniscient algorithm that computes an optimal allocation policy, a greedy algorithm that uses past history to compute allocation policy, and an optimal-static algorithm that computes omnisciently the best among all possible static allocation policies. The experimental results showed that the algorithm performs better than static or greedy algorithms. On the other hand it was outperformed by greedy algorithm for some low variability access patterns. Wedde et al. (2004) introduced a fault-tolerant, adaptive and robust routing protocol inspired from dance language and foraging behaviour of honey bees for routing in telecommunication network, called BeeHive. In order to evaluate the performance of the algorithm, it was tested on Japanese Internet Backbone and compared with AntNet, DGA and OSPF. The results showed that BeeHive achieves a similar or better performance as compared to the other algorithms. Bianco (2004) presented a mapping paradigm for large scale precise navigation that takes inspiration from the bees' large scale navigation behaviour. Bees performed very long navigations when they feed, travelling for many kilometres but, at the same time, getting an excellent precision when they return to their small hives. Test results demonstrated that such capabilities were sufficient to get rather good precision. Chong et al. (2006) presented a novel approach that uses the honey bees foraging model, inspired by Nakrani and Tovey (2004), to solve the job shop scheduling problem. Job shop scheduling is concerned with finding a sequential allocation of competing resources that optimizes a particular objective function. Each machine can process only one job and each job can be processed by only one machine at a time. The performance of the algorithm was tested on 82 job shop problem instances and compared with ant colony and tabu search algorithms. The experimental results conducted that tabu search outperforms other two heuristics according to solution quality and execution time. On the other hand bee algorithm performed slightly better than ant algorithm and the execution time for both heuristics was approximately equal. Drias et al. (2005) introduced a new intelligent approach named Bees Swarm Optimization (BSO), which is inspired from the behaviour of real bees especially harvesting the nectar of the easiest sources of access while always privileging the richest. The proposed algorithm was adapted to the maximum weighted satisfiability problem (MAX-W-SAT) problem which was NP-Complete. MAX-W-SAT problem asks for the maximum weight which can be satisfied by any assignment, given a set of weighted clauses. The performance of the algorithm was compared with GRASP, SSAT and AGO and it was concluded that BSO outperformed the other evolutionary algorithms. Pham et al. (2006b) presented the use of the Bees Algorithm, proposed by Pham et al. (2006a) to train the Learning Vector Quantization (LVQ) neural network for control chart pattern recognition. The training of a LVQ network can be regarded as the minimization of an error function. The error function defines the total difference between the actual output and the desired output of the network over a set of training patterns. In terms of the Bees Algorithm, each bee represents a LVQ network with a particular set of reference vectors. The aim of the algorithm was to find the bee with the set of reference vectors producing the smallest value of the error function. Despite the high dimensionality of the problem, the algorithm still succeeded to train more accurate classifiers than that produced by the standard LVQ training algorithm. Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 125 Pham et al. (2006c) presented the use of the Bees Algorithm, proposed by Pham et al. (2006a) to train the Multi-layered Perceptron (MLP) neural network for control chart pattern recognition. The training of a MLP network can be regarded as the minimization of an error function. The error function defines the total difference between the actual output and the desired output of the network over a set of training patterns. In terms of the Bees Algorithm, each bee represents a MLP network with a particular set of weight vectors. The aim of the algorithm was to find the bee with the set of weight vectors producing the smallest value of the error function. Despite the high dimensionality of the problem, the algorithm succeeded to train more accurate classifiers than back propagation algorithm. Pham et al. (2006d) presented an application of the Bees Algorithm, proposed by Pham et al. (2006a) to the optimization of neural networks for the identification of defects in wood veneer sheets. The Bees Algorithm was used instead of a back propagation algorithm to optimize the weights of the neural network. The optimization using the Bees Algorithm involves the bees searching for the optimal values of the weights assigned to the connections between the neurons within the network where each bee represents a neural network with a particular set of weights. The aim of the Bees Algorithm was to find the bee producing the smallest value of the error function. The experimental results show that the Bees Algorithm was able to achieve an accuracy that was comparable to the back propagation method. However, the Bees Algorithm proved to be considerably faster. Quijano and Passino (2007) developed an algorithm, based on the foraging behaviour of honey bees, to solve resource allocation problem. The primary sources for constructing components of the proposed model were: dance strength determination, dance threshold, unloading area, dance floor and recruitment rates, explorer allocation and its relation to recruitment. They also proposed an engineering application on dynamic resource allocation for multi-zone temperature control, to highlight the main features of the dynamical operation of the honey bee social foraging algorithm. Markovic et al. (2007) used the BCO algorithm, which was introduced by Teodorovic and Dell'orco (2005) to solve Max-Routing and Wavelength Assignment (Max-RWA) problem in all-optical networks. The Max-RWA problem is to maximize the number of established lightpaths in a given optical network for a given traffic demand matrix and the given number of wavelengths. The proposed BCO-RWA algorithm was tested on European Optical Network and the results were compared with the results obtained by the LP relaxation approach and the tabu meta-heuristic algorithm. The BCO-RWA algorithm always outperformed the results of the compared algorithms and was able to produce very good solutions in a reasonable computation time. Abbass (2001a) presented the first novel search algorithm inspired by the marriage process in honey bees. A honey bee colony consists of the queen(s), drones, worker(s), and broods. In this study the colony was assumed to have a single queen and a single worker. In real life a mating flight starts with a dance performed by the queens and the drones follow the queens to mate with them. In each mating, sperm reaches the spermatheca and accumulates there to form the genetic pool of the colony. Each time a queen lays fertilized eggs, she retrieves at random a mixture of the sperms accumulated in the spermatheca to fertilize the egg. Similarly at the MBO algorithm the mating flight can be visualized as a set of transitions in a state space where the queen moves between the different states in the space and mate with the drone encountered at each state probabilistically. The probability of mating is high when either the queen is still in the start of her mating flight and therefore 126 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization her speed is high, or when the fitness of the drone is as good as the queen's. The algorithm starts with initializing the queen's genotype at random. After that a heuristic is used to improve the queen's genotype realized by workers. Afterwards, a set of mating flights is undertaken. In each mating flight, the queen's energy and speed are initialized randomly. The queen then moves between different states (solutions) in the space according to her speed and mates with the drone. If a drone is successfully mated with the queen (the drone passes the probabilistic decision rule), its sperm is added to the queen's spermatheca (list of partial solutions) and the queen's speed and energy are reduced. After the queen finishes her mating flight, she returns to the nest, selects a sperm randomly, performs crossover and mutation. The worker is then used to improve the resultant brood and the number of workers represents the number of heuristics encoded in the program. Afterwards, the queen is replaced with the fittest brood if the latter is better than the former. The remaining broods are then killed and a new mating flight starts. The MBO algorithm has three user-defined parameters: the queen's spermatheca size representing the maximum number of matings in a single mating flight, the number of broods that will be born by the queen, and the amount of time devoted to brood care signifying the depth of local search. A general constraint satisfaction problem (CSP) is the problem of finding an assignment to a set of variables that satisfies a set of constraints over the domains of those variables. The prepositional satisfiability problems (SAT) is a special case of CSP where the domain of each variable is either true or false. Also 3-SAT is a special case of SAT where each constraint contains three variables. The MBO algorithm was applied to a hundred different 3-SAT problems and the experimental results conducted that the algorithm was very successful. The heuristics that workers use was Greedy SAT (GSAT) and random walk. At the experimental studies GSAT, random walk, MBO with GSAT and MBO with random walk were compared and MBOGSAT performed the best among the other three. Abbass (2001b) presented a variation of the MBO algorithm which was first proposed by Abbass (2001a) where the colony contains a single queen with multiple workers. For the workers six different heuristics were used: GSAT, random walk, random flip, random new, 1-point and 2-point crossover. The algorithm was tested on a group of one-hundred hard 3SAT problems. The best results were occurred with the smallest colony size and average spermatheca size. On the other hand, the fittest worker was GSAT, which was followed by random walk. It was also showed that MBO performed better than GSAT alone although GSAT was the heuristic with the highest fitness in MBO. Abbass (2001c) analyzed the marriage behaviour of honey bees again as the continuation of the work (Abbass, 2001a). The difference between these studies was the number of queens and workers. Abbass (2001c) considered the honey bee colony with more than one queen in addition to a group of workers, where at the colony of Abbass (2001a) there was only one queen and one worker. In the paper MBO algorithm was applied to fifty different 3-SAT problems containing 50 variables and 215 constraints. The experimental results concluded that the largest spermatheca size, an average colony size, and the smallest number of queens gave the best performance. On the other hand the algorithm was compared with WalkSAT, one of the state-of-the-art algorithms for SAT, and MBO algorithm outperformed WalkSAT. Teo and Abbass (2001) presented a modification of MBO algorithm which can be considered as an extension of Abbass (2001a) and Abbass (2001c). The purpose of this modification was to use a more conventional annealing approach during the trajectory acceptance decision to guide the search process towards a more optimal solution space. New trajectories were only Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 127 be accepted as a potential drone for mating if it was a more optimal trajectory that was if the trajectory was fitter than the queen's genotype. Otherwise, if it was a trajectory that takes the search to a less optimal solution space, then it is only accepted probabilistically subject to the new annealing function. In other words, rather than accepting all the trajectories created during a queen's flight as in the original MBO algorithm, a new trajectory is accepted only if it is a move to a fitter solution space. Otherwise, the algorithm will accept a transition to a less optimal solution space probabilistically according to a function of the queen's fitness. On the other hand, five different heuristics were used for improving broods by workers: GSAT, random walk, probabilistic greedy, one point crossover, and WalkSAT. As in Abbass (2001a) Teo and Abbass again considered the honey bee colony with only one queen. Experimental studies were conducted in three manner: testing each of five different heuristics working alone without MBO, testing the performance of each heuristic with the original MBO and modified MBO, and lastly testing the proposed algorithm against the original MBO using the five different heuristics operating in combination as a committee of heuristics. For the test problems, ten different 3-SAT problems were generated each comprising of 1075 constraints and 250 variables. The heuristic performance's resulted with the following order for the first group of experiments: WalkSAT, GSAT, random walk, probabilistic greedy and one point crossover. At the second group of experiments both the original and proposed annealing functions used during the mating flight process were similarly efficient with all heuristics. However, the effectiveness of MBO with WalkSAT in finding solutions was improved slightly by the new annealing function as the proposed version of MBO found more solutions than the original version. Lastly at the third group of experiments both annealing strategies were again similarly efficient. Teo and Abbass (2003) proposed another modification of MBO algorithm based on Teo and Abbass (2001). In both Abbass (2001a) and Teo and Abbass (2001), the annealing function used the queen's fitness as the basis for accepting/rejecting a transition in the drone's space, either during the spawning or mating stage. In a conventional simulated annealing approach, the previous state was used as the basis for the transition. Moreover, from a biological point of view, the drone's creation is independent of the queen as they usually come from another colony, although they might be related. Therefore, it is more natural to accept a transition based on the drone's own fitness. As a result the objective of their paper was to test a purely conventional annealing approach as the basis for determining the pool of drones. The performance of the modified algorithm was tested on ten different 3-SAT problems and compared with the previous versions of MBO. All heuristics were failed to find even a single solution when working alone whereas their performances were improved significantly when combined with MBO. On the other hand the proposed version of MBO dominated the previous studies and able to find solutions for problems where the previous versions cannot. Bozorg Haddad and Afshar (2004) benefited from MBO algorithm based on the study of Abbass (2001c) and performed an application to water resources management problems. The algorithm was modelled to find good solutions for optimum management of a single reservoir. The results compared very well with similar heuristic methods as well as global optimal results. Bozorg Haddad et al. (2006) proposed Honey-Bees Mating Optimization (HBMO) algorithm, based on Abbass (2001a, 2001c), to solve highly non-linear constrained and unconstrained real valued mathematical models. The performance of the HBMO was tested on several 128 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization constrained and unconstrained mathematical optimization functions and compared with the results obtained by genetic algorithm. Results from the genetic algorithm and HBMO algorithm converge well with minor improvement in the HBMO solution. Moreover, to illustrate the model application and performance, the HBMO algorithm was also used for developing an optimum operation policy for a single reservoir. The HBMO again generated a significantly better solution. Chang (2006) gave the first demonstration of the capability of the MBO approach in a theoretical perspective for solving combinatorial optimization problems and stochastic sequential decision making problems. The paper first concerned with MBO algorithm for solving non-stochastic combinatorial optimization problems and proved that MBO has the ability to converge to the global optimum value. MBO was then adapted into an algorithm called "Honey-Bees Policy Iteration" (HBPI) for solving infinite horizon discounted cost stochastic dynamic programming (SDP) problems, also known as markov decision processes (MDPs) and HBPI algorithm was also proved converging to the optimal value. Chang (2006) points out that MBO can be considered as a hybrid scheme of simulated annealing and genetic algorithm. Simulated annealing corresponds to the queen's mating flight to obtain the potential drone sperms in her spermatheca and genetic algorithm corresponds to broods generation and improvements step with some differences. Afshar et al. (2007) presented an improved version of the HBMO algorithm for continuous optimization problems and its application to a nonlinear-constrained continuous single reservoir problem. By the comparison with global optimum values obtained from LINGO 8.0 NLP solver, it was observed that the convergence of the algorithm to the optimum was very rapid. Fathian et al. (2007) presented an application of HBMO algorithm for clustering which is one of the attractive data mining techniques that is in use in many fields. To evaluate the performance of the algorithm in clustering, it was tested on several real datasets and compared with several typical stochastic algorithms including the ACO algorithm, the simulated annealing approach, the genetic algorithms, and the tabu search approach. The results illustrated that the proposed HBMO approach can be considered as a viable and an efficient heuristic to find optimal or near optimal solutions to clustering problems since the results were very encouraging in terms of the quality of solutions found, the average number of function evaluations and the processing time required. Koudil et al. (2007) adapted MBO algorithm which was first presented by Abbass (2001) to solve integrated partitioning/scheduling problem in codesign. The proposed approach was tested on a benchmark problem and the results were compared with genetic algorithm. The test results showed that MBO achieves good results in terms of solution quality, and it gives better results than genetic algorithm in terms of execution times. Benatchba et al. (2005) used the MBO algorithm which was first presented by Abbass (2001a, 2001b, 2001c) to solve a data mining problem expressed as a Max-Sat problem. For MBO, four different heuristics were used for improving broods by workers: a local search algorithm LS, GSAT, HSAT, and GWSAT. The training set used as benchmark was extracted from a medical one, aiming at analyzing the most revealing symptoms of the presence or not of a laparotomy of the principal bile duct. The best result obtained with MBO was the solution with 96% satisfaction by using GSAT as a worker. Sung (2003) proposed queen-bee evolution to enhance the capability of genetic algorithms. In the queen-bee evolution algorithm the queen-bee crossbreeds with the other bees selected Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 129 as parents by a different selection algorithm instead of known selection algorithms such as roulette wheel selection. This procedure increases the exploitation of genetic algorithms but on the other hand increases the probability of falling into premature convergence. To decrease this probability some individuals were strongly mutated instead of mutating all individuals with small mutation probability as in the normal evolution. The proposed algorithm was tested with one combinational and two typical function optimization problems. Experimental results demonstrated that the proposed algorithm enabled genetic algorithms to quickly approach to the global optimum. Qin et al. (2004) applied queen bee evolution which was proposed by Sung (2003) into economic power dispatch problem (EPD). EPD problem is to minimize the overall cost rate and meet the load demand of a power system simultaneously and formulated as a nonlinear constrained complex optimization problem. The numerical results demonstrated that the proposed algorithm was faster and more robust than the conventional genetic algorithm. Kara (2004) proposed a new crossover type, which is called Bee Crossover to improve the genetic algorithm's performance. The bee queen has the sexual intercourses with other male bees, and similarly a specified chromosome can be considered as bee queen for the first parent of crossover and the other parent is one of the remaining chromosomes in the colony. The author proposed three different crossover types. At the first type, the chromosome with the best fitness value is fixed parent and all the remaining chromosomes are crossed over with this fixed parent at least once in each generation. At the second type, the chromosome with the worst fitness value is a fixed parent and the remaining procedure is the same with the first type. At the third type, population is sorted with respect to the fitness values and the fixed parent in the first generation is determined by the first chromosome in this list. In the second generation, the fixed parent is the second chromosome in the list and so on. The performance of these crossover types were compared with uniform crossover. The results showed that in the most of time, honey bee crossovers obtained results in less number of iterations and the worst results were obtained by uniforms crossover. On the other hand, uniform crossover lost the diversity of population in a small range of time while honey bee crossovers lost the population diversity in the larger ranges of time. Azeem and Saad (2004) proposed a modified queen bee evolution which was first presented by Sung (2003). In the proposed algorithm, if any solution has the fitness very close or above of the fitness of the queen bee, this solution is identified to a new pool as a queen bee where the original algorithm is limited to a single pool. Another difference between the original and proposed algorithm is on the crossover operator. The original algorithm utilizes uniform crossover where each gene is crossed with some probability. On the other hand proposed algorithm uses weighted uniform crossover where weights are assigned to each gene according to the similarity of the test patterns in the population. With this type of crossover, genetic algorithm will search more new state spaces. The algorithm was tested for tuning of scaling factor for the Fuzzy Knowledge Base Controller (FKBC) on two complex non-linear examples. Experiments showed that FKBC yielded superior results than conventional control algorithms in the complex situations where the system model or parameters were difficult to obtain. Moreover, the results were compared with roulettes wheel parent selection and obtained results were encouraging. In the following sections of this work the first application of a nature inspired bee based algorithm (that we name as Artificial Bee Colony, ABC) to generalized assignment problem is presented. 130 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 4. Generalized Assignment Problem The Generalized Assignment Problem (GAP) aims that assigning a set of tasks to a set of agents with minimum cost. Each agent represents a single resource with limited capacity. Each task must be assigned to only one agent and it requires a certain amount of the resource of the agent. There are many application domains of GAP such as computer and communication networks, location problems, vehicle routing, group technology, scheduling etc. Extended review of this problem and its possible applications is presented in Martello and Toth (1981, 1990), Cattrysse (1990) and Cattrysse et al. (1994). Several exact algorithms for GAP have been proposed by Ross and Soland (1975), Fisher et al. (1986), Martello and Toth (1990) and recently Savelsberg (1997) and Nauss (2003). Also several heuristics have been proposed to solve GAP. Martello and Toth (1981, 1990) proposed a combination of local search and greedy method. Osman (1995) developed new Simulated Annealing and Tabu Search algorithms to investigate their performance on GAP. Chu and Beasley (1997) presented a Genetic Algorithm for GAP that tries to improve feasibility and optimality simultaneously. Different variable depth search algorithms (Racer and Amini (1994), Yagiura et al. (1998, 1999)), Ejection Chain based Tabu Search algorithms (Laguna et al. (1995), Diaz and Fernandez (2001), Yagiura et al. (2004)), Path Relinking approaches (Alfandari et al. (2001, 2002, 2004), Yagiura et al. (2001, 2002, 2006)) , Ant Colony Optimization (Randall (2004)), Max-Min Ant System Heuristic based on greedy randomized adaptive heuristic (Lourencp and Serra (2002)) can be mentioned as the other meta-heuristic approaches proposed for GAP in recent years. The aim of this study is to present an artificial bee colony algorithm to solve GAP. Our main interest on this problem came from its NP-hard structure that was proved by Fisher et al. (1986). Moreover, Mortello and Toth (1990) presented the NP-completeness of proving that a solution is a feasible solution. GAP can be formulated as an integer programming model as follows; min ∑∑ c i =1 j =1 ij n m ij xij subject to ∑a i =1 m n xij ≤ b j =1 ∀j , 1 ≤ j ≤ m ∀i, 1 ≤ i ≤ n 1 ≤ i ≤ n ∀i, 1 ≤ j ≤ m ∀j ∑x j =1 ij xij ∈ {0,1} I is set of tasks (i=1,..,n); J is set of agents (j= 1,..,m); bj = resource capacity of agent j; aij = resource needed if task i is assigned to agent j ; cij = cost of task i if assigned to agent j xij = decision variable (xij=1, if task i is assigned to agent j; 0, otherwise) The first constraint set is related to the resource capacity of agents. The second constraint set ensure that each task is assigned to only one agent. Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 131 5. Artificial Bee Colony Algorithm for GAP In this section the general ABC framework and the principal algorithms for the initial solution and neighbour solutions generation for GAP are presented. The general steps of the proposed ABC algorithm are presented in Table 2. Initialize parameters Construct initial Employed Bee Colony solutions by using Greedy Randomized Adaptive Search Heuristic (GRAH) 3. Evaluate fitness value for each bee 4. I=0 5. Repeat 6. N=0 7. repeat a. Apply Shift neighbourhood b. Apply DoubleShift neighbourhood c. Calculate probabilities related to fitness values d. Assign Onlooker Bees to Employed Bees according to probabilities e. For all Onlooker Bees i. Ejection -Chain Neighbourhood f. Find best Onlooker, replace with respective Employed Bee iffit(Best Onlooker)<fit(Employed) g. Find best Feasible Onlooker, replace with Best solution, if fit (BestFeas Onlooker)<fit(Best) h. N=N+1 8. Until (N=Employed Bee) 9. I=I+1 10. Until (I=MaxIteration) 1. 2. Table 2. ABC algorithm for GAP Each step of the general ABC algorithm is detailed in Table 3. 0.Parameter Initialization n = Number of employed bees m = Number of onlooker bees (m>n) Iteration : Maximum iteration number αj : initial value of penalty parameter for jth agent EC-Length : Length of ejection chain neighbourhood 1. Initialize employed bees with GRAH algorithm σ i : ith employed bee in the population 2. Evaluate employed bees Fitness Function (for minimization) mn m n ∑∑ cij xij +α ∑ max0, ∑ bij xij − a j j =1 i =1 j =1 i=1 3. Repeat Cycle = 1 1. Number of Scout bees = 0,1*n 132 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 2. For each Employed Bee a. Apply SHIFT Neighbourhood i. If fit(ShiftNeighbour)<fit(EmployedBee) then 1. Employed Bee = Shift Neighbour b. Apply DOUBLESHIFT Neighbourhood i. If fit(DoubleShiftNeighbour)<fit(EmployedBee) then 1. Employed Bee = DoubleShift Neighbour c. Determine probabilities by using fitness function (for minimization) i fiti Calculate the number of onlooker bees which will be sent to food sources of employed bees, according to previously determined probabilities Ni= Number of onlooker bees sent to ith sites = pi*m Oij: jth onlooker bee of ith solution (j=1,…,Ni) {Oi1, Oi2,…,OiNi}=EjectionChain( σ i ) Calculate fitness values for each onlooker bee If the best fitness value of onlooker bees is better than the fitness value of employed bee, employed bee solution is replaced with this onlooker solution. pi = ∑ 1 fit −1 d. e. f. g. 3. Best Solution If (min (fit(Oij))<fit( σ i ) then σ i = Oij Until (i=n) 4. Scout bees a. Initialize scout bees with GRAH algorithm b. The worst employed bees as many as the number of scout bees in the population are respectively compared with the scout solutions. If the scout solution is better than employed solution, employed solution is replaced with scout solution. Else employed solution is transferred to the next cycle without any change. 5. Cycle = Cycle+1 Until (cycle =Iteration) Table 3. Detailed ABC algorithm for GAP Initial bee colony is constructed by using GRAH algorithm (Lourenço and Serra, 2001). The greedy heuristic constructs a solution as follows: • At each step, a next task to be assigned is selected. • The agent (the selected task is going to be assigned to) is determined. • Repeat these two steps until all tasks have been assigned to an agent. In GRAH procedure the choice is probabilistic bias to a probability function. This function is updated at each iteration in a reinforcement way by using the features of good solutions. The main execution steps of the GRAH algorithm is summarized as shown in Table 4. If fit(BestCycle-1)> Min(Fit( σ i ))i=1..n then BestCycle= σ i Else BestCycle= BestCycle-1 Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 133 1. 2. 3. 4. Let S j =Ø ∀j = 1,..., m (Sj is the set of task assigned to agent j) Construct a list of agents for each task, Li, initially Li={1,…,m} ∀i. Consider any order of the tasks, i=1. While (not all tasks have been assigned) repeat 4.1 Choose randomly an agent j* from Li following the probability function that depends on the resource of agent j and the resource need by task i: a pij = ∑ l∈Li bij , al bil j ∈ Li The agent with minimal cost has greater probability to be chosen. 4.2 Assign task i to agent j * : S * = S * ∪ {i} . Let i=i+1 and if j j ∑ 5. i∈S j * bij* > a j* remove j* from any list. Repeat step 4 (Note that the capacity constraint can be violated). Let σ (i ) = j if i ∈ S j Table 4. The GRAH Algorithm 6. Neighbourhood Structures Shift Neighbourhood: This type of neighbour is obtained from original solution by changing the agent assignment of one task. The algorithm steps are summarized in Table 5. An example implementation of this algorithm is portrayed in Figure 4. Double Shift Neighbourhood: This neighbourhood structure is the special case of the long chain neighbourhood. Since the two shift moves are performed in double shift, this is the (ECLength=2) state of the long chain. Double shift neighbourhood contains the swap neighbourhood, which is the interchange of agents of two different tasks assigned to, within its scope. In the long chain neighbourhood, task for each shift move is selected from B list. In double shift neighbourhood, new shift move is determined by using the set of all tasks. Because, there is no restriction to achieve a new shift move. A simplified demonstration of the neighbourhood is shown in Figure 5. Shift ( σ ) 1. 2. 3. Let If S = {i | i ∈ {1...n}} , k=1, ShiftNeighbour= σ S =Ø then stop; otherwise ik is ejected from σ k . S = S − {ik } Let j* be the agent j that minimizes cikj + α j max{0, 4. 5. 6. 7. ' ∑ a + aikj i∈l ,σ (i ) = j ij − b j } among all agents j ∈ J \ {σ (i k )} . ' Assign ik to j*, output If Fitness( σ )<Fitness (ShiftNeighbor) then ShiftNeighbour = k:= k+1, return to Step 2 Output ShiftNeighbour σ' , calculate Fitness( σ ) σ' Table 5. Shift neighbourhood 134 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Figure 4. Shift neighbourhood structure Figure 5. Double shift neighbourhood structure Long Chain Neighbourhood: A neighbour is obtained by performing the multiple shift moves whose length is specified as chain length. A simple explanation of the neighbourhood structure and main steps of the algorithm are presented here, but detailed information can be obtained from Yagiura et al. (2004). Assume that task io is ejected from agent σ(i0) as a free task where σ(i0) denotes the agent that task i0 is assigned to. The amount of resource of σ(i0) is increased by this ejection move. Avail is defined as the resulting amount of resource as shown in the following equation. ai ,σ ( i ) − pσ ( i ) (σ ) avail (i ) = ai ,σ ( i ) if ai ,σ ( i ) > pσ (i ) (σ ) otherwise Assuming that task i1 is the task whose shift into σ(i0) is most profitable among the tasks satisfying a i1,σ ( i ) ≤ avail (i0 ) Task i1 is shifted into agent σ(i0). This is called as reference 0 Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 135 structure. After this first ejection move, the free task i0 will be tried to assign into some other agents according to its effect on fitness function as shown in Table 6 (Step 4). This is called as the trial move. The next ejection move is applied to the previous reference structure, not to the solutions generated by the trial moves. Same steps are repeated until the stopping criterion is satisfied. The general mechanism of the long chain neighbourhood is presented in Table 6 and portrayed in Figure 6. Long Chain ( σ ) 1. Let S :=Ø . 2. If S =I’, stop; otherwise randomly choose a i0 ∈ I \ S ' , ' Let S := S ∪ {i0} , and σ := σ . (Job i0 is ejected from σ (i0 ) .) 3. Let j* be the agent j that minimizes ci0 j + α j max{0, ∑ a i∈l ,σ (i ) = j ij + a −b } i01 j j among all agents j ∈ J /{σ (i0 )} , and let l:=0. 4. 5. If B (il ) \ {ik k ≤ l} = Ø, return to Step 2; otherwise let l:=l+1 and proceed to Step 5. Randomly choose il ∈ B (il −1 ) \ {ik k ≤ l − 1} and let σ (il ) := σ (il −1 ) ejection move of job il). Then execute the following Steps (a) and (b) (two trial moves). ' (a) Let σ (i0 ) := σ (il ) (i0 is inserted into σ (il ) ), and output σ . ' (b) Let σ (i0 ) := j * (i0 is inserted into i*), and output σ . Return to Step 4. ' ' ' (an 6. Table 6. Long chain neighbourhood structure p j (σ ) = max 0, aij − b j i∈l ,σ (i ) = j ∑ score(i, j ) = −cij + ci ,σ (i ) I ' = k ∈ I ∃h ∈ I s.t. ah,σ ( k ) ≤ avail (k ) and σ (h) ≠ σ (k ) bestscore(i) = min score(k , σ (i)) k ∈ l { } } } { σ (k ) ≠ σ (i ) and ak ,σ (i ) ≤ avail (i ) B(i ) = k ∈ I ' score(k , σ (i)) = bestscore(i ), { σ (k ) ≠ σ (i ) and ak ,σ (i ) ≤ avail (i) As shown in Figure 6, Task 5 is selected as the free task and removed from Agent 2. After avail(TaskS) is updated, Task 13 is determined for the shift move which has the best score among the other tasks satisfying avail(Task5). Task 13 removed from Agent 5 and assigned to Agent 2. This is the reference structure for neighbourhood. In the next step, a trial move 136 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization to assign the free task Task 5 to an agent is determined according to the assignment effect on fitness function value. Assuming that Agent 1 is determined, Task 5 is assigned to that agent to complete the trial move. The result of a trial move is the complete neighbour for the original solution. This neighbour is obtained by applying l=2 (two shift moves) which is also called as double shift neighbourhood. If the length of ejection chain > 2, then the same steps are repeated on the previous reference structure, which is in the case of the free task is not assigned to an agent. In Figure 6, avail(Task!3) is updated and Task 2 is determined for the next shift move. After Task 2 is assigned to Agent 5, a new trial move is performed to assign ejection task. Assuming that the most profitable agent is Agent 2, Task 5 is assigned to Agent 2 to obtain a complete neighbour solution. This is the long chain with length 3 (three shift moves). Same steps are repeated to complete the previously determined length of ejection. Figure 6. Long chain neighbourhood structure (l=3) 7. Computational Study The proposed ABC algorithm is coded in C# and tested in a set of problems ranging from 5 agents-15 tasks to 10 agents-60 tasks. These test problems are publicly available from the www.OR-Library.com. The set of test problems can be divided into two groups: GaplGap6/easy and Gap7-Gapl2/difficult. Each problem set consists of 5 different problems with the same size, so there are 12*5 =60 problems to solve. These set of problems are of maximization form of GAP and optimal values are known. In this section, a simple GAP example is designed to explain the execution of one iteration of the proposed ABC algorithm. An example consisting of 3 agent and 6 task assignment problem is implemented to solve as a minimization problem. A bee solution is represented as an array of tasks which contains the assignment of agents. There are 3 Employed Bees and 5 Onlooker Bees in the example. Initial solutions of bee colony are generated by using the GRAH algorithm. A shift neighbourhood structure is Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 137 applied to each Employed Bee. For Bee 1, after shift neighbourhood, a better solution is obtained by changing the assignment of Task 1 from Agent 2 to Agent 1 and original Bee 1 solution is changed to neighbour solution as shown in Figure 7. In the second step, double shift neighbourhood is applied to new Bee 1. Since there is no solution better than Bee 1, employed bee solution is not changed by this neighbourhood. Shift and Double Shift steps are repeated for Bee 2 and Bee 3. After these steps, a transient bee colony is constituted to determine the probabilities. These probabilities are calculated by using the equation in Table 3 (3.2.c) to determine the number of onlooker bees assigned to each employed bee. As shown in Figure 7, the worst bee (Bee 3) retains the minimum number of onlooker bee. For each employed bee, ejection chain neighbourhood is applied and the quantity of neighbours generated is determined according to the number of onlooker assigned to employed bee. The fitness value of onlooker bees are compared with the original employed bee fitness and the best onlooker is selected as the winner. Updated bee colony for the next iteration is shown in Figure 7. In addition to this updating stage, the best feasible solution among the bee colony is compared to the best solution found so far. If the employed bee is better than the best, the best solution is updated. Experimental Setup for GAP Problems Parameters of proposed algorithm are defined as follows; • Number of employed bees (n) • Number of onlooker bees (m>n) • Number of scout bees (0.1*n) • Maximum iteration number (Iteration) • Initial value of penalty coefficient (aj) • Length of ejection chain neighbourhood (EC-Length) Penalty function is used to calculate the fitness function. While constructing initial solutions by using the GRAH algorithm and generating neighbours by using shift, double shift and ejection chain algorithms, proposed approach allows producing infeasible solutions. Consequently, there is an additional term in the objective function determined by penalizing the infeasible solutions with aj coefficient (aj >0). Fitness function is computed by using the following equation. mn m n fit (σ i ) = ∑ ∑ cij xij + ∑ α j max 0, ∑ bij xij − a j j =1 i =1 i =1 j =1 The first term in the equation denotes the total cost of assignment of tasks to agents. The second term is defined as an additional penalty function for minimization, αj represents the cost of using one unit of overloaded capacity of jth agent. Initial values of αj’s are determined as user defined parameter. If a solution is not feasible the second term will be positive and therefore the search will be directed to feasible solution. If the capacity is not exceeded, this term will be 0 to ensure not penalized. The parameter aj can be increased during the run to penalize infeasible solutions and drive the search to feasible ones which means the adaptive control of penalty costs. Initial values of αj’s are designed as user defined (αj>0). Updating stage is adapted from Yagiura et al. (2004) by using the following equations. After the generation of onlooker neighbours of each employed bee αj values are updated. 138 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Figure 7. A sample execution of neighbourhood structure Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 139 1. If there is no feasible solution found in onlooker neighbours, αj are increased for all j ∈ J by αj = Where inc α j (1 + ∆q j (σ )), inc ∆q j (σ ) min h∈J {bhα h bhα h > 0} / b j , αj >0 othervise stepsizeinc , ∆ = max j∈J q inc (σ ) j 0, 2. if max j∈J q inc (σ ) > 0 j othervise (Otherwise) If at least one feasible solution found within onlooker neighbours, all αj are decreased by using the same equations except that q dec (σ ) instead of q inc (σ ) and stepsizedec instead of stepsizeinc. q j inc (σ ) = p j (σ ) / b j − 1, q j dec (σ ) = 0, if p j (σ ) = 0 othervise Parameter Setting Parameters of algorithm are treated as two different sets. As mentioned before Gapl to Gap6 problem sets are specified as easy while Gap7 to Gapl2 as difficult. Accordingly, two different parameter sets are determined as shown in Table 7. Parameter # of Iteration # of Employed Bee # of Onlooker Bee # of Scout Bee α EC-Length Table 7. Parameter setting Five runs for each problem are evaluated. Different algorithms that solved Gapl-Gapl2 in the literature are determined for comparison. The values in Table 8 represent the mean deviation from the optimal value for each problem set. Proposed algorithm found the optimal solutions in all five runs for all problem sets with previously defined parameters. As compared to other 12 algorithms the proposed algorithm is unambiguously the best performer. Gapl-Gap6 100 50 100 5 1 5 Gap7-Gapl2 250 50 500 5 1 10 140 ABC MTH FJVBB Swarm Intelligence: Focus on Ant and Particle Swarm Optimization FSA MTBB SPH LT1FA RSSA TS6 TS1 GAk GA, ASH+LS +TS Gapl 0.00 5.43 0.00 0.00 0.00 0.08 1.74 0.00 0.00 0.00 0.00 0.00 Gap2 0.00 5.02 0.00 0.19 0.00 0.11 0.89 0.00 0.24 0.10 0.00 0.01 Gap3 0.00 2.14 0.00 0.00 0.00 0.09 1.26 0.00 0.03 0.00 0.00 0.01 Gap4 0.00 2.35 0.83 0.06 0.18 0.04 0.72 0.00 0.03 0.03 0.00 0.03 Gap5 0.00 2.63 0.07 0.11 0.00 0.35 1.42 0.00 0.04 0.00 0.00 0.10 Gap6 0.00 1.67 0.58 0.85 0.52 0.15 0.82 0.05 0.00 0.03 0.01 0.08 Gap7 0.00 2.02 1.58 0.99 1.32 0.00 1.22 0.02 0.02 0.00 0.00 0.08 0.00 Gap8 0.00 2.45 2.48 0.41 1.32 0.23 1.13 0.10 0.14 0.09 0.05 0.33 0.042 Gap9 0.00 2.18 0.61 1.46 1.06 0.12 1.48 0.08 0.06 0.06 0.00 0.17 0.00 Gap10 0.00 1.75 1.29 1.72 1.15 0.25 1.19 0.14 0.15 0.08 0.04 0.27 0.013 Gap11 0.00 1.78 1.32 1.10 2.01 0.00 1.17 0.05 0.02 0.02 0.00 0.20 0.00 Gap12 0.00 1.37 1.37 1.68 1.55 0.10 0.81 0.11 0.07 0.04 0.01 0.17 0.00 ABC: The Proposed Algorithm, MTH: Martello and Toth (1981) constructive heuristic, FJVBB: Fisher et al. (1986) branch and bound procedure with and upper CPU limit, FSA: Cattrysse (1990) fixing simulated annealing algorithm, MTBB: Martello and Toth (1991) branch and bound procedure with an upper CPU limit, SPH: Cattrysse et al. (1994) set partitioning heuristic, LT1FA: Osman (1995) long term descent, 1-interchange mechanism and first admissible, RSSA: Osman (1995) hybrid SA/TS with different seed values, TS6: Osman (1995) long term TS, BA selection, Rl tabu restrictions and Al aspiration criterion, TS1: Osman (1995) long term TS, FA selection, Rl tabu restrictions and Al aspiration criterion, GAi>: Chu and Beasley (1997) genetic algorithm with heuristic operator, GAa: Chu and Beasley (1997) genetic algorithm without heuristic algorithm Table 8. Comparison of results 8. Conclusion In this study a relatively new member of swarm intelligence family that is named as "artificial bee colony" is explained in detail. Actually, different names were used in the literature for the algorithms inspired from natural honey bees. Here we prefer to use the name "artificial bee colony" to reflect population characteristic of the algorithm. A very detailed literature review along with a categorization is presented in this study. All accessible previous work on bee based optimization algorithms is tried to be reviewed. Most of the work in the literature is carried out in last two years and researchers mainly concentrated on continuous optimization and TSP problems. Previous work has presented that bee inspired algorithms have a very promising potential for modelling and solving complex optimization problems. But there is still a long way to go in order to fully utilise the potential of bee inspired algorithms. Such an attempt is also made in this study to present performance of a bee inspired algorithm, "artificial bee colony" on a NP-hard problem which is known as generalised assignment problem. The proposed bee algorithm is found very effective in solving small to medium sized generalized assignment problems. Actually, the proposed algorithm easily found all optimal solutions where the compared 12 algorithms were not able to find for most of the cases. Our research is still under progress and we are hoping to find effective solutions for large size and tightly constrained generalised assignment problems. These problems are over complex, therefore their solution can be considered as a very good indicator for the potential of the nature inspired algorithms including "artificial bee colony". Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 141 9. Acknowledgements The first author is grateful to Turkish Academy of Sciences (TUBA) for supporting his scientific studies. 10. References Abbass H.A., A Single Queen Single Worker Honey-Bees Approach to 3-SAT, GECCO2001 The Genetic and Evolutionary Computation Conference, San Francisco, USA, 2001a. Abbass H.A., A Monogenous MBO Approach to Satisfiability, CIMCA'2001 International Conference on Computational Intelligence for Modeling, Control and Automation, Las Vegas, NV, USA, 2001b. Abbass H.A., MBO: Marriage in Honey Bees Optimization A Haplometrosis Polygynous Swarming Approach, CEC2001 Proceedings of the Congress on Evolutionary Computation, Seoul, Korea, 207-214,2001c. Afshar A., Bozorg Haddad O., Marino M.A., Adams B.J., Honey-Bee Mating Optimization (HBMO) Algorithm for Optimal Reservoir Operation, Journal of the Franklin Institute, In press. Alfandari L., Plateau A., Tolla P., A Two-Phase Path Relinking Algorithm for the Generalized Assignment Problem, In Proceedings of the Fourth Metaheuristics International Conference, Porto, Portugal, 175-179,2001. Alfandari L., Plateau A., Tolla P., A Two-Phase Path Relinking Algorithm for the Generalized Assignment Problem, Technical Report No: 378, CEDRIC, CNAM, 2002. Alfandari L., Plateau A., Tolla P., A Path Relinking Algorithm for the Generalized Assignment Problem, In M.G.C. Resende, J.P. de Sousa (Eds.), Metaheuristics: Computer Decision-Making, Kluwer Academic Publishers, Boston, 1-17,2004 Azeem M.F., Saad A.M., Modified Queen Bee Evolution Based Genetic Algorithm for Tuning of Scaling Factors of Fuzzy Knowledge Base Controller, IEEE INDICON 2004 Proceedings of the India Annual Conference, 299-303,2004. Basturk B., Karaboga D., An Artificial Bee Colony (ABC) Algorithm for Numeric Function Optimization, IEEE Swarm Intelligence Symposium 2006, Indianapolis, Indiana, USA, 2006. Baykasoğlu A., Goal Programming using the Multiple Objective Tabu Search, Journal of Operational Research Society, 52(12), 1359-1369,2001. Benatchba K., Admane L., Koudil M., Using Bees to Solve a Data Mining Problem Expressed as a Max-Sat One, In Proceedings of IWINAC'2005, International Work Conference on the Interplay between Natural and Artificial Computation, Canary Islands, Spain, 212-220,2005. Bianco G.M., Getting Inspired from Bees to Perform Large Scale Visual Precise Navigation, Proceedings of 2004 IEEE/RSJ International Conference on Intelligent Robots and Systems, Sendai, Japan, 619-624,2004. Bozorg Haddad O., Afshar A., MBO Algorithm, A New Heuristic Approach in Hydrosystems Design and Operation, 1st International Conference on Managing Rivers in the 21st Century, 499-504,2004. Bozorg Haddad O., Afshar A., Mariano M.A., Honey-Bees Mating Optimization (HBMO) Algorithm: A New Heuristic Approach for Water Resources Optimization, Water Resources Management, 20, 661-680,2006. 142 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Cattrysse D., Set Partitioning Approaches to Combinatorial Optimization Problems, Ph.D. Thesis, Katholieke Universiteit Leuven, Centrum Industrieel Beleid, Belgium, 1990. Cattrysse D., Salomon M., Van Wassenhove L.N., A Set Partitioning Heuristic for the Generalized Assignment Problem, European Journal of Operational Research, 72,167174.1994. Chang H.S., Converging Marriage in Honey-Bees Optimization and Application to Stochastic Dynamic Programming, Journal of Global Optimization, 35,423-441,2006. Chong C.S., Low M.Y.H., Sivakumar A.I., Gay K.L., A Bee Colony Optimization Algorithm to Job Shop Scheduling, Proceedings of the 37th Winter Simulation, Monterey, California, 1954-1961,2006. Chu P.C., Beasley J.E., A Genetic Algorithm for the Generalized Assignment Problem, Computers Operations Research, 24,17-23,1997. Diaz J.A., Fernandez E., A Tabu Search Heuristic for the Generalized Assignment Problem, European Journal Operational Research, 132,22-38,2001. Drias H., Sadeg S., Yahi S., Cooperative Bees Swarm for Solving the Maximum Weighted Satisfiability Problem, IWAAN International Work Conference on Artificial and Natural Neural Networks, Barcelona, Spain, 318-325,2005. Fathian M., Amiri B., Maroosi A., Application of Honey-Bee Mating Optimization Algorithm on Clustering, In press. Fisher M.L., Jaikumar R., Van Wassenhove L.N., A Multiplier Adjustment Method for the Generalized Assignment Problem, Management Science, 32,1095-1103,1986. Karaboga D. An Idea Based on Honey Bee Swarm for Numerical Optimization, Technical Report-TR06, Erciyes University, Engineering Faculty, Computer Engineering Department, Turkey, 2005. Kara A., Imitation of Bee Reproduction as a Crossover Operator in Genetic Algorithms, PRICAI 2004, LNAI 3157, C. Zhang, H.W. Guesgen, W.K. Yeap (Eds.), SpringerVerlag, Berlin Heidelberg, 1015-1016,2004. Koudil M., Benatchba K., Tarabet A., Sahraoui E.B., Using Artificial Bees to Solve Partitioning and Scheduling Problems in Codesign, Applied Mathematics and Computation, 186(2), 1710-1722,2007. Laguna M., Kelly J.P., Gonzalez-Velarde J.L., Glover P., Tabu Search for the Multilevel Generalized Assignment Problem, European Journal of Operational Research, 82,176-189.1995. Lemmens N.P.P.M., To Bee or Not to Bee: A Comparative Study in Swarm Intelligence, Master Thesis, Maastricht University, Maastricht ICT Competence Centre, Institute for Knowledge and Agent Technology, Maastricht, Netherlands, 2006. Lourengo H.R., Serra D., Adaptive Search Heuristics for the Generalized Assignment Problem, Mathware and Soft Computing, 9,209-234,2002. Lucic P., Modeling Transportation Problems Using Concepts of Swarm Intelligence and Soft Computing, PhD Thesis, Civil Engineering, Faculty of the Virginia Polytechnic Institute and State University, 2002. Lucic P., Teodorovic D., Bee system: Modeling Combinatorial Optimization Transportation Engineering Problems by Swarm Intelligence, Preprints of the TRISTAN IV Triennial Symposium on Transportation Analysis, Sao Miguel, Azores Islands, 441-445,2001. Luckic P., Teodorovic D., Transportation Modeling: An Artificial Life Approach, ICTAI'02 14th IEEE International Conference on Tools with Artificial Intelligence, 216-223,2002. Artificial Bee Colony Algorithm and Its Application to Generalized Assignment Problem 143 Lucic P., Teodorovic D., Computing with Bees: Attacking Complex Transportation Engineering Problems, International Journal on Artificial Intelligence Tools, 12(3), 375-394,2003a. Lucic P., Teodorovic D., Vehicle Routing Problem with Uncertain Demand at Nodes: The Bee System and Fuzzy Logic Approach, in Fuzzy Sets in Optimization, Editor J.L. Verdegay, Springer-Verlag, Berlin Heidelbelg, 67-82,2003b. Markovic G.Z., Teodorovic D., Acimovic-Raspopovic V.S., Routing and Wavelength Assignment in All-Optical Networks Based on the Bee Colony Optimization, AI Communications - The European Journal on Artificial Intelligence, (in press). Martello S., Toth P., An Algorithm for the Generalized Assignment Problems, Operational Research, ed. J.P. Brans. North-Holland, 589-603,1981. Martello S., Toth P., Knapsack Problems: Algorithms and Computer Implementations, Wiley, New York, 1990. Nakrani S., Tovey C, On Honey Bees and Dynamic Allocation in an Internet Server Colony, Proceedings of 2nd International Workshop on the Mathematics and Algorithms of Social Insects, Atlanta, Georgia, USA, 2003. Nauss R.M., Solving the Generalized Assignment Problem: An Optimizing and Heuristic Approach, INFORMS Journal of Computing, 15,249-266,2003. Osman I.H., Heuristics for the Generalized Assignment Problem: Simulated Annealing and Tabu Search Approaches, OR Spektrum, 17,211-225,1995. Pham D.T., Kog E., Ghanbarzadeh A., Otri S., Rahim S., Zaidi M., The Bees Algorithm – A Novel Tool for Complex Optimisation Problems, IPROMS 2006 Proceeding 2nd International Virtual Conference on Intelligent Production Machines and Systems, Oxford, Elsevier, 2006a. Pham D.T., Otri S., Ghanbarzadeh A., Kog E., Application of the Bees Algorithm to the Training of Learning Vector Quantisation Networks for Control Chart Pattern Recognition, ICTTA'06 Information and Communication Technologies, 1624-1629, 2006b. Pham D.T., Koc E., Ghanbarzadeh A., Otri S., Optimisation of the Weights of Multi-Layered Perceptions Using the Bees Algorithm, Proceedings of 5th International Symposium on Intelligent Manufacturing Systems, Sakarya, Turkey, 38-46,2006c. Pham D.T., Soroka A.J., Ghanbarzadeh A., Kog E., Otri S., Packianather M., Optimising Neural Networks for Identification of Wood Defects Using the Bees Algorithm, IEEE International Conference on Industrial Informatics, 8,1346-1351,2006d. Qin L.D., Jiang Q.Y., Zou Z.Y., Cao Y.J., A Queen-Bee Evolution Based on Genetic Algorithm for Economic Power Dispatch, UPEC 2004 39th International Universities Power Engineering Conference, Bristol, UK, 453-456,2004. Quijano N., Passino K.M., Honey Bee Social Foraging Algorithms for Resource Allocation Theory and Application, American Control Conference, New York City, USA, 2007. Racer M., Amini M.M., A Robust Heuristic for the Generalized Assignment Problem, Annals of Oper. Res., 50,487-503,1994. Randall M., Heuristics for Ant Colony Optimisation Using the Generalised Assignment Problem, In Proceedings of the IEEE Congress on Evolutionary Computation, Portland, Oregon, 2,1916-1923,2004. Ross G.T., Soland P.M., A Branch and Bound Based Algorithm for the Generalized Assignment Problem, Mathematical Programming, 8,91-103,1975. Sato T., Hagiwara M., Bee System: Finding Solution by a Concentrated Search, Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics, 4(C), 39543959,1997. 144 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Savelsbergh M., A Branch-and-Price Algorithm for the Generalized Assignment Problem, Operations Research, 45,831-841,1997. Schmickl T., Thenius R., Crailsheim K., Simulating Swarm Intelligence in Honey Bees: Foraging in Differently Fluctuating Environments, GECCO'05, Washington, DC, USA, 273-274,2005. Seeley T.D., The Wisdom of the Hive, Harvard University Press, Cambridge, MA, 1995. Seeley T.D., Buhrman S.C., Group Decision Making in Swarms of Honey Bees, Behav. Ecol. Sociobiol., 45,19-31,1999. Sung H.J., Queen-Bee Evolution for Genetic Algorithms, Electronic Letters, 39(6), 575-576, 2003. Teo J., Abbass H.A., An Annealing Approach to the Mating-Flight Trajectories in the Marriage in Honey Bees Optimization Algorithm, Technical Report CS04/01, School of omputer Science, University of New South Wales at ADFA, 2001. Teo J., Abbass H.A., A True Annealing Approach to the Marriage in Honey-Bees Optimization Algorithm, International Journal of Computational Intelligence and Applications, 3(2), 199-211,2003. Teodorovic D., Dell'Orco M., Bee Colony Optimization - A Cooperative Learning Approach to Complex Transportation Problems, Advanced OR and AI Methods in Transportation, 51-60,2005. Wedde H.F., Farooq M., Zhang Y., BeeHive: An Efficient Fault-Tolerant Routing Algorithm Inspired by Honey Bee Behavior, Ant Colony, Optimization and Swarm Intelligence, Eds. M. Dorigo, Lecture Notes in Computer Science 3172, Springer Berlin, 83-94,2004. Yagiura M., Yamaguchi T., Ibaraki T., A Variable-Depth Search Algorithm with Branching Search for the Generalized Assignment Problem, Optimization Methods and Software, 10,419-441,1998. Yagiura M., Yamaguchi T., Ibaraki T., A Variable-Depth Search Algorithm for the Generalized Assignment Problem, Vob S, Martello S., Osman I.H., Roucairol C, (Eds.), Meta-Heuristics: Advances and Trends in Local Search Paradigms for Optimization, Kluwer Academic Publishers, Boston, 459-471,1999. Yagiura M., Ibaraki T., Glover P., An Effective Metaheuristic Algorithm for the Generalized Assignment Problem, In 2001 IEEE International Conference on Systems, Man and Cybernetics, pg 242, Tucson, Arizona, 2001. Yagiura M., Ibaraki T., Glover P., A Path Relinking Approach for the Generalized Assignment Problem, In Proceedings of the International Symposium on Scheduling, 105-108,2002. Yagiura M., Ibaraki T., Glover P., An Ejection Chain Approach for the Generalized Assignment Problem, Informs Journal of Computing, 16(2), 131-151,2004. Yagiura M., Ibaraki T., Glover E, A Path Relinking Approach with Ejection Chains for the Generalized Assignment Problem, European Journal of Operational Research, 169,548569,2006. Yang X.S., Engineering Optimizations via Nature-Inspired Virtual Bee Algorithms, IWINAC 2005, LNCS 3562, Yang, J. M. and J.R. Alvarez (Eds.), Springer-Verlag, Berlin Heidelberg, 317-323,2005. Yonezawa Y., Kikuchi T., Ecological Algorithm for Optimal Ordering Used by Collective Honey Bee Behavior, 7th International Symposium on Micro Machine and Human Science, 249-256,1996. 9 Finite Element Mesh Decomposition Using Evolving Ant Colony Optimization Ardeshir Bahreininejad Tarbiat Modares University Iran 1. Introduction Combinatorial optimization problems arise in many areas of science and engineering. Unfortunately, due to the NP (non-polynomial) nature of these problems, the computations increase with the size of the problem (Bahreininejad & Topping, 1996; Topping & Bahreininejad, 1997). Finite Elements (FE) mesh decomposition (partitioning) is a well known NP-hard optimization problem and is used to split a computationally expensive FE mesh into smaller subdomains (parts) for parallel FE analysis. Partitioning must be performed to ensure: • Load balancing: for a mesh idealized using a single element type, then the number of elements in each partition must be the same, and • Inter-processor communication: the partitions must be performed so that the number of nodes or edges shared between the subdomains is minimized to ensure that the minimum inter-processor communication during the subsequent parallel FE analysis is achieved (Topping & Bahreininejad, 1997; Topping & Khan, 1996). Numerous methods have been used to decompose FE meshes (Farhat, 1988; Simon, 1991; Toping & Khan, 1996; Topping & Bahreininejad, 1997). For automatic partitioning of FE meshes, Farhat (1988) proposed a domain decomposition method which is based on a greedy algorithm. The method provides FE mesh partitions in relatively short duration of time. The division of a mesh with respect to assigning a certain number of mesh elements to a mesh partition may be accomplished with simple arithmetic. In this method, the partitions are created sequentially from an overall FE mesh until the number of partitions become equal to the desired number. Each FE element node is assigned a weight factor which is equal to the number of elements connecting to that particular node. The inner boundary of a partition is defined as the common boundary between two partitions. Two elements are considered to be adjacent if they share a vertex (node). The number of elements per partitions is determined by the total number of elements in the mesh, the number of different type of elements used in the mesh (triangular, quadrilateral, etc.), and the number of required partitions. In the case of a single type of elements, it is equal to the ratio between the total number of elements within the mesh and the number of required partitions (Farhat, 1988). Although Farhat’s method provides quick partitioning of FE meshes, the optimality of the mesh partitions with respect to the number of interfaces between adjacent partitions is not 146 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization guaranteed. In addition, the resulting partitions by this method are sensitive to the elements and node numbering of the FE mesh. Hence, for a given mesh topology, different solutions may be found if different node/element numbering of mesh elements are used. Simon’s method (1991) performs recursive bisection of FE mesh and uses eigenvector information to determine the partitions which have an equal number of elements on each side of the bisected mesh and have a minimum inner boundary. The rationale behind using recursive bisection instead of dividing the mesh into N number of partitions in a single step is based upon the following considerations: • It is easier to bisect a graph rather than dividing it into more than two parts. The graph is bisected such that the requirements of load balancing and the minimization of the inner boundary nodes/edges between parts are effectively met for the two partitions. • There is an aspect of parallelism within the recursive bisection. Initially a mesh may be divided into two parts and then each of these parts may be worked upon in parallel to form four partitions of the total mesh under consideration. Hence, the extent of parallelism that may be employed increase exponentially with the increase in the number of recursions. The Simon’s method provides efficient partitions, however the main drawback is the computational cost to reach a desired solution which increases nonlinearly with the increase in the size of the mesh. The Subdomain Generation Methods (SGM) proposed by Topping and Khan (1996) and followed on by Topping and Bahreininejad (1997) presented a technique which incorporates an optimization algorithm (genetic algorithms or Hopfield-type neural network) and a trained multi-layered feedforward neural network based on the backpropagation algorithm (Rumelhart et al., 1986; Pao, 1989; Topping & Bahreininejad, 1997) to decompose FE meshes. The trained backpropagation neural network is used to estimate (predict) the number of elements which will be generated inside every individual element of the (initial) coarse mesh after mesh generation procedure is carried out. The estimated number of elements is incorporated into the optimization algorithm (module) to decompose a coarse FE domain rather than decomposing the fine mesh generated from the refinement of the initial mesh. Ant Colony Optimization (ACO) is a type of algorithm that seeks to model the emergent behaviour observed in ant colonies and utilize this behaviour to solve combinatorial problems (Colorni, et al., 1991; Dorigo & Gambardella, 1997; Bonabeau, et al., 2000; Maniezzo & Carbonaro, 2001). This technique has been applied to several problems, most of which are graph related because the ant colony metaphor can be most easily applied to such types of problems. A hybrid optimization approach is presented here to solve the FE mesh bisection problem. The algorithm incorporates several ACO features as well as local optimization techniques using a recursive bisection procedure. The algorithm was tested on a FE mesh with refined mesh sizes of 27155 triangular elements. The chapter consists of an introduction to the ACO technique in Section 2. Section 3 describes how the ACO concept can be applied to FE mesh bisection. Local optimization techniques have been presented to improve the solution quality of the ACO for FE mesh bisection problem. The predictive ACO bisection approach is described in Section 4 which uses a trained multilayered feedforward neural network based on the backpropagation algorithm. The trained neural network is used to estimate the number of triangular elements that will be generated Finite Element Mesh Decomposition Using Evolving Ant Colony Optimization 147 after FE mesh generation (refinement) is carried out. Section 5 presents a recursive mesh bisection case study using the proposed hybrid ACO and neural networks mesh recursive bisection procedure. This FE mesh is also partitioned using a greedy FE mesh decomposing algorithm proposed by Farhat (Farhat, 1988). The comparison between the obtained results from the proposed hybrid ACO method and Farhat’s greedy algorithm is presented. Finally conclusions are given in Section 6. 2. The Ant Colony Optimization Method The ACO is a heuristic technique that seeks to imitate the behaviour of a colony of ants and their ability to collectively solve a problem. It has been observed (Colorni, et al., 1991; Dorigo & Gambardella, 1997; Bonabeau, et al., 2000; Maniezzo & Carbonaro, 2001) that a colony of ants is able to find the shortest path to a food source. As an ant moves and searches for food, it lays down a chemical substance called pheromone along its path. As the ant travels, it looks for pheromone trails on its path and prefers to follow trails with higher levels of pheromone deposits. If there are two possible paths to reach a food source, as shown in Fig 1, an ant will lay the same amount of pheromone at each step regardless of the path chosen (minor evaporation of pheromone occurs during time). However, it will return to its starting point quicker when it takes the shorter path which contains more pheromone. It is then able to return to the food source to collect more food. Thus, in an equal amount of time, the ant would lay a higher concentration of pheromone over its path if it takes the shorter path, since it would complete more trips in the given time. The pheromone is then used by other ants to determine the shortest path to find food as described in (Dorigo & Gambardella, 1997; Bonabeau, et al., 2000). Figure 1. The pheromone deposition of ants (shown as dots) and their pursuing of the shortest path The ACO technique has been successfully applied to the graph bisection problem by Bui and Strite (2002). They utilized the idea of finding shortest paths and the idea of territorial colonization and swarm intelligence in the ACO algorithms. Kuntz and Snyers (1994) and Kuntz, et al. (1997) applied these concepts to a graph clustering problem. Their algorithm combines the features of the ACO technique with swarm intelligence to form a model which is an artificial system designed to perform a certain task. Their model referred to the 148 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization organisms as animats, (ant agents), reflecting the fact that the system draws ideas from several sources and not just ant colonies. These ideas are important in the graph partitioning problem because the graph can be viewed as territory to be colonized (Bui & Strite, 2002; Bahreininejad, 2004; Bahreininejad & Hesamfar, 2006). The combination of these two ideas of animats following paths and forming colonies is used to solve the FE mesh bisection problem using triangular elements. However, the proposed ACO method can be used for the decomposition any graph based problem. 3. ACO for FE Mesh Bisection The basic foundation of the ACO algorithm is to consider each (triangular) element in the FE mesh as a location that can hold any number of animats. The animats can move around the FE mesh by moving across (triangular) edges shared between two elements to reach a new element. Each animat belongs to one of two species (e.g. species A and B). However, animats of both species follow the same rules. To start the algorithm, an initial number of animats are placed on the FE mesh. Their species and location are chosen randomly. At any point throughout the algorithm, the configuration of animats on the FE mesh constitutes a bisection of the mesh in the following way (Bahreininejad, 2004; Bahreininejad & Hesamfar, 2006). Each element is considered to be colonized by one species. At a given time, it is said to be colonized by whichever species that has the greater number of animats on it. Any ties are recorded and after the colonies of all other elements are calculated, the ties are broken in a random order by assigning the element to the species which results in a lower cut-size (inner boundary between bisections). The set of all elements colonized by species A constitutes A’s colony and likewise the elements colonized by species B form B’s colony. In addition, each element can hold a quantity of pheromone. The two species produce separate types of pheromone, so an amount of A pheromone and/or B pheromone is left on each element. The idea of the algorithm is for each species of animats to form a colony consisting of a set of elements that are highly connected to each other while highly disconnected from the other colony. The result should be two sets of elements that are highly connected amongst themselves, but have few edges going between the two sets. For an individual animat, the goal will be to lay down pheromone when the current element is a good position for animats of its own species and to move to new elements that it wants to add to its species’ colony. If each animat follows these goals, the result will be a partitioning of the elements into two sets of similar size with few edges going between the two sets. A greedy algorithm is also formulated which fine tunes the bisection obtained from the ACO procedure. 3.1 ACO implementation The ACO algorithm is an iterative procedure in which a percentage of animats are activated in each of the iterations. When an animat is activated, it adds an amount of pheromone to the element it is currently residing. It then may die with a certain probability or it may reproduce with a certain probability and it will move to a new element. These operations involve only local information known by the animat. The animat is assumed to know the current time (i.e. iteration number), information about the element it is located at (such as the number and species of other animats on that element), and Finite Element Mesh Decomposition Using Evolving Ant Colony Optimization 149 information about the elements adjacent to its location. The mesh is updated with the new information after the completion every iteration. The algorithm is divided up into S number of sets, each comprised of I number of iterations. After each set is carried out, the configuration of the mesh is forced into a bisection using a greedy algorithm (Bahreininejad, 2004; Bahreininejad & Hesamfar, 2006). During each set, the parameters corresponding to the probabilities for activation, death and reproduction are modified. The parameters are changed in such a way that at the beginning of a set, colonial changes are high and by the end of the set the colonies should converged to a stable configuration. The next set begins at the state where the previous set ended. However, if the animats follow their usual rules too soon, they may not be able to move away from the local optimum that has been reached. Therefore, for all, but the initial set, a shake is performed for a certain number of the first iterations to help move the configuration, or distribution, of animats on the elements away from the solution to which it had prematurely converged as described in (Bui & Strite, 2002; Bahreininejad, 2004; Bahreininejad & Hesamfar, 2006). The shake allows animats to select moves randomly instead of following the normal rules for movement. The length of the shake is changed during the algorithm. The first shake lasts for a fixed number of iterations and for the subsequent shakes, the length decreases linearly until the last set where no shaking occurs. The bisection should come closer to the optimal bisection as the number of iterations increases and consequently shorter and shorter shakes are needed. The length of the shake is given by the following equation: Lshake = Lmax ( Si − 2) + Lmax 2 − Stotal (1) where Lmax is the maximum shake length, Si is the ith set and Stotal is the total number of sets. 3.1.1 Iteration and activation of animats An iteration of the algorithm consists of a percentage of the animats being activated and then performing the necessary operations in parallel. The probability of an animat being activated changes during the set. During the early iterations of a set, more animats are activated. By the end of a set, only a small percentage of the animats are activated in all iterations. The more animats that are activated in a single iteration, the larger the possible change in the configuration will be. The actual probability of activation is a sigmoid-like function given as: a( I I ) = 1+ e ln( 4 ) (2 I i − ( I total +1) ) I total −1 1 (2) where Ii is the iteration number, Itotal is the total number of iterations. To prove the Equation 2, consider the sigmoid function for the backpropagation algorithm activation function (Pao, 1989) given as: a( I I ) = 1 I i −b (3) 1+ e θ 150 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization where b corresponds to the bias of the neural network and θ is the shape factor. Considering the maximum (0.8) and minimum (0.2) values of the activation probability for the first and the Itotal iterations respectively, chosen by the user and replacing them for a( Ii ) in Equation 3, therefore: b −1 θ θ = ln(4) = ln(4) (4) (5) I total − b Using Equations 4 and 5, b and θ are given by: b= I total + 1 2 (6) (7) θ= I total − 1 2(ln(4) ) Replacing Equations 6 and 7 in Equation 3, hence Equation 2 will be obtained. The function starts at a maximum and ends at a minimum. The maximum and minimum values are defined values set by the user in an ACO configuration file. After the activations of animats have been completed, a percentage of the pheromone on each element is evaporated. Bui and Strite (2002) explain that the evaporation prevents pheromone from building up too much and highly populated elements from being overemphasized which in turn prevents the algorithm from converging prematurely. When an animat is activated: • It deposits pheromone on its current element, • It dies or reproduces with a certain probability, • It moves to another element. These operations are performed by the animat using local information to make decisions. 3.1.2 Pheromone The purpose of pheromone is to allow the algorithm to retain a memory of good configurations that have been found in the past. Members of each species deposit their pheromone on an element to indicate that this is a good configuration and more animats of their species should come to this element. The effect of pheromone on the overall performance of the algorithm is to control the animats’ movements prohibiting them to set astray over the optimization domain, In other words, pheromone is used a means to control animats’ movements throughout the algorithm, thus enabling the optimization process to move towards a solution. When an animat is activated, it determines the colonization percentage of its adjacent elements. If the FE mesh element is highly connected to elements colonized by the animat’s species, then the animat knows that this element is a good candidate for being colonized by its own species. The animat then attempts to reinforce this element by depositing a larger amount of its pheromone. However, if the animat determines that the element is not highly connected to elements colonized by its own species, it will lay down less pheromone to discourage more of its Finite Element Mesh Decomposition Using Evolving Ant Colony Optimization 151 species to come to this element. In addition, the animats place lesser amounts of pheromone in the early iterations and more pheromone in later iterations. The reason for this is that, in early iterations more change is needed. This allows the animats to explore more of the search space in the beginning and to exploit more of their current configuration near the end. There is also a limit to the amount of pheromone of each species that can be stored on an element. The limit for the amount of pheromone for an element is the product of the connectivity degree of that element to its adjacent elements and the pheromone limit parameter. This allows densely connected elements to accumulate more pheromone. The formula for the amount of pheromone to be deposited is given as: ph(a, I i ) = acol I i atotal I total (8) where a is the animat, acol is the number of elements adjacent to the animat’s current location which are colonized by the animat’s species, and atotal is the total number of elements adjacent to the animat’s current location. 3.1.3 Death The animat will die with a death probability which is fixed throughout the algorithm. The main purpose of death is to avoid overpopulation of animats. Overpopulation may influence the speed of computations. In addition, death can manipulate the algorithm’s configurations by adding changes to animat’s species. The activation probability changes throughout the set so that early in a set, more animats are activated and therefore more animats die early in the set. The purpose of this is to have shorter life spans in the beginning, which allows more changes in the configuration. Later in the set, the animats are allowed to live longer and thus, there is less change and the solution is able to converge. An animat is removed from the list if it is selected to die. 3.1.4 Reproduction If an animat is not selected for death, the algorithm proceeds to the reproduction step. An animat is selected for reproduction with fixed reproduction probability. However, the number of new animats that are produced depends on time (iterations). In the first iteration of a set, the average number of animats born is βinit and it decreases linearly over time to βfinal in the last iteration of a set. The changing birth rate serves to allow more change in earlier iterations, in which animats live for shorter lengths of time. The number of animats born is defined by: β= −( β final − β init )( I i − 1) (1 − I total ) + β init (9) The actual number of animats born is selected uniformly at random over a range, centered on the average birth rate for the iteration. The number of animats born can be up to βrange more or less than the specified average. The βrange is usually taken as 50 percent (Pao, 1989, Bahreininejad, 2004; Bahreininejad & Hesamfar, 2006). New animats are the same species as their parents. If the element on which the parent is located is colonized by its own species, the newly born animats are all placed on that 152 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization element. However, if the element is colonized by the opposite species, only βstay percent of the offspring animats are placed there. The remaining new animats will be placed on the element to which the parent animat moves in the next step. The justification for this is that, if the parent animat is already at an element populated by its own colony and moves to another element, it should leave its offspring behind to help maintain the majority on that element. If the parent’s species is not in majority, it should take most of its children to the new element in which it is trying to create a colony. However, the parent leaves some of its offspring behind so that some of its species remain at that element (in case that element really should be part of their colony). There are two other constraints on reproduction. First, there is a limit of βlimit to how many offspring an animat can produce during its lifetime. This value is fixed throughout the algorithm and is the same for each animat. Once the limit is reached, the animat can no longer reproduce. This serves to prevent one species from taking over the entire FE mesh and forcing the other species into extinction. Another problem arises when an animat reproduces and places all of its children on its current element. Once one of the children is activated, it will in turn reproduce and deposit more children on the same element before moving. This overemphasizes that element and does not allow the colonies to change much from their original starting configuration. Because of this, animats are not able to reproduce until they have made a fixed minimum number of moves. This ensures that the mesh is explored and that new configurations are created by the reproduction and movement rather than being inhibited by these operations. Therefore, the main aim of reproduction is to encourage the species of animats which have colonized an element. This can influence the rate of convergence of the overall algorithm. 3.1.5 Movement Movement is by far the most important operation the animats perform. The animats’ movement is the main mechanism by which the solution is produced. The animat can move to any element which is connected to its current location by an edge. There are two factors used to select a move from the set of possible moves. For each element to which the animat could move, the connectivity to other elements is examined. The animat should move to an element that is highly connected to other elements colonized by its own species. In addition, the animat should learn from the past and take into account the pheromone that other animats have deposited. Throughout the course of a set, these two factors are weighted differently. Initially, the pheromone is weighted at ωpmin with the weight increasing linearly to ωpmax. Conversely, the connectivity is weighted at ωcmax to begin and decreases linearly to ωcmin. In this way, the configuration of the colonies changes greatly in early iterations and over time, learning is incorporated into the algorithm. These basic factors drive the animats to create colonies of highly connected elements which are highly disconnected from the elements colonized by the opposing species. These factors are the basis of move selection. The probability of moving to an adjacent element is proportional to the two combined factors. Specifically, the factors are combined according to Equation 10 to create a probability of moving to a specific element e. Finite Element Mesh Decomposition Using Evolving Ant Colony Optimization 153 pr ( e ) = cec + pe p + ε (10) where ec is the number of elements adjacent to e that are colonized by the animat’s own species, c is the connectivity weight where ωc min ≤ c ≤ ωc max , ep is the amount of pheromone of the animat’s species on element e, p is the pheromone weight where ω p min ≤ p ≤ ω p max , and ε is a fixed amount added to prevent any probabilities from being zero. The values of c and p are given by the following equations: c= (ωc max − ωc min )( I i − 1) + ωc max 1 − I total (11) p= (ω p max − ωp min )( I i − 1) 1 − I total + ω p max (12) In order to encourage animats to explore more of the FE mesh, the probability of selecting the move which would result in the animat returning to its previous location is reduced. A factor is used and initialized by a defined value and decreases linearly after the completion of each set until it reaches zero in the final set. Therefore, animats move in order to find suitable locations to colonize their species. The movement is aimed to find locations (elements) for colonization so that such locations are highly connected while highly disconnected from the locations of the colonization of other animat’s species. This is the main purpose of the ACO algorithm for partitioning graphs. 3.1.6 Between the sets After each set of iterations, several other operations are performed based on the history of animates activities. First, the algorithm looks for mistakes the animats have made. The algorithm looks for individual elements with a high percentage of their adjacent elements colonized by the opposite species. Therefore an element colonized by spices A having a high percentage of it adjacent elements colonized by species B is swapped to the B colony. Next the algorithm looks for any discontinuities which may be generated during each set. In each set the program swaps the smallest discontinuous colonization of each species. This is carried out using a recursive greedy optimization procedure (Bahreininejad, 2004; Bahreininejad & Hesamfar, 2006) which will be discussed further. As was discussed earlier, any given configuration of animats on the FE mesh does not necessarily induce bisection. Therefore, if one species is colonizing more elements than the other, some elements will be swapped to the other species. The elements to be swapped are selected from the set of border elements, that is, elements that are adjacent to an element of the opposite colony. By changing the colony of only border elements, the algorithm continues in the direction the animats were heading, rather than selecting elements in a region that is completely dominated by one species and creating an irregularity. Elements are selected to be swapped by making the greedy choice from amongst the border elements. This is carried out, for triangular elements, according to the pseudo code procedure shown in Table 1. After each element is selected, the swap is performed and the subsequent choices are made based on the new configuration of the colonies. At this point, the two colonies form bisection and this information is recorded. 154 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization WHILE Number of elements in colony A is not equal to number of elements in colony B DO BEGIN Swap border elements of colony with greater number of elements based on priority rules Priority Rules First, randomly swap elements with two edges in boundary and will result in one edge in boundary after swapping Second, randomly swap elements with one edge in boundary and will result in one edge in boundary after swapping Third, randomly swap elements with one edge in boundary and will result in two edges in boundary after swapping END Table 1. The pseudo rules for the element swap procedure Now, if this was not the final set, the mesh and population is prepared to start a new set by performing two more manipulations. The number of animats on the mesh may differ from the initial number of animats of both species. Usually after a set, the number of animats is higher than the initial number. The problem with this is that, if it continues, the number of animats grows so large that the computations become prohibitively expensive (since a percentage of animats are activated in each of the iterations). To correct this, the number of animats is reduced to the initial number. This is carried out by randomly removing animats until the correct population size is reached. This disruption of the colonies is negligible since each new set begins with a shake anyway. Finally, the number of animats in the two species is equalized. Normally the number of animats in each species is quite close, since the colonies have been forced into bisection. However, this may not always be the case. The bisection may not guarantee that the two species have the same number of animats. To improve this possible problem, animats are added to equalize the number of animats in each species. Usually this is a very small number and thus is not problematic in consideration of the previous operation (reducing the number of animats to the initial number). The new animats are added only to elements where their own species is already in majority. Thus, this operation does not significantly alter the configuration of the colonies; it merely gives added strength to the colonies in which animats are added. Following this operation, a new set is begun. Again, the time (iteration) is initialized and all probabilities relating to time are reset. Therefore, as the animats have converged on a possible solution, starting a new set allows the animats to move away from that solution in expectation of finding a better solution in case this solution was a local optimum. After a total of specified sets have been completed, the solution should represent partitioning with minimum cut-size. 3.2 Greedy algorithm for partition enhancement The ACO algorithm should ensure the minimum cut-size and balanced partitions. However, sometimes discontinuous partitions may be developed where islands of partitions are generated (e.g. a domain is bisected and three partitions are generated where one of the Finite Element Mesh Decomposition Using Evolving Ant Colony Optimization 155 partitions is composed of two separate partitions). A recursive greedy algorithm is used to improve the partition solutions given by the ACO and will swap the smallest generated discontinuity in each set. The algorithm consists of two major parts. Initially, it searches and identifies each discontinuity. This is carried out by means of a recursive procedure which calls itself in order to give an index to an element and all its adjacent elements with similar spices. Therefore, when an element colonized by one of the spices has been given an index, all its adjacent elements with the same species will also get the same index. This scheme is illustrated according to the pseudo code procedure shown in Table 2. The procedure in Table 2 is used by another procedure to index all the mesh elements using different index for each partition. This scheme is shown in Table 3. After that the algorithm will swap the colonization of the smallest generated discontinuity with the colonization of other species in each set. This is carried out according to the pseudo code procedure shown in Table 3. Table 4 presents the pseudo code procedure for the proposed ACO-based algorithm for FE mesh recursive bisection. 3.3 Flying ants Another approach to deal with cases where discontinuous partitions may occur was to assume that ants (animats) are able to fly which agrees with flying ants present in nature. This is especially true when a colony of ants may become localized and surrounded by ants of other colony and ants in the localized colony will find it impossible to search for better places to colonize. Procedure GiveIndex(i) BEGIN index of element i = index FOR k = 1 to Number of adjacent elements of element i IF colonization of adjacent element k = colonization of element i THEN GiveIndex(adjacent element k) END Table 2. The pseudo code for indexing an element of a discontinuity and all its adjacent elements with the same colonization FOR I = 1 to NumElements do IF index of Element i = 0 THEN BEGIN index = index + 1 GiveIndex(i) END Determine the index which refers to a discontinuity with smallest number of elements in each species. Swap the colonization of elements correspond to that index. Table 3. The pseudo rule for indexing all the mesh elements using different indexing scheme and swapping process of the smallest discontinuity 156 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization This brings the idea of using flying ants approach to prevent ants getting stuck in localizations. In this approach, all the animats are capable of flying from the beginning of the optimization. The moving probability is determined using Equation (3) except that all the elements in the mesh are considered. The animats can fly to the element with the highest moving probability in the mesh. However, the animats which already exist in the element with the highest moving probability prior to the arrival of new animats will have to move to the element with the second highest moving probability. This process is carried out by both spices of animats. The animats continue searching for better elements to colonize. 4. Neural Network Predictor The Subdomain Generation Methods (SGM) proposed by Topping and Khan (1996) and followed on by Topping and Bahreininejad (1997) presented a technique which incorporates an optimization algorithm (genetic algorithms or Hopfield-type neural network) and a trained multi-layered feedforward neural network based on backpropagation algorithm. The trained backpropagation neural network is used to estimate the number of elements which will be generated inside every individual element of the coarse mesh after mesh generation procedure is carried out. The estimated number of elements is incorporated into the optimization algorithm to decompose a coarse FE domain rather than decomposing the fine mesh generated from the refinement of the initial mesh. A backpropagation-based multi-layered network with 5-12-8-6-1 (five units in intput layer, 12 units in the first hidden layer, 8 units in the second hidden layer, 6 units in the third hidden layer and finally one unit in the output layer) topology was adopted and trained which is capable of estimating a number up to 1760 triangular elements corresponding to the generated elements after mesh refinement is carried out. The inputs to this network are the three scaled side lengths of each triangular element and the two scaled mesh parameters of each element. The scaling was made using one of the three mesh parameters (Topping & Bahreininejad, 1997). The predicted number of elements generated in each element of the coarse mesh after mesh refinement, is used after the last set is completed. This information is used in a greedy algorithm which forces the solution to a bisection considering the same priority rules presented in Section 3.2. The original SGM method partitions a FE mesh based on the coarse mesh using genetic algorithms (Topping & Khan, 1996). The generated subdomains are then refined individually using adaptive mesh refinement procedure. In most cases, it has been observed that the total number of elements generated by the refinement of individual subdomains may not be the same as the total number of elements generated after the mesh refinement of the initial coarse mesh. The presented method partitions the coarse mesh based on ACO and the SGM neural predictor approach and the resulting subdomains are mapped onto the final refined mesh. Finite Element Mesh Decomposition Using Evolving Ant Colony Optimization 157 BEGIN Randomly add animats to the mesh FOR Set = 1 to S BEGIN FOR iteration = 1 to I BEGIN FOR animat = 1to N BEGIN Activate e(iteration)% of animats Determine degree of species in each element IF animat activated BEGIN Add ph(animat, iteration) pheromone to animat’s location Kill rd% of animats of elements IF animat is not chosen for death BEGIN IF animat meets reproduction criteria BEGIN rr% of animats reproduce ENDIF IF iteration is in shake length BEGIN Move animats randomly ELSE Move based on pheromone and connectivity ENDIF ENDIF ENDIF ENDFOR Evaporate Y% of pheromone ENDFOR Look for mistakes and swap elements Run the greedy algorithm to reduce discontinuities Record the bisection solution Reduce total number of animats to the initial value Equalize the number of animats in each species ENDFOR Return the best solution END Table 4. The pseudo rules for the proposed ACO algorithm for FE mesh decomposition 5. ACO Partitioning Case Study A case study is presented to illustrate the ACO-based optimization approach for recursive FE mesh bisection. The optimization procedure is based on flying ants ACO using the neural 158 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization network predictor. This method was compared with a greedy algorithm for partitioning FE meshes by Farhat. The case study was carried out on a PC with Intel Pentium III 500 MHz processor. Twenty simulation runs were conducted and Table 5 represents the ACO parameters adopted for the final solutions. The computation times were less than 20 seconds for the proposed method and 38 seconds for the Farhat’s method. In this case study, an inverted U-shaped domain shown in Fig 2 was used for partitioning the domain into eight subdomains. Fig 3 represents the resulting partitioned mesh by recursively bisecting the coarse mesh into eight subdomains using the proposed method. Fig 4 represents the partitioning of the refined mesh into eight subdomains using Farhat’s method. Table 6 shows the cut-size and the number of elements in each partition after recursive bisection using the proposed approach. Table 7 shows the result obtained from the mesh decomposition into eight subdomains using Farhat’s method. The imbalance between the actual and the desired number of elements in each generated subdomain using the ACO method is shown in Table 6. Parameter Number of iterations per set Number of sets Maximum shake length Initial number of animats Number of moves needed before an animat can reproduce Maximum number of offspring per animat Average number of animats born in first iteration Expected number of animats born in final iteration Minimum pheromone weight Maximum pheromone weight Minimum connection weight Maximum connection weight Pheromone limit Percentage range from average number of animats born Maximum activation probability Minimum activation probability Death probability Reproduction probability Minimum probability for moving to an element Reduction factor for returning to previous location Percentage of offspring that stay on old location when not colonized Percentage of adjacent elements needed for swap Percentage of animats needed for majority Evaporation rate Value 100 10 5 100 2 10 4 2 0 1 250 500 1000 0.5 0.8 0.2 0.035 0.011 0.1 0.9 0.2 0.75 0.9 0.2 Table 5. Ant colony optimization run-time parameters Finite Element Mesh Decomposition Using Evolving Ant Colony Optimization 159 The load imbalance problem may have occurred from the inaccuracy of the predictive neural network to closely estimate the number of elements which will be generated in a single element of the coarse mesh after mesh refinement is carried out. A better trained neural network may improve the quality of the solutions. Figure 2. The initial mesh with 75 elements and the final refined mesh with 27155 elements Figure 3. The initial coarse mesh and the final mesh devided into 8 subdomains using the proposed method The imbalance of elements shown in Table 6 may not pose a serious threat. In fact, this may be used advantageously on coarse grained parallel networked computers where system 160 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization architecture and the computational load among machines may differ (heterogeneous environment). Figure 4. The the final mesh devided into 8 subdomains using the Farhat’s method where the disjointed subdomains are shown with the arrows On the other hand, Farhat’s method offers the best load balancing results while producing a large number of interfacing edges. In parallel FE computations, the number of interfacing edges imposes a great deal of inter-processor communications. Thus the efficiency of parallel computations can greatly depend of lower cut-size (interfacing edges/nodes) between the subdomains. The proposed ACO method can produce much more appealing cut-sizes which reduces the inter-processor communications during parallel FE computations while producing satisfactory load balancing between partitions. Subd. Number Num. of elements Desired num. of elements Diff. 1 2 3 4 5 6 7 8 3266 3907 3604 3243 3881 3400 3153 2701 3394.375 3394.375 3394.375 3394.375 3394.375 3394.375 3394.375 3394.375 -128.375 512.625 209.625 -151.375 486.625 5.625 -241.375 -693.375 370 Total number of interfacing edges Table 6. Comparison between the desired and the obtained number of elements in each subdomain and the number of interfacing edges using the proposed method Finite Element Mesh Decomposition Using Evolving Ant Colony Optimization 161 Subd. Number Num. of elements Desired num. of elements Diff. 1 2 3 4 5 6 7 8 3395 3395 3395 3395 3395 3395 3395 3390 3394.375 3394.375 3394.375 3394.375 3394.375 3394.375 3394.375 3394.375 0.625 0.625 0.625 0.625 0.625 0.625 0.6255 -4.375 1234 Total number of interfacing edges Table 7. Comparison between the desired and the obtained number of elements in each subdomain and the number of interfacing edges using Farhat’s method 6. Conclusions The application of ant colony optimization using swarm intelligence concepts, in combination with a trained feedforward neural network predictor which estimates the number of elements which will be generated within each element of the (initial) coarse mesh after mesh refinement is carried out, to the recursive bisection of finite elements meshes was described. This algorithm combines the features of the classical ant colony optimization technique with swarm intelligence to form a model which is an artificial system designed to perform a certain task. This model is used to solve the finite elements mesh recursive bisection problem which should ensure the minimum cut-size between bisections while maintaining balanced bisections. A recursive greedy algorithm is also presented to improve the partition solutions given by the ant colony optimization algorithm and will swap the smallest generated discontinuity in each set of partitions. A trained feedforward neural network predictor is used to estimate the number of elements which will be generated within each element of the coarse mesh after mesh refinement is carried out. This information is used to partition a coarse mesh using the proposed method based on the estimated number of elements after mesh refinement is conducted (i.e. partitioning is not carried out on the final refined mesh. The optimization method uses the estimated number of elements which will be generated after mesh generation is carried out and partitions the coarse mesh.) The presented case study demonstrates the efficiency of the proposed method in comparison with a well known mesh decomposing algorithm. The predictive ant colony optimization technique produced good-quality solutions in short period of time. 7. References Bahreininejad, A. & Topping, BHV. (1996). Finite element mesh partitioning using neural networks. Advances in Engineering Software, 27, 103-115 162 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Bahreininejad, A. (2004). A hybrid ant colony optimization approach for finite elements mesh decomposition. Structural and Multidisciplinary Optimization, 28, 5, 307-316 Bahreininejad, A. & Hesamfar, P. (2006). Subdomain generation using emergent ant colony optimization. Computers & Structures, 84, 1719-1728 Bonabeau, E.; Dorigo, M. & Theraulaz, G. (2000). Inspiration for optimization from social insect behavior. Nature, 406, 39–42 Bui, TN. & Strite, LC. (2002). An ant system algorithm for graph bisection. GECCO 2002: Proceedings of the Genetic and Evolutionary Computation Conference, USA, Morgan Kaufmann, 43-51 Colorni, A.; Dorigo, M. & Maniezzo, V. (1991). Distributed optimization by ant colonies. Proceedings of the first European Conference on Artificial Life, USA, 134–142 Dorigo, M. & Gambardella, L. (1997). Ant colony system: a cooperative learning approach to the traveling salesman problem. IEEE Transactions on Evolutionary Computation. 1, 1, 53–66 Farhat, C. (1988). A simple and efficient automatic FEM domain decomposer. Computers and Structures, 28, 5, 579-602 Kuntz, P. & Snyers, D. (1994). Emergent colonization and graph partitioning. Proceedings of the Third International Conference on Simulation of Adaptive Behavior: From Animals to Animats, 494–500 Kuntz, P.; Layzell, P. & Snyers, D. (1997). A colony of ant-like agents for partitioning in VLSI technology. In: Proceedings of the Fourth European Conference on Artificial Life, 417-424 Maniezzo, V. & Carbonaro, A. (2001). Ant colony optimization: an overview. Essays and surveys in metaheuristics, Kluwer Academic Publishers, 21–44 Pao, YH. (1989). Adaptive Pattern Recognition and Neural Networks, Addison-Wesley, USA Rumelhart, DE.; Hinton, GE. & Williams, RJ. (1986). Learning internal representation by error propagation. Parallel distributed processing: explorations in the microstructure of cognition, Rumelhart, DE. & McClelland, JL. (Eds.), MIT Press, USA, 1, 318-362 Simon, H.D. (1991). Partitioning of unstructured problems for parallel processing. Computing Systems in Engineering, 2, 2-3, 135-138 Topping, BHV. & Bahreininejad, A. (1997). Neural Computing for Structural Mechanics, SaxeCoburg, UK Topping, BHV. & Khan, AI. (1996). Parallel Finite Element Computations, Saxe-Coburg, UK 10 Swarm Intelligence and Image Segmentation Sara Saatchi and Chih-Cheng Hung Southern Polytechnic State University USA 1. Introduction Image segmentation plays an essential role in the interpretation of various kinds of images. Image segmentation techniques can be grouped into several categories such as edge-based segmentation, region-oriented segmentation, histogram thresholding, and clustering algorithms (Gonzalez & Woods, 1992). The aim of a clustering algorithm is to aggregate data into groups such that the data in each group share similar features while the data clusters are being distinct from each other. The K-means algorithm is a widely used method used for finding the structure of data (Tou & Gonzalez 1974). This unsupervised clustering technique has a strong tendency to get stuck into local minima when finding an optimal solution. Therefore, clustering results are heavily dependent on the initial cluster centers distribution. Hence, the search for good initial parameters is a challenging issue and the clustering algorithms require a great deal of experimentation to determine the input parameters for the optimal or suboptimal clustering results. Competitive learning model introduced in (Rumelhart & Zipser, 1986) is an interesting and powerful learning algorithm which can be used in unsupervised training for image classification (Hung, 1993). Simple Competitive Learning (SCL), shows stability over different run trials but this stable result is not always the global optima. In fact, in some cases the SCL converges to local optima over all run trials and the learning rate needs to be adjusted in the course of experimentation so that the global optimization can be achieved. There are a number of techniques, developed for optimization, inspired by the behaviours of natural systems (Pham & Karaboga, 2000). Swarm intelligence (SI) including Ant Colony Optimization (ACO) introduced in (Dorigo et al., 1996) and Particle Swarm Optimization (PSO) introduced in (Kennedy & Eberhart, 1995) has been introduced in the literature as an optimization technique. There are several SI approaches for data clustering in the literature which use clustering techniques such as K-means algorithm. In most of these approaches ACO or PSO are used to obtain the initial cluster centers for the K-means algorithm. We propose a hybrid algorithm which combines SI with K-means. We also use the same method to combine SI with SCL. Our aim is to make segmentation results of both K-means and SCL less dependent on the initial cluster centers and learning rate respectively. Hence, their results are more accurate and stabilized by employing the ACO and PSO optimization techniques. This improvement is due to the larger search space provided by these techniques. In addition, our 164 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization methodology of considering both spatial and spectral features of the image helps to produce results with improved accuracy. We have integrated the K-means and simple competitive learning algorithms with ACO in (Saatchi & Hung, 2005) and (Saatchi & Hung, 2006) respectively. In this paper we will study the hybridization of PSO with each of the K-means and the SCL algorithms. A thorough comparison study on ACO-K-means, PSO-K-means, ACO-SCL, PSO-SCL, K-means and SCL algorithms will also be provided. 2. Clustering Algorithms 2.1 K-means The K-means algorithm, first introduced in (McQueen, 1967), is an is an unsupervised clustering algorithm which partitions a data set into a certain number of clusters. The Kmeans algorithm is based on the minimization of a performance index which is defined as the sum of the squared distances from all points in a cluster domain to the cluster center (Tou & Gonzalez, 1974). First K random initial cluster centers are chosen. Then, each sample is assigned to a cluster based on the minimum distance to the cluster centers. Finally cluster centers are updated to the average of the values in each cluster. This is repeated until cluster centers no longer change. Steps in the K-Means algorithm are: Step 1: Initialize K initial cluster centers randomly. Step 2: For each pixel, calculate the distance to the cluster centers and assign the pixel to a cluster which has the minimum distance to its center. Step 3: Calculate the average of the pixel values in each cluster and take them as new cluster centers. Step 4: Repeat steps 2 and 3 until new cluster centers converge to the previous ones. The K-means algorithm tends to find the local minima rather than the global minima. Therefore, it is heavily influenced by the choice of initial cluster centers and the distribution of data. Most of the time the results become more acceptable when initial cluster centers are chosen relatively far apart since the main clusters in a given data are usually distinguished in such a way. If the main clusters in a given data are too close to one another in the feature space, the K-means algorithm fails to recognize these clusters. For its improvement the Kmeans algorithm needs to be enhanced with the optimization technique in order to be less dependent on a given data set and initial cluster centers. 2.2 Simple Competitive Learning Competitive learning model introduced by Rumelhart and Zipser in (Rumelhart & Zipser, 1986) is an interesting and powerful learning algorithm which can be used in unsupervised training for image classification (Hung, 1993). Several different competitive learning algorithms have been proposed by neural network researchers. These algorithms are capable of detecting various features represented in input signals. They have been applied in several different areas such as graph bipartitioning, vector quantization, etc (Hertz & Krogh, 1991). In this section the unsupervised simple competitive learning will be briefly presented. The neural network models are characterized by the topology, activation function and learning rules. The topology of the simple competitive learning algorithm can be represented as a one-layered output neural net. Each input node is connected to each output Swarm Intelligence and Image Segmentation 165 node. The number of input nodes is determined by the dimension of the training patterns. Unlike the output nodes in the Kohonen’s feature map, there is no particular geometrical relationship between the output nodes in the simple competitive learning. In the following development, a 2-D one-layered output neural net will be used. During the process of training, the input vectors are fed into the network sequentially in time. The “trained” classes are represented by the output nodes and the center of each class is stored in the connection weights between input and output nodes. The following algorithm outlines the operation of the simple competitive learning as applied to unsupervised training in (Hung, 1993); Let L denote the dimension of the input vectors, which for us is the number of spectral bands. We assume that a 2-D (N x N) output layer is defined for the algorithm, where N is chosen so that the expected number of the classes is less than or equal to N2. Step 1: Initialize weights wij(t) (i = 1, …, L and j = 1, …, N x N) to small random values. Steps 2 to 5 are repeated for each pixel in the training data set for each iteration. Step 2: Present an input pixel X (t) = (x1,…, xL) at time t. Step 3: Compute the distance dj between xi and each output node using dj = ∑ (x i =1 L i − wij (t )) 2 (1) where i, j, L, wij and xi are similarly defined as in steps 1 and 2. Step 4: Select an output node j* which has the minimum distance. This node is called the best matching unit (BMU) or the winning node. Step 5: Update weights of the winning node j* using wij * (t + 1) = wij * (t ) + Δ (t )( x i − wij * (t )), i = 1, ..., L and 1 ≤ j * ≤ N x N (2) where Δ(t) is a monotonically slowly decreasing function of t and its value is between 0 and 1. Step 6: Select a subset of these N2 output nodes as classes. SCL shows stability over different run trials but this stable result is not always the global optima. In fact, in some cases the SCL converges to local optima over all run trials and the learning rate needs to be adjusted in the course of experimentation so that the global optimization can be achieved. 3. Swarm Intelligence There are a number of techniques, developed for optimization, inspired by the behaviours of natural systems (Pham & Karaboga, 2000). In this study, we employ swarm intelligence, a natural optimization technique for optimizing both K-means and SCL algorithms. 3.1 Ant Colony Optimization The ACO heuristic is inspired by the foraging behaviour of a real ant colony in finding the shortest path between the nest and the food. This is achieved by a deposited and accumulated chemical substance called pheromone by the passing ant which moves towards the food. In its searching the ant uses its own knowledge of where the smell of the food comes from (we call it as heuristic information) and the other ants’ decision of the path toward 166 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization the food (pheromone information). After it decides its own path, it confirms the path by depositing its own pheromone making the pheromone trail denser and more probable to be chosen by other ants. This is a learning mechanism ants possess besides their own recognition of the path. As a result of t this consultation with the ants’ behaviors already shown in searching for the food and returning to the nest, the best path which is the shortest is marked between the location of the nest and the location of the food. Figure 1. Ants finding the shortest path around an obstacle as a result of pheromone concentration It was reported in the literature (Dorigo et al, 1996) that the experiments show when the ants have two or more fixed paths with the same length available from a nest to the food, they eventually concentrate on one of the paths and when the available paths are different in length they often concentrate on the shortest path. This is shown in Figure 1, when an obstacle is placed on the established path of ants, they first wander around the obstacle randomly. The ants going on a shorter path reach the food and return back to the nest more quickly. After a certain amount of time, the shorter path will be reinforced by pheromone. This path eventually becomes the preferred path of the ants (Zheng et al., 2003). ACO uses this learning mechanism for the optimization. Furthermore, in the ACO algorithm, the pheromone level is updated based on the best solution obtained by a number of ants. The pheromone amount that is deposited by the succeeding ant is defined to be proportional to the quality of the solution it produces. For the real ants as shown in Figure 1, the best solution is the shortest path and it is marked with a strong pheromone trail. In the shortest path problem using the ACO algorithm, the pheromone amount deposited is inversely proportional to the length of the path. In their research, Dorigo et al (1996) took the ant system as a colony of cooperating agents for solving the traveling salesman problem (TSP). Considering the short path problem, suppose for any pair of nodes Vi and Vj on the graph G, there is a connection cost attached to the edge (Vi, Vj) and the pheromone trail and heuristic information are stored on the edge. Swarm Intelligence and Image Segmentation 167 The goal of an ACO heuristic is then to find the shortest path on graph G. In ACO heuristic, m artificial ants are normally used to find the best solution. Suppose an ant k is in vertex Vi at certain step i during its search process. This ant selects the connection with the probability (Dorigo et al., 1996): α ⎧ τ ij η ijβ , ⎪ α β = ⎨ ∑ h∈ allowed ( t , I ) τ ih η ih k ⎪ ⎩0, Pijk j ∈ allowed otherwise k (t , I ) (3) where Pkij is the probability of ant k choosing the path (Vi, Vj) from Vi. Parameters τij and ηij are the pheromone and heuristic information assigned to the edge (Vi, Vj) respectively, α and β are constants that determine the relative influence of the pheromone and heuristic information, and allowedk(t, I) is the set of vertices which is allowed to be visited according to problem constraints. Then ant k moves and deposits a pheromone on the trail, which is defined below: ⎧Q ⎪ , if ant k uses connection (Vi ,V j ) in its solution Δτ = ⎨ Lk ⎪0 , otherwise ⎩ k ij (4) where Q is a positive constant and Lk is the cost of the path used by ant k. After all m ants completed their path finding, the pheromone on each edge is updated according to the following formula: k (1 − ρ )τ ij + ∑ Δ τ ij ⇒ τ ij k =1 m (5) where ρ is the evaporation factor (0 ≤ ρ ≤ 1) which causes the earlier pheromones vanish over the iterations. Therefore, as the solution becomes better, the corresponding pheromone have more effect on the next solution rather than the earlier pheromones which correspond to the initial undesired solutions found. This pheromone information will be a guide for the new set of ants. Each time, the current best solution is saved, and this process will be repeated until a termination criterion is met. 3.2 Particle Swarm Optimization The PSO algorithm is inspired by the group behavior of schools of fish, flocks of birds and swarms of insects. As an example, birds are likely to find food in flocks, without knowing its location in advance. It seems that members of the flock buildup their intuition in order to find their nutriment. As sociobiologist E. O. Wilson (Wilson, 1975) has written, in reference to fish schooling, “In theory at least, individual members of the school can profit from the discoveries and previous experience of all other members of the school during the search for food. This advantage can become decisive, outweighing the disadvantages of competition for food items, whenever the resource is unpredictably distributed in patches.” (p. 209) The PSO algorithm consists of a swarm of particles flying through the search space (Kaewkamnerdpong & Bentley, 2005). Each particle’s position is a potential solution to the problem. Each particle’s velocity is modified based on its distance from its personal best 168 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization position and the global best position. In other words the particles move according to their experience and that of their neighbors which yields to the best fitness value. Each particle i maintains the following information (van der Merwe & Engelbrecht, 2003): xi, the current position of the particle, • vi, the current velocity of the particle, • yi, the personal best position of the particle (pbest); the best position visited so far by the particle, and • ŷ, the global best position of the swarm (gbest); the best position visited so far by the entire swarm. The objective function evaluates the positions of the particles. Personal best position (pbest) is then obtained as follows (van der Merwe & Engelbrecht, 2003): ⎧ yi (t ) yi (t + 1) = ⎨ ⎩ xi (t + 1) if f ( xi (t + 1)) ≥ f ( yi (t )) if f ( xi (t + 1)) < f ( yi (t )) (6) where f is the objective function. The global best position (gbest) is obtained as follows (van der Merwe & Engelbrecht, 2003): ˆ y (t ) ∈ { y 0 , y1 ,..., y s } = min{ f ( y 0 (t )), f ( y1 (t )),..., f ( y s (t ))} (7) For each iteration of a PSO algorithm, vi and xi are updated as follows (van der Merwe & Engelbrecht, 2003): ˆ v i ( t + 1) = ω v i ( t ) + c1 r1 ( t )( y i ( t ) − x i ) + c 2 r2 ( t )( y ( t ) − x i (t )) x i ( t + 1) = x i ( t ) + v i ( t + 1) (8) (9) where ω is the inertia weight which serves as a memory of previous velocities. The inertia weight controls the impact of the previous velocity. The cognitive component, yi(t)–xi represents the particle’s own experience as to where the best solution is. The social component, ŷ(t) – xi represents the belief of the entire swarm as to where the best solution is. c1 and c2 are acceleration constants and r1(t) , r2(t) ~ U(0,1) ,where U(0,1) is a random number between 0 and 1. The PSO algorithm is repeated until a termination criterion is reached or the changes in velocity get near to zero. A fitness function is used to evaluate the optimality of the solution. The following algorithm outlines a PSO based image classification (Omran et al., 2002). In this algorithm, a single particle xi represents N cluster means such that xi=(mi1,...,mij,…,miN) where mij represents the j-th cluster centroid vector of the i-th particle. Therefore, a swarm represents a number of candidate cluster centers. The fitness of each set of cluster is measured using: f ( xi , Zi ) = ω1dmax ( Zi , xi ) + ω2 ( zmax − dmin ( xi )) (10) where zmax=2s -1 for an s-bit image; Z is a matrix representing the assignment of pixels to clusters of particle i. Each element zijp indicates if pixel zp belongs to cluster Cij of particle i. The constants w1 and w2 are user defined constants. Also, Swarm Intelligence and Image Segmentation 169 d max ( Z i , x i ) = max { j = 1 ,..., N c ∀ z p ∈ C ij ∑ d (z p , m ij ) / | C ij |} (11) is the maximum average Euclidean distance of particles to their associated clusters and d min ( x i ) = ∀ j1 , j 2 , j1 ≠ j 2 min { d ( m ij1 , m ij 2 )} (12) is the minimum Euclidean distance between any pair of clusters. The algorithm is as follows: Step 1: Initialize cluster centers for each particle randomly. Step 2: For each particle, assign each pixel to a cluster that has the minimum distance to its cluster center. Step 3: Calculate the fitness function for each particle and find the global best solution. Step 4: Update the cluster centers using Eqs. (8) and (9). Step 5: Repeat the procedure until the stopping criterion is reached. 4. Swarm Intelligence and K-means 4.1 The Hybrid ACO-K-means Algorithm We propose a hybrid ACO-K-means algorithm which uses the ACO to improve the performance of the K-means algorithm for clustering. The proposed algorithm starts by choosing the number of clusters and a random initial cluster center for each cluster. ACO plays its part in assigning each pixel to a cluster. This is done according to a probability which is inversely proportional to the distance (similarity) between the pixel and cluster centers and a variable, τ, representing the pheromone level. We define pheromone to be proportional to minimum distance between each pair of cluster centers and inversely proportional to the distances between each pixel and its cluster center. So the pheromone gets larger when the cluster centers are far apart and clusters are more compact (our criterion for best solution), making the probability of assigning a pixel to that cluster high. Pheromone evaporation is considered to weaken the influence of the previously chosen solutions, which are less likely to be desired. Similar to the K-means algorithm, at this stage new cluster centers are updated by calculating the average of the pixels in each cluster and this will be repeated until cluster centers no longer change. But unlike K-means, this algorithm doesn’t stop here. We assume that the clustering job is performed by an ant and there are m ants repeating this job, each with their own random initialization, and they all will end up with a solution. A criterion is defined to find the best solution and the pheromone level is updated accordingly for the next set of m ants as a leading guide. If the termination criterion is satisfied, the algorithm will be terminated. Hence, an optimal solution is obtained. The algorithm starts by assigning a pheromone level τ and a heuristic information η to each pixel. Then each ant will assign each pixel to a cluster with the probability distribution P derived from Eq. (13), (Dorigo et al., 1996): Pi ( X n ) = ∑ [τ i ( X n )]α [ηi ( X n )]β K j =0 (13) β [τ j ( X n )] [η j ( X n )] α 170 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization where Pi(Xn) is the probability of assigning pixel Xn to cluster i, τi(Xn) and ηi(Xn) are the pheromone and heuristic information assigned to pixel Xn in cluster i respectively, α and β are constant parameters that determines the relative influence of the pheromone and heuristic information, and K is the number of clusters. Heuristic information ηi(Xn) is obtained from: ηi ( X n ) = κ CDist( X n , CCi ) * PDist( X n , PCi ) (14) where Xn is the nth pixel, CCi is the ith spectral cluster center and PCi is the ith spatial cluster center. CDist (Xn, CCi) is the Euclidean distance between Xn and CCi , considering the color features of the pixels and PDist (Xn, PCi) is the Euclidean distance between Xn and PCi, considering the position of the pixels on the image. Constant κ is used to balance the value of η with τ. The value for the pheromone level τ assigned to each pixel is initialized to 1 so that it does not have any effect on the probability at the beginning. This pheromone gets larger over the iterations which we describe later. Suppose m number of ants is chosen for clustering an image. Each ant is giving its own clustering solution. After m ants have done their clustering, the current best solution is chosen and the assigned pheromone to this solution is incremented. All the cluster centers are updated using the cluster centers of the current best solution. The next set of ants is inspired from the previous set. In each of the iterations, each one of the m ants search for a solution based on its own heuristic knowledge and the best solution found by the previous m ants. This is repeated a certain amount of times until the overall best solution is obtained. The best solution of the m solutions found in each of iterations is selected according to two factors; Euclidean distance between cluster centers in terms of spectral values (separateness of clusters), and sum of the Euclidean distances between each pixel and its cluster center, in terms of spectral and spatial values (similarity and compactness of each cluster). To choose the best solution: 1) the Euclidean distance between cluster centers in terms of spectral signatures should be large so the clusters are more distinct, 2) the sum of the Euclidean distances between each pixel and its cluster center in terms of spectral signatures should be small so that each cluster becomes more homogeneous, and 3) the sum of the Euclidean distances between each pixel and its cluster center in terms of spatial signatures should be small so that each cluster becomes more compact. To achieve the first one, for each clustering performed by ant k (k = 1,…,m), we compute the distances between every pair of cluster centers and sort these distances. Then we select the minimum distance Min(k). Now we compare all these minimums performed by all the ants, and select the maximum of them [MinMax(k)]. To achieve the second and third, for each clustering performed by ant k we compute the sum of the distances between each pixel and its cluster center, and sort these sums of the distances. Then we select the maximum and compare all these maximums performed by all ants, and select the minimum of them. The second maximum and third maximum of the solutions are compared in the same way and the minimum is selected. Each time a solution is selected it gets an additional vote. The solution with the largest vote is selected as the best solution. After the best solution is found, the pheromone value is updated according to Eq. (15) (Li & Xu, 2003): τi(Xn) ← (1- ρ ) τ i(Xn)+ Σi Δτ i(Xn) (15) Swarm Intelligence and Image Segmentation 171 where ρ is the evaporation factor (0 ≤ ρ ≤ 1) which causes the earlier pheromones vanish over the iterations. Therefore as the solution becomes better, the corresponding pheromone have more effect on the next solution rather than the earlier pheromones which correspond to the initial undesired solutions found. The parameter Δτi(Xn) in Eq. (15) is the amount of pheromone added to previous pheromone by the succeeded ant, which is obtained from: Q * Min ( k ' ) ⎧ if X n is a member of cluster i . ⎪ Δτ i (X n ) = ⎨ AvgCDist ( k ' , i ) * AvgPDist ( k ' , i ) ⎪0 otherwise . ⎩ (16) In Eq. (16), Q is a positive constant which is related to the quantity of the added pheromone by ants. Min(k′) is the minimum distance between every two cluster centers obtained by ant k′ (the winner ant) in spectral feature space. AvgCDist(k′,i) is the average of the spectral Euclidean distances and AvgPDist(k′,i) is the average of the spatial Euclidean distances between all pixels in cluster i and their spectral cluster center and spatial cluster center obtained by ant k′, respectively. Min(k′) causes the pheromone become larger when clusters get more far apart and hence raise the probability. AvgCDist(k′,i) and AvgPDist(k’,i) cause the pheromone become larger when the cluster has more similar pixels and is more compact respectively. In other words, the more the Min(k′) is, the more far apart our clusters are which is desired and the larger the pheromone is. The less the AvgCDist(k′,i) and AvgPDist (k′,i) are, the more similar and compact our clusters are which is desired and the larger the pheromone is. Next, cluster centers are updated using the cluster centers of the best solution. This algorithm is repeated a certain amount of times until the very best solution is obtained. The Hybrid ACO-K-means algorithm is described below: Step 1: Initialize pheromone level assigned to each pixel to 1, the number of clusters to K and number of ants to m. Step 2: Initialize m sets of K random cluster centers to be used by m ants. Step 3: Let each ant, assign each pixel Xn to one of the clusters (i), randomly, with the probability distribution Pi(Xn) given in Eq. (13). Step 4: Calculate new cluster centers; If the new cluster centers are approximately equal to the old ones, go to next step. Otherwise, go to Step 3. Step 5: Save the best solution among the m solutions found. Step 6 Update the pheromone level for each pixel according to the best solution using Eqs. (15) and (16). Step 7: Assign cluster center values of the best clustering solution to the clusters centers of all ants. Step 8: If the termination criterion is satisfied go to the next step. Otherwise, go to Step 3. Step 9: Output the optimal solution. 4.2 The Hybrid PSO-K-means Algorithm As discussed in section 3.2, in the PSO based clustering presented in (Omran et al., 2002) the cluster centers assigned to particles were initialized randomly. Each pixel was distributed to a cluster with minimal Euclidean distance. Then PSO was used to refine the cluster centers using a fitness function. In (van der Merwe & Engelbrecht, 2003) the K-means algorithm was 172 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization applied to feed one particle of the initial swarm and the rest of the swarm were initialized randomly. Then the same algorithm described above is employed. We propose a new hybridization of PSO-K-means algorithm where the K-means is applied to all particles and solutions are evaluated in a way similar to the evaluation used in the proposed ACO-Kmeans algorithm. The proposed PSO-K-means algorithm is presented as follows: Step 1: Initialize the number of clusters to K and number of particles to m. Step 2: Initialize m sets of K random cluster centers to be used by m particles. Step 3: For each particle, let each pixel x belong to a cluster in which it has the smallest Euclidean distance to the centroid. Step 4: Calculate new cluster centers; If the new cluster centers converge to the old ones, go to the next step. Otherwise, go to Step 3. Step 5: Save the best solution found so far performed by each particle. Call it pbest or personal best solution. Step 6: Save the best solution among the m personal best solutions found. Call it gbest or global best solution. Step 7: Update cluster centers of each particle according to the cluster center values of the pbest and gbest solution, using Eqs. (8) and (9). Step 8: If the termination criterion is satisfied go to next step. Otherwise, go to Step 3. Step 9: Output the optimal solution. 5. Swarm Intelligence and Simple Competitive Learning 5.1 The Hybrid ACO-SCL Algorithm We apply the ACO to simple competitive learning algorithm and investigate its performance. Similar to our previous hybrid algorithms described in section 4, the pheromone and heuristic information are defined to satisfy the clustering criteria which include the similarity of data in each cluster, distinction of the clusters and compactness of each cluster. At the end of all iterations, the best solution is selected in the same way as what we used for the ACO-K-means algorithm. The ACO-SCL algorithm is described as follows. Let L denote the dimension of the input vectors, which for us is the number of spectral bands. We assume that a 2-D (N × N) output layer is defined for the algorithm, where N is chosen so that the expected number of the classes is less than or equal to N2. Here weights of the nodes contain cluster center values. Step 1: Initialize the number of clusters to K and the number of ants to m. Initialize pheromone level assigned to each pixel to 1 so that it does not have any effect on the probability using later at the beginning. Step 2: Initialize m sets of K different random cluster centers to be used by m ants. Step 3: Let each ant, assign each pixel Xn to one of the clusters (i), randomly, with the probability distribution Pi(Xn) given in Eq. (13) where heuristic information ηi(Xn) is obtained from Eq. (14). Step 4: For each input pixel the cluster center of the cluster which it belongs to is considered as the BMU. Calculate new cluster centers using: C i (t + 1) ← C i (t ) + Δ (t )( x i − C i (t )), i = 1, ..., L (17) Swarm Intelligence and Image Segmentation 173 where Δ(t) is a monotonically slowly decreasing function of t and its value is between 0 and 1. L is the number of spectral bands. Step 5: Save the best solution among the m solutions found. Step 6: Update the pheromone level for each pixel according to the best solution. The pheromone value is updated according to Eq. (15). Step 7: Assign cluster center values of the best clustering solution to the clusters centers of all ants. Step 8: If the termination criterion is satisfied go to next step. Otherwise, go to Step3. Step 9: Output the optimal solution. 5.2 The Hybrid PSO-SCL Algorithm The PSO-SCL algorithm which combines the PSO and SCL, is described as follows. Let L denote the dimension of the input vectors, which for us is the number of spectral bands. We assume that a 2-D (N × N) output layer is defined for the algorithm, where N is chosen so that the expected number of the classes is less than or equal to N2. Here weights of the nodes contain cluster center values. Step 1: Initialize the number of clusters to K and the number of particles to m. Step 2: Initialize m sets of K different random cluster centers to be used by m particles. Step 3: For each particle, let each pixel x belong to a cluster in which it has the smallest Euclidean distance to the centroid. Step 4: For each input pixel the cluster center of the cluster which it belongs to is considered as the BMU. Calculate new cluster centers using Eq. (17). Step 5: Save the best solution found so far performed by each particle. Call it pbest or personal best solution. Step 6: Save the best solution among the m personal best solutions found. Call it gbest or global best solution. Step 7: Update cluster centers of each particle according to the cluster center values of the pbest and gbest solution, using Eq. (8). Step 8: If the termination criterion is satisfied go to next step. Otherwise, go to Step 3. Step 9: Output the optimal solution. 6. Simulation Results Experimental results from our proposed hybrid algorithms were compared with those of the K-means and the SCL algorithms, and discussed in this section. Since the SCL is very dependent on the learning rate, i.e. ∆(t) in Eq. (17), we performed some experiments on choosing a value for ∆(t). Considering that ∆(t) is a monotonically slowly decreasing function of t and its value is between 0 and 1, we suggest the following formula: Δ(t) = 0.2 tr +1 (18) where t and r denote iteration and a rate which is a constant that we obtained by experiments, respectively. The experiments were performed over 20 run trials on several different images, for r from 10 to 50 incrementing by 10. Two of them reported in this chapter. Experiments showed better results for r = 10. Therefore, the experiment was 174 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization repeated similarly but this time for r from 1 to 10 incrementing by 1. This experiment showed better results for r between 1 and 5. In our experiments r is chosen to be 2. The ACO-K-means and ACO-SCL algorithms were shown to be dependant on parameterization as well. Parameters used in these algorithms, other than r include κ, Q, ρ, α, and β. Parameters α, β and κ are used to keep the values of τ and η in the same order. Parameter Q controls the added amount of pheromone and ρ eliminates the influence of the earlier added pheromone. Considering that r should be between 1 and 5 from the previous experiment, r was chosen to be 2. Evaporation factor was set to be ρ = 0.8. According to the performance of the experiments, parameters κ and Q were shown to have little influence on the results, while α and β were more influential. The parameter values tested were as follows: κ =1000 and 10000, Q =10 and 100, α =0.1 to 50 incrementing by 10, and β =0.1 to 50 incrementing by 10. Each experiment was performed for 20 run trials on each image. There were unacceptable results when β =0.1. There were good results when α =0.1, for images shown here but they were unstable. There were some sets of parameters that still did well for one of the images but not for the other. Knowing that α should be small while β should not be small, we set up another experiment: κ =1000 and 10000, Q =10 and 100, α =0.1 to 2 incrementing by 0.1, β =50 to 5 decrementing by 5. All the results were acceptable but not all of them were stable. So in this experiment stability of the results was examined. Experimental results show that β should not be very large, otherwise it becomes unstable. When β is chosen to be 5 and α is between 0.1 and 2, the result showed to be more stabled. From these sets of experiments, the chosen parameters are as follows: r = 2, ρ = 0.8, α = 2, β = 5, κ = 1000, and Q = 10. The number of ants was chosen to be m = 5. The PSO-K-means and PSO-SCL algorithms also include a set of parameters to be determined empirically. The parameters were chosen as suggested by (van der Merwe and Engelbrecht, 2003) which resulted in good convergence. Parameters were set as follows: c1 , c2 = 1.49 and ω = 0.72. The number of ants was chosen to be m = 10. We examined the proposed hybrid algorithms and compared the results with those of the Kmeans and the SCL algorithms in Figs. 2 to 5. Images used include flamingo, cubes, aurora and river. The number of clusters to be found in all images is 3 except for cubes which is 4. The most dominant results of the algorithms over 20 different run trials are presented. The improvement of the ACO and PSO on the K-means algorithm is obvious in all of the images tested. In cubes, flamingo and Aurora images it can be seen that the K-means algorithm has unstable results and in some cases it misses some clusters while the ACO-K-means and PSO-K-means algorithms are more stable and they clearly recognize the clusters. In the river image the results show that the K-means algorithm can generate stable results and the ACOK-means algorithm seems to be less stable, but it is apparent that even for this image, the ACO-K-means algorithm can improve the classification results. This is also the case with the ACO-SCL and PSO-SCL algorithms as opposed to SCL in Aurora image. Results on Aurora image clearly show that the ACO and PSO algorithms can improve the SCL in cases where the SCL algorithm is trapped into local optima. To further investigate the behavior of the algorithms described, we obtained the classification accuracy percentage of the results on the river image. Each algorithm is run 30 times on the river image, shown in Fig. 5 (a). Then , by comparing the classification results with the ground truth data, shown in Fig. 5 (h), the error matrix for each classified image is calculated. The best, worst and average cases are shown in Fig. 6. The stability of the SCL algorithm over the ACO-SCL and the PSO-SCL Swarm Intelligence and Image Segmentation 175 algorithms can be inferred from this figure. But, as it was stated before in the aurora image this stable result is not always a global optima. Similarly, it can be inferred from Fig. 6 that the K-means algorithm is more stable than the ACO-K-means algorithm in the case of river image. Nevertheless, results of the ACO-K-means algorithm include some very good results with much higher classification accuracy percentage than those of the K-means algorithm. (a) (b1) (b2) (c) (d) (e) (f) (g1) (g2) (g3) Figure 2. The most dominant classified results among 20 runs (a) Original image, (b1 & b2) K-means (c) Hybrid ACO-K-means, (d) Hybrid PSO-K-means, (e) SCL, (f) Hybrid ACO-SCL, (g1, g2, & g3) Hybrid PSO-SCL (a) (b1) (b2) (b3) (b4) (c) (d) (e) (f) (g) Figure 3. The most dominant classified results among 20 runs (a) Original image, (b1, b2, b3 & b4) K-means, (c) Hybrid ACO-K-means, (d) Hybrid PSO-K-means, (e) SCL, (f) Hybrid ACO-SCL, (g) Hybrid PSO-SCL 176 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization (a) (b1) (b2) (c1) (c2) (d) (e) (f) (g) Figure 4. The most dominant classified results among 20 runs (a) Original image, (b1 & b2) Kmeans, (c1 & c2) Hybrid ACO-K-means, (d) Hybrid PSO-K-means, (e) SCL, (f) Hybrid ACOSCL, (g) Hybrid PSO-SCL (a) (b) (c) (d) (e) (f) (g) (h) Figure 5. The most dominant classified results among 20 runs (a) Original image, (b) Kmeans, (c) Hybrid ACO-K-means, (d) Hybrid PSO-K-means, (e) SCL, (f) Hybrid ACO-SCL, (g) Hybrid PSO-SCL, (h) The ground truth data Besides, the stability of the K-means algorithm over the ACO-K-means algorithm inferred from fig. 6, is a particular case, i.e. for the river image. The K-means algorithm is not stable Swarm Intelligence and Image Segmentation 177 in general. In fact in the case of flamingo and cubes, ACO-K-means algorithm produced more stabled results compared to K-means algorithm. Accuracy percentage comparison 80 70 60 accuracy percentage 50 40 30 20 10 0 Best 57.6714 73.1819 59.3386 53.0684 57.4838 53.0472 Avg 57.16168276 59.32477586 56.73025862 53.0684 51.25234483 41.3774069 Worst 56.5216 44.8396 55.3813 53.0684 45.3872 34.1707 K-means ACO-K-means PSO-K-means SCL ACO-SCL PSO-SCL Figure 6. Comparison of the results generated by algorithms using error matrix evaluation on the river image 7. Conclusion Experimental results showed that SI techniques can improve the K-means and the SCL algorithms in recognizing the clusters. The K-means algorithm often fails to realize clusters since it is heavily dependent on the initial cluster centers. The ACO-K-means and PSO-Kmeans algorithms provides a larger search space compared to the K-means algorithm. By employing these algorithms for clustering, the influence of the improperly chosen initial cluster centers will be diminished over a number of iterations. Therefore, these algorithms are less dependent on randomly chosen initial seeds and is more likely to find the global optimal solution. We have also shown that SI can be beneficial to the SCL algorithm. SI can help SCL find the global optima using the same parameter set and learning rate as those used in the SCL and recognize the clusters where the SCL fails to do, in some cases. This can be advantageous since for SCL to find the global optima the learning rate should be adjusted in the course of experimentation. 178 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 8. References Dorigo, M.; Maniezzo, V. & Colorni, A. (1996). Ant system: optimization by a colony of cooperating agents, In: IEEE Transactions on Systems, Man and Cybernetics, Part B, Vol. 26, 1996, pp. 29-41 Gonzalez, R.C. & Woods, R.E. (1992). Digital Image Processing. Addison-Wesley, 1992 Hertz, J.; Krogh, A. & Palmer R.G. (1991). Introduction to the theory of neural computation, Addison-Wesley, Redwood City, 1991 Hung C.C. (1993). Competitive learning networks for unsupervised training, INT. J. Remote Sensing, vol. 14, no. 12, 1993, pp. 2411-2415 Kaewkamnerdpong, B. & Bentley, P.J. (2005). Perceptive Particle Swarm Optimisation: an Investigation, IEEE Swarm Intelligence Symposium, pp. 169-176, Pasadena, CA, USA, June, 2005 Kennedy, J. & Eberhart, R. (1995). Particle Swarm Optimization, In: Proceedings of IEEE International Conference on Neural Networks, pp.1942-1948, 1995 Li, Y. & Xu, Z. (2003). An Ant Colony Optimization Heuristic for Solving Maximum Independent Set Problems, In: Proceedings of the 5th International Conference on Computational Intelligence and Multimedia Applications, pp. 206-211, Xi'an, China, Sept. 2003 McQueen, J.B. (1967). Some Methods of Classification and Analysis of Multivariate Observations, In L. M. LeCam and J. Neyman, editors, Proceedings of the Fifth Berkeley Symposium on Mathematical Statistic and Probability, pp. 281-297, University of California Press, Berkley, CA, 1967 Omran, M.; Salman, A. & Engelbrecht, A.P. (2002). Image Classification Using Particle Swarm Optimization, 2002 Pham, D.T. & Karaboga, D. (2000). Intelligent Optimization Techniques: Genetic Algorithms, Tabu Search, Simulated Annealing and Neural Networks, Springer, 2000 Rumelhart, D.E. & Zipser, D. (1986). Feature discovery by competitive learning, In Parallel Distributed Processing: Explorations in the Microstructure of Cognition, eds. J.L. McClelland & D.E. Rumelhart, MIT Press, Cambridge, M.A., 1986, pp. 151-193 Saatchi, S. & Hung, C.C. (2005). Hybridization of the Ant Colony Optimization with the Kmeans Algorithm for Clustering, Image Analysis, Proceedings Lecture Notes in Computer Science 3540, 2005, pp. 511- 520 Saatchi, S.; Hung, C.C. & Kuo, B.C. (2006). A comparison of the improvement of k-means and simple competitive learning algorithms using ant colony optimization, In Proceedings of the 7th International Conference on Intelligent Technology, Taipei, Taiwan, December, 2006 Tou, J.T. & Gonzalez, R.C. (1974). Pattern Recognition Principles, Addison-Wesley, 1974 van der Merwe, D.W. & Engelbrecht A.P. (2003). Data Clustering Using Particle Swarm Optimization, 2003 Congress on Evolutionary Computation, 2003, pt. 1, Vol.1, pp. 215220 Wilson, E.O. (1975). Sociobiology: the new synthesis, Belk Press, Cambridge, MA, 1975 Zheng, H.; Zheng, Z. & Xiang Y. (2003). The application of ant colony system to image textute classification [textute read texture], In: Proceedings of the 2nd International Conference on Machine Learning and Cybernetics, vol. 3, pp. 1491-1495, Xi'an, China, Nov. 2003 11 Particle Swarm Optimization – Stochastic Trajectory Analysis and Parameter Selection M. Jiang, Y. P. Luo and S. Y. Yang Tsinghua University China 1. Introduction Two important topics in Particle Swarm Optimization (PSO) research filed are trajectory analysis of particles and parameter selection method. Trajectory analysis is important because it can help to determine where the position of each particle is at each evolutionary step, and consequently it can help to clarify the running mechanism of PSO algorithm, so as to explain why and when PSO algorithm can be successful to solve optimization problems. Parameter selection of PSO algorithm is important because the performance of PSO algorithm is sensitive to the chosen parameters. Till now, some research works have been published in literatures to investigate both of these two topics, but unfortunately, the trajectory analysis is based on simplified deterministic algorithms, regardless of the randomness in real PSO algorithm; and the parameter selection is based on experimental results instead of theoretical results. This chapter is proposed to investigate both of these two important topics. In this chapter, the trajectory of particle in a general PSO algorithm is theoretically investigated, considering the randomness thoroughly. For arbitrary dimension d of an arbitrary particle i in the general particle swarm system, the update equations investigated in this chapter are given in Eqs. (1) and (2), where t is the evolutionary step, V is the velocity of particle i, X is the position of particle i, Pi is the history best position found by particle i, and Pg is the history best position found by the total swarm. d d Vid (t + 1) = ωVid (t ) + c1r1di (t )( Pid (t ) − X id (t )) + c2 r2,i (t )( Pg (t ) − X id (t )) , (1) (2) X id (t + 1) = aX id (t ) + bVid (t + 1) By regarding each particle's position on each evolutionary step as a stochastic vector, the general PSO algorithm determined by five-dimensional parameter tuple {ω, c1, c2, a, b} is formally analyzed using stochastic process theory. Because the position of particle at each step is stochastic and can not be determined directly, its expected value and variance are investigated instead of the position itself. To make the analysis possible, the particle swarm is supposed to be in stagnation phase. At the same time, the relationship between convergent speed of particle’s trajectory and parameter sets is studied. Those results give some hints on how the chosen parameters can influence the performance of PSO algorithm, and thus parameter selection guideline is 180 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization given. According to the analysis result, it is believed that parameters {a, b} would only increase the complexity of PSO algorithm without enhancing performance of PSO algorithm, thus it is suggested to fix both of them to be 1 in PSO algorithm. For more details, see Section 4. Then, a set of suggested parameter {ω=0.715, c1=c2=1.7} is given, which is compared against three sets of parameters which are proposed in literatures. The structure of this chapter is as follows. Section 2 overviews related works. Stochastic convergence analysis of the general PSO algorithm is investigated in Section 3. Some parameter selection guidelines are given in Section 4; and a set of parameters is suggested. In Section 5, experiments are conducted to compare different parameter sets. Section 6 concludes this chapter. 2. Related Works Ozcan and Mohan published the first theoretical studies of particle trajectories (Ozcan & Mohan, 1998; Ozcan & Mohan, 1999). In their first study (Ozcan & Mohan, 1998), a simplified PSO system was considered with • one partcle in the swarm, • one-dimensional particles, • Pi=Pg=P keeps constant, • no inertia weight, i.e. ω = 1 , • no stochastic component, i.e. φ1 (t ) = φ1 = c1 ,φ 2 (t ) = φ 2 = c2 for all t. Later, Ozcan and Mohan generalized their findings to a PSO system with multiple, multidimensional particles with Pi and Pg not necessarily the same point (Ozcan & Mohan, 1999). For the more general system, Ozcan and Mohan derived the following particle position update equation (Ozcan & Mohan, 1999): X ij (t ) − ( 2 − φ1 − φ 2 ) X ij (t − 1) + X ij (t − 2) = φ1Pij + φ2 Pgj From Eq. (3), when 0 < φ1 + φ2 < 4 , the following closed form can be easily obtained: X ij (t ) = Λij sin(θij t ) + Γij cos(θij t ) + κ ij (4) (3) where Λ ij , Γij , θij and κ ij are constants derived from the initial conditions and the value of φ1 and φ2 : δ ij = i 4 − (2 − φ1 − φ2 ) 2 Λ ij = 2Vij (0) − (φ1 + φ 2 ) X ij (0) + φ1 Pij + φ2 Pgj (5) (6) δ ij kij = φ1Pij + φ 2 Pgj φ1 + φ 2 (7) (8) Γij = X ij (0) − kij Particle Swarm Optimization – Stochastic Trajectory Analysis and Parameter Selection 181 θij = atan ( δ ij 2 − φ1 − φ2 ) (9) The main conclusion from their work is that particle trajectories follow periodic sinusoidal waves. An optimum is searched by randomly 'catching’ another wave, and manipulating its frequency and amplitude. In addition to this general finding, Ozcan and Mohan studied the trajectories of particles under a number of special cases. For the same simple PSO system as given above, Clerc and Kennedy provided a theoretical analysis of particle trajectories to ensure convergence to a stable point (Clerc & Kennedy, 2002), P= φ1Pi + φ2 Pg φ1 + φ2 (10) the main result of this work is the introduction of the constriction coefficient, which is derived to prevent the velocity to grow out of bounds, with the advantage that, theoretically, velocity clamping is no longer required. In addition, Clerc and Kennedy also studied several different classes of constriction models. As a result of this study, the velocity update equation changes to (Clerc & Kennedy, 2002) Vij (t + 1) = χ [Vij (t ) + φ1 j (t )( Pij (t ) − X ij (t )) + φ2 j (t )( Pgj (t ) − X ij (t ))] where χ is the constriction coefficient calculated as (11) χ= 2κ 2 − φ − φ 2 − 4φ (12) with φ = φ1 + φ2 ≥ 4 and κ [0, 1]. The constant κ controls the speed of convergence. For κ≈0, fast convergence to a stable points is obtained, while a κ≈1 results in slow convergence. Both above two studies consider a simplified PSO system without an inertia weight, i.e. only the simple situation with ω = 1 is studied. van den Bergh analyzed the convergence of the PSO algorithm with inertia weight (van den Bergh, 2001). Considering the velocity and position of a particle at discrete time steps, the following non-homogeneous recurrence relation is obtained: X t +1 = (1 + ω − φ1 − φ2 ) X t − ωX t −1 + φ1Pi + φ2 Pg The characteristic equation corresponding to the recurrence relation is (13) λ2 − (1 + ω − φ1 − φ2 )λ + ω = 0 The solutions to this equation gives the eigenvalues (14) λ1 = λ2 = 1 + ω − φ1 − φ2 + γ 2 1 + ω − φ1 − φ2 − γ 2 (15) (16) 182 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization where γ = (1 + ω − φ1 − φ2 ) 2 − 4ω relation is then given by t X t = k1 + k 2λ1 + k3λt2 (17) For initial conditions X (0) = X 0 and X (1) = X 1 , the explicit closed form of the recurrence (18) where k1 = φ1Pi + φ 2 Pg φ1 + φ 2 (19) (20) (21) k2 = k3 = λ2 ( X 0 − X1 ) − X1 + X 2 γ (λ1 − 1) λ1 ( X1 − X 0 ) + X1 − X 2 γ (λ2 − 1) and X 2 = (1 + ω − φ1 − φ2 ) X 1 − ωX 0 + φ1Pi + φ2 Pg . Note that the above equation assumes that Pi (t ) = Pi and Pg (t ) = Pg for all t. The closed form representation in Eq. (18) therefore remains valid until a better position X (and thus Pi and Pg) is discovered. When a better position is discovered, the above equations can be used again after recalculating the coefficients k1, k2 and k3. van den Bergh only discussed the situation with imaginary eigenvalues, i.e. (1 + ω − φ1 − φ 2 ) 2 < 4ω . He obtained the conclusion that when max λ1 , λ2 < 1 , the particle’s { } position sequence will converge and lim X t = k1 = φ1Pi + φ2 Pg φ1 + φ 2 t → +∞ (22) That means, under the condition that max λ1 , λ2 < 1 , a particle converges to a weighted average of its individual best and global best positions. In the case that φ1 and φ2 are stochastic, the average behavior of the system can then be observed by considering the expected values of φ1 and φ2 (assuming uniform distribution): E[φ1 ] = c1 / 2 , E[φ2 ] = c2 / 2 . Using the expected values, the limit becomes c1Pi + c2 Pg c1 + c2 { } t → +∞ lim X t = = (1 − a) Pi + aPg (23) where a = c2 /(c1 + c2 ) ∈ [0,1] . Furthermore, with experimental analysis, van den Bergh proposed parameter range to satisfy the condition of max λ1 , λ2 < 1 , i.e., ω > (c1 + c2 ) / 2 − 1 . van den Bergh also { } discussed on convergence of particle trajectory with certain parameters, but the Particle Swarm Optimization – Stochastic Trajectory Analysis and Parameter Selection 183 experimental results did not conform to his conjecture. This disagreement was informally explained by stochastic probability. Some other similar results were proposed by Yasuda (Yasuda et al, 2003) and Trelea (Trelea, 2003). Although those results provide insights into how particle swarm system works, all those analysis discard the randomness in the PSO algorithm, and are all based on a simplified deterministic algorithm. Obviously, those analytical results more or less deviate from the real particle swarm system due to the loss of randomness. Recently, researchers have begun to make progress in the analysis of randomness in PSO algorithm. Clerc (Clerc, 2006) mathematically analyzed the stochastic behavior of the particles when the swarm is in stagnation, but he only discussed properties of stochastic coefficients and did not regard the velocity (and position) as stochastic variable, and thus he seemed unaware of the dependent relationship between velocity and the stochastic coefficients. Later, Jiang (Jiang et al, 2007a) extended Clerc’s results by regarding each particle's position on each evolutionary step as a stochastic vector. Then the PSO algorithm was analyzed using stochastic process theory. Some stochastic characteristics (including expected value, variance, and auto-variance) of particle's position are obtained, both in explicit and implicit representations, and corresponding properties are analyzed. Jiang (Jiang et al, 2007b) present the first formal stochastic convergence analysis of the standard particle swarm optimization (PSO) algorithm, which involves with randomness. By regarding each particle's position on each evolutionary step as a stochastic vector, the standard PSO algorithm determined by non-negative real parameter tuple {ω, c1, c2} was analyzed using stochastic process theory. The stochastic convergent condition of the particle swarm system and corresponding parameter selection guidelines were also derived. 3. Stochastic Convergence Analysis of PSO in Stagnation In this section, stochastic convergence analysis of the particle swarm system is conducted, assuming the particle swarm is in stagnation. The particle swarm system is thought to be in stagnation, if arbitrary particle i’s history best position Pi and the total swarm’s history best position Pg keep constant over some time steps. There exist many factors that would influence the convergence property and performance of PSO algorithm, including selection of parameter tuple {ω, c1, c2, a, b}; velocity clamping; position clamping; topology of neighborhood; etc. This chapter focuses on analyzing how the selection of parameter tuple {ω, c1, c2, a, b} would influence the trajectories of particles in the PSO algorithm. Factors such as velocity clamping, position clamping, topology of neighborhood may influence the trajectories of particles, but the discussion of those factors is beyond the scope of this chapter. At the same time, the situation with variable parameter values during evolution is also not discussed here. That means, the PSO algorithm studied here is only determined by fixed real-value parameter set {ω, c1, c2, a, b}. Velocity and position clamping are not considered, and the neighborhood of any particle is the whole swarm. When the particle swarm system is in stagnation, arbitrary Pi and Pg would keep constant over some time steps, then it’s easy to find out that all particles would evolve independently. Thus, only particle i needs to be studied. For i is chosen arbitrarily, the result can be applied to all other particles. At the same time, it appears from Eqs. (1) and (2) that each dimension is updated independently. Thus, without loss of generality, the algorithm 184 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization description can be reduced to the one-dimensional case. By omitting particle and dimension notations, and considering discrete time situation, update equations become: Vt +1 = ωVt + c1r1,t ( Pi − X t ) + c2 r2,t ( Pg − X t ) X t +1 = aX t + bVt +1 (24) (25) It’s obviously that the velocity is only an auxiliary variable, and the position is the real significant variable. By substituting Eq. (24) into Eq. (25), the following non-homogeneous recurrence relation is obtained: X t +1 = (a + ω − c1br1,t − c2br2,t ) X t − aωX t −1 + c1br1,t Pi + c2br2,t Pg (26) From Eq. (26), it’s easy to know that single value of coefficients c1 and b is not important at all. The important factor is the multiple c1b . Coefficient c2 and b share the same relationship. Thus, without loss of generality, we can choose b ≡ 1 if b ≠ 0 . As a matter of fact, when b = 0 , it’s easy to get X id (t + 1) = at +1 X id (0) from Eq. (2), whose convergence condition is a ≤ 1 . This case is not an interesting one, thus it is supposed that b ≠ 0 in following analysis. Thus we can suppose b ≡ 1 , and the iteration equation becomes X t +1 = (a + ω − c1r1,t − c2 r2,t ) X t − aωX t −1 + c1r1,t Pi + c2 r2,t Pg (27) Notice that there exist random numbers in Eq. (27), and that X0, X1 are also random numbers, thus each Xt should be regarded as a random variable, and the iterative process {Xt} should be regarded as a stochastic process. The expectation and variance of each random variable Xt can then be calculated, and the convergence property of the iterative process can be analyzed. 3.1 Convergence analysis of the expectation of particle's position In this subsection, the iteration equation of EXt is obtained, where EXt is the expectation of random variable Xt. Based on the iteration equation, the convergent condition of sequence {EXt} is analyzed. According to Eq. (27), iteration equation of sequence {EXt} can be easily obtained. EX t +1 = (a + ω − c1Pi + c2 Pg c1 + c2 ) EX t − aωEX t −1 + 2 2 (28) The characteristic equation of the iterative process shown in Eq. (28) is λ2 − (a + ω − c1 + c2 ) λ + aω = 0 2 (29) Theorem 1. If and only if conditions −1 < aω < 1 and 2(1 − ω )(a − 1) < c1 + c2 < 2(1 + ω )(1 + a) are satisfied together, iterative process EX = (c1 Pi + c2 Pg ) /[2(1 − ω )(1 − a) + c1 + c2 ] . {EXt} is guaranteed to converge to Particle Swarm Optimization – Stochastic Trajectory Analysis and Parameter Selection 185 Proof: Let ψ = a + ω − (c1 + c2 ) / 2 , the convergent condition of iterative process {EXt} is that the absolute values (or complex modulus) of both eigenvalues λ E1 , λ E 2 are less than 1. That is, ψ ± ψ 2 − 4aω / 2 < 1 . Consider two cases: 1. ψ 2 < 4 aω 2 Here, both eigenvalues are complex numbers, λ E1 max λ1 , λ2 < 1 { } = λE 2 2 = (ψ 2 + 4aω − ψ 2 ) / 4 = aω , so aω > 0 and requires only aω < 1 . Condition (1) itself requires 2(a + ω − 2 aω ) < c1 + c2 < 2(a + ω + 2 aω ) . 2. ψ 2 ≥ 4aω Here, both eigenvalues are real numbers. Condition (2) is satisfied if aω ≤ 0 ; or aω > 0 , and c1 + c2 ≥ 2(a + ω + 2 aω ) or c1 + c2 ≤ 2(a + ω − 2 aω ) . Consider two more cases. ψ <0 Here max λ E1 , λ E 2 < 1 { } requires c1 + c2 < min{2(2 + a + ω ), 2(1 + ω )(1 + a)} . Conditions (2) and (2.1) together lead to 0 < aω < 1 and 2(a + ω + 2 aω ) ≤ c1 + c2 < 2(1 + ω )(1 + a ) ; or −1 < aω ≤ 0 and 2(a + ω ) ≤ c1 + c2 < 2(1 + ω )(1 + a ) ; ψ ≥0 Here max λ E1 , λ E 2 < 1 { } requires c1 + c2 > max{2(ω + a − 2), 2(1 − ω )(a − 1)} . Conditions (2) and (2.2) together lead to 0 < aω < 1 and 2(1 − ω )(a − 1) ≤ c1 + c2 < 2(a + ω − 2 aω ) ; or −1 < aω ≤ 0 and 2(1 − ω )(a − 1) ≤ c1 + c2 < 2( a + ω ) ; Synthesize case (1) and case (2), the guaranteed convergent condition of iterative process {EXt} is −1 < aω < 1 and 2(1 − ω )(a − 1) < c1 + c2 < 2(1 + ω )(1 + a) . When iterative process {EXt} is convergent, the convergent value EX can be calculated using EX = (a + ω − (c1 + c2 ) / 2) EX − aωEX + (c1Pi + c2 Pg ) / 2 . That gets EX = (c1 Pi + c2 Pg ) /[2(1 − ω )(1 − a) + c1 + c2 ] . It’s easy to know that, even if sequence {EX t } can converge, generally speaking, EX ≠ Pg is always true. 3.2 Convergence analysis of the variance of particle's position To further study the convergence property of particle swarm, the variance sequence should be studied. In this subsection, the iteration equation of DXt is obtained, where DXt is the 186 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization variance of random variable Xt. Based on the iteration equation, the convergent condition of sequence {DXt} is analyzed. In order to make the procedure of calculating DXt clear, some symbols should be introduced ϖ = aω , υ = (c1 + c2 ) / 2 , ψ = a + ω −υ , Rt = c1r1, t + c2 r2, t − υ , firstly. Let Qt = c1r1,t Pi + c 2 r2,t Pg , from Eq. (27), it is easy to ontain that X t +1 = (ψ − Rt ) X t − ϖX t −1 + Qt (30) Since r1,t , r2,t are two independent uniform random number ranged in [0,1], it's obvious that ERt = 0 , EQt = (c1Pi + c2 Pg ) / 2 , 2 2 DRt = (c1 + c2 ) / 12 , 2 22 DQt = (c1 Pi2 + c2 Pg ) / 12 , and 2 2 E ( Rt Qt ) = (c1 Pi + c2 Pg ) / 12 . Notice that EQt , DRt , DQt , and E ( Rt Qt ) are all constants, let QE = EQt , R = DRt , QD = DQt , T = E ( Rt Qt ) . If R = 0 , that means c1 = c2 = 0 , which is not an interesting case. Thus we suppose R > 0 in all following discussions . Notice that X t and X t −1 are both independent on Rt and Qt , but X t and X t −1 are dependent. Thus the following expectation can be obtained. 2 EX t2+1 = (ψ 2 + R ) EX t2 + ϖ 2 EX t2−1 + QD + QE − 2ϖψE ( X t X t −1 ) + 2(ψQE − T ) EX t − 2ϖQE ⋅ EX t −1 2 EX t2+ 2 = (ψ 2 + R ) EX t2+1 + ϖ 2 EX t2 + QD + QE − 2ϖψE ( X t +1 X t ) + 2(ψQE − T ) EX t +1 − 2ϖQE ⋅ EX t (31) (32) (33) E ( X t +1 X t ) = ψEX t2 − ϖE ( X t X t −1 ) + QE ⋅ EX t From Eqs. (31)-(33), eliminating E ( X t +1 X t ) and E ( X t X t −1 ) , get EX t2+ 2 + ϖEX t2+1 = (ψ 2 + R)( EX t2+1 + ϖEX t2 ) + ϖ 2 ( EX t2 + ϖEX t2−1 ) 2 + (QD + QE )(1 + ϖ ) − 2ϖψ (ψEX t2 + QE EX t ) + 2(ψQE − T )( EX t +1 + ϖEX t ) - 2ωQ E ( EX t + ϖEX t −1 ) (34) Substitute EX t + 2 = ψEX t +1 − ϖEX t + QE , ϖEX t −1 = ψEX t − EX t +1 + QE and DX t = EX t2 − ( EX t ) 2 into Eq. (34), obtain DX t + 2 = (ψ 2 + R − ϖ ) DX t +1 − ϖ (ψ 2 − R − ϖ ) DX t + ϖ 3 DX t −1 + R ⋅ [( EX t +1 ) 2 + ϖ ( EX t ) 2 ] − 2T ⋅ ( EX t +1 + ϖEX t ) + QD (1 + ϖ ) The characteristic equation of the iterative process shown in Eq. (35) is (35) λ3 − (ψ 2 + R − ϖ )λ2 + ϖ (ψ 2 − R − ϖ )λ − ϖ 3 = 0 (36) The iteration equation and characteristic equation of iterative process {DXt} are both quite complex, and it is hard to analyze these two equations directly. Fortunately, the convergent condition of the iterative process {DXt} defined in Eq. (35) is comparatively simple. Before Particle Swarm Optimization – Stochastic Trajectory Analysis and Parameter Selection 187 discussing convergence property of iterative process {DXt}, we can firstly determine the intervals in which the three eigenvalues of the characteristic equation are located. Let f (λ ) = λ3 − (ψ 2 + R − ϖ )λ2 + ϖ (ψ 2 − R − ϖ )λ − ϖ 3 (37) First of all, consider two special cases. If ϖ = 0 , then two among three eigenvalues are zeros. Without loss of generality, let λD 2 = λ D3 = 0 , then λ D1 = ψ 2 + R > 0 . If ψ = 0 , then λ D 3 = −ϖ and λ D1 , λ D 2 are roots of equation λ2 − Rλ − ϖ 2 = 0 . Since R > 0 , get max{ λ D1 , λ D 2 } = ( R + R 2 + 4ϖ 2 ) / 2 > ϖ . Then 3 min{ λ D1 , λ D 2 } < ϖ must be satisfied due to λ D1λ D 2 λ D3 = ϖ . Next consider two general cases. When R > 0 , ψ ≠ 0 and ϖ > 0 , it is easily verified that f (0) = −ϖ 3 < 0 ; f (ϖ ) = −2ϖ 2 R < 0 ; f ( −ϖ ) = −2ψ 2ϖ 2 < 0 . According to conclusions in elementary mathematics, because f (−ϖ ) , f (0) and f (ϖ ) have the same sign, the number of roots in the interval (−ϖ ,0) and (0,ϖ ) must both be even. Thus there must be at least one root located in interval (ϖ , ∞) to satisfy λ D1λ D 2 λ D3 = ϖ 3 > 0 . When R > 0 , ψ ≠ 0 and ϖ < 0 , it is easily verified that f (0) = −ϖ 3 > 0 ; f (ϖ ) = −2ϖ 2 R < 0 ; f ( −ϖ ) = −2ψ 2ϖ 2 < 0 . Likely, according to conclusions in elementary mathematics, there must be one root located in the interval (ϖ ,0) and one root located in the interval (0,−ϖ ) . The third root must be located in the interval (−ϖ , ∞) to satisfy λ D1λ D 2 λ D3 = ϖ 3 < 0 . Without loss of generality, suppose λ D1 ≥ λ D 2 ≥ λ D3 , then it is clear that relationship λmax D = λ D1 > ϖ ≥ λ D 2 ≥ λ D 3 exists, and λD1 must be a positive real number. Theorem 2. Given R > 0 , if and only if −1 < ϖ < 1 and f (1) > 0 are satisfied together, it is guaranteed that λ max D = max{ λ D1 , λ D 2 , λ D3 } < 1 . Proof: Obviously, If ϖ ≥ 1 , then λ max D > ϖ ≥ 1 , which violate max{ λ D1 , λ D 2 , λ D 3 } < 1 . Thus only cases with −1 < ϖ < 1 needs to be discussed. At this point, if and only if f (1) > 0 , it is guaranteed that λ max D is located in the interval ( ϖ ,1) . □ As a matter of fact, conditions −1 < ϖ < 1 and f (1) > 0 satisfied together implies that 2(1 − ω )(a − 1) < c1 + c2 < 2(1 + ω )(1 + a) . Because f (1) = (1 + ϖ ) 2 (1 − ϖ ) − R (1 + ϖ ) − (1 − ϖ )ψ 2 , then −1 < ϖ < 1 and f (1) > 0 lead to ψ 2 < (1 + ϖ ) 2 − (1 + ϖ ) R /(1 − ϖ ) < (1 + ϖ ) 2 , that is 2(1 − ω )(a − 1) < c1 + c2 < 2(1 + ω )(1 + a) . Theorem 3. Given R > 0 , if and only if −1 < ϖ < 1 and f (1) > 0 are satisfied together, iterative process {DXt} is guaranteed to converge to 188 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 1 (1 + ϖ ) 12 DX = {2c12 c2 2 ( Pg − Pi ) 2 + 4(1 − a )(1 − ω )c1c2 (c2 Pg − c1Pi )( Pg − Pi ) f (1) ⋅ [2(1 − a )(1 − ω ) + c1 + c2 ]2 2 + (c12 Pi2 + c 2 2 Pg )[2(1 − a)(1 − ω )]2 } where f (1) is defined in Eq. (37). Proof : The iteration equation of DXt, Eq. (35), contains items related to EXt, thus the condition shown in Theorem 1 should be satisfied firstly to make DXt convergent. As stated above, −1 < ϖ < 1 and f (1) > 0 implies that 2(1 − ω )(a − 1) < c1 + c2 < 2(1 + ω )(1 + a ) . Thus conditions −1 < ϖ < 1 and f (1) > 0 together make sure that the conditions stated in Theorem 1 are satisfied. After EXt is convergent, the convergent condition of iterative process {DXt} is that the absolute values(or complex modulus) of the three eigenvalues λ D1 , λ D 2 , λ D3 are all less than 1. Theorem 2 proves that, −1 < ϖ < 1 and f (1) > 0 are the necessary and sufficient condition of max{ λ D1 , λ D 2 , λ D3 } < 1 . Thus, −1 < ϖ < 1 and f (1) > 0 together give the necessary and sufficient conditions to guarantee iterative process {DXt} convergent. If iterative process {DXt} is convergent, the convergent value can be easily calculated to be 1 (1 + ϖ ) 12 DX = {2c12 c2 2 ( Pg − Pi ) 2 + 4(1 − a)(1 − ω )c1c2 (c2 Pg − c1Pi )( Pg − Pi ) f (1) ⋅ [2(1 − a )(1 − ω ) + c1 + c2 ]2 2 + (c12 Pi2 + c 2 2 Pg )[2(1 − a )(1 − ω )]2 } It’s easy to know that, even if sequence {DX t } can converge, generally speaking, the convergent value can not reach zero. 4. Parameter Selection Guidelines Holland discussed the balance between exploration and exploitation that an algorithm must maintain (Holland, 1975). Exploration ability is related to the algorithm's tendency to explore new regions of the search space, while exploitation is the tendency to search a smaller region more thoroughly. Researchers in PSO community used to believe that inertia weight ω balances exploration and exploitation in PSO algorithm, but new theoretical results give a different new explanation (Jiang et al, 2007a). It is believed that inertia weight can not balance exploration and exploitation by itself in PSO algorithm. The factor to balance exploration and exploitation should be the value of λmax D . The larger λmax D is, the stronger is the exploration ability of the PSO algorithm. An empirical evidence can be found in (Xie et al, 2004), which shows that the relationship between exploration ability of PSO algorithm and inertia weight ω is not monotone. For more explanation about this matter, please refer to (Jiang et al, 2007a). It is widely accepted that PSO algorithm have a good global search ability, while its finetune ability is relatively weak. That is to say, PSO algorithm can easily locate the good area Particle Swarm Optimization – Stochastic Trajectory Analysis and Parameter Selection 189 of the solution space in which good solutions are located, while the procedure to find the good solutions is not equally easy for PSO algorithm. Thus it is quite important for PSO algorithm to enhance local search ability. While in PSO algorithm determined by fivedimensional parameter tuple {ω, c1, c2, a, b}, generally speaking, the expectation of each particle’s position can never reach Pg, and the variance of particle’s position can never drop to zero. This is not a desired property for PSO algorithm, for this will make the fine-tune ability of PSO algorithm even worse. If (1 − a )(1 − ω ) = 0 , then when Pi is equal to Pg, the expectation of particle’s position will converge to Pg, and the variance of particle’s position will converge to zero. This may help PSO algorithm to enhance fine-tune ability. Without loss of generality, suppose a=1. Then the PSO algorithm reduces to a simpler version totally determined by three-dimensional parameter tuple {ω, c1, c2}. For this simpler version, the following two corollaries apply. Corollary 1. For PSO algorithm determined by three-dimensional parameter tuple, if and only if conditions −1 < ω < 1 and 0 < c1 + c 2 < 4(1 + ω ) are satisfied together, iterative process {EXt} is guaranteed to converge to EX = (c1Pi + c2 Pg ) /(c1 + c2 ) . Corollary 2. For PSO algorithm determined by three-dimensional parameter tuple, given R > 0 , if and only if −1 < ω < 1 and f (1) > 0 are satisfied together, iterative process {DXt} is guaranteed to converge to DX = (c1c2 ) 2 ( Pg − Pi ) 2 (1 + ω ) /(c1 + c2 ) 2 / f (1) / 6 . It is easily verified that, in the simpler PSO version, when Pi is equal to Pg, the expectation of particle’s position will gradually converge to Pg, and the variance will gradually converge to zero. This means that the PSO algorithm can thoroughly search around the best position found so far. If the convergent speed of variance is slow, it is more likely to find good solutions in the good area. Below is the graphical illustrations of parameter ranges, which are determined by conditions shown in above two corollaries. The parameter range to guarantee the convergence of iterative process {EXt} is illustrated in Fig. 1. The cyan(light) area in Fig. 1 corresponds to case (1) discussed in Theorem 1, and the blue(dark) area in Fig. 1 corresponds to case (2) discussed in Theorem 1. 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 0 1 2 3 4 C1+C2 5 6 7 8 Figure 1 Parameter range to guarantee the convergence of iterative process {EXt}. The cyan(light) area corresponds to case with complex eigenvalues, the blue(dark) area corresponds to case with real eigenvalues W 190 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The parameter ranges to guarantee the convergence of iterative process {DXt} are illustrated in Fig. 2-3. In Fig. 2, the relationship between c1 and c2 is illustrated. The relationship between lower and higher range of ω and c1, c2 are illustrated in Fig. 3. The parameter selection of PSO algorithm in literatures favors c1=c2=c, so more detailed discussion on this condition is given. The relationship between ω and c is illustrated in Fig. 4, in which blue(dark) area is the parameter range to guarantee the convergence of expectation sequence of particle’s position, and the cyan(light) area is the parameter range to guarantee the convergence of variance sequence of particle’s position. 3.5 3 2.5 2 1.5 1 C2 0.5 0 -0.5 -1 -1.5 -2 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 C1 Figure 2 Relationship between c1 and c2 to guarantee the convergence of iterative process {DXt} Figure 3 Relationship between lower(left) and higher(right) range of ω and c1, c2 to guarantee the convergence of iterative process {DXt} Particle Swarm Optimization – Stochastic Trajectory Analysis and Parameter Selection 191 1 0.8 0.6 0.4 0.2 W 0 -0.2 -0.4 -0.6 -0.8 -1 0 0.5 1 1.5 2 C 2.5 3 3.5 4 Figure 4 Relationship between ω and c when c1=c2=c to simultaneously guarantee the convergence of iterative processes {EXt} and {DXt} Based on the theoretical analysis results obtained above and related experimental results, in order to help PSO algorithm to search the solution space more thoroughly, it is necessary to determine parameters to make λmax D ≈ 1 . Thus we propose a new set of parameters: {ω=0.715, c1=c2=1.7}. This set of parameters can help PSO algorithm to search the solution space thoroughly, slowly converge to the best position found so far, so as to find the optima with higher probability. In next section, the PSO algorithm using our suggested parameters will be compared against PSO algorithms using parameters suggested in literatures. 5. Performance Comparison Parameter selection of PSO algorithm is quite important and have drawn attention from many researchers. Different researchers have proposed many different sets of parameters, such as ω = 0.729 , c1 = c2 = 1.494 (Clerc & Kennedy, 2002); ω = 0.6 , c1 = c2 = 1.7 (Trelea, 2003); ω = 0.729 , c1 = 2.041 , c2 = 0.948 (Carlisle & Dozier, 2001). For those parameters, corresponding λmax D can be calculated. When ω = 0.729 and c1 = c2 = 1.494 , λmax D = 0.942 ; when ω = 0.6 and c1 = c2 = 1.7 , λmax D = 0.889 ; and when ω = 0.729 , c1 = 2.041 , c2 = 0.948 , λmax D = 0.975 . Obviously, λmax D corresponding to all those three sets of parameters are all around 1, this may help to explain why the performance of PSO algorithm using those sets of parameters are promising. But it is easy to find out that λmax D corresponding to those parameters is still not large enough to enhance the exploration ability of PSO algorithm, so that the algorithm is often trapped in local optima. For above reasons, we propose a new set of parameters: ω=0.715, c1=c2=1.7 (corresponding to λmax D = 0.995 ), and performance comparison is conducted. 192 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization No Free Lunch theorem (Wolpert & Macready, 1997) asserts that no algorithm can be better than any other, over all possible functions. Thus it does not seem interesting to demonstrate that the PSO algorithm with suggested parameters is good on some functions and not on others. What we hope for is a problem-solver that can work well with a wide range of problems. Thus, in the current exercises we combine results from a set of test functions, all of which are commonly used in experimentation with optimization algorithms. Based on three performance measures proposed by Mendes (Mendes et al, 2004), we compare several PSO algorithms with different sets of parameters. Those measures are average standardized optima, average success iterations and average success rate. 1. Standardized Optima The first measure is simply the best function result after some arbitrary number of iterations; here we use 2,000. Basically this is a measure of sloppy speed. It does not necessarily indicate whether the algorithm is close to the global optimum; a relatively high score can be obtained on some of these multimodal functions simply by finding the best part of a locally optimal region. It is not possible to combine raw results from different functions, as they are all scaled differently. For instance, almost any decent algorithm will find a function result less than 0.01 on the sphere function, but a result of 40.0 on Rosenbrock is considered good. In order to combine the function outputs, we standardized the results of each function to a mean of 0.0 and standard deviation of 1.0. All results of all trials for a single function are standardized to the same scale; as all of these problems involve minimization, a lower result is better, and after standardization a negative result means to be better than average. After standardizing each function separately, we can combine them and find the average for each single condition. 2. Success Iterations The second measure is the number of iterations required to reach a criterion. This is also a measure of speed, but in this case the criteria are intended to indicate that the searcher has arrived in the region of the global optimum. There is, however, a problem with this measure, too. That is, some trials might never reach the criteria. Many hours have been lost waiting, trying to give each version a fair chance to find the global optimum, often in vain. Trials where the criteria are not met after a reasonable time — here we use 10,000 iterations — must be coded as infinite, which means among other things that the mean is meaningless. The proper measure of central tendency for such a data set is the median. If the majority of trials are coded as infinite, then the median is represented as infinity, shown in the results tables with the lemniscus. In order to combine iteration data, mean of the medians is used, with the caveat that if any median were infinite, the mean would be infinite, too. It is obviously that the first measure is different from the second one. The first measure determines whether the algorithm can get a good solution fast, e.g., after only 2,000 iterations, while the second measure determines how long it takes to find the global optimum if left to run, or whether it can find it at all. Generally speaking, iterations to calculate the second performance should be much larger than iterations to calculate the first measure. 3. Success Rate The third measure is perhaps the most important one. This is a simple binary code indicating whether the criteria were met within 10,000 iterations or not. Averaged over all Particle Swarm Optimization – Stochastic Trajectory Analysis and Parameter Selection 193 function trials, this gives the proportion of trials that successfully found the global optimum. There is no trick to this one; the mean of the ones and zeroes, where one indicates success and zero failure, gives the proportion of successes. Iteration used for this measure is the same as that used for the second measure, i.e., 10,000 iterations. Function Ackley Griewank Rastrigin Rosenbrock Sphere Table 1 Benchmark functions Function Ackley Dimension n 10 30 50 10 Griewank 30 50 10 Rastrigin 30 50 10 Rosenbrock 30 50 10 Sphere 30 50 Value Range [X min, Xmax] [-32,32]10 [-32,32]30 [-32,32]50 [-600,600] 10 [-600,600] 30 [-600,600]50 [-5.12,5.12]10 [-5.12,5.12]30 [-5.12,5.12]50 [-30,30]10 [-30,30]30 [-30,30]50 [-100,100]10 [-100,100]30 [-100,100]50 Criteria 1 2 2 0.1 0.05 0.05 10 60 100 5 20 50 1e-5 1e-5 1e-5 Formula − 0.2 1n 2 ∑ xi n i =1 n Optima 1n ∑ cos(2πxi ) n i =1 Optimal Position (0,…,0) (0,…,0) ( 0,…,0) ( 1,…,1) ( 0,…,0) f1 ( x) = 20 + e − 20e f2 ( x ) = → → −e xi 0 0 0 1 4000 n ∑ x − ∏ cos( 2 i i =1 i =1 n i ) +1 f3 ( x ) = → ∑(x i =1 2 i − 10 cos(2πxi ) + 10) f4 ( x ) = ∑ (100( x i =1 → n −1 22 i +1 − xi ) n + ( xi − 1) 2 ) 0 0 f5 ( x ) = ∑x i =1 2 i Table 2 Value range and criteria of benchmark functions 194 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Based on those three measures, we conduct experiments on five benchmark problems, which are commonly used in literature. Those five benchmark functions are Ackley, Griewank, Rastrigin, Rosenbrock and Sphere. Corresponding function formula, optima and optimal positions are shown in Table 1; value range and criteria are listed in Table 2. Features of those five functions are: Sphere is a simple unimodal function; Rosenbrock is also an unimodal function, but Rosenbrock's variables are strongly dependent and gradient information often misleads algorithms; Ackley, Griewank and Rastrigin are multimodal functions with many local optima. Griewank is strongly multi-modal with significant interaction between its variables, caused by the product term. This function has the interesting property that the number of local minima increases with dimensionality. The four sets of parameters used to be compared are listed as follows: Set A (Clerc & Kennedy, 2002): ω = 0.729 , c1 = c2 = 1.494 ; Set B (Carlisle & Dozier, 2001): ω = 0.729 , c1 = 2.041 , c2 = 0.948 ; Set C (Trelea, 2003): ω = 0.6 , c1 = c2 = 1.7 ; Set D: ω = 0.715 , c1 = c2 = 1.7 . Set A Ackley Griewank Mean (Deviation) Rastrigin Rosenbrock Sphere Ackley Success Rate Griewank Rastrigin Rosenbrock Sphere Ackley Success Iteration Griewank Rastrigin Rosenbrock Sphere 0.1139 (0.4041) 0.0944 (0.0583) 8.7357 (4.5793) 2.4308 (9.2956) 0 (0) 0.92 0.64 0.68 1.00 1.00 84 265 179 333.5 186 Set B 0.1155 (0.3483) 0.0606 (0.0357) 4.7758 (2.2978) 3.2329 (11.1348) 0 (0) 0.90 0.90 1.00 0.99 1.00 72.5 192 161 319.5 162 Set C 0.1765 (0.4460) 0.0876 (0.0457) 8.6263 (4.0645) 2.0431 (9.2136) 0 (0) 0.86 0.67 0.69 1.00 1.00 63 160.5 141 280.5 139 Set D 0.0511 (0.2553) 0.0803 (0.0411) 6.0593 (3.4700) 8.5559 (25.0940) 0 (0) 0.96 0.72 0.88 1.00 1.00 108 426 201 538.5 259 Table 3. Experimental results on 10-dimensional functions Particle Swarm Optimization – Stochastic Trajectory Analysis and Parameter Selection 195 Experiments are conducted on all five benchmark functions, considered dimensions are 10, 30 and 50, corresponding particle swarm sizes are separately 20, 40 and 100. Each algorithm with each set of parameter is run 100 times, and the final result is the statistical result of all 100 runs. The intermediate experimental results include mean function value (deviation), success rate and success iteration. Experimental results related to 10-dimensional functions are listed in Table 3. Experimental results related to 30-dimensional functions are listed in Table 4. And experimental results related to 50-dimensional functions are listed in Table 5. Although we don’t want to compare the PSO algorithm using different parameters on each single function, it is clearly shown in Table 3-5 that the performance of PSO algorithm using our suggested parameters is promising. Set A Ackley Griewank Mean (Deviation) Rastrigin Rosenbrock Sphere Ackley Griewank Success Rate Rastrigin Rosenbrock Sphere Ackley Success Iteration Griewank Rastrigin Rosenbrock Sphere 1.2639 (0.9417) 0.0155 (0.0196) 59.0109 (18.2530) 28.8497 (28.7922) 0 (0) 0.82 0.91 0.61 0.99 1.00 190 285 287.5 1832 435.5 Set B 1.3589 (0.8030) 0.0208 (0.0242) 41.0719 (10.1841) 33.1788 (39.6960) 0 (0) 0.78 0.86 0.94 0.90 1.00 142.5 197 182.5 2051 295 Set C 1.3556 (0.9833) 0.0160 (0.0199) 57.5682 (15.3826) 31.9139 (34.7045) 0 (0) 0.70 0.90 0.59 0.97 1.00 150.5 237 179.5 1689 363 Set D 0.0250 (0.1761) 0.0113 (0.0144) 42.9026 (11.8995) 58.6477 (51.5653) 0 (0) 1.00 0.98 0.94 0.84 1.00 280 503.5 345.5 5323 772 Table 4. Experimental results on 30-dimensional functions The final synthesized results are listed in Table 6. Experimental data shown in Table 6 clearly indicates that the PSO algorithm using parameter set D outperforms other algorithm in the measures of standardized optima and average success rate, and is outperformed by other algorithms in the measure of success iteration. Both two phenomena can be explained by λmax D corresponding to each set of parameters. 196 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Set A Ackley Griewank Mean (Deviation) Rastrigin Rosenbrock Sphere Ackley Griewank Success Rate Rastrigin Rosenbrock Sphere Ackley Success Iteration Griewank Rastrigin Rosenbrock Sphere 1.2454 (0.9683) 0.0130 (0.0229) 118.1610 (24.7108) 71.0803 (41.1463) 0 (0) 0.77 0.94 0.25 0.80 1.00 257 383 Set B 1.8311 (0.5866) 0.0108 (0.0200) 87.0787 (16.8852) 70.3772 (40.7945) 0 (0) 0.60 0.94 0.80 0.60 1.00 214 214 262 3981 332 Set C 1.2278 (0.8901) 0.0140 (0.0219) 113.8330 (23.4990) 67.8099 (33.8612) 0 (0) 0.82 0.93 0.27 0.91 1.00 214 338 Set D 0 (0) 0.0079 (0.0118) 70.3967 (15.1534) 87.6412 (42.7683) 0 (0) 1.00 0.98 0.97 0.61 1.00 471 789 597 5474 1281 ∞ 2188 603 ∞ 2205 531 Table 5. Experimental results on 50-dimensional functions Dimension Standardized Optima 10 30 50 Average Success Rate Average Success Iteration 10 30 50 10 30 50 Set A 0.1193 0.1134 0.1286 0.848 0.866 0.752 209.5 606 Set B -0.2070 -0.0121 0.0032 0.958 0.896 0.788 181.4 573.6 1000.3 Set C 0.1137 0.1337 0.0882 0.844 0.832 0.786 156.8 523.8 Set D -0.0260 -0.2350 -0.2199 0.912 0.952 0.912 306.5 1444.8 1722.3 ∞ ∞ Table 6 Synthesized performance comparison results Particle Swarm Optimization – Stochastic Trajectory Analysis and Parameter Selection 197 Parameter set D corresponds to a largest λmax D among all four set of parameters, thus PSO algorithm using parameter set D has the strongest exploration ability, so it is not easy to be trapped into local optima. When the dimension increase, the solution space get more complex, and PSO algorithm gets more likely to be trapped into local optima. At this time, the influence of exploration ability to the performance of algorithm would be more significant. This is why PSO algorithm using parameter set D can outperform other algorithm in the measures of standardized optima and average success rate, and this advantage gets more significant when the dimension increases. Also due to the strong exploration ability that PSO algorithm using parameter set D has, the algorithm has to waste a lot of time in exploring new search area, so as to influence the speed. 6. Conclusion The stochastic process theory is applied to analyze the particle swarm optimization algorithm determined by five-dimensional real-value parameter tuple {ω, c1, c2, a, b}, considering the randomness thoroughly. Specifically speaking, stochastic convergence analysis is conducted on PSO algorithm when it is in stagnation phase, and the convergent properties of expectation and variance sequence of particle’s position are studied. The analysis results determines corresponding parameter ranges, both in formular and graphical form. This result is helpful to understand the mechanism of PSO algorithm and select appropriate parameters to make PSO algorithm more powerful. After the theoretical stochastic convergence analysis of PSO algorithm in stagnation phase, parameter selection guidelines are discussed, and a set of suggested parameters {ω=0.715, c1=c2=1.7} is given, which is compared against other three sets of parameters which are proposed in literatures. Experimental result shows that the PSO algorithm using our suggested parameters can achieve robust performance, but the time expires before reaching optimal area is longer than PSO algorithm using other suggested parameters. 7. References Carlisle, A. & Dozier, G. (2001). An off-the-shelf pso. Proceedings of the Workshop on Particle Swarm Optimization. Indianapolis, USA. 2001. Clerc, M. & Kennedy, J. (2002). The particle swarm-explosion, stability and convergence in a multidimensional complex space. IEEE Trans. Evol. Comput., Vol. 6, No. 2, April 2002, 58–73. Clerc M. (2006). Stagnation analysis in particle swarm optimisation or what happens when nothing happens. Technical Report CSM-460, Department of Computer Science, University of Essex. August 2006. ISSN: 1744-8050. Holland, J. (1975). Adaption in natural and artificial systems, University of Michigan Press, Ann Arbor, MI, 1975. Jiang, M.; Luo, Y. P. & Yang, S. Y. (2007a). Stagnation Analysis in Particle Swarm Optimization, Proceedings of IEEE Swarm Intelligence Symposium 2007, pp. 14-17, Hawaii, USA. 1-5 April 2007. Jiang, M.; Luo, Y. P. & Yang, S. Y. (2007b). Stochastic convergence analysis and parameter selection of the standard particle swarm optimization algorithm. Information Processing Letters, Vol. 102, No. 1, April 2007, 8-16 198 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Mendes, R.; Kennedy, J. & Neves, J. (2004). The fully informed particle swarm: Simpler, maybe better. IEEE Trans. Evol. Comput., Vol. 8, No. 3, June 2004, 204–210. Ozcan, E. & Mohan, C. (1998). Analysis of a simple particle swarm optimization system, Intelligent Engineering Systems Through Artificial Neural Networks, 1998. 253-258. Ozcan, E. & Mohan, C. K. (1999). Particle swarm optimization: Surfing the waves. Proc. IEEE Congr. Evol. Comput., Washington, DC. Jul. 1999. 1939–1944. Trelea, I. C. (2003). The particle swarm optimization algorithm: Convergence analysis and parameter selection. Inf. Process. Lett., Vol. 85, 2003, 317–325. van den Bergh, F. (2001). An analysis of particle swarm optimizers: [Ph.D. dissertation]. University of Pretoria, Pretoria, South Africa, 2001. Wolpert, D. H. & Macready, W. G. (1997). No free lunch theorems for optimization. IEEE Trans. Evol. Comput., Vol. 1, No. 2, April 1997, 67–82. Xie, X-F. ; Zhang, W-J. & Bi, D-C. (2004). Optimizing semiconductor devices by selforganizing particle swarm. Congress on Evolutionary Computation (CEC), pp. 20172022, Oregon, USA, 2004. Yasuda, K.; Ide, A. & Iwasaki, N. (2003). Adaptive particle swarm optimization. Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics. 2003. 1554-1559. 12 Stochastic Metaheuristics as Sampling Techniques using Swarm Intelligence Johann Dreo and Patrick Siarry Universite Paris 12, Laboratoire Images, Signaux et Systemes Intelligents France 1. Introduction Optimization problems appear in many fields, as various as identification problems, supervised learning of neural networks, shortest path problems, etc. Metaheuristics [22] are a family of optimization algorithms, often applied to "hard" combinatorial problems for which no more efficient method is known. They have the advantage of being generic methods, thus do not require a complex tuning for each problem, and can be used as a kind of "black boxes". Recall that, generally, optimization algorithms search for a point into the search space, so as to optimize (i.e., minimize or maximize) the objective function (also called fitness or goal function). Metaheuristics are often divided into two sets: 1. Algorithms handling a single point, making it evolve towards a solution. 2. Algorithms handling a population, i.e., a finite set of points, and computing a new population at each iteration. An essential observation is that the population of the second category is a stochastic sampling of the objective function. Although those classes are not disjoint (an algorithm can belong to both classes, according to the point of view), we only consider population metaheuristics, which are simply referred as metaheuristics hereafter. An important contribution in this domain comes from the theory of self-organization [10, p.8], which allows to analyze the properties of several metaheuristics stemming from realworld metaphors, often biological ones. This theory (notably studied except the biology [47]) describes the conditions of appearance of complex phenomena from distributed systems, the agents of which are the object of simple, but numerous interactions. The theory puts in front concepts such as communication, feedback, amplification of fluctuations and emergence. In the metaheuristics field, swarm intelligence was so explicitely used on two main fronts: via an approach "self-organized systems" (having given place to ant colony algorithms) and via an approach "socio-cognitive systems" (having led to the particle swarm optimization). We suggest putting the theory of the swarm intelligence in connection with the concept of adaptive learning search, which tries to describe key points of modern metaheuristics, notably by insisting on the role of the learning and the mechanisms of intensification and diversification. More generally, we think that the theory of self-organization combined with the adaptive learning search gives keys to design the basic components of metaheuristics, recovering from swarm intelligence. 200 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 2. Fundamental concepts 2.1 Adaptive Memory Programming Adaptive Memory Programming (AMP) is a common framework to metaheuristics [53], described in Algorithm 1.. It stresses out the concepts of memory, intensification, and diversification. In the literature of evolutionary algorithms, these two last notions are often replaced by the words exploitation and exploration, which have a similar meaning. Algorithm 1. AMP framework We briefly detail each element of the AMP framework: • Memory stands for the information collected by the algorithm on the objective function distribution. It can be represented either as a simple set of points, or as more complex structures, like pheromone tracks in ant colony algorithms. Memory can be defined as global (compared to the problem as a whole) or inter-individual (a solution relative to another one). • Intensification exploits the information obtained, in order to improve the current solutions. This is typically a local search algorithm (for instance with the Nelder-Mead algorithm [45] or a taboo search). • Diversification aims at collecting new information, by exploring the search space. The three components presented are not always clearly distinct, and are strongly interdependent in an algorithm. An example of metaheuristic that fits well the AMP model is the method GRASP [50]. 2.2 Objective Function Sampling and AMP Metaheuristics share a certain number of properties. An essential one is that they handle a sampling of the objective function, via common processes. The probabilistic sampling should ideally pick the best solutions with higher probability. However, in an optimization problem, the effective goal is not to sample the objective function, but to find the distribution's optimum. Thus, sampling must concentrate on the areas of interest, while converging gradually towards the optimum by means of "learning" algorithms. From the point of view of sampling, this convergence is carried out by a progressive fall of dispersion in these areas. In the majority of metaheuristics, the sampling of the objective function is probabilistic (diversification, also named exploration, synonym used almost indifferently [51, p.292])). Ideally, this sampling should be performed with respect to an approximation of the distribution of the points, so as to locate an area of interest, and then converge towards the optimum (intensification, or exploitation). Stochastic Metaheuristics as Sampling Techniques using Swarm Intelligence 201 Most of the metaheuristics do not have any a priori information on the distribution, thus implicitely learn it by diversification and intensification, such as ant colony algorithms, and "classical" metaheuristics. Conversely, some methods use an approximation of the distribution, and are called explicit methods (see [3]). 2.3 General Scopes We assisted to several attempts of structuration in the scope of distribution sampling. For instance, Monmarche et al. proposed the model Probabilistic Search Metaheuristic [42, 43] (PSM), based on the comparison of the algorithms PBIL [2, 4], BSC [52], and the ant system algorithm [13]. The general principle of a PSM method is presented in Algorithm 2.. Notice the relation of this approach with the estimation of distribution algorithms. However, the PSM approach is limited to the use of probability vectors, while specifying an essential update rule for these vectors. Algorithm 2. The scope of the PSM method Algorithm 3. The IDEA approach 202 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The EDA's were presented as evolutionary algorithms, with an explicit diversification [44]. They are undoubtedly the algorithms closest to a general scope. The Iterated Density Evolutionary Algorithms [7, 8, 9] (IDEA) are a generalization of those, presented in Algorithm 3.. IDEA uses a more general diversification than PSM, while not being limited to a probability vector as model, but specifying that the search for the best probability distribution forms an integral part of the algorithm. However, the fall of dispersion is carried out by selecting the best individuals, no precision on the use of different intensification principles is given. 2.4 I&D frame A classical problem when designing metaheuristics is the difficulty to achieve the balance between intensification and diversification. This has lead Blum and Roli to propose the I&D frame [51], which emphasizes the fact that the different components of a metaheuristic cannot be categorized as performing strict intensification or diversification. They propose to consider that components could be spaced out between three poles, determined upon the origin of the information comes from: • the objective function, • a random process, • other functions. Furthermore, each component can be considered as intrinsic or strategic, depending whether the component is defined by the basic idea of the metaheuristic, or added to it to improve its performances. However, this framework does not give precise indication on the algorithms design, nor on the relation between components and probabilistic sampling aspects. 2.5 Self-organization and swarm intelligence As a field of research, swarm intelligence deals with the study of self-organization in natural and artificial swarm systems. The self-organization is a phenomenon described in many disciplines, notably in the fields of physics and biology. A formal definition has been proposed in [10, p.8]: Self-organization is a process in which pattern at the global level of a system emerges solely from numerous interactions among lower-level components of the system. Moreover, the rules specifying interactions among the system's components are executed using only local information, without reference to the global pattern. Two terms need clarification for a better understanding, "pattern" and "to emerge". Generally, the first one applies to an "organized arrangement of objects in space or time". Additionally, an emerging property of a system is a characteristic which appears unforeseen (not being explicitly determined), from the interactions among the components of this system. Thus, the crucial question is to understand how the components of a system interact with each other to produce a complex pattern (in relative sense of the term, i.e. more complex than the components themselves). A certain number of necessary phenomena have been identified: these are the processes of feedback and the management of the information flow. The positive feedbacks are processes which result in reinforcing the action, for example by amplification, facilitation, self-catalysis, etc. Positive feedbacks are able to amplify the fluctuations of the system, permitting the updating of even imperceptible informations. Such Stochastic Metaheuristics as Sampling Techniques using Swarm Intelligence 203 processes can easily lead to an explosion of the system, if they are not controlled by applying negative feedbacks. Hence negative feedbacks act as stabilizers for the system. When they are coupled, such feedback processes can generate powerful models. Within the framework of biological behavior, it is easy to understand that the interactions among the components of a system will very often give rise to communications processes i.e. transfer of information between individuals. Generally, individuals can communicate, either by means of signals, i.e. by using a specific means to carry information, or by means of indices, where information is carried accidentally. In a similar manner, information can come directly from other individuals, or pass via the state of a work in progress. This second possibility of exchanging information, by means of modifying the environment, is called the stigmergy. Generally, all these processes are more or less inter-connected, allowing a system consisting of a large number of individuals to act together to solve problems that are too complex for a single individual. Certain characteristics of the self-organized systems are very interesting, in particular their dynamism, or their capacity to generate stable patterns. Within the framework of the study of the behavior of the social insects, certain concepts related to the principle of selforganization deserve to be underlined: the intrinsic decentralisation of these systems, their organization in dense heterarchy and the recurring use of the stigmergy. Indeed, these concepts are sometimes used to view the same problem from different angles and partially cover the principles of self-organization. In a swarm intelligence system, there is no decision-making at a given level, in a specified order and no predetermined actions. In fact, in a decentralized system, each individual has a local vision of his environment, and thus does not know the problem as a whole. The literature of the multi-agent systems (see [24] for an initial approach) often employs this term or that of "distributed artificial intelligence" [34]. However, generally this discipline tends to study more complex behaviors patterns, founded in particular in cognitive sciences. To be precise, the advantages of decentralized control are the robustness and the flexibility [6]. Robust systems are desired because of their ability to continue to function in the event of breakdown of one of their components; flexible devices are welcome, because they can be useful for dynamic problems. 2.6 Adaptive Learning Search Adaptive Learning Search (ALS) is a framework for considering the structure of metaheuristics [21], relying on the AMP, the I&D frame and the notion of objective function sampling. Instead of considering only a memorization process, as in AMP, we propose to consider a learning phase. Indeed, the memory concept is quite static and passive; in a sampling approach, it suggests that the sample is simply stored, and that the metaheuristic only takes into account the previous iteration, without considering the whole optimization process. We emphasize on the fact that the memorized data is not only a raw input, but provides information on the distribution, and thus on the solutions. Thereby, we propose to consider three terms to describe the characteristic processes in a population metaheuristic: learning, diversification and intensification. Metaheuristics progress in an iterative way, archetypally by alternating phases of intensification, diversification and learning, or mixing these notions in a more narrow way. The state of 204 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization departure is often randomly chosen, the algorithm running until a criterion of stop is reached. A simple ALS algorithm could thus be organized as presented in Algorithm 4. Algorithm 4. ALS algorithm The diversification indicates the processes harvesting information about the optimized problem. The intensification aims at using the information already harvested to define how much an area is interesting. The memory is the support of the learning, which allows the algorithm to take into account only zones where the global optimum may be, so avoiding the local optima. The notions of intensification and diversification are important in the design of metaheuristics, which have to reach a delicate balance between these two dynamics of search. Both notions are not thus contradictory, but additional, and there are numerous strategies mixing at the same moment both of the aspects. We use here a terminology similar to the one used for the I&D frame, but slightly modified to be easier to comprehend and manipulate. Notably, we have chosen to assign the terms to archetypal processes: Intensification: the sampling only uses informations from the objective function (local search, determinist selection operators, etc.), Diversification: the sampling is purely random (noise, uniform mutation operator), Learning: use of a distribution constructed from the whole set of solutions sampled from the start of the algorithm. Moreover, in ALS, we proposed to split up metaheuristics in three categories, according to the way the sampling is managed: Implicit: an implicit probability density function (PDF) is used to draw the sample (e.g. evolutionary algorithms), Explicit: a specific PDF is used (e.g. estimation of distribution algorithms), Direct: an approximation of the objective function is used as a PDF (e.g. simulated annealing). The implicit methods permit to avoid the hard choice of the PDF model to use, but are difficult to control and understand. Explicit methods permit to control their components almost independently, but are pledged to the choice of a model. The direct algorithms use the "ideal" model (the objective function itself), but make the intensification difficult. Stochastic Metaheuristics as Sampling Techniques using Swarm Intelligence 205 Figure 1. The three classes of metaheuristics proposed in adaptive learning search are defined according to the sampling of the objective function. They combine themselves with the three archetypal components, that form the set of possible behaviours 3. Metaheuristics Metaheuristics form a wide class of methods, among which the more interesting are often stochastic algorithms manipulating a sample of points (also called a "population" of "individuals"). In this section, we will briefly introduce some of the best known metaheuristics, from the simulated annealing (which does not use swarm intelligence) to ant colony algorithms (a method well known for using swarm intelligence). Each metaheuristic is here described along with its position regarding adaptive learning search and swarm intelligence. 3.1 Simulated Annealing The simulated annealing [37, 11] was created from the analogy between a physical process (the annealing) and an optimization problem. As a metaheuristic, it is based on works simulating the evolution of a solid towards its minimal energetic state [41, 30]. The classic description of simulated annealing presents it as a probabilistic algorithm, where a point evolves in the search space. The method uses the Metropolis algorithm, recalled in Algorithm 5., inducing a markovian process [1, 38]. The simulated annealing, in its usual version ("homogeneous"), calls this method at each iteration. Algorithm 5. Sampling with the Metropolis method 206 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization It is possible to see the simulated annealing as a population algorithm. Indeed, the Metropolis algorithm directly samples the objective function using a degenerated parametric Boltzmann distribution (of parameter T). Hence, one of the essential parameters is the temperature decrease, for which many laws were proposed [54]. There also exist some versions of the simulated annealing more centred on the handling of a points population [32, 55, 40, 33]. Here, the Metropolis method represents the diversification (coupled with the learning), while the temperature decrease is controlling the intensification process. Note that other methods than Metropolis' may be used [14, 48]. Algorithm 6. presents a synthesis of the simulated annealing. The learning step is not present in basic versions, but many existing variants have tried to link the temperature to certain characteristics of the sampling obtained through the Metropolis method [25, 46, 19]. Algorithm 6. ALS model for the simulated annealing Simulated annealing cannot be considered as a metaheuristic using swarm intelligence operators. Indeed, the behavior of the system is defined by a global rule (the Metropolis method), without any use of local interactions. Finally, the simulated annealing is mainly characterized by its direct sampling of the objective function. The mechanism behind this algorithm is one of the most common to all the metaheuristics and should thus be underlined. 3.2 Estimation of Distribution Algorithms Estimation of Distribution Algorithms (EDA) were first created as an alternative to evolutionary algorithms [44]: the main difference is that crossover and mutation steps are replaced by the choice of random individuals with respect to an estimated distribution obtained from the previous populations. The general process is presented in Algorithm 7. The main difficulty is how to estimate the distribution; the algorithms used for this are based on an evaluation of the dependency of the variables, and can belong to three different categories: 1. Models without any dependency: the probability distribution is factorized from univariant independent distributions, over each dimension. That choice has the defect not to be realistic in case of hard optimization, where a dependency between variables is often the rule. 2. Models with bivariant dependency: the probability distribution is factorized from bivariant distributions. In this case, the learning of distribution can be extended to the notion of structure. Stochastic Metaheuristics as Sampling Techniques using Swarm Intelligence 207 3. Models with multiple dependencies: the factorization of the probability distribution is obtained from statistics with an order higher than two. Algorithm 7. Estimation of distribution algorithm For continuous problems, the distribution model is often based on a normal distribution. Some important variants were proposed, using for example "data clustering" for multimodal optimization, parallel variants for discrete problems (see [39]). Convergence theorems were also formulated, in particular with modeling by Markov chains, or dynamic systems. EDA algorithms in the ALS scope are modelled in Algorithm 8. Algorithm 8. ALS model for estimation of distribution algorithms 3.3 Particle Swarm Optimization The particle swarm optimization ("Particle Swarm Optimization", PSO) [35, 36] evolved from an analogy drawn with the collective behavior of the animal displacements (in fact, the metaphor was largely derived from socio-psychology). Indeed, for certain groups of animals, e.g. the fish schools, the dynamic behavior in relatively complex displacements can be observed, where the individuals themselves have access only to limited information, like the position and the speed of their closer neighbors. For example, it can be observed that a fish school is able to avoid a predator in the following manner: initially it gets divided into two groups, then the original school is reformed, while maintaining the cohesion among the school. 208 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The authors, who proposed the method of particle swarm optimization, drew their original inspiration by first comparing the behaviors in accordance with the theory of sociopsychology for data processing and the decision-making in social groups, side by side. It is an exceptional and remarkable achievement that this metaheuristic was originally conceived for the continuous domain, and, till date, majority of its applications are in this domain. The method conceives a large group of particles, in the form of vectors, moving in the search and a vector of change in position space. Each particle i is characterized by its position (called velocity) . In each iteration, the movement of the particle can be characterized as: . The core of the method consists in the manner in which is chosen, after each iteration. Socio-psychology suggests that the movements of the individuals (in a socio-cognitive chart) are influenced by their last behavior and that of their neighbors (closely placed in the social network and not necessarily in space). Hence, the updating of the position of the particles is dependent on the direction of their movement, and the best position among the neighbors: their speed, the best preceding position The change in position, in each iteration, is thus implemented according to the following relation: where the parameters are drawn randomly from the discourse and are influential in striking a balance between the relative roles of the individual experience ) and of the social communication (governed by ). Uniform random (governed by selection of these two parameters is justified from the fact that it does not give any a priori importance to any of the two sources of information. The algorithm also employs another parameter, Vmax, to limit the rapidity of movement in each dimension, so that it can prevent any "explosion" of the system, in case there are too large amplifications of the oscillations. The algorithm could implement an effective compromise between intensification and and move apart, in that case diversification. The only problem arises when the points the particles will continue to oscillate between these two points without converging. An interesting characteristic of this algorithm is that, if a new optimum is discovered after the algorithm converged (i.e., after a phase of intensification), the particles will explore the search space around the new point (i.e. a phase of diversification). The ALS modelling of this generic scheme is presented in Algorithm 13. Algorithm 9. ALS model for particle swarm optimization Stochastic Metaheuristics as Sampling Techniques using Swarm Intelligence 209 In this algorithm, the positive feedbacks are situated at the level of the particles attraction. The moves limitations of each particle form the negative feedbacks. There is a memory situated at the local level, between neighbor particles, as each one does only move according to the state of its closest neighbors, and not according to the whole system. The readers are redirected to read [36] to obtain a detailed, state of the art, understanding of the particle swarm optimization and the concepts associated with it and [12] for a synthesis. 3.4 Evolutionary Algorithms Evolutionary algorithms [23] are inspired from the biological process of the adaptation of alive beings to their environment. The analogy between an optimization problem and this biological phenomenon has been formalized by several approaches [31, 26, 49], leading for example to the famous family of genetic algorithms [27]. The term population metaheuristics fits particularly well; following the metaphor, the successive populations are called generations. A new generation is computed in three stages, detailed below. 1. Selection: improves the reproduction ability of the best adapted individuals. 2. Crossover: produces one or two new individuals from their two parents, while recombining their characteristics. 3. Mutation: randomly modifies the characteristics of an individual. One clearly identifies the third step with the diversification stage, while the first one stands for the intensification. We interpret the crossover as a learning from the previous information (i.e. from the ancesters). Several methods [52, 29, 28, 5] were designed for the diversification operators, which emphasize the implicit process of distribution sampling. The ALS modelling of this generic scheme is presented in Algorithm 13. Algorithm 10. ALS model for evolutionary algorithms In this family of metaheuristics, feedback processes are sometimes difficult to figure out, as there are many variants. Generally speaking, the positive feedbacks are situated on selection operators, whereas negative feedbacks are typically implemented in mutation operators. There is a form of local memory, as the evolution of each individual at each iteration is linked to the evolution of its neighbors. 3.5 Immune Systems The term "artificial immune systems" (AIS) is applicable for a vast range of different systems, in particular for metaheuristic optimization, inspired by the operation of the immune system of the vertebrates. A great number of systems have been conceived in several varied fields e.g. robotics, the detection of anomalies or optimization (see [18] for a detailed exploration of various applications) . 210 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The immune system is responsible for the protection of the organism against the "aggressions" of external organisms. The metaphor from which the AIS algorithms originate harps on the aspects of training and memory of the immune system known as adaptive (in opposition to the system known as innate), in particular by discriminating between self and non-self. Algorithm 11. A simple example of the algorithm of artificial immune system The principal ideas used for the design of this metaheuristic are the selections operated on the lymphocytes accompanied by the positive feedback, allowing the multiplication and the implementation of memory by the system. Indeed, these are the chief characteristics to maintain the self-organized characteristics of the system. The approach used in the AIS algorithms is very similar to that of the evolutionary algorithms but was also compared with that of the neural networks. Within the framework of difficult optimization, the AIS can be regarded to take the shape of evolutionary algorithm, introducing particular operators. To operate the selection, it has to be based, for example, on a measurement of affinity (i.e. between the receiver of a lymphocyte and an antigen). The process of mutation takes place through an operator of hyper-mutation, resulting directly from the metaphor. In the final analysis, the algorithm developed is very close to a genetic algorithm (see algorithm 11.). The ALS modelling of this generic scheme is presented in Algorithm 12. Algorithm 12. ALS model for immune systems Stochastic Metaheuristics as Sampling Techniques using Swarm Intelligence 211 A description of the basic theory and many applications of the artificial immune systems can be found in [17], [18] and in [16], and also in a book of reference [15]. 3.6 Ant Colony Algorithms An elegant description of ant colony algorithms was proposed in [20], which can be applied to the (combinatorial) problems where a partial construction of the solution is possible. This description, although restrictive, makes it possible to highlight the original contributions of these metaheuristics (called ACO, for "Ant Colony Optimization", by the authors). Artificial ants used in ACO are stochastic solution construction procedures that probabilistically build a solution by iteratively adding solution components to partial solutions by taking into account (i) heuristic information on the problem instance being solved, if available, and (ii) (artificial) pheromone trails which change dynamically at run-time to reflect the agents' acquired search experience. A more precise formalization exists [20]. It develops a representation of the problem on the basis of a basic behavior of the ants and a general organization of the metaheuristic under consideration. Several concepts have also been laid down to facilitate the understanding of the principles of these algorithms, in particular the definition of the trails of pheromone as an adaptive memory, the need for an adjustment of intensification /diversification and finally, the use of a local search. The problem is represented by a set of solutions, an objective function assigning a value for each solution and a set of constraints. The objective is to find the global optimum satisfying the constraints. The various states of the problem are characterized similarly to a sequence of components. It should be noted that, in certain cases, a cost can be associated to the states which do not belong to the set of solutions. In this representation, the ants build solutions while moving on a graph G = (C,L), where the nodes are the components of C and the set L connects the components of C'. The constraints of the problem are implemented directly in the rules of displacement of the ants (either by preventing the movements which violate the constraints, or by penalizing such solutions). The movements of the ants can be characterized like a stochastic procedure of building constructive solutions on the graph G = (C, L). In general, the ants try to work out feasible solutions, but if necessary, they can produce unfeasible solutions. The components and the (establishing an adaptive connections can be associated with the trails of pheromone (representing a priori memory describing the state of the system) and a heuristic value information about the problem, or originating from a source other than that of the ants; it is very often the cost of the state in progress). The trails of pheromone and the value of the heuristics can be associated either with the components, or with the connections. Each ant has a memory to store the path traversed, an initial state and the stopping conditions. The ants move according to a probabilistic rule of decision function of the local trails of pheromone, state of the ant and constraints of the problem. At the time of addition of a component to the solution in progress, the ants can update the trail associated with the component or the corresponding connection. Once the solution is built, they can update the trail of pheromone components or connections used. Lastly, an ant has the capacity of at least building a solution for the problem. In addition to the rules governing the behavior of the ants, another major process is activated: the evaporation of the trails of pheromone. In fact, with each iteration, the value of the trails of pheromone is decreased. The goal of this reduction is to avoid a too fast 212 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization convergence and the trapping of the algorithm in local minima. This causes a gradual lapse in memory which helps in exploration of new areas. According to the authors of the AGO formalism, it is possible to implement other processes requiring a centralized control (and thus not being able to be directly controlled by some ants), as additional processes. In our opinion, this is not desirable; in fact, one then loses the decentralized characteristic of the system. Moreover, the implementation of the additional processes with rigorous formalization becomes difficult, because one should be able to view any process there. The use of the stigmergy is a crucial factor for the ant colony algorithms. Hence, the choice of the method for implementation of the trails of pheromone is significant to obtain the best results. This choice is mainly related to the possibilities of representation of the search space, each representation being able to bring a different way to implement the trails. For example, for the traveling salesman problem, an effective implementation consists in using a trail ij between two cities i and j like a representation of the interest to visit the city j after the city i. Another possible representation, less effective in practice, consists in considering ij as a representation of the interest to visit i as the jth city. In fact, the trails of pheromone describe the state of the search for the solution by the system in each iteration and the agents modify the way in which the problem will be represented and perceived by the other agents. This information is shared by the ants by means of modifications of the environment, in form of an indirect communication: the stigmergy. The structure of ant colony metaheuristics comprises of an intrinsic parallelism. Generally, the good quality solutions emerge as a result of the indirect interactions taking place inside the system, not of an explicit implementation of exchanges. Here each ant takes only the local information about its environment (the trails of pheromones) into account; it is thus very easy to parallel such an algorithm. It is interesting to note that the various processes in progress in the metaheuristic (i.e. the behavior of the ants, evaporation and the additional processes) can also be implemented independently, the user has the liberty to decide the manner in which they will interact. Algorithm 13. ALS model for ant colony algorithms 4. Conclusion Population metaheuristics can be viewed as algorithms handling a probabilistic sampling of a probability distribution, representing the objective function of an optimization problem. These algorithms can be described either as implicit, explicit or direct, according to their way of sampling the objective function. These algorithms are iteratively manipulating the sample thanks to components that can be classified among three tendencies: learning, Stochastic Metaheuristics as Sampling Techniques using Swarm Intelligence 213 intensification and diversification. These metaheuristics can thus be viewed as adaptive learning search algorithms. A lot of the stochastic metaheuristics make use of swarm intelligence to design efficient components that can solve a large scale of different hard optimization problems. Among them, implicit metaheuristics like evolutionary computation or particle swarm optimization are the most known for their self-organized aspects. These two theories are thus complementary and, from the point of view of the design of metaheuristics, there is a simple relation between them: the ALS describes the "goal" to be reached, and the theory of the swarm intelligence a "means" to reach this goal. So, an effective metaheuristic should, according to the adaptive learning search, set up mechanisms of learning, intensification and diversification, stays the question of the means to be used to set up these mechanisms. The swarm intelligence proposes a model of implementation: an algorithm on base of population defining simple interactions at the local level, allowing the emergence of a complex behavior at the global level. Both presented theories should allow to better understand the functioning of existing metaheuristics and to direct the design of new ones. The concepts important to retain are the use by modern metaheuristics of learning, intensification and diversification, as well as the distributed aspect and the flexible hose of the swarm intelligence. However it is necessary to underline the difficulty to design a swarm intelligence system, what explains that the inspiration comes from the biology, where such systems are relatively common. The main difficulties are the following ones: • Design sampling operators from which it is easy to extract the relevant information to direct the search, • Set the balance between techniques of intensification, diversification and learning, • Maintain the flexibility of the algorithm, so that it adapts itself to the problem. 5. Bibliography E. H. L. Aarts and P. J. M. Van Laarhoven. Statistical cooling : a general approach to combinatorial optimisation problems. Philips J. of Research, 40:193-226, 1985. [1] S. Baluja. Population-based Incremental Learning: A Method for Integrating Genetic Search Based Function Optimization and Competitive Learning. Technical Report CMU-CS94-163, Carnegie Mellon University, 1994. [2] S. Baluja. Genetic Algorithms and Explicit Search Statistics. Advances in Neural Information Processing Systems, 9:319-325, 1997. [3] S. Baluja and R. Caruana. Removing the Genetics from the Standard Genetic Algorithm. In A. Prieditis and S. Russel, editors, International Conference on Machine Learning, pages 38-46, Lake Tahoe, California, 1995. Morgan Kaufmann. [4] S. Baluja and S. Davies. Fast probabilistic modeling for combinatorial optimization. In Fifteenth National Conference on Artificial Intelligence, Tenth Conference on Innovative Applications of Artificial Intelligence, Madison, Wisconsin, 1998. [5] E. Bonabeau, M. Dorigo, and G. Theraulaz. Swarm Intelligence, From Natural to Artificial Systems. Oxford University Press, 1999. [6] P. A. N. Bosnian and D. Thierens. An algorithmic framework for density estimation based evolutionary algorithm. Technical Report UU-CS-1999-46, Utrech University, 1999. [7] 214 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization P.A.N. Bosnian and D. Thierens. Continuous iterated density estimation evolutionary algorithms within the IDEA framework. In M. Muehlenbein and A.O. Rodriguez, editors, Proceedings of the Optimization by Building and Using Probabilistic Models OBUPM Workshop at the Genetic and Evolutionary Computation Conference GECCO2000, pages 197—200, San Francisco, California, 2000. Morgan Kauffmann. [8] P.A.N. Bosnian and D. Thierens. IDEAs based on the normal kernels probability density function. Technical Report UU-CS-2000-11, Utrecht University, 2000. [9] S. Camazine, J.L. Deneubourg, N. Franks, J. Sneyd, G. Theraulaz, and E. Bonabeau. SelfOrganization in Biological Systems. Princeton University Press, 2000. [10] V. Cerny. Thermodynamical approach to the traveling salesman problem : an efficient simulation algorithm. J. of Optimization Theory and Applications, 45(1):41-51, 1985. [11] M. Clerc. L'optimisation par essaim particulaire : principes, modeles et usages. Technique et Science Informatiques, 21:941—964, 2002. [12] A. Colorni, M. Dorigo, and V. Maniezzo. Distributed Optimization by Ant Colonies. In F. Varela and P. Bourgine, editors, Proceedings of ECAL'91 -First European Conference on Artificial Life, pages 134-142, Paris, France, 1992. Elsevier Publishing. [13] M. Creutz. Microcanonical Monte Carlo simulation. Physical Review Letters, 50(19):14111414, May 1983. [14] D. Dasgupta. Artificial Immune Systems and their applications. Springer Verlag, 1999. [15] D. Dasgupta and N. Attoh-Okine. Immune-based systems: A survey. In Proceedings of the IEEE International Conference on Systems, Man and Cybernetics, volume 1, pages 369—374, Orlando, October 1997. IEEE Press. [16] L.N. De Castro and F. Von Zuben. Artificial Immune Systems: Part I: Basic Theory and Applications. Technical Report TR-DCA 01/99, Department of Computer Engineering and Industrial Automation, School of Electrical and Computer Engineering, State University of Campinas, Brazil, December 1999. [17] L.N. De Castro and F. Von Zuben. Artificial Immune Systems: Part II -A Survey of Applications. Technical Report DCA-RT 02/00, Department of Computer Engineering and Industrial Automation, School of Electrical and Computer Engineering, State University of Campinas, Brazil, February 2000. [18] P. M. C. De Oliveira. Broad Histogram : An Overview, arxiv :cond-mat/0003300vl, 2000. [19] M. Dorigo and T. Stiitzle. Handbook of Metaheuristics, volume 57 of International series in operations research and management science, chapter The Ant Colony Optimization Metaheuristics: Algorithms, Applications and Advances. Kluwer Academic Publishers, Boston Hardbound, January 2003. [20] J. Dreo, J.-P. Aumasson, W. Tfaili, and P. Siarry. Adaptive learning search, a new tool to help comprehending metaheuristics. International Journal on Artificial Intelligence Tools, 16(3), June 2007. [21] J. Dreo, A. Petrowski, P. Siarry, and E. D. Taillard. Metaheuristics for hard optimization. Springer, 2006. [22] J. E. Eiben, A. E. Smith. Introduction to Evolutionary Computing. Springer Verlag, 2003. [23] J. Ferber. Les systemes multi-agents. Vers une intelligence collective. In-terEditions, 1997. [24] Stochastic Metaheuristics as Sampling Techniques using Swarm Intelligence 215 A. M. Ferrenberg and R. H. Swendsen. Optimized Monte Carlo Data Analysis. Phys. Rev. Lett, 63:1195, 1989. [25] L. J. Fogel, A. J. Owens, and M. J. Walsh. Artifical Intelligence through Simulated Evolution. Wiley, 1966. [26] D. E. Goldberg. Genetic Algorithms in Search, Optimization and Machine learning. AddisonWesley, 1989. [27] G. Harik. Linkage learning in via probabilistic modeling in the EcGA. Technical Report 99010, IlliGAL, 1999. [28] G. Harik, F. G. Lobo, and D. E. Goldberg. The compact genetic algorithm. In IEEE Conference on Evolutionary Computation, pages 523-528, 1998. [29] W. K. Hastings. Monte Carlo sampling method using Markov chains and their applications. Biometrika, 57, 1970. [30] J. H. Holland. Outline for logical theory of adaptive systems. J. Assoc. Comput. Mach., 3:297314, 1962. [31] K. Hukushima and K Nemoto. Exchange Monte Carlo method and application to spin glass simulations. J. Phys. Soc. Jpn., 65:1604-1608, 1996. [32] Y. Iba. Population Annealing: An approach to finite-temperature calculation. In Joint Workshop of Hayashibara Foundation and SMAPIP. Hayashibara Forum, 2003. [33] N. R. Jennings. Coordination Techniques for Distributed Artificial Intelligence. In G. M. P. O'Hare and N. R. Jennings, editor, Foundations of Distributed Artificial Intelligence, pages 187-210. John Wiley & Sons, 1996. [34] J. Kennedy and R. C. Eberhart. Particle swarm optimization. In Proc. IEEE Int. Conf. on Neural Networks, volume IV, pages 1942-1948, Piscat-away, NJ: IEEE Service Center, 1995. [35] J. Kennedy, R.C. Eberhart, and Y. Shi. Swarm Intelligence. Evolutionary Computation. Morgan Kaufmann, April 2001. [36] S. Kirkpatrick, C.D. Gelatt, and M.P. Vecchi. Optimization by simulated annealing. Science, 220(4598):671-680, 1983. [37] W. Krauth. Advances in Computer Simulation, chapter Introduction To Monte Carlo Algorithms. Springer-Verlag, 1998. [38] P. Larranaga and J.A. Lozano. Estimation of Distribution Algorithms, A New Tool for Evolutionary Computation. Genetic Algorithms and Evolutionary Computation. Kluwer Academic Publishers, 2002. [39] F. Liang and W. H. Wong. Evolutionary Monte Carlo: Application to Cp Model Sampling and Change Point Theorem. Statistica Sinica, 10, 2000. [40] N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller. Equation of state calculations by fast computing machines. Journal of Chemical Physics, 21:10871092, 1953. [41] N. Monmarche, E. Ramat, G. Dromel, M. Slimane, and G. Venturini. On the similarities between AS, BSC and PBIL: toward the birth of a new meta-heuristics. E3i 215, Universite de Tours, 1999. [42] N. Monmarche, N. Ramat, L. Desbarat, and G. Venturini. Probabilistic search with genetic algorithms and ant colonies. In A.S. Wu, editor, Proceedings of the 2000 Genetic and Evolutionary Computation Conference Workshop, pages 209-211, 2000. [43] 216 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization H. Miihlenbein and G. Paa/3. From recombination of genes to the estimation of distributions I. Binary parameters. Lecture Notes in Computer Science 1411: Parallel Problem Solving from Nature, PPSN IV:178-187, 1996. [44] J. A. Nelder and R. Mead. A simplex method for function minimization. Computer Journal, 7:308—313, 1965. [45] M. E. J. Newman and R. G. Palmer. Error estimation in the histogram Monte Carlo method. arxiv:cond-mat/98043006, 1998. [46] G. Nicolis and I. Prigogine. Self-organization in Non-equilibrium Systems. New York, 1977. [47] Y Okamoto and U. H. E. Hansmann. Thermodynamics of helix-coil transitions studied by multicanonical algorithms. J. Phys. Chem., 99:11276— 11287, 1995. [48] I. Rechenberg. Cybernetic Solution Path of an Experimental Problem. Royal Aircraft Establishment Library Translation, 1965. [49] M.G.C. Resende. Greedy randomized adaptive search procedures (GRASP). Technical Report TR 98.41.1, AT&T Labs-Research, 2000. [50] Christian Blum Andrea Roli. Metaheuristics in combinatorial optimization: Overview and conceptual comparison. ACM Computing Surveys, 35(3):268-308, September 2003. [51] G. Syswerda. Simulated Crossover in Genetic Algorithms. In L. D. Whitley, editor, Second workshop on Foundations of Genetic Algorithms, pages 239-255, San Mateo, California, 1993. Morgan Kaufmann. [52] E. D. Taillard, L. M. Gambardella, M. Gendreau, and J.-Y. Potvin. Adaptive Memory Programming: A Unified View of Meta-Heuristics. European Journal of Operational Research, 135(1): 1—16, 1998. [53] E. Triki, Y. Collette, and P. Siarry. A theoretical study on the behavior of simulated annealing leading to a new cooling schedule. European Journal of Operational Research, 166:77-92, 2005. [54] O. Wendt and W. Konig. Cooperative Simulated Annealing: How Much Cooperation is Enough ? Technical Report 97-19, Institute of Information Systems, Goethe University, Frankfurt, 1997. [55] 13 Artificial Ants in the Real World: Solving On-line Problems Using Ant Colony Optimization Bruno R. Neryl, Rodrigo F. de Mellol, André P. L. F. de Carvalhol and Laurence T. Yang2 1Universidade de São Paulo, 2St. Francis Xavier University 1Brazil, 2Canada 1. Introduction In the last years, there has been a large growth in the research of computational techniques inspired in nature. This area, named Bioinspired Computing, has provided biologically motivated solutions for several real world problems. Among Bioinspired Computing techniques, one can mention Artificial Neural Networks (ANN), Evolutionary Algorithms (EA), Artificial Immune Systems (AIS) and Ant Colony Optimization (ACO). ACO is a meta-heuristic based on the structure and behavior of ant colonies. It has been successfully applied to several optimization problems. Several real world optimization problems may change the configuration of its search space with time. These problems are known as dynamic optimization problems. This chapter presents the main concepts of ACO and show how it can be applied to solve real optimization problems on dynamic environments. As a case study, it will be illustrated how ACO can be applied to process scheduling problems. The chapter starts describing how real ants forage for food, environmental modifications related to this activity (for example, the blockage of a path) and the effects of these modifications in the colony. After, a brief review of previous works on Ant Colony Optimization is presented. For computer simulations, the activities of an ant colony may be modeled as a graph. After modeling the problem of foraging for food (as a graph), the goal (finding the shortest path at a given moment) is defined and the mechanism to solve the problem is presented. The need to model an on-line problem as a graph, the goal of finding the shortest path and the mechanisms adopted for solving the problem (an adapted version of the AntSystem) are detailed. Before ACO is applied to the process scheduling problem, the problem is analyzed and modeled using a graph representation. Next, simulation results obtained in a set of experiments are presented, which are validated by results obtained in a real implementation. Important issues related with the use of ACO for process scheduling, like parameter adjustments, are discussed. In the conclusion of this chapter, we point out a few future directions for ACO researches. The use of computational techniques inspired in nature has become very frequent in the last years. This area, named Bioinspired Computing, provides efficient biologically motivated 218 Multiprocessor Scheduling: Theory and Applications solutions for several real world problems. Among the most popular bioinspired techniques, we may cite Artificial Neural Networks (ANN), Evolutionary Algorithms (EA), Artificial Immune Systems (AIS) and Ant Colony Optimization (ACO). ACO [DMC96], a meta-heuristic based on the structure and behavior of ant colonies, has been successfully applied to several optimization problems [FMS05, PB05, BN06, SF06, PLF02, WGDK06, CF06, HND05]. For such, it has attracted a large deal of attention lately. Next, we will briefly describe key recent works using ACO to solve real world problems. Foong et al. [FMS05] proposed a power plant maintenance scheduling optimization considering ant colony optimization algorithms. In this work,the performance of two ACO algorithms were compared: Best Ant System (BAS) and Max-Min Ant System (MMAS). Experimental results suggested that the performance of the studied algorithms can be significantly better than those obtained by other meta-heuristics, such as genetic algorithms and simulated annealing, in this particular application. The work considered as case study a 21-unit power plant maintenance problem investigated in previous researches. In this study, parameters like the number of ants, initial pheromone level, reward factor and others were varied to investigate the ACO search sensitivity. Pinto and Baran [PB05] presented two multiobjective algorithms for the Multicast Traffic Engineering problem considering new versions of the Multi-Objective Ant Colony System (MOACS) and the Max-Min Ant System (MMAS). These ACO algorithms simultaneously optimize the maximum link usage, the cost of a multicast routing tree, the average delay and maximum end-to-end delay. Results showed a promising performance of the proposed algorithms for a multicast traffic engineering optimization. Bui and Nguyen [BN06] proposed an algorithm to solve the graph coloring problem. The algorithm employed a set of agents, called ants, to color the graph. The ants were distributed on the vertices of the input graph based on the conflicts. Each ant colored a portion of the graph. Although based on traditional ACO algorithms, each ant solved part of the problem, making it suitable for distributed problems. Smaldon and Freitas [SF06] investigated a new version of the Ant-Miner algorithm [PLF02], named Unordered Rule Set Ant-Miner, which produces an unordered set of classification rules. The proposed version was compared to the original Ant-Miner algorithm in six public-domain datasets, presenting similar accuracy. However, it discovered more modular rules, which could be interpreted independently from others, supporting its application for interpreting discovered knowledge in data mining systems. Wang et al. [WGDK06] proposed a design exploration method to exploit the duality between the time and resource constrained scheduling problems. The proposed approach used the Max-Min Ant Colony Optimization to solve both the time and the resource constrained scheduling problems. Compared to using force directed scheduling exhaustively at every time step, the proposed algorithm provided relevant solution quality savings with similar execution time. Chan and Freitas [CF06] proposed a new ant colony algorithm for multi-label classification, named MuLAM (Multi-Label Ant-Miner). This algorithm is a major extension of Ant-Miner, the first ant colony algorithm for discovering classification rules. According to experimental results, MuLAM presented a better predictive accuracy than other classification techniques investigated. Hijazi et al. [HND05] used an ant colony algorithm in the wireless communication domain. The problem investigated was how to detect users in a multi-user environment in Artificial Ants in the Real World: Solving On-line Problems Using Ant Colony Optimization 219 synchronous MC-CDMA (Multi-Carrier Code Division Multiple Access) systems, minimizing the interference noise. The optimization solutions found by the ACO reduced the execution time requirements by as much as 98% when compared to an exhaustive search method. All previous works found biological inspired motivations to solve real world problems. We believe that the approach followed by ant colonies to find the shortest path between their nest and a food source can provide an efficient solution to the process scheduling problem. For such, this chapter presents concepts on Ant Colony Optimization and how it can be applied to optimize process scheduling. This chapter is organized as follows: the section 2 presents ant colony optimization concepts; the problem of foraging for food and how ants solve it is presented in section 3; examples of Ant Colony Optimization algorithms are shown in section 4; the section 5 presents how Ant Colony Optimization can be used for a real class problem, in this case the process scheduling; the section 6 shows the conclusions and future directions, finally the references. 2. How real ants work Apparently simple organisms, ants can deal with complex tasks by acting collectively. This collective behavior is supported by the release of a chemical substance, named pheromone. During their movement, ants deposit pheromone in their followed paths. The presence of pheromone in a path attracts other ants. In this way, pheromone plays a key role in the information exchange between ants, allowing the accomplishment of several important tasks. A classical example is the selection of the shortest path between their nest and a food source. For instance, consider four ants and two possible paths, P1 and P2 (Figure 1), which link a nest NE to a food source FS, such that P1 > P2. Initially, all the ants (A1, A2, A3 and A4) are in NE and must choose between the paths P1 and P2 to arrive to FS. Figure 1. Ants foraging for food 1. In NE, the ants (A1, A2, A3 and A4) do not know the localization of the food source (FS). Thus, they randomly choose between P1 and P2, with the same probability. Assume that ants A1 and A2 choose P1, and ants A3 and A4 choose P2. While the ants pass by P1 and P2, they leave a certain amount of pheromone on the paths, C1 and C2, respectively. As P1 < P2, A 3 and A4 arrive to FS before A1 and A2. In this moment, C2 = 2. Since A1 and A2 have not arrived to FS, C1 = 0. In order to come back to NE, A3 and A4 must choose 2. 3. 220 Multiprocessor Scheduling: Theory and Applications again between P1 and P2. As in FS, C2 > C1, the probability of these ants choosing P2 is higher. Assume that A3 and A4 choose P2. 4. When A3 and A4 arrive to NE again, C2 arrives to 4. This increase in C2 and consolidates the rank of P2 as the shortest path. When A1 and A2 arrive to FS, C2 = 4 and C1 = 2. Thus, the probability of A1 and A2 coming back to NE through P2 becomes higher. In the previous example, at the beginning, when there is no pheromone, an ant looking for food randomly chooses between P1 and P2 with a probability of 0.5 (50% of possibility for each path). When there is pheromone on at least one of the paths, the probability of selecting a given path is proportional to the amount of pheromone on it. Thus, paths with a higher concentration of pheromone have a higher chance of being selected. However, this simple approach leads to the problem of stagnation. Suppose, for example, that ants get addicted to a particular path. Sometimes in near future, that path may become congested, becoming non-optimal. Another problem arises when a favorite path is obstructed and can no longer be used by the ants. In the case of real ants, the environment solves this problem by evaporation1, i.e., reducing the pheromone values to prevent high concentration in optimal paths (which avoid the exploration of possible - new or better alternatives). 3. Solving problems using ACO In order to understand how ant colonies may be used to solve problems, we have to understand the problem of foraging for food and how ants solve it. Suppose that each location (nest, food source, etc.) is represent by a node and each path by an edge in a graph, as shown in Figure 2. Figure 2: The forage problem modeled as a graph Thus, to solve a problem using ant colony optimization we have to represent its domain as a graph and its goal as finding a good path. Assume the problem of the traveling salesman [FS91] where, given a set of n towns, it is necessary to find a minimal length closed tour that visits each town once. The towns are easily represented as the graph nodes and the paths, as the graph edges. 1 When applying ant colonies to solve real problems, this approach may be used together with an heuristic one, combining the pheromone concentration with another information to take decisions. Artificial Ants in the Real World: Solving On-line Problems Using Ant Colony Optimization 221 Another example is the problem of graph coloring: consider a graph G = (V, E) where V is a set of vertices and E is a set of edges. The goal is to assign colors to the vertices in such a way that connected vertices do not have the same color. This must me done using as few different colors as possible. 4. Algorithms for Ant Colony Optimization Based on the representation presented in the previous section, Dorigo et al. [DMC96] proposed an algorithm called ant-cycle which mimics the ants behavior. Dorigo showed how this algorithm can be used to solve the traveling salesman problem. In Dorigo's algorithm, n ants are distributed in the n towns, one ant at each town. Each ant chooses among the linked towns the next visited town. The probability of each town being selected is a function of the next town distance and the amount of pheromone on the link between the current and the next towns. Ants can visit each town only once (this is achieved using a tabu list [BR03]). After completing a path, each ant leaves an amount of pheromone on the visited links. The shortest path found by an ant or set of ants is usually followed by the remaining ants, defining an optimal or suboptimal path. A pheromone evaporation process is frequently used to avoid the selection of the first tours and stagnation. A generic version of the ACO algorithm may be seen in Algorithm 1. Set parameters, initialize pheromone trails loop while termination conditions not met do Construct AntSolutions ApplyLocalSearch (optional) UpdatePheromones end while end loop Choose best solution Algorithm 1 Dorigo's algorithm (ACO heuristic) The same approach (Ant Colony Optimization) was used by Negara [G.N06] to solve the coloring graph problem (Algorithm 2). The author considered an adjacent matrix A to represent the graph G = (V,E) where: auv = 1, if the edge (u, v) E auv 0, otherwise (considering u, v V). Such work considers the parallel solution of the problem where agents cope among themselves sharing experiences. It also considers elitism where the good agents can modify the mutual knowledge. 5. Applying on the real world: process scheduling The increasing availability of low cost microprocessors and the evolution of computing networks have made economically feasible the construction of sophisticated distributed systems. In such systems, processes execute on computers and communicate to each other to perform a collaborative computing task. A load balancing algorithm is frequently adopted to distribute processes among available computers. 222 Multiprocessor Scheduling: Theory and Applications read matrix A for iteration do for ant a in Ants do a colors the graph based on previous experience using one of the specific coloring algorithms if a is elitist then a modifies the matrix A end if end for end for Use results Algorithm 2. Negara's algorithm A load balancing algorithm is responsible to equally distribute the processes load among the computers of a distributed environment [SKS92]. Krueger and Livny [KL87] demonstrate that such algorithms reduce the mean and standard deviation of process response times. Lower response times result in higher performance. The load balancing algorithms involve four policies: transference, selection, location and information [SKS92]. The transference policy determines whether a computer is in a suitable state to participate in a task transfer, either as a server or as a process receiver. The selection policy defines the process to be transferred from the busiest computer to the idlest one. The location policy is responsible to find a suitable transfer partner (sender or receiver) for a computer, once the transfer policy has decided about its state. A serving computer distributes processes, when it is overloaded; a receiving computer requests processes, when it is idle. The information policy defines when and how the information regarding the computer availability is updated in the system. Several works related to load balancing can be found in the literature [ZF87, TL89, SKS92, MTPY04, SdMS+05]. Zhou and Ferrari [ZF87] evaluated five server-initiated load balancing algorithms, i.e. initiated by the most overloaded computer: Disted, Global, Central, Random and Lowest. In Disted, when a computer suffers any modification in its load, it emits messages to the other computers to inform its current load. In Global, one computer centralizes all the computer load information and sends broadcast messages in order to keep the other computers updated. In Central, as in Global, a central computer receives all the load information related to the system; however, it does not update the other computers with this information. This central computer decides the resources allocation in the environment. In Random, no information about the environment load is handled. Now, a computer is selected by random in order to receive a process to be initiated. In Lowest, the load information is sent when demanded. When a computer starts a process, it requests information and analyzes the loads of a small set of computers and submit the processes to the idlest one, the computer with the shortest process queue. Theimer and Lantz [TL89] implemented algorithms similar to Central, Disted and Lowest. They analyzed these algorithms for systems composed of a larger number of computers (about 70). For the Disted and Lowest algorithms, a few process receiver and sender groups were created. The communication within these groups was handled by using a multicast protocol, in order to minimize the message exchange among the computers. Computers Artificial Ants in the Real World: Solving On-line Problems Using Ant Colony Optimization 223 with load lower than a inferior limit participate of the process receiver group, whilst those with load higher than a superior limit participate of the process sender group. Theimer and Lantz recommend decentralized algorithms, such as Lowest and Disted, as they do not generate single points of failure, as Central does. Central presents the highest performance for small and medium size networks, but its performance decreases in larger environments. They concluded that algorithms like Lowest work with the probability of a computer being idle [TL89]. They assume system homogeneity, as they use the size of the CPU waiting queue as the load index. The process behavior is not analyzed; therefore, the actual load of each computer is not measured. Shivaratri, Krueger and Singhal [SKS92] analyzed the server-initiated, receiver-initiated, symmetrically initiated, adaptive symmetrically initiated and stable symmetrically initiated algorithms. In their studies, the length of the process waiting queue at the CPU was considered as the load index. This measure was chosen because it's simple and, therefore, can be obtained with fewer resources. They concluded that the receiver-initiated algorithms present a higher performance than the server-initiated ones. In their conclusions, the algorithm with the highest final performance was the stable symmetrically initiated. This algorithm preserves the history of the load information exchanged in the system and takes actions to transfer the processes by using this information. Mello et al. [MTPY04] proposed a load balancing algorithm for distributing processes on heterogeneous capacity computers. This algorithm, named TLBA (Tree Load Balancing Algorithm), organizes computers in a virtual tree topology and starts delivering processes from the root to the leaves. In their experiments, this algorithm presented a very good performance, with low mean response time. Senger et al. [SdMS+05] proposed GAS, a genetic scheduling algorithm which uses information regarding the capacity of the processing elements, applications' communication and processing load, in order to allocate resources on heterogeneous and distributed environments. GAS uses Genetic Algorithms to find out the most appropriate computing resource subset to support applications. Motivated by all the previous ACO presented works (section 1) and the scheduling problem, Nery et al. [NMdCYOB] proposed an algorithm inspired in ant colonies to schedule processes on heterogeneous capacity computer clusters, which can be considered as an alternative approach for load balancing systems. Such algorithm is named Ant Scheduler and is based in ant colony optimization techniques. The next sections describe the algorithm and compare its results with others found in literature. 5.1 The Ant Scheduler The problem of process allocation in heterogeneous multicomputing environments can be modeled by using graphs, as illustrated in Figure 3 [AAB+00]. In this case, each process is a request for execution that has the nodes S and T as origin and destination, respectively. S and T are connected by N different paths, each corresponding to a computer in a cluster. This graph is employed to improve the general performance of the system by minimizing the mean congestion of the paths. The good results obtained by ACO in graph-based problems favor the use of ACO for the optimization of process allocation on heterogeneous cluster computing environments. For such, each initiated process can be seen as an ant looking for the best path starting in the 224 Multiprocessor Scheduling: Theory and Applications nest in order to arrive as fast as possible to the food source. In this search, each computer can be seen as a path and the conclusion of the program execution as the food source. Figure 3. A cluster modeled as a graph of resources The Ant Scheduler algorithm is based on the ant-cycle proposed by Dorigo et al. [DMC96]. When the computer responsible for the distribution of processes (master) in the cluster is started, each edge in the graph has its pheromone intensity initiated with a value i = c. When a process is launched, it is seen as an ant able to move. Thus, this process must select one of the paths (the computers of the cluster) to its destination (complete execution). The probability of an ant choosing a path i is given by Equation 1, where i is the pheromone level on path i, i is a value associated to the computer i by a heuristic function, and the parameters and control the relevance of i and i. (1) This heuristic function is proportional to the load of the ith computer. The denominator is the sum of the pheromone levels weighted by the heuristic function and controlled by the parameters and . When an ant arrives to its destination (when a process finishes), it deposits a amount of pheromone in the covered path (equation 2: where Q is a constant and T is the time spent by the ant to arrive at its destination (the process running time)). (2) In order to prevent an addiction to a particular computer, the paths face continuous pheromone evaporation. Thus, in regular time intervals, the amount of pheromones changes according to the rule of equation 3, where is a coefficient such that (1 — ) represents the pheromone evaporation between t and t + 1. Additionally, i is reseted ( i = 0) in regular time intervals. (3) One problem with this approach is the possibility of a poor performance due to the different range of values for i and i. In order to overcome this problem, these values are normalized using a logarithmic scale, modifying the equation 1 and originating the equation 4. Artificial Ants in the Real World: Solving On-line Problems Using Ant Colony Optimization 225 (4) Another problem found was the frequent allocation of a low value, between 0 and 1, to i, making log i < 0, leading to unrealistic values for the probability function. This problem was solved by using log + i instead of log i, where = 1. This resulted in the equation 5. (5) The Ant Scheduler is composed of the Algorithms 3, 4 and 5. The first algorithm is executed when a new process, with possibility of migration, is initiated. When a process completes its execution, the second algorithm starts its execution. The third algorithm is periodically executed, in order to perform the pheromone evaporation. Choose a computer with probability pi, calculated using equation 5 Schedule process on chosen computer Algorithm 3. Ant Scheduler: process started Update the amount of pheromone i using equation 2 Algorithm 4. Ant Scheduler: process finished loop for all i such that i is a cluster node do Update the amount of pheromone I using equation 3 Reset the amount of pheromone i ( i = 0) end for end loop Algorithm 5. Ant Scheduler: pheromone evaporation 5.2 Simulation Several experiments have been carried out on environments with 32 computers for the evaluation of the Ant Scheduler algorithm behavior. The Ant Scheduler parameters used were = 1, = 1, = 0.8 and Q = 0.1. Parallel applications of up to 8, 64 and 128 tasks have been evaluated. This configuration allows the evaluation of the algorithm in situations where there are many tasks synchronized with others, that is, tasks that communicate among themselves to solve the same computing problem. The workload imposed by such applications follows the workload model by Feitelson 2[FJ97j. This model is based on the analysis of six execution traces of the following production environments: 128-node iPSC/860 at NASA Ames; 128-node IBM SP1 at 2 http://www. cs.huji.ac.il/labs/parallel/workload/models. html 226 Multiprocessor Scheduling: Theory and Applications Argonne; 400-node Paragon at SDSC; 126-node Butterfly at LLNL; 512-node IBM SP2 at CTC; 96-node Paragon at ETH. According to this model, the arrival of processes is derived from an exponential probability distribution function (pdf) with mean equal to 1,500 seconds. This model was adopted to simulate and allow a comparative evaluation of Ant Scheduler and other algorithms found in the literature. In order to carry out the experiments and evaluate the scheduling algorithm proposed in this study, the authors used the model for creation of heterogeneous distributed environments and evaluation of the parallel applications response time - UniMPP (Unified Modeling for Predicting Performance) [dMS06]. The adopted model is able to generate the mean execution time of the processes submitted to the system. The mean response time is generated after reaching the confidence interval of 95%. In this model, every processing element (PE), PEi, is composed of the sextuple {pci, mmi, vmi,dri,dwi,loi}, where pci is the total computing capacity of each computer measured in instructions per time unit, mmi is the main memory total capacity, vmi is the virtual memory total capacity, dri is the hard disk reading throughput, dwi is the hard disk writing throughput, and loi is the time between sending and receiving a message. In this model, every process is represented by the sextuple {mpj, smj, pdf dmj, pdf drj, pdf dwj, pdf netj}, where mpj represents the processing consumption, smj is the amount of static memory allocated by the process, pdf dmj is the probability distribution for the memory dynamic occupation, pdf drj is the probability distribution for file reading, pdf dwj is the probability distribution for file writing, and pdf netj is the probability distribution for messages sending and receiving. In order to evaluate the Ant Scheduler algorithm, a class was included in the object-oriented simulator3 [dMS06j. This class implements the functionalities of Ant Scheduler and has been aggregated to the UniMPP model simulator to generate the mean response times of an application execution. These results were used to evaluate the performance of Ant Scheduler and to allow comparisons with other algorithms. 5.2.1 Environment parameters Experiments were conduced in environments composed of 32 computers. In these experiments, each PEi for the UniMPP model was probabilistically defined. The parameters pci, mmi, vmi, dri, dwi were set by using an uniform probability distribution function with the mean of 1,500 Mips (millions of instructions per second), 1,024 MBytes (main memory), 1,024 MBytes (virtual memory), 40 MBytes (file reading transference rate from hard disk) and 30 MBytes (file writing transference rate to hard disk). These measures were based on the actual values obtained using a group of machines from our research laboratory (Distributed Systems and Concurrent Programming Laboratory). These measures followed the benchmark proposed by Mello and Senger [dMS06]4. These parameter values and the use of probability distributions allow the creation of heterogeneous environments to evaluate the Ant Scheduler algorithm. The Feitelson's workload model was used to define the occupation parameter (in Mips) of the processes (or tasks) that take part of the parallel application. The remaining parameters 3 4 SchedSim - available at website http://www.icmc.usp.br/~mello. available at http://www.icmc.usp.br/~mello/ Artificial Ants in the Real World: Solving On-line Problems Using Ant Colony Optimization 227 required for the UniMPP to represent a process were defined as: smj, the amount of static memory used by the process, based on an exponential distribution with a mean of 300 KBytes; pdf dmj, the amount of memory dynamically allocated, defined by an exponential distribution with a mean of 1, 000 KBytes; pdf drj, the file reading probability, defined by an exponential distribution with a mean of one read at each 1, 000 clock ticks, same value used to parameterize the writing in files (pdf dwj); pdf netj, the receiving and sending of network messages, parameterized by an exponential distribution with a mean of one message at each 1,000 clock ticks. During the experiments, all computers were located at the same network, as an ordinary cluster. Within the network, the computers present a delay (RTT - Round-Trip Time according to the model by Hockey [Hoc96]) of 0.0001 seconds (mean value extracted by the net benchmark by Mello and Senger [dMS06] for a Gigabit Ethernet network). 5.2.2 Algorithms simulated The performance of Ant Scheduler is compared with 5 other scheduling and load balancing algorithms proposed in literature: DPWP [ASSS99], Random, Central, Lowest [ZF87], TLBA [MTPY04] and GAS [SdMS+05]. The DPWP (Dynamic Policy Without Preemption) algorithm performs the parallel applications scheduling taking into account a distributed and heterogeneous execution scenario [ASSS99]. This algorithm allows the scheduling of the applications developed on PVM, MPI and CORBA. The details involved in the task attributions are supervised by the scheduling software, AMIGO [SouOO]5. The load index used in this algorithm is the queue size of each PE (processing element). Through this index, the load of a PE is based on the ratio between its number of tasks being executed and its processing capacity. The processing capacity is measured by specific benchmarks [SouOO, SSSSOlj. The DPWP scheduling algorithm uses load indexes to create an ordered list of PEs. The parallel application tasks are attributed to the PEs of this list, in a circular structure. The Lowest, Central and Random algorithms were investigated for load balancing in [ZF87]. These algorithms are defined by two main components: LIM (Load information manager) and LBM (Load balance manager). The first component is responsible for the information policy and for monitoring the computers' load in order to calculate the load indexes. The latter defines how to use the collected information to find out the most appropriate computer to schedule processes. The approach followed by these components to perform their tasks allows the definition of distinct algorithms. These algorithms differ from the scheduling algorithms by being designed to perform the load balance, thus there is no global scheduling software to which the applications are submitted. In fact, each PE should locally manage the application tasks that reach it, initiating them locally or defining how another PE will be selected to execute tasks. 5 We have compared our results to this work, because it was also developed in our laboratory. 228 Multiprocessor Scheduling: Theory and Applications The Lowest algorithm aims to achieve the load balance by minimizing the number of messages exchanged among its components. When a task is submitted to the environment, the LIM receiving the request defines a limited set of remote LIMs. The loads of the PEs of this set are received and the idlest PE is selected to receive the task. The Central algorithm employs a master LBM and a master LIM. Both of them centralize the decision making related to the load balance. The master LIM receives the load indexes sent by the slave LIMs. The master LBM receives the requests to allocate processes to the system and uses the information provided by the master LIM to make these allocations. The Random algorithm does not use information regarding the system load to make decisions. When a task is submitted to the execution environment, the algorithm randomly selects a PE. The load index used by the Lowest and Central algorithms is calculated based on the number of processes in the execution queue. Zhou and Ferrari [ZF87] have observed that the Lowest and Central algorithms present similar performance and that the Random algorithms present the worst results of all. They also suggested the Lowest algorithm for distributed scenarios, because it's not centralized. The TLBA (Tree Load Balancing Algorithm) algorithm aims at balancing loads in scalable heterogeneous distributed systems [MTPY04]. This algorithm creates a logical interconnection topology with all PEs, in a tree format, and performs the migration of tasks in order to improve the system load balance. The GAS (Genetic Algorithm for Scheduling) algorithm uses Genetic Algorithms to propose optimized scheduling solutions [SdMS+05j. The algorithm considers knowledge about the execution time and applications' behavior to define the most adequate set of computing resources to support a parallel application on a distributed environment composed of heterogeneous capacity computers. GAS uses the crossover and mutation operators to optimize the probabilistic search for the best solution for a problem. Based on Genetics and Evolution, Genetic Algorithms are very suitable for global search and can be efficiently implemented in parallel machines. 5.2.3 Experimental results For the validation of the Ant Scheduler algorithm, its performance was compared with results obtained by the five algorithms previously described. For such, the authors carried out simulations where all these algorithms were evaluated running parallel applications composed of different numbers of tasks. Figures 4 and 5 show the process mean response times for parallel applications with up to 64 and 128 tasks, respectively. Random had the worst results, while Ant Scheduler presented the best performance. The poor performance obtained by GAS can be explained by the fact that its execution time increases according to the number of computers. This occurs due to the use of larger chromosomes (this approach is based on Genetic Algorithms), which have to be evaluated by the fitness function. This evaluation requires a long time, which is added to the scheduling cost, jeopardizing the process execution time. It is hard to observe the curve for Ant Scheduler in Figure 4 due to the small mean response times in comparison with the other algorithms. These results show that, in all the scenarios investigated, the Ant Scheduler presented the best performance. Artificial Ants in the Real World: Solving On-line Problems Using Ant Colony Optimization 229 Figure 4. Simulation results: 64 tasks Figure 5. Simulation results: 128 tasks 5.3 Implementation In order to allow real experiments, Ant Scheduler was implemented using the Linux kernel 2.4.24. This implementation uses the process migration service of the openMosix6 patch. openMosix is a software designed to balance the load of clusters by distributing processes. 6 openMosix is a Linux kernel patch developed by Moshe Bar which allows automatic process migration in a cluster environment — Available at http://openmosix.sourceforge.net/ 230 Multiprocessor Scheduling: Theory and Applications The implementation was performed by adding a set of traps inside the Linux kernel. The first trap was implemented in the system call do_fork. Whenever a new process is started, do_fork is called. This system call executes the first trap of Ant Scheduler, which chooses the node where the new process will run. This phase is based on the pheromone level and the computing capacity of each node. Similarly, when a process finishes, the system call do_exit is made. This system call executes the second trap of Ant Scheduler, which updates the amount of pheromone in the computer (ant's path) where the process was running. These traps were implemented in a kernel module by using function pointers, allowing simple changes to use another process scheduling algorithm. When the module is loaded, it registers its functions (traps). This module also starts a thread that periodically updates the pheromone level of each computer applying the equation 3. Experiments were carried out to evaluate the process execution time for an environment using Ant Scheduler and openMosix on a set of five Dual Xeon 2.4 Ghz computers. Table 1 presents the results in process mean execution time (in seconds) for a load of 10 low-load, 10 mean-load and 10 high-load applications executing simultaneously. According to these results, the use of Ant Scheduler reduced the mean response time. Experiment 1 2 3 4 5 6 7 8 9 10 Mean Std Dev Table 1. Experimental Results In order to evaluate the statistical significance of the results obtained, the authors applied the Student's t-test. In this analysis, the authors used the standard error sx for small data samples [W.C88], given by equation 6, where s is the standard deviation and n is the number of samples. Applying the equation, the standard errors of 0.51 and 2.775 were obtained without Ant Scheduler and with Ant Scheduler, respectively. (6) In the test, the null hypothesis proposed is H0: with = without, with the alternative hypothesis HA: with < without to evaluate whether the results are statistically equivalent. The hypothesis without Ant Scheduler 351.00 351.00 351.00 354.00 351.00 351.00 351.00 351.00 348.00 348.00 350.70 1.615 with Ant Scheduler 327.00 336.00 318.00 321.00 318.00 333.00 321.00 336.00 309.00 315.00 323.40 8.777 Artificial Ants in the Real World: Solving On-line Problems Using Ant Colony Optimization 231 H0 considers the results of the Ant Scheduler and the standard openMosix to be similar. If the test is rejected, the alternative hypothesis HA is accepted. This hypothesis considers the process mean response time for the environment adopted. Such mean response time is lower when the processes are distributed using the Ant Scheduler, what confirms its superiority. The significance level used for one-tailed test is = 0.0005. with is the process mean response time with Ant Scheduler; without is the process mean response time with the standard openMosix. For the adopted significance level , the data sets have to present a difference of at least 4.781 in the t-test to reject the hypothesis. This value is found in tables of critical values for the t-student distribution. Applying the equation 7, the value 9.83 is found, confirming that the results present statistic differences with p < 0.005, rejecting the hypothesis H0. In this way the hypothesis HA is valid and the system with Ant Scheduler presents better results than standard openMosix. (7) By applying statistic tools7 over the data sets, it's possible to find the most precise = 0.0000018 for a one-tailed test. This value shows how many times the alternative hypothesis is true. In this case, HA can be considered true in 9,999,982 out of 10,000,000 executions, showing that Ant Scheduler reduces the response time. Only in 18 of these executions the results of Ant Scheduler and openMosix would not present significant statistical differences. 6. Conclusions and future directions The behavior of real ants motivated Dorigo et al. [DMC96] to propose the Ant Colony Optimization (ACO) technique, which can be used to solve problems in dynamic environments. This technique has been successfully applied to several optimization problems [FMS05, PB05, BN06, SF06, PLF02, WGDK06, CF06, HND05]. Such results have motivated this chapter which presents ACO concepts, case studies and also a complete example on process scheduling optimization. Besides the successful adoption of ACO, it presents some relevant questions which have been motivating future directions such as: how to adjust parameters which depend on the optimization problem [SocOSj; how to reduce the execution time [G.N06, MBSD06]; the optimization improvement by using incremental local search [BBSD06]; and the aggregation of different and new concepts to ACO [RL04]. Those works confirm ACO is an important optimization technique and also that is has been improved and present a promising future. 7. Acknowledgments We would like thank Ines Tristao Silva for the ant figure composition. This paper is based upon work supported by CAPES - Brazil under grant no. 032506-6 and FAPESP - Brazil. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the CAPES or FAPESP. 7 The authors applied the Gnumeric tool in this analysis — a free software tool licensed under GNU/GPL terms. 232 Multiprocessor Scheduling: Theory and Applications 8. References Yair Amir, Baruch Awerbuch, R. Sean Borgstrom, Amnon Barak, and Arie Keren. An opportunity cost approach for job assignment and reassignment in a scalable computing cluster. IEEE Transactions on Parallel and Distributed Systems, 11:760,768, October 2000. [AAB+OO] A. P. F. Araujo, M. J. Santana, R. H. C. Santana, and P. S. L. Souza. DPWP: A new load balancing algorithm. In ISAS'99, Orlando, U.S.A., 1999. [ASSS99] Prasanna Balaprakash, Mauro Birattari, Thomas Stiitzle, and Marco Dorigo. Incremental local search in ant colony optimization: Why it fails for the quadratic assignment problem. In ANTS Workshop, pages 156-166, 2006. [BBSD06] Thang N. Bui and ThanhVu H. Nguyen. An agent-based algorithm for generalized graph colorings. In GECCO '06: Proceedings of the 8th annual conference on Genetic and evolutionary computation, pages 19-26, New York, NY, USA, 2006. ACM Press. [BN06] Christian Blum and Andrea Roll. Metaheuristics in combinatorial optimization: Overview and conceptual comparison. ACM Comput. Surv., 35(3):268-308, 2003. [BROS] Allen Chan and Alex A. Freitas. A new ant colony algorithm for multi-label classification with applications in bioinfomatics. In GECCO '06: Proceedings of the 8th annual conference on Genetic and evolutionary computation, pages 27-34, New York, NY, USA, 2006. ACM Press. [CF06] Marco Dorigo, Vittorio Maniezzo, and Alberto Colorni. The ant system: Optimization by a colony of cooperating agents. IEEE Transactions on Systems, Man, and CyberneticsPart B, 26:1,13, 1996. [DMC96] R. F. de Mello and L. J. Senger. Model for simulation of heterogeneous high-performance computing environments. In 7th International Conference on High Performance Computing in Computational Sciences - VECPAR 2006, page 11. Springer-Verlag, 2006. [dMS06] D. G. Feitelson and M. A. Jette. Improved utilization and responsiveness with gang scheduling. In Dror G. Feitelson and Larry Rudolph, editors, Job Scheduling Strategies for Parallel Processing, pages 238-261. Springer, 1997. Lect. Notes Comput. Sci. vol. 1291. [FJ97] Wai Kuan Foong, Holger R. Maier, and Angus R. Simpson. Ant colony optimization for power plant maintenance scheduling optimization. In GECCO '05: Proceedings of the 2005 conference on Genetic and evolutionary computation, pages 249-256, New York, NY, USA, 2005. ACM Press. [FMS05] J. A. Freeman and D. M. Skapura. Neural networks: algorithms, applications, and programming techniques. Addison Wesley Longman Publishing Co., Inc., Redwood City, CA, USA, 1991. [FS91] G.Negara. Parallel experience-based ant coloring. Adaptation in Artificial and Biological Systems, 2:166-173, 2006. [G.N06] Samer L. Hijazi, Balasubramaniam Natarajan, and Sanjoy Das. An ant colony algorithm for multi-user detection in wireless communication systems. In GECCO '05: Proceedings of the 2005 conference on Genetic and evolutionary computation, pages 2121-2126, New York, NY, USA, 2005. ACM Press. [HND05] Roger W. Hockney. The Science of Computer Benchmarking. Soc for Industrial fc Applied Math, 1996. [Hoc96] Artificial Ants in the Real World: Solving On-line Problems Using Ant Colony Optimization 233 P. Krueger and M. Livny. The diverse objectives of distributed scheduling policies. In Seventh Int. Conf. Distributed Computing Systems, pages 242-249, Los Alamitos, California, 1987. IEEE CS Press. [KL87] Max Manfrin, Mauro Birattari, Thomas Stiitzle, and Marco Dorigo. Parallel ant colony optimization for the traveling salesman problem. In ANTS Workshop, pages 224-234, 2006. [MBSD06] R. F. Mello, L. C. Trevelin, M. S. Paiva, and L. T. Yang. Comparative analysis of the prototype and the simulator of a new load balancing algorithm for heterogeneous computing environments. In International Journal of High Performance Computing and Networking, volume 1, No.1/2/3, pages 64-74. Interscience, 2004. [MTPY04] Bruno R. Nery, Rodrigo F. Mello, Andre C. P. L. F. de Carvalho, and Laurence T. Yang. Process scheduling using ant colony optimization techniques. ISPA, pages 304-316, 2006. [NMdCY06] Diego Pinto and Benjamin Baran. Solving multiobjective multicast routing problem with a new ant colony optimization approach. In LANG '05: Proceedings of the 3rd international IFIP/ACM Latin American conference on Networking, pages 11-19, New York, NY, USA, 2005. ACM Press. [PB05] RS Parpinelli, HS Lopes, and AA Freitas. Data Mining with an Ant Colony Optimization Algorithm. IEEE Trans on Evolutionary Computation, special issue on Ant Colony Algorithms, 6(4):321-332, August 2002. [PLF02] Marc Reimann and Marco Laumanns. A hybrid aco algorithm for the capacitated minimum spanning tree problem. In Hybrid Metaheuristics, pages 1-10, 2004. [RL04] L. J. Senger, R. F. de Mello, M. J. Santana, R. H. C. Santana, and L. T. Yang. Improving scheduling decisions by using knowledge about parallel applications resource usage. In Proceedings of the 2005 International Conference on High Performance Computing and Communications (HPCC-05), pages 487-498, Sorrento, Naples, Italy, September 21-23, 2005. [SdMS+05] James Smaldon and Alex A. Freitas. A new version of the ant-miner algorithm discovering unordered rule sets. In GECCO '06: Proceedings of the 8th annual conference on Genetic and evolutionary computation, pages 43-50, New York, NY, USA, 2006. ACM Press. [SF06] N. G. Shivaratri, P. Krueger, and M. Singhal. Load distributing for locally distributed systems. IEEE Computer, 25(12):33-44, 1992. [SKS92] Krzysztof Socha. The influence of run-time limits on choosing ant system parameters. In E. Cantu-Paz et al., editor, Proceedings of GECCO 2003 -Genetic and Evolutionary Computation Conference, LNCS. Springer-Verlag, Berlin, Germany, July 2003. [Soc03] P. S. L. Souza. AMIGO: Uma Contribuigao para a Convergencia na Area de Escalonamento de Processes. PhD thesis, IFSC-USP, Jun. 2000. [SouOO] R. R. Santos, P. S. L. Souza, M. J. Santana, and R. H. C. Santana. Performance evaluation of distributed applications development tools from interprocess communication point of view. In Proceedings of the 2001 International Conference on Parallel and Distributed Processing Techniques and Applications, Las Vegas, USA, Jun. 2001. [SSSS01] M. M. Theimer and K. A. Lantz. Finding idle machines in a workstation-based distributed system. IEEE Transactions on Software Engineering, 15(11):1444-1458, Nov. 1989. [TL89] W.C.Shefler. Statistics: Concepts and Applications. The Benjamin/Cummings, 1988. [W.C88] 234 Multiprocessor Scheduling: Theory and Applications Gang Wang, Wenrui Gong, Brian DeRenzi, and Ryan Kastner. Design space exploration using time and resource duality with the ant colony optimization. In DAC '06: Proceedings of the 43rd annual conference on Design automation, pages 451-454, New York, NY, USA, 2006. ACM Press. [WGDK06] S. Zhou and D. Ferrari. An experimental study of load balancing performance. Technical Report UCB/CSD 87/336, PROGRES Report N.o 86.8, Computer Science Division (EECS), Universidade da California, Berkeley, California 94720, Jan. 1987. [ZF87] 14 Application of PSO to design UPFC-based stabilizers Ali T. Al-Awami1, Mohammed A. Abido1 and Youssef L. Abdel-Magid2 1King Fahd University of Petroleum & Minerals, 2The Petroleum Institute 1Saudi Arabia, 2United Arab Emirates 1. Introduction Today, power demand grows rapidly and expansion in transmission and generation is restricted with the limited availability of resources and the strict environmental constraints. Consequently, power systems are today much more loaded than before. In addition, interconnection between remotely located power systems turned out to be a common practice. These give rise to low frequency oscillations in the range of 0.1-3.0 Hz. If not well damped, these oscillations may keep growing in magnitude until loss of synchronism results. Power system stabilizers (PSSs) have been used in the last few decades to serve the purpose of enhancing power system damping to low frequency oscillations. PSSs have proved to be efficient in performing their assigned tasks. A wide spectrum of PSS tuning approaches has been proposed. These approaches have included pole placement (Chen & Hsu, 1987), damping torque concepts (Gibbard, 1988), H∞ (Klein et al, 1995), variable structure (Samarasinghe & Pahalawaththa, 1997), and the different optimization and artificial intelligence techniques (Abdel-Magid et al, 1999; Abido, 2001; Abido & Abdel-Magid, 1997). However, PSS may adversely affect voltage profile and may not be able to suppress oscillations resulting from severe disturbances, such as three-phase faults at generator terminals (Mehran et al, 1992). On the other hand, Flexible AC Transmission Systems (FACTS) have shown very promising results when used to improve power system steady-state performance. In addition, because of the extremely fast control action associated with FACTS-device operations, they have been very promising candidates for utilization in power system damping enhancement. A unified power flow controller (UPFC) is the most promising device in the FACTS concept. It has the ability to adjust the three control parameters, i.e. the bus voltage, transmission line reactance, and phase angle between two buses. A major function of the UPFC is to redistribute power flow among transmission lines during steady state. During transients, it can be used to improve the damping of low frequency oscillations. To perform these tasks, the UPFC needs to be equipped with a power flow controller, a DC voltage regulator, and a supplementary damping controller. Till now, not much research has been devoted to the analysis and control of UPFCs. Several trials have been reported in the literature to model a UPFC for steady-state and transient studies. Based on Nabavi-Iravani model (Nabavi-Niaki & Iravani, 1996), Wang developed a linearized UPFC model (Wang, 1999a & b) which has been incorporated into the Heffron- 236 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Phillips model (Heffron & Phillips, 1952). Only a single operating point has been considered in the design process presented in (Wang, 1999a), which does not guarantee robust performance. A number of control schemes have been suggested to perform the oscillation-damping task. Huang et al. (2000) attempted to design a conventional fixed-parameter lead-lag controller for a UPFC installed in the tie line of a two-area system to damp the interarea mode of oscillation. Mok et al. (2000) considered the design of an adaptive fuzzy logic controller for the same purpose. Dash et al. (2000) suggested the use of a radial basis function NN for a UPFC to enhance system damping performance. Robust control schemes, such as H∞ and singular value analysis, have also been explored (Vilathgamuwa et al, 2000; Pal, 2002). To avoid pole-zero cancellation associated with the H∞ approach, the structured singular value analysis have been utilized in (Seo et al, 2001) to select the parameters of the UPFC controller to have the robust stability against model uncertainties. However, the adaptive and robust control schemes proposed in (Mok et al, 2000; Dash et al, 2000; Vilathgamuwa et al, 2000; Pal, 2002; Seo et al, 2001) are still not widely implemented in power systems. In addition, the work cited proposed different techniques to design the damping controller without considering the power flow controller and the DC voltage regulator, or to design the three controllers sequentially, i.e. one at a time. To the best of the authors’ knowledge, there has been no attempt till now to design the three controllers simultaneously. 1.1 Objectives The objective of this chapter is to investigate the potential of particle swarm optimization as a tool in designing UPFC-based stabilizers to improve power system transient stability. To estimate the controllability of each of the UPFC control signals on the electromechanical modes, singular value decomposition is employed. The problem of designing all the UPFCbased stabilizers individually is formulated as an optimization problem. Particle swarm optimizer is utilized to search for the optimum stabilizer parameter settings that optimize a given objective function. Coordinated design of the different stabilizers is also carried out by finding the best parameter settings for more than one stabilizer at a given operating condition in a coordinated manner. To further illustrate the potential of PSO in handling complex design problems, robust controller design using simultaneous stabilization is also explored. That is, to ensure the robustness of the proposed control schemes, the design procedure is repeated considering a wide range of operating conditions simultaneously in the design stage. To assess the effectiveness of the proposed designs, eigenvalue analysis as well as nonlinear time-domain simulations are carried out. Two different objective functions will be considered. The first objective is eigenvalue-based while the other is time-domain-based. It will be shown that using a time-domain-based objective function has two advantages: • Nonlinear models of the power system can be used in the design stage without the need for linearization. • Coordinated designs of several controllers with different objectives can be achieved. (Abido et al, 2006b) This chapter aims to demonstrate the potential of PSO in: • Designing an individual UPFC-based stabilizer considering a single operating condition. Application of PSO to design UPFC-based stabilizers 237 • • • Designing an individual UPFC-based stabilizer considering a wide range of operating conditions, i.e. robust control. Designing multiple UPFC-based stabilizers in a coordinated manner considering a wide range of operating conditions. Designing multiple UPFC-based stabilizers with different objectives in a coordinated manner using a time-domain objective function. 1.2 Definitions At this point, it is worth emphasizing the meaning of the following terms: Individual and coordinated designs: Individual design refers to the process of designing a single controller in the absence of any other controllers. Coordinated design, however, refers to the process of designing more than one controller concurrently so that coordination among the different controllers is achieved. Single-point and robust tuning: Single-point tuning refers to the situation where a single operating condition is considered in the design stage. Robust tuning refers to the situation where multiple operating conditions are considered in the design stage to achieve robustness. Simultaneous stabilization: Simultaneous stabilization refers to the technique used to design a controller taking into account several operating conditions. This technique guarantees the stability of the system at all the operating conditions considered in the design stage. The way simultaneous stabilization is implemented in this work, for the case of the eigenvaluebased objective function, is: 1. Declare a vector J 2. Pick an operating condition. 3. Linearize the system model around that operating condition. 4. Find the system complex eigenvalues and stack them in the vector J. 5. Repeat the same process (steps 2-4) until all operating conditions are covered. That is, vector J will contain all complex eigenvalues corresponding to all the considered operating conditions. 6. Search for the optimum controller’s parameters that will push all those complex eigenvalues of J furthest to the left of the complex s-plane. 2. Problem Statement Figure 1 shows a SMIB system equipped with a UPFC. The UPFC consists of an excitation transformer (ET), a boosting transformer (BT), two three-phase GTO based voltage source converters (VSCs), and a DC link capacitors. The four input control signals to the UPFC are mE, mB, δE, and δB, where mE is the excitation amplitude modulation ratio, mB is the boosting amplitude modulation ratio, δE is the excitation phase angle, and δB is the boosting phase angle. 2.1 Power System Nonlinear Model By applying Park’s transformation and neglecting the resistance and transients of the ET and BT transformers, the UPFC can be modeled as (Wang 1999a); Abido et al, 2006b): 238 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization : vEtd 0 v = Etq xE mE cos δ E vdc − xE iEd 2 i + m sin δ v 0 Eq E E dc 2 mB cos δ Bvdc − xB iBd 2 + 0 iBq mB sin δ Bvdc 2 xT vBt Line 2 VSC-E VSC-B (1) vBtd 0 v = Btq xB vEt v xtE (2) iTL iB iE Line 1 xB BT xBV i xE ET mE δE vdc mB δB Figure 1. SMIB power system equipped with UPFC vdc = • 3mE cos δ E 4C dc iEd 3mB iBd sin δ E + cos δ B sin δ B i iEq 4C dc Bq (3) where vEt, iE, vBt, and iB are the excitation voltage, excitation current, boosting voltage, and boosting current, respectively; Cdc and vdc are the DC link capacitance and voltage, respectively. The ET, BT and line 2 currents can be stated as: iTLd = iTLq = 1 m sin δ E vdc ( xEiEd + E − vb cos δ ) xT 2 1 m cos δ E vdc ( xEiEq − E + vb sin δ ) xT 2 (4) (5) iEd = xBB ' m sin δ Bvdc m sin δ E vdc + xd 5 vb cos δ + xd 6 E Eq + xd7 B xd 2 2 2 mB cos δ B vdc m cos δ E vdc + xq 5 vb sin δ + xq 6 E 2 2 (6) (7) (8) iEq = xq 7 iBd = xE ' xd 1 mB sin δ Bvdc m sin δ E vdc + xd 3 vb cos δ + xd 4 E Eq − xd 2 xd 2 2 2 Application of PSO to design UPFC-based stabilizers 239 iBd = xq 1 mB cos δ B vdc m cos δ E vdc + xq 3 vb sin δ + xq 4 E 2 2 xq 2 (9) where xE and xB are the ET and BT reactances, respectively; the reactances xqE, xdE, xBB, xd1xd7, and xq1- xq7 are as shown in (Abido et al, 2006b). The non-linear model of the SMIB system of Figure 1 is: δ = ωb (ω − 1) ω = ( Pm − Pe − D(ω − 1))/ M ' ' ' Eq = (E fd − ( xd − x'd )id − Eq )/Tdo • • • (10) (11) (12) (13) • E fd = (K A (Vref − v + uPSS ) − E fd )/TA 2 2 ' where Pe = vd id + vq iq , v = ( vd + vq )1/2 , vd = xq iq , vq = Eq − x'd id , id = iEd + iBd , iq = iEq + iBq Pm and Pe are the input and output power, respectively; M and D the inertia constant and damping coefficient, respectively; ωb the synchronous speed; δ and ω the rotor angle and speed, respectively; Eq', E'fd, and v the generator internal, field and terminal voltages, respectively; T'do the open circuit field time constant; xd, x'd, and xq the d-axis reactance, daxis transient reactance, and q-axis reactance, respectively; KA and TA the exciter gain and time constant, respectively; Vref the reference voltage; and uPSS the PSS control signal. 2.2 Power System Linearized Model The non-linear dynamic equations can be linearized around a given operating point to have the linear model given by: & x = Ax + Bu (14) where the state vector x, control vector u, and matrices A and B are x = ∆δ u = ∆upss 0 − K1 M − K4 A= Tdo ′ − K AK 5 T A K7 ′ ∆ω ∆Eq ∆mE ωb D − M 0 0 0 − ∆E fd ∆mb 0 0 1 ′ Tdo − 1 TA 0 ∆vdc T (15) T ∆δ E 0 K −2 M K3 − ′ Tdo K AK 6 TA K8 ∆δ b (16) 0 K pd − M K qd − ′ Tdo KK − A vd TA −K 9 (17) 240 0 0 B= 0 KA T A 0 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 0 K pe M Kqe 0 K pδ e M Kqδ e 0 K pb M Kqb 0 K pδ b − M Kqδ b − ′ Tdo KK − A vδ b TA Kcδ b − − − − − − (18) ′ Tdo K AK ve − TA Kce ′ Tdo K AK vδ e − TA Kcδ e ′ Tdo K AK vb − TA Kcb where K1 – K9, Kpu, Kqu, and Kvu are linearization constants. 2.3 Structures of UPFC Controllers The UPFC damping controllers are of the structure shown in Figure 2, where u can be mE, δE, mB, or δB. In order to maintain the power balance between the series and shunt converters, a DC voltage regulator must be incorporated. The DC voltage is controlled through modulating the phase angle of the ET voltage, δE. In addition, to dispatch the power flow among transmission lines, a power flow controller is included. The power flow is controlled through modulation the amplitude of the BT voltage, mB. Therefore, the δE and mB damping controllers to be considered are those shown in Figure 3 and Figure 4, where the DC voltage regulator and the power flow controller are PI-controllers. 2.4 Objective Functions and Stabilizers’ Design To select the best stabilizer parameters that enhance most the power system transient performance, two objective functions are considered, one is eigenvalue-based and the other is time-domain-based. The eigenvalue-based objective function is: Je = max[σ] (19) where σ is a vector of the real parts of all the complex eigenvalues (the damping factors) of the system at all loading conditions considered. uref + + K s u 1 + sT s ∆ω K 1 + sT1 1 + sT3 1 + sTw 1 + sT2 1 + sT4 sTw Figure 2. UPFC with lead-lag damping controllers The objective function Je identifies the maximum value of the damping factors, i.e. the real parts of the eigenvalues, among all the system complex modes of all loading conditions considered in the design process. Hence, the goal is to Minimize Je to shift the poorly damped eigenvalues to the left in the s-plane improving the system response settling time and enhancing the system relative stability. It is worth emphasizing that by minimizing Je, Application of PSO to design UPFC-based stabilizers 241 all the operating conditions considered in the design stage are damped simultaneously. It is noteworthy that Je is used to design the damping controllers only. That is, the UPFC DC voltage regulator and power flow controller must be designed beforehand. In order to be able to design the damping controller, DC voltage regulator, and power flow controller in a coordinated manner, a time-domain-based objective function is used. This objective function is called the integral of time multiplied by absolute error (ITAE) and is defined as Jt = α ∫ t|∆ω|dt + β ∫ t|∆Pe 2 |dt + γ ∫ t|∆Vdc | dt (20) where ∆ω, ∆Pe2, and ∆Vdc are the deviations in system speed, real power flow of line 2, and DC voltage of the capacitor link, α, β, and γ are weighting factors. vDC vDCref δEref k dp + k di s + + K s 1 + sT s δE + + ∆ω K 1 + sT1 1 + sT3 1 + sTw 1 + sT2 1 + sT4 sTw Figure 3. UPFC with lead-lag damping controller and DC voltage regulator Pe2 Pe2ref mBref k pp + k pi s + + K s mB + 1 + sT s + ∆ ω K 1 + sT1 1 + sT3 1 + sTw 1 + sT2 1 + sT4 sTw Figure 4. UPFC with lead-lag damping controller and power flow controller Hence, the design problem can be formulated as: minimize J Subject to K min ≤ K j ≤ K max j j T min ≤ T ≤ T max ji ji ji 242 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization where i = 1, 2, 3, or 4, and Kj and Tji are the gain and time constants of the jth damping controllers. The proposed approach employs PSO to search for the optimum parameter settings of the given controllers. 3. Controllability Measure To measure the controllability of the EM mode by a given input (control signal), the singular value decomposition (SVD) is employed. The matrix B can be written as B = [b1 b2 b3 b4 b5] where bi is a column vector corresponding to the ith input. The minimum singular value, σmin, of the matrix [λI-A bi] indicates the capability of the ith input to control the mode associated with the eigenvalue λ. Actually, the higher the σmin, the higher the controllability of this mode by the input considered. As such, the controllability of the EM mode can be examined with all inputs in order to identify the most effective one to control the mode. (Hamdan, 1999; Al-Awami et al, 2005) 4. Particle Swarm Optimization Particle Swarm Optimization (PSO) was introduced first in (Kennedy & Eberhart, 1995). PSO approach features many advantages; it is simple, fast and can be coded in few lines. Also, its storage requirement is minimal. Moreover, this approach is advantageous over evolutionary and genetic algorithms in many ways. First, PSO has memory. That is, every particle remembers its best solution (personal best – pbest) as well as the group best solution (global best – gbest). Another advantage of PSO is that the initial population of the PSO is maintained, and so there is no need for applying operators to the population, a process that is time- and memory-storage consuming. (Kennedy & Eberhart, 1995; Eberhart & Kennedy, 1995; Shi & Eberhart, 1998) PSO starts with a population of random solutions “particles” in a D-dimension space. The ith particle is represented by Xi=(xi1, xi2, …, xiD). PSO consists of, at each step, changing the velocity of each particle toward its pbest and gbest according to equation (21). The velocity of particle i is represented as Vi=(vi1, vi2, …, viD). The position of the ith particle is then updated according to equation (22) (Kennedy & Eberhart, 1995; Eberhart & Kennedy, 1995; Shi & Eberhart, 1998). vid = wvid + c1r1 ( pid − xid ) + c 2 r2 ( p gd − x gd ) xid = xid + vid (21) (22) where, pid = pbest and p gd = gbest An excellent simplified description of the PSO algorithm can be found in (Abido, 2001). Figure 5 shows a flow chart of the PSO algorithm that is adopted for this specific problem. It is described as follows: Step 1: Define the problem space and set the boundaries, i.e. the acceptable limits of the controller parameters. Step 2: Initialize an array of particles with random positions and their associated velocities inside the problem space. These particle positions represent the initial set of solutions. Application of PSO to design UPFC-based stabilizers 243 Set limits of K’s and T’s Start with random set of particle positions (x) and velocities (v) Are limits satisfied? YES Evaluate fitness function (f) for each particle j=j+1 NO Adjustment Is (f < pbest) NO Evaluate best fitness function (ff) among all the particles Is (ff < gbest) NO Is stopping criteria satisfied? NO Change v YES Set pbest = f YES Set gbest = ff YES Terminate Change x Figure 5. Particle Swarm Optimization algorithm Step 3: Check if the current position is inside the problem space or not. If not, adjust the positions so as to be inside the problem space. Step 4: Evaluate the fitness value of each particle. Step 5: Compare the current fitness value with the particles’ previous best value (pbesti). If the current fitness value is better, then assign the current fitness value to pbesti and assign the current coordinates to pbestxi coordinates. Step 6: Determine the current global minimum among particle’s best position. 244 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Step 7: If the current global minimum is better than gbest, then assign the current global minimum to gbest and assign the current coordinates to gbestx coordinates. Step 8: Change the velocities according to (21). Step 9: Move each particle to the new position according to (22) and return to Step 3. Step 10: Repeat Step 3- Step 9 until a stopping criteria is satisfied. To adopt the PSO algorithm so that simultaneous stabilization is achieved, i.e. several operating points are considered simultaneously, the fitness function evaluation process contains an inner loop, see Figure 6. That is, for every operating point i, the objective Ji is computed. Then, J = max(J1, J 2 ,..., J N op ) , where Nop is the number of operating points considered, is evaluated. (Al-Awami et al, 2006a; Al-Awami et al, 2007; Abido et al, 2006b) The proposed PSO–based approach was implemented using a MATLAB library built by the authors. In all implementations, the inertia weight, w, is linearly decreasing from 0.9 to 0.4, c1 and c2 are selected as 2, and the maximum number of iterations is 400. 5. Simulation Results 5.1 Electromechanical Mode Controllability Measure Singular value decomposition (SVD) is employed to measure the controllability of the electromechanical mode (EM) from each of the four UPFC inputs: mE, δE, mB, and δB. For comparison, the power system stabilizer input, upss, is also included. The minimum singular value, σmin, is estimated over a wide range of operating conditions. For SVD analysis, Pe ranges from 0.05 to 1.4 pu and Qe= [-0.4, 0, 0.4]. At each loading condition, the system model is linearized, the EM mode is identified, and the SVD-based controllability measure is implemented. (Al-Awami et al, 2007) Select an operating point i Select a new operating point i=i+1 Evaluate the fitness value for i Jei= σ or Jti = α ∫ t|∆ω|dt + β ∫ t|∆Pe 2 |dt + γ ∫ t|∆Vdc | dt NO Are all operating points considered YES J = max(J1, J 2 ,..., J N ) op Evaluate the obj. fun. Figure 6. Particle Swarm Optimization adopted for simultaneous stabilization Application of PSO to design UPFC-based stabilizers 245 For comparison purposes, the minimum singular value for all inputs at Qe = - 0.4, 0.0 and 0.4 pu is shown in Figures 7, 8, and 9, respectively. From these figures, the following can be noticed: EM mode controllability via δE is always higher than that of any other input. • • The capabilities of δE and mB to control the EM mode is higher than that of PSS. • The EM mode is more controllable with PSS than with either mE or δB. All control signals except mB at Qe = 0 and δE suffer from low controllability to EM mode • at low loading conditions. 5.2 Design and Analysis Using Eigenvalue-based Objective Function Je In this section, stabilizer design is carried out using the eigenvalue-based objective function, Je, given by (19). Both single-point tuning and robust tuning using simultaneous stabilization are presented. A coordinated design of stabilizers is also demonstrated. The system used is that shown in Figure 1 and the system data used is given in the Appendix. (Al-Awami et al, 2007; Al-Awami et al, 2005; Al-Awami et al, 2006) To assess the effectiveness of the proposed controllers, four different loading conditions are considered for eigenvalue analysis, see Table 1. Moreover, the nominal and light loading conditions with 6-cycle three-phase fault disturbances are considered for nonlinear time-domain simulations. Loading Condition Nominal Light Heavy Leading Pf (Pe, Qe) pu (1.0, 0.015) (0.3, 0.015) (1.1, 0.400) (0.7, -0.30) Table 1. Loading conditions 5.2.1 Single-point Tuning Using Je The PSS, mE-, δE-, mB-, and δB-based stabilizers are designed individually considering the nominal loading condition. PSO is used to search for the optimum parameter settings of each controller individually so as to minimize the maximum damping factor of all the system complex eigenvalues at nominal loading condition. The final settings of the optimized parameters for the proposed stabilizers and the minimum damping factors achieved are given in Table 2. The system electromechanical mode without and with the proposed stabilizers at the four operating points, nominal, light, heavy, and leading Pf, are given in Table 3. Table 3 clearly demonstrate the effectiveness of the δE- and mB-based stabilizers in enhancing system stability. Again, It can be observed that, in most cases, the EM mode is either unstable or poorly damped when driven by mE- or δB-based stabilizers. This conclusion is in line with those already drawn from SVD analysis. Because of their poor performance, the mE- and δBbased stabilizers will be excluded from the analysis hereafter. The system behaviour due to the utilization of the proposed controllers under transient conditions has been tested by applying a 6-cycle 3-phase fault at the infinite bus at t = 1s. The system response at nominal loading is shown in Figures 10 and 11, and the response at light loading is shown in Figures 12 and 13. From these figures, the following can be observed: • The three stabilizers designed with the proposed PSO-based technique effectively improve the stability of the power system under study. 246 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization • • As expected from SVD analysis, the δE-based stabilizer is robust to operating point variations. Both UPFC-based stabilizer outperform the PSS in terms of their effect on voltage profile. Figure 7. Minimum singular value with all stabilizers at Qe = – 0.4 Figure 8. Minimum singular value with all stabilizers at Qe=0.0 Figure 9. Minimum singular value with all stabilizers at Qe=0.4 Application of PSO to design UPFC-based stabilizers 247 PSS K T1 T2 T3 T4 Je 29.26 2.92 1.19 0.13 0.01 -5.44 mE -29.83 0.25 2.46 2.95 0.01 -1.69 δE -100.00 5.00 1.08 0.06 1.44 -4.63 mB 100.00 0.11 0.01 2.18 2.35 -4.15 -72.89 2.02 0.13 2.94 2.42 -1.39 δB Table 2. Optimal parameter settings with Je, single-point tuning, individual design No Control N L H Lpf 1.50 ± 5.33i 1.39 ± 5.08i 1.41 ± 5.00i 1.45 ± 5.35i PSS mE δE mB δB -5.44 ± 0.18i -1.69 ± 7.62i -4.62 ± 5.88i -4.15 ± 6.06i -1.39 ± 6.02i -1.10 ± 4.67i 0.90 ± 5.37i -3.17 ± 5.88i -3.24 ± 6.88i 1.30 ± 5.12i -1.71 ± 2.00i 0.08 ± 7.05i -1.81 ± 1.74i -4.62 ± 3.75i -1.79 ± 5.48i -5.70 ±16.79i -0.81 ± 6.34i -1.97 ± 5.48i -1.37 ± 6.07i -0.26 ± 5.58i Table 3. System electromechanical modes at all loading conditions with no parameter uncertainties with Je settings, single-point tuning, individual design (N: Nominal, L: Light, H: Heavy, Lpf: Leading power factor) 5.2.2 Robust Tuning with Simultaneous Stabilization Using Je In this situation, the objective is to design robust stabilizers to ensure their effectiveness over a wide range of operating conditions. Both individual and coordinated designs are considered. The design process takes into account several loading conditions including nominal, light, heavy, and leading Pf conditions. These conditions are considered without and with system parameter uncertainties, such as machine inertia, line impedance, and field time constant. The total number of 16 operating conditions is considered during the design process as given in Table 4. Figure 10. Speed response for 6-cycle fault with nominal loading, Je settings, single-point tuning, individual design 248 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Figure 11. Terminal voltage response for 6-cycle fault with nominal loading, Je settings, single-point tuning, individual design Figure 12. Speed response for 6-cycle fault with light loading, Je settings, single-point tuning, individual design Figure 13. Terminal voltage response for 6-cycle fault with light loading, Je settings, singlepoint tuning, individual design Application of PSO to design UPFC-based stabilizers 249 Loading Condition N L H Lpf (Pe, Qe) pu (1.0, 0.015) (0.3, 0.100) (1.1, 0.100) (0.7, -0.30) Parameter Uncertainties No parameter uncertainties 30% increase of line reactance XBV 25% decrease of machine inertia M 30% decrease of field time constant T'do Table 4. Loading conditions and parameter uncertainties considered in the design stage Table 5 lists the open-loop eigenvalues associated with the electromechanical modes of all the 16 operating points considered in the robust design process, respectively. It is evident that all these modes are unstable. In the individual design, the PSS, δE-, and mB--based stabilizers are designed individually considering all the operating points mentioned above. PSO is used to optimize the parameters of each controller that minimize the maximum damping factor of all the complex eigenvalues associated with the 16 operating points simultaneously. The final settings of the optimized parameters for the proposed stabilizers and the minimum damping factors achieved are given in Table 6. The system electromechanical mode without and with the proposed stabilizers at the four operating points, nominal, light, heavy, and leading Pf, are given in Table 7. Table 7 clearly demonstrate the effectiveness of the proposed stabilizers in enhancing system stability. Comparing Table 7 with Table 3, the effectiveness of robust tuning with simultaneous stabilization can be observed. For example, the maximum damping factor of the system electromechanical modes using single-point tuning for PSS is -1.10. However, the maximum damping factor using robust tuning with simultaneous stabilization is -2.58. The system behaviour due to the utilization of the proposed stabilizers under transient conditions has been tested by applying a 6-cycle 3-phase fault at the infinite bus at t = 1s. The system response at nominal loading is shown in Figures 14 and 15, and the response at light loading is shown in Figures 16 and 17. These simulation results prove the effectiveness of the proposed technique in designing robust stabilizers. It can be observed by comparing Figure 12 with Figure 16 that including the light loading condition in the robust tuning technique helped improve PSS response to transients in the system. In addition, it can be readily seed again that both UPFC-based stabilizer outperform the PSS in terms of their effect on voltage profile. No parameter uncertainties N L H Lpf 1.50 ± 5.33i 1.39 ± 5.08i 1.41 ± 5.00i 1.45 ± 5.35i 30% increase of line reactance X 1.41 ± 4.99i 1.32 ± 4.74i 1.25 ± 4.52i 1.40 ± 5.08i 25% decrease of machine inertia M 1.80 ± 5.94i 1.67 ± 5.66i 1.70 ± 5.57i 1.74 ± 5.97i 30% decrease of field time constant T'do 1.5034 ± 5.40i 1.3951 ± 5.09i 1.4038 ± 5.08i 1.4498 ± 5.39i Table 5. Open-loop eigenvalues associated with the EM modes of all the 16 points considered in the robust design process Although the controllability measure analysis based on the singular value decomposition and the nonlinear time-domain simulation show the relative robustness of the δE-based 250 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization stabilizer in damping the EM mode oscillation, there is still room for more improvement through coordination with the mB-based stabilizer. In the following, the coordinated design of δE- and mB-based stabilizers is considered at all the 16 operating points described earlier. PSO is used to simultaneously search for the optimum parameter settings of both controllers that minimize the maximum damping factor of all the system complex eigenvalues at all the 16 operating points concurrently. The final settings of the optimized parameters for the proposed stabilizers are given in Table 8. PSS K T1 T2 T3 T4 Je 95.58 4.34 0.01 0.07 3.51 -1.95 δE -100.00 5.00 1.03 0.06 1.54 -1.77 mB 96.8 4.99 2.57 0.12 0.01 -3.54 Table 6. Optimal parameter settings with Je, multiple-point tuning, individual design No Control N L H Lpf 1.50 ± 5.33i 1.39 ± 5.08i 1.41 ± 5.00i 1.45 ± 5.35i PSS -2.58 ± 17.5i -3.91 ± 3.62i -2.80 ± 17.0i -2.72 ± 16.2i δE -3.52 ± 5.32i -2.93 ± 5.65i -1.92 ± 1.76i -1.82 ± 5.47i mB -3.91± 12.7i -3.71 ± 12.1i -3.56± 13.1i -3.53 ± 2.61i Table 7. System electromechanical modes at all loading conditions with no parameter uncertainties with Je settings, robust tuning, individual design Figure 14. Speed response for 6-cycle fault with nominal loading, Je settings, robust tuning, individual design The system electromechanical modes without and with the proposed δE- and mB-based controllers when applied individually and through coordinated design at the four loading conditions; nominal, light, heavy, and leading Pf, are given in Table 9. It is evident that the damping factor of the EM mode is greatly enhanced using the proposed coordinated stabilizers design. Application of PSO to design UPFC-based stabilizers 251 Figure 15. Terminal voltage response for 6-cycle fault with nominal loading, Je settings, robust tuning, individual design Figure 16. Speed response for 6-cycle fault with light loading, Je settings, robust tuning, individual design Figure 17. Terminal voltage response for 6-cycle fault with light loading, Je settings, robust tuning, individual design 252 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Moreover, the nonlinear time-domain simulations are carried out at the nominal and light loading conditions specified previously. The speed deviations, DC voltage, electrical power, and δE and mB control signals for a 6-cycle three-phase fault at nominal loading conditions are shown in Figures 18-22, respectively. The simulation results indicate a clear enhancement of the proposed coordinated δE-mB design over both individual designs. This enhancement can be easily recognized from the sound reduction in overshoot and settling time of the speed, electrical power and DC voltage responses as well as the reduction in the control efforts of the coordinated design as compared with the control efforts of the two individual designs. Similar conclusions can be drawn from light loading results. Due to limitation in space, only speed deviations at light loading conditions are shown, see Figure 23. It is noteworthy that using coordination, the problem of low effectiveness of the mBbased stabilizer individual designs at light loading level has been solved. Individual δE K T1 T2 T3 T4 Loading N L H Lpf -100.00 5.00 1.03 0.06 1.54 δE -3.52 ± 5.32i -2.93 ± 5.65i -1.92 ± 1.76i -1.82 ± 5.47i 96.8 4.99 2.57 0.12 0.01 mB -66.18 1.53 1.61 4.42 3.95 mB -3.91 ± 12.72i -3.71 ± 12.19i -3.56 ± 13.12i -3.53 ± 2.61i δE 100.00 5.00 3.09 5.00 3.32 δ E & mB -7.51 ± 10.64i -5.81 ± 11.04i -7.21 ± 11.65i -5.86 ± 6.46i Coordinated mB Table 8. Optimal parameter settings with Je, multiple-point tuning, coordinated design Table 9 System eigenvalues with all the stabilizers at different loading conditions 5.3 Coordinated Design of Damping Stabilizers and Internal Controllers Using Timedomain-based Objective Function Jt In this section, stabilizer design is carried out using the time-domain-based objective function, Jt, given by (20). Using Jt, the need for linearizing the nonlinear power system model is eliminated. That is, the nature of the objective function makes it suitable for both linear and nonlinear systems (Al-Awami et al, 2006b; Abido et al, 2006b). Moreover, it is possible to design several controllers with different objectives in a coordinated manner (Abido et al, 2006b). As will be shown, using the time-domain-based objective function, it is possible to design the UPFC damping controller, DC voltage regulator, and power flow controller, each of which has a different objective, in a coordinated manner. In this section, a coordinated design of UPFC damping stabilizers and internal controllers at nominal loading conditions is demonstrated. The effectiveness of the proposed controllers in damping low frequency oscillations is verified through eigenvalue analysis and non-linear time simulation. A comparison with a sequential design of the controllers under study is also included. The system used is that shown in Figure 1 and the system data used is given in the Appendix. (Abido et al, 2006b) Application of PSO to design UPFC-based stabilizers 253 Figure 18. Speed response for 6-cycle fault with nominal loading, Jt settings, robust tuning, coordinated design Figure 19. UPFC DC voltage response for 6-cycle fault with nominal loading, Jt settings, robust tuning, coordinated design Figure 20. Electrical Power response for 6-cycle fault with nominal loading, Jt settings, robust tuning, coordinated design 254 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Figure 21. δE control signal response for 6-cycle fault with nominal loading, Jt settings, robust tuning, coordinated design Figure 22. mB control signal response for 6-cycle fault with nominal loading, Jt settings, robust tuning, coordinated design Figure 23. Speed signal response for 6-cycle fault with light loading, Jt settings, robust tuning, coordinated design Application of PSO to design UPFC-based stabilizers 255 5.3.1 Sequential Controller Design In this stage, the three controllers are designed sequentially (Abido et al, 2006b). That is, (1) the DC voltage regulator (VR) is designed first, then (2) the power flow controller (PFC) is designed in the presence of the regulator, and finally (3) the damping controllers (DC) are designed, one at a time, in the presence of the other two controllers (VR and PFC). In each step, PSO has been used to find the optimum parameters of each controller that optimize the objective function defined by (20). A nominal loading condition has been considered in the design stage, see Table 10. Since each of the three controllers has a different function, the objective function weights and the disturbances used in the design stage are different. Table 11 shows the details of each step in the sequential design. Step (1) resulted in the following optimum parameters for the DC voltage regulator: kdp = – 4.56, kdi = – 19.98. Step (2) resulted in the following optimum parameters for the power flow controller: kpp = 0.0005, kpi = – 0.0047. The final settings of the optimized parameters for the proposed damping controllers are given in Table 12. To test the performance of these stabilizers, eigenvalue analysis and nonlinear time-domain simulations are carried out. The system data is given in the Appendix The system EM modes and their corresponding damping ratios with the PSS and UPFC-based controllers when tested at nominal loading are given in Table 13. Moreover, the speed deviations for a 6-cycle three-phase fault at nominal loading conditions are shown in Figure 24. It is evident that the sequential designs give rise to poorly damped or even unstable responses. Loading Condition Nominal Light Table 10. Loading Conditions Controller VR PFC DC Weights of J Pe (pu) 1.000 0.300 Qe (pu) 0.015 0.100 α 0 0 1 β 0 1 0 γ 1 0 0 Disturbance step change in VDCref step change in Pe2ref Impulse change in Pm Table 11. Objective Function Weights and Disturbances Used in Steps (1)-(3) for the Sequential Design δE K T1 T2 T3 T4 J 83.94 1.18 1.01 1.50 0.57 36.21 mB 92.31 0.40 0.63 1.49 0.72 139.88 PSS 71.37 0.27 0.69 0.34 0.05 0.29 Table 12. The Optimal Parameter Settings of the Individual Controllers – Sequential Design 256 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization δE EM mB 1.79 ± 7.39i -0.24 PSS -0.80 ± 5.04i 0.16 ζ 1.30 ± 3.10i -0.39 Table 13. System Eigenvalues of the Individual Controllers at Nominal Loading – Sequential Design Figure 24. Speed response for a 6-cycle fault with nominal loading – sequential design 5.3.2 Coordinated Controller Design In this stage, the three controllers are designed in a coordinated manner (Abido et al, 2006b). That is, PSO is used to concurrently find the optimum parameters of the VR, PFC, and DC minimizing the error objective function defined in (20). In order to end up with the optimum controllers, the objective function weights and the disturbances have to be selected carefully. Table 14 shows the objective function weights used in every case. In all cases, the following two disturbances have been used: 1. An impulse change in Pm 2. A step change in Pe2ref. The final settings of the optimized parameters for the proposed controllers are given in Table 15. To test the performance of the proposed stabilizers, eigenvalue analysis and nonlinear timedomain simulations are carried out. The system EM modes and their corresponding damping ratios with the proposed PSS and UPFC-based controllers when tested at nominal and light loading conditions are given in Table 16. It is evident that system stability is greatly enhanced by the proposed coordinated designs. Damping Controller δE mB PSS Weights of J α 100 120 100 β 1 1 1 γ 30 10 10 Table 14. Objective Function Weights and Disturbances Used in the Simultaneous Design Application of PSO to design UPFC-based stabilizers 257 δE K T1 T2 T3 T4 kpp kpi kdp kdi J 100.00 1.28 0.76 0.05 0.57 0.51 -0.92 -7.69 -2.19 124.9 mB 100.00 1.50 0.49 1.50 0.49 -13.21 -14.60 -20.00 -15.46 35.0 PSS 1.64 0.62 0.17 1.01 0.05 -19.93 -17.44 -13.77 -5.41 27.0 Table 15. The Optimal Parameter Settings of the Individual Controllers – Simultaneous Design EM δE -2.15 ± 6.97i 0.30 -2.18 ± 6.59i 0.31 mB -2.37 ± 6.49i 0.34 -2.44 ± 6.30i 0.36 PSS -1.97 ± 5.25i 0.35 -1.80 ± 8.72i 0.20 N L ζ ζ EM Table 16. System Eigenvalues of the Individual Controllers at Nominal (N) and Light (L) Loading – Simultaneous Design Moreover, the nonlinear time-domain simulations are carried out at nominal and light loading conditions. The deviations in speed, power flow of line 2, and DC voltage for a 6cycle three-phase fault at nominal loading condition are shown in Figures 25-27, respectively. From these figures, it is observed that: • The proposed coordinated designs give rise to superior responses. After the fault, the three signals shown in Figures 25-27 have settled with no steady• state error, excellent settling time, and reasonably good overshoot. The δE-based controller outperforms the mB-based controller and PSS, especially in • terms of overshoot. Figure 25. Speed response for a 6-cycle fault with nominal loading – Coordinated design 258 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Figure 26. Power flow response of line 2 for a 6-cycle fault with nominal loading – Coordinated design Figure 27. DC voltage response for a 6-cycle fault with nominal loading – Coordinated design Figure 28. Speed response for a 6-cycle fault with light loading – coordinated design Application of PSO to design UPFC-based stabilizers 259 Figure 29. Power flow response of line 2 for a 6-cycle fault with light loading – simultaneous design Figure 30. DC voltage response for a 6-cycle fault with light loading – simultaneous design In addition, the deviations in torque angle, power flow of line 2, and DC voltage for a 6cycle three-phase fault at light loading conditions are shown in Figures 28-30, respectively. From these figures it can be concluded that the δE-based controller is the most effective controller in terms of overshoot, settling time, and steady-state error. This shows that the performance of δE-based controller is almost unaffected with the loading level. The performance of mB-based controller and PSS, however, is degraded at this loading condition. 6. Conclusion In this work, the problem of enhancing the power system dynamic stability through individual and coordinated design of UPFC-based damping stabilizers has been investigated. The controllability of the electromechanical mode over a wide range of operating conditions by a given control input has been measured using a singular value decomposition-based approach. Such a study is very important as it laid the foundations of the requirements of the coordinated design problem. The stabilizer design problem has been formulated as an optimization problem with an eigenvalue-based as well as a time domain- 260 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization based objective functions, which was then solved by particle swarm optimization. The use of the first objective function results in placing the electromechanical modes of oscillations furthest to the left of the complex s-plane, thus improving the damping of these modes. The use of the second objective function results in improving the time domain specifications of the system performance in terms of overshoot and settling time. Individual design as well as coordinated design of the proposed stabilizers with and without system parameter uncertainties have been investigated and discussed. It has been concluded that the eigenvalue-based objective function can be used to design efficient individual as well as coordinated stabilizers. However, the time-domain-based objective function has the advantage of designing several controllers with different objectives in a coordinated manner. This feature has been utilized to design the UPFC damping stabilizers and internal controllers in a coordinated manner. In all cases, the damping characteristics of the proposed control schemes to low frequency oscillations over a wide range of operating conditions have been evaluated using the eigenvalue analysis. The effectiveness of the proposed control schemes in enhancing the power system dynamic stability has been verified through comprehensive nonlinear timedomain simulations for a variety of loading conditions. It was clearly shown that the coordinated design approach outperforms the individual designs. 7. Appendix M = 8.0s; x’d = 0.3; KA = 50; T’do = 5.044; xq = 0.6; TA = 0.05; D = 0.0; XT = 0.6; Tw = 5.0; xd = 1.0; uPSS ≤ 0.2 pu; E fd ≤ 7.3 pu; v = 1.05 pu; xtE = 0.1; xBV = 0.6; Ks = 1.0; Ts = 0.05; xE = 0.1; xB = 0.1; Cdc = 3; Vdc=2; All resistances and reactances are in pu and time constants are in seconds. Notes: 1. All simulations using the eigenvalue-based objective function Je are carried out assuming line 1 open, i.e. xT = ∞. 2. All simulations using the eigenvalue-based objective function Je are carried out assuming kdp = - 10 and kdi = 0. 8. References Abdel-Magid, Y.L.; Abido, M.A.; Al-Baiyat, S. & Mantawy, A.H. (1999). Simultaneous Stabilization of Multimachine Power Systems via Genetic Algorithms, IEEE Trans. on Power Sys., Vol. 14, No. 4, November 1999, pp. 1428-1439. Abido, M.A. & Abdel-Magid, Y.L. (1997). Radial basis function network based power system stabilizers for multimachine power systems, Intl. Conf. Neural Networks, Vol. 2, 9-12 June 1997, pp. 622 -626 Abido, M.A. (2001). Particle swarm optimization for multimachine power system stabilizer design, IEEE Power Eng. Society Summer Meeting, Vol. 3, 15-19 July 2001, pp. 1346 1351 Application of PSO to design UPFC-based stabilizers 261 Abido, M.A.; Al-Awami, A.T. & Abdel-Magid, Y.L. (2006a). Analysis and design of UPFC damping stabilizers for power system stability enhancement, IEEE Symposium on Industrial Electronics ISIE’2006, Vol. 3, July 2006, pp. 2040-2045 Abido, M.A.; Al-Awami, A.T. & Abdel-Magid, Y.L. (2006b). Power system stability enhancement using simultaneous design of damping controllers and internal controllers of a unified power flow controller, the 2006 IEEE PES General Meeting, June 2006, pages: 8 Al-Awami, A.T.; Abdel-Magid, Y.L. & Abido, M.A. (2005). Simultaneous stabilization of power systems equipped with unified power flow controller using particle swarm, The 15th Power Systems Computation Conference, Session 12, Paper 2, Aug. 2005, pp. 1-7 Al-Awami, A.T.; Abdel-Magid, Y.L. & Abido, M.A. (2006a). Simultaneous stabilization of power system using UPFC-based controllers, Electric Power Components and Systems, Vol. 34, No. 9, Sept 2006. pp. 941 – 959 Al-Awami, A.T.; Abido, M.A. & Abdel-Magid, Y.L. (2006b) Power system stability enhancement using unified power flow controllers,’ The 3nd Industrial Electrical and Electronics GCC Conference, IEEE-GCC3, March 2006 Al-Awami, A.T.; Abdel-Magid, Y.L. & Abido, M.A. (2007). A particle-swarm-based approach of power system stability enhancement with unified power flow controller, Int’l J. Electrical Power & Energy Syst.,Vol. 29, 3, March 2007, pp. 251-259 Chen, C.L. & Hsu, Y.Y. (1987). Coordinated synthesis of multimachine power system stabilizer using an efficient decentralized modal control (DMC) algorithm, IEEE Trans. on Power Systems, Vol. 9, No. 3, pp. 543-551 Dash, P.K.; Mishra, S. & Panda, G. (2000). A radial basis function neural network controller for UPFC, IEEE Trans.Power Systems, Vol. 15, No. 4, Nov. 2000, pp. 1293 -1299 Eberhart, R. & Kennedy J. (1995). A new optimizer using particle swarm theory, Proc. the Sixth Intl. Symposium on Micro Machine and Human Science, 4-6 Oct 1995, pp. 39 -43 Gibbard, M.J. (1988). Co-ordinated design of multimachine power system stabilisers based on damping torque concepts, IEE Proc. Pt. C, Vol. 135, No. 4, pp. 276-284. Hamdan, A.M.A. (1999). An investigation of the significance of singular value decomposition in power system dynamics, Int. Journal Electrical Power and Energy Systems, 21, pp. 417-424 Heffron, W.G. & Phillips, R.A. (1952). Effect of modern amplidyne voltage regulators on under-excited operation of large turbine generator, AIEE Trans. Power Apparatus and Systems, Aug 1952, pp. 692-697. Huang, Z.; Yinxin, N.; Shen, C.M.; Wu, F.F.; Chen, S. & Zhang, B. (2000). Application of unified power flow controller in interconnected power systems-modeling, interface, control strategy, and case study, IEEE Trans. Power Systems, Vol. 15, No. 2 , May 2000, pp. 817 -824 Kennedy, J. & Eberhart, R. (1995). Particle swarm optimization, Proc. IEEE Intl. Conf. Neural Networks, 4, Nov/Dec 1995, pp. 1942 –1948. Klein, M.; Le, L.X.; Rogers, G.J.; Farrokhpay, S. & Balu, N.J. (1995). H∞ damping controller design in large power systems, IEEE Trans. on Power Systems, Vol. 10, no. 1, Feb. 1995, pp. 158 -166 262 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Mahran, A.R.; Hogg, B.W. & El-Sayed, M.L. (1992). Co-ordinated control of synchronous generator excitation and static VAR compensator, IEEE Trans. Energy Conversion, Vol. 7, Issue 4, Dec. 1992, pp. 615 -622. Mok, T.K.; Ni, Y. & Wu, F.F. (2000). Design of fuzzy damping controller of UPFC through genetic algorithm, IEEE Power Eng. Society Summer Meeting, Vol. 3, 16-20 July 2000, pp. 1889 - 1894 Nabavi-Niaki, A. & Iravani, M.R. (1996). Steady-state and dynamic models of unified power flow controller (UPFC) for power system studies, IEEE Trans. Power Systems, Vol. 11, No. 4, Nov. 1996, pp. 1937-1943 Pal, B.C. (2002). Robust damping of interarea oscillations with unified power flow controller, IEE Proc. Gen. Trans. and Distrib., Vol. 149, No. 6, pp. 733-738. Samarasinghe, V.G.D.C. & Pahalawaththa, N.C. (1997). Damping of multimodal oscillations in power systems using variable structure control techniques, IEE Proc. Gen. Trans. and Distrib., Vol. 144, No. 3, pp. 323-331. Seo, J.C.; Moon, S.; Park, J.K. & Choe, J.W. (2001). Design of a robust UPFC controller for enhancing the small signal stability in the multi-machine power systems, IEEE Power Eng. Society Winter Meeting, Vol. 3 , 28 Jan.-1 Feb. 2001, pp. 1197 -1202 Shi, Y. & Eberhart, R. (1998). A modified particle swarm optimizer, The 1998 IEEE Intl. Conf. on Evolutionary Computation Proc., IEEE World Congress on Computational Intelligence., 4-9 May 1998, pp. 69 – 73. Vilathgamuwa, M.; Zhu, X. & Choi, S.S. (2000). A robust control method to improve the performance of a unified power flow controller, Electric Power System Research, 55, pp. 103-111. Wang, H.F. (1999a). Damping function of unified power flow controller, IEE Proc. Gen. Trans. and Distrib., Vol. 146, No. 1, pp. 81-87. Wang, H.F. (1999b). Application of modeling UPFC into multi-machine power systems, IEE Proc. Gen. Trans. and Distrib., Vol. 146, No. 3, pp. 306-312. 15 CSV-PSO and Its Application in Geotechnical Engineering State Key Laboratory of Geomechanics and Geotechnical Engineering, Institute of Rock and Soil Mechanics, Chinese Academy of Sciences China 1. Introduction Since the particle swarm optimization (PSO), being a stochastic global optimization technique,was proposed by Kennedy and Eberhart in 1995(Kennedy & Eberhart, 1995; Eberhart & Kennedy, 1995), it has attracted interests of many researchers worldwide and has found many applications in various fields such as autocontrol, machinofacture, geotechnical engineering et al. (Mark & Feng, 2002; Dong et al, 2003; Su & Feng, 2005). There are two main reasons: one is the preferable performance of PSO, the other is its simplicity in operation. In order to avoid the premature and divergence phenomena often occurring in optimization process by using the PSO, especially for multi-dimension and multi-extremum complex problems, as well as to improve the convergence velocity and precision of the PSO to a maximum extent, many kinds of schemes were introduced to enhance the PSO. The following are some representative schemes: inertia weight (Shi & Eberhart, 1998), constriction factor (Eberhart & Shi, 2000), crossover operation (Lovbjerg et al, 2001) and selfadaptation (Lü & Hou, 2004). The PSO modified by introducing the inertia weight or crossover operation or self-adaptation technique has an excellent convergence capability with a decreased velocity of convergence. The PSO with a constriction factor can reach the global goal quickly, but the divergence phenomenon sporadically occurs in the optimized solutions. So we proposed an improved PSO, named CSV-PSO, in which flight velocity limit and flight space of particles are constricted dynamically with flying of particles (Chen & Feng, 2005). A great deal of numerical calculation indicates CSV-PSO has a faster convergence velocity, greater convergence probability and is a more stable. But this algorithm with a random number generator having time as its random seed may obtain different goal values at different running time. It is difficult to determine uniqueness of solution, especially for complicated engineering problem. So a random number generator with mixed congruential method is introduced to solve uncertainty of solution, and its random seed can be set artificially. To indicate advantage of the proposed algorithm, it is compared with other modified vertions and sensitivity analysis is carried out for its several important parameters, which the five benchmark functions are as examples. The results show CSV-PSO with a new random number generator is excellent. Back analysis which is based on monitoring information with numerical method is a very time-consuming job in geotechnical Bing-Rui Chen and Xia-Ting Feng 264 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization engineering field. It is necessary to introduce a scheme for improving calculation efficiency. A parallel strategy is adopted, and a parallel CSV-PSO with master-slave mode, called PCSV-PSO, is proposed. Finally, rheological parameters of soft and weak rock mass, as an engineering practical example, are identified using back analysis of displacement based on PCSV-PSO, at the No. 72 experimental tunnel, left bank of Longtan hydropower station, China. The results show that the proposed method is feasible, efficient and robust in multiparameter optimization and is a new analysis tool for engineering application. 2. PSO In PSO algorithm, the birds are abstractly represented as particles which are mass-less and volume-less and extended to D dimensional space. The position of the particle i in the D dimensional space is represented by a vector X i = ( X i1 , X i 2 ,⋅ ⋅ ⋅, X iD ) , and the flying velocity is represented by a vector Vi = (Vi1 ,Vi 2 ,⋅ ⋅ ⋅,ViD ) . The vectors Pi = ( Pi1 , Pi 2 ,⋅ ⋅ ⋅, PiD ) and Pg = ( Pg1 , Pg 2 ,⋅ ⋅ ⋅, PgD ) are the optimal position of the particle i recognized so far and the optimal position of the entire particle swarms recognized so far, respectively. The position of each particle in the D dimensional space, X i , is a tentative solution in the problem space. The fitness of the model, representing applicability of the X i , can be obtained by substituting X i to the target function. Therefore, the search procedure of PSO algorithm depends on interaction among particles. The position and velocity of the particle i can be updated as Eq.(1) and (2) ( Kennedy & Eberhart,1995; Shi & Eberhart,1998) . Vid = wVid + c1r 1( Pid − X id ) + c2 r 2 ( Pgd − X id ) (1) (2) X id = X id + Vid In which, w is inertia weight; c1 and c2 are constants for learning, c1 >0, c2 >0; r1 and r2 are random numbers in [0,1]; d = 1,2,⋅ ⋅ ⋅, D . The basic PSO algorithm has advantages of simple operation and convenient application. However, as other optimization algorithms such as genetic algorithms, the basic PSO algorithm has also the problems of premature and slow convergence, therefore, an improvement in accuracy is needed. 3. CSV-PSO In order to improve the convergence velocity and precision of the PSO algorithm, the CSVPSO algorithm which can adjust inertia weight, flight velocity limit and flight space of particles dynamically and nonlinearly was proposed. This Algorithm has been documented in our early paper (Chen & Feng, 2005). Random Number Generator and parallel CSV-PSO algorithm (PCSV-PSO) are described in detail and CSV-PSO algorithm is briefly introduced in this section. CSV-PSO and Its Application in Geotechnical Engineering 265 3.1 Random Number Generator Random number is the crucial factor for the performance of swarm intelligence algorithms, and a good random number generator can always get twice the result with half the effort. A algorithm with random number generator that time is as its random seed always tends to give different results in different runtime, which brings troubles for the final determination of solving proposal of engineering problems. To resolve this problem, a random number generator with the mixed congruential method is proposed in the paper. This generator can generate random numbers of uniform distribution in the interval of (0, 1) and random seed can be set artificially. A great deal numerical results show that this technique is excellent. The process of the generation of random seeds is as following. The iterative formulae of the mixed congruential method are: xi +1 = (λxi + c)(mod M ) ri +1 = xi +1 / M Where λ 、 x0 、 c and M are constants and can set beforehand, (3) (4) xi +1 is the remainder of M divided by λxi + c and ri +1 is a random number within the interval of (0, 1). Each random number generated by the mixed congruential method in accordance with an index number and is stored in an internal array after random number generator is initialized. If random number is needed, the random number generator will firstly call the computing function of the mixed congruential method to generate random integer used as index, then the random number is picked up from internal array in terms of the index, finally the random number generator carries out the mixed congruential method again to update the internal array. The random number sequences obtained by this method are much better than those obtained by common mixed congruential methods. The C language codes which are used to describe the above mentioned method are as follows: double CRandom::ran(long *idum) { // idum is random seed const long M1=259200l; const long IA1=7141l; const long IC1=54773l; const double RM1 = (1.0/M1); const long M3=243000l; const long IA3=4561l; const long IC3=52349l; static long ix1,ix2,ix3; static double r[98]; double temp; static int iff=0; long j; //int j; if (*idum < 0 || iff == 0) { ff=1; x1=(IC1-(*idum)) % M1; ix1=(IA1*ix1+IC1) % M1; 266 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization ix3=ix1 % M3; for (j=0;j<=97;j++) { ix1=(IA1*ix1+IC1) % M1; r[j]=ix1*RM1; } *idum=1; } ix1=(IA1*ix1+IC1) % M1; ix3=(IA3*ix3+IC3) % M3; j=(97*ix3)/M3; if (j > 97 || j < 0) cout<<"RAN: This cannot happen."<<endl; temp=r[j]; r[j]=ix1*RM1; return (double)temp; } 3.2 CSV-PSO 3.2.1 Inertia Weight The notion of inertia weight parameter is introduced by Shi and Eherhart (Shi & Eberhart, 1998) to control the impact of the previous history of velocities on current velocity. This enables to influence the tradeoff between global and local exploration abilities of the particles. A larger inertia weight facilitates global optimization, while smaller inertia weight facilitates local optimization.A decreasing inertia weight with iteration was introduced in terms of a linear formulation by Shi and Eherhart. A equation for ineria weight modification is proposed by a great deal numerical simulations here as following: ( w=w0 1-( k −1 n ) ) k (5) Where w0 is a constant given; k is number of fly; n is a constant determined for fitness function in global optimum problem. 3.2.2 Limit of the Flying Velocity The limit of the flying velocity of the particles is an important factor that affects velocity of convergence of the PSO (Eberhart & Shi, 2000).In fact, a good limitation is of advantage to both velocity and precision of convergence.Here we adopt Eq. (6) and (7) to determine limit of the flying velocity of the particles. In which, Upmax d , Downmin d , Vmax d , Vmin d are the upper limit and the lower limit of the position and the upper limit and lower limit of the velocity at d dimensional space, respectively, d = 1,2,⋅ ⋅ ⋅, D . The parameter α can be determined using Eq. (8). Vmax d = α (Upmax d − Downmin d ) Vmin d = α ( Downmin d − Upmax d ) (6) (7) (8) α=α(1-( 0 k −1 m )) k CSV-PSO and Its Application in Geotechnical Engineering 267 Where α 0 is a given constant; k is number of fly; m is a constant determined for fitness function in optimum problem. 3.2.3 Compression of Search Space Particles approach excellent domain step by step with the “flying” of particles continuously. If domain for searching global goal is compressed properly in the “flying” process, convergence of PSO will be accelerated. So the equations for compressing search space are introduced as following: ′ Upmax d = β 0 (Up′ d − Gcd ) + Gcd max ′ ′ Dow nmin d = β 0 ( Downmin d − Gcd ) + Gcd (9) (10) ′ Where 0 < β 0 < 1 ; Upmax d , Down′ d and Gcd are the upper limit, the lower limit and the min geometrical center of gravity of particle swarm in the d dimensional direction of the compressed space, respectively; Gcd can be calculated using Eq. (11) (Clerc, 1999) as Gcd = ∑x i =1 N pop id N pop (11) the No. i particle in Where N pop is the population of the particles; xid is position of the d dimensional direction. 3.2.4 CSV-PSO Algorithm In process of space compressing, on the one hand the global optimum probably is out of searching ranges so that the global goal is unable to be found, on the other hand flying velocity of particles is decreased, which can be obviously by Eq. (6) and (7), and the performance of the algorithm jumpting out local solution is reduced. Therefore, searching space and flying velocity limit can’t be compressed without limitations. The compression should is finished when limit of flying velocity is less a small given value. Particles may fly to the same local value with “flying” of particles continuouly. Therefore, stagnancy phenominon may occur in PSO (The so called stagnancy phenominon is that best particle doesn’t move toward any direction during “flying” of particles). If no measure is taken, the PSO may need a long time to get rid of the particle stagnancy or traps into local goal forever. Initializing partial particles’ position and flying velocity is an efficient method again when the present best particle is not move to global goal within some “flying” times. The particles are divided into two parts: one part are given new position and flying velocity in compressed space, the other is initialized in original space. These ensure that the algorithm have a better convergence precision and a faster convergence velocity. The whole optimized process of CSV-PSO is as following: Step 1: Initialize the inertia weight w0 , learning factors c1 and c2 , the population of group N pop , number of stagnancy generation N s , constants α0 and β 0 , and end remark of evolutionary process N g and ε 0 , go to Step 2. 268 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Step 2: The positions of the particles are randomly generated in Downmin ,Upmax . The limitations of flying velocity of the particles, Vmin and Vmax , are calculated using Eqs. (6) and (7). And then, the flying velocity of the particles is initialized randomly in Vmin ,Vmax . Set up n = 0 , go to Step 3. Step 3: Substitute X i to goal function to calculate the fitness of the No. i particle f ( X i ) . The b global optimal position of the particle swarm group X g and the best position of particle individual during the fly X ib are determined according to the fitness f ( X i ) , go to Step 4. b Step 4: Substitute X g to goal function to calculate the best fitness of this flying f gb . If f gb is obviously better than that of the former flying, go to Step 5. Otherwise, go to Step 6. Step 5: If f gb < ε 0 or n> N g , then the optimization process ends. Otherwise, let n = n + 1 , the position and flying velocity of the particles are updated by using Eqs. (1) and (2) and insured in Downmin ,Upmax and Vmin ,Vmax , go to Step 3. Step 6: Use Eq.(5) to dynamically update w . If f gb is not changed in all N s continuously, go to Step 7. Otherwise, go to Step 5; Step 7: Use Eq.(6) and (7) to modify dynamically the limit of flying velocity of the particles, and use Eqs. (9) and (10) to compress the search space of the particles, go to Step 8. Step 8: The particles are divided into two parts. One part is initialized in the compressed ' ' space Downmin , Upmax and another part is renewedly initialized in the original space Down , Up , go to Step 5. min max 3.3 Performance Analysis of CSV-PSO To test performance of the CSV-PSO with random numbers generated by the mixed congruential method, five nonlinear benchmark functions, whose basic characteristics and properties are listed as table 1, are used. To facilitate the description of the two CSV-PSO algorithms: one uses time as random seed, the other utilizes mixed congruential method to produce random numbers and random seed can be set artificially, the former is called CSVPSO1 and the latter is named CSV-PSO2. 3.3.1 Convergence Velocity For comparison, in all cases and all improved PSO algorithms, the population size was set to 30; the maximum number of iteration was set to 10,000; the factors for learning c1 and c2 are both set to 2.0 and five benchmark functions are set as shown in table 1. Inertia weights of CSV-PSO1 and CSV-PSO2 are set to 1.0 at the beginning of the run, different from that of Eberhart and Shi (Eberhart & Shi, 2000) and they can be decreased to a very small positive value by Eq. (5) .Newly introduced parameters N s , α 0 and β 0 are 50,0.9 and 0.8 respectively and the α calculated by Eq. (8) can’t be less 0.1. It is special for function Schaffer’s f6 that [ [ CSV-PSO and Its Application in Geotechnical Engineering 269 α 0 was set to 0.5 in CSV-PSO1. Each version of PSO is run 20 times for each test function, among them the first four are run randomly and the last are run with random seed from 5 to 950 by an increment 50 for each run. Average number of iteration and ranges of iteration number for five functions are listed in table 2 where each method is convergent by 20 runs. The result of the former three versions is gained by Eberhart and Shi (Eberhart & Shi, 2000), and the fourth was from our reference (Chen & Feng, 2005). Name Sphere Expression Dimension 2 i Ranges [-100,100]n Optimum Goal 0 0.01 f 0 ( x) = f1 ( x) = f 2 ( x) = f 3 ( x) = ∑x i =1 n−1 i =1 n n 30 Rosenbrock ∑ (100( x ∑ (x i =1 2 i i +1 − xi2 ) 2 + ( xi − 1) 2 ) 30 [-30,30]n 0 100 Rastrigrin − 10 cos(2πxi ) + 10) n 30 [-5.12,5.12]n 0 100 Griewank 1 4000 ∑ i =1 xi2 − ∏ cos( i =1 n xi i ) +1 30 [-600,600]n 0 0.1 Schaffer’s f6 f 6 ( x) = 0.5 + 2 2 (sin x1 + x2 ) 2 − 0.5 2 2 (1 + 0.001( x1 + x2 )) 2 2 [-100,100]n 0 10-5 Table 1. Five benchmark functions for testing Inertia Weight Sphere Rosenbrock Rastr-igrin Griewank Schaffer’s f6 Constriction Factor (Vmax=100000) 552.05 503-599 1424.1 475-4793 6823 233-7056 437 384-663 430.55 105-899 Constriction Factor ( Vmax=Xmax) 529.65 495-573 992 402-1394 213.45 161-336 312.6 282-366 532.4 94-2046 CSVPSO1 680.15 456-935 203.2 108-545 215.45 86-726 510.45 385-707 111.9 3-332 CSVPSO2 599.45 473-842 297.05 130-732 707.05 100-2060 622.26 318-3647 466.65 41-1981 N aver Nr 1537.8 1485-1615 3517.35 2866-4506 1320.9 743-1704 2757.7 2638-3035 512.35 339-748 N aver Nr N aver Nr N aver Nr N aver Nr Table 2. Convergence velocity of several versions of PSO for the five test functions N aver and N r are average value and ranges of convergent iteration number among 20 runs respectively in the table 2. For example, N aver and N r are average value and ranges of iteration number of 17 runs separately when there are 3 divergent runs in 20 runs. If one run doesn’t reach the goal in 10000 iterations, this run is regarded as divergence. Where constriction factor version (Vmax=100000) and improved constriction factor version (Vmax=Xmax) have one divergence 270 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization of 20 runs for function Rastrigrin for respectively; Constriction factor version (Vmax=100000) has 3 divergences, improved constriction factor version (Vmax=Xmax) has one divergence, and CSVPSO2 has one divergence for function Griewank among 20 runs. In comparison with other versions, CSV-PSO has a better convergence velocity, and is more stable. Performance of CSVPSO2 is a bit worse than that of CSV-PSO1, but it is better than other versions, its random seed can be set artificially and unique solution can be obtained at each run using CSV-PSO2. 3.3.2 Precision of Convergence A 30-dimension function Rosenbrock, whose variables are in interval of [-10, 10], is taken as an example for analyzing convergence precision of several improved versions of PSO. For comparison, in all versions of PSO, the population size was set to 20; the maximum number of iteration was set to 2000; the factors for learning c1 and c2 are both set to 2.0; Initial inertia weights of CSV-PSO1 and CSV-PSO2 are 1.0, which are different from that of other versions. Newly introduced parameters N s , α 0 and β0 are 50, 0.9 and 0.8 respectively. Each version of PSO is run 20 times for test function, the first five are run randomly and the last is run with random seed from 5 to 950 by an increment 50 for each run. Average value of 20 runs for each version is listed in table 3. The result of the former two columns is gained by Clerc and Kennedy (Clerc and Kennedy, 2002), the third and the fourth are from the literature (Ke et al., 2003), the fifth and the last are obtained by CSV-PSO1 and CSV-PSO2 respectively. In fact, when the goal of 0.4 is obtained using the proposed method in the paper, average iteration number of 20 runs is just 913.24. So the proposed method has a better velocity and precision of convergence for function Rosenbrock. Constriction factor1 50.193877 Constriction factor2 39.118488 Inertia weight 40.602026 MPSO 30.316998 CSV-PSO1 0.048169 CSV-PSO2 0.001070 Table 3. Optimal precision of several versions of PSO for function Rosenbrock 3.4 Sensitivity Analysis of Parameters Sensitivity analysis of parameters, on the one hand, can make algorithm do its better, and on the another hand, can offer reasonable basis for parameter selection. There has been a lot of research about basic parameter analysis of the PSO algorithm, and now we just analyze the sensitivity of several parameters used by the CSV-PSO algorithm. The five benchmark functions are selected as testing examples, whose characteristics and properties are shown in table 1. 3.4.1 Random Seeds The initial population of PSO algorithm is generated randomly, and the main operations (such as the updating of the position and velocity of particles etc.) of PSO contain random factors. So, random seed must have some effect on algorithm performance. But how does it affect and are there any lows to follow? Effect of Random seed on CSV-PSO is analyzed and discussed based on five benchmark function in table 1 as following. Parameters setting of CSV-PSO: the population size was set to 20; the maximum number of flight is 2000 times; the factors for learning c1 and c2 are both set to 2.0; initial inertia weights is 1.0; number of stagnancy iteration is 10; constant α 0 and β0 is set to 0.9 and 0.8 respectively the α obtained by Eq. (8) can’t be less 0.1; random seed is from 0 to 1000 by an increment 50 for each scheme; goal values of five functions are listed as table 1 and number of maximum iteration is the terminating condition of algorithm. CSV-PSO and Its Application in Geotechnical Engineering 271 120 90 Fitness 60 30 0 0 200 400 600 800 1000 Random seed Figure 1. Effect of different random seed on precision of function Sphere 120 90 Fitness 60 30 0 0 200 400 600 800 1000 Random seed Figure 2. Effect of different random seed on precision of function Rosenbrock 240 200 160 Fitness 120 80 40 0 0 200 400 600 800 1000 Random seed Figure 3. Effect of different random seed on precision of function Rastrigrin 272 1.6 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 1.4 Fitness 1.2 1 0 .8 0 200 400 600 800 1000 Random seed Figure 4. Effect of different random seed on precision of function Griewank 12 10 Fitness(×0.001) 8 6 4 2 0 0 200 400 600 800 1000 Random seed Figure 5. Effect of different random seed on precision of function Schaffer’f6 The effects of random seeds on performance of algorithm for five functions are shown in Fig. 1 to Fig. 5. It is obviously that random seed greatly affects the convergence velocity and precision of the CSV-PSO. If random seed is appropriate, convergence velocity of CSV-PSO is quite fast; otherwise, convergence is slower and divergence is also probable. However, this effect is random and doesn’t comply with any distinctive laws. 3.4.2 Stagnancy Number Ns In process of optimization, the best particle may not move toward any direction during a short-term flying before goal value is obtained. This is named stagnancy phenomenon. To obtained the global goal value quickly, it is necessary to initialize part of the particles once more to break this temporary stagnation. But no final conclusion about the how many the stagnancy number is has yet been reached. How to determine stagnancy number Ns will be discussed in this section by taking the functions in table 1 as examples. Sphere Optimal value 13982.13 Rosenbrock 123073.22 Rastrigrin 264.40 Griewank 126.83 Schaffer’s f6 9.71E-3 Table 4. Optimal value of 5 functions when stagnancy number is 1 CSV-PSO and Its Application in Geotechnical Engineering 273 160 120 Fitness 80 40 0 0 100 200 300 400 500 600 Stagnancy number Figure 6. Effect of different stagnancy number on precision of function Sphere 300 250 200 Fitness 150 100 50 0 0 100 200 300 400 500 Stagnancy number Figure 7. Effect of different stagnancy number on precision of function Rosenbrock 100 80 Fitness 60 40 20 0 0 100 200 300 400 500 Stagnancy number Figure 8. Effect of different stagnancy number on precision of function Rastrigrin 274 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 1.2 1 0.8 Fitness 0.6 0.4 0.2 0 0 100 200 300 400 500 Stagnancy number Figure 9. Effect of different stagnancy number on precision of function Griewank 0.012 0.01 0.008 Fitness 0.006 0.004 0.002 0 0 100 200 300 400 500 Stagnancy number Figure 10. Effect of different stagnancy number on precision of function Schaffer’f6 Most of the parameters in this section are set to be the same value as section 3.4.1 except for random seed and stagnancy number. Random seed is set to 100 and stagnancy number is set to be from 1 to 501 by an increment 10 for each solution. How the stagnancy number affects the convergence precision is indicated in Fig. 6 to Fig. 10. Because when the stagnancy number is 1, the optimal value is still very large at reaching end conditions, so these values are listed in table 4 separately. Much numerical simulation has shown that there is stagnancy during the flight of particles. It is concluded that it is very important what time initializing part of particles is. If part of particles are initialized again when stagnancy just now happens (e.g. stagnancy number is 1.) during flight of particles, performance of CSV-PSO is least desirable and the algorithm is hard to converge. However, if the initializing is too late (e.g. stagnancy number is 500), the algorithm is also not stable and easily divergent, which are seen from table 4 and Fig. 6 to Fig. 10. The whole range can be divided into three intervals [1, 30), [30,120] and (120,501].The proposed algorithm is not easy to converge at intervals [1, 30) and (120,501] and has a trend that convergence becomes more and more difficult along with the increasing of stagnancy number at interval (120,501]. So it is suggested that initializing part of particles once again with stagnancy number between 30 and 120 will achieve better convergence. CSV-PSO and Its Application in Geotechnical Engineering 275 3.4.3 Constant α 0 Constant α 0 is a parameter that determines limit of flying velocity of particles, which is shown by Eq. (6), (7) and (8). Many numerical tests show that different α 0 result in different velocity and precision of convergence in CSV-PSO. Parameters of CSV-PSO different from section 3.4.2 are stagnancy number and constant α 0 which are set to 20 and from 0 to 3.0 by an increment 0.1 for each scheme separately. And the α can be decreased without limitation by Eq. (8). The optimal values of each function vary with increasing of constant α 0 as shown in Fig. 11 to Fig. 15. As being comparatively large when constant α 0 is 0, optimal values for five functions are listed separately in table 5. Sphere Optimal value 51773.71 Rosenbrock 1690084.40 Rastrigrin 373.47 Griewank 466.96 Schaffer’s f6 5.04 E-2 Table 5. Optimal value of 5 functions at α 0 =0 2 1.5 Fitness 1 0.5 0 0 0.5 1 α0 1.5 2 2.5 3 Figure 11. Effect of different constant α 0 on precision of function Sphere 80 70 60 Fitness 50 40 30 20 10 0 0 0.5 1 α0 1.5 2 2.5 3 Figure 12. Effect of different constant α 0 on precision of function Rosenbrock It is concluded that convergence precision of CSV-PSO for each function is very poor at meeting end condition of iteration when α 0 is 0 from table 5. If iteration continues, given goal value is also obtained hardly. This is because PSO has had no optimizing capacity when α 0 is 0, which is in accordance with the principle of the algorithm. Particles move 276 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization toward an object by mainly interaction among particles. When α 0 is 0, the upper and lower limits of particles’ velocity are both zero indicated by formula (6), (7) and (8), further the velocity of flying is also zero, and locations and velocities of particles can’t both be updated. So that the whole population are stagnant and the PSO finally loses optimizing capacity. 200 160 Fitness 120 80 40 0 0 0.5 1 α0 1.5 2 2.5 3 Figure 13. Effect of different constant α 0 on precision of function Rastrigrin 1.2 0.9 Fitness 0.6 0.3 0 0 0.5 1 α0 1.5 2 2.5 3 Figure 14. Effect of different constant α 0 on precision of function Griewank 10 7.5 Fitness 5 2.5 0 0 0.5 1 α0 1.5 2 2.5 3 Figure 15. Effect of different constant α 0 on precision of function Schaffer’f6 CSV-PSO and Its Application in Geotechnical Engineering 277 It is shown that the convergence capability of CSV-PSO undergoes three stages approximately along with the increasing of α 0 by Fig. 11 to Fig. 15. The first stage is at interval [0, 0.5) and convergence of the algorithm is unstable. Some functions can converge quickly to goal value while others will not in this stage. CSV-PSO has more stable convergence at interval [0.5, 1] for five testing functions. Convergent capability of the algorithm becomes much more poor and unstable when α 0 is more than 1. So interval [0.5, 1.0] is proposed. In addition, numerical calculation indicates that if population scale is too small, algorithms may converge difficultly and the precision is bad, so enlarging the population can improve the convergence capability and enhance the precision of the algorithm; increasing iteration number can also improve the precision of the algorithm to some degree. 4. PCSV-PSO Although the convergence speed and precision of the CSV-PSO have been are further improved, it is necessary to further improve calculation efficiency for some practical engineering application consuming a large amount of calculation time (such as rheology parameters back analysis, seepage simulation, etc.). Therefore, a parallel CSV-PSO algorithm based on MPI(Message Passing Interface, named PCSV-PSO), is proposed in the paper. As the calculations for parameter recgnition are mainly consumed in evaluation of particles’ fitness, global parallel strategies (master-slave mode) is adopted in CSV-PSO algorithm in the paper. MPI is one of the most popular parallel techniques based on message passing mechanism (Du, 2001). It offers a criterion of message passing programming, which has nothing with languages and platforms, and can be widely accepted. In addition, it codes are practical, transplantable, high-efficiency and flexible. Operation procedure can be simply introduced as following: Firstly, the host computer allocates assignments for each process according to formula (12): N' = N m (12) Where N is the total number of assignments produced by CSV-PSO (namely N groups of schemes for problems to be solved), m is the number of personal computers(PC) participating in parallel calculation, N ' is the number of assignments of each process. Secondly, each process executes its assignments separately, and the calculation result will be evaluated by formula (13) (That is evaluation of solutions of problem.). F (x) = ∑ [fi ( X ) − ui ] i =1 n 2 (13) In which, fi ( X ) and u t are calculation value and observed object value respectively; n is the total number of observed object value. Then, the calculating result of each process is taken back, and position, velocity, velocity limit and searching space of particles and inertia weight are updated according to Eq. (1),(2) and (5) to (10) on master PC. 278 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Finally, determine whether the result can meet the requirement of calculation. If so, terminate the parallel calculation; otherwise, allocate new assignments to slave computers, and begin new iteration.Repeat the above processes until the requried optimization solution is obtained. By using the above proposed method, fitness calculation of particles (one group of solved schemes for problems) is independent in each PC, wherears evaluation of all particles and all operation(such as updating of position, velocity, velocity limit and search space of particles and inertia weight, etc) are executed only by master PC. The host PC communicates with slave PCs only when allocating assignments and taking back result. Thus reduces the communication overhead prominently. Hence, the efficiency of parallel calculation is high. 5. Application of PCSV-PSO in Geotechnical Engineering Rock is a typical complex anisotropic natural geological material including all kind of fissures, joints and defects, so mechanical characteristic and physical property are obviously different for different rocks, even if for the same rock. Hard brittle rock buried deeply under high ground stress has a greater chance of rockburst when surrounding condition of rock is changed by excavation, artificial blasting or other factors. While soft and weak rock shows another mechanics property, which deformation increases under constant stress condition or stress decreases under constant deformation condition gradually with time in long-term run of rock engineering, named time dependant characteristic. For accurate describing physical and mechanical property and learning deformation laws in situ of studied rock, back analysis based on measured information in situ is used widely in geotechnical field and many achievements have been obtained (Wang & Yang, 1987; Gavrus et al., 1996; Deng et al., 2001; Liu et al., 2005). Measured displacement regarded as the goal, back analysis method for rheological parameters of rockmass based on FLAC3D codes using PCSV-PSO is introduced firstly. Then this method is used for inversing rheological parameters of argillite at the No. 72 testing tunnel of left bank slope, Longtan Hydropower station, China. 5.1 Back Analysis of Rheologcial Parameters of Rockmass Based on PCSV-PSO It is essential for inversing analysis method that searching a set of parameters makes calculated response accord with actual response in the whole space using an optimal technique. So for time dependant engineering problem, goal function used as back analysis can be written as following: F (x) = ∑ ∑ [f i =1 t=0 n T it ( X ) − u it ] 2 (14) Where X is a set of parameters required for inversing analysis; fit ( X ) and uit are calculated displacement and measured displacement of the No. i monitoring site at t time respectively; n is total number of monitoring sites and T is total time for monitoring. The back analysis method which is based on FLAC3D solver with PCSV-PSO can be described as following (also seen from Fig. 16): Step 1: Initializing parameters of PCSV-PSO and ranges of parameters requiring to be analyzed inversely; CSV-PSO and Its Application in Geotechnical Engineering 279 Step 2: Initializing position and velocity of particles, population size N, namely N sets of parameters requiring to be analyzed inversely; Step 3: Host PC allocates missions to m-1 slave PC and itself. N/m missions are allocated to each PC; Step 4: Invoking FLAC3D solver and calculating displacement of key points; Step 5: Calculating fitness of particles by formula (14), and return the result to host PC; Step 6: If the fitness is less than given value or iteration number is larger than maximum iteration number given, a set of optimal parameters is selected out by rheology mechanics characteristic of rock and some engineering experiences and back analysis is finished; otherwise, go to step 7; Step 7: Updating limit of velocity, searching space and position and velocity of each particle inertia weight and so on, then go to step 3. Initializing parameters of CSV-PSO Ranges of optimized parameters FLAC3D Evaluating parameters Initializing N particles randomly Slave PC1 N/m FLAC 3D Back result N/m FLAC3D Evaluating parameters Allocating missions N/m N/m Back result Slave PC2 … Evaluating parameters Receiving results Back result A set of optimal parameters Satisfying FLAC3D Evaluating parameters End conditions Slave PCm -1 No Updating limit of velocity, searching space, position and velocity of each particle and inertia weight Host PC Figure 16. Flow chart of back analysis of parameters based on FLAC3D using PCSV-PSO 280 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 5.2 An application in Geotechnical Engineering 5.2.1 Introduction of Longtan Hydropower Project Creep Region B Ichnography of Longtan Hydropower Project Creep Region B1 Creep Region A No. 72 Tunnel The Dam Figure 17. Distributing of creep regions of left slope at Longtan Hydropower Project Longtan Hydropower Project, which is an important one in the implementation of national Great Western Development and the Power Transmission Project from West to East, is located in Tian’e county of Guangxi Autonomous Region, upstream of Hongshui River. It is the second largest hydropower project under construction in China, next to Three Gorges Project. The height of mountains is about 600m at both sides of the dam site. Slope on the left bank is 420m high and the slope angle is between 28 to 37 degrees, with a thickness of residual diluvial layer between 0.5 and 2m and locally from 8 to 25m. More than 500 faults are exposed in the Dam Area and about 50 ones of them are bigger. There are two big creep regions with sandstone and shale of Middle-lower Triassic Formation near dam site in the left of whole reservoir region, named creep regions A and B, which is shown as Fig. 17. No. 6 monitoring section No. 3 monitoring section No. 2 monitoring section No. 1 monitoring section No. 72 testing tunnel 72 号试验洞 Shale ⒅泥板岩体 Figure 18. Engineering geological profile at location of No.72 testing tunnel CSV-PSO and Its Application in Geotechnical Engineering 281 Figure 19. Disposal of monitoring sections at No.72 testing tunnel C 1 .5 m B D 2m Figure 20. Disposal of survey lines at each monitoring section As the geological conditions are quite complicated in this region, in order to know the geological conditions, rockmass physical and mechanical property, deformation characteristics and strike variation, the No.72 exploratory testing tunnel was excavated in one of the two creep regions on the left bank. Its location is shown in Fig. 17 and the main faults and strata which it passes through are shown in Fig. 18. The No.72 test tunnel locates in the core of the left bank high slope, which is surrounded by shale and all of its 6 monitoring sections are also surrounded by shale mainly. The main tunnel is 180m long, and the branch tunnel is 136m far from the opening. The monitoring sections Ⅰ, Ⅱ, Ⅲ and Ⅵ, whose size is 2m width and 3m height, are located at 83.9, 132.4, 139.4 and 172m far from the opening of main tunnel and the monitoring sectionsⅣ and Ⅴ, having 2 m×2m sizes, are 3.7 and 6.5m far away from the opening of branch tunnel as shown as Fig. 19. The shape of all profiles is city gate. The measuring method is that the six convergent survey lines are fixed on four points of each profile. The survey lines are disposed as Fig. 20. 5.2.2 Numerical Calculation Model To eliminate the boundary effect as much as possible, calculation ranges in which width is 100m at X direction, length is 280m at Y direction and height is from 240m yellow sea height to slope surface at Z direction is determined. The calculation region is shown in Fig. 21 in horizontal plane. 3D Meshes are generated in terms of the calculation region determined above, which contain 37343 elements and 8601 nodes of meshes. Local mesh refinement technique is used near six monitoring sections. Solid elements are used to simulate faults having some thickness. The model of calculation mesh of the whole ranges is shown in Fig. 22. Distribution of faults and test tunnels in calculation range is displayed in Fig. 23. Initial stress fields adopt 3D initial stress fields regressed by Hu et al. (Hu et al., 2005). Bottom surface, planes vertical to X-axis and Y-axis are all constrained at normal direction and natural slope surface is free. According to deformation monitoring data in situ, testing tunnels go through instant elastic, attenuation and relatively stable deformation three 1.8m 3m A 282 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization stages. Therefore, the combined model of Kelvin-Voigt model for viscoelastic property of rock and Mohr-Coulomb model which is used to express plastic characteristic of material is adopted to describe viscoelastic plastic property of shale as Fig. 24. 100m No. 72 tunnel 280m y Axis of dam x Figure 21. Calculation region for numerical model of the No.72 testing tunnel Z Y X Figure 22. Three-dimension mesh model for calculation F119 F1 F63 F4 Figure 23. Distribution of faultages and testing tunnels CSV-PSO and Its Application in Geotechnical Engineering 283 E1 σ E2 σf η1 σ Figure 24. Combined model for describing viscoelastic-plastic characteristic According to excavation schemes, monitoring data and the feasibility of numerical simulation, 180m-long NO.72 testing tunnel is excavated by 13 stages and each stage is finished once. As displacement monitoring is later than excavation and instant deformation of surrounding rock can’t be reflected in displacement monitoring, proper measure must be taken to make process of numerical simulation agree with that of monitoring in situ. FLAC3D of the ITASCA company is used as a solver when numerical simulation starts. For each excavation, elastic and plastic analysis is carried out at first followed by rheological calculation. Strong weathered, weak weathered, slightly weathered shale and fresh sandstone interbedded with fresh shale four kinds material are considered for elastic and plastic calculation. Fully weathered and strong weathered shale are regarded as the same material and weak weathered and fresh shale are regarded with the same property in viscoelastic plastic numerical simulation. Several large faults F1、F4、F63 and F119 crossed by the No.72 testing tunnel are taken into concern in elasticplastic and viscoelastic plastic simulations. 5.2.3 The goal of back analysis As excavation and all kind of artificial factors, monitoring data are not full and have big variations in profiles Ⅱ and Ⅳ. In addition, the distance of profiles Ⅱand Ⅲ and location of profiles Ⅳ and Ⅴ are very close and profiles Ⅳ and Ⅴ are in the branch tunnel, therefore, only monitoring data of profiles Ⅰ,Ⅲ,Ⅴand Ⅵ are selected as the goal of back analysis, where only suvey lines AD,BD and CD of the first profile, suvey lines AC,CD and BD of the third profile, suvey lines AB,CD,AC and BC of the fifth profile and suvey lines AD and CD of the sixth profile are used as effective survey lines. The goal function of back analysis is described by formula (14). 5.2.4 Identification of Parameters of Constitutive Model For Mohr-Coulomb model, mechanical property parameters of strong weathered, weak weathered, slightly weathered shale, fresh sandstone interbedded with fresh shale and the four faults are determined as listed in table 6 based on geological conditions and mechanical testing, in which elastic modulus are the same as elastic modulus of each rock in series branch of viscoelastic model and is gained by latter inversing analysis. For Kelvin-Voigt model, its parameters are recognized using displacement back analysis method with PCSV-PSO as mentioned in section 5.1. Total eight PCs which are equipped with 2.8GHz CPU, 512MB memory, 10MBps/100MBps net card and 80GB hard disk participate in this parallel calculation of inversing analysis. Other equipments include a HUB with 16 interfaces, a 17 inch terminal, a manual control switch and some net wires, etc. Sorts of rockmass Unit Tensile Shear strength Poisson's 284 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Strong weathered shale weak weathered shale slightly weathered shale fresh sandstone with fresh 26.9 shale Faults F1、F4、F63 and F119 21 weight (kN·m-3) 25.5 26.5 26.8 strength (Mpa) 0.08 0.8 0.8 1.3 0 Friction angle(°) 36.9 50.2 47.7 52.4 18 C(Mpa) 0.49 1.18 1.48 1.96 0.04 ratio 0.34 0.28 0.26 0.25 0.34 Table 6. Property of several rockmass for Mohr-Coulomb model Before the parameters are identified using swarm intelligence method, they must have ranges themselves. The ranges of parameters of Kelvin-Voigt model are determined by engineering experience, geology investigation, rock testing in laboratory and in field and a small amount of numerical calculation, as shown in table 7. Fully and strong weathered shale E1(GPa) 20-40 η1 (GPa.d) 5-20 E2 (GPa) 1-15 Weak weathered and new shale E1(GPa) 80-110 η1 (GPa.d) 5-20 E2 (GPa) 5-20 Table 7. Ranges of parameters of Kelvin-Voigt model for the two rockmass The parameters of PCSV-PSO are set as follows: the maximum number of iteration is 20, the population size is 16, learning factors c1 and c2 are both 2.0, initial inertia weight is 1.0, constants α 0 and β0 are set to be 0.9 and 0.8 respectively, random seed is set to be 100 and the maximum stagnancy number is 10. Fully and strong weathered shale E1(GPa) 31.90 η1 (GPa.d) 9.02 4 3.5 3 Deformation(mm) Weak weathered and new shale E1(GPa) 92.52 CD测线计算值 Calculated CD BD测线测试值 Measured BD E2 (GPa) 5.82 MCD测线测试值 easured CD AD测线计算值 Calculated AD η1 (GPa.d) 78.41 E2 (GPa) 12.98 Table 8. Recognized parameters of Kelvin-Voigt model for the two rockmass AD测线测试值 Measured AD BD测线计算值 Calculated BD 2.5 2 1.5 1 0.5 0 0 50 Time(d) 100 150 Figure 25. Comparison calculated deformation with monitored it at profileⅠ CSV-PSO and Its Application in Geotechnical Engineering 4 3.5 3 Deformation(mm) 285 2.5 2 1.5 1 0.5 0 0 20 40 60 80 Time(d) CD测线测试值 Measured CD BD测线计算值 Calculated BD BD测线测试值 Measured BD AC测线测试值 Measured AC CD测线计算值 Calculated CD AC测线计算值 Calculated AC 100 120 Figure 26. Comparison calculated deformation with monitored it at profile Ⅲ As numerical simulation of rock rheology is a time-consuming job, although maximum number of iteration and the population size are set to smaller values, it still consumes almost two days until the final parameters of the two rocks are obtained using the proposed method in section 5.1. If finishing a scheme needs 50 minutes averagely, it will consume about 10 days that parameters are identified in single PC. So efficiency is improved highly using the PCSV-PSO algorithm. When iteration is executed 20 times, the final identified parameters are obtained in table 8 and the residual sum of squares of the calculated deformation and actual deformation is 9.36×10-5 m2. The calculated deformation is compared with actual deformation, as shown in the Fig. 25 to Fig. 28. It is concluded that the calculation result of all survey lines of the four profiles is acceptable for practical engineering, the simulating trend of deformation with the above identified parameters accords with that recorded in the field from Fig. 25 to Fig. 28 and the proposed algorithm is a faster and more efficiency back analysis method for identifying parameters. 1 0.8 Deformation(mm) Measured AB AB测试值 Calculated AB AB计算值 Measured CD C 测试值 D Calculated CD C 计算值 D Measured AC AC 测试值 Calculated AC AC 计算值 Measured BC BC 测试值 Calculated BC BC 计算值 0.6 0.4 0.2 0 0 20 40 Time(d) 60 80 100 Figure 27. Comparison calculated deformation with monitored it at profile Ⅴ 286 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 3 2.5 Deformation(mm) 2 1.5 1 0.5 0 0 20 40 Time(d) CD测线测试值 Measured CD AD测线测试值 Measured AD CD测线计算值 Calculated CD Calculated AD AD测线计算值 60 80 100 Figure 28. Comparison calculated deformation with monitored it at profile Ⅵ 6. Conclusion Two modified versions of PSO are introduced: one is CSV-PSO algorithm in which random numbers are generated by the mixed congruential method, and another is PCSVPSO algorithm for recognizing rheological parameters of rockmass. A great deal of numerical simulations show that the CSV-PSO algorithm has better convergence performance and more accurate convergence precision, its run is more stable and it can provide certainty solution in different runtime. Sensitivity analysis of the CSV-PSO algorithm indicates that random seed, stagnancy number and constant α 0 determining flying velocity of particles have a great effect on performance of the algorithm. Proper random seed can accelerate convergence of the algorithm; while bad random seed can not only slow convergence velocity but also possibly result in divergence. However, no obvious law can be followed. If the stagnancy number is too small or too large, the algorithm is hard to converge and unstable. The interval in which the algorithm converges more easily is [30,120]. If the constant α 0 is smaller in interval [0, 0.5], the optimizing capability of the algorithm is poorer and if the constant α 0 is zero, the algorithm loses optimizing capability. However, if constant α 0 is too large, the velocity of particles will be large so that the algorithm can’t also unstably converge. That interval [0.5, 1.0] is suggested is proper for convergence of the algorithm. Based on monitoring information in situ, identifying mechanical parameters of rockmass using back analysis technique is a time-consuming task. Rheological parameters of the two rocks at the No.72 testing tunnel of left bank slope, Longtan Hydropower Station, China, as an example, are identified using the PCSV-PSO algorithm. The results indicate PCSV-PSO algorithm is a new feasible and high efficient analytical tool for solving geotechnical engineering problem. CSV-PSO and Its Application in Geotechnical Engineering 287 7. Acknowledgement Financial supports from the Hi_Tech Research and Development Program of China (863 Program) under Grant No. 2006AA06Z117, the National Science and Technology Support Program for the 10th five years of China under Grant No. 2006BAB04A06 and the National Nature Science Foundation of China under Grant no. 50539090 are gratefully acknowledged. The authors would like to give their acknowledgement to Professor Yongjia Wang and Mr. Tianbing Xiang for their helpful suggestions to improve the manuscript, to Assistant Professor Bin Hu for his mesh modelling and significant suggestions and to Longtan Hydropower Development Company and Mid-South Design and Research Institute, CHEGC for their experimental results and monitoring data in situ. 8. References Chen B R, Feng X T (2005). Particle swarm optimization with contracted ranges of both search space and velocity. Journal of Northeastern University (Natural Science), Vol.26, No.5,pp.488-491. Clerc M (1999). The swarm and the queen: towards a deterministic and adaptive particle swarm optimization, Proc. 1999 Congress Evolutionary Computation,pp. 1951-1957, Piscataway,1999, NJ: IEEE Press. Clerc M, Kennedy J (2002). The particle swarm: explosion, stability, and convergence in a multidimensional complex space. IEEE Transations on Evolutionary Computation,Vol.6, No.1, pp. 58-73. Deng J, Lee C F, Ge X (2001). Disturbed Zones and Displacement Back Analysis for Rock Slopes. Chinese Journal of Rock Mechanics and Engineering, Vol.20, No.2, pp. 171-174. Dong Y, Tang J, Xu B, et al. (2003). Application of Particle Swarm Optimization to Nonlinear Constrained Programming. Journal of Northeastern University (Natural Science), Vol.24, No.12, pp. 1141-1144. Du Z (2001). MPI Parallel Programming:High Performance Computation and Parallel Program Technique. Tsinghua University Press, Beijing. Eberhart R C, Kennedy J. P.(1995). A New Optimizer Using Particle Swarm Theory.In: Proc. of the Sixth International Symposium on Micro Machine and Human Science,pp.39-43, Nagoya,Japan. Eberhart R C, Shi Y (2000). Comparing inertia weights and constriction factors in particle swarm optimization. Proc. 2000 Congress Evolutionary Computation, pp.84-88, Piscataway, 2000,NJ: IEEE Press. Gavrus A., Massoni E. and Chenot J. L. (1996). An inverse analysis using a finite element model for identification of rheological parameters. Journal of Materials Processing Technology, Vol.60, No.1-4,pp. 447-454. Hu B,Feng X T, et al. (2005). Regression Analysis of Initial Geostress Field for Left Bank High Slope Region At Longtan Hydropower Station. Chinese Journal of Rock Mechanics and Engineering, Vol.24, No.22, pp.4055-4064. Ke J, Qian J X, Qiao Y Z (2003). A Modified Particle Swarm Optimization Algorithm. Journal of Circuits and Systems, Vol.8, No.5, pp. 87-91. Kennedy J, Eberhart R C (1995). Particle Swarm Optimization. Proc. IEEE Int. Conf. Neural Networks, pp.1942-1948, Piscataway, 1995, NJ: IEEE Press. 288 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Liu Q J, Yang L D, Cao W G (2005). Statistical Damage Constitutive Model For Rock and Back Analysis of Its Parameters. Chinese Journal of Rock Mechanics and Engineering, Vol.24, No.4, pp.616-621 Lovbjerg M, Rasmussen T K, Krink T (2001). Hybrid Particle Swarm Optimizer With Breeding and Subpopulations. In: Proc. of the third Genetic and Evolutionary Computation Conference, pp.469-476, San Francisco. Lü Z S, Hou Z R (2004). Particle Swarm Optimization with Adaptive Mutation. Acta Electronica Sinica, Vol.32, No.3, pp.416-420. Mark S V, Feng X (2002). ARMA model selection using particle swarm optimization and AIC criteria. 15th Triennial World Congress, pp.117-129, Barcelona, 2002, Spain: IFAC. Wang S, Yang Z (1987). The back analysis method from displacement for viscoelastic rock mass. In: Proc 2nd Int Symp on FMGM’87,pp.1059-1068. Su G, Feng X (2005). Parameter Identification Of Constitutive Model For Hard Rock Under High In-Situ Stress Condition Using Particle Swarm Optimization Algorithm. Chinese Journal of Rock Mechanics and Engineering,Vol.24,No.17, pp.3029-3034. Shi Y, Eberhart R C(1998). A Modified Particle Swarm Optimizer. In: IEEE World Congress on Computational Intelligence, pp.69-73,Anchorage, Alaska. 16 Power Plant Maintenance Scheduling Using Ant Colony Optimization Wai Kuan Foong, Holger Robert Maier and Angus Ross Simpson School of Civil & Environmental Engineering, University of Adelaide Australia 1. Introduction Under the pressure of rapid development around the globe, power demand has drastically increased during the past decade. To meet this demand, the development of power system technology has become increasingly important in order to maintain a reliable and economic electric power supply (Lin et al., 1992). One major concern of such development is the optimization of power plant maintenance scheduling. Maintenance is aimed at extending the lifetime of power generating facilities, or at least extending the mean time to the next failure for which repair costs may be significant. In addition, an effective maintenance policy can reduce the frequency of service interruptions and the consequences of these interruptions (Endrenyi et al., 2001). In other words, having an effective maintenance schedule is very important for a power system to operate economically and with high reliability. Determination of an optimum maintenance schedule is not an easy process. The difficulty lies in the high degree of interaction between several subsystems, such as commitment of generating units, economical planning and asset management. Often, an iterative negotiation is carried out between asset managers, production managers and schedule planners until a satisfactory maintenance schedule is obtained. In addition, power plant maintenance scheduling is required to be optimized with regard to a number of uncertainties, including power demand, forced outage of generating units, hydrological considerations in the case of hydropower systems and trading value forecasts in a deregulated electricity market. Consequently, the number of potential maintenance schedules is generally extremely large, requiring a systematic approach in order to ensure that optimal or near-optimal maintenance schedules are obtained within an acceptable timeframe. Over the past two decades, many studies have focused on the development of methods for optimizing maintenance schedules for power plants. Traditionally, mathematical programming approaches have been used, including dynamic programming (Yamayee et al., 1983), integer programming (Dopazo & Merrill, 1975), mixed-integer programming (Ahmad & Kothari, 2000) and the implicit enumeration algorithm (Escudero et al., 1980). More recently, metaheuristics have been favored, including genetic algorithms (GAs) (Aldridge et al., 1999), simulated annealing (SA) (Satoh & Nara, 1991) and tabu search (TS) (El-Amin et al., 2000). These methods have generally been shown to outperform mathematical programming methods and other conventional approaches in terms of the 290 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization quality of the solutions found, as well as computational efficiency (Aldridge et al., 1999; Satoh & Nara, 1991). Ant Colony Optimization is a relatively new metaheuristic for combinatorial optimization problems that is based on the foraging behavior of ant colonies (Dorigo & Stützle, 2004). Compared to other optimization methods, such as GA, ACO has been found to produce better solutions in terms of computational efficiency and quality when applied to a number of combinatorial optimization problems, such as the Traveling Salesman Problem (TSP) (Dorigo & Gambardella, 1997a). Recently, ACO has also been successfully applied to scheduling, including the job-shop, flow-shop and resource-constrained project scheduling problems (Bauer et al., 1999; Colorni et al., 1994; Merkle et al., 2002; Stützle, 1998). Recently, a formulation that enables ACO to be applied to the power plant maintenance scheduling optimization (PPMSO) problem has been introduced by the authors of this chapter (Foong et al., 2005). The formulation was tested on a 21-unit case study and shown to outperform other metaheuristic methods previously applied to the same case study (Foong et al., 2005). In Foong et al. (Accepted for publication), the formulation was further tested on a simplified version of a real hydro PPMSO problem, which was solved again using an improved version of the formulation (Foong et al., 2008). The overall aim of this chapter is to formalize the ACO-PPMSO formulation presented in Foong et al. (2005) and to extend the testing of the formulation by applying it to three additional case studies. In addition, the utility of a local search strategy and a heuristic formulation when adopting ACO-PPMSO are examined. In section 2, the general formulation of the PPMSO problem is introduced, are the proposed approach for using ACO to solve this problem (ACO-PPMSO) is introduced in section 3. The four problem instances on which the proposed approach has been tested are described in section 4 and the experimental procedures, results and discussion are presented in section 5. In section 6, a summary and conclusions are given. 2. Power Plant Maintenance Scheduling Optimization PPMSO is generally considered as a minimization problem (S, f, Ω), where S is the set of all maintenance schedules, f is the objective function which assigns an objective function value f(s) to each trial maintenance schedule s ∈ S, and Ω is a set of constraints. Mathematically, PPMSO can be defined as the determination of a set of globally optimal maintenance schedules S* ⊂ S, such that the objective function is minimized f(s* ∈ S*) ≤ f(s ∈ S) (for a minimization problem) subject to a set of constraints Ω. Specifically, PPMSO has the following characteristics: • It consists of a finite set of decision points D = {d1, d2,…, dN} comprised of N maintenance tasks to be scheduled; • Each maintenance task dn ∈ D has a normal (default) duration NormDurn and is carried out during a planning horizon Tplan. Two decision variables need to be defined for each task dn, including: 1. The start time for the maintenance task, startn, with the associated set of options: T n ,chdur = { t ∈ Tplan; chdurn ∈ Kn: earn ≤ t ≤ latn – chdurn + 1} where the terms in brackets n denote the set of time periods when maintenance of unit dn may start; earn is the earliest time for maintenance task dn to begin; latn is the latest time for maintenance task dn to end and chdurn is the chosen maintenance duration for task dn. Power Plant Maintenance Scheduling Using Ant Colony Optimization 291 The duration of the maintenance task, chdurn, with the associated finite set of decision paths: Kn = {0, sn, 2sn, …, NormDurn – sn, NormDurn }, where the terms in brackets denote the set of optional maintenance durations for task dn, and sn is the time step considered for maintenance duration shortening. A trial maintenance schedule, s ∈ S = 〈(start1, chdur1), (start2, chdur2), …, (startN, chdurN)〉 is comprised of maintenance commencement times, startn, and durations, chdurn, for all N maintenance tasks that are required to be scheduled. Binary variables, which can take on values 0 or 1, are used to represent the state of a task in a given time period in the mathematical equations of the PPMSO problem formulation. Xn,t is set to 1 to indicate that task dn ∈ D is scheduled to be carried out during period t ∈ Tplan. Otherwise, Xn,t is set to a value of 0, as given by: 1 if task d n is being maintained in period t X n,t = otherwise 0 (1) 2. In addition, the following sets of variables are defined: • Sn,t = {k ∈ T n ,chdur , chdurn ∈ Kn: t – chdurn + 1 ≤ k ≤ t} is the set of start times k, such that n if maintenance task dn starts at time k for a duration of chdurn, that task will be in progress during time t; • Dt = {dn: t ∈ Tn } is the set of maintenance tasks that is considered for period t. Objectives and constraints Traditionally, cost minimization and maximization of reliability have been the two objectives commonly used when optimizing power plant maintenance schedules. Two examples of reliability objectives are evening out the system reserve capacity throughout the planning horizon, and maximizing the total reservoir storage water volumes at the end of the planning horizon, in the case of a hydropower system. An additional objective associated with the more generalized definition of PPMSO is the minimization of the total maintenance duration shortened/deferred (Foong et al., 2008). The rationale behind this objective is that shortening of maintenance duration (i.e. speeding up the completion of maintenance tasks) requires additional personnel and equipment, whereas deferral of maintenance tasks might result in unexpected breakdown of generating units, and in both events, additional costs are incurred by the power utility operator. Constraints specified in PPMSO problems are also power plant specific. The formulation of some common constraints include the allowable maintenance window, continuity, load, availability of resources, precedence of maintenance tasks, reliability and the minimum maintenance duration required, which are presented in Eqs. 2 to 6. The timeframes within which individual tasks in the system are required to start and finish maintenance form maintenance window constraints, which can be formulated as: earn ≤ startn ≤ latn – chdurn + 1 for all dn ∈ D. (2) where startn and chdurn are the start time and maintenance duration, respectively, chosen for task dn. Load constraints (Eq. 3) are usually rigid/hard constraints in PPMSO problems, which ensure that feasible maintenance schedules that do not cause demand shortfalls throughout the whole planning horizon are obtained: 292 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization ∑ Pn ,t − ∑ ∑ X n ,k Pn ≥ L t dn ∈ D dn ∈ Dt k ∈ Sn ,t for all t ∈ T plan . (3) where Lt is the anticipated load for period t and Pn is the loss of generating capacity associated with maintenance task dn. Resource constraints are specified in the case where the availability of certain resources, such as highly skilled technicians, is limited. In general, resources of all types assigned to maintenance tasks should not exceed the associated resource capacity at any time period, as given by: r ∑ ∑ X n ,k Resn,k ≤ ResAvaitr dn ∈Dt k ∈Sn ,t r where Resn ,k is the amount of resource of type r available that is required by task dn at for all t ∈ T plan ,r ∈ R. (4) period k; ResAvaitr is the associated capacity of resource of type r available at period t and R is the set of all resource types. Precedence constraints that reflect the relationships between the order of maintenance of generating units in a power system are usually specified in PPMSO problems. An example of such a constraint is a case where task 2 should not commence before task 1 is completed, as given by: start2 > start1 + chdur1 – 1. (5) where startn is the start time chosen for task dn. In the case of maintenance duration shortening, there is usually a practical limit to the extent that the duration can be shortened. Due to the different characteristics of maintenance tasks, minimum maintenance durations may vary with individual tasks: NormDurn ≥ chdurn ≥ MinDurn, for all dn ∈ D. (6) where chdurn is the maintenance duration of task dn; MinDurn is the minimum shortened outage duration for task dn; NormDurn is the normal duration of maintenance task dn. 3. ACO for Power Plant Maintenance Scheduling Optimization (ACO-PPMSO) Ant Colony Optimization (ACO) is a metaheuristic inspired by the foraging behavior of ant colonies (Dorigo & Stützle, 2004). By marking the paths they have followed with pheromone trails, ants are able to communicate indirectly and find the shortest distance between their nest and a food source when foraging for food. When adapting this search metaphor of ants to solve discrete combinatorial optimization problems, artificial ants are considered to explore the search space of all possible solutions. The ACO search begins with a random solution (possibly biased by heuristic information) within the decision space of the problem. As the search progresses over discrete time intervals, ants deposit pheromone on the components of promising solutions. In this way, the environment of a decision space is iteratively modified and the ACO search is gradually biased towards more desirable regions of the search space, where optimal or near-optimal solutions can be found. Readers are referred to Dorigo & Stützle (2004) for a detailed discussion of ACO metaheuristics and the benchmark combinatorial optimization problems to which ACO has been applied. Due to its robustness in solving these problems, ACO has recently been applied to, and obtained some Power Plant Maintenance Scheduling Using Ant Colony Optimization 293 encouraging results for, real-world engineering problems, such as the design of optimal water distribution systems (Maier et al., 2003) and in the area of power systems (Gomez et al., 2004; Huang, 2001; Kannan et al., 2005; Su et al., 2005). As is the case with other metaheuristics, ACO can be linked with existing simulation models of power systems, regardless of their complexity, when solving a PPMSO problem. In addition, the unique way in which ACO problems are represented by using a graph makes ACO inherently suitable for handling various constraints that are commonly encountered in PPMSO problems. In this section, the novel formulation that enables ACO to be applied to PPMSO problems (herein referred to as ACO-PPMSO) introduced by Foong et al. (2005) is formalized. 3.1 Problem representation Before the PPMSO problem can be optimized using ACO, it has to be mapped onto a graph shown in Fig. 1, which is expressed in terms of a set of decision points consisting of the N maintenance tasks that need to be scheduled D = {d1, d2, d3,…, dN}. Decision variable v1,n Decision variable v2,n NormDurn Decision variable v3,n earn earn+1 latn- NormDurn latn- NormDurn +1 earn earn+1 normal sn l atn - s n latn- sn +1 earn earn+1 task dn shorten 2 sn defer Notation: NormDurn: normal duration of maintenance task dn. sn: timestep of duration shortening for task dn. . . . NormDurn - sn . 0 latn- 2sn latn- 2sn +1 earn earn+1 latn- NormDurn - sn latn- NormDurn - sn + 1 NIL Figure 1. Proposed ACO-PPMSO graph In accordance with the formulation introduced, there are three variables that need to be defined V = {v1, v2, v3} for each maintenance task: • Variable 1, v1: the overall state of the maintenance task under consideration (i.e. if maintenance currently being carried out or not), • Variable 2, v2: the duration of the maintenance is task, and • Variable 3, v3: the commencement time for the maintenance task. 294 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization For maintenance task dn, a set of decision paths DPc,n is associated with decision variable vc,n (where subscript c = 1, 2 or 3) (shown as dashed lines in Fig. 1). For decision variable v1,n, these correspond to the options of carrying out the maintenance tasks dn at normal duration, shortening the maintenance duration and deferring maintenance tasks. For decision variable v2,n, these correspond to the optional shortened durations available for the maintenance tasks. For decision variable v3,n, these correspond to the optional start times for maintenance tasks dn. It should be noted that, as the latest finishing time of maintenance tasks is usually fixed, there are different sets of start time decision paths, each corresponding to a maintenance duration decision path (Fig. 1). This graph can then be utilized to construct trial solutions using the ACO-PPMSO algorithm introduced in section 3.2.2. 3.2 ACO-PPMSO Algorithm The new formulation proposed for power plant maintenance scheduling using Ant Colony Optimisation is implemented via an ACO-PPMSO algorithm, represented by the flowchart given in Fig. 2. The mechanisms involved in each procedure of the proposed ACO-PPMSO algorithm are detailed in sections 3.2.1 to 3.2.6. 3.2.1 Initialisation 3.2.2 Construction of trial maintenance schedule using Fig. 1 Ant = Ant + 1 3.2.3 Evaluation of the trial maintenance schedule Iter = Iter + 1 NO Finished m ants? YES 3.2.5 Pheromone updating 3.2.4 Local search (optional) EXIT Optimized schedule(s) recorded YES 3.2.6 Termination criteria reached? NO Figure 2. ACO-PPMSO algorithm 3.2.1 Initialization The optimisation process starts by reading details of the power system under consideration (eg. generating capacity of each unit, daily system demands, time step for duration shortening etc.). In addition, various ACO parameters (eg. initial pheromone trail concentrations ( τ 0 ), number of ants, pheromone evaporation rate etc.) need to be defined. Power Plant Maintenance Scheduling Using Ant Colony Optimization 295 3.2.2 Construction of a trial maintenance schedule A trial maintenance schedule is constructed using the ACO-PPMSO graph shown in Fig. 1. In order to generate one trial maintenance schedule, an ant travels to one of the decision points (maintenance tasks) at a time. At each decision point, dn, a three-stage selection process that corresponds to the three decision variables, v1,n, v2,n and v3,n, is performed. At each stage, the probability that decision path opt is chosen for maintenance of task dn in iteration t is given by: p n ,opt ( t ) = [τ y ∈ DPc ,n ⋅ [η ] . α β ∑[τ ( t )] ⋅ [η ] n,opt ( t ) n ,y n ,opt n ,y α β (7) subscripts c = 1, 2 and 3 refer to the three decision variables, v1,n, v2,n and v3,n; τn,opt(t) is the pheromone intensity deposited on the decision path opt for task dn in iteration t; ηn,opt is the heuristic value of decision path opt for task dn; α and β are the relative importance of pheromone intensity and the heuristic, respectively. It should be noted that the term opt in Eq. 7 represents the decision path under consideration, of all decision paths contained in set DPc,n. When used for stages 1, 2 and 3, respectively, the terms opt and DPc,n are substituted with those associated with the decision variable considered at the corresponding stage (Table 1). The pheromone level associated with a particular decision path (e.g. deferral of a particular maintenance task) is a reflection of the quality of the maintenance schedules that have been generated previously that contain this particular option. The heuristic associated with a particular decision path is related to the likely quality of a solution that contains this option, based on user-defined heuristic information. The following paragraphs detail the three-stage selection process for decision point (maintenance task) dn, including the adaptations required when using Eq. 7 for each stage. Stage 1 c opt DPc,n 1 stat ∈ DP1,n DP1,n={normal, shorten, defer} Stage 2 2 dur ∈ DP2,n DP2,n = {0, sn, 2sn,…, NormDurn} Stage 3 3 day ∈ DP3 ,n,chdur n DP3 ,n,chdur = {chdurn ∈ DP2,n: earn, n earn+1,…, latn – chdurn + 1} τ n ,opt τ n ,stat τ n ,dur τ n ,chdur ,day n ηn ,opt ηn ,defer < ηn ,shorten < ηn ,normal ηn ,dur ∝ dur n ηn ,chdur ,day = n ( w Res ηn ,chdurn ,day ) ⋅η Load n ,chdurn ,day Table 1. Adaptations for Eq. 7 in stages 1, 2 and 3 of the selection process Stage 1: In stage 1, a decision needs to be made whether to perform the maintenance task under consideration at normal or shortened duration, or to defer it (decision variable v1,n in Fig. 1). In this case, c = 1 and opt = stat ∈ DP1,n={normal, shorten, defer} is the set of decision paths associated with decision variable v1,n for task dn. The probability of each of these 296 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization options being chosen is a function of the strength of the pheromone trails and heuristic value associated with the option (Eq. 7). For the PPMSO problem, the heuristic formulation should generally be defined such that normal maintenance durations are preferred over duration shortening, and deferral is the least favored option (Eq. 8). However, real costs associated with duration shortening and deferral options can be used if the extra costs incurred associated with these options are quantifiable and available. The adaptations required for Eq. 7 to be used at the stage 1 selection process are summarized in Table 1. It is suggested that values of the heuristics should be selected such that: ηn ,defer < ηn ,shorten < ηn ,normal . (8) Stage 2: Once a decision has been made at stage 1, the selection process proceeds to stage 2 (decision variable v2,n in Fig. 1), where the duration of the maintenance task under consideration, dn, is required to be selected from a set of available decision paths DP2,n = {0, sn, 2sn, . . . , NormDurn}. The symbols sn and NormDurn denote the time step for maintenance duration shortening, and the normal maintenance duration, respectively. For Eq. 7 to be used at stage 2, the terms c and opt in the equation are substituted by the values 2 and dur ∈ DP2,n, respectively. It should be noted that if the ‘normal’ or ‘defer’ options were chosen at stage 1, the normal duration of the maintenance task, or a duration of 0, respectively, are automatically chosen for the task. In the case of duration shortening, a constraint is normally specified where each maintenance task has a minimum duration at which the completion of the task cannot be further accelerated due to limitations, such as the availability of highly specialized technicians. This constraint can be addressed at this stage such that only feasible trial maintenance schedules (with regard to this constraint) are constructed (see section 3.3 for details of such constraint-handling techniques). The pheromone trails and heuristic values associated with optional durations are used to determine the probability that these durations are chosen. In order to favor longer maintenance durations (i.e. the smallest amount of shortening compared with the normal maintenance duration), it is suggested that the heuristic value associated with a decision path should be directly proportional to the maintenance duration (Eq. 9). ηn ,dur ∝ dur . (9) The substitutions for the various terms in Eq. 7 when used in stage 2 are summarized in Table 1. Stage 3: Once a maintenance duration has been selected, the solution construction process enters stage 3 (decision variable v3,n in Fig. 1), where a start time for the maintenance task is selected from the set of optional start times available DP3 ,n,chdur = {chdurn ∈ DP2,n: earn, n earn+1,…, latn – chdurn + 1}, given a chosen duration of chdurn. In order to utilize Eq. 7 at stage 3, adjustments are made such that c = 3 and opt = day ∈ DP3 ,n,chdur . It should be noted n that this stage is skipped if the ‘defer’ option is chosen at stage 1. The probability that a particular start day is chosen is a function of the associated pheromone trail and heuristic value. The suggested heuristic formulation for selection of the maintenance start day is given by Eqs. 10 to 15. Res ηn ,chdur ,day = ηn ,chdur ,day n n ( ) ⋅η w Load n ,chdurn ,day . (10) Power Plant Maintenance Scheduling Using Ant Colony Optimization 297 Res ηn,chdurn ,day = Y ResV( k)= 0 k ∈ J n ,chdurn ,day k ∈ J n ,chdurn ,day ∑ ⋅ R n ,chdur ,day ( k ) n ∑(YResV( k)= 0 − 1) ⋅ R n,chdur ,day ( k ) n . (11) Load ηn,chdurn ,day = Y LoadV( k)= 0 k ∈ J n ,chdurn ,day k ∈ J n ,chdurn ,day ∑ ⋅ C n ,chdur ,day ( k ) n ∑(YLoadV( k)= 0 − 1) ⋅ C n ,chdur ,day ( k ) n . (12) 1 if no violation of resource constraints in time period k Y ResV(k)= 0 = otherwise 0 1 if no violation of load constraints in time period k Y LoadV(k)= 0 = otherwise 0 1 if resource constraints are considered w = otherwise 0 n n (13) (14) (15) where ηn ,chdur ,day ( t ) is the heuristic for start time day ∈ DP3 ,n,chdur for task dn, given a chosen duration chdurn,; R n ,chdur ,day ( k ) represents the prospective resources available in reserve in n time period k if task dn is to commence at start time day and takes chdurn to complete (less than 0 in the case of resource deficits); C n ,chdur ,day ( k ) is the prospective power generation n capacity available in reserve in time period k if task dn is to commence at start time day and takes chdurn to complete (less than 0 in the case of power generation reserve deficits); J n ,chdur ,day ={day ∈ DP3 ,n,chdur : day ≤ k ≤ day + chdurn – 1} is the set of time periods k such that if n n task dn starts at start time day, that task will be in maintenance during period k. As mentioned above, the heuristic formulation in Eq. 10 includes a resource-related term, Res Load ηn ,chdur ,day , and a load-related term, ηn,chdur day . These two terms are expected to evenly n n distribute maintenance tasks over the entire planning horizon, which potentially maximizes the overall reliability of a power system. For PPMSO problem instances that do not consider resource constraints, the value of w in Eq. 10 can be set to 0 (Eq. 15). In order to implement the heuristic, each ant is provided with a memory matrix on resource reserves and another matrix on generation capacity reserves prior to construction of a trial solution. This is updated every time a unit maintenance commencement time is added to the partially completed schedule. The three-stage selection process is then repeated for another maintenance task (decision point). A complete maintenance schedule is obtained once all maintenance tasks have been considered. 3.2.3 Evaluation of trial maintenance schedule Once a complete trial maintenance schedule, s ∈ S, has been constructed by choosing a maintenance commencement time and duration at each decision point (i.e. for each maintenance task to be scheduled), an ant-cycle has been completed. The trial schedule’s 298 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization objective function cost (OFC) can then be determined by an evaluation function, which is a function of the values of objectives and constraint violations: OFC( s) = f obj1 ( s),obj 2 ( s),...,obj Z ( s),vio1 ( s),vio2 ( s),...,vioC ( s) . T T ( ) (16) where OFC(s) is the objective function cost associated with a trial maintenance schedule, s; obj1(s) is the value of the first objective; vio1(s) is the degree of violation of the first constraint; ZT is the total number of objectives; CT is the total number of constraints that cannot be satisfied during the construction of trial solutions. It should be noted that not all constraints specified in a problem are accounted for using Eq. 16. Maintenance windows, precedence and minimum duration constraints, just to name a few, can be satisfied during the construction of a trial solution and would not appear in Eq. 16. In other words, a complete trial solution would have satisfied these constraints already before the evaluation process is carried out. On the other hand, load constraints can only be checked upon completion of a complete trial solution and therefore the violations of these constraints, if there are any, can only be reflected through penalty terms in the objective function (Eq. 16). Detailed categorizations of constraints commonly encountered in PPMSO problems, as well as the appropriate methods of handling them, are presented in section 3.3. In general, the trial schedule has to be run through a simulation model in order to calculate some elements of the objective function and whether certain constraints (those accounted for through penalty terms) have been violated. After m ants have performed procedures 3.2.2 and 3.2.3, where m (the number of ants) is predefined in procedure 3.2.1, an iteration cycle has been completed. At this stage, a total of m maintenance schedules have been generated for this iteration. It should be noted that all ants in an iteration can generate their trial solutions concurrently, as they are working on the same set of pheromone trail distributions in decision space. 3.2.4 Local search Recently, local search has been utilized to improve the optimisation ability of ACO. While it has been found to result in significant improvements in some applications (den Besten et al., 2000; Dorigo & Gambardella, 1997b), little success has been obtained in others (Merkle et al., 2002). Local search has also been found useful for some problems (Foong et al., 2008) where the formulation of heuristics is difficult (Dorigo & Stützle, 2004). In this formulation, local search is coupled with ACO to solve the PPMSO problem. The local search operator proposed in this chapter is called PPMSO-2-opt, which is a modification of the 2-opt strategy used when solving the Travelling Salesman Problem (TSP) (Stützle et al., 1997), where two edges of connected cities are exchanged. In PPMSO-2-opt, ‘neighbor maintenance schedules’ are generated by exchanging the maintenance start times of a pair of randomly selected tasks of the ‘target maintenance schedule’. It should be noted that the maximum number of possible ‘neighbor maintenance schedules’ formed based on a N! ) can be specified as the termination ‘target maintenance schedule’ ( N C 2 = 2! ⋅( N − 2 )! criterion of the local search. Otherwise, a smaller number of local solutions can be defined as the stopping criterion. Power Plant Maintenance Scheduling Using Ant Colony Optimization 299 3.2.5 Pheromone updating Two mechanisms, namely pheromone evaporation and pheromone rewarding, are involved in the pheromone updating process. Pheromone evaporation reduces all pheromone trails by a factor. In this way, exploration of the search space is encouraged by preventing a rapid increase in pheromone on frequently-chosen paths. Pheromone rewarding is performed in a way that reinforces good solutions. Despite its original inspiration from the foraging behaviour of ant colonies, various ACO algorithms have evolved, such as Elitist-Ant System (EAS) (Dorigo (1992); Dorigo et al. (1996)) and Max-Min Ant System (MMAS) (Stützle & Hoos, 1997; Stützle & Hoos, 2000). These algorithms are distinguished from each other in the way pheromone updating is performed. In the ACO-PPMSO formulation, pheromone updating is performed on the pheromone matrices used for the three-stage selection process. A general pheromone updating formulation (regardless of the ACO algorithm adopted) is introduced for this purpose: τ ∗ ( t + 1) = ρ ⋅ τ ∗ ( t ) + ∆τ ∗ ( t ) . ∆τ ∗ ( t ) = (17) ∑ s∈ Solupdate Q q = OFC( supdate ) 0 if * ∈ supdate otherwise (18) where t is the index of iteration; (1 - ρ) is the pheromone evaporation rate; the subscript asterisk * of τ∗ denotes the element of the pheromone matrix under consideration ( τ n ,opt , τ n ,dur and τ n ,dur ,day for decision variables v1, v2 and v3, respectively); supdate is any trial schedule contained in Solupdate(t), which is the set of trial schedules chosen to be rewarded in iteration t; ∆τ ∗ ( t ) is the amount of pheromone rewarded to pheromone trail τ ∗ at the end of iteration t; OFC ( supdate ) is the objective function cost associated with the trial schedule supdate that contains element *; Q is the reward factor (a user-defined parameter). As EAS and MMAS are utilized in solving the PPMSO case study systems presented in section 4, the following additional specifications are made according to the general pheromone updating rules: (A) Elitist-Ant System (EAS) In EAS, only the least-OFC schedule(s) in every iteration is/are rewarded (Eq. 19). Sol update ( t ) = s iter − best ( t ) . (19) where siter− best ( t ) is the best maintenance schedule evaluated in iteration t. (B) Max-Min Ant System (MMAS) Similarly to EAS, MMAS only rewards iteration-best trial solution(s) (Eq. 19). Additionally, upper and lower bounds are imposed on the pheromone trails in order to prevent premature convergence and greater exploration of the solution surface. These bounds are given by: τ max ( t + 1) = 1 Q ⋅ . 1 − ρ OFC iter− best ( t ) (20) 300 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization τ c,min ( t + 1) = τ max ( t + 1 )( 1 − n p best ) c ( avgc − 1 )n p best . (21) where nc is the number of decision points for decision variable vc; avgc is the average number of decision paths available at each decision point for decision variable vc; subscript c = 1, 2 and 3 refers to the three decision variables considered in procedure 3.2.2; pbest is the probability that the paths of the current iteration-best-solution, siter-best(t), will be selected, given that non-iteration best-options have a pheromone level of τmin(t) and all iteration-best options have a pheromone level of τmax(t). The lower and upper bound of pheromone are applied to all decision paths in the search space: τ c,min ( t ) ≤ τ n ,opt ( t ) ≤ τ max ( t ) ; opt ∈ DPc ,n c = 1, 2 , 3 for all t ,n. (22) 3.2.6 Termination of run Procedures 3.2.2 to 3.2.5 are repeated until the termination criterion of an ACO run is met, e.g. either the maximum number of evaluations allowed has been reached or stagnation of the objective function cost has occurred. A set of maintenance schedules resulting in the minimum OFC is the final outcome of the optimisation run. 3.3 Constraints Handling ACO is an unconstrained optimisation metaheuristic. As constraints are inevitable in PPMSO problems, there is a need to find ways of incorporating constraints during optimisation. In this research, two different constraint handling techniques are adopted. In order to decide which of the two techniques should be used, constraints encountered in PPMSO problems have been characterized using the following classification scheme: Direct vs. indirect constraints: Constraints can be characterized based on the earliest stage at which they can be addressed during optimisation. The maintenance window (Eq. 2), precedence (Eq. 5) and minimum maintenance duration (Eq. 6) constraints can be addressed when trial solutions are being generated during ant cycles (procedure described in section 3.2.2). On the other hand, the violation of load (Eq. 3) and resource (Eq. 4) constraints often cannot be identified from a partially built trial maintenance schedule. As part of the classification scheme introduced in this paper, the former constraints are referred to as direct constraints and the latter as indirect constraints. Rigid vs. soft constraints: Constraints can also be classified based on their “rigidity”. For rigid constraints, such as maintenance windows, minimum maintenance duration, precedence and load constraints, even the slightest violations are generally intolerable. On the other hand, constraints, such as resource constraints, may be able to be violated to a degree specified by decision makers and are therefore referred to as “soft” constraints. The two constraint handling techniques used in the ACO-PPMSO formulation and the constraint types they are able to accommodate include: Graph-based technique: This technique utilizes candidate lists during ant cycles when trial solutions are being constructed (Fig. 1). Given a partially built trial schedule, a candidate list consists of the optional start times that are available for a maintenance task, such that the constraints under consideration are not violated. Direct and some rigid constraints, such as the maintenance window, precedence and minimum duration constraints, can be accounted Power Plant Maintenance Scheduling Using Ant Colony Optimization 301 for using this technique. During the construction of a trial maintenance schedule, an ant incrementally adds start times to a partially built schedule. By dynamically updating the candidate lists of ‘unvisited units’, only start times that would result in solutions that satisfy the maintenance window and precedence constraints are considered. Penalty-based technique: In ACO-PPMSO, penalty functions, which transform a constrained optimisation problem into an unconstrained problem by adding or subtracting a value to/from the objective function cost based on the degree of constraint violation (Coello Coello, 2002), are used to address indirect or potentially soft constraints, such as the availability of personpower to perform the maintenance and load constraints. When dealing with soft constraints, penalty factors may be varied to reflect the amount of constraint violation that may be tolerated. Penalty costs also have to be used to account for indirect constraints, as the degree of constraint violation is not known until a complete trial solution has been constructed, as discussed earlier. In such cases, the degree of violation generally has to be obtained with the aid of a simulation model. The ability to implement direct and some rigid constraints using the graph-based technique is one of the attractive features of using ACO for PPMSO. Firstly, by preventing the generation of infeasible solutions, the number of simulation model runs required is reduced. This is advantageous for real-world PPMSO problems, as the number of times the simulation model has to be run is a major source of computational overhead. Moreover, there are difficulties associated with the use of penalty-based techniques that remain unresolved at the time of writing, in spite of extensive research into this area (Coello Coello, 2002). For example, hand tuning is required for assigning appropriate penalty factors to each constraint and objective term in the objective function. 4. Problem Instances In order to test the utility of the proposed ACO-PPMSO formulation, it is applied to 4 problem instances, including 21- and 22-unit benchmark case studies from the literature and modified versions of these case studies. The 21- and 22-unit case studies have been chosen as they enable comparisons to be made with results obtained in previous studies. However, as these case studies can be solved without the need for maintenance shortening and deferral, modifications to the case studies are introduced in this chapter to test this feature of the proposed formulation. Details of the four problem instances are given below. 4.1 21-unit system The first case study considered in this research is the 21-unit power plant maintenance problem investigated by Aldridge et al. (1999) and Dahal et al. (1999; , 2000) using a number of metaheuristics. This case study is a modified version of the 21-unit problem introduced by Yamayee et al. (1983), and consists of 21 generating facilities, of which 20 units are thermal and one is hydropower. Due to space constraints, system details are not presented here but can be found in Aldridge et al. (1999). All of the machines are to be scheduled for maintenance either in the first or second half of a year’s planning horizon, which results in a combinatorial optimisation problem with approximately 5.18 x 1028 total possible solutions. The objective of the problem is to even out reserve generation capacity over the planning horizon, which can be achieved by minimizing the sum of squares of the reserve (SSR) generation capacity in each week. 302 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Constraints to be satisfied include: 1. Maintenance window constraints: The earliest start time and latest finish time of maintenance tasks for each machine are detailed in Aldridge et al. (1999). 2. Resource constraints: A limit of 20 maintenance personpower is available each week. 3. Demand constraints: A single peak load of 4739 MW has to be met. Problem formulation Mathematically, this optimisation problem can be defined as the determination of maintenance schedule(s) such that SSR, which is defined as the sum of square of reserve generation capacity within the planning horizon, is minimized: Min SSR = ∑ t ∈T N ∑ Pn − ∑ d ∈D n=1 n plan t 2 ∑ X n ,k Pn − L t . k ∈S n ,t (23) where Pn is the generating capacity of unit dn; Lt is the anticipated load for period t, subject to the maintenance window, load and personpower constraints, as given by: earn ≤ startn ≤ latn – NormDurn + 1 for all dn ∈ D. (24) (25) ∑ ∑ X n ,k Resn,k ≤ ResAvait dn ∈Dt k ∈Sn ,t for all t ∈ T plan . ∑ Pn − ∑ d ∈D n n t k ∈ Sn ,t ∑ X n ,k Pn ≥ L t for all t ∈ T plan . (26) where earn is the earliest start time for unit dn; latn is the latest start time for unit dn; NormDurn is the outage duration (week) for unit dn; startn is the maintenance start time for unit dn and ResAvait is the personpower available at period t. It should be noted that personpower is considered as a type of resource constraint. The maintenance window constraints are taken into account by the construction graph-based technique (section 3.3), whereas both load and personpower constraints are indirect and are therefore taken into account by using penalty-based techniques (section 3.3). When applying the ACO-PPMSO formulation to this case study, the heuristic developed as part of this research (Eqs. 10 to 15) was used together with pheromone for selection of start times when generating trial maintenance schedules. It should be noted that the value of w in Eq. 10 was set to 1, as utilization of resource (personpower) constraints is considered in this case. Upon completion of a trial maintenance schedule, a simulation model was used to calculate the SSR value and any violations of personpower or load constraints associated with schedule s. The quality of individual maintenance schedules in this problem is given by an objective function cost (OFC), which is a function of the value of SSR and the total violation of personpower and load constraints (Eq. 27). OFC ( s) = SSR( s) ⋅ (ManVio tot ( s) + 1)⋅ (LoadVio tot ( s) + 1). (27) where OFC(s) is the objective function cost ($) associated with schedule s; SSR(s) is the sum of squares of reserve generation capacity (MW2) associated with schedule s; ManViotot(s) is the total personpower shortfall (person) associated with schedule s; LoadViotot(s) is the total demand shortfall (MW) associated with schedule s. Power Plant Maintenance Scheduling Using Ant Colony Optimization 303 The calculation of constraint violations is given in Eqs. 28 to 31. For a trial maintenance schedule, the total personpower shortfall associated with schedule s, ManViotot(s), is given by summation of the personpower shortage in all periods within the planning horizon: ManViotot ( s) = t ∈TMV dn ∈ Dt k ∈ Sn ,t ∑ ∑ ∑ X n,k Resn ,k − ResAvait . (28) where TMV is the period where personpower constraints are violated, and is given by: T MV = t : ∑ d ∈D n t k ∈ Sn ,t ∑ X n ,k Resn ,k > ResAvait . (29) The total demand shortfall associated with schedule s, LoadViotot(s), is the summation of demand shortfall in all periods within the planning horizon. The calculation of this value may be represented by the following equation. LoadViotot ( s) = t ∈TLV n ∑ ∑ Pn − ∑ ∑ X n ,k Pn . dn ∈ Dt k ∈ Sn ,t (30) where TLV is the period where load constraints are violated, and is given by: T LV = ( t : ∑ Pn − n ∑ ∑ X n,k Pn < L t ) . dn ∈Dt k ∈Sn ,t (31) The OFC can be viewed as the virtual cost associated with a maintenance schedule. 4.2 22-unit system The 22-unit power plant maintenance scheduling optimisation problem was first solved by Escudero et al. (1980) using an implicit enumeration algorithm and later by El-Amin et al. (2000) using tabu search. In this problem, each generating unit is required to be scheduled for maintenance once within a planning horizon of 52 weeks. Details of the system can be found in Escudero et al. (1980). The objective when scheduling for maintenance is to even out reserve generation capacity over the planning horizon subject to the following constraints: 1. The maintenance window constraints specify that all units can be maintained anytime within the planning horizon and have to finish maintenance by week 52, except for unit 10, which can only be taken offline between weeks 6 and 22. 2. Load constraints require peak demands (see Escudero et al., 1980) to be met. 3. The reliability constraint requires a minimum reserve of 20% of the peak demand throughout the planning horizon. 4. The two precedence constraints specify that maintenance of units 2 and 5 has to be carried out before that of units 3 and 6, respectively. 5. Units 15 and 16, as well as units 21 and 22, cannot be maintained simultaneously due to personpower constraints. Problem formulation In order to even out reserve generation capacity, the formulation used in both Escudero et al. (1980) and El-Amin et al. (2000) for the 22-unit problem was designed to minimize the summed deviation of generation reserve from the average reserve over the entire planning 304 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization horizon, LVL. Mathematically, the optimisation of this case study can be described as the minimization of the sum of the deviation of generation reserve from the average reserve over the planning horizon (Eqs. 32 to 34): Min LVL = ∑ Resavg − Rest . t ∈T plan (32) where the generation reserve ( Rest ) and average reserve ( Resavg ) are given by: Rest = ∑ Pn − n=1 N ∑ ∑ X n ,k Pn − L t . n ∈Dt k ∈Sn ,t (33) ∑ Rest Resavg = t ∈Tplan T . (34) where Lt is the anticipated load demand for period t; Pn is the generating capacity of unit dn; T is the total number of time indices, subject to the following constraints: earn ≤ startn ≤ latn – NormDurn + 1 ∑ Pn − ∑ d ∈D n n for all dn ∈ D. (35) (36) t k ∈Sn ,t ∑ X n ,k Pn ≥ L t for all t ∈ T plan . ∑ Pn − ∑ d ∈D n n t k ∈Sn ,t ∑ X n ,k Pn ≥ 1.2L t for all t ∈ T plan . (37) start 3 > start 2 + NormDur2 − 1 start 6 > start 5 + NormDur5 − 1 X15,k = 0 for k = [start16 ,...,start16 + NormDur16 − 1] X16,k = 0 for k = [start15 ,...,start15 + NormDur15 − 1] X 21,k = 0 for k = [start 22 ,...,start 22 + NormDur22 − 1] X 22,k = 0 for k = [start 21 ,...,start 21 + NormDur21 − 1] (38) (39) It is interesting to note that, given the same objective, the objective functiom formulations used by Escudero et al. (1980) and El-Amin et al. (2000) are quite different from that of Aldridge et al. (1999). As there is no resource utilization throughout the planning horizon, there is no need for the inclusion of the resources term in the heuristic formulation (Eq. 10) for this case study (thus w may be set to 0). The precedence and maintenance window constraints of this system are direct and rigid constraints, which can be incorporated by using the graph-based technique, whereas the load and reliability constraints need to be taken into account using penalty functions. The objective function cost (OFC) used in this case study is a function of the reserve generation capacity LVL value and the total violation of load and reliability constraints (Eq. 40). Power Plant Maintenance Scheduling Using Ant Colony Optimization 305 OFC( s) = LVL( s) ⋅ (LoadResViotot ( s) + 1) . (40) where OFC(s) is the objective function cost ($) associated with schedule s; LVL(s) is the level of reserve generation capacity (MW) associated with schedule s; LoadResViotot(s) is the total demand and reserve shortfall (MW) associated with schedule s. It should be noted that the inclusion of a load constraint violation term in Eq. 40 is not necessary because violation of load constraints would be reflected as violation of reserve constraints. The calculation of constraint violations is given by Eqs. 41 and 42. The total load and reserve shortfall associated with schedule s, LoadResViotot(s), is the summation of load and reserve shortfall in all periods within the planning horizon: LoadResViotot ( s) = t ∈TLV n ∑ ∑ Pn − ∑ ∑ X n ,k Pn . dn ∈Dt k ∈Sn ,t (41) where TLV is the period where load and reserve constraints are violated, and is given by: T LV = ( t : ∑ Pn − n ∑ ∑ X n,k Pn < 1.2L t ) . dn ∈Dt k ∈Sn ,t (42) 4.3 Modified 21-unit system The 21-unit case study system described in section 4.1 was modified in the following ways in order to ensure that maintenance task shortening and/or deferral are required to satisfy load constraints: 1. The original system load (4739MW) is increased by 5% throughout the whole planning horizon, and another 5% increment for weeks 15 to 25. 2. While all maintenance tasks have the option of being deferred, some maintenance tasks can be carried out in durations shorter than the original outage duration (shown in Table 2). The personpower requirements for shortened durations are also detailed in Table 2. Unit No., n 1 2 5 8 9 Optional Outage Duration, (weeks) 5 3 3 3 4 8 6 4 2 2 2 2 Personpower required for each week, Resn,wk(wk=1,2,…, NormDurn ) (person) 10, 10, 10, 8, 5 15, 14, 14 15, 15, 10 17, 17, 16 13, 13, 13, 6 3, 3, 3, 2, 2, 3, 3, 3 4, 4, 3, 3, 4, 4 6, 5, 5, 6 11, 11 15, 15 20, 20 20, 20 10 14 20 Table 2. Personpower utilization for the modified 21-unit case study system 306 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Problem formulation Despite the possibility of shortening and deferral options in this case study, they are unfavorable from both an economic and operations point of view. Therefore, the objective function used for the original version of this case study (Eq. 27) has been modified to: OFC ( s) = SSR( s) ⋅ (ManVio tot ( s) + 1)⋅ (LoadVio tot ( s) + 1)⋅ ( DurCut tot ( s) + 1 ) . (43) where OFC(s) is the objective function cost ($) associated with schedule s; SSR(s) is the sum of squares of reserve generation capacity (MW2) associated with schedule s; ManViotot(s) is the total personpower shortfall (person) associated with schedule s; LoadViotot(s) is the total demand shortfall (MW) associated with schedule s; DurCuttot(s) is the total reduction in maintenance duration (weeks) due to shortening and deferral associated with schedule s. While the calculation of total demand shortfall associated with schedule s, LoadViotot(s), total personpower shortfall associated with schedule s, ManViotot(s), and the sum of squares of reserve generation capacity associated with schedule s, SSR(s), are detailed in section 4.1, the value of DurCuttot(s) is given by: DurCut tot ( s) = ∑ ( NormDur n − chdurn ( s)) . n=1 21 (44) where NormDurn is the normal duration of maintenance task dn, and chdurn(s) is the maintenance duration (week) of task dn associated with schedule s. It should be noted that by using Eq. 43 to direct the search during an ACO run, a trial maintenance schedule that includes shortened and/or deferred maintenance tasks is being assigned a higher OFC, which represent an unfavorable solution to ACO during pheromone update. As part of the modified case study, the minimum-duration constraints can be addressed during the stage-2 selection process when a trial solution is being constructed (section 3.2.2) by allowing only optional durations that are greater than the minimum duration for each maintenance task. In this way, trial solutions constructed will not violate the minimum duration constraints. For example, machine unit 1 that normally requires 7 days to be maintained, can be shortened to 5 or 3 days, or be deferred altogether (Table 2). 4.4 Modified 22-unit system The 22-unit case study detailed in section 4.2 was modified as follows in order to ensure that maintenance task shortening and/or deferral are required to satisfy load constraints: 1. The weekly loads for the modified 22-unit case study system are increased by 60%. 2. Maintenance tasks 1 to 13 are allowed to be performed within the first half of the planning horizon, while the remainder of the tasks have to be performed in the second half (except for unit 10 as in original case study). 3. While all maintenance tasks can be deferred, the maintenance tasks listed in Table 3 can be shortened to the optional duration(s) specified. Unit No., n Optional shortened durations (weeks) 1 5 6 2 8 2 9 3 10 10, 8, 6, 4 11 2 12 6, 4 14 4 15 3 16 4 17 3 18 3 22 3 4, 2 4, 2 Table 3. Details of the modified 22-unit system Power Plant Maintenance Scheduling Using Ant Colony Optimization 307 Problem formulation The objective function used for the original 22-unit case study (Eq. 40) has been modified to accommodate the options of shortening and deferral, and is given by: OFC ( s) = LVL( s) ⋅ (LoadResVio tot ( s) + 1)⋅ ( DurCut tot ( s) + 1) . (45) where OFC(s) is the objective function cost ($) associated with schedule s; LVL(s) is the level of reserve generation capacity (MW) associated with schedule s; LoadResViotot(s) is the total load constraint violation (MW) associated with schedule s; DurCuttot(s) is the total reduction in maintenance duration (weeks) due to shortening and deferral associated with schedule s. The calculation of the total load constraint violation associated with schedule s, LoadResViotot(s), and the level of reserve generation capacity associated with schedule s, LVL(s) have been detailed previously in section 4.2, whereas the value of the total duration shortened and deferred associated with schedule s, DurCuttot(s), is given by: DurCut tot ( s) = ∑ ( NormDur n − chdurn ( s)) . n=1 22 (46) where NormDurn is the normal duration (weeks) of maintenance task dn, and chdurn(s) is the maintenance duration (weeks) of task dn associated with schedule s. 5. Experimental Procedure, Results and Analysis 5.1 Experimental procedure Experiments have been conducted on both the original and modified versions of the 21-unit and 22-unit case studies to assess the utility of the proposed ACO-PPMSO formulation. Particular emphasis was given to assessing the usefulness of the heuristics developed, the impact of the local search operator and the overall performance of the proposed ACOPPMSO formulation. A. Usefulness of heuristic formulation The effectiveness of the new heuristic formulations for general PPMSO problems (Eqs. 10 to 15) introduced in section 3.2.2 was examined by conducting optimisation runs with and without the heuristics (the latter was achieved by setting the relative weight of the heuristic, β, in Eq. 7 to 0). In addition, the sensitivity of optimisation results to increasing values of β was checked. It should be noted that, as a control, the value of α in Eq. 7 was fixed at 1. B. Impact of local search operator The impact of local search on the performance of the ACO-PPMSO algorithm was also investigated, both with and without heuristic. The total number of trial solutions evaluated in the ACO runs with local search was identical to those without local search. C. Overall performance of ACO-PPMSO In order to check the overall utility of the ACO-PPMSO formulation, the results obtained for the two original case studies were compared with those obtained using other optimisation methods in previous studies and the ability to account for maintenance shortening and deferral was assessed on the two modified case studies. In order to achieve the objectives outlined above, the testing procedure shown in Fig. 3 was implemented separately for each of the four case studies. Items A, B and C mentioned above were investigated at Stages A, B and C in the testing procedure, respectively. 308 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization To minimize the impact the ACO algorithms and parameters used have on the evaluation of the effectiveness of the heuristic, local search and overall performance of the ACO-PPMSO algorithm, two ACO algorithms, namely Elitist-Ant System and MMAS, and a range of parameters (shown in the dashed box in Fig. 3) were used to solve the problem instance under consideration. In addition, each run was repeated 50 times with different random number seeds in order to minimize the influence of random starting values in the solution space on the results obtained and to enable Student’s t-test to be conducted to determine whether any differences in the results obtained were significant. In total, 3,024 different combinations of parameters, each with 50 different starting random number seeds, were evaluated as part of this study. In order to facilitate fair comparisons, the same number of evaluations per optimisation run were used as in previous studies that investigated the 21unit case problem (30,000 evaluations). In this research, ‘one ACO run’ is defined as the use of an ACO algorithm with or without using heuristic information, with or without local search and with a defined set of parameters to solve a PPMSO instance. An example of an ACO run is the use of EAS to solve the modified 21-unit case study with heuristic information and local search and a defined parameter set of m = 200; ρ = 0.9; τ0 = 0.1; Q = 500,000; α = 1, β = 11, repeated for 50 random number seeds. The overall performance of a parameter set is then assessed based on the objective function cost (OFC) averaged over the 50 simulations using different random number seeds. An analysis of the results obtained with the testing procedure outlined in Fig. 3 is given in section 5.2. Figure 3. Expermental procedure 5.2 Results and analysis The experimental results obtained for the original 21- and 22-unit case studies are summarized in Tables 4 to 7, while those for the modified case studies are presented in Tables 8 to 11. Power Plant Maintenance Scheduling Using Ant Colony Optimization Heuristic Local search Best OFC ($M) 14.84 [8.64%] 13.68 [0.15%] 13.74 [0.59%] 13.66 [0%] Average OFC ($M) 140.49 [928.48%] 13.71 [0.37%] 51.62 [277.89%] 13.70 [0.29%] Worst OFC ($M) 365.13 [2572.99%] 13.85 [1.39%] 138.80 [916.11%] 13.82 [1.17%] Std dev. ($M) 86.00 0.03 33.72 0.03 Average evaluationsa 28,841 20,692 25,494 22,434 309 Best parameter settings {m; ρ; τ0; β}b {300; 0.9; 0.01; 0} {200; 0.9; 0.01; 9} {300; 0.8; 0.1; 0} {200; 0.9; 0.01; 9} a Number bm: of evaluations to reach the best solution in one run averaged over 50 runs with different random starting positions. number of ants; (1- ρ): pheromone evaporation rate; τ0: initial pheromone trail; β: relative weight of heuristic in Eq. 7 Table 4. Results for the 21-unit unit problem instance given by Elitist-Ant System (EAS) [deviation from best-known OFC of $13.66M] Heuristic Local search Best OFC ($M) 13.86 [1.46%] 13.66 [0%] 13.80 [1.02%] 13.66 [0%] Average OFC ($M) 16.11 [17.94%] 13.68 [0.15%] 17.90 [31.04%] 13.69 [0.22%] Worst OFC ($M) 43.35 [217.35%] 13.72 [0.44%] 69.04 [405.42%] 13.78 [0.88%] Std dev. ($M) 5.95 0.01 10.51 0.02 Average evaluationsc 16,480 13,593 18,089 15,867 Best parameter settings {m; ρ; pbest; β}d {10; 0.3; 0.2; 0} {20; 0.4; 0.35; 5} {50; 0.2; 0.05; 0} {50; 0.5; 0.5; 11} a Number dm : of evaluations to reach the best solution in one run averaged over 50 runs with different random starting positions. number of ants; (1- ρ): pheromone evaporation rate; pbest: refer to Eq. 21; β: relative weight of heuristic in Eq. 7. Table 5. Results for the 21-unit unit problem instance given by Max-Min Ant System (MMAS) [deviation from best-known OFC of $13.66M] Heuristic Local search Best OFC ($M) 63.41 [21.80%] 58.41 [12.20%] 58.91 [13.16%] 55.67 [6.93%] Average OFC ($M) 72.27 [38.82%] 64.31 [23.53%] 67.03 [28.76%] 60.55 [16.31%] Worst OFC ($M) 81.15 [55.88%] 73.25 [40.70%] 79.99 [53.65%] 67.97 [30.56%] Std dev. ($M) 4.17 3.21 4.70 2.90 Average evaluationsa 29,294 28,384 25,858 26,931 Best parameter settings {m; ρ; τ0; β}b {200; 0.9; 100; 0} {300; 0.9; 1; 11} {300; 0.8; 1; 0} {300; 0.8; 10; 11} a Number of evaluations to reach the best solution in one run averaged over 50 runs with different random starting positions. bm: number of ants; (1- ρ): pheromone evaporation rate; τ0: initial pheromone trail; β: relative weight of heuristic in Eq. 7. Table 6. Results for the 22-unit unit problem instance given by Elitist-Ant System (EAS) [deviation from best-known OFC of $52.06] Heuristic Local search Best OFC ($M) 59.91 [15.08%] 55.72 [7.03%] 57.64 [10.72%] 54.56 [4.80%] Average OFC ($M) 66.90 [28.51%] 62.22 [19.52%] 64.81 [24.49%] 59.42 [14.14%] Worst OFC ($M) 76.17 [46.31%] 68.65 [31.87%] 76.65 [47.23%] 66.56 [27.85%] Std dev. ($M) 3.67 2.97 4.27 2.87 Average evaluations 24,597 28,433 27,455 24,537 Best parameter settings {m; ρ; pbest; β}d {100; 0.9; 0.5; 0} {200; 0.9; 0.2; 11} {200; 0.8; 0.5; 0} {200; 0.8; 0.35; 11} a Number of evaluations to reach the best solution in one run averaged over 50 runs with different random starting positions. dm: number of ants; (1- ρ): pheromone evaporation rate; pbest: refer to Eq. 21; β : relative weight of heuristic in Eq. 7. Table 7. Results for the 22-unit unit problem instance given by Max-Min Ant System (MMAS) [deviation from best-known OFC of $52.06M] 310 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Std dev. ($M) 39.16 5.16 36.67 5.17 Average DurCuttot (wks) 17.6 6.4 19.3 6.9 Heuristic Local Best OFC search ($M) 65.61 [317.63%] 16.15 [2.80%] 68.42 [335.52%] 16.12 [2.61%] Average OFC ($M) 120.39 [666.33%] 24.42 [55.44%] 135.13 [760.15%] 26.87 [71.04%] Worst OFC ($M) 209.05 [1230.68%] 31.06 [97.71%] 219.07 [1294.46%] 41.24 [162.51%] Best parameter Average evaluationsa settings {m; ρ; τ0; β}b 27,538 29,029 28,784 28,213 {300; 0.9; 0.01; 0} {500; 0.9; 0.01; 1} {300; 0.9; 0.01; 0} {500; 0.9; 0.01; 1} a Number bm: of evaluations to reach the best solution in one run averaged over 50 runs with different random starting positions. number of ants; (1- ρ): pheromone evaporation rate; τ0: initial pheromone trail; β: relative weight of heuristic in Eq. 7. Table 8. Results for the Modified 21-unit unit problem instance given by Elitist-Ant System (EAS) [deviation from best-known OFC of $15.71M] Heuristic Local Best OFC search ($M) 28.69 [82.62%] 15.97 [1.65%] 33.64 [114.13%] 15.71 [0%] Average OFC ($M) 61.32 [290.32%] 19.69 [25.33%] 71.67 [356.21%] 22.04 [40.29%] Worst OFC ($M) 119.15 [658.43%] 29.03 [84.79%] 132.10 [740.87%] 29.66 [88.80%] Std dev. ($M) 19.54 4.02 24.64 4.86 Average DurCuttot (wks) 11.8 5.6 12.6 6.1 Best parameter Average evaluationsc settings {m; ρ; pbest; β}d 16,934 18,551 24,898 23,713 {20; 0.2; 0.2; 0} {50; 0.2; 0.05; 1} {500; 0.1; 0.05; 0} {500; 0.7; 0.05; 1} a Number of evaluations to reach the best solution in one run averaged over 50 runs with different random starting positions. dm: number of ants; (1- ρ): pheromone evaporation rate; pbest: refer to Eq. 21; β : relative weight of heuristic in Eq. 7. Table 9. Results for the Modified 21-unit problem instance given by Max-Min Ant System (MMAS) [deviation from best-known OFC of $15.71M] Heuristic Local search Best OFC ($) 2186.22 [138.64%] 1365.60 [49.06%] 2331.92 [154.54%] 1174.10 [28.16%] Average OFC ($) 2797.85 [205.40%] 1756.34 [91.72%] 2876.16 [213.95%] 1724.37 [88.23%] Worst OFC ($) 4267.31 [365.80%] 2153.97 [135.12%] 4357.14 [375.61%] 2238.34 [144.33%] Std dev. ($) 410.33 175.55 501.14 172.63 Average DurCuttot (wks) 21.9 13.8 23.2 13.7 Average Best parameter settings evaluationsa {m; ρ; τ0; β}b 27,896 28,648 26,187 21,718 {300; 0.9; 0.01; 0} {500; 0.9; 0.01; 11} {300; 0.9; 0.01; 0} {300; 0.9; 0.01; 11} a Number bm: of evaluations to reach the best solution in one run averaged over 50 runs with different random starting positions. number of ants; (1- ρ): pheromone evaporation rate; τ0: initial pheromone trail; β: relative weight of heuristic in Eq. 7. Table 10. Results for the Modified 22-unit unit problem instance given by Elitist-Ant System (EAS) [deviation from best-known OFC of $916.12] Power Plant Maintenance Scheduling Using Ant Colony Optimization Heuristic Local search Best OFC ($) 1439.33 [57.11%] 1008.13 [10.04%] 1614.39 [76.22%] 1001.12 [9.28%] a Number 311 Average Best parameter settings evaluations {m; ρ; pbest; β}d 26,219 23,329 20,767 21,347 {300; 0.6; 0.2; 0} {20; 0.3; 0.35; 11} {20; 0.3; 0.2; 0} {50; 0.1; 0.35; 11} Average OFC ($) 2076.43 [126.65%] 1489.54 [62.59%] 2068.8 [125.82%] 1513.86 [65.25%] Worst OFC ($) 3998.67 [336.78%] 2017.44 [120.22%] 3936.71 [329.72%] 2084.59 [127.55%] Std dev. ($) 440.16 280.45 425.87 306.26 Average DurCuttot (wks) 15.6 12.1 15.0 12.4 of evaluations to reach the best solution in one run averaged over 50 runs with different random starting positions. dm: number of ants; (1- ρ): pheromone evaporation rate; pbest: refer to Eq. 21; β : relative weight of heuristic in Eq. 7. Table 11. Results for the Modified 22-unit unit problem instance given by Max-Min Ant System (MMAS) [deviation from best-known OFC of $916.12] Stage A: Impact of heuristic Overall, the new heuristic formulation for applying ACO to PPMSO problems significantly improved the results obtained for all four case studies, with and without the use of a local search operator and for both ACO algorithms (using a Student’s t-test at a 95% significance level). It can be seen that when the heuristic was used, not only were the average OFCs improved, but the standard deviations of the OFCs were also significantly smaller for all case studies (Tables 4 to 11), indicating that use of the new heuristic formulation enables good solutions to be found consistently. In order to gain a better understanding of the searching behavior of the ACO algorithms in solving each of the four case studies with and without heuristic, the optimisation process of the ACO runs was examined. The investigation is facilitated by utilizing the following terms to describe a given ACO-PPMSO run: • Objective function values (SSR, LVL and DurCuttot) associated with iteration-best schedules (referred to as IB-SSR, IB-LVL and IB-DurCuttot hereafter) • Violation of various constraints (demand and personpower shortfall) associated with iteration-best schedules (referred to as IB-LoadViotot, IB-ManViotot and IB-LoadResViotot hereafter) The optimization process of only one ACO-PPMSO run for the modified 21-unit case system is used for discussion purposes (Fig. 4). Figs. 4a and 4b compare the behaviour of the ACOPPMSO in solving the case system with and without heuristic. Overall, the ACO-PPMSO algorithm is found to explore the problem search space effectively by minimizing the objective function values (SSR, LVL and DurCuttot) for the four case studies investigated. This is illustrated by the decreasing trends of the IB-SSR and IB-DurCuttot curves in Figs. 4a and 4b. For all case studies, it is found that when the heuristic is used, the IB-SSR and IB-LVL obtained during the early stages of the optimisation runs were substantially lower (compare IB-SSR curves in Figs. 4a and 4b). In addition, it is observed that during the early stages of the ACO runs, fewer trial solutions that violated constraints were constructed when the heuristic was utilized (lower IB-LoadViotot, IB-ManViotot and IB-LoadResViotot). It is also found that the improvement in OFCs obtained when the heuristic is used for the modified 21- and 22-unit case studies is partly attributed to a significant reduction in duration shortened. This is clearly shown in the comparison between Figs. 4a and 4b by the fact that the IB-DurCuttot curve is consistently lower throughout an ACO run when the heuristic formulation is used. 312 20 18 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 60 IB-SSR IB-SSR 16 14 12 50 IB-totalcutdur IB-DurCuttot 40 30 10 8 6 10 4 2 1 201 401 601 801 Iteration 1001 1201 1401 0 20 (a) Without heuristic‡ 20 18 16 50 14 12 10 8 20 6 4 2 1 101 201 301 Iteration 401 501 10 40 70 IB-SSR IB-SSR IB-totalcutdur IB-DurCuttot 60 30 0 (b) With heuristic‡‡ ‡ Parameter settings used shown in the first row, last column of Table 9 (random number seed = 655) ‡‡ Parameter settings used shown in the second row, last column of Table 9 (random number seed = 655) IB-SSR: Sum of squares of reserve associated with iteration-best schedules; IB-DurCuttot: Total reduction in outage duration due to shortening and deferral associated with iteration-best schedules Figure 4. Modified 21-unit case system - Comparison of the SSR- and total duration shortened values associated with iteration-best schedules during optimisation run (Bestknown SSR = 2.62 x 106 MW2 with 5-week deferral) Duration (weeks) Duration (weeks) Power Plant Maintenance Scheduling Using Ant Colony Optimization 313 In view of the experimental results, the heuristic formulation is useful for ACO-PPMSO in three ways. Firstly, as the distribution of pheromone intensity within the search space of a problem is uniform at the beginning of an ACO run (assuming a single initial pheromone value is used), the optimisation process initially resembles a random search. During this period, the heuristic formulation can guide the algorithm to search in regions where feasible solutions are located with a higher probability. In this way, the number of infeasible solutions being constructed and rewarded with pheromone can be reduced. Secondly, even if a heuristic is not essential for constructing feasible/near feasible trial solutions (as is the case when the PPMSO problem is not highly constrained), the heuristic can assist with constructing trial solutions that consist of fewer overlapping tasks. In this way, the generation capacities throughout the planning horizon associated with trial maintenance schedules being constructed are more evenly distributed, which is one of the common objectives of PPMSO problems. Thirdly, when shortening and deferral options are allowed, use of the heuristic increases the probabilities that longer outage durations are chosen throughout an entire ACO run. This is particularly useful when shortening and deferral options are frequently chosen at random during the early stage of an ACO run. In relation to the two ACO algorithms investigated (EAS and MMAS), the results obtained indicate that the heuristic has a significant positive impact on both EAS and MMAS. This is probably due to the ability of heuristic information to identify regions of the search space where high-quality initial solutions lie, reducing the number of low-quality trial solutions being reinforced at the beginning of an optimisation run. In addition, the results indicate that the ACO-PPMSO heuristic has a bigger positive impact on EAS compared to MMAS. EAS tends to stagnate after a number of iterations, which increases the impact of the quality of the initial solutions. The importance of the regions where the ants initially search using EAS is also highlighted by the relatively larger number of ants found for the best parameter settings than those for MMAS (Tables 4, 6, 8 and 10), implying that a search with more ants in each iteration (resulting in a smaller number of iterations during an optimisation run, as the total number of function evaluations is fixed) works better than one with fewer ants (resulting in a larger number of iterations during an optimisation run, as the total number of function evaluations is fixed). On the other hand, relatively smaller ant populations are found to perform best for MMAS (Tables 5, 7, 9 and 11), which might be attributed to the continuous exploration during an MMAS run (Fig. 4b) as a result of the lower and upper bound for pheromone values. It is interesting to observe that despite the expected overall downward trends throughout an optimisation run, the IB-SSR and IB-LVL curves spike occasionally throughout a run when a small population of ants is used (Fig. 4b). This phenomenon is found to be caused by the choice of non-best solutions after a short convergence (stagnation in OFC), which altered the distribution of pheromone over the problem search space. It should be noted that the possibility of having an iteration-best solution that is not the best-so-far solution is higher when a smaller population of ants is used. B. Impact of local search The optimisation results obtained by coupling the PPMSO-2-opt local search operator with the ACO algorithms investigated (Stage B of the testing procedure in Fig. 3) are tabulated in Tables 4 to 11. The unpaired Student’s t-test was used to check the significance of the impact of the local search operator in solving the four case studies with and without heuristic (Tables 12 and 13). Overall, the impact of the PPMSO-2-opt local search operator ranges from being insignificant, to significantly improving or degrading the performance of the ACO 314 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization algorithm investigated. While having a positive impact on solving the original 22-unit case study, regardless of which of the two ACO algorithms was used, the PPMSO-2-opt local search operator was found to improve only the performance of EAS when the heuristic was not used for solving the original 21-unit case study. As for the modified case studies, the performance of ACO in solving the modified 21-unit case study was reduced significantly when the PPMSO-2-opt local search operator was adopted, while the impact of the local search was not significant when applied to the modified 22-unit case study. 21-unit system Heuristic EAS + NIL MMAS NIL NIL 22-unit system EAS + + MMAS + + Modified 21-unit system EAS − − MMAS − − Modified 22-unit system EAS NIL NIL MMAS NIL NIL Notation: +: Significant positive impact; −: Significant negative impact; NIL: Insignificant impact. Table 12. Impact of PPMSO-2-opt local search operator with and without heuristic From the results of the Stage B testing, it is interesting to observe that despite the similarity in the number of generating units for the 21- and 22-unit case study systems, the impact of the PPMSO-2-opt local search algorithm on the optimisation results of these case studies was quite different, which is likely to be caused by the difference in the problem characteristics of the two systems. In order to better understand the results obtained, a series of tests were conducted to investigate the mechanism of PPMSO-2-opt in detail. The satisfaction of constraints associated with iteration-best solutions (target solutions) used for the local search operation and the % of infeasible local solutions generated when using MMAS were examined. It should be noted that the results were obtained using the proposed heuristic formulation. Demand shortfalls of target solutions 18 Personpower shortfalls of target solutions % of local solutions that violated personpower constraints % of local solutions that violated load constraints 100 16 90 14 80 12 60 10 50 8 40 6 30 4 20 2 10 0 1 21 41 Iteration 61 81 101 0 Figure 5. Infeasible local solutions obtained using PPMSO-2-opt (original 21-unit case study using MMAS) % of infeasible local solutions 70 Power Plant Maintenance Scheduling Using Ant Colony Optimization 315 It can be seen that for the original 21-unit case study (Fig. 5), a large number of infeasible local solutions were generated by PPMSO-2-opt in every iteration, even with feasible iteration-best solutions (target maintenance schedules). A local solution generated by simply exchanging the maintenance start time of two randomly chosen generating units without any guidelines is likely to result in infeasible solutions in such a highly constrained search space. As a result, PPMSO-2-opt seems to have an insignificant or even detrimental impact when coupled with ACO for solving the aforementioned case studies. This is particularly evident for the modified 21-unit case study, where as many as 50% to 80% of the local solutions generated by PPMSO-2-opt in every iteration are infeasible with regard to both load and personpower constraints, which is responsible for the significant decrease in ACO performance. These results suggest that the PPMSO-2-opt local search operator is not well suited to problems with highly constrained search spaces. On the other hand, the local solutions generated by PPMSO-2-opt in solving the original 22unit case study are all feasible, as the iteration-best solutions are also feasible. In fact, this is the only case study for which PPMSO-2-opt is found to be effective in improving the optimisation ability of ACO. Compared to the other three case systems, the original 22-unit case system is less constrained. Therefore, the results obtained indicate that PPMSO-2-opt can be useful for solving problems that are not highly constrained. C. Overall performance of ACO-PPMSO Original 21-unit and 22-unit case studies By using the ACO-PPMSO algorithm, a new best-known objective value has been found for both the original 21-unit case study (SSR = 13.66 x 106 MW2) and the original 22-unit case study (LVL = 52.06 MW). A comparison of the results obtained by ACO-PPMSO with those obtained by various metaheuristics in other studies for the 21-unit case study, including those by Aldridge et al. (1999), who used a simple genetic algorithm (GA), a generational GA (GNGA) and a steady state GA (SSGA), and Dahal et al. (2000), who applied Simulated Annealing (SA) and an Inoculated GA to this problem, is shown in Fig. 6. As mentioned previously, the number of evaluations (trial solutions) allowed in the ACO runs and those of the other metaheuristics was identical. In particular, the best and average results of the metaheuristics were compared. While the best and average results given by the simple GA, SSGA, GNGA, inoculated GA and SA were obtained by 10 runs with different starting positions (Aldridge et al., 1999; Dahal et al., 1999; Dahal et al., 2000), those of EAS and MMAS were obtained using 50 runs. It can be seen that the EAS and MMAS algorithms have outperformed the algorithms that have been applied to this case study previously. It should be noted that a new best-found solution (SSR = 13.66 x 106 MW2) for the 21-unit case study has been found by EAS and MMAS using the new ACO-PPMSO formulation. In addition, it can be seen that the differences between the average and best results of the ACO algorithms are much smaller than those for other metaheuristics (Fig. 6), which indicates a consistent performance of the ACO-PPMSO formulation. Among the metaheuristics previously used for solving the 21-unit case study, the inoculated GA, where the initial population is generated using a heuristic that ranks the generating units in order of decreasing capacity, was found to perform best in terms of the average results obtained. This highlights the potential benefit of a heuristic in solving PPMSO problems. 316 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization ACO (MMAS) 13.68 13.66 13.70 13.66 Average Best ACO (EAS) Simple GA 14.67 13.79 15.51 14.83 14.67 13.79 14.27 14.00 14.60 14.05 12.5 13 13.5 14 6 GNGA SSGA Inoculated GA SA 14.5 2 15 15.5 16 SSR (x 10 MW ) Figure 6. Comparison between results obtained using other optimisation methods (Aldridge et al., 1999; Dahal et al., 1999; Dahal et al., 2000) and the ACO algorithms As mentioned previously, a new best-found solution (SSR = 13.66 x 106 MW2) has been found by the ACO-PPMSO formulation proposed in this chapter. An examination of the solutions obtained for the 21-unit case study found that different maintenance schedules are associated with the new best-found SSR solution. In other words, there is more than one optimal solution in the problem search space. In Fig. 7, the reserve level across the planning horizon associated with the best-known schedule found by ACO-PPMSO for the original 22-unit case study is compared with those obtained by implicit enumeration (Escudero et al., 1980) and tabu search (El-Amin et al., 2000). It can be seen that the reserve level given by the ACO schedule is more evenly spread out (summed deviation of generation reserve from the average reserve, LVL = 52.06 MW) than those obtained with implicit enumeration (LVL = 118.81 MW) and tabu search (LVL = 256.93 MW). It should be noted that due to insufficient information about the optimum solution in El-Amin et al. (2000), the LVL value of tabu search shown in Fig. 7 was calculated using the best available published information. Modified 21-unit and 22-unit case studies As the modified versions of the 21- and 22-unit case studies have been introduced in this chapter to test the developed ACO-PPMSO formulation, there are no previous results available for comparison purposes. As can be seen in Tables 7 to 10, the optimized maintenance schedules of both the modified 21- and 22-unit case studies include the shortening and/or deferral of maintenance tasks (average duration shortened/deferred > 0). The best-found objective function costs (OFCs) found for the modified 21-unit case study is $15.71M and $916.12 for the modified 22-unit case study. In the maintenance schedules associated with the best-found OFC for the modified 21-unit case study, the maintenance tasks for generating units 11 and 21 are deferred, while all other tasks are carried out as normal. For the modified 22-unit case study, maintenance tasks for generating units 10, 16 Power Plant Maintenance Scheduling Using Ant Colony Optimization 317 and 17 are shortened by 2, 4 and 2 weeks, respectively. It should be noted that all constraints are satisfied by the best-found schedules. The results for the modified versions of the 21-unit and 22-unit case studies indicate that the ACO-PPMSO formulation introduced in this chapter is able to identify maintenance schedules that satisfy hard system constraints (eg. system demands) by shortening and deferring maintenance tasks. More importantly, the shortening and deferral options were only used if necessary, as only a few, but not all, maintenance tasks were shortened/deferred. tabu search 2400 ACO implicit enumeration 2200 2000 1800 1600 1400 1200 1 11 21 Week 31 41 51 Figure 7. Comparison of reserve levels obtained using ACO, implicit enumeration (Escudero et al., 1980) and tabu search (El-Amin et al., 2000) 5. Summary and Conclusions In this chapter, a formulation for applying Ant Colony Optimization (ACO) to power plant maintenance scheduling optimization (PPMSO) has been developed and successfully tested using four case studies (original and modified versions of two benchmark case studies from the literature). In particular, the performance of the heuristic formulation developed, the two local search algorithms introduced and the overall utility of the ACO-PPMSO formulation were investigated. The results obtained have shown that the heuristic formulation improves the performance of the ACO-PPMSO algorithm significantly when applied to the four case studies investigated. It was found that while the PPMSO-2-opt local search operator seems to work well for unconstrained problems, it is not suitable for highlyconstrained PPMSO problems. Lastly, the results obtained by ACO-PPMSO for the two original case studies were better than those obtained by other optimisation methods, such as various genetic algorithm (GAs) formulations and simulated annealing (SA). For the 21-unit and 22-unit case studies, a new optimal solution has been found by the ACO-PPMSO 318 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization formulation. In addition, the results given by ACO-PPMSO were more consistent compared with those obtained using other metaheuristics previously applied to the two benchmark case studies. The maintenance schedules found for the modified case studies have also been examined and it was found that the ACO-PPMSO formulation is able to meet hard system constraints by shortening and deferring maintenance. The results of experiments carried out using the original and modified versions of the 21-unit and 22-unit case studies indicate that the ACO-PPMSO formulation presented in this chapter has potential for solving real-world PPMSO problems. 6. References Ahmad, A. and D. P. Kothari (2000). A practical model for generator maintenance scheduling with transmission constraints. Electric Machines and Power Systems 28: 501-513. Aldridge, C. J., K. P. Dahal and J. R. McDonald (1999). Genetic algorithms for scheduling generation and maintenance in power systems. Modern Optimisation Techniques in Power Systems. Y.-H. Song. Dordrecht ; Boston, Kluwer Academic Publishers: 63-89. Bauer, A., B. Bullnheimer, R. F. Hartl and C. Strauss (1999). An ant colony optimization approach for the single machine total tardiness problem. Congr. Evolutionary Computation. Coello Coello, C. A. (2002). Theoretical and numerical constraint-handling techniques used with evolutionary algorithms: a survey of the state of the art. Comput. Methods Appl. Mech. Engrg(191): 1245-1287. Colorni, A., M. Dorigo, V. Maniezzo and M. Trubian (1994). Ant system for job-shop scheduling. Belg. J. oper. Res. Stat. Comp. Sci. 34(1): 39-53. Dahal, K. P., C. J. Aldridge and J. R. McDonald (1999). Generator Maintenance Scheduling Using A Genetic Algorithm With A Fuzzy Evaluation Function. Fuzzy Sets and Systems 102: 21-29. Dahal, K. P., J. R. McDonald and G. M. Burt (2000). Modern Heuristic Techniques For Scheduling Generator Maintenance In Power Systems. Transactions of the Institute of Measurement and Control 22(2): 179-194. den Besten, M., T. Stützle and M. Dorigo (2000). Ant Colony Optimization for the total weighted tardiness problem. Proceedings of Parallel Problem Solving from Nature (PPSN-VI), Springer Verlag. Dopazo, J. F. and H. M. Merrill (1975). Optimal Generator Maintenance Scheduling Using Integer Programming. IEEE Transactions on Power Apparatus and Systems PAS-94(5): 1537-1545. Dorigo, M. (1992). Optimization, Learning and Natural Algorithms. Dipartimento di Elettronica. Italy, Politechnico di Milano: 140. Dorigo, M. and L. M. Gambardella (1997a). Ant colonies for the travelling salesman problem. BioSystems 43: 73-81. Dorigo, M. and L. M. Gambardella (1997b). Ant Colony System: A cooperative learning approach to the traveling salesman problem. IEEE Transactions on Evolutionary Computation 1: 53-66. Dorigo, M., V. Maniezzo and A. Colorni (1996). Ant system: optimization by a colony of cooperating ants. IEEE Transactions on Systems, Man, and Cybernetics. Part B, Cybernetics 26: 29-42. Power Plant Maintenance Scheduling Using Ant Colony Optimization 319 Dorigo, M. and T. Stützle (2004). Ant Colony Optimization. Cambridge, MA, MIT Press. El-Amin, I., S. Duffuaa and M. Abbas (2000). A tabu search algorithm for maintenance scheduling of generating units. Electric Power Systems Research 54: 91-99. Endrenyi, J., S. Aboresheid, R. N. Allan, G. J. Anders, S. Asgarpoor, R. Billinton, N. Chowdhury, E. N. Dialynas, M. Fipper, R. H. Fletcher, C. Grigg, J. McCalley, S. Meliopoulos, T. C. Mielnik, P. Nitu, N. Rau, N. D. Reppen, L. Salvaderi, A. Schneider and C. Singh (2001). The Present Status of Maintenance Strategies and the Impact of Maintenance on Reliability. IEEE Transactions on Power Systems 16(4): 636-646. Escudero, L. F., J. W. Horton and J. E. Scheiderich (1980). On maintenance scheduling for energy generators. IEEE Winter Power Meeting, New York. Foong, W. K., H. R. Maier and A. R. Simpson (2005). Ant Colony Optimization (ACO) for Power Plant Maintenance Scheduling Optimization (PPMSO). GECCO 2005: Proceedings of the Genetic and Evolutionary Computation Conference, Washington D.C., USA. Foong, W. K., H. R. Maier and A. R. Simpson (2008). Ant colony optimisation for power plant maintenance scheduling – An improved formulation. Engineering Optimization, In Press, 1st quarter, 2008. Foong, W. K., A. R. Simpson and H. R. Maier (Accepted for publication). Ant colony optimisation for power plant maintenance scheduling - A five-station hydropower system. Annals of Operations Research. Gomez, J. F., H. A. Khodr, P. A. De Oliveira, L. Ocque, J. A. Yusta, R. Villasana and A. J. Urdaneta (2004). Ant colony system algorithm for the planning of primary distribution circuits. IEEE Transactions on Power Systems 19(2): 996-1004. Huang, S. J. (2001). Enhancement of hydroelectric generation scheduling using Ant Colony System based optimization approaches. IEEE Transactions on Energy Conversion 16(3): 296-301. Kannan, S., S. M. R. Slochanal and N. P. Padhy (2005). Application and comparison of metaheuristic techniques to generation expansion planning problem. IEEE Transactions on Power Systems 20(1): 466-475. Lin, C. E., C. J. Huang, C. L. Huang, C. C. Liang and S. Y. Lee (1992). An Expert System for Generator Maintenance Scheduling Using Operation Index. IEEE Transactions on Power Systems 7(3): 1141-1148. Maier, H. R., A. R. Simpson, A. Zecchin, C., W. K. Foong, K. Y. Phang, H. Y. Seah and C. L. Tan (2003). Ant colony optimisation for Design of Water Distribution Systems. Journal of Water Resources Planning and Management 129(3): 200-209. Merkle, D., M. Middendorf and H. Schmeck (2002). Ant colony optimisation for ResourceConstrained Project Scheduling. IEEE Transactions on Evolutionary Computation 6(4): 333-346. Satoh, T. and K. Nara (1991). Maintenance Scheduling By Using Simulated Annealing Method. IEEE Transactions on Power Systems 6(2): 850-857. Stützle, T. (1998). An ant approach for the flow shop problem. Proc. 6th Eur. Congr. Intelligent Techniques and Soft Computing, Aachen, Germany. Stützle, T. and H. Hoos (1997). Improvements on the Ant System: Introducing MAX-MIN Ant System. Proc. Int. Conf. Artificial Neural Networks and Genetic Algorithms, Springer Verlag, Wien. 320 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Stützle, T. and H. H. Hoos (2000). MAX-MIN Ant System. Future Generation Computer Systems 16: 889-914. Su, C. T., C. T. Chang and J. P. Chiou (2005). Optimal capacitor placement in distribution systems employing ant colony search algorithm. Electric Power Components and Systems 33(8). Yamayee, Z., K. Sidenblad and M. Yoshimura (1983). A computational efficient optimal maintenance scheduling method. IEEE Transactions on Power Apparatus and Systems PAS-102(2): 330-338. 17 Particle Swarm Optimization for Simultaneous Optimization of Design and Machining Tolerances Department of Industrial & Manufacturing System Engineering, Huazhong Univ. of Sci. & Tech. China 1. Introduction Tolerance assignment in product design and process planning (machining) affects both the quality and the cost of the overall product cycle. It is a crucial issue to determine how much the tolerance should be relaxed during the assignment process, since a tight tolerance implies a high manufacturing cost and a loose tolerance results in low manufacturing cost. Hence, during tolerance assignment, a balance between a reduction in quality loss and a reduction in manufacturing cost must be considered. Traditionally, in the two stages (product design and process planning) tolerances (Ngoi & Teck, 1997) are often conducted separately. This is probably due to the fact that they deal with different type of tolerances. Product design is concerned with related component tolerances, whereas process designing focus on the process tolerance according to the process specification. However, this separated approach in tolerance design always suffers from several drawbacks. First of all, it is difficult to obtain optimal design tolerance because the designer can not determine the exact manufacturing cost without the specified manufacturing information. Therefore, the manufacturing engineer must frequently communicate with the designer to adjust the design tolerances and obtain the appropriate process planning. However, this task is timeconsuming and painstaking. In addition, design tolerances are further distributed for machining tolerances. Nevertheless, the machining tolerances commonly can not occupy the design tolerances space. Thus the final tolerance distribution is suboptimal and accordingly, the actual cost will be inevitably higher than the desired cost. Moreover, due to the specified procedure, the manufacturing engineer is not informed the design details and does not have the overview of the whole product. To overcome the above drawbacks, we need to develop a simultaneous tolerance design. Zhang (Zhang, 1996) presented the concept of simultaneous tolerance, proposed a general mathematical model for tolerance optimization in concurrent engineering context, and then introduced a new concept of interim tolerances that help determine appropriate manufacturing processes. Singh (Singh et al., 2003) utilized genetic algorithms and penalty function approach to solve the problem of simultaneous selection of design and manufacturing tolerances based on the minimization of the total manufacturing cost. Gao and Huang (Gao & Huang, 2003) utilized a nonlinear programming model for optimal Liang Gao, Chi Zhou and Kun Zan 322 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization process tolerance simultaneously based on the objective of total manufacturing cost with different weighting factors. (Huang et al., 2006) proposed a robust optimum tolerance design method in a concurrent environment to balance the conflict design targets between manufacturing tolerances and product satisfaction. A nonlinear optimal model was also established to minimize the summation of manufacturing costs and product quality loss. Doubtlessly, the tremendous achievement has been obtained in the simultaneous tolerance optimization in the concurrent engineering context. However, this problem is characterized by nonlinear objective, multiple independent variables, and tight constraints which will turn the search space into a noisy solution surface. Even worse, most of the real world problems become more and more complex with the higher requirement of accuracy and the critical function of product. Traditional operational research algorithms are successful in locating the optimal solution, but they are usually problem dependent and lack of generality. Some modern heuristic methods are relatively more robust and flexible to solve these complex problems, but they may risk being trapped to a local optimum and are usually slow in convergence and require heavy computational cost. In view of the above problems and the past successful applications of PSO in nonlinear optimization, maybe PSO is a potential remedy to these drawbacks. PSO is a novel population based heuristic, which utilizes the swarm intelligence generated by the cooperation and competition between the particles in a swarm (Kennedy & Eberhart, 1995, Shi & Eberhart, 1998). Compared with evolutionary algorithms (genetic algorithm, evolutionary programming, evolutionary strategy, and genetic programming), PSO still maintains the population based global search strategy but adopts the velocity-displacement model with more efficient information flow and easier implementing procedures. It has been used successfully to address problems such as complex nonlinear function optimization (Shi & Eberhart, 1999), task assignment (Salman & Ahmad, 2002) and optimum design of PID controller (Gaing, 2004). (Noorul et al., 2006) utilized PSO to achieve the multiple objective of minimum quality loss function and manufacturing cost for the machining tolerance allocation of the over running clutch assembly. The presented method outperforms other methods such as GP and GA, but it considered only two dimensional tolerance allocation of clutch assembly consisting of three components. Besides, the constraints are too loose and can not satisfy the practical requirement. This paper attempts to solve more complex tolerance assignment problems by PSO with a sophisticated constraints handling strategy. This paper is organized as follows. In section 2, the problem of simultaneous design was described. The basic PSO algorithm was reviewed and the new sophisticated constraints handling strategy corresponding to PSO was presented in Section 3. Section 4 gave an example and the evaluation of the proposed technique is carried out on the example. Some conclusions and further discussion are offered in Section 5. 2. Simultaneous design As mentioned before, design processes are commonly divided into two main stages: product design and process design. Dimensional tolerance analysis is very important in both product and process design. In product design stage, the functional and assembly tolerances should be appropriately distributed among the constituent dimensions, this kind of tolerances are called design tolerances. In the meantime, each design tolerance for the single dimension should be subsequently refined to satisfy the requirement for process plans in Particle Swarm Optimization for simultaneous Optimization of Design and Machining Tolerances 323 machining a part. Such tolerances for the specified machining operation are called manufacturing tolerance. However, the traditional process of design and machining tolerance allocations based on experiences can not guarantee optimum tolerance for minimum production cost. This work aimed at selecting the optimal tolerances sequences to achieve the minimum manufacturing cost considering the two types of tolerances simultaneously by a powerful global optimization tool. This problem is formulated as follows. 2.1 Objective Function We take the manufacturing cost as the objective function. Generally, the processing of mechanical product is conducted in a series of process plans. Different process consumes different expense because different process is associated with different machining methods. Therefore, the cost of manufacture of the product is the summation of all operation cost. The machining operation can be modeled with many mathematical models for the cost-tolerance relationship. In this work, a modified form of the exponential cost (Singh et al., 2003) function will be adopted. The manufacturing cost of the machining tolerance is formulated as equation (1). cij (δ ij ) = a0 e − a1 ( δ −a2 ) + a3 i = 1,L , n (1) The total manufacturing cost of a product will be C, where: C = ∑ ∑ cij i =1 j =1 n mi (2) Where cij (δ ij ) and δ ij is the manufacturing cost and the tolerance of the jth manufacturing operation associated with the ith dimension respectively. n is the number of the dimensions and mi is number of operations corresponding to dimension i. The constants a0, a1, a2, a3 sever as control parameters. 2.2 Constraints Apart from the constraint of economical manufacturing ranges (process limits), the above objective is subjected to both the design and manufacturing tolerances. (1) The design tolerances are those on the principal design dimensions (usually assembly dimensions) that relate to the functionality of the components. The principal design usually in turn relies on the other related dimensions which form a dimension chain. This results in a set of constraints on the principal design tolerances that should be suit for the optimal solution of the tolerance assignment. The aim of these constraints is to guarantee that the synthesized tolerance in the dimension chain does not exceed the desired tolerance of the principal dimension. There are many approaches available to formulate the synthesized tolerance. They are different tradeoff between the tolerances and the manufacturing cost. Four commonly used approaches (Singh et al., 2003) were adopted in this work. (2) Manufacturing tolerances constraints are equivalent to stock allowance constraints. Stock allowance is associated with the stock removal, the layer to be removed from the surface in the machining process. Due to the tolerances of the dimensions, the stock removal is also not 324 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization fixed. This gives rise to another kind of tolerances, manufacturing tolerances, which can be formulated as follows: δ ij + δ i ( j −1) ≤ ΔAij (3) where δ ij and δ i ( j −1) are the machining tolerances of process j and j-1 for part i respectively. ΔAij is the difference between the nominal and the minimum machining allowances for machining process j. 3. Particle Swarm Optimization 3.1 Background The investigation and analysis on the biologic colony demonstrated that intelligence generated from complex activities such as cooperation and competition among individuals can provide efficient solutions for specific optimization problems (Kennedy et al., 2001). Inspired by the social behavior of animals such as fish schooling and bird flocking, Kennedy and Eberhart designed the Particle Swarm Optimization (PSO) in 1995 (Kennedy & Eberhart, 1995). This method is a kind of evolutionary computing technology based on swarm intelligence. The basic idea of bird flocking can be depicted as follows: In a bird colony, each bird looks for its own food and in the meantime they cooperate with each other by sharing information among them. Therefore, each bird will explore next promising area by its own experience and experience from the others. Due to these attractive characteristics, i.e. memory and cooperation, PSO is widely applied in many research area and real-world engineering fields as a powerful optimization tool. 3.2 Drawbacks of Traditional Constraints Handling Strategy Although PSO has successfully solved many research problems, the applications are mainly focused on unconstrained optimization problems. Some researchers attempt to solve the constrained problem by optimizing constrained problems indirectly using the traditional penalty function strategy. Penalty function is an effective auxiliary tool to deal with simple constrained problems and has been the most popular approach because of their simplicity and ease of implementation. Nevertheless, since the penalty function approach is generic and applicable to any type of constraint, their performance is not always satisfactory, especially when the problems become more difficult and the imposed constrained conditions become more complex, this method usually fails to generate the best solution, sometimes even cannot achieve a feasible one. The underlying limitation is that unfair competition exists in the population. Thus to deal with this problem, the dynamic and adaptive penalty coefficients should be introduced, which are highly dependent on the specific problem. When combined with PSO, the above problem is more severe in that PSO has an inherent mechanism based on memory information. This mechanism can produce high efficiency and effectiveness, but also low the flexibility for constrained optimization simultaneously. That is, the penalty factors cannot be changed during the iteration. In fact, the most difficult aspect of the penalty function strategy is to find appropriate penalty parameters to guide the search towards the constrained optimum. It is desirable to design a new constraint handling Particle Swarm Optimization for simultaneous Optimization of Design and Machining Tolerances 325 scheme suit for PSO to effectively solve numerous engineering problems and maintain high efficiency. 3.3 Constraints Handling Strategy for PSO Taking account of the memory mechanism of PSO and penalty strategy, a new constrainthandling strategy is presented in Figure.1. The core characteristics of the proposed strategy can be described as follows: 1. Corresponding to the memory mechanism of PSO, a special notation-Particle has been Feasible (PF) is introduced, which is used to record whether the current particle has ever satisfied all the constraint conditions. This notation preserves historical constrain status for each particle. 2. Each particle updates its individual best and neighborhood best according to the historical constraint information PF, the current constrain status (Current particle is Feasible, CF) and the objective function with the penalty term. 3. The algorithm selects the velocity updating strategy according to the historical information PF. 4. When updating the personal and neighborhood best, the algorithm adopts the static penalty strategy instead of the dynamic and the adaptive ones to guarantee the fairness. The detailed procedure for updating the personal and neighborhood best values based on the above constrain handling strategy is presented in Figure.1. For Each Particle { If PF=true Then If f ( xi ) ≤ f ( pi ) and CF= true Then pi = xi If f ( pi ) ≤ f (li ) Then pi = li End if End if Else if PF=false Then If CF= true Then pi = xi PF=true If f ( pi ) ≤ f (li ) Then pi = li End if Else if f ( xi ) ≤ f ( pi ) Then pi = xi End if End if Figure 1. The proposed constraint handling strategy for PSO 326 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Special attention should be paid that the PSO algorithm based on the proposed constraint handling strategy does not have to guarantee the existence of feasible solutions in the initial population. With the randomized initial velocity, the PSO itself has the ability to explore the feasible space. In addition, the penalty function imposed on the violated particles also direct the search of PSO towards the feasible region. Therefore once feasible solutions emerge in the neighborhood population, the neighborhood best will be preserved in the subsequent iteration procedure. According to the velocity updating formula, each particle will obtain updating information from its neighborhood best particle, so the corresponding particle would return to the feasible solution space immediately. 4. Design Example To validate the effectiveness of the new proposed strategy and illustrate the application of the concurrent design, the cylinder-piston assembly (Singh et al., 2003) (shown in Figure.2) is described. In this example, the piston diameter is 50.8mm, the cylinder bore diameter is 50.856mm, and the clearance is 0.056 ± 0.025 mm. The machining process plan is: (1) for the piston: rough turning, finish turning, rough grinding, and finally finish grinding. (2) for the cylinder bore: drilling, boring, semi-finish boring, and finally grinding. The ranges of the principal machining tolerances for the piston and cylinder bore were the same as in the (Singh et al., 2003). δc δp Δ Figure 2. Cylinder-piston assembly To formulate this problem, the objective and the constraints should be determined. In this problem, the principal tolerances are the design tolerances and the machining tolerances for the piston and the cylinder bore. So there are only two design tolerance parameters, for the piston diameter and cylinder bore diameter respectively. In the meantime, we have four machining tolerances for the piston diameter and four machining tolerances for the cylinder bore diameter. Therefore we have to consider totally 10 tolerances for the piston-cylinder bore assembly as follows. (1)The design tolerance parameters: δ 11d for the piston and δ 21d for the cylinder bore. Four stack-up conditions (Singh et al., 2003) (worst case, RSS, Spotts’ modified method and estimated mean shift criteria) are employed to formulate the corresponding constraints. (2)The machining tolerance parameters are: δ ij where i=1,2 and j=1,2,3,4. Here, the first subscript 1 refer to piston and 2 refer to the cylinder bore. The second subscript refers to the four machining processes. Usually, the process tolerance for Particle Swarm Optimization for simultaneous Optimization of Design and Machining Tolerances 327 the final finishing operation is same as the design tolerance, i.e. δ11d = δ14 and δ12d = δ 24 . Thus, there are actually 8 tolerance parameters to be considerd. The machining tolerance constraints are formulated based on Equation 3. The manufacturing decision is the total machining cost and is determined by summing the machining cost-tolerance model as Equation 1 and Equation 2 subjecting to the constraints and ranges of the principal design and machining tolerances. The constant parameters are the same as in (Singh et al., 2003). GA Piston 0.0162 0.0037 0.0013 0.0005 Cylinder 0.0162 0.0038 0.0012 0.0005 GA Piston 0.0161 0.0039 0.0011 0.0007 Cylinder 0.0161 0.0038 0.0012 0.0006 GA Piston 0.0160 0.0038 0.0012 0.0006 Cylinder 0.0159 0.0038 0.0012 0.0005 GA Piston 0.0162 0.0037 0.0012 0.0006 Cylinder 0.0151 0.0038 0.0011 0.0006 Cost Time (s) Piston 0.0161 0.0039 0.0011 0.0006 Cylinder 0.0162 0.0038 0.0012 0.0006 Cost Time (s) Piston 0.0162 0.0038 0.0012 0.0006 Cylinder 0.0162 0.0038 0.0012 0.0006 Cost Time (s) Piston 0.0161 0.0039 0.0011 0.0007 Cylinder 0.0162 0.0038 0.0012 0.0006 Cost Time (s) Piston 0.0163 0.0037 0.0013 0.0005 Cylinder 0.0163 0.0037 0.0013 0.0005 PSO Min Ave Max Time (s) 83 66.85 350 66.74 66.74 66.74 (a) Based on the worst case criteria PSO Min Ave Max Time (s) 80 65.92 330 66.82 66.82 66.82 (b) Based on the worst RSS criteria PSO Min Ave Max Time (s) 78 66.23 330 65.93 65.93 65.93 (c) Based on the worst Spotts' criteria PSO Min Ave Max Time (s) 82 66.26 350 65.82 65.82 65.82 (d) Based on the worst mean shift or Greenwood and Chase's unified criteria Table 1. Optimal tolerances allocation using GA and PSO 328 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Figure 3. Variation of the minimum, maximum and average of the manufacturing costs with progress of the algorithm (Greenwood and Chase's unified, or estimated mean shift criteria) Figure 4. Minimum manufacturing cost in a given number of generations Particle Swarm Optimization for simultaneous Optimization of Design and Machining Tolerances 329 The proposed PSO algorithm with special constraints handling strategy was used to solve this problem. To validate its efficiency, this new approach was compared with GA in (Singh et al., 2003). In the optimization process of HPSO, we set the population size popsize=80, the maximum iteration number itermax=600. These two parameters are the same as those in GA. The other parameters are set as the common used method. The inertial weight decreases from 0.9 to 0.4 linearly and the accelerated parameters c1=c2=2. The optimal tolerance allocated using HPSO and GA based on the above four criteria and the corresponding CPU time are listed in Table 1. The computational results clearly indicate that HPSO outperformed GA in the terms of solution quality as well as computational expense. In addition, HPSO is able to find the optimum in each trial, that is, it has significantly larger probability of converging to optimal solutions. It is necessary to point out that one important merit of PSO algorithm is the high precision of the solutions. However, due to the limitation of display capacity of the tables, the entire data are rounded. The statistical results obtained under the Greenwood and Chase’s estimated mean shift criteria are demonstrated in Figure.3. Similar curves can be obtained for other cases. Improvement in the fitness function causes reduction in the assembly manufacturing cost and the amount of infeasibility in subsequent generations. Figure.3 reflects the general behavior about convergence of PSO algorithm. Sharply contrast with GA, the PSO algorithm has consistent convergence. The average and worst fitness are not fluctuant as in GA. Figure.4 demonstrates the minimum manufacturing cost under all four stack-up conditions. The different tendency and position of the curve reveals the difference of the fitness (manufacturing cost). 5. Conclusion Tolerance assignment is very important in product design and machining. The conventional sequentially tolerance allocation suffers from several drawbacks. Therefore, a simultaneous tolerance assignment approach is adopted to overcome these drawbacks. However, the optimization task is usually difficult to tackle due to the nonlinear, multi-variable and high constrained characteristics. In trying to solve such constrained optimization problem, penalty function based methods have been the most popular approach. However, since the penalty function approach is generic and applicable to any type of constraint, their performance is not always satisfactory and consistent. In view of the memory characteristics of PSO, a new constraints handling strategy suit for PSO is designed. This new strategy can adequately utilize the historical information in PSO algorithm. The application on a cylinder-piston assembly example demonstrates its high efficiency and effectiveness. However, when we attempt to extend the proposed approach to the constrained optimization with large number of complex equality constraints, subtle drawbacks emerged, as the constrained range is so narrow that the equality constraints are hard to satisfy. This problem reveals the new research direction, which is the effective equality constraint handling strategy desirable to develop for PSO based nonlinear programming. Furthermore, powerful local search methods should be introduced to combine with PSO to improve the ability of refined search. In view of its successful application in the above problems especially those engineering ones, PSO can be considered as a general nonlinear constrained optimization tool, and thus could be applied to more engineering optimization problems that can be modeled as nonlinear programming problems. 330 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 6. References Gaing, Z.L. (2004). A Particle swarm optimization approach for optimum design of PID controller in AVR system. IEEE Transaction on Energy Conversion, Vol.19, 384-391 Gao, Y. & Huang, M. (2003). Optimal process tolerance balancing based on process capabilities. International Journal of Advanced Manufacturing Technology, Vol.21, 501– 507 Huang, M.F. ; Zhong, Y.R. & Xu, Z.G.(2004). Concurrent process tolerance design based on minimum product manufacturing cost and quality loss. International Journal of Advanced Manufacturing Technology, Vol.25, 714-722 Kennedy, J. & Eberhart, R.C.(1995). Particle swarm optimization. Proceedings of IEEE International Conference on Neutral Networks, pp. 1942-1948, Perth, Australia Kennedy, J. ; Eberhart, R.C. & Shi, Y. (2001) Swarm Intelligence. Morgan Kaufman, San Francisco Ngoi, B.K.A. & Teck, O.C. (1997). A tolerancing optimization method for product design. International Journal of Advanced Manufacturing Technology, Vol. 13, 290-299 Noorul Hap, A. ; Sivakumar, K. ; Saravanan, R. & Karthikeyan, K. (2005). Particle swarm optimiza-tion (PSO) algorithm for optimal machining allocation of clutch assembly. Interna-tional Journal of Advanced Manufacturing Technology, Vol.27, 865-869 Salman, A. & Ahmad, I.(2002). Particle swarm optimization for task assignment problem. Microprocessors and Microsystems, Vol.26, 363-371 Shi, Y.H. ; & Eberhart, R.C.(1998). A modified particle swarm optimizer. Proceedings of IEEE Conference on Evolutionary Computation, pp. 69-73 Shi, Y.H. & Eberhart, R.C. (1999). Empirical study of particle swarm optimization. IEEE Congress on Evolutionary Computation Singh, P.K. ; Jain, P.K. & Jain, S.C. (2003). Simultaneous optimal selection of design and manufactur-ing tolerances with different stack-up conditions using genetic algorithms. International Journal of Production Research, Vol.41,2411-2429 Zhang, G.(1996). Simultaneous tolerancing for design and manufacturing. International Journal of Production Research, Vol.34, 3361-3382 18 Hybrid optimisation method for the facility layout problem Yasmina Hani, Lionel Amodeo, Farouk Yalaoui and Haoxun Chen University of Technology of Troyes (ICD FRE CNRS 2848) France 1. Introduction Due to increased competition, the manufacturers are brought to quickly respond to the needs of customers for on-time delivery of high quality products. Many studies have been made to realize these objectives such as he studies on the facility layout problem (FLP). It is to find a good configuration of the machines, equipments or other resources in a given facility in order to optimize the production flows while minimizing the total cost. The FLP arises in many industry cases, such as facility reorganization, construction of new production units, or equipment assignment. To solve this problem, we develop an ant colony optimization algorithm combined with a local search method. This chapter presents the algorithm, its performance evaluation et application to an industrial case. The remainder of this chapter is organised as follows: In section 2, the layout problem is described. In section 3, we present the general framework of the ACO algorithm and its enhancement by guided local search. Computational results on the performance evaluation of the algorithm using a set of benchmark instances are presented in section 4, and the application of the algorithm to an industrial case is reported in section 5. In section 6, we conclude this chapter with some remarks. 2. The layout problem The layout problem is commonly met in the industry. A full description of the problem can be found in (Kusiak & Heragu, 1987). Layout problem is known to be NP-Hard (Sahni & Gonzales, 1976). There are many cases where FLP is considered in facility reorganization, construction of new production units, or equipment assignment. Layout problem could be also found in many classical and theoretical studies. However, only few layout industrial cases are treated in the literature. Hicks (2004), developed a genetic algorithm for minimizing material movement in a manufacturing cell with application to practical problems related to the capital good industry. Lee et al. (2002) proposed a genetic algorithm for solving multi-floor facility layout problems with the facility’s inner structure consisting of walls and passages. A study related to the fashion industry was presented by Martens (2004). 332 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The FLP has been formulated as a Quadratic Assignment Problem (QAP). Other formulations also exist such as mixed integer programming (Meller et al., 1999) and graph theoretic model (Caccetta & Kusumah, 2001). Many methods are used to solve the layout problem and they are essentially based on metaheuristics such as Genetic Algorithms (GA) (Lee et al., 2002), Tabu Search (Chiang & Chiang, 1998), Simulated Annealing (SA) (Baykasoglu & Gindy, 2001), Ant Colony (Solimanpur et al., 2004). In our study, we consider a layout problem modelled as a QAP. 3. Hybrid Ant Colony Optimization 3.1 Ant colony optimization (ACO) The principle of ACO algorithms (Corne & Dorigo, 1999; Dorigo et al., 2000) is based on the way ants search for food. Each ant takes into consideration (probabilistic choice) pheromone trails left by all other ant colony members which preceded its course, the pheromone trail being a trace, a smell left by every ant on its way. This pheromone evaporates with time, and therefore the probabilistic choice for each ant changes with time. After many ant courses, the path to the food will be characterized by higher pheromone traces and thus all ants will follow the same path. This collective behaviour, based upon a shared memory among all colony ants could be adapted and used for solving combinatorial optimization problems with the following analogies: • The real ant search space becomes the space of the combinatorial problem solutions. • The amount of food inside a source becomes the evaluation of the objective function for the corresponding solution. • The pheromone trails become an adaptive shared memory. Ant colony optimization (ACO) problems could therefore be encoded as finding the shortest path in a graph. One of the first applications of ACO was the travelling salesman problem. In the general case, the ant colony algorithm applies the artificial ants’ concept; it is represented by the following steps: Step 1: Initialization of parameters Step 2: Construction of solutions Step 3: Local search algorithm Step 4: Pheromone updating rule Step 5: Return to 2 until a given stopping criterion satisfied Ant colony optimization (ACO) is a method widely used for solving quadratic assignment problem. The first application was proposed by Maniezzo et al. in 1994. Since that, many applications were proposed, and the differences were in the generation of solutions, the local search method and the pheromone updating. Stutzle & Dorigo (1997) reviewed the ant algorithm applied to solve QAP and reported that the ACO algorithms are among the well performing methods to solve QAP. The MAX-MIN ant system algorithm (MMAS) proposed by Stutzle & Hoos (2000) allows only the best solution to add pheromone trail during the pheromone trail update. A bound is used for trail levels to avoid premature convergence of the search. Gambardella et al (1997) proposed a hybrid ant system HAS-QAP to solve QAP. The originality of their approach is in that the pheromone trail was not used to construct solutions but to modify them in the local search. Most of the proposed metaheuristics for the FLP problem are effective for small instances. Their performances become worse with the increase of the problem size (i.e. number of resources). Solimanpur et al. (2004) proposed an ACO algorithm for the inter-cell layout Hybrid method for the layout problem 333 problem formulated as QAP. They proposed a technique based on the partial contribution of each assignment for the calculation of a lower bound used in (Maniezzo, 1999). It was limited to only 30 departments because of the complexity of the problem. In a previous study, ANTabu (Stützle & Dorigo, 1999) using an ant colony optimization with a tabu local search procedure, was successfully applied to the QAP for large instances (i.e. 256 resources). The ant colony algorithm adapted to the layout problem is composed of the following elements: 1. Construction of solutions In the proposed algorithm, it is assumed that each ant initially assigns a task i to location j noted (i,j), then another task to another location k, and so on until a complete solution is obtained. A tabu list represents the set of tasks that the ants has already assigned, the list of the couples (i,j). This list ensures that all the tasks are assigned to locations. The criterion of the tasks assignment takes into account the probability of assignment with a given site, and depends on two terms, one relating to each ant (visibility) and the other relating to the quantity of pheromones deposited by the whole of the ants. 2. Heuristic information The ants are not completely blind, they calculate the cost relating to the assignment of a task to a given site. This cost takes into account the flow and distances matrix. Heuristic information, called visibility is a function of the assignment cost. Several formulas were used in the literature and each one is adapted to a given problem. Concerning QAP, the assignment of a task i to the site l depends on the tasks assigned before. We define the cost associated with the assignment (i,l) as: C(i,l) = ∑( f s =1 l −1 r ( s )i × d sl + f ir ( s ) × d ls ) (1) where, r denotes a permutation of resources under construction. The visibility which represents the desirability of move is defined as: ηil = 1+ 1 ∑( f s =1 l −1 (2) r ( s )i × d sl + f ir ( s ) × d ls ) The reason for which number 1 is added to the denominator of the fraction in (2) is for avoiding division by 0. This formula means that the assignments with smaller contribution to the objective function would be more desirable for selection. 3. Pheromone updating The pheromone updating mechanism is represented by the following equation τ il (t ) = λτ il (t − 1) + ∑ ∆τ k k il (3) where, τ il (t ) is the quantity of pheromone associated with the assignment of the task i to location l for each ant k for the iteration t. As an ant chooses this assignment, the quantity τ il (t ) increases. The parameter λ is a scaling factor. A large λ results in quick convergence to a local optima solution. 334 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Finally, k ∆τ il = ∑ k Bestfit fit[k ] (4) denotes the magnitude of change in the trail level of an assignment through ant. As seen, the smaller is the fitness solution fit[k] obtained by ant k, the more would be the increment in trail levels selected by ant k. 4. Selection probability An ant k chooses task i to assign to location l by the following probability: k pil = ∑ α × τ il + (1 − α ) ×ηil i ≠Tabu k (α ×τ il + (1 − α ) ×ηil ) , (5) where, α contributes to make a balance between the choice adopted by the whole of the ants (α near to 1) and the choice of each ant based on its own visibility (α near to 0). We note that a task is assigned to a location if the relative quantity of pheromones is significant or if the associated cost is weak. Finally, the task having the largest probability is assigned to location l. 5. Local search We choose local search method 2-opt which is simple and well adapted to QAP (Solimanpur et al., 2004). This method applies to a given solution all possible permutations of pairs of tasks. The permutation giving the minimal cost is selected as a local minimum next to the starting solution. This process is repeated until no improvement is observed. In order to limit computation time during the exchanges, we made the following simplification; if the exchange is done between the elements π i and π j of the permutation π , the difference in the objective function value will be then: ∆ (π , i, j ) = ( d ii − d jj )( fπ j π j − fπ j π j ) + ( d ij − d ji )( fπ jπ i − fπ iπ j ) + k ≠i, j ∑ (d ki − d kj )( fπ k π j − fπ k π i ) + ( d ik − d jk )( fπ jπ k − fπ iπ k ) (6) This algebric simplification was used by Gambardella et al. in 1997 when they propose HAS-QAP, a hybrid ant colony system applied to the quadratic assignment problem. The local search does not necessarily lead to a global minimum. In most cases, it converges to a local minimum. For this, a guided local search (GLS) method is used to "penalize" the local minimum found in order to converge to the global minimum. GLS will be explained in detail later. 6. Diversification Used by Gambardella in 1997, the diversification mechanism is activated if during a number of iterations max_iter, no improvement to the best generated solution is detected. Diversification consists of erasing all the information contained in the pheromone trail by a re-initialization of the pheromone trail matrix and of generating randomly a new current solution for all the ants but one that receives the best solution produced by the search so far. Another possibility is to erase all pheromone trails except for the best solution. Ant colony algorithm We propose the following general ant colony optimization algorithm with 2-opt. Hybrid method for the layout problem 335 Step 1: initialization of parameters for all the tasks and locations Step 2: for each ant Assign tasks to locations with a probability p Update the pheromones If the best solution is not improved until max_iter iterations, τ il = 0 , except for the best solution. Step 3: Return to Step2 until stopping criterion is satisfied. 3.2 Enhancement of ACO by Guided Local Search (GLS) Guided Local Search (GLS) (Mills and Tsang, 2002) is a metaheuristic which sits as a good local search algorithm. When the given local search algorithm settles in a local optimum, GLS changes the objective function, by increasing penalties in an augmented objective function, associated with features contained in the local optimum. The local search then continues to search using the augmented objective function. The choice of solution features depends on the problem type, and each feature fi defined must have the following components: 1. An indicator function Ii(s) indicating whether the feature is present in the current solution or not. It is equal to 1 if the feature fi is present in the solution s and 0 otherwise. 2. A cost function ci(s) which gives the cost of having fi in s. 3. A penalty pi initially set to 0, used to penalize the occurrence of fi in local minima. When the local search returns a local minimum s, GLS increases the penalty of the features of s which have maximum utility util(s,fi) defined as follow : util ( s, fi ) = I i ( s ) ci ( s ) 1 + pi (7) The idea is to penalise the features, which have highest costs first. GLS uses an augmented cost function (8) in order to guide the local search out of a local optimum. The idea is to make the local minimum more costly than the solutions in the surrounding search space, where the same features are not present. h( s ) = g ( s ) + λ ' ∑ I (s). p i i =1 n i (8) where, g(s) is the cost function and λ’ a parameter used to alter the diversification of the search for solutions. A higher value for λ’ will result in more diverse search. The application of GLS for the QAP problem is realised with the following analogies: • The feature fi,πi of a solution s corresponds to the assignment of task i to the location πi. • The cost related to feature fi,πi depends on the interaction of the task i with all other tasks of the solution s. This cost is given by C (i, π i ) = ∑f j =1 n ij Dπ i π j (9) • The value λ’ well adapted to the QAP is given by ∑∑ ∑∑ D f ij × n n n n n ij λ'= i =1 j =1 i =1 j =1 4 (10) 336 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The application of GLS technique to the QAP problem could be summarized in the following: Starting from the current solution, a local search method (2-opt for example) is used to find a local minimum, with respect to the augmented cost function. If this minimum has a cost (not augmented) lower than the lowest cost ever found, it is saved as the best ever found solution. Finally, the assignment having the maximum utility would have its corresponding penalty increased. The GLSQAP algorithm could be summarized as follows: Step 1: Calculation of λ’ Step 2: The best solution s’ = initial solution s Step 3: Perform a local search 2-opt with respect to the augmented cost function, s* is found as the solution having the lower augmented cost. If cost (s*) < cost (s’), replace s’ by s*. Find the assignment (feature) of s* having the maximum utility, let it be fi,πi for example. Increase the corresponding penalty: pi,πi= pi,πi+1. Step 4: Return to step 3 until a given stopping criterion is satisfied. Step 5: s’ is the best solution found for the original problem. Finally, the algorithm procedure of ant colony optimization with GLS is given as follows: Step 1: initialization of parameters Step 2: for all ants a. Assign tasks to locations with the given assignment probability b. Perform the guided local search GLSQAP c. Update the pheromones d. If the best solution is not improved until max_iter iterations, τ il = 0 , except for the best solution. Step 3 : Return to step2 until a stopping criterion is satisfied. 4. Computational results speed. In the proposed algorithm four parameters: ant number AN, alpha, max_iter and τ 0 affect the performance of the algorithm. To find the appropriate parameters for our problem, pilot runs were performed. Ant number AN was tested between 5 and 60, and a compromise between the quality of the results and the convergence time was found for AN = 20. When AN was fixed, the best convergence was found for max_iter = 10 and alpha = 0.6. Usually, alpha is close to 0.5. In our case the value 0.6 indicates that the construction of the solutions more supports the pheromone trails than the individual ant investigation. This value was found to be well adapted with the GLS procedure. Table 1 lists the appropriate values: Parameter AN Alpha max_iter Value 20 0.6 10 0 The algorithm was implemented using Visual C++ 6.0. on a Pentium 3 with 1.8 Ghz CPU τ0 Table 1. Parameter values Hybrid method for the layout problem 337 The performance of this algorithm was tested on instances from the library QAPLIB (Burkard et al., 1991). We first compare our algorithm with the HAS-QAP (Gambardella et al., 1997) method based on ant colonies. We then compare it with ANTabu (Talbi et al., 2001) which is compared with other methods based on genetic algorithms, simulated annealing, tabu search or ant colony and with a recent ant colony optimization algorithm proposed by Solimanpur et al. (2004), which is adapted for problems with a small number of locations. Table 2 compares the results of all the cited algorithms for small instances with a number of locations falling between 19 and 30. The instances we chose include the regular and irregular problems of QAPLIB. The difference relative to the QAPLIB best known solution is given as a percentage gap. It is almost impossible to have the same experimental settings as for previous studies, but in order to give an idea on the computation time, the mean execution time over 10 runs is shown in table 2. Best ACO Time known HAS_QAP ANTabu ACO_GLS Solimanpur (s) value 0 0 0 Els 19 17212548 0.923 4 0 0 0 Tai 20b 122455319 0.243 5 0 0 Chr 25a 3796 3.0822 0.8957 3 0 0 0 0 Bur 26a 5426670 35 0 0 0 Bur 26b 3817852 0.0169 34 0 0 0 0 Bur 26c 5426795 34 0 0 0 0 Bur 26d 3821225 35 0 0 0 0 Bur 26e 5386859 34 0 0 0 0 Bur 26f 3782044 34 0 0 0 0 Bur 26g 10117172 33 0 0 Kra30a 88900 0.6299 0.2677 35 0 0 Kra 30b 91420 0.0711 0.0153 19 0 0 Nug30 6124 0.098 0.013 3 aValues indicate the average gap between solution value and best known value in percent Table 2. Compare results on QAP instances selected from QAPLIB (best results are in boldface)a Table 3 proves that for the instances with up to 30 tasks, ACO_GLS performs better than all other algorithms in comparison. In order to generalize the application of our algorithm, large instances from the QAPLIB were studied with different classes of problems. Results are shown in Table 3. We have compared those algorithms on a set of 12 instances, ranging from 35 to 128 locations. For larger instances, the results given by ANTabu are a little bit better, so we may have to perform more complicated local search in order to escape local minima in the problems with large instances. It is shown (table 3) that our algorithm ACO_GLS performs better than HASQAP. However, our algorithm can still obtain satisfactory solutions for large instance. The proposed ACO-GLS algorithm proved to converge perfectly for instances up to 40 locations as shown in tables 2 and 3. This performance is quite satisfactory for industrial problems because real life problems usually do not exceed 30 to 40 locations. Therefore, this algorithm will be a very useful tool for layout optimization in the real life industrial case explained in this paper. 338 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Tai 35a Tai 35b Tai 40a Tai 50a Tai 60a Tai 80a Wil 50 Sko42 Sko49 Sko56 Sko64 Esc 128 Best known value 2422002 283315445 3139370 4941410 7208572 13557864 48816 15812 23410 34524 48498 64 HAS_QAP 1.762 0.343 1.989 2.800 3.070 0.663 0.061 0.076 0.141 0.101 0.129 - ANTabu 0.215 0.0408 0.442 0.781 0.919 0.663 0.008 0 0.038 0.002 0.001 0 ACO_GLS 0 0 0 1,28 1.25 1.53 0.01 0 0.10 0.19 0.008 0 Time (s) 109 112 204 228 342 1524 1197 82 105 294 522 1292 Table 3. Compare results on QAP instances selected from QAPLIB (best results are in boldface) 5. Application to an industrial case Our study (Hani et al., 2006; Hani et al., 2007) concerns an industrial layout problem for a train maintenance facility of the French railway system (SNCF). The train maintenance facility is composed of buildings established on parallel rail tracks [15]. The cars to be treated arrive in batches and travel in the various buildings according to the sequence of their operations. They may travel transversally carried from one building to another by a transport which moves on a fixed trajectory. An on-rail transport permits movement along the rails. Some tasks require long processing, which would occupy their locations for a long time. These tasks represent bottlenecks for the facility. B1 B2 Legend Horizontal motion Vertical motion Vehicle Building structure Figure 1. One example structure Hybrid method for the layout problem 339 In the current application, and due to the paucity of locations, some cars must be moved out of its building in order to give access to other cars in need of repair. The current facility layout has proved to be quite constraining for the production planning of the repair line. The problem is to find a layout of the resources in individual buildings in order to optimize the flow of cars between the buildings. Figure 2 shows an example of a building composed of two parallel tracks and 6 locations. Access to the building is possible only via the lateral side. Suppose a car needs to pass from outside to location 2, and then to location 6. Then it is necessary to move the car which occupies location 1 or location 3 in order to let the new car access location 2. Then, in order to go to location 6, it is necessary to move the car on location 3 or that on location 1. In other words, the problem is to find a new configuration of the resources in one of the buildings (figure 1) in order to optimize (minimize) the flow among all resources (facilities). 1 4 Figure 2. One building example In order to model our problem, each rail is decomposed into zones called car locations where the maintenance tasks are performed. The car locations can be categorized into three types: • If a location is cluttered (e.g., stocks, workbench, etc.), then it is called unusable. • If a location is occupied by a fixed resource (such as big machines for electric tests), it is called specialized since theses resources cannot be moved. • If a location is neither unusable nor specialized, it is said to be standardized. Note that when unusable locations exist, access becomes even more difficult, as for example having location 6 as unusable in figure 2. Outside the building, there exists a transport system which carries cars from one side to another of the facility. There are three transporters: two transversal and one on-rail transport that effects the movement of the cars on the rails. In other words, the problem is to find a new resource configuration in one of the buildings (figure 2) in order to optimize (minimize) the production flow between all resources (facilities). We consider N resources to be assigned to N sites or car locations in the building. Given a distance matrix D, where each element dk,w denotes a distance between location k and w, for k,w = 1, 2, . . . N, a flow matrix F, where each element fi,j denotes a flow cost between resource i and j , for i, j = 1, 2, . . . N. The flow cost depends on the number of trips between two resources in a given time horizon. In the problem considered, the matrix flow is not symmetric because of precedence constraints. The distance matrix is symmetric. The distance calculation is related to the minimum vehicle number to move inside a building in order to make an exchange. As an example in figure 1, d(2,3) = 0, d(1,5) = 1 (by crossing position 4) et d(2,5) = 2 (by crossing position 1 and 4). 2 5 3 6 340 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Our problem is modeled as a QAP. The flow cost depends on the number of trips between two resources in a given time horizon. In the problem considered, the matrix flow is not symmetric because of precedence constraints. The distance matrix is symmetric. The distance calculation is related to the minimum number of vehicles to move inside a building in order to make an exchange. Model parameters: N: total number of locations rij : Resource j assigned to task i Dk,w : Distance between locations k and w. This distance is defined as the number of usable locations between both resources. f rij , ri ' j ' : Production flow between the resources rij and ri’j’. This flow is evaluated as the number of cars passing between the two resources. 1 if rij is assigned to the location k prij , k = 0 else 1 if location k is standardized TEk = 0 else d 1 if locationk is specialize TESk = 0 else (11) (12) (13) In order to optimize the production flow, we define a quadratic function Z to minimize: Z= ∑∑∑∑∑∑f i j i' j' k w rij ,ri' j' × D ,w × Pij ,k × Pi' j' ,w k r r (14) If the unusable locations are excluded, the following constraints should be added: ∀k : ∑ ∑p i j rij , k =1 (15) ∀i, j : ∑p k rij , k =1 (16) (17) TEk + TES k = 1 Constraints (15) and (16) are the standard constraints for the regular assignment problem. Constraint (17) implies that all occupied locations are either specialized or standardized. The industrial problem consists of 72 locations with 27 unusable, 39 specialized and 6 standardized locations. 15 tasks with total of 27 resources had to be assigned. The actual resources assignment was taken as an initial condition for the algorithm. All calculations were done based upon data for one year planning. As previously stated, the application of the hybrid GA algorithm to the industrial case has to exclude unusable and specialized locations from the locations choice; only standardized locations are considered. Hybrid method for the layout problem 341 The actual layout in the workshop produces a cost of 425, however, our algorithm ACO_GLS produces a solution with an improvement of 19.6% with respect to the actual layout. This means that it converges to a better solution, which proves its ability to solve an industrial layout problem. We also found the exact solution of the problem by using an enumeration method since only six tasks needed to be assigned. The solution is the same as what was found by the algorithm. This implies that the algorithm converges to the optimal solution for this industrial problem. The proposed application may be useful for the industrial case in the future. In fact, as stated above in the problem description, the industry is trying to increase its performance which means solving other facility problems. In addition, other vehicle sequences will be added, and many locations need to become free in order to accept new tasks. As it can be imagined, the future problem in the industry is to layout a greater number of locations which may reach 30 to 40 locations. The proposed ACO-GLS needs to be tested for large instance problems and its performance has to be evaluated with respect to other known algorithms. For this purpose, public sequences were tested and results were compared with other studies. 6. Conclusion We have proposed a robust meta-heuristic algorithm for the layout problem modelled as a QAP. The algorithm is based on ant colony algorithm combined with a guided local search, and it uses an augmented cost function in order to guide the local search out of a local optimum. The performance of the proposed algorithm was also evaluated on a number of benchmark problems selected from the literature and compared with other heuristics developed for the facility layout problem as well as other algorithms recently developed for the QAP. The experimental results reveal that the proposed algorithm is effective and efficient for the facility layout problem considered. Other heuristic algorithms for the FLP shall be devised, tested, and compared with our algorithm in future studies. 7. References Baykasoğlu A., Gindy N.N.Z. (2001). A simulated annealing algorithm for dynamic layout Problem, Computers & Operations research 28, 1403-1426. Burkard R. E., Karisch S. & Rendel F. (1991). QAPLIB – A Quadratic Assignment Problem Library, European Journal of Operational Research 55, 115-119. Electronic update: http//fmtbhpl.tu-graz.ac.at/~karisch/qaplib. Caccetta L. & Kusumah Y.S. (2001). Computational aspects of the facility layout design problem, Non-Linear Analysis 47, 5599-5610. Chiang W.C. & Chiang C. (1998). Intelligent local search strategies for solving facility layout problems with the quadratic assignment problem formulation, European Journal of Operational Research 106, 457-488. D. Corne, M. Dorigo & F. Glover (1999). New Ideas in Optimization, Mac Graw Hill . M. Dorigo, E. Bonabeau & G. Theraulaz (2000) Ant algorithms and stimergy, Future Generation Computer Systems 2000; 16; 851-871. L. M. Gambardella, E. D. Taillard & M. Dorigo (1997) Ant colonies for the QAP, Technical report IDISIA; 4-97. 342 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Hani Y., Amodeo L., Yalaoui F. & Chen H. (2006). A hybrid genetic algorithm for solving an industrial layout problem, Journal of Operation and Logistics, 1, 4.1-4.11. Hani Y., Amodeo L., Yalaoui F. & Chen H. (2007) « Ant colony optimization for solving an industrial layout problem» EJOR European Journal of Operational Research 183, Issue 2, 633-642. Hicks C. (2004). A genetic algorithm tool designing manufacturing facilities in the capital goods industry, International Journal of Production Economics 90 (2), 199-211. Kusiak, S. & Heragu, S. (1987). The facility layout problem, European Journal of Operational research, 29, 229-251. Lee Y.H. & Lee M.H (2002): A shape-based block layout approach to facility layout problems using hybrid genetic algorithm, Computers & Industriel engineering 42, 237-248. V. Maniezzo, A. Colorni, & M. Dorigo (1994), The ant system applied to the quadratic assignment problem. Technical report IRIDIA/, Université Libre de Bruxelles, 94-28. V. Maniezzo, (1999) Exact and approximate nondeterministic tree-search procedures for the quadratic assignment problem, INFORMS Journal on Computing;11; 358–369. Martens J. (2004) Two genetic algorithmes to solve a layout problem in fashion industry. European Journal of Operational Research 154 (1), 304-322. Meller R. D., Narayanan V., Vance P.H. (1999) Optimal facility layout design, Operations Research Letters 23, 117-127. Mills P., Tsang E., Ford J. (2003). Applying an extended Guided Local Search to the Quadratic Assignment Problem, Annals of Operational Research, 118, 121-135. Sahni S. & Gonzales T. (1976) P-complete approximation problems, Journal of Associated computer Machinery 23 (5), 555-565. Solimanpur M, Vrat P. & Shankar R. (2004) Ant Colony optimization algorithm to the intercell layout problem in cellular manufacturing, European Journal of Operational Research 157, 592-606. T. Stützle, & M. Dorigo, (1999) Aco algorithm for the quadratic assignment problem, Technical report IRIDIA/, Université Libre de Bruxelles, 99-2. T. Stützle, & H. Hoos, (2000) MAX-MIN ant system, Future Generation Computer Systems 16 889-914. E. G. Talbi, O.Roux, C. Fonlupt & D. Robillard, (2001) Parallel Ant Colonies for the quadratic assignment problem, Future Generation Computer Systems 17, 441-449. 19 Selection of Best Alternative Process Plan in Automated Manufacturing Environment: An Approach Based on Particle Swarm Optimization 1Department 2 of Industrial and Manufacturing Systems Engineering, University of Hong Kong Department of Industrial Engineering and Management, Indian Institute of Technology, Kharagpur 1Hong Kong, 2India F.T.S. Chan1, M.K. Tiwari2 and Y. Dashora2 1. Introduction In the present flexible and automated manufacturing environment, selection of optimal process plan is a crucial decision making problem. The systematic determination of processing steps for the transformation of raw material to its finished product is identified as process planning. The real world dynamic shop floor is characterized by the availability of several machines, tools, fixtures/jigs etc., and demands the completion of several design tasks before the commencement of manufacturing actual manufacturing of a part type. Different geometrical and tolerance relationships among several features of the part types necessitate the arrangement of different setups to carry out various and hence, diverse alternative process plans to manufacture a part come into existence. Any of these feasible process plans can be used to produce the particular part type from its raw material [1], [2]. Due to the incorporation of dynamic shop floor situations such as bottleneck machines, non availability of tools, machine breakdown, etc., the process plan selection problem becomes non linear and NP hard in nature. The proliferation of Computer Aided Process Planning (CAPP) systems has made it easy and more efficient to tackle these types of non linear process planning systems. The scheduling complexity in the manufacturing systems was discussed in [2] and it was proposed that this can be reduced with the limited number of tools and auxiliary devices. The three reasons given by [2] to solve the process plan selection problem are: production cost, tool magazine capacity limitation, and reduction of auxiliary devices. Later, the process plan selection problem was attempted in [1] considering three objectives such as to minimize total time, minimize number of setups and to minimize dissimilarity among process plans. Reference [3] contributed in solving process plan selection problem using fuzzy approach to deal with the imprecise information. Reference [4] incorporated the factors such as similarity index within a process plan and degree of similarity among various process plans. They used fuzzy approach to take care of the part type processing sequence. PPS problem has also been attempted using Hybrid Hopfield Neural network and Genetic Algorithm Approach [13]. 344 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization However, in this paper an attempt has been made to solve the PPS problem by giving a more rational view to part type processing sequence. Here, in addition to fuzzy membership vector a new feature called Similarity Attribute ( λ ) has been introduced that takes care of the similarity among different part types. Based on the consolidated approach incorporating fuzzy membership vector and similarity attribute, the part type processing sequence is evaluated. To ease the solution strategy, the undertaken PPS problem is modeled as a Traveling Salesman Problem (TSP) that helps to do away the problem complexity and ensures the easy application of various Artificial intelligence (AI) tools. The PPS problem is mapped as a TSP considering the distance of the tour in the terms of the objective function. Due to its NP-hard nature [5] and wide range applicability, TSP has been one of the most studied combinatorial optimization problem. This paper proposes a new Intelligent Particle Swarm Optimization algorithm with the modified concept of Local Repeller (IPSO-LR) to solve the aforementioned PPS problem. Particle Swarm Optimization (PSO) is a new population based evolutionary computation technique that proceed via self adaptive search. In general, the evolutionary algorithms are based on population of individuals simulating some biological phenomenon. Particle Swarm Optimization is one of the recent developments of evolutionary systems first introduced by Kennedy and Eberhart in 1995 [6]. Unlike other evolutionary systems, no direct recombination of genetic material is incorporated in PSO while the search is in progress. The most important and distinctive feature of PSO is its working that is based on social behavior of particles or individuals in the swarm. The algorithm develops the search strategy by adjusting the trajectory of each particle towards own previous best location and best position of neighboring particles within the search space. Since its introduction, PSO has been tested invariably on several computationally complex NP hard problems [7]. The recent challenges are to employ the algorithm to the real world problems of various complexities than those on which initial versions of it have been applied. Most of the recent developments in the PSO are based on improving its ability to come out of local optima, as it is recognized as common problem encountered by swarms. In this paper, a new improved swarm algorithm is used that has enhanced capability to come out of local minima. The application of IPSO-LR algorithm has been demonstrated considering one illustrative example. To assess the robustness of IPSO-LR based solution strategy, five well known test parts from the literature have been considered and five new parts have been developed. Rest of the paper has been organized as follows: The Process Plan Selection problem and its TSP formulation have been discussed in section 2. Section 3 gives an overview of PSO and details IPSO-LR algorithm. Section 4 illustrates the application of IPSO-LR to solve PPS problem with the help of an illustrative example. Computational experiments and the discussion of the results are provided in section 5. Section 6 concludes the paper. 2. Problem Environment The PPS problem is concerned to the problem of making optimal choices among several alternatives and is featured by the selection of machines, cutting tools, fixtures, setups, etc. The problem is to select exactly one process plan for each part type from a number of accessible and feasible process plans and to provide optimal processing sequence for the manufacturing of part types. The problem formulation adopted in this paper is the extended and modified version of the formulation proposed by [4] and [8]. This paper aims to select a process plan for each part type, keeping in view the wider range of objectives as Selection of Best Alternative Process Plan in Automated Manufacturing Environment: An Approach Based on Particle Swarm Optimization 345 minimization of batch size, time remaining from due dates and number of machinable features, as well as calculating the part type processing sequence, that determine the processing cost and optimum utilization of resources, in a much more justifiable way. The various parameters involved in the process plan selection (PPS) problem can be summarized as: 1. A seven digit code to denote the machines, operations, tools, fixtures, etc., for each step of a process plan. 2. Material handling time for a process plan and the machining time on different machines for a process plan. 3. Batch size, due dates remaining and other manufacturing related features of a part type. Minimization of batch size, total time remaining from due dates, number of machinable features and process plan execution time, as well as calculating part type processing sequence along with optimum utilization of resources are considered as main objectives targeted in the paper. To pursue these objectives, an integrated objective function is formulated that incorporates the parameters defined in [4] along with addition of a new parameter λ . These parameters warrants due attention because of their immense impact on the solution strategy and objective function formulation, and can be summed up as follows: 1. Similarity Index (SI) of a process plan of a part type. 2. Degree of Similarity (DS) among various process plans of a part type. 3. Membership vector ( µ ) of a part type. 4. Similarity attribute ( λ ) of different part types. The details about the calculations and authenticity of first three parameters can be referred in [4]. This paper adds a new dimension to the solution of the PPS problem by the incorporation of a new parameter termed as Similarity Attribute. The formulation proposed by [4] did not take into account the similarity among the processing of part types that is a crucial parameter affecting the dynamics and cost efficiency of the shop floor. Hence, Similarity attribute ( λ ) has been incorporated in the objective function to make it more authentic. Its calculation strategy has been provided in section 4, where solution strategy for the underlying problem has been illustrated. Minimization of the aforementioned first two parameters provides cost efficiency and the values of rest two determine the part type processing sequence. Thus, to accomplish objectives highlighted in this paper, they have been integrated into single sub objective that is a trade-off between all the aforementioned features (detailed in section 3). To develop the solution strategy for the PPS problem, it is formulated as a Traveling Salesman Problem (TSP). It’s basic TSP formulation is described in the following discussion: 2.1 TSP Formulation of the PPS Problem In a TSP with one salesman, the salesman has to visit each city in his/her designated area and then come back to the home town [5]. Here, each process plan is considered as a city (i.e. a node) and a salesman is restricted to move through only one node among the nodes characterizing a part type. A tour is considered to be complete when the particle has moved through a node of each part type. In the TSP model of the problem, the value of objective function represents the total distance covered by the salesman in a tour. The criterion to move from one node to another depends upon the solution strategy; in the context of the PPS problem, it is based on the probability to choose, thus, not based on the integer model. 346 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Hence the formulation can be considered as TSP with Mixed Integer Programming (MIP). The details are provided in the next section that provides an insight to the basics of PSO as well as details IPSO-LR algorithm. 3. Proposed IPSO-LR Algorithm PSO belongs to a broad class of population based optimization technique that is guided by the social behavior of flocking organisms, like birds, honeybees, etc. The fundamental rules adhered by the individuals comprising a flock may be outlined as to match velocities with nearest neighbors, and to be closer with the others in the swarm. Thus mutation with conscience has been claimed for PSO [9]-[12]. In this case, each particle tends to accelerate towards its own previous best position and towards the best position of neighbor particles encountered, with the usual result being clustering of individuals in optimal regions of space. Since the advent of PSO, the challenge has been to apply PSO to the problems of various domains. In this paper, a new Intelligent Particle Swarm Optimization Algorithm (IPSO-LR) with the modified concept of local repeller has been developed to efficiently model the problem in the algorithmic context as well as to avoid the problem of entrapment in local optima. At each position, the velocity and position of each particle is being updated using some basic equations and rules. The velocity of particle at each position is updated utilizing the aforementioned characteristics and the relation detailed in the following subsection: 3.1 Velocity Evaluation The model for velocity and position updating signifies the intelligence of the swarm and can be mathematically formulated as: ∀i ∈ N , vi next = χ [ v + cc × rand(.)× ( ∆x ) + c s × rand(.)× ( ∆x )] i ci ni constriction coefficient, and is mathematically expressed as: (1) where, vi is the current velocity of the particle; N is the number of particles; χ is the χ= 2κ 2 [ 2- β - β - 4β ] (2) s.t. β=c1+c2 , β>4, κ∈ ]0,1] Further, rand (.) is a random function with a range [0, 1]; cc and cs are positive constant parameters, called acceleration coefficients (which control the maxi-mum step size the particle can do). cc and cs controls the impact of previous values of particle positions and velocities on its current one. Suitable selection of acceleration coefficients can provide a balance between the global and the local search. The constriction factor χ helps to ensure convergence [9], whereas the factors such as cc and cs along with rand (.) guarantee the thorough search in the region near to oi and ni. Different configurations of χ as well as their theoretical analysis can be found in [9]. Selection of Best Alternative Process Plan in Automated Manufacturing Environment: An Approach Based on Particle Swarm Optimization 347 In the velocity relation, ∆x ci and ∆x ni are self best positional differences and neighborhood best positional difference. In the equation (2), ∆x by the following relations: ci and ∆x ni are calculated ∆xci = oi – xni ; and , ∆xni = ni – xni , (3) where, : Position of previous best position of particle. oi xni : Position of nth feasible node. Here, n ∈ Nfi (i.e. set denoting feasible nodes to move, for particle i. ) : Previous best position of neighboring particles. ni In the above discussion, the position of a particle is characterized by the set of variables characterizing a node. The velocity of ith particle to each feasible node is calculated as per the aforementioned equation that is followed by the position updating according to the relation: ∀i ∈ N , xi = xi vmax f , (4) where, xi denotes the position of the particle; xi vmax f is the position of the node for which the velocity found is maximum. The self previous best position of each particle is updated using the following relation: ∀i ∈ N , o i = x i i o if f(x ) ≥ f(o ) i i if f(x ) < f(o ) i i (5) where, f (xi) denotes the respective objective function value considered in the problem. The previous best position of neighboring particles is updated according to the following relation: ∀i ∈ N , n = min f(o ) i o ii i (6) where, Ni is the set denoting neighbors of particle i. to reduce the probability of leaving the search space, the velocity of particles is restricted to the range of [ -Vmax , +Vmax ], where, Vmax = υ × xmax ; 0.1 ≤ υ ≤ 1 0 (7) 3.2 Sociometry of IPSO-LR Neighborhood is the most decisive criterion that directs the search procedure of swarms. It signifies how the movement a particle is influenced by the information carried by the other particles. The neighborhood is exploited for the mutual sharing of crucial information among particles that helps them in further movement and diversify search technique. The topological structure of population controls its propensity of exploration versus exploitation [11]. The initial versions of particle swarm select a particle from the specified neighbors as a source of influence and ignore others. This type of strategy only provides a choice of 348 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization choosing a particle from the neighborhood; the more is its size, the more is the likeliness of choosing the better one. In this paper, a cluster type of network topology is adopted as it produces promising results as compared to that of other neighborhood topologies like ring, all, pyramid, triangular, frame, etc. [12]. In the proposed strategy, various process plans of a part type are in neighborhood with each other as they characterize same attributes of a part type. Thus, various process plans (particles) of a part type form a cluster that shares information among the members. In this case, the number of clusters formed is equal to the number of process plans. As evident from Figure 1, each cluster is in further interaction with other clusters through the arcs joining the two closest nodes of each pair of clusters. 3.3 Modified Strategy to Avoid Local Optima Entrapment in the local optima is the situation where the algorithm sticks to some premature solutions and does not show any improvement. To alleviate this problem, the concept of local repeller [12] with some modifications to suit the problem structure has been utilized. The most alluring trait of this technique is its simplicity and efficacy to avoid local optima. As and when the path corresponding to local optima is encountered, the sequence of process plans that is identified to be constituent of local optimum is made ‘repelling’ i.e .the particles are compelled to explore the search space more thoroughly and hence, the search is directed towards global optimum. This strategy guarantees the escape from the local optima and thus is very effective. 4. Implementation of IPSO-LR Algorithm on the PPS Problem ( Illustrative Example) 4.1 Problem Characteristics This paper adopts the formulation of PPS problem from [4] and [8]. To denote the machines, operations, tools, fixtures etc. a seven-digit code has been used. The data related to alternative process plans, processing time on different machines, material handling time for the different process plans, the batch size, due dates remaining and features of each part type are adopted from [8]. In the undertaken problem, the objectives considered are minimization of batch size, time remaining from due dates and number of machinable features, as well as calculating part type processing sequence along with optimum utilization of resources. The objectives like maximization of batch size, minimization of time remaining from due dates and minimization of number of machinable features are incorporated in the definition of membership vector µ [4]. The parameter Similarity attribute ( λ ) quantifies the similarity among the part types that is based on the number of machines, fixtures, tools and operations performed to produce these. Its formulation is given as follows: Cim λim = ; Cm where, Cio λio = ; Co Cit λi = ; Ct Cif λim = ; Cf λ +λ +λ +λ ⇒ λi = im i im im 4 ; (8) λim , λi , λim , λim are the constants denoting contribution of attributes related to machines, operations, tools and fixtures, respectively, to the calculation of similarity Selection of Best Alternative Process Plan in Automated Manufacturing Environment: An Approach Based on Particle Swarm Optimization 349 attribute; Cim , Cio , Cit, Cif are the cardinalities of the sets denoting number of machines, operations, tools and fixtures, respectively, utilized by the process plans of part type i ; Cm , Co , Ct , Cf are the cardinalities of sets denoting the total number of machines, operations, tools and fixtures, respectively, used to manufacture all the part types from all the possible alternatives. The parameter DS is a measure of accounting for the similarity among the several process plans of the different part types. It results from the comparison of their constituent elements, namely the operation codes. The parameter SI defines the similarity contained in a process plan itself. It denotes the ease with which a part can be made from the particular process plan. The details about the calculation of DS and SI can be referred from [4]. 4.2 IPSO-LR Algorithm Based Solution Strategy To initialize the process, all the particles are randomly distributed over the nodes. Here, the number of particles equals the number of nodes present in the TSP formulation. The most critical step in the application of IPSO-LR to solve the PPS problem is the characterization of the parameters that represents position. In the formulation used in the proposed paper, a node (i.e. a process plan) characterizes the position of the particle. In this case, the velocity to each feasible node j from the particle on node i is calculated as per the following equation: vij = χ [ v + c × rand(.)× ( ∆x i c cij ) + c s × rand(.)× ( ∆x nij )] (9) Here, ∆xcij and ∆xnij are the positional differences that needs to be defined in the problem context. In the scenario of PPS problem, these can be evaluated using the following relations: ∆xcij = A × [1 - DSo ,x ×(SI o +SI x ) µ x +λx × i ji i ji ji ji ∆xcij = A × [1 - DS n ,x ×(SI n +SI x ) µ x +λx × i ji i ji ji ji + B × t ]+ B × t (10) Having updated the velocity, the position of particle is updated as per equation 9. Another major difference in the application of IPSO-LR from the traditional PSO lies in the definition of previous best position of the particle, oi, and neighbor’s previous best position, ni. Because of the TSP structure of the problem the particles cannot be always in the constant motion and hence, after completing the tour, particles are again randomly distributed over the nodes and set to move. The updated previous best position and neighborhood best position guide the particles in the consecutive generations to choose the better alternatives. The pseudo code for the IPSO-LR algorithm applied to the PPS problem is given below: Create the initial population P and set itermax , and iterLRmax ( i.e. number of iterations for which if solution is not improved, then local optimum is considered to be encountered) iter = 0; iterLR = 0; for each particle i ∈ P: initialize the xi , vi , oij ,nij ,neighborhood Ni , global best position gij and value of overall 350 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization global best tour gj ( of all the particles). // Here, oij ,nij , gij , gj are the arrays containing the values of respective positions in each part type. repeat: for (j=1:N) // Here, N is the number of part types. repeat: for each particle i ∈ P: if f (xij) < f (oij) then oij = xij; endif if f (oij) < f (gij) then gij = oij; endif endfor if sum of the tour < (gj) then gj = sum of the tour; iterLR = 0; else iterLR = iterLR + 1; endif if iterLR = iterLRmax then mark the tour as repelling ( i.e. any particle trying to complete this tour is randomly thrown away. Update xi and vi accordingly. endfor iter = iter + 1; until iter = itermax; 5. Computational Experience This section aims to provide the summary of numerical simulation of the proposed algorithm along with the comparative results with other established techniques from the literature in a condensed form. The number of alternative solutions increases exponentially as the number of part types and their alternative process plans increase. The complexity of the undertaken problem can be gauged by the fact that aforementioned 10 parts and their 52 alternative process plans give rise to a total of 1.28×10 feasible solutions. By the application of IPSO-LR the best alternative process plans and their sequence obtained is listed in Table 1. Application of the ACO strategy [8] also renders similar results. The applicability and efficacy of the proposed algorithm is evident from the fact that IPSO-LR outperforms other established techniques from the literature to solve the complex process plan selection problem with various formulations. In fact, due to its less computational complexity, the proposed IPSO-LR algorithm gains an edge over other techniques when the problems pertaining to real size data sets (like the undertaken data set) are concerned. The proposed algorithm is characterized by faster convergence along with the better and logical escape from the local optima. 13 Selection of Best Alternative Process Plan in Automated Manufacturing Environment: An Approach Based on Particle Swarm Optimization Part type processing sequence Process plan selected 351 Part type Route of the plan 1 2 3 4 5 6 7 8 9 10 3 2 9 7 8 10 6 1 5 4 5 3 3 3 2 11 5 6 2 1 M011103,L020201,L070501,L080601,L120101,L100801,L050301 M011103,L020201,L030201,M151304,L080601 M011103, L020201,L080601,L090701,L110901 M011103, L02021,L030201,L080601,L070501,L060401,L120101 M011103, L020201,L030201,L060401,L070501,L080601 M011108,L020201,L030201,L040202,L080601,L090701,L110901 M011103, L020201,L040201,L060401,M100804 M011103,L020201,L030201,M100704 L010101,L020201,L030201,L040202,M151304,M100804 L010101,L020201,L060401,L120101,M171504 Table 1. Optimal Process Plan Selected Part Type 2 Part Type 1 Part Type 4 Part Type 3 Figure 1. Graphical representation of PPS problem Figure 2 provides a comparative plot between the fitness index of particles and the number of generations for the proposed strategy and ACO based strategy [8]. Here, the fitness index is defined as: fi = - Obj Obj worst best ; Obj worst (11) Where, Objbest and Objworst are the objective function values of the particles covering shortest tour and longest tour respectively. 352 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 1 0,8 0,6 fi 0,4 0,2 0 10 20 50 100 250 iterations 500 ACO PSO Figure 2. Comparative convergence with ACO [ 8] The comparative convergence trend of the algorithm with ACO based approach proves the compatibility of the proposed algorithm, as shown in the Figure 2. Figure 3 plots the CPU time vs number of iterations. From the plot (Figure 2), it can be visualized that the value of fitness index decreases as the number of generations increase that in turn proves the clustering of particles around best solution. This clustering is further proved by the Figure 4 that provides the plot between the percentages of particles that deviates from the best particle by not more than 5%. 300 275 250 225 200 175 150 125 100 75 50 25 0 10 20 50 100 250 500 1000 CPU time iterations Figure 3. Variation of CPU time (ms) with number of iterations 100 % particles 80 60 40 20 0 10 20 50 100 250 500 1000 iterations Figure 4. Percentage of deviating particles In order to illustrate further the effectiveness of the proposed IPSO-LR algorithm, various problems taken from the literature [2], [3], [14] have been tested with the same formulation of objective functions and parameter as is proposed in them. As a matter of fact, the proposed approach obtains the best solutions for different process plan selection examples, the comparative results of which are provided in Table 2. Selection of Best Alternative Process Plan in Automated Manufacturing Environment: An Approach Based on Particle Swarm Optimization Example of [ 1] Applied methodology Objective function value 33.1 34.5 32.5 32.5 32.5 Process plan selected 1, 3, 7 1, 3, 5 1, 4, 5 1, 4, 5 1, 4, 5 Example of [ 2] Objective function value 30.8 30.8 30.8 30.8 30.8 Process plan selected 1,4,7,9 1,4,7,9 1,4,7,9 1,4,7,9 1,4,7,9 Example of [ 3] Objective function value 61 59 61 59 59 353 Reference [1] Reference [2] Reference [ 3] ACO approach [8] Proposed IPSO-LR approach Process plan selected 3, 5, 7 3, 4, 6 3, 5, 6 3, 4, 6 3, 4, 6 Table 2. Comparative results of various methodologies from the literature In nutshell, the aforementioned computational results not only prove the efficacy and supremacy of the proposed strategy but also provide a new dimension to the solution of complex PPS problems in the practical environment. 6. Conclusive Remarks Ever so changing competitive manufacturing structure is challenged by the issue to properly optimize resource allocation and their uses in order to get the best out of available alternatives. The PPS problem (amidst unpredictable disruptions observed in shop floor), is of substantial importance in flexible and automated manufacturing systems and needs much attention to be paid. The performance of flexible manufacturing systems is greatly influenced by the selection of viable and economic process plans among the other competing plans. This paper presents a new IPSO-LR algorithm to solve a complex real time PPS problem with the objectives like minimization of batch size, time remaining from due dates and number of machinable features, as well as calculating part type processing sequence along with optimum utilization of resources. The algorithm is characterized by the enhanced capability to come of local optima in a logical manner and has knack to handle the problems pertaining to large alternatives. The proposed work provides a new and broader dimension to the solution of PPS problem by consolidating a new parameter Similarity Attribute ‘ λ ’, that formulates the objective function in a more justifiable way. The real strength of swarms is derived from the interaction among particles while exploring the search space collaboratively. The terms of positional difference introduced in the velocity formula leads the particle to be successful regarding reaching towards optima and guides it by the previous successes of itself and other particles. This paper finds its contribution in the expanding area of research of intelligent automation in industries as well as in the broad field of interdependent evolutionary computation. The computational experience establishes the fact that the proposed algorithm is effective to model and solve PPS problems of varying complexities. Experimental results have shown the robustness of the algorithm and its outperforming behaviour over established techniques in the process planning field. Also, based on these results, the use of IPSO-LR algorithm seems to be encouraging in supporting the premise of automated and dynamic and intelligent process planning. Future work includes the development of web enabled intelligent Process Planning System with embedded features of e-Manufacturing and application of various tools and techniques related to Data Mining to refine the search algorithms. 354 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 7. References: Bhaskaran, K., 1990, Process plan selection .International Journal of Production Research, 28 (8), 1527-1539. [1] Kusiak, A., and Finke, G., 1988,Selection of process plans in automated manufacturing systems. IEEE Transactions of Robotics and Automation, 4(4), 397 – 402[2] Zhang, H.C., and Huang, S.H., 1994, A fuzzy approach to process plan selection . International Journal of Production Research, 32(6), 1265-1279. [3] Tiwari, M.K., and Vidyarthi, N.K., 1998, An integrated approach to solving the process plan selection problem in an automated manufacturing system, International Journal of Production Research, 36(8), 2167-2184. [4] Onwubolu, G. C. and Clerc, M., 2004. Optimal path for automated operations by a new heuristic approach using particle swarm optimization. International Journal of Production and Research, 42, 473-491. [5] J. Kennedy and R. C. Eberhart, Particle swarm optimization, in Proc. IEEE Int. Conf. Neural Networks, vol. 4, Perth, Australia, Dec. 1995, pp. 1942–1948. [6] Juang, C. F., 2004, A hybrid of Genetic Algorithm and Particle Swarm Optimization for Recurrent Network design, IEEE Transactions on Systems, Man and Cybernatics-Part B: Cybernetics, 34(2), 997-1006. [7] Dashora, Y. ,Kumar, S., Shankar, R. and Tiwari, M. K., Ant Colony Optimization based approach to select the optimum Process Plan in Automated Manufacturing Environment, communicated to IIE Transactions, UIIE-0061. [8] Clerc, M. and Kennedy, J., 2002, The Particle Swarm—Explosion, Stability, and Convergence in a Multidimensional Complex Space, IEEE Transactions on Evolutionary Computation, 6(1), 58-73. [9] Wachowiak, M. P., Smolíková, R., Zheng, Y., Zurada, J. M., Elmaghraby, A. S., 2004,An Approach to Multimodal Biomedical Image Registration Utilizing Particle Swarm Optimization, IEEE Transactions on Evolutionary Computation, 8( 3), 289-301. [10] Mendes, R., Kennedy, J. and Neves, J., 2004, The Fully Informed Particle Swarm: Simpler, Maybe Better, IEEE Transactions on Evolutionary Computation, 8(3), 204-210. [11] Parsopoulos, K. E. and Vrahatis, M. N., 2004, On the Computation of All Global Minimizers Through Particle Swarm Optimization, IEEE Transactions on Evolutionary Computation, 8(3), 211-224. [12] Ming, X.G., and Mak, K.L., 2000, A hybrid Hopfield network-genetic algorithm approach to optimal process plan selection, International Journal of Production Research, 38(8), 1823-1839. [13] 20 Job-shop scheduling and visibility studies with a hybrid ACO algorithm Heinonen, J. and Pettersson, F. Åbo Akademi University Finland 1. Introduction Manufacturing today is primarily cooked down to all-out efforts into profitability. Factories are moved to low-salary countries in order to ensure that profits are maintained and stockholders kept happy. Decisions like these are met with debates about morale, ethics and responsibilities that companies have to society, since losing an entire manufacturing plant can be devastating to a community. An alternative to industrial relocalization is trying to maintain profitability through development of effective production schedules, better utilization of resources and overall better planning in existing manufacturing plants. The significance of effective planning methods has, in other words, increased and will likely continue to do so. The focus of this chapter is to solve the MT10 job-shop scheduling problem using 4 different variants of the Ant Colony Optimization (ACO) algorithm and to try to rank them. A hybrid model, that uses a postprocessing algorithm to improve the resulting schedule, is also tried for all four ACO versions. The term visibility is explained in the context of job-shop scheduling, and incorporated into the test runs. When we are talking about job-shop scheduling problems (JSP), we mean a set of machines M, a set of jobs J and a set of operations O. For each operation there is a job to which it belongs, a machine on which it it has to be processed, a predetermined processing time on that machine as well as a predetermined processing order on the machines. The problem is to minimize the makespan while ensuring that no more than one job can be processed at the same time on the same machine, and seeing to that when a job starts, it must be completed (and can’t be interrupted). There have been numerous publications of successful algorithms applied to job-shop problems. Among exact mathematical methods are Mixed integer linear programming and Branch & Bound, among approximation methods there are List Scheduler Algorithms (see Panwalker & Iskander, 1977 for a survey), that assign one operation at a time from a list that is sorted by some priority rule, Shifting Bottleneck by Adams et al. (1988), Simulated Annealing by van Laarhoven et al. (1988), Tabu search was first used in job shop scheduling by Taillard (1989) and a Genetic algorithm approach by Nakano and Yamada (1991). A newcomer in these approaches to the JSP, ant colony optimization has become an increasingly popular candidate when it comes to algorithms that mimic behaviour of processes that exist in nature. The first ACO algorithm was introduced by Marco Dorigo in 356 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization his doctoral thesis (1992) and was called an Ant System (AS). Since then AS has matured into an algorithm that does very well when it comes to problem types that are formulated as a traveling salesman problem (TSP) as well as the quadratic assignment problem (QAP). As a result of research into ACO algorithms, some very successful variants have emerged. We have the Elitist AS (EAS) proposed by Dorigo et al. (1996), in which the pheromone updating rules are biased towards the best solution found so far, the idea being to exploit the solution components within that solution. Ant Colony System (ACS) by Dorigo and Gambardella (1997) has several modifications to the original AS. It uses a modified rule when an ant chooses the next travel node, it uses a best-so-far pheromone update rule but applies pheromone evaporation only to the trail that belong to solution components that are in the best-so-far solution. It also uses a local pheromone update rule to decrease the pheromone values on visited solution components, in order to encourage exploration. Rank-based AS (RAS) by Bullnheimer et al. (1999), is a variant where the elite ant as well as a selection of ants with good solutions during that iteration get to update the pheromone trails. MAX-MIN AS (MMAS) by Stützle and Hoos (2000), is an approach that updates the pheromone trails, according to some convergence measure, with either the iteration-best ant or the best-so-far ant. The algorithm uses a lower bound for the pheromones (>0) as well as restricting the maximum amount of pheromone a trail can have. The lower bound encourage ant exploratory behaviour and the upper bound is prohibiting premature convergence due to the elite solution dominating the other solutions. Hypercube Framework (HCF) by Blum and Dorigo (2004) is more of a framework for implementing ACO algorithms. Among the benefits are automatic scaling of pheromone values to the interval [0,1]. In a paper by Colorni et al. (1993) AS was applied into job-shop scheduling and proved to be a noteworthy candidate when faced with the task of chosing a suitable algorithm for scheduling problems. The conclusions in the aforementioned paper were that AS is one of the most easily adaptable population-based heuristics so far proposed and that its computational paradigm is indeed effective under very different conditions. As an example of ACO robustness, Jayaraman et al. (2000) used an ACO algorithm in solving a combinatorial optimization problem of multiproduct batch scheduling as well as the continuous function optimization problem for the design of multiproduct plant with single product campaigns and horizon constraints. Further real-world applications with regard to ACO algorithms would be using ACO to solve an established set of vehicle routing problems as done by Bell and McMullen (2004) and a dynamic regional nursescheduling problem in Austria by Gutjahr and Rauner (2005). The former paper concluded the results were competetive and in the latter paper ACO was compared to a greedy assignment algorithm and achieved highly significant improvements. Kuo-Ching Ying et al. (2004) applied the ant colony system to permutation flow-shop sequencing and effectively solved the n/m/P/Cmax problem, and commented that this suggests that the ant colony system metaheuristic is well worth exploring in the context of solving different scheduling problems. An example of ACO and flowshops in recent use would be a paper by Gajpal and Rajendran (2006), where they used a new ACO algorithm (NACO) to minimize the completion- Job-shop scheduling and visibility studies with a hybrid ACO algorithm 357 variance of jobs, showing that work with ACO algorithms is an ongoing process to modify and improve the original AS and apply it to a variety of scheduling problems. For two of the top performing ACO algorithms, ACS and MMAS, convergence to the optimal solution has been proved (Dorigo and Stützle, 2004 as well as Stützle and Dorigo, 2002). It is worth to remember that convergence results do not allow prediction of how quickly an optimal solution can be found. 2. Problem description The Job-Shop Scheduling Problem (JSP) can be characterized as n jobs to be processed on m machines. In general it is a set of concurrent and conflicting goals to be satisfied using a finite set of resources where resources are called machines and basic tasks are called jobs. Each job is a request for scheduling a set of operations according to a process plan which specifies precedence restrictions. We have M = {M 1 ,..., M m } J = {J 1 ,..., J n } O = {O1 ,..., On } a given set of machines a given set of jobs a set of operations For each operation u ij ∈ O there is a job Ji to which it belongs, a machine Mj on which it has to be run and a processing time pij of the operation uij, where pij is a nonnegative integer. Every job is a chain of operations and every operation has to be processed on a given machine for a given time. The task is to find the starting times of all operations such that the completion time of the very last operation is minimal. The chain order of each job has to be maintained and each machine can only process one job at the same time. No job can be preempted; once an operation starts it must be completed. The solution s to an instance of the n x m JSP specifies a processing order for all of the jobs on each machine and implicitly defines an earliest starttime and earliest completion time for each operation. The maximum of the completion times is called makespan and most research address the problem of makespan minimization. Given an instance of JSP we can associate with it a disjunctive graph G = (V, A, E), where V is the node set, A is the conjunctive arc set and E is the disjunctive arc set. The nodes V correspond to all of the operations and two dummy nodes, a source and a sink. The conjunctive arcs A represent the precedence relationships between the operations of a single job and the disjunctive arcs E represent all pairs of operations to be performed on the same machine. All arcs emanating from a node have the processing time of the operation performed at that node as their length. The source has conjunctive arcs with length zero emanating to all the first operations of the job and the sink has conjunctive arcs coming from all the last operations. A feasible schedule corresponds to a selection of one arc from each disjunctive arc pair such that the resulting directed graph is acyclic, i.e. no loops can be found. The problem of minimizing the makespan reduces to finding a set of disjunctive arcs which minimize the length of the critical path in the directed graph. An in-depth description of disjunctive graphs with regard to job-shop problems can be found in for instance the article about AS and JSP by Colorni et al. (1993). 358 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The MT10 problem is a 10 x 10 instance formulated by Muth and Thompson in 1963. It consists of 10 jobs processed on 10 machines, and every job has 10 tasks to perform. The processing times vary greatly with shortest duration being only 2 time units and longest 99 time units. It has the reputation of being one of the most difficult combinatorial problems ever considered, and was not solved exactly until as late as 1989 by Carlier and Pinson using a branch and bound algorithm. It is a typical job-shop problem. 3. ACO ACO belongs to the class metaheuristics. The term metaheuristic is derived from two greek words, heuristic which means “to find” and the prefix meta, which means “beyond, in the sense of an upper level”. It has come to mean a high-level strategy for guiding heuristics in a search for feasible solutions as well as a framework that can be specialized to solve optimization problems. ACO is also a succesful example of swarm intelligence, whose purpose is to design intelligent multi-agent systems by taking inspirations from the collective behaviour of social insects. ACO is modeled after the foraging behaviour of certain ant species. In the 1940s the French entomologist Pierre-Paul Grassé observed that some species of termites react to what he called “significant stimuli” (Grassé, 1946). He used the term “stigmergy” to describe the communication of ants, and he described this communication as workers being stimulated by the performance they have achieved. Ants alter their environment by means of pheromone trails. A pheromone is any chemical or set of chemicals produced by a living organism that transmits a message to other members of the same species. It is volatile and evaporates quickly, and ants secrete this chemical by walking and follow, in turn, other pheromone trails left by other ants. There are alarm pheromones, food trail pheromones and others that affect behavior or physiology. Strong food trail pheromone concentrations are perceived and stimulate ants to move into that direction. Ants are able to transport food through this mechanism by finding and maintaining the shortest path between the food source and the nest. Occasionally there will be the stray ant taking another route, and this event can be seen as exploration, the ants are constantly trying to find a more effective path. This mechanism was demonstrated by Denebourg et al. (1990), who in an experiment called “the double bridge” connected a nest of Argentine ants with a food source. Figure 1 (a) shows the experimental setup and figure 1 (b) another experimental setup by Goss et al. (1989). If the setup is that of figure 1 (a), initially, each ant randomly chooses one of the two bridges. Due to random fluctuations, after some time one of the two bridges presents a higher concentration of pheromone and attracts more ants. After a while almost the whole colony converges toward the use of the same bridge. With the setup illustrated in figure 1 (b) another mechanism besides random fluctuations was demonstrated: the ants randomly choosing the shorter path travel between the nest and the food source faster and, given time, this means that pheromone will accumulate faster on this path, converging the population towards using this shorter path. The mechanism can be utilized in order to find the shortest path in, for instance, minimizing makespan for scheduling problems. The underlying problems are formulated as a TSP, that is, a connected, undirected graph G = (V, E) with weights on the edges between the nodes. The nodes V denote the cities, and the edge weight is the distance between two cities. The goal is to find a tour in G that connects all cities once so that the overall length is minimal. Job-shop scheduling and visibility studies with a hybrid ACO algorithm 359 Nest ) 60° Food Nest Food (a) (b) Figure 1. Experimental setup for the double bridge experiments: (a) branches have equal length; (b) branches have different lengths Having artifical ants search the solution space simulate real ants searching their environment. The artifical ants can be equipped with some oddities that real life ants don’t have, for instance a local heuristic function to guide their search through a set of feasible solutions only, or an adaptive memory corresponding to the pheromone trail so that they can remember visited nodes. Also we require the ants to be symmetrical in the sense that they move from the nest to the food and back using the same path. The ACO algorithm also keeps tracks of visited nodes, meaning the ants have a memory which helps them select the next node from a list of possible choices. 3.1 Ant System (AS) Each edge eij has a pheromone value τij associated with it, and this pheromone value can be read and modified by the ants. The algorithm starts with the user sprinkling some pheromone on random edges. All ants are initially in their home nest, and move to a node in their feasible list. When located at a node i an ant k uses the pheromone trails τij to compute the probability of choosing node j as the next node: αβ τ ij η ij , j ∈ N ik k αβ pij = ∑l∈N k τ il η il i 0, j ∉ N ik (1) Nik is the feasible neighbourhood of ant k when in node i, that is, the list of cities that ant k has not yet visited. The parameter ηij = C / dij, where dij is the distance between nodes i and j, and C is a positive constant, is a measure of heuristic information, in other words ηij is our visibility. Parameters α and β determine the relative influence of the pheromone trail and the heuristic information. If α = 0 then the closest cities are more likely to be selected. If β = 0 then only pheromone amplification is at work, which generally leads to the rapid emergence 360 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization of a stagnation situation, all ants eventually follow the same path and construct the same tour. Dorigo found in his studies (Dorigo et al. 1996) that typically β > α. Once all ants have completed their tour the pheromone trails get updated. The pheromone values are modified in order to bias ants in the future iterations to construct solutions similar to the best ones previously constructed. First the pheromone on all arcs is lowered by a constant, and then pheromone is added on the arcs that the ants have passed in their tour. Evaporation is implemented by: τ ij ← (1 − p )τ ij (2) where 0 < p ≤ 1 is the evaporation rate. This enables the algorithm to “forget” previous bad decisions and avoids unlimited accumulation on the edges. The deposition of pheromone on the edges is done by means of global trail update k τ ij ← (1 − p)τ ij + ∑ ∆τ ij ,∀(i, j ) ∈ L k =1 m (3) where ∆τijk is the amount of pheromone ant k deposits on the arcs it has visited, which usually amounts to the value Q / Ck, where Ck is the length of the tour and Q is a positive constant. This means that arcs used by many ants, and therefore part of short tours, receive more pheromone and are therefore more likely to be chosen by ants in future iterations of the algorithm. When using an elitist ant system, the solution presented by the best-solutionso-far adds extra pheromone on its arcs. Equation (3) becomes k bs τ ij ← (1 − p)τ ij + ∑ ∆τ ij + e∆τ ij ,∀(i, j ) ∈ L k =1 m (4) where e is a parameter that defines the weight given to the best-so-far tour and bs ∆τ ij = 1 / C bs if eij belongs to the ants tour, 0 otherwise (5) where Cbs is the length of the best-so-far tour. When initializing the system, all ants can be placed in the starting node or sprinkled randomly over all nodes. Dorigo studied the differences and came to the conclusion that it had little effect, though placing them randomly gave sometimes slightly better performance. Also, the differences between three AS algorithms, ant-cycle, ant-density and ant-quantity were studied in the same paper. In the latter two models each ant lay its trail at each step, without waiting for the end of the tour, whereas in the ant-cycle pheromone updates occur at the end of the tour. In the ant-density model a quantity Q of trail is left on edge (i,j) every time an ant goes from i to j, whereas in the ant-quantity model the amount of pheromone left was Q/dij. The ant-cycle model performed best and was chosen, and is the one depicted in the equations above. Job-shop scheduling and visibility studies with a hybrid ACO algorithm 361 3.2 Rank-based Ant System (RAS) This version is an extension to the original AS. After all m ants have generated a tour, the ants are sorted by tour length and the contribution of an ant to the pheromone trail update is weighted according to the rank µ of the ant. An elitist strategy is used as well. Only the ω best ants are considered and ω = σ - 1, where σ is the number of elitist ants in the system. This means that equation (4) is modified accordingly µ * τ ij ← (1 − p )τ ij + ∑ ∆τ ij + ∆τ ij ,∀(i, j ) ∈ L µ =1 σ −1 (6) where Q (σ − µ ) L ∆τ ij = µ 0 µ if the µ–th best ant travels on edge (i,j) otherwise if edge (i,j) is part of the best solution found otherwise and where Q σ ∆τ = L* 0 * ij µ Lµ ranking index increase of trail level on edge (i,j) caused by the µ-th best ant tour length of the µ-th best ant * ij µ ∆τ ij tour length of the best solution found In the paper (Bullnheimer et al. 1999) RAS is put to the test against AS, EAS as well as simulated annealing and a genetic algorithm. The conclusion was that RAS could for all problem instances compete with the classical metaheuristics regarding speed and quality, and that the ranking improved the performance of the ant system algorithm in every respect. 3.3 Ant Colony System (ACS) ACS proposed by Dorigo and Gambardella (1997) introduced a new state transition rule to provide a direct way to balance between exploration of new edges and exploitation of a priori and accumulated knowledge about the problem. σ L* ∆τ increase of trail level on edge (i,j) caused by the elitist ants number of elitist ants arg max i j= j∈N k {τ ij ⋅η ij β J } if q < qo (exploitation) otherwise (biased exploration) (7) 362 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization where q is a random number uniformly distributed in [0,1] , qo is a parameter ( 0 ≤ qo ≤ 1) and J is a random node selected according to the probability distribution given in equation 1. This means that every time an ant in city i has to choose a city j to move to, it samples a random number q. If q ≤ qo then the best edge according to equation 3 is chosen, otherwise and edge is chose according to equation 1. While ants are constructing a solution a local pheromone updating rule is applied k τ ij ← (1 − σ ) ⋅ τ ij + σ ⋅ ∆τ ij , ∀(i, j ) ∈ L (8) and σ is a parameter 0 < σ < 1 and ∆τijk is 1/(nLnn), where n is the number of nodes in the problem and Lnn is the tour length produced by the nearest neighbour heuristic (see Rosenkrantz et al. 1977). The global pheromone updating rule is applied only to edges that belong to the best ant tour k τ ij ← (1 − p)τ ij + ∑ ∆τ ij ,∀(i, j ) ∈ L k =1 m (9) where 1 k ∆τ ij = Lgb 0 if (i,j) is part of the global best tour otherwise and Lgb is the length of the globally best tour. Noticeable in ACS is that the local updating rule is applied in parallel, every time an ant selects a new node to travel to, but the global updating rule after all ants have completed their tour. 3.4 Max-min Ant System (MMAS) This version by Stützle and Hoos (2000) differs from the original AS in three ways. Only the iteration best ant is allowed to apply pheronome, the strength of the pheromone trails have lower and upper bounds, and at start, all trails are initialized to their upper bound value to encourage early exploration. Equation 4 is modified best τ ij ← (1 − p)τ ij + ∑ ∆τ ij ,∀(i, j ) ∈ L k =1 m (10) where ∆τijbest is the amount of pheromone the iteration best ant deposits on the arcs it has visited. The pheromone trail upper (τmax )and lower (τmin ) bounds for an edge can be calculated, a detailed description can be found in the paper by Stützle and Hoos. [ x]τ τ max min τ max = τ min x if x > τmax if x < τmin otherwise (11) Job-shop scheduling and visibility studies with a hybrid ACO algorithm 363 At all times should the algorithm see to that the pheromone strength is between the given bounds on any edge. Studies were conducted in the paper to ascertain if the algorithm should use the iteration best ant or the global best (elite) ant as basis for the pheromone updates, and the results were that the iteration best ant performed better. Also the effects of using τmin or τmax as a starting value for the initial pheromone amount on the trails were studied, resulting in τmax being the better approach. An additional mechanism called pheromone trail smoothing was introduced in the paper for increased performance. Basically when the MMAS has converged, or is very close to convergence, the mechanism increases the pheromone trails proportionally to their difference to the maximum pheromone trail limit. As a conclusion it is stated that MMAS outperformed all other AS variants to date. 4. The hybrid-ACO algorithm The algorithm consists of two parts. We have the ACO part, where ants crawl over the searchspace trying to construct a feasible tour. When all ants have constructed their tour, the timestamps have also been calculated for the individual operations in the schedule defined by a tour, which allows us to calculate the makespan. The postprocessing part springs to life when there is a complete schedule to operate on. The (global) pheromone update of the ACO occurs only after the postprocessing has finished, this is due to the postprocessing affecting the makespan of the schedule formed by the tour of the ant. After the pheromone update ACO continues with the next iteration. 4.1 The postprocessing algorithm After all ants have constructed their tour, a postprocessing algorithm is applied. This algorithm is effectively a local search procedure, based upon the approach of Nowicki and Smutnicki (1996). The local search begins by identifying the critical path in the constructed schedule. The critical path can be decomposed into a number of blocks where a block is a maximal sequence of adjacent operations that require the same machine. Block length can vary from just one operation to all operations that are scheduled on one machine. Given a block, swapping operations take place. We start from the last block in the critical path which has a size larger than 1 and its last operation in the block. The block size must be larger than 1 since otherwise no swap can be made. The identified operation is swapped with its predecessor in the same block, and the necessary changes are made into the tour of the ant as well as the timestamps of the scheduled operations. If the swap improves the makespan, it is accepted, otherwise the swap is undone and the next pair in the block is up for swapping. If a block contains no more swaps we move to the preceeding block. Note that an accepted swap means that the critical path may change and a new critical path must be identified. If no swap of operations in the critical path improve the makespan, the local search ends. This means that the tour of an ant may change in the postprocessing part of the algorithm. The tour of the ants after the very first completed postprocessing run may differ radically from the one presented by the first iteration of the ACO, but succeeding postprocessing runs after the first round of calculations are much easier on the ants and are not interrupting the pheromone trails too much. 364 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Figure 1 shows a critical path and possible swaps for an example schedule. Figure 1. A sample 4-machine schedule with the critical path marked in grey and possible swap pairs with arrows. The path is made of 4 blocks with the largest block consisting of four scheduled operations. 5. What is visibility? An additional problem when working with ant systems is that of visibility. There are similarities between priority rules used in heuristic approaches and the visibility of a single ant, both are trying to evaluate and make a choice of where to go next from a specific node. Usually visibility is referred to as the neighbourhood of the ant, i.e. the nodes that are close to the node the ant is currently staying on. It is a measure of what nodes the ant can see around it when standing on a specified node. In equation 1, the parameter ηij is our measure of visibility and in TSP-problems the meaning is clear and all values of ηij can be computed a priori, since the node distances are known. No matter which node the ant stands on, the distance to all other nodes can be fetched from a pre-calculated distance table. When it comes to schedules it is not entirely straightforward what visibility is and what effect it has on computations with regard to ACO. The distance in time units from a node in the tour to the next is not known until you have calculated the timestamps for the entire tour so far. Another thing with ACO and the MT-10 problem is that the tabu list (already visited nodes) alone is not enough. Since the tasks in every job have to be done in correct order, that is, task A3 has to be done before A4 etc., a candidate list is needed. The candidate list has all the legal node choices an ant can make from the node it is currently standing on. This means that only the selection probabilities for the nodes in the candidate list need to be calculated, which speeds up the algorithm. In this case visibility for an ant is restricted to only the nodes in the candidate list. Figure 2 illustrates this phenomena. In order to understand more about visibility and its effects, some various approaches to ACO-visibility in schedules are undertaken and studied. Table 1 shortly outlines some different types of visibility. Type of visibility Distance SPT LPT TLM TLJ TLJ+TLM(30-70) TLJ+TLM(50-50) TLJ+TLM(70-30) Explanation Distance-based, the starting time of an operation (counted from t0) Shortest processing time first Longest processing time first Length of unscheduled tasks left on machine Length of unscheduled tasks left in job Length of unscheduled tasks left in job and on machine, weight 30%-70% Length of unscheduled tasks left in job and on machine, weight 50%-50% Length of unscheduled tasks left in job and on machine, weight 70%-30% Table 1. Various types of visibility for ACO Job-shop scheduling and visibility studies with a hybrid ACO algorithm 365 Tabu list B1, B2, D1, A1 These nodes can never be visited again The nodes in the candidate list are the only ones the ant can see Candidate list A2, B3, C1, D2, E1, F1, G1, H1, I1, J1 ?? Tour of ant m so far: B1 B2 D1 A1 Ant is now on node A1, pondering its next move. Machines M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 In the MT-10 problem it is defined that B1 (which means job 2, task1) runs on machine 1. B2 runs on machine 3, D1 on machine 2 and A1 on machine 1, i.e. specific machines can do specific tasks. Availability time for machine 1 to Schedule calculated from the tour Time Figure 2. Visibility in scheduling. Since the ant has visited the nodes B1 and B2, the candidate list contains the next in the series, B3. Same for A2 and D2 since both A1 and D1 are in the tour. The rest of the candidates are jobs that have not started yet, the first in their series of tasks. Every time a node is added to the tour, it is placed into the schedule and the timestamps for starting and finishing that task on the specific machine are calculated. When choosing the next node to travel to, visibility can be calculated for all the nodes in the candidate list. The good choices get better visibility rating, according to selected visibility method, and thus a better chance of being selected When the ant is selecting the next node to travel to, distance-based visibility is the earliest possible start time on the corresponding machine for the possible selections in its allowed list. The task that can start earlier than other candidates gets a higher probability of being chosen than a task that can start later and this can be achieved with a simple formula Q/tstart 366 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization that replaces the definition of ηij in equation 1. SPT ranks the candidates according to length of their processing time, shorter processing time means a higher probability of being chosen, whereas LPT is the opposite; longer processing times means higher probability. TLM calculates the total processing time for all unscheduled tasks on the current machine. The longer the total processing time is, the higher the probability of being chosen. TLJ is similar, it calculates the total processing times for all the unscheduled tasks left in the current job. The longer the total processing time, the higher the probability. TLJ + TLM is a combination of TLJ and TLM, where each visibility is weighted differently. To get an outline of the impact of the weighting factors, 30-70, 50-50 and 70-30 proportional weights are used (percentage values). 6. Computational experience and results The experiment setup was to take each ACO method and do 5 runs for each of the different types of visibility. Each run was 2,500 rounds of calculations, then the algorithm was halted. Two sets of runs were made, one without postprocessing, the other with. Average values and mean deviations were calculated. All units in table 3 and 4 are time units. Common parameter settings for ACO can be seen in table 2. Parameter m Q α β p value 40 80 1 2 0.007 meaning number of ants pheromone deposited by an ant bias towards pheromone amplification bias towards closest nodes (visibility) evaporation rate Table 2. ACO parameter settings These parameters were kept the same for all comparative runs, i.e. for all visibility types during the runs with and without postprocessing. The column that dictates percentage deviation from optimum solution is calculated for the best found makespan of the runs. AS and RAS perform about the same, with RAS having the slight edge, smaller standard deviation and better mean values. ACS outperforms both AS and RAS, and MMAS outperforms them all. This is in line with the findings in quoted papers. The impact of the different visibilities vary for the different ACO methods, and it is quite an interesting read. As can be seen, best solution in table 3 was found by the TLJ visibility with ACS as the ACO method. The results for ACS with different visibilities are a bit jumpy, since ACS also holds the worst solution found. MMAS does good overall with all visibilities. The best found solution after 2,500 rounds of calculations is really not a very good one, it is still 13.1% from optimum, however, the algorithm has not stagnated and it continues to explore the search space and comes up with new solutions. The meaning of these runs is not to solve to optimality, rather to study the visibility effects and get a feel for the performance of the different ACO methods. Tweaking the parameter settings for each individual type of visibility may improve the results, but this way all the visibility types are on the same page for easy comparison. Same goes for the ACO methods. Job-shop scheduling and visibility studies with a hybrid ACO algorithm 367 ACO AS Type of visibility Distance SPT LPT TLM TLJ TLJ+TLM(30-70) TLJ+TLM(50-50) TLJ+TLM(70-30) Distance SPT LPT TLM TLJ TLJ+TLM(30-70) TLJ+TLM(50-50) TLJ+TLM(70-30) Distance SPT LPT TLM TLJ TLJ+TLM(30-70) TLJ+TLM(50-50) TLJ+TLM(70-30) worst 2174 2273 2314 2406 2218 2322 2357 2127 2102 2121 2384 2119 2230 2145 2265 2008 1251 2072 2213 1473 1108 1459 1404 1273 1272 1363 1303 1301 1286 1286 1286 1295 best 1373 1582 1491 1482 1502 1457 1464 1459 1488 1508 1519 1486 1466 1364 1520 1494 1137 1867 1638 1381 1070 1234 1279 1168 1183 1241 1237 1209 1267 1211 1235 1245 mean 1954.0 2134.8 2121.8 2117.4 2020.8 2072.2 2114.4 1975.8 1946. 6 1981.6 2151.0 1852.6 2032.8 1929.6 2090.8 1871.0 1184.6 2001.0 2072.6 1431.4 1093.8 1373.0 1335.0 1231.6 1243.6 1332.4 1276.8 1273.0 1279.8 1260.4 1260.2 1269.0 σ 294.4 276.4 316.8 324.7 266.3 311.6 333.0 259.1 230.4 237.6 318.4 205.6 284.8 290.4 286.8 190.3 42.0 71.2 218.8 32.1 13.1 81.1 50.6 37.9 31.8 46.2 25.83 33.0 7.0 30.6 19.2 18.1 % from optimum 32.3% 41.2% 37.6% 37.2% 38.1% 36.2% 36.5% 36.3% 37.5% 38.3% 38.7% 37.4% 36.6% 31.8% 38.8% 37.8% 18.2% 50.2% 43.2% 32.6% 13.1% 24.6% 27.3% 20.4% 21.4% 25.1% 24.8% 23.1% 26.6% 23.2% 24.7% 25.3% RAS ACS MMAS Distance SPT LPT TLM TLJ TLJ+TLM(30-70) TLJ+TLM(50-50) TLJ+TLM(70-30) Table 3. Results from computational runs without postprocessing 368 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization ACO AS Type of visibility Distance SPT LPT TLM TLJ TLJ+TLM(30-70) TLJ+TLM(50-50) TLJ+TLM(70-30) Distance SPT LPT TLM TLJ TLJ+TLM(30-70) TLJ+TLM(50-50) TLJ+TLM(70-30) Distance SPT LPT TLM TLJ TLJ+TLM(30-70) TLJ+TLM(50-50) TLJ+TLM(70-30) worst 1341 1609 1608 1667 1620 1599 1578 1580 1292 1463 1538 1465 1358 1457 1456 1502 1053 1340 1178 1137 988 1105 1060 995 1013 1006 1019 1014 1013 994 1006 1003 best 1083 1055 1079 1048 1061 1057 1059 1071 1087 1069 1101 1088 1068 1093 1067 1101 1032 1123 1103 1038 981 1008 999 977 1001 977 991 988 993 982 989 979 mean 1231.6 1445.6 1464.4 1475.8 1458.8 1437.8 1422.6 1420.6 1207.6 1346.8 1351.2 1330.21 1245.6 1339.0 1281.4 1378.6 1045.0 1254.0 1157.2 1073.0 982.8 1052.8 1033.4 983.0 1003.8 989.6 1004.2 1002.2 1001.2 987.4 998.6 990.4 σ 84.4 198.9 195.2 219.9 207.9 195.1 185.4 183.3 71.8 142.8 148.3 129.4 97.4 127.3 125.9 145.9 7.4 72.5 27.5 35.5 2.7 31.5 20.1 6.6 4.6 9.8 10.2 10.6 6.7 5.1 6.8 8.8 % from optimum 14.1% 11.8% 13.8% 11.3% 12.3% 12.0% 12.2% 13.2% 14.4% 13.0% 15.5% 14.5% 12.9% 14.9% 12.8% 15.5% 9.9% 17.2% 15.7% 10.4% 5.2% 7.7% 6.9% 4.8% 7.1% 4.8% 6.2% 5.9% 6.3% 5.3% 6.0% 5.0% RAS ACS MMAS Distance SPT LPT TLM TLJ TLJ+TLM(30-70) TLJ+TLM(50-50) TLJ+TLM(70-30) Table 4. Results from computational runs with postprocessing Job-shop scheduling and visibility studies with a hybrid ACO algorithm 369 Figure 3. A plot of the pheromonematrix when no postprocessing present. Very clear pheromonetrails are visible Figure 4. A plot of the pheromonematrix when using postprocessing. Clear pheromonetrails visible but distributed over more edges than in figure 4 370 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization As for the postprocessing version of the ACO methods, RAS beats AS in the sense that RAS has less deviation, which means it consistently gives good solutions, though AS did manage to find some better solutions. ACS is still a bit jumpy, it finds very good solutions for some visibility runs, but also performs poorly with for instance SPT and LPT. The various weighted combinations of TLJ + TLM seem to do better, overall, than other visibilities. TLJ+TLM(70-30) visibility in MMAS seems to work best, after 2,500 rounds of calculations the best found solution is 5.0% from optimum, though TLJ visibility and ACS are very close with a 5.2% solution. MMAS has less deviation, and thus is more likely to continue to produce good solutions every time it runs. It is clear that the postprocessing closes the performance gap between the different ACO methods, but the same internal ranking still holds true with postprocessing as without. The postprocessing also improves the performance dramatically for all versions of ACO algorithms tested. The algorithms were stopped after 2,500 rounds of calculations, so the question arises, how good a solution can be found if allowed to run without interruptions for a longer time? An additional run with the best visibility and ACO method from table 3 landed after 30,000 rounds of calculations at a best found makespan of 1012 time units. which is 8.1% from optimum. An additional run with the best visibility and ACO method from table 4 landed after 30,000 rounds of calculations at a best found makespan of 948 time units, which is 1.9 % from optimum. Figure 5. A finished schedule for the MT10 problem, made with the hybrid ACO (MMAS), with a makespan of 968 time units (3.9% from optimum) Another question that can be asked is does the postprocessing disturb the forming of pheromone trails in the system in any way? Figure 3 is the pheromonematrix of the MMAS with no postprocessing, taken after 2,500 rounds, and figure 4 is a similar one with Job-shop scheduling and visibility studies with a hybrid ACO algorithm 371 postprocessing. The dark dots depict a high concentration of pheromone whereas the presence of a lighter dot means no or very little pheromone is present. As one can imagine, the presence of a postprocessing routine that modifies ant tours messes with the ant pheromone trails, and you can clearly see if you compare figure 3 and figure 4 with each other that figure 4 shows more pheromone distribution in the system. There are still dark dots in figure 4 signifying established pheromone trails so we are not dealing with random search. In light of these figures you could eventually tweak the evaporation setting higher when using postprocessing, or bias the parameters more towards an emphasis on visibility. You could argue that the larger distribution of pheromone over the trails as seen in figure 4 encourages ant exploration more and actually helps in finding better solutions. A finished schedule produced by a hybrid ACO can be seen in figure 5. 7. Conclusion When paired with the local search the ACO produces noteworthy results very fast (typically 5% from optimum within 200 rounds of calculations). The Max-Min Ant System outperformed all other ACO versions, and it did so for all types of visibility tested, showing that it is indeed a leading candidate for choosing your ant system. There are various version of ACO available and this chapter served its purpose to both do an attempt at ranking them, showing the impact of various visibility methods as well as proving that pure ACO methods produce good results, but even better when combined with the postprocessing algorithm shown. Naturally, not every combination of ACO and a local search is guaranteed to work better than a pure ACO, but a hybrid version can improve the performance dramatically. If you are looking for a good, quick solution rather than an all-out effort to find the best solution, ACO perfomance is a noteworthy competitor to existing job-shop scheduling approaches. ACO is an easy algorithm to implement, with roughly the same amount of code and difficulty as that of a genetic algorithm. ACO is a good example of how harnessing, mimicking and utilizing processes occurring in nature for tough scientific problems can be a successful enterprise. 8. References Adams J., Balas E., Zawack D. (1988). The shifting bottleneck procedure for job shop scheduling, Management Science, 34, pp. 391-401. Bell J.E., McMullen P.R. (2004) Ant colony optimization techniques for the vehicle routing problem, Advanced Engineering Informatics, 18, pp. 41-48. Blum C., Dorigo M. (2004). The hyper-cube framework for ant colony optimization, IEEE Trans Syst Man Cybernet Part B, 34(2), pp. 1161-1172. Bullnheimer B., Hartl R., Strauss C. (1999). A new rank-based version of the Ant System: A computational study, Central European J Operations Res Econom, 7(1), pp. 25-38. Colorni A., Dorigo M., Maniezzo V. and Trubian M. (1993). Ant System for Job-shop scheduling, Belgian Journal of Operations Research, Statistics and Computer Science, 34: pp. 39--54. Denebourg, J.-L., Aron, S., Goss, S., Pasteels, J.-M. (1990) The self-organizing exploratory pattern of the Argentine ant, Journal of insect behaviour, vol. 3, p. 150. 372 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Dorigo M. (1992). Optimization, Learning and Natural Algorithms. PhD thesis, Dipartemento di Elettronica, Politecnico di Milano. Dorigo M., Gambardella L.M. (1997). Ant Colony System: A cooperative learning approach to the traveling salesman problem, IEEE Trans Evolutionary Comput,1(1), pp. 53-66. Dorigo M., Maniezzo V., Colorni A. (1996). Ant system: Optimization by a colony of cooperating agents, IEEE Trans Syst Man Cybernet Part B, 26(1), pp. 29-41. Dorigo, M. and Stützle, T. (2004). Ant colony optimization, MIT press, Cambridge, MA. Gajpal Y., Rajendran C. (2006). An ant-colony optimization algorithm for minimizing the completion-time variance of jobs in flowshops, International Journal of Production Economics, 101, pp. 259-272. Grassé, P.-P. (1946). Les Insects Dans Leur Univers, Paris, France, Ed. Du Palais de la découverte. Gutjahr W.J., Rauner M.S. (2005). An ACO algorithm for a dynamic regional nursescheduling problem in Austria, Computers & Operations Research (in print). Jayaraman V.K., Kulkarni B.D., Karale S., Shelokar P. (2000). Ant colony framework for optimal design and scheduling of batch plants, Computers and Chemical Engineering, 24, pp. 190-192. Kuo-Ching Ying, Ching-Jong Liao (2004). An ant colony system for permutation flow-shop sequencing, Computers & Operations Research, 31, pp. 791-801. Panwalker S.S., Iskander W. (1977). A survey of Scheduling Rules, Oper.Res., 25, 1, pp. 45-61. Rosenkrantz, D. J., Stearns, R. E., Lewis, P. M. (1977). An analysis of several heuristics for the traveling salesman problem, SIAM Journal on Computing, vol. 6, pp. 563-581. Nakano R., Yamada T. (1991). Conventional Genetic Algorithm for Job Shop Problems, Proc. of the 4th Int. Conference on Genetic Algorithms, San Diego, Californa, pp. 474-479. Nowicki E., Smutnicki C. (1996). A fast taboo search algorithm for the job-shop problem. Management Science, 42 (6), pp. 797-813. Stützle T., Hoos H.H. (1996). Improving the Ant System: a detailed report on the MAX-MIN Ant system, Technical Report AIDA-96-12, FG Intellektik, TH Darmstadt. Stützle T., Hoos H.H. (2000). MAX-MIN Ant system, Future Generat Comput Syst, 16(8), pp. 889-914. Stützle, T. and Dorigo, M. (2002). A short convergence proof for a class of ACO algorithms, IEEE Transactions on evolutionary computation, vol.6, no. 4, pp. 358-365. Taillard E. (1989). Parallel Tabu Search Technique for the Jobshop Scheduling Problem, Internal Report ORWP 89/11, Departemente de Mathematiques, Ecole Polytechnique Federale de Lausanne, Lausanne. Van Laarhoven P. J. M., Aarts E.H.L., Lenstra J.K. (1992). Job shop scheduling by simulated annealing, Operations Research, 40, pp. 113-125. 21 Particle Swarm Optimization in Structural Design 2Ryerson 1University of Toronto, Institute for Aerospace Studies, University, Department of Aerospace Engineering Canada Ruben E. Perez1 and Kamran Behdinan2 1. Introduction Optimization techniques play an important role as a useful decision making tool in the design of structures. By deriving the maximum benefits from the available resources, it enables the construction of lighter, more efficient structures while maintaining adequate levels of safety and reliability. A large number of optimization techniques have been suggested over the past decades to solve the inherently complex problem posed in structural design. Their scope varies widely depending on the type of structural problem to be tackled. Gradient-based methods, for example, are highly effectively in finding local optima when the design space is convex and continuous and when the design problem involves large number of design variables and constraints. If the problem constraints and objective function are convex in nature, then it is possible to conclude that the local optimum will be a global optimum. In most structural problems, however, it is practically impossible to check the convexity of the design space, therefore assuring an obtained optimum is the best possible among multiple feasible solutions. Global non-gradient-based methods are able to traverse along highly non-linear, non-convex design spaces and find the best global solutions. In this category many unconstrained optimization algorithms have been developed by mimicking natural phenomena such as Simulated Annealing (Kirkpatrick et al., 1983), Genetic Algorithms (Goldberg, 1989), and Bacterial Foraging (Passino, 2002) among others. Recently, a new family of more efficient global optimization algorithms have been developed which are better posed to handle constraints. They are based on the simulation of social interactions among members of a specific species looking for food sources. From this family of optimizers, the two most promising algorithms, which are the subject of this book, are Ant Colony Optimization (Dorigo, 1986), and Particle Swarm Optimization or PSO. In this chapter, we present the analysis, implementation, and improvement strategies of a particle swarm optimization suitable for constraint optimization tasks. We illustrate the functionality and effectiveness of this algorithm, and explore the effect of the different PSO setting parameters in the scope of classical structural optimization problems. 1.1 The Structural Design Problem Before we describe the implementation of the particle swarm approach, it is necessary to define the general structural design problem to understand the different modification and 374 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization improvements made later to the basic algorithm. Mathematically, a structural design problem can be defined as: min f ( x, p ) s.t. x ∈ D where D = x|x ∈ [ xl ,xu ] ⊂ ℜn , g j ( x, p ) ≤ 0∀j ∈ [1,m] { } (1) where a specific structural attribute (e.g. weight) is defined as an objective or merit function f which is maximized or minimized using proper choice of the design parameters. The design parameters specify the geometry and topology of the structure and physical properties of its members. Some of these are independent design variables (x) which are varied to optimize the problem; while others can be fixed value parameters (p). From the design parameters, a set of derived attributes are obtained some of which can be defined as behaviour constraints (g) e.g., stresses, deflections, natural frequencies and buckling loads etc., These behaviour parameters are functionally related through laws of structural mechanics to the design variables. The role of an optimization algorithm in structural design will be then to find the best combination of design variables that lead to the best objective function performance, while assuring all constraints are met. 2. The Particle Swarm Algorithm The PSO algorithm was first proposed in 1995 by Kennedy and Eberhart. It is based on the premise that social sharing of information among members of a species offers an evolutionary advantage (Kennedy & Eberhart, 1995). Recently, the PSO has been proven useful on diverse engineering design applications such as logic circuit design (e.g. Coello & Luna, 2003), control design (e.g. Zheng et al., 2003) and power systems design (e.g. Abido, 2002) among others. A number of advantages with respect to other global algorithms make PSO an ideal candidate for engineering optimization tasks. The algorithm is robust and well suited to handle non-linear, non-convex design spaces with discontinuities. It is also more efficient, requiring a smaller number of function evaluations, while leading to better or the same quality of results (Hu et al., 2003; and Hassan et al., 2005). Furthermore, as we will see below, its easiness of implementation makes it more attractive as it does not require specific domain knowledge information, internal transformation of variables or other manipulations to handle constraints. 2.1 Mathematical Formulation The particle swarm process is stochastic in nature; it makes use of a velocity vector to update the current position of each particle in the swarm. The velocity vector is updated based on the "memory" gained by each particle, conceptually resembling an autobiographical memory, as well as the knowledge gained by the swarm as a whole (Eberhart & Kennedy, 1995). Thus, the position of each particle in the swarm is updated based on the social behaviour of the swarm which adapts to its environment by returning to promising regions of the space previously discovered and searching for better positions over time. Numerically, the position x of a particle i at iteration k+1 is updated as: i i i x k+1 = x k + vk+1 ∆t (2) Particle Swarm Optimization in Structural Design 375 i where vk+1 is the corresponding updated velocity vector, and ∆t is the time step value typically considered as unity (Shi & Eberhart, 1998a). The velocity vector of each particle is calculated as: i i vk+1 = wvk + c1r1 i i pk - x k ∆t + c 2r2 g i pk - x k ∆t (3) g i i where vk is the velocity vector at iteration k, pk & pk are respectively the best ever position of particle i and the global best position of the entire swarm up to current iteration k, and r represents a random number in the interval [0,1]. The remaining terms are configuration parameters that play an important role in the PSO convergence behaviour. The terms c1 and c2 represent "trust" settings which respectively indicate the degree of confidence in the best solution found by each individual particle (c1 - cognitive parameter) and by the swarm as a whole (c2 - social parameter). The final term w, is the inertia weight which is employed to control the exploration abilities of the swarm as it scales the current velocity value affecting the updated velocity vector. Large inertia weights will force larger velocity updates allowing the algorithm to explore the design space globally. Similarly, small inertia values will force the velocity updates to concentrate in the nearby regions of the design space. Figure 1 illustrates the particle position and velocity update as described above in a twodimensional vector space. Note how the updated particle position will be affected not only by its relationship with respect to the best swarm position but also by the magnitude of the configuration parameters. i xk +1 i c2 r2 ( pkg − xk ) i pk pkg i vk +1 i i c1 r1 ( pk − xk ) x i k i wvk i vk Figure 1. PSO Position and Velocity Update 2.2 Computational Algorithm As with all numerical based optimization approaches the PSO process is iterative in nature, its basic algorithm is constructed as follows: i i 1. Initialize a set of particles positions x0 and velocities v0 randomly distributed 2. throughout the design space bounded by specified limits. i i Evaluate the objective function values f ( xk ) using the design space positions xk . A total of n objective function evaluations will be performed at each iteration, where n is the total number of particles in the swarm. 376 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization i Update the optimum particle position pk at current iteration k and global optimum 3. 4. g particle position pk . Update the position of each particle using its previous position and updated velocity vector as specified in Eq. (1) and Eq. (2). 5. Repeat steps 2-4 until a stopping criterion is met. For the basic implementation the typical stopping criteria is defined based on a number of iterations reached. The iterative scheme behaviour for a two-dimensional variable space can be seen in Figure 2, where each particle position and velocity vector is plotted at two consecutive iterations. Each particle movement in the design space is affected based on its previous iteration velocity (which maintains the particle “momentum” biased towards a specific direction) and on a combined stochastic measure of the previous best and global positions with the cognitive and social parameters. The cognitive parameter will bias each particle position towards its best found solution space, while the social parameter will bias the particle positions towards the best global solution found by the entire swarm. For example, at the kth iteration the movement of the tenth particle in the figure is biased towards the left of the design space. However, a change in direction can be observed in the next iteration which is forced by the influence of the best design space location found by the whole swarm and represented in the figure as a black square. Similar behaviour can be observed in the other particles of the swarm. Iteration k 3 9 3 10 Iteration k+1 2 5 10 7 2 1 1 5 9 x2 x2 0 2 -1 3 8 -2 6 1 4 -3 -3 -2 -1 0 x1 1 2 3 0 3 -1 7 -2 6 -3 -3 -2 2 1 -1 0 x1 1 8 4 2 3 Figure 2. PSO Position and Velocity Update An important observation is that the efficiency of the PSO is influenced to some extent by the swarm initial distribution over the design space. Areas not initially covered will only be explored if the momentum of a particle carries the particle into such areas. Such a case only occurs when a particle finds a new individual best position or if a new global best is discovered by the swarm. Proper setting of the PSO configuration parameters will ensure a good balance between computational effort and global exploration, so unexplored areas of the design space are covered. However, a good particle position initialization is desired. Different approaches have been used to initialize the particle positions with varying degrees of success. From an engineering design point of view, the best alternative will be to distribute particles uniformly covering the entire search space. A simpler alternative, which Particle Swarm Optimization in Structural Design 377 has been proven successfully in practice, is to randomly distribute the initial position and velocity vectors of each particle throughout the design space. This can be accomplished using the following equations: i x0 = xmin + r ( xmax - xmin ) (4) (5) i v0 = xmin + r ( xmax - xmin ) ∆t where xmin and xmax represent the lower and upper design variables bounds respectively, and r represents a random number in the interval [0,1]. Note that both magnitudes of the position and velocity values will be bounded, as large initial values will lead to large initial momentum and positional updates. This large momentum causes the swarm to diverge from a common global solution increasing the total computational time. 2.2 Algorithm Analysis A useful insight of the PSO algorithm behaviour can be obtained if we replace the velocity update equation (Eq. (3)) into the position update equation (Eq. (2)) to get the following expression: g i i i pk - x k pk - x k i i ∆t x k+1 = xk + wVki + c1r1 + c 2r2 ∆t ∆t (6) Factorizing the cognitive and social terms from the above equation we obtain the following general equation: i i x k+1 = xk + wVki ∆t + ( c1r1 + c 2r2 ) g i c1r1 pk + c 2r2 pk i - xk c1r1 + c 2r2 (7) Note how the above equation has the same structure as the gradient line-search used in i convex unconstrained optimization ( x k+1 = x ik + α p k ) where: ˆ ˆi x k = xk + wVk ∆t α = c1r1 + c 2r2 p k= c r p +c r p i -xk c1r1 + c 2r2 i 11 k g 22 k i i (8) So the behaviour of each particle in the swarm can be viewed as a traditional line-search procedure dependent on a stochastic step size (α) and a stochastic search direction ( p k ). Both the stochastic step size and search direction depend on the selection of social and cognitive parameters. In addition, the stochastic search direction behaviour is also driven by the best design space locations found by each particle and by the swarm as a whole. Behaviour confirmed from the Fig. 2 observations. Knowing that r1 ,r2 ∈ [0,1] , then the step size will belong to the interval [0,c1 + c2 ] with a mean value of ( c1 + c 2 ) 2 . Similarly, the g i i i search direction will be bracketed in the interval -x k , c1 pk + c 2 pk c1 + c 2 - xk t . ( ) 378 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization Two questions immediately arise from the above analysis. The first question is what type of convergence behaviour the algorithm will have. The second one is which values of the social and cognitive parameters will guarantee such convergence. To answer both questions let us start by re-arranging the position terms in equation (6) to get the general form for the ith particle position at iteration k+1 as: g i i i x k+1 = xk ( 1 - c1r1 - c 2r2 ) + wVki ∆t + c1r1 pk + c 2r2 pk (9) A similar re-arrangment of the position term in equation (2) leads to: i i Vk+1 = -x k ( c1r1 + c 2r2 ) + wV i + c r ∆t k 11 i pk pg + c 2r2 k ∆t ∆t (10) Equations (8) and (9) can be combined and written in matrix form as: 1 - c1r1 - c 2r2 i xk+1 = (c r + c r ) i Vk+1 - 1 1 2 2 ∆t w∆t i c1r1 xk + cr w Vki 1 1 ∆t c2r2 i pk c 2r2 g p ∆t k T (11) which can be considered as a discrete-dynamic system representation for the PSO algorithm where x i ,V i T is the state subject to an external input pi , p g , and the first and second matrices correspond to the dynamic and input matrices respectively. If we assume for a given particle that the external input is constant (as is the case when no individual or communal better positions are found) then a convergent behaviour can be maintained, as there is no external excitation in the dynamic system. In such a case, as the iterations go to infinity the updated positions and velocities will become the same from the kth to the kth+1 iteration reducing the system to: - (c r + c r ) 0 1 1 2 2 = ( c1r1 + c 2r2 ) 0 ∆t w∆t i c1r1 xk + cr w - 1 Vki 1 1 ∆t c2r2 i pk c 2r2 g p ∆t k (12) i i which is true only when Vki = 0 and both xk and pk coincide with pkg . Therefore, we will have an equilibrium point for which all particles tend to converge as iteration progresses. Note that such a position is not necessarily a local or global minimizer. Such point, however, will improve towards the optimum if there is external excitation in the dynamic system driven by the discovery of better individual and global positions during the optimization process. The system stability and dynamic behaviour can be obtained using the eigenvalues derived from the dynamic matrix formulation presented in equation (11). The dynamic matrix characteristic equation is derived as: λ 2 - ( w - c1r1 - c 2r2 + 1) λ + w = 0 where the eigenvalues are given as: (13) λ1,2 = 1+ w - c1r1 - c 2r2 ± (1+ w - c1r1 - c 2r2 ) 2 2 - 4w (14) Particle Swarm Optimization in Structural Design 379 The necessary and sufficient condition for stability of a discrete-dynamic system is that all eigenvalues (λ) derived from the dynamic matrix lie inside a unit circle around the origin on the complex plane, so λ i=1,…,n |< 1 . Thus, convergence for the PSO will be guaranteed if the following set of stability conditions is met: c1r1 + c 2r2 > 0 2 ( c1r1 + c 2r2 ) - w < 1 w<1 (15) Knowing that r1 ,r2 ∈ [0,1] the above set of conditions can be rearranged giving the following set of parameter selection heuristics which guarantee convergence for the PSO: ( c1 + c 2 ) 2 0 < ( c1 + c 2 ) < 4 -1< w <1 (16) While these heuristics provide useful selection bounds, an analysis of the effect of the different parameter settings is essential to determine the sensitivity of such parameters in the overall optimization procedure. Figure 3 shows the convergence histories for the wellknown 10-bar truss structural optimization problem (described in more detail on Section 4) under different social and cognitive parameter combinations which meet the above convergence limits. The results are representative of more than 20 trials for each tested case, where the algorithm was allowed to run for 1000 iterations, with a fixed inertia weight value of 0.875, and the same initial particles, velocity values, and random seed. 8000 c = 0.0, c = 3.0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 c = 0.5, c = 2.5 7500 c = 1.0, c = 2.0 c = 1.5, c = 1.5 c = 2.0, c = 1.0 7000 Structure Weight [lbs] c = 2.5, c = 0.5 c = 3.0, c = 0.0 c = 1.0, c = 1.0 6500 6000 5500 5000 4500 0 10 10 1 10 Iteration 2 10 3 Figure 3. Cognitive (c1) and Social (c2) Parameters Variation Effect 380 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization From the figure we can clearly see that when only social values are used to update the particle velocities, as is the case when c1=0 & c2=3, the algorithm converges to a local optimum within the first ten iterations. As no individual (local) exploration is allowed to improve local solutions, all the particles in the swarm converge rapidly to the best initial optimum found from the swarm. We can also see that by increasing the emphasis on the cognitive parameter while reducing the social parameters, better solutions are found requiring less number of iterations for convergence. When we place slightly higher emphasis in the local exploration by each particle, as is the case with c1=2.0 & c2=1.0 and c1=2.5 & c2=0.5, the algorithm provides the best convergence speed to accuracy ratio. This result is due to the fact that individuals concentrate more in their own search regions thus avoiding overshooting the best design space regions. At the same time, some global information exchange is promoted, thus making the swarm point towards the best global solution. However, increasing local exploration at the expense of global agreement has its limits as shown in the case where only cognitive values are used to update the particle velocities (c1=3 and c2=0). In this case, each particle in the swarm will explore around its best-found solution requiring a very large number of iterations to agree into a common solution, which for this example is not the global optimum. In a similar way to the above analysis, Figure 4 shows the effect of varying the inertia weight between its heuristic boundaries for a fixed set of "trust" settings parameters with c1=2.0 and c2=1.0 values. As before, the results are representative of more than 20 trials for each tested case where the algorithm was allowed to run for 1000 iterations with the same initial position, velocity and random seed. From the figure it is clear that reducing the inertia weight promotes faster convergence rates, as it controls the particle “momentum” bias towards a specific direction of the search space. Reducing the inertia weight beyond its allowable convergence limits comes at a cost as particles are forced to reduced their momentum stagnating at local optima as shown in the figure for the w=0.5 case. 8000 w= w= w= w= w= w= 1.0 0.9 0.8 0.7 0.6 0.5 7500 7000 Structure Weight [lbs] 6500 6000 5500 5000 4500 0 10 10 1 10 Iteration 2 10 3 Figure 4. Inertia Weight Variation Effect Particle Swarm Optimization in Structural Design 381 It is important to note at this stage that the optimal selection of the PSO parameters is in general problem-dependent. However, the obtained results for our example confirms the expectations as derived from the theoretical analysis (see i.e. van den Bergh & Engelbrecht, 2006; Trelea, 2003; and Clerc & Kennedy, 2002) and experiments (see i.e. Shi & Eberhart, 1998b; Shi & Eberhart, 1999; and Eberhart & Shi, 2000) regarding the sensitivity and behaviour of such tuning parameters. As long as the stability conditions presented in Eq. (16) are met, it is observed that maintaining an approximately equal or slightly higher weighting of the cognitive vs. the social parameter (in the interval of 1.5 to 2.5) will lead to the optimal convergent behaviour for the PSO. 3. Algorithm Improvements Thus far, we have only dealt with the most basic PSO algorithm. Two important concerns when dealing with practical engineering problems have been left out up to now: how to improve the convergence rate behaviour as particles converge to a solution, and how to handle constraints. As we will see below, different modifications can be made to the original algorithm to address these concerns making it much stronger to deal with constrained optimization problems such as those traditionally present in structural design. 3.1 Updating the Inertia Weight As shown before, the PSO global convergence is affected by the degree of local/global exploration provided by the "trust" settings parameters while the relative rate of convergence is provided by the inertia weight parameter. An interesting observation can be made from the inertia weight analysis presented in Figure 4. For a fixed inertia value there is a significant reduction in the algorithm convergence rate as iterations progresses. This is the consequence of excessive momentum in the particles, which results in detrimentally large steps sizes that overshoot the best design areas. By observing the figure, an intuitive strategy comes to mind: during the initial optimization stages, allow large weight updates so the design space is searched thoroughly. Once the most promising areas of the design space have been found (and the convergence rate starts to slow down) reduce the inertia weight, so the particles momentum decreases allowing them to concentrate in the best design areas. Formally, different methods have been proposed to accomplish the above strategy. Notably, two approaches have been used extensively (see Shi & Eberhart, 1998a; and Fourie & Groenwold, 2002). In the first one, a variation of inertia weight is proposed by linearly decreasing w at each iteration as: wk+1 = wmax - wmax - wmin k kmax (17) where an initial inertia value wmax is linearly decreased during kmax iterations. The second approach provides a dynamic decrease of the inertia weight value if the swarm makes no solution improvement after certain number of iterations. The updated is made from an initial weight value based on a fraction multiplier kw ∈ [0,1] as: wk+1 = kw wk (18) 382 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization The effect of the described inertia update methods against a fixed inertia weight of 0.875 is shown in Figure 5 for the 10-bar truss example used before. For the linear decrease method, the inertia weight is varied in the interval [0.95, 0.55]. This interval meets the specified convergence conditions (Eq. (16)) with c1=2.0 and c2=1.0 values. For the dynamic decrease case a fraction multiplier of kw = 0.975 is used if the improved solution does not change after five iterations, with an initial inertia weight specified as 0.95. As expected, an initial rapid convergence rate can be observed for the fixed inertia test, followed by a slow convergence towards the global optimum. The effect of dynamically updating the inertia weight is clear as both the linear and dynamic decrease methods present faster overall convergence rates. The dynamic update method provide the fastest convergence towards the solution, taking approximately 100 iterations as compared to 300 iterations taken by the linear decrease method, and the 600 iterations taken by the fixed inertia weight test. An intrinsic advantage is also provided by the dynamic decrease method as it depends solely on the value of past solutions adapting well to algorithmic termination and convergence check strategies. 8000 Fixed Weight Linear Variation Dynamic Variation 7500 7000 Structure Weight [lbs] 6500 6000 5500 5000 4500 0 10 10 1 10 Iteration 2 10 3 Figure 5. Inertia Weight Update Strategies Effect 3.2 Dealing with Constraints Similar to other stochastic optimization methods, the PSO algorithm is formulated as an unconstrained optimizer. Different strategies have been proposed to deal with constraints, making the PSO a strong global engineering optimizer. One useful approach is to restrict the velocity vector of a constrained violated particle to a usable feasible direction as shown in Fig. 6. By doing so, the objective function is reduced while the particle is pointed back towards the feasible region of the design space (Venter & Sobieszczanski-Sobieski, 2004). A new position for the violated constraint particles can be defined using Eq. (2) with the velocity vector modified as: Particle Swarm Optimization in Structural Design 383 i - xk ) i vk+1 = c1r1 (p i k ∆t + c 2r2 (p g k i - xk ) ∆t (19) where the modified velocity vector includes only the particle self information of the best point and the information of the current best point in the swarm. The new velocity vector is only influenced then by the particle best point found so far and by the current best point in the swarm. If both of these best points are feasible, the new velocity vector will point back to a feasible region of the design space. Otherwise, the new velocity vector will point to a region of the design space that resulted in smaller constraint violations. The result is to have the violated particle move back towards the feasible region of the design space, or at least closer to its boundary, in the next design iteration. Figure 5. Violated Design Points Redirection The velocity redirection approach however, does not guarantee that for the optimum solution all constraints will be met as it does not deal with the constraint directly. One classic way to accommodate constraints directly is by augmenting the objective function with penalties proportional to the degree of constraint infeasibility as: f ( xk ) if m f ′ ( xk ) = ˆ f ( xk ) + ∑ k j g j ( xk ) j =1 xk is feasible (20) otherwise where for m constraints kj is a prescribed scaling penalty parameter and g j ( xk ) is a constraint value multiplier whose values are larger than zero if the constraint is violated: ˆ g j ( xk ) = max 0, g j ( xk ) ( 2 ) (21) In a typical optimization procedure, the scaling parameter will be linearly increased at each iteration step so constraints are gradually enforced. The main concern with this method is that the quality of the solution will directly depend on the value of the specified scaling 384 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization parameters. A better alternative will be to accommodate constraints using a parameter-less scheme. Taking advantage of the available swarm information Eq. (22) and Eq. (23) show a useful adaptive penalty approach, where penalties are defined based on the average of the objective function and the level of violation of each constraint during each iteration step: k j = f ( xk ) g j ( xk ) ∑ gl ( xk ) l =1 m 2 (22) with g j ( xk ) = 1n ˆ ∑ max ( 0, g j ( xk ) ) n k =1 (23) where f ( xk ) is the average of the objective function values in the current swarm, and g j ( xk ) is the violation of the lth constraint averaged over the current population. The above formulation distributes the penalty coefficients in a way that those constraints which are more difficult to be satisfied will have a relatively higher penalty coefficient. Such distribution is achieved by making the jth coefficient proportional to the average of the violation of the jth constraint by the elements of the current population. An individual in the swarm whose jth violation equals the average of the jth violation in the current population for all j, will have a penalty equal to the absolute value of the average objective function of the population. Similarly, the average of the objective function equals f ( xk ) + f ( xk ) . While the penalty based method works well in many practical cases, the numerically exact constrained optimum feasible solution can only be obtained at the infinite limit of the penalty factor. Recently, a new approach which circumvents the need for infinite penalty factors has been proposed by Sedlaczek & Eberhard (2005). It directly uses the general Lagrange function defined for an ith particle as: i i i ℑi ( x k , λ i ) = f ( x k ) + ∑ λ ij g j ( x k ) j=1 m (24) where λ are Lagrange multipliers. This function can be used as an unconstrained pseudo objective function by realizing that the solution of a constrained optimization problem (Eq. (1)) with the correct set of multipliers is a stationary point for the function. The stationary is not necessarily a minimum of the Lagrange function. To preserve the stationary properties of the solution while assuring that it is a minimum, the Lagrange function is augmented using a quadratic function extension θ as (Gill et al. 1981): i i i i ℑi ( x k , λ i , rpi ) = f ( xk ) + ∑ λ ijθ j ( xk ) + ∑ rp, jθ j2 ( x k ) j=1 j=1 m m (25) with -λ j i i θ j ( xk ) = max g j ( x k ) , 2rp,i (26) Particle Swarm Optimization in Structural Design 385 where the -λ j 2rp,i term is arbitrarily chosen from gradient-based optimization problems. Note from Eq. (25) how each constraint violation is penalized separately using an rp penalty factor. It can be shown that each constrain penalty factor will be of finite value in the solution of the augmented Lagrange function (Eq. (25)) hence in the solution of the original constrained problem (Eq. (1)). The multipliers and penalty factors values that lead to the optimum are unknown and problem dependent. Therefore, instead of the traditional single unconstrained optimization process, a sequence of unconstrained minimizations of Eq. (25) is required to obtain a solution. In such a sequence, the Lagrange multiplier is updated as: λ ij v +1 i = λ ij + 2 rp , j θ j ( xk ) v v (27) In a similar way, the penalty factor is updated in a way such that it penalizes infeasible movements as: 2 rp , j v 1 = rp , j v +1 v 2 r p, j v if if otherwise i i i g j ( xv ) > g j ( xv −1 ) ∧ g j ( xv ) > ε g i g j ( xv ) ≤ ε g rp , j (28) where ε g is a specified constrained violation tolerance. A lower bound limit of rp , j ≥ (1 2 ) λ ij ε g is also placed in the penalty factor so its magnitude is effective in creating a measurable change in Lagrange multipliers. Based on the above formulation the augmented Lagrange PSO algorithm can be then constructed as follows: i i 1. Initialize a set of particles positions x0 and velocities v0 randomly distributed throughout the design space bounded by specified limits. Also initialize the Lagrange multipliers and penalty factors, e.g. λ ij = 0 , rp , j = r0 , and evaluate the initial particles 0 0 2. 3. 4. corresponding function values using Eq. (25). Solve the unconstrained optimization problem described in Eq. (25) using the PSO algorithm shown in section 2.2 for kmax iterations. Update the Lagrange multipliers and penalty factors according to Eq. (27) and Eq. (28). Repeat steps 2-4 until a stopping criterion is met. 4. PSO Application to Structural Design Particle swarms have not been used in the field of structural optimization until very recently, where they have show promising results in the areas of structural shape optimization (Fourie & Groenwold, 2002; Venter & Sobieszczanski-Sobieski, 2004) as well as topology optimization (Fourie & Groenwold, 2001). In this section, we show the application of the PSO algorithm to three classic non-convex truss structural optimization examples to demonstrate its effectiveness and to illustrate the effect of the different constraint handling methods. 386 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization 4.1 Example 1 – The 10-Bar Truss Our first example considers a well-known problem corresponding to a 10-bar truss nonconvex optimization shown on Fig. 6 with nodal coordinates and loading as shown in Table 1 and 2 (Sunar & Belegundu, 1991). In this problem the cross-sectional area for each of the 10 members in the structure are being optimized towards the minimization of total weight. The cross-sectional area varies between 0.1 to 35.0 in2. Constraints are specified in terms of stress and displacement of the truss members. The allowable stress for each member is 25,000 psi for both tension and compression, and the allowable displacement on the nodes is ±2 in, in the x and y directions. The density of the material is 0.1 lb/in3, Young’s modulus is E = 104 ksi and vertical downward loads of 100 kips are applied at nodes 2 and 4. In total, the problem has a variable dimensionality of 10 and constraint dimensionality of 32 (10 tension constraints, 10 compression constraints, and 12 displacement constraints). Figure 6. 10-Bar Space Truss Example Node 1 2 3 4 5 6 Node 4 6 Table 2. 10-Bar Truss Nodal Loads Three different PSO approaches where tested corresponding to different constraint handling methodologies. The first approach (PSO1) uses the traditional fixed penalty constraint while the second one (PSO2) uses an adaptive penalty constraint. The third approach (PSO3) makes use of the augmented Lagrange multiplier formulation to handle the constraints. Based on the derived selection heuristics and parameter settings analysis, a dynamic inertia weight variation method is used for all approaches with an initial weight of 0.95, and a fraction multiplier of kw = 0.975 which updates the inertia value if the improved solution does not change after five iterations. Similarly, the "trust" setting parameters where specified x (in) 720 720 360 360 0 0 Fx 0 0 y (in) 360 0 360 0 360 0 Fy -100 -100 Table 1. 10-Bar Truss Members Node Coordinates Particle Swarm Optimization in Structural Design 387 as c1=2.0 and c2=1.0 for the PSO1 and PSO2 approaches to promote the best global/local exploratory behaviour. For the PSO3 approach the setting parameters where reduced in value to c1=1.0 and c2=0.5 to avoid premature convergence when tracking the changing extrema of the augment multiplier objective function. Table 3 shows the best and worst results of 20 independent runs for the different PSO approaches. Other published results found for the same problem using different optimization approaches including gradient based algorithms both unconstrained (Schimit & Miura, 1976), and constrained (Gellatly & Berke, 1971; Dobbs & Nelson, 1976; Rizzi, 1976; Haug & Arora, 1979; Haftka & Gurdal, 1992; Memari & Fuladgar, 1994), structural approximation algorithms (Schimit & Farshi, 1974), convex programming (Adeli & Kamal, 1991, Schmit & Fleury, 1980), non-linear goal programming (El-Sayed & Jang, 1994), and genetic algorithms (Ghasemi et al, 1997; Galante, 1992) are also shown in Tables 3 and 4. Truss Area 01 02 03 04 05 06 07 08 09 10 Weight PSO1 Best 33.50 0.100 22.76 14.42 0.100 0.100 7.534 20.46 20.40 0.100 5024.1 PSO1 Worst 33.50 0.100 28.56 21.93 0.100 0.100 7.443 19.58 19.44 0.100 5405.3 PSO2 Best 33.50 0.100 22.77 14.42 0.100 0.100 7.534 20.47 20.39 0.100 5024.2 PSO2 Worst 33.50 0.100 33.50 13.30 0.100 0.100 6.826 18.94 18.81 0.100 5176.2 PSO3 Best 33.50 0.100 22.77 14.42 0.100 0.100 7.534 20.47 20.39 0.100 5024.2 PSO3 Worst 30.41 0.380 25.02 14.56 0.110 0.100 7.676 20.83 21.21 0.100 5076.7 Gellatly & Berke, 1971 31.35 0.100 20.03 15.60 0.140 0.240 8.350 22.21 22.06 0.100 5112.0 Schimit & Miura, 1976 30.57 0.369 23.97 14.73 0.100 0.364 8.547 21.11 20.77 0.320 5107.3 Ghasemi, 1997 25.73 0.109 24.85 16.35 0.106 0.109 8.700 21.41 22.30 0.122 5095.7 Schimit & Farshi, 1974 33.43 0.100 24.26 14.26 0.100 0.100 8.388 20.74 19.69 0.100 5089.0 Dobbs & Nelson, 1976 30.50 0.100 23.29 15.43 0.100 0.210 7.649 20.98 21.82 0.100 5080.0 Table 3. 10-Bar Truss Optimization Results Truss Area 01 02 03 04 05 06 07 08 09 10 Weight Rizzi, 1976 30.73 0.100 23.934 14.733 0.100 0.100 8.542 20.954 21.836 0.100 5061.6 Haug & Arora, 1979 30.03 0.100 23.274 15.286 0.100 0.557 7.468 21.198 21.618 0.100 5060.9 Haftka & Gurdal, 1992 30.52 0.100 23.200 15.220 0.100 0.551 7.457 21.040 21.530 0.100 5060.8 Adeli & Kamal, 1991 31.28 0.10 24.65 15.39 0.10 0.10 7.90 21.53 19.07 0.10 5052.0 El-Sayed & Jang, 1994 32.97 0.100 22.799 14.146 0.100 0.739 6.381 20.912 20.978 0.100 5013.2 Galante, 1992 30.44 0.100 21.790 14.260 0.100 0.451 7.628 21.630 21.360 0.100 4987.0 Memari & Fuladgar, 1994 30.56 0.100 27.946 13.619 0.100 0.100 7.907 19.345 19.273 0.100 4981.1 Table 4. 10-Bar Truss Optimization Results (Continuation) We can see that all three PSO implementations provide good results as compared with other methods for this problem. However, the optimal solution found by the fixed penalty approach has a slight violation of the node 3 and node 6 constraints. This behaviour is expected from a fixed penalty as the same infeasibility constraint pressure is applied at each iteration; it also indicates that either we should increase the scaling penalty parameter or dynamically increase it, so infeasibility is penalized further as the algorithm gets closer to the solution. The benefit of a dynamic varying penalty is demonstrated by the adaptive penalty PSO which meets all constraints and has only two active constraints for the displacements at nodes 3 and 6. The augmented Lagrange multiplier approach also converges to the same feasible point as the dynamic penalty result. Furthermore, it does it in fewer number of iterations as compared to the other two approaches since convergence is checked directly using the Lagrange multiplier and penalty factor values. Note as well how 388 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization the fixed penalty approach has a larger optimal solution deviation as compared to the dynamic penalty and Lagrange multiplier approaches. 4.2 Example 2 – The 25-Bar Truss The second example considers the weight minimization of a 25-bar transmission tower as shown on Fig 7 with nodal coordinates shown on Table 5 (Schmit & Fleury, 1980). The design variables are the cross-sectional area for the truss members, which are linked in eight member groups as shown in Table 6. Loading of the structure is presented on Table 7. Constraints are imposed on the minimum cross-sectional area of each truss (0.01 in2), allowable displacement at each node (±0.35 in), and allowable stresses for the members in the interval [-40, 40] ksi. In total, this problem has a variable dimensionality of eight and a constraint dimensionality of 84. Figure 7. 25-Bar Space Truss Example Node 1 2 3 4 5 6 7 8 9 10 x (in) -37.5 37.5 -37.5 37.5 37.5 -37.5 -100.0 100.0 100.0 -100.0 y (in) 0 0 37.5 37.5 -37.5 -37.5 100.0 100.0 -100.0 -100.0 z (in) 200.0 200.0 100.0 100.0 100.0 100.0 0.0 0.0 0.0 0.0 Table 5. 25-Bar Truss Members Node Coordinates Particle Swarm Optimization in Structural Design 389 Group A1 A2 A3 A4 A5 A6 A7 A8 Node 1 2 3 6 Table 7. 25-Bar Truss Nodal Loads Fx 1000 0 500 600 Truss Members 1 2-5 6-9 10,11 12,13 14-17 18-21 22-25 Fy -10000 -10000 0 0 Fz -10000 -10000 0 0 Table 6. 25-Bar Truss Members Area Grouping As before, three different PSO approaches that correspond to different constraint handling methods were tested. The best and worst results of 20 independent runs for each tested method are presented on Table 8 as well as results from other research efforts obtained from local (gradient-based) and global optimizers. Clearly, all PSO approaches yield excellent solutions for both its best and worst results where all the constraints are met for all the PSO methods. The optimal solutions obtained have the same active constraints as reported in other references as follows: the displacements at nodes 3 and 6 in the Y direction for both load cases and the compressive stresses in members 19 and 20 for the second load case. As before, a larger solution deviation in the fixed penalty results is observed as compared to the other two PSO approaches. In addition, results from the augmented Lagrange method are obtained in less number of iterations as compared to the penalty-based approaches. Area Group A1 A2 A3 A4 A5 A6 A7 A8 Weight PSO1 Best 0.1000 0.8977 3.4000 0.1000 0.1000 0.9930 2.2984 3.4000 489.54 PSO1 Worst 0.1000 0.1000 3.3533 0.1000 0.1000 0.7033 2.3233 3.4000 573.57 PSO2 Best 0.1000 1.0227 3.4000 0.1000 0.1000 0.6399 2.0424 3.4000 485.33 PSO2 Worst 0.1000 0.9895 3.4000 0.1000 3.4000 0.6999 1.9136 3.4000 534.84 PSO3 Best 0.1000 0.4565 3.4000 0.1000 1.9369 0.9647 0.4423 3.4000 483.84 PSO3 Worst 0.1000 1.0289 3.4000 0.1000 0.1000 0.8659 2.2278 3.4000 489.424 Zhou & Rosvany, 1993 0.010 1.987 2.994 0.010 0.010 0.684 1.677 2.662 545.16 Haftka & Erbatur, et Gurdal, al., 2000 1992 0.010 0.1 1.987 1.2 2.991 3.2 0.010 0.1 0.012 1.1 0.683 0.9 1.679 0.4 2.664 3.4 545.22 493.80 Zhu, 1986 0.1 1.9 2.6 0.1 0.1 0.8 2.1 2.6 562.93 Wu, 1995 0.1 0.5 3.4 0.1 1.5 0.9 0.6 3.4 486.29 Table 8. 25-Bar Truss Optimization Results 4.3 Example 3 – The 72-Bar Truss The final example deals with the optimization of a four-story 72-bar space truss as shown on Fig. 8. The structure is subject to two loading cases as presented on Table 9. The optimization objective is the minimization of structural weight where the design variables are specified as the cross-sectional area for the truss members. Truss members are linked in 16 member groups as shown in Table 10. Constraints are imposed on the maximum 390 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization allowable displacement of 0.25 in at the nodes 1 to 16 along the x and y directions, and a maximum allowable stress in each bar restricted to the range [-25,25] ksi. In total, this problem has a variable dimensionality of 16 and a constraint dimensionality of 264. Load Case 1 2 2 3 4 Table 9. 72-Bar Truss Nodal Loads Node 1 1 0 0 0 Fx 5 0 0 0 0 Fy 5 0 -5 -5 -5 Fz -5 -5 0 0 0 Figure 8. 72-Bar Space Truss Example Results from the three PSO approaches as well as other references are shown in Table 11. As before, comparisons results include results from traditional optimization (Venkayya, 1971; Gellatly & Berke, 1971; Zhou & Rosvany, 1993), approximation concepts (Schimit & Farshi, 1974), and soft-computing approaches (Erbatur, et al., 2000). Similar to the previous examples, all the tested PSO approaches provide better solutions as those reported in the literature, with the augmented Lagrange method providing the best solution with the lowest number of iterations. The obtained optimal PSO solutions meet all constraints requirements and have the following active constraints: the displacements at node 1 in both the X and Y directions for load case one, and the compressive stresses in members 1-4 for load case two. The above active constraints agree with those reported by the different references. Particle Swarm Optimization in Structural Design 391 Area Members Group A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 Truss Members 1, 2, 3, 4 5, 6, 7, 8, 9, 10, 11, 12 13, 14, 15, 16 17, 18 19, 20, 21, 22 23, 24, 25, 26, 27, 28, 29, 30 31, 32, 33, 34 35, 36 37, 38, 39, 40 41, 42, 43, 44, 45, 46, 47, 48 49, 50, 51, 52 53, 54 55, 56, 57, 58 59, 60, 61, 62, 63, 64, 65, 66 67, 68, 69, 70 71, 72 Schimit & Farshi, 1974 0.1585 0.5936 0.3414 0.6076 0.2643 0.5480 0.1000 0.1509 1.1067 0.5793 0.1000 0.1000 2.0784 0.5034 0.1000 0.1000 388.63 Gellatly & Berke, 1971 0.1492 0.7733 0.4534 0.3417 0.5521 0.6084 0.1000 0.1000 1.0235 0.5421 0.1000 0.1000 1.4636 0.5207 0.1000 0.1000 395.97 Table 10. 72-Bar Truss Members Area Grouping Area Group A01 A02 A03 A04 A05 A06 A07 A08 A09 A10 A11 A12 A13 A14 A15 A16 Weight PSO1 Best 0.1561 0.5708 0.4572 0.4903 0.5133 0.5323 0.1000 0.1000 1.2942 0.5426 0.1000 0.1000 1.8293 0.4675 0.1003 0.1000 381.03 PSO1 Worst 0.1512 0.5368 0.4323 0.5509 2.5000 0.5144 0.1000 0.1000 1.2205 0.5041 0.1000 0.1000 1.7580 0.4787 0.1000 0.1000 417.45 PSO2 Best 0.1615 0.5092 0.4967 0.5619 0.5142 0.5464 0.1000 0.1095 1.3079 0.5193 0.1000 0.1000 1.7427 0.5185 0.1000 0.1000 381.91 PSO2 Worst 0.1606 0.5177 0.3333 0.5592 0.4868 0.5223 0.1000 0.1000 1.3216 0.5065 0.1000 0.1000 2.4977 0.4833 0.1000 0.1000 384.62 PSO3 Best 0.1564 0.5553 0.4172 0.5164 0.5194 0.5217 0.1000 0.1000 1.3278 0.4998 0.1000 0.1000 1.8992 0.5108 0.1000 0.1000 379.88 PSO3 Worst 0.1568 0.5500 0.3756 0.5449 0.5140 0.4948 0.1000 0.1001 1.2760 0.4930 0.1005 0.1005 2.2091 0.5145 0.1000 0.1000 381.17 Zhou & Rosvany, 1993 0.1571 0.5356 0.4096 0.5693 0.5067 0.5200 0.100 0.100 1.2801 0.5148 0.1000 0.1000 1.8973 0.5158 0.1000 0.1000 379.66 Venkayya, 1971 0.161 0.557 0.377 0.506 0.611 0.532 0.100 0.100 1.246 0.524 0.100 0.100 1.818 0.524 0.100 0.100 381.20 Erbatur, et al., 2000 0.155 0.535 0.480 0.520 0.460 0.530 0.120 0.165 1.155 0.585 0.100 0.100 1.755 0.505 0.105 0.155 385.76 Table 11. 72-Bar Truss Optimization Results 7. Summary and Conclusions Particle Swarm Optimization is a population-based algorithm, which mimics the social behaviour of animals in a flock. It makes use of individual and group memory to update each particle position allowing global as well as local search optimization. Analytically the PSO behaves similarly to a traditional line-search where the step length and search direction are stochastic. Furthermore, it was shown that the PSO search strategy can be represented as a discrete-dynamic system which converges to an equilibrium point. From a stability analysis of such system, a parameter selection heuristic was developed which provides an initial guideline to the selection of the different PSO setting parameters. Experimentally, it was found that using the derived heuristics with a slightly larger cognitive pressure value 392 Swarm Intelligence: Focus on Ant and Particle Swarm Optimization leads to faster and more accurate convergence. Improvements of the basic PSO algorithm were discussed. Different inertia update strategies were presented to improve the rate of convergence near optimum points. It was found that a dynamic update provide the best rate of convergence ove