Genetic Algorithims in Engineering

Embed Size (px)

Citation preview

  • 8/13/2019 Genetic Algorithims in Engineering

    1/6

    Engineering Design Optimizationwith Ge hmsRichard H. DingerPrincipal Engineer

    The Boeing CompanySeattle, Wa. 98124, US(425) 234-7545 richard. h dingeraboeing com

    P. 0 BOX3707 MI 67 FJ

    Engineers design systems by searchingthrough the large number of possiblesolutions to discover the best specificsolution. The search process is oftentime consuming and expensive. But byexploiting the natural processes that bio-logical systems use to evolve and adapt,design engineers can often quickly solveotherwise difficult design problems thatresist solution by traditional optimizationmethods. This paper explains the basictechnique of the genetic algorithm andshows how design engineers can use agenetic algorithm to solve real design en-gineering problems.This paper focuses on explaining how ge-netic algorithms work. A brief example atthe end demonstrates how the practicingengineer can use this powerful techniqueto solve real world problems in engineer-ing design. The example structural de-sign problem uses a genetic algorithm tominimize the weight of a pin jointedframe, but the genetic algorithm can beapplied to almost any type of designproblem. Some more basic theoreticalreferences are provided at the end forthose interested in a more rigorous expla-nation of the details of genetic algorithms.Basic Optimization TerminologyI am providing some informal definitionsfor a few basic optimization terms in or-der to ensure that everyone has a com-

    mon understanding of the discussion.These are not rigorous definitions, butshouM be adequate for the working de-sign engineer. Only basic terms arepresented here to get the discussionmoving; other more specific terms relat-ing to genetic algorithms are introducedas needed throughout the remainder ofthis paper.Optimization refe to a goal directedsearch for the best solution to a prob-lem. The idea of what is best must bedefined by the engineer and is al-ways problem c. Minimizing theweight by seek lightest structure isan example of an optimization problem.Optimization problems seek either theminimum or the maximum of some prob-lem specific property or set of properties,but multiple goals or objectives are notuncommon.The objective function is the design engi-neer's numerical representation of thegoal in the optimization problem. Whenthe objective is to minimize, the term costfunction is sometimes used. Genetic al-gorithms, however, use the term fitnessfunction instead of objective function andthat is the term used in this paper.Decision variables are the indepevariables in the optimization problem thatthe design engineer manipulates whilesearching for the optimum solution. Forexample, the design engineer might se-

    0-7803-5075-8/98/ 10.00 1998 IEEE. 114

  • 8/13/2019 Genetic Algorithims in Engineering

    2/6

  • 8/13/2019 Genetic Algorithims in Engineering

    3/6

    pears to be completely random. Thisappearance of randomness may becaused by incomplete knowledge of theparameters that control the fitness func-tion or the problem couid truly be ran-dom. In either case the fitness functionappears to have no consistent relation-ship with the decision variables. The ran-dom problem is sofved by a completeexploration of the solution space. Themethod is referred to as complete enu-meration.The complete enumeration method, whileeffective, is seldom practical. Even withthe low cost of modern computers, thecomputational cost for this exhaustivesearch is very high for ail but the simplestproblems. Most real world problemshave many decision variables. Since thesearch space is the Cartesian product ofall the decision variables, the searchspace becomes enormous for any non-trivial exhaustive search.And if the problem of dimensionalityweren't bad enough, most real worldproblems are not integer valued prob-lems. To exhaustively search for thebest real number means the design engi-neer must decide how fine a granularityto use in the search. For example tosearch between 20 and 25, should youincrement trials by 0.5, or 0.1, or 0.01 orare even finer gradations required? Mak-ing the search step size too large maycause you to miss a better solution, whilemaking the step size too small maywaste computing resources by needless-ly prolonging the search. The design en-gineer must make all these decisionsbefore the search is undertaken.Between these two extremes of the wellbehaved and the random fitness functionlies the real world problem. The real opti-mization problem may be discontinuousat several points and is often discontinu-ous at the global optimum because of a

    constraint. The real optimization problemmay not be differentiable, may havemany relative optimums, and may beary conditions. Brandom; searching

    and adapt through

    the more tradit

    odes the valuesabies in a stringThe encoding an

    can be thought of as a gene in thechromosome.Second, the genetic algorpopulation of individuals tosearch. Each individual repossit.desolution to the problem.dividual's chromosome encodesof decision variables and so results in asingle point in the solution space.Third, evaluation of seabased on fitnesssearch focused actual objectivethe design engineer is seeking riv-atives are not used srivative calculation isderivatives are not usednot affected by disconti

    116

    http://possit.de/http://possit.de/
  • 8/13/2019 Genetic Algorithims in Engineering

    4/6

    Fourth, the genetic algorithm is not a ran-dom search method, but it does use ran-dom processles to transition from onesearch state to another. The randomprocesses give genetic algorithms a goodbalance between wide exploration of thesearch space and exploitation of fitnesslandscape features. Recall that enumer-ation techniques are very good at explo-ration, but do not exploit local features.Hill-climbing methods, however, are verygood at exploitation, but do not explorethe entire search space.The genetic algorithm uses the selection,recombination, and mutation operatorson the population of individuals to per-form the search. The population is ran-domly created at the start of the search.Fitness is used to select individuals fromthe current generation to advance intothe next generation. These individualsare recombined and possibly mutated toform the next generation. This process iscontinued until there is no change in thebest individual in the population.Selection begins by determining the rela-tive fitness of each individual by calculat-ing the individual's fitness divided by thetotal fitness of the entire population.Then a cumulative fitness is calculatedfor each individlual as the sum of the rela-tive fitness for all members up to the onebeing calculated. The cumulative fitnessis thereby normalized over the entire pop-ulation to a maximum of 1.0 for the lastindividual.The population can be thought of asforming a roulette wheel with slots proportional to that individual's fitness rela-tive to the rest of the population. Arandom number between 0 and 1.0 isgenerated next and the individual with thecumulative fitness that bounds the ran-dom value is selected. This selectionprocess continues until a new populationis formed. In general, those individuals

    with higher fitness values are more likelyto be selected, but there is an element ofrandom choice also. Similarly, multipleindividuals that have the same chromo-some and hence the same fitness willalso have a better chance of being se-lected.Once the new population of individuals isselected recombination begins. The ge-netic algorithm moves through the pop-ulation by pairs and randomly determinesif each individual pair will be recombined.If that is the case, a random point alongthe pair of chromosomes is selected andthe remainder of each chromosome tothe right of the selection point is swappedbetween the two chromosomes. Twonew individuals are formed, which are arecombination of the genes in the originaltwo chromosomes.Finally, each gene of each chromosomeof each individual may be randomly mu-tated in order to introduce additional di-versity in the population. The probabilityof a mutation is generally low, but the de-sign engineer can control this and all oth-er probabilities to fine tune the searchprocess.Since most real world problems haveconstraints, the genetic algorithm needsa mechanism for applying problem con-straints. A penalty function is an easyway to constrain the behavior of the fit-ness function to the feasible region byapplying a penalty for violating a problemconstraint. A penalty function reducesthe value of the fitness function when aconstraint is violated. A good penaltyfunction drops the value of the fitnesssharply at the constraint boundary form-ing a cliff in the fitness landscape. Recallthat discontinuities do not bother the ge-netic algorithm so the sharper the edge ofthe cliff the better.Good results can be obtained by reduc-ing the unconstrained fitness value with a

    117

  • 8/13/2019 Genetic Algorithims in Engineering

    5/6

    Initial Structure Final Structure

    penalty that increases exponentially asthe constraint violation increases. Theviolation squared can be subtracted fromthe value of the fitness function or the fit-ness can be multiplied by:

    Since the genetic algorithm uses randomprocesses to transition from one genera-tion to the next, the genetic algorithm isnot deterministic. That is to say it is un-likely the same answer will be obtained inany two attempts with the same problem.The answer will be the best that the ge-netic algorithm can find. The genetic al-gorithm does explore broadly, however,and exploits the fitness landscape to finda very good solution.A Simple StructuresExampleThe genetic algorithm was tested by mini-mizing the weight of several simple canti-lever trusses such as the seven membertruss shown in the figure. The geneticalgorithm obtained similar results foreach case. The results of the seven

    member example are explained here indetail.A simple finite element analysis programwas driven by the genetic algorithm toanalyze the example structures. Thesame material properties were used forall members, but a combets allowable load was limited to halfthat of a tension member's.The cross sectional areasmembers were selected as the designproblem decision variables. The struc-ture was assumed to be pin jointed, sobending was not sidered in the testproblems. Allowa ember loads werethe constraints on the test problem.When any member's internal load exce-eded either the tension or compressionallowable value, the fitness was reducedby an exponential penalty funA population of 50 individuals was used.The probability of r0.80 and the probabili0.06. Member cross sencoded to range highthat at least one feasible solution existed.The initial solution indicated that member4 in the figure was not needed and it

    118

  • 8/13/2019 Genetic Algorithims in Engineering

    6/6

    could be removed from the structure.This was indicated by the genetic algo-rithm setting thie cross section area tonearly zero. The member was then re-moved from the structural model and theproblem run again.The subsequent analysis indicated thatmember 2 could be removed for thesame reason that member 4 was re-moved earlier. Removing memberwould, however, double the unrestrainedlength of the lower chord and couldcause buckling problems. The lowerchord of the truss was not analyzed forcolumn buckling in this model.If members 2 and 4 are removed an ex-act optimum can be found analytically,since no redundant members exist. Theinitial solution with all seven members inthe truss was within ten percent of thetrue optimum. These same results wererepeated with more complex structures.Although the genetic algorithm does notguarantee an optimum solution it certain-ly does a good job of getting close to theoptimum.ConclusionsThe genetic algorithm has some powerfuladvantages over both the classical hill-climbing method and the complete enu-meration method. First the genetic algo-rithm provides a good balance of bothexploitation and exploration of the searchspace. That means solutions are ef3-cient yet full exploration of the entirespace is provided so the solver is less

    likely to hang up on a local relative opti-mum.Second the genetic algorithm has no fearof a discontinuity in the solution space.The problem can be mathematicallymessy--the hallmark of many real worldproblems. The design engineer does notneed to create elaborate mathematicalfictions, however, to fool the solver intothinking the actual problem is well be-haved.Finally, the genetic algorithm seeks thevery good solution, rather than the verybest solution. This is actually a strengththat prevents the genetic algorithm frommyopically falling into holes in the mathe-matics or getting stuck on top a local hotspot.The next time you are confronted with anelaborate optimization problem in designengineering give the genetic algorithm atry. The more ill behaved the problemthe better the genetic algorithm seems tolike it.References1. Goldberg, David E. Genetic Algo-rithms in Search, Optimization, and Ma-chine Learning, Addison Wesley, 1989.2 Michalewicz, Zbigniew, Genetic Algo-rithms + Data Structures = Evolution Pro-grams Third Edition, Springer, 1996.Engineering Design Optimization withGenetic Algorithms

    119