A Genetic Algorithm for Engineering Optimisation

所需积分/C币:9 2018-12-23 4.12MB PDF

遗传算法用于工程寻优。遗传算法(Genetic Algorithm)是模拟达尔文生物进化论的自然选择和遗传学机理的生物进化过程的计算模型,是一种通过模拟自然进化过程搜索最优解的方法。
Contents 1 Introduction tO bianca 1.1 Capabilities of BIaNCA 1.2 Background and mathematical formulations 1. 3 General features of bianca 1.4 The structure of the individual's genotype 1.5 Encoding/decoding of the variables 12 2 biANca tutorial 2. 1 Compiling bianCa 15 2. 2 Running BiAnCa 2.3 Inputs tO Bianca 2.3.1 Genetic paraneters 16 2.3.2 Optimisation parameters 18 2.3.3 The library. imp file 24 2.3.4 The post processing. inp file 8 2.4 Outputs from bianca 0 2.4.1 The bio output file 30 2.4.2 The mon output file 31 2.4.3 The sta output file 33 2.5 The macro MACRo MY PROblEM. f95 234 2.5.1 The my problem subroutine 35 2.5.2 The my_problem var subroutine 2.6 Structure of the interface with external codes in bianca 37 2.6.1 The input file from bianca to the external code 2.6.2 The output file from the external code to BIANCA 4 3卫 xamples 3. 1 Test function example 3.2 Library function example 51 3. 2.1 Fixed number of chromosomes/plies 51 3.2.2 Variable number of chromosomes/plies 4 CONTENTS 3.3 User-defined model example 61 3.4 Example of interface with MATLAB code 3.5 Exanple of interface with ANSYS( code 3.6 Exanple of interface with ABAQUS code 3.7 Example of interface with CAST3M code Bibliography 86 Chapter 1 Introduction tO blaNCA 1.1 Capabilities of BIaNCA The genetic algorithm(GA) BIANCA 3. 1 is a multi-population Ga able to deal and solve constrained and unconstrained hard combinatorial optimisa tion problems in engineering. The effectiveness and robustness of BIANCA reside upon the generality and richness in the representation of the informa- tion, and on the way the information is extensively exploited during genetic operations. For more details see 1, 2 In its previous version, bianca was a ga substantially based on the principles of the standard GA, see Fig. 1.1. Nowadays, BIANCA is a power ful modular numerical tool, able to deal with general problems of engineering optimisation. The version 3. 1 of bianCa tool-kit provides a fexible, exten- sive interface between the user simulation code and a variety of iterative methods and strategies Moreover. the version 3.1 of the code goes beyond the structure of the standard GA: this version. in fact, is able to let evolve individuals and species at the same time: this is an important feature that makes bianca able to deal with optimisation problems concerning modular systems/structures such as composite plates or shells, stiffened panels and so on. Optimising modular systems with variable number of modules using a Ga corresponds to the evolution of a population where individuals/points belonging to differ ent species are mixed. The most part of standard gas are not able to deal with such problems. For a deeper insight the matter see 3, 4 BIANCA is written in FORTRAN language 6 ChAPTER 1. INTRODUCTION TO BIANCA I REPRODUCTIO INITIAI ADAPTATION POPULATION Filnessevall?lion (I SELECTION I CROSS-OVER Mixim rare Rar dom extraction of the individuals Making parents couples ger otype EST STOP I MUTATION NDIVDUAT CRITERI GENERATION Stochastic alteration of Final population's ON individual's genoty pe average adaptation Figure 1.1: Standard Ga's scheme 2 Background and mathematical formula tions A general optimization problem is formulated as follows mn(Ⅹ 92(x)<0 O h,(x)=0 where vectors and matrix terms are marked in bold typeface. In this formu- lation x is the n-dimensional veclor/ design variables, while xL and xu are the nl-dimensional vectors representing the lower and upper bounds of the design variables, i.e. the design space. Design variables can be of different type: continuous, regular discrete, scattered discrete or grouped The optimisation goal is to minimize the objective function f(x)subject to a given number of constraints: 9i (x)is the r-dimensional vector of inequality constraints, while h;(x)is the m-dimensional vector of equality constraints The optimization problem type can be characterized both by the types of constraints present in the problem and by the linearity or non-linearit of the objective and constraint functions. A problem where at least some of the objective and constraint functions are non-linear is called a non-linear programming(NLPP)problem. These NLPP problems predominate in en- gineering applications and are the primary focus of BIANCA 3.0 In bianca the equality and inequality constraints are treated by means a particular strategy which is based on the combination between classi 1. 2. BACKGROUND AND MATHEMATICAL FORMULATIONS cal penalisation methods and the exploitation of the distributed information over the population along the generations. The name of this technique is ADP, which stands for Automatic Dynarnic Penalisation Classical penalisation methods transform Eq (1. 1) into an unconstrained op timisation problern through the definition of a new nodified objective func F(x) min F(X if 9k(x)<0k=1 and hi(x)=0 j=1, F(x) x+ ACk(x)+∑(x)9(x)>0k antb3(x)≠0=、少 In Eq (1.2)Ch and ri are the penalisation coefficients for inequality and equal ity constraints respectively. The quantities Gk(x)and IL;(x)are defined as GK(x)=max[0, gh(x) k=1 H1(x)=max0,|h2(x)|-j=1,…,m In Eq(1.)and(1.3) the equality constraints have been transformed into inequality constraints having the form h;(x)I<E. Concerning the param eters Ch and ri, in classical penalisation methods, the user must set their values to an appropriate level in order to ensure the search of solutions for the optimisation problem to be forced within the feasible domain. Neverthe less, the choice of these coefficients is very difficult and it is common practice to estimate their values by trial and error. Moreover, it could be useful to ad ust penalisation pressure along the generations by tuning these coefficients but this is directly linked on a guess or on a deep knowledge of the nature of the optimisation problem by the user The idea of the ADP is that it is possible to exploit the information re- strained in the population, at the current generation, in order to guide the search in the case of constrained optimisation problem. Generally, in the first generation the population is generated randomly. With high probabil- ity the individuals are evenly distributed over both feasible and unfeasible domain and the corresponding values of objective functions and constraints can be used to estimate an appropriate level of penalisation, i. e. the values of penalisation coefficients Ck and ri. At the current generation, inside the population it is possible to separate feasible and unfeasible individuals and ChAPTER 1. INTRODUCTION TO BIANCA it is also possible classify each group in terms of increasing values of the ob jective function or constraint violation. The first individual in each group is the best candidate to be solution of the optimisation problen on the feasible and unfeasible side of the donain, respectively. One possible definition of the penalisation coefficients is the follow f F NF NF k=1 P N (1.4) N上 In Eq (1.4)the coefficients Ck and r; are evaluated at the current generation . while the apexes F and NF stand for feasible and non-feasible respectively It is clear that the estimation of penalisation coefficients, according to the Eq(1.4), can be repeated at each generation, thus tuning the appropriate penalisation pressure on the current population. The main advantages of this approach are substantially two: first of all this procedure is automatic because the ga can automatically calculate the values of the pena isation coefficients, secondly the method is dynamic since the evaluation of the pe- nalisation level is updated at each generation 3 General features of bianca The version 3.1 of bianca shows several original features. As well as the previous version, one of the main features is the decomposition of the ga in a certain number of macros: it is possible to assembly them in various ways in order to suit many different optimisation problems and also to test and compare the effectiveness of different numerical strategies. In this sense BIANCA is a bunch of genetic tools which the user can use as bricks to build up several gas Another important feature of BIANCA is the representation of the infor- mation which is rich and detailed, but also non redundant. The biological metaphor in GAs is a simple but powerful mean to return the richness and completeness of information linked to design variables. The information re strained in the population along the generation is treated in a peculiar man ner in such a way to allow a deep mixing of the individuals' genotype b means of the reproduction operators, i.e. cross-over and mutation, which act on every single gene of the individuals. For a deep insight the matter see 2 In order to allow the reproduction phase among individuals belonging to different species, in BiaNCa 3. 1 the structure of the individual and, con 1.3. GENERAL FEATURES OF BIANCA sequently, the representation of the information as well as the reproduction operators of cross-over and mutation have been modified in order to deal with the optimisation problen of nodular systems. We have introduced new genetic operators in BIAnCa 3. 1 for crOss-over and mutation of individuals belonging to different species BIANCA 3. 1 has the following qualities objective function evaluation: a library of functions corresponding to objective and constraint functions of different optimisation problems in addition in bianca the user can write its model by means of a special macro: e fitness evaluation: several choices are available for fitness evalulation depending on the kind of problem, i. e. minimisation or maximisation and on the selection pressure that the user decides to introduce. The fitness is evaluated in such a way that the fitness function can assume all the possible values in the range 0 1 e selection: two known techniques of selection are included, i. e. roulette wheel、 tournament; standard genetic operators: the main genetic operators are cross-over and mutation, applying with a certain probability on each gene of the individuals genotype additional genetic operators: elitism operator which preserve the best individual during each generation handling constraints: automatic dynamic penalisation method for han ing constraints handling multiple populations: the need to simultaneously explore dif- ferent regions of the design space, as well as the search of optima. re- sponding to distinct design criteria led us to introduce the option of working with multiple populations in BIANCA. Moreover, a migration operator has been introduced in order to allow exchanges of informa tions between populations evolving through parallel generations. This migration operator is the classical ring type stop criterion: maximum number of generations reached or test of con vergence, i.e. no improvements of the mean fitness of the population after a given number of cycles 10 ChAPTER 1. INTRODUCTION TO BIANCA new genetic operators: to deal with the problem which considers the mumber of variables among the optimisation variables, as in the case of nodular systems, new genetic operators have been developed, such as the chromosome shift operator, the chromosome r'eor'der operator, the chromosome addition/deletion operator. These new operators modify the reproduction phase allowing the reproduction among individuals of different species, see 3 e interface with external software: if the model to be optimised is written in an external environment, it is possible to call it by bIanca 3.1 in order to evaluate the objective function and constraints, and then to pass the design variables to the model. The logical scheme of the structure of the interface is shown in Fig. 1.2 post-processing of results: graphical results concerning the trend of the best feasible solution and the average value of the objective function along the generation are obtained through the creation of a. m file (by means of MATLABR environmen ) that reads the output files of bianCa 3.1 Definition of ia bl arameters objective and EXT SOFTWARE I constraints functions L (mathematical values model) Figure 1.2: Logical scheme of the structure of the interface with external software in bianca

立即下载 最低0.43元/次 身份认证VIP会员低至7折
举报 举报 收藏 收藏

关注 私信 TA的资源