# Genetic Algorithms

• View
50

1

Embed Size (px)

DESCRIPTION

Genetic Algorithms. Genetic algorithms imitate natural optimization process, natural selection in evolution. D eveloped by John Holland at the University of Michigan for machine learning in 1975. Similar algorithms developed in Europe in the 1970s under the name evolutionary strategies - PowerPoint PPT Presentation

### Text of Genetic Algorithms

Slide 1

Genetic AlgorithmsGenetic algorithms imitate natural optimization process, natural selection in evolution.Developed by John Holland at the University of Michigan for machine learning in 1975.Similar algorithms developed in Europe in the 1970s under the name evolutionary strategiesMain difference has been in the nature of the variables: Discrete vs. continuousClass is called evolutionary algorithmsWill cover also differential evolution.Applied to laminate design beginning in the 1990s.

Basic SchemeCoding: replace design variables with a continuous string of digits or genesBinaryIntegerRealPopulation: Create population of design pointsSelection: Select parents based on fitnessCrossover: Create child designs Mutation: Mutate child designs

Genetic operatorsCrossover: portions of strings of the two parents are exchangedMutation: the value of one bit (gene) is changed at randomPermutation: the order of a portion of the chromosome is reversedAddition/deletion: one gene is added to/removed from the chromosome

Select parentsAlgorithm of standard GACreate initialpopulationCalculatefitness401003070Create children

Coding integer variablesDone directly or via binary representation.For example, in fun optimization problem we had four jobs, with design variables ranging inThe optimum choice of tasks could be coded as [2/0/50/8] or as [000010,00000,110010,01000] (but with no commas).

Coding Real variablesReal variables require more care

Key question is resolution or intervalThe number m of required digits found from

If every x varied in [0,1], what are the increments?

Differential evolution (Wikipedia)Initialize all designs in n dimensional space with random positions. Repeat the following:Crossover: For each design, find three other random unique designs to combine with.For each design variable make a decision based on random number whether to leave alone or combine.Replacement: If new design is better than old design replace the old with the new.

Stacking sequence optimizationFor many practical problems angles limited to 0-deg, 45-deg, 90-deg.Ply thickness given by manufacturerStacking sequence optimization a combinatorial problemGenetic algorithms effective and easy to implement, but do not deal well with constraints

Coding - stacking sequenceBinary coding common. Natural coding works better. (00=>1, 450=>2, - 450=>3, 900=>4) (45/-45/90/0)s => (2/3/4/1) To satisfy balance condition, convenient to work with two-ply stacks (02=>1, 45=>2, 902=>3) or (45/-45/902/02)s => (2/3/1) To allow variable thickness add empty stacks (2/3/1/E/E)=> (45/-45/902/02)s Permutation coding may be used when number of plies is given

Coding - dimensionsBinary coding most common. Real number coding possible but requires special treatement. Trinary coding used in one example.Genetic algorithm not effective for getting high precision. It is better to go for coarse grid of real values. With n binary digits get 2n values.Segregate stacking sequence and geometry chromosomes.

Initial populationRandom number generator usedTypical function call is rand(seed)In Matlab rand(n) generates nxn matrix of uniformly distributed (0,1) random numbersSeed updated after call to avoid repeating the same number. See Matlab help on how to change seed (state).Need to transform random numbers to values of alleles.

FitnessWhen defining fitness we wantLow objective function (e.g. mass) Penalty for violating constraints.Bonus for margin in constraint satisfaction.Augmented objective f*=f + pv-bm+sign(v) .v = max violation m = min marginRepair may be more efficient than penaltyFitness is normalized objective or ns-1-rank

SelectionRoulette wheel and tournament based selectionIn tournament selectionSelect randomly two designsTake the better one as first parentRepeat to select second parentWith roulette wheel bias towards better designs is implemented by larger portion of roulette wheel.No twin rule.

Roulette wheelExample fitnesses [0.62,0.60,0.65,0.61,0.57,0.64]

Single Point CrossoverParent designs [04/452/902]s and [454/02]s

Parent 1 [1/1/2/2/3]Parent 2 [2/2/2/2/1]One child [1/1/2/2/1]That is: [04/452/02]s

Other kinds of crossoverMultiple point crossoverUniform crossover and hitchhiking problemBell-curve crossover for real numbersMulti-parent crossoverComplex crossovers for permutation coding

Mutation and stack swap[1/1/2/2/3]=> [1/1/2/3/3][04/452/902]s => [04/45/904]s

[1/1/2/2/3]=> [1/2/1/2/3][04/452/902]s => [(02/45)2/902]s

Questions Global optimization balances exploration and exploitation. How is that reflected in genetic algorithms?What are all possible child designs of [02/45/90]s and [452/0]s that are balanced and symmetric?When we breed plants and animals we do not introduce on purpose into the selection procedure. Why do we do that with GAs?

ReliabilityGenetic algorithm is random search with random outcome.Reliability is defined as the fraction of runs that arrived at the global optimum with some predetermined tolerance.It can be estimated from multiple runs for similar problems with known solutions.Variance of reliability, r, from n runs

Reliability curves

