Download pptx - Genetic Algorithms

Transcript

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.

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

CodingInteger variables are easily coded as they are or converted to binary digitsReal variables require more care

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

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 sequenceNatural coding: (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

Initial populationRandom number generator usedTypical function call is rand(seed)Seed 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.

FitnessAugmented 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-rankWhat is the advantage of rank based objective?

Roulette wheel selectionExample fitnesses

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 crossoverHitchhiking problemUniform crossover Random crossover for real numbersMulti-parent crossover

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

Differential evolution (Wikipedia)Initialize m designs with n real numberRepeat the following:Crossover: For each design xfind three other random unique designs a,b,c to combine with y=y(x,a,b,c).For each design variable make a decision based on random number whether to leave alone or combine.Replacement: If y is better than x replace the x with y.

Combination details

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 randomness on purpose into the selection procedure. Why do we do that with GAs?

ReliabilityGenetic algorithm is random search with random outcome.Reliability r can be estimated from multiple runs for similar problems with known solutionVariance 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

Pareto Trade-off curve

($)(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.99333333330.97666666670.98333333330.863333333310.97666666670.98333333330.893333333310.980.98666666670.9110.98333333330.99333333330.926666666710.990.99666666670.933333333310.99333333330.99666666670.95110.99666666670.951110.95666666671110.971110.97333333331110.97666666671110.981110.98333333331110.98333333331110.98333333331110.98666666671110.9866666667111

GAhalfrankrankhalfanalysesreliabilityall zero-basic algorithms

Sheet1analysesGAhalfrankrankhalf102000003000004000005000006000.00333333330.00333333330.0066666667700.00333333330.010.00666666670.02800.00666666670.030.010.0333333333900.010.05666666670.020.06666666671000.010.130.03333333330.11333333331100.01333333330.22333333330.080.171200.02333333330.310.13333333330.231300.03333333330.43666666670.18333333330.281400.050.560.22666666670.341500.05333333330.650.29666666670.44333333331600.06666666670.70666666670.370.521700.09666666670.75666666670.440.59333333331800.120.830.53333333330.681900.190.86666666670.59666666670.75333333332000.21666666670.880.640.782100.28333333330.90666666670.70333333330.83333333332200.360.92666666670.770.86666666672300.40666666670.940.80333333330.89333333332400.43333333330.95333333330.83666666670.91333333332500.48333333330.96333333330.87333333330.92666666672600.530.97333333330.890.93333333332700.60.97666666670.91666666670.94666666672800.650.980.930.96333333332900.68666666670.98333333330.940.96333333333000.71333333330.98666666670.950.96666666673100.73333333330.990.95333333330.96666666673200.790.99333333330.960.97333333333300.81666666670.99333333330.970.983400.85333333330.99333333330.97666666670.98333333333500.863333333310.97666666670.98333333333600.893333333310.980.98666666673700.9110.98333333330.99333333333800.926666666710.990.99666666673900.933333333310.99333333330.99666666674000.95110.99666666674100.951114200.95666666671114300.971114400.97333333331114500.97666666671114600.981114700.98333333331114800.98333333331114900.98333333331115000.98666666671115100.9866666667111

Sheet10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

GAhalfrankrankhalfanalysesreliabilityall zero-basic algorithms

Sheet2

Sheet3