Multi-material laminateMaterials: one material = 1 lamina ( matrix or fiber materials)E.g.: glass-epoxy, graphite-epoxy, Kevlar-epoxyUse two materials in order to combine high efficiency (stiffness) and low costGraphite-epoxy: very stiff but expensive; glass-epoxy: less stiff, less expensiveObjective: use graphite-epoxy only where most efficient, use glass-epoxy for the remaining pliesNumbers for weight, cost, Multi-criterion optimizationTwo competing objective functions: WEIGHT and COSTDesign variables: number of pliesply orientationsply materialsNo single design minimizes weight and cost simultaneously: A design is Pareto-optimal if there is no design for which both Weight and Cost are lowerGoal: construct the trade-off curve between weight and cost (set of Pareto-optimal designs)Material propertiesGraphite-epoxyLongitudinal modulus, E1: 20.01 106 psiTransverse modulus, E2: 1.30 106 psiShear modulus, G12: 1.03 106 psiPoissons ratio, 12: 0.3Ply thickness, t: 0.005 inDensity, : 5.8 10-2 lb/in3Ultimate shear strain, ult: 1.5 10-2Cost index: \$8/lbGlass-epoxyLongitudinal modulus, E1: 6.30 106 psiTransverse modulus, E2: 1.29 106 psiShear modulus, G12: 6.60 105 psiPoissons ratio, 12: 0.27Ply thickness, t: 0.005 inDensity, : 7.2 10-2 lb/in3Ultimate shear strain, ult: 2.5 10-2Cost index: \$1/lbMaterial propertiesCarbon-epoxyGlass-epoxyE1 (psi)20.01 x 1065.7 x 106E2 (psi)1.30 x 1061.24 x 106G12 (psi)1.03 x 1060.54 x 106120.30.28 (lb/in3)0.0580.076Cost (lb-1)81-2Thickness (in)0.0050.0051lim0.010.022lim0.010.0212lim0.0150.025

Source: http://composite.about.com for the stiffnesses, Poisson's ratios and densitiesMethod for constructing the Pareto trade-off curveSimple method: weighting method. A composite function is constructed by combining the 2 objectives:

W: weightC: cost: weighting parameter (01)A succession of optimizations with varying from 0 to 1 is solved. The set of optimum designs builds up the Pareto trade-off curve

Talk about how constraints are enforcedMulti-material Genetic AlgorithmTwo variables for each ply:Fiber orientationMaterialEach laminate is represented by 2 strings:Orientation stringMaterial stringExample:[45/0/30/0/90] is represented by:Orientation:45-0-30-0-90Material: 2-2-1-2-1GA maximizes fitness: Fitness = -F1: graphite-epoxy2: glass-epoxySimple vibrating plate problemMinimize the weight (W) and cost (C) of a 36x30 rectangular laminated plate19 possible ply angles from 0 to 90 in 5-degree stepConstraints:Balanced laminate (for each + ply, there must be a - ply in the laminate)first natural frequency > 25 HzFrequency calculated using Classical Lamination TheoryHow constraints are enforcedGAs do not permit constrained optimizationBalance constraint hard coded in the strings: stacks of are usedExample: (45-0-30-25-90) represents [45/0/30/25/90]sOther constraints (frequency, maximum strain) are incorporated into the objective function by a penalty, which is proportional to the constraint violation

>0: penalty parameter, g: constraint

(\$)(lb)A (16.3,16.3)B (5.9,55.1)Cpoint C64% lighter than A; 17% more expensive53% cheaper than B; 25% heavierTalk about non-dominated pointsOptimum laminatesCost minimization: [5010/0]s, cost = 16.33, weight = 16.33Weight minimization: [505/0]s, cost = 55.12, weight = 6.89Intermediate design: [502/505]s, cost = 27.82, weight = 10.28Glass-epoxy in the core layersto increase the thicknessGraphite-epoxy as outer pliesfor a high frequencyMidplaneIntermediate optimum laminates:sandwich-type laminates

Chart110101010000000000000000000.00333333330.00333333330.00666666670.00333333330.010.00666666670.020.00666666670.030.010.03333333330.010.05666666670.020.06666666670.010.130.03333333330.11333333330.01333333330.22333333330.080.170.02333333330.310.13333333330.230.03333333330.43666666670.18333333330.280.050.560.22666666670.340.05333333330.650.29666666670.44333333330.06666666670.70666666670.370.520.09666666670.75666666670.440.59333333330.120.830.53333333330.680.190.86666666670.59666666670.75333333330.21666666670.880.640.780.28333333330.90666666670.70333333330.83333333330.360.92666666670.770.86666666670.40666666670.940.80333333330.89333333330.43333333330.95333333330.83666666670.91333333330.48333333330.96333333330.87333333330.92666666670.530.97333333330.890.93333333330.60.97666666670.91666666670.94666666670.650.980.930.96333333330.68666666670.98333333330.940.96333333330.71333333330.98666666670.950.96666666670.73333333330.990.95333333330.96666666670.790.99333333330.960.97333333330.81666666670.99333333330.970.980.85333333330.9

Documents
Documents
Documents
Documents
Education
Documents
Documents
Documents