Академический Документы
Профессиональный Документы
Культура Документы
PROCESS OPTIMISATION
Dr. R. BALU,
Professor,
Department of Aeronautical Engineering,
Noorul Islam College of Engineering,
Kumaracoil, K K District, TamilNadu, 629180
Optimised Man!
WR21 Schematic
Spiral Recuperator
Effectiveness
maximised
How efficient the heat exchanger is
Volume
minimised
Smaller = lighter & cheaper
minimised
sheet thickness
Fin type
Fin thickness
Fin density
Layer height
Layer arrangement
Number of layers
Components of a Heat
Exchanger
Variable Parameters
Heat Transfer and Fluid Flow Service Handbook Sheet YM12 1992
Variable Parameters
Hot layer height
Cold layer height
hh
th
dh
hc
tc
dc
N
hh
hc
th
tc
dh
dc
N
3 - 20 mm
3 - 20 mm
0.2 - 0.7 mm
0.2 - 0.7 mm
150 m-1 - 1200 m-1
150 m-1 - 1200 m-1
50 - 250 layer pairs
minimised
Fitness
f/((1-)Vrat)
Contribution to chromosome
Variable
hh
hc
th
tc
dh
N
d
c
Whole system
Binary String
11 characters
11 characters
9 characters
9 characters
11 characters
11 characters
8 characters
70 character string
practical GA problems )
2 70 ~ 10 67 possibilities
No. of Nanoseconds in one billion years ~
10 9 x 365 x 86400 ~ 10 16
Fitness as Generations
Advance
100
Fitness
80
60
40
20
0
0
20
40
60
80
100
Generation
Effectiveness
1
0.9
0.8
0.7
0.6
0.5
0
0.25
0.5
Volume Ratio
0.75
- 9.8 mm
- 4.7 mm
- 0.25 mm
- 0.25 mm
- 885 m-1
- 1095 m-1
- 230
NATURES OPTIMISATION
NATURES CREATIONS
NATURES CREATIONS
WHAT IS COVERED ?
OPTIMISTATION
CLASSICAL GRADIENT BASED METHODS
NATURAL EVOLUTION
NATURE TO COMPUTER MAPPING THE
GENETIC ALGORITHM
BASIC INGREDIENTS OF GA
WHY DO GAs WORK ? THE SCHEMATA
THEOREM
GA-170 GA DRIVER SOFTWARE
EXAMPLES OF APPLICATION
GA STRATEGIES - HOW TO MAKE THEM WORK
BETTER
CONCLUSIONS
WIFE OF SATURN
- THE GOD OF TIME
MOTHER OF
JUPITER
- THE GOD OF
POWER
A Fitting patroness of
science of
optimisation
Optimisation
OPTIMISATION
Optimisation Methods
Local Techniques
Global Techniques
Simplex
Genetic Algorithms
OPTIMISATION AN EXAMPLE
Optimisation is at work at all times in our life, knowingly
or unknowingly
Adjusting the focusing knob of an optical instrument
( camera, binocular )
Objective function
Variables
Focal length the lenses
Time of Exposure
Lighting in the environment
Differential Calculus
Function of Single Variable
y = f (x)
max
y -
y y +
y +
y +
min
Directivity Pattern of
An Antenna
Where are we ?
I am at the Valley
2 f( x ) =
( 2 f / x12, 2 f / x1x2, 2 f / x1xN )
( 2 f / x1x2, 2 f / x22, 2 f / x1xN )
(.....)
(..)
( 2 f / xNx1, 2 f / xNx2, ..2 f / xN2 )
f ( x ) = grad ( f ( x ) ) = 0
2 f ( x ) is positive definite for
minimum
is negative definite for
maximum
zero indicates inflection
point
GENERAL OPTMISATION
PROBLEM WITH CONSTRAINTS
Minimise f ( x ) subject to
gj(x)0,
j = 1, 2, 3, .. ...J
Inequality Constraints
hk( x ) = 0 ,
k = 1, 2, 3, ... K
Equality Constrints
KUHN-TUCKER
CONDITIONS
Lagrangian Multiplier Technique is used to convert the constrained
optimisation problem into an unconstrained problem by modifying
the objective function to include the constraints
f ( x ) uj gj(x) - vk hk(x) = 0
with
gj(x)0,
j = 1, 2, 3, .. ...J
Inequality Constraints
h k( x ) = 0 ,
k = 1, 2, 3, ... K
Equality Constrints
uj gj(x) = 0
j = 1, 2, 3, J
uj 0
j = 1, 2, 3, ..J
DARWINIAN HYPOTHESIS
Natural Selection
The
VARIABILITY
At any given time individuals with varying
fitness must co-exist in the population.
Otherwise natural selection has nothing to
operate upon.
A POPULATION OF RABBITS
RABBIT STORY
SOME RABBITS ARE FASTER AND SMARTER
THEY ARE LESS LIKELY TO BE EATEN BY
THE FOX
MORE OF SUCH SMARTER ONES TEND TO
SURVIVE ON AN AVERAGE
THEY TEND TO BREED AMONG
THEMSLEVES AND ALSO AMONG
LESS.SMARTER ONES
RABBIT STORY
IT RESULTS IN A GOOD MIX OF GOOD RABBITS
GENETIC MATERIAL
OF COURSE, EVEN DUMB AND SLOWER ONES
SURVIVE
BECAUSE OF LUCK, AND THEY ALSO MATE AND
BREED
THE OFF-SPRINGS WILL, ON AN AVERAGE, BE
SMARTER AND FASTER THAN THEIR PARENTS IN
ORIGINAL POPULATION BECAUSE ONLY THE
FITTEST SURVIVE WITH MORE PROBABILITY
NATURES PRINCIPLE
BEST INDIVIDUALS REPLICATE AND
MIMICKING NATURAL
EVOLUTION
NATURE PROCESS
Generation
Initial Population
Fitness to Environment
Best ones having high fitness breed randomly
- Variability (at any time individuals of varying fitness coexist)
Next Generation n +1
MIMICKING NATURAL
EVOLUTION
MATHEMATICS
Generation 0
Select feasible sets of independent variables initial population
These are coded as genes (strings of binary / real numbers)
Rank them by the objective function and select the best few
Allow then to breed by crossing their genes at random positions
To introduce variability mutate the strings randomly
COMPUTER
POSSIBLE SOLUTIONS
POPULATION
SET OF SOLUTIONS
FITNESS TO ENVIRONMENT
OBJECTIVE FUNCTION
CHROMOSOME
SELECTION
CROSSS-OVER
MUTATION
EVOLUTION
GA HISTORY
1962 GEP BOX, GJ Fredman, WW Beldman -Evolutionary Algorithms for Optimisation and
Machine Learning
1965 Ingo Rechenberg , University of Berlin,
introduces evolution strategies, a method he
used to optimize real valued parameters for
devices. ( air foils )
GA HISTORY
Genetic algorithms were invented by John
Holland in the 1960s and were later developed by
Holland and his students and colleagues at the
University of Michigan in the 1960s and 1970s.
Hollands 1975 book Adaptation in Natural and
Artificial Systems presented the genetic
algorithms as an abstraction of biological evolution
and gave a theoretical framework for adaptation
under the genetic algorithms.
GA HISTORY
1980s saw many a real-world applications due to
Internet revolution and increase in power of Pcs
Pattern Recogonition
Flow Control Devices
Structural Optimisation
Micro-chips Design
Aerospace Applications
Micro-Biology
PIONEERS OF GA
JOHN HOLLAND ( 1975 )
Digital Biology
Numerical Genetics
STARTING SHAPE
OPTIMISED SHAPE
BASIC
INGREDIENTS OF
GA
GENETIC RERESENTATION OF
INDEPENDENT VARIABLES
METHOD TO CREATE INITIAL
POPULATION
EVALUATION FUNCTION TO RATE
THE FITNESS ( OBJECTIVE
FUNCTION )
GENTIC OPERATORS TO EVOLVE THE
POPULATION TO NEXT GENERATION
CHROMOSOMAL REPRESENTATION
CHROMOSOMAL
REPRESENTATION
THE BINARY STRING
(bn-1bn-2bn-3..b2,b1,b0) is equal to bi 2i i = 0,
1, 2,..N-1
Let this be X
CHROMOSOMAL REPRESENTATION
10010110101101110001010 0101100100010
x1
x2
x3
x4
x5
k =1,2,3..K
GENERATION OF INITIAL
POPULATION
FITNESS EVALUATION
Find Total OBJECTIVE FUNCTION F = f (i)
i=1,2,3.NPOPSIZE
Calculate the probability of selection
according to its own fitness
p(i) = f(i) / F
SELECTION METHODS
ELITIST SELECTION
FITNESS PROPORTIONATE SELECTION
ROULETTE WHEEL SELECTION
SCALING SELECETION
TOURNAMENT SELECTION
RANK SELECTION
GENERATIONAL SELECTION
STEADY STATE SELECTION
HIERARCHIAL SELECTION
SELECTION ROULETTE
WHEEL
0%
0%
25%
25%
7%
7%
3%
3%
11%
11%
38%
38%
adventurous exploration
CROSS-OVER
OPERATION
Decide a cross-over probability Pc
For each chromosome generate a
random number r
If r < Pc select that chromosome for
the cross-over operation
Take a pair of chromosomes from
among the selected pool
CROSS - OVER
Generate a random integer in the range [ 1,2
.m-1 ] Let it be pos
Let the binary representation of the pair selected
be
V(1) = ( b1,b2,b3,..bpos, bpos+1, ..bm) and
V(2) = ( c1,c2,c3,..cpos,cpos+1,.cm )
CROSS-OVER OPERATION
Cross Over Operation is done to the
right of bit bpos and the new strings are
now
V(1) = ( b1,b2,b3,..bpos, cpos+1, ..cm)
V(2) = ( c1,c2,c3,..cpos, bpos+1,.bm )
MUTATION OPERATION
DONE
MUTATION
Generate a random number r
If r < Pm mutate that bit ( 0 to 1 or 1 to 0 )
Now the new population is ready for next
evaluation of fitness
The above operations are done in a cyclic
manner many times ( many generations )
The ultimate population is expected to
contain the best chromosome
( optimum solution ).
SPECIAL GA OPERATORS
Comparisons
Traditional
best guess
may lead to local, not global optimum
Nature
population of guesses
more likely to find a better solution
Comparison
Nature .vs. Computer GA
Nature
MINIMISATION
GA
gi(x) 0
i=1,2,3.m
hj(x) = 0 j=1,2,3,.n
Redefine f(x) as
f(x) = f(x) + r [ gi(x) ] where
EXPLORATION AND
EXPLOITATION
RANDOM SEARCH EXPLORES THE SEARCH
SPACE - IGNORES EXPLOITATION OF
POTENTIAL REGIONS OF POSSIBLE
SOLUTIONS
HILL CLIMBING DOES NOT EXPLORE THE
SEARCH SPACE BUT EXPLOITS THE BEST
SOLUTION FOR IMPROVEMENT
GENETIC ALGORITHMS STRIKE A
REMARKABLE BALANCE BETWEEN
EXPLORATION AND EXPLOITATION
ADVANTAGES OF GA
ADVANTAGES OF GA
DISADVANTAGES OF GA
DISADVANTAGES OF
GA
BEING STOCAHSTIC IN NATURE,
CONVERGNCE IS RATHER SLOW
PROBLEM SPECIFIC SETTING OF
VARIOUS PROBABILITIES ( CROSSOVER MUTATION ETC ) THOUGH
SOM EMPIRICAL RULES ARE
KNOWN
IDEAL POPULATION SIZE IS NOT
EASY TO CHOOSE
HOW GA OPERATES ?
Imagine an army of
parachutists dropping onto
the landscape of a
problem's search space,
with each one being given
orders to find the highest
peak. Small mutations
enable each individual to
explore its immediate
neighborhood, while
selection focuses
progress, guiding the
algorithm's offsprings
uphill to more promising
parts of the solution space.
Cross-over enables
transfer of information
among the parachutists.
GENETIC ALGORITHM
Generatio
n 0
Individual
s
Fitness
Generation
1
Offspring
011
$3
111
001
$1
010
110
$6
110
010
$2
010
000
001
010
011
100
101
110
111
GENERATION - 0
Generation 0
1
011
3
2
001
1
3
110
6
4
010
2
Total
Worst
Average
Best
DARWINIAN FITNESS
PROPORTIONATE SELECTION
Generation 0
1
011
2
001
3
110
4
010
Total
Worst
Average
Best
3 .25
1 .08
6 .50
2 .17
12
1
3.00
6
Mating pool
011
110
110
010
3
6
6
2
17
2
4.5
6
MUTATION OPERATION
Parent chosen probabilistically based on
fitness
Parent
010
Parent
One offspring
--0
Offspring
011
Mating pool
Generation 1
011
.25 011
001
.08 110
110
.50 110
010
.17 010
Total
12
17
Worst
Average
3.00
4.5
Best
---
011
CROSSOVER OPERATION
110
CROSSOVER (CONTINUED)
Interstitial point picked at random
Fragment 1 Fragment 2
0111 2 remainders
Remainder Remainder
1
2
--1
--0
Offspring 1 Offspring 2
111
010
Mating pool
Generation 1
011 3
.25 011
111
001 1
.08 110
010
110 6
.50 110
010 2
.17 010
Total
12
17
Worst
Average
3.00
4.5
Best
Mating pool
011 3
.25
001 1
.08
110 6
.50 110
010 2
.17
Total
12
17
Worst
Average
3.00
4.5
Best
Generation 1
--- 110
GENERATION 1
Generation 0 Mating
pool
1
011 3
.25 011 3
2
001 1
.08 110 6
3
110 6
.50 110 6
4
010 2
.17 010 2
Total
12
17
Worst
1
2
Average 3.00
4.5
Best
6
6
Generation 1
2
2
-----
111
010
110
011
7
2
6
3
18
2
4.5
7
PROBABILISTIC STEPS
GENETIC ALGORITHMS
The genetic algorithm is a probabilistic search
algorithm that iteratively transforms a set
(called a population) of mathematical objects
(typically fixed-length binary character
strings), each with an associated fitness
value, into a new population of offspring
objects using the Darwinian principle of
natural selection and using operations that
are patterned after naturally occurring
genetic operations, such as crossover
(sexual recombination) and mutation.
CHROMOSOMAL REPRESENTATION OF
PARAMETERS
INITIAL POPULATION GENERATION
REPEAT IN A CYCLE
RANKNING BY FITNESS
MATE SELECTION
CROSS-OVER
MUTATION
NEW POPULATION
Typical Chromosome
A Population
Ranking by Fitness
Mate Selection
Crossover
Mutation
Best Design
The GA Cycle
BASIC QUESTIONS
HOW DURING GA - CYCLE
OPERATIONS, WHICH ARE RANDOM IN
NATURE, THE BEST SOLUTION ( BEST
CHROMOSOME) IN EACH GENERATION
ALWAYS SHOWS A TENDENCY TO
MOVE TOWARDS INCREASING FITNESS
( OPTIMUM SOLUTION ) ?
HOW DOES GA MOVE TOWARD
OPTIMUM WITHOUT EVALUATING ALL
POSSIBLE SOLUTIONS ?
BY M.CAROLL CORNELL
UNIVERSITY AEROSPACE ENGG
DEPT
VERSION 1.7 RELEASED IN 2001
CODED IN FORTRAN
USER SPECIFIED SUBROUTINE FUNC
GA170 GA DRIVER
MAIN
ga.inp
CODE
DECODE
CROSOVR
EVALOUT
INPUT
INITIAL
MUTATE
NEWGEN
NICHE
POSSIBL
RAN3
RESTART
SELECT / SELECTN
SHUFFLE
GAMICRO
FUNC
PARAMS
OUTPUT
SINGLE VARIABLE
FUNCTION
LISTING OF SUBROUTINE
c###################################
c SINGLE VARIABLE OPTIMISATION PROBLEM x*x+54/x
c####################################
subroutine func(j,funcval)
implicit real*8 (a-h,o-z)
save
include 'params.f'
dimension parent(nparmax,indmax)
dimension iparent(nchrmax,indmax)
c
dimension parent2(indmax,nparmax),iparent2(indmax,nchrmax)
common / ga2 / nparam,nchrome
common / ga3 / parent,iparent
x1=parent(1,j)
funcval=-(x*x+54/x)
return
end
c##########################################
GA CONVERGENCE
HIMMELBLEAU FUNCTION
2
2
2
2
f x x1 x 2 11 x 2 x1 7
###########################################
c TWO VARIABLE OPTIMISATION PROBLEM
c##########################################
subroutine func(j,funcval)
implicit real*8 (a-h,o-z)
save
include 'params.f'
dimension parent(nparmax,indmax)
dimension iparent(nchrmax,indmax)
c
dimension parent2(indmax,nparmax),iparent2(indmax,nchrmax)
common / ga2 / nparam,nchrome
common / ga3 / parent,iparent
x1=parent(1,j)
x2=parent(2,j)
funcval=(x1**2+x2-11)**2+(x2**2+x1-7)**2
return
end
c##########################################
EXAMPLE FUNCTIONS
SAMPLES LISTING OF
FUNC
C
C
C
C
C
C
IMPLICIT REAL*8(A-H,O-Z)
SAVE
INCLUDE PARAMS.f
DIMENSION parent(nparmax,indmax)
DIMENSION iparent(nchrmax,indmax)
common/ga2/nparam,nchrome
common/ga3/parent,iparent
Define constants
pi=4.*dtan(1.D0)
Redefine parameters from parent array
x1=parent(1,,j)
x2=parent(2,,j)
t1=dsin(4.*pi*x1)
t2=dsin(20.*pi*x2)
compute func val
funcval=21.5+t1*x1+t2*x2
add penalty if any
return
end
F(x1,x2)=21.5+x1sin(4x1)+x2sin(20x2)
THIS FUNCTION HAS ROUGHLY 660 PEAKS AND VALLEYS !!
SAMPLE CHROMOSOME
AND FITNESS
010001001011010000111110010100010
---------- x1 ------------
--------------x2 -------------------
DECODOING
x1 = 1.052426 x2 = 5.755330
INITIAL POPULATION
FITNESS VALUES
V(2)=7.580015
V(15)=30.0603
SELECTION PROBABILITY
CUMULATIVE PROBABILITY
POPULATION AFTER
CROSSOVER
MUTATION OPERATION
FITNESS OF 1 GENERATION
st
V(11)=33.35187
FITNESS OF POPULATION
AFTER 1000th GENERATION
V(11)=35.47793
CONVERGENCE OF
PARAMETERS
ANTENNA DESIGN
ANTENNA DESIGN
The problem (Altshuler and Linden 1998) is to
determine the x-y-z coordinates of the 3dimensional position of the ends (X1, Y1, Z1,
X2, Y2, Z2, , X7, Y7, Z7) of 7 straight wires so
that the resulting 7-wire antenna satisfies
certain performance requirements
The first wire starts at feed point (0, 0, 0) in the
middle of the ground plane
The antenna must fit inside the 0.5 cube
ANTENNA GENOME
X1
Y1
Z1
X2
Y2
Z2
+0010
-1101
+0000
+0010
-0111
+0010
ANTENNA FITNESS
Antenna is for ground-to-satellite
ANTENNA FITNESS
Fitness is sum of the squares of the
U. S. PATENT 5,719,794
Altshuler, Edward
and Derek Linden
2-STRUSS BEAM
2P
t
d
SECTION C-C
C
C
2B
PARAMETERS RANGES
AND CONSTRAINTS
CONSTANT PARAMETERS
LOAD P 33000 UNITS
HALF SPAN B 30 UNITS
THICKNESS 0.1 UNITS
MAXIMUM ALLOWABLE
STRESS 100,000 UNITS
ELASTIC MODULUS 3 x 10 7
UNITS
DENSITY 0.3 UNITS
INDEPENDENT VARIABLES
DIAMETER OF PIPE d
1 d 3
HEIGHT OF THE STRUSS H
10 H 35
CONSTRAINTS
STRESS FORMULAE
YIELD STRESS y
y = P(B2+H2)1/2 / { H t d }
BUCKLING STRESS b
b = {2E ( d2 + t2 ) / {8 ( B2 + H2 )}
W = 2 d t ( B 2 + H2 )
LISTING OF SUBROUTINE
################################
c 2-STRUSS BEAM
c###############################
subroutine func(j,funcval)
implicit real*8 (a-h,o-z)
save
include 'params.f'
dimension parent(nparmax,indmax)
dimension iparent(nchrmax,indmax)
c
dimension parent2(indmax,nparmax),iparent2(indmax,nchrmax)
common / ga2 / nparam,nchrome
common / ga3 / parent,iparent
c Constants
P=33000.
b=30.
t=0.1
SIGM=100000.
E=3.E+07
rho=0.3
pi=4.0d0*datan(1.d0)
d=parent(1,j)
h=parent(2,j)
hh=b*b+h*h
W=2.*pi*rho*d*t*hh**0.5
SIGY=P*hh**0.5/(pi*t*h*d)
SIGB=pi*pi*E*(d*d+t*t)/(8.*hh)
CONST1=SIGB-SIGY
CONST2=SIGY-SIGM
funcval=-W
c Penalty for constraint violations
if(const2.gt.0.) funcval=-W-1.E-04*CONST2
if(const1.lt.0.) funcval=-W+1.E-04*CONST1
return
end
c#############################################
OPTIMUM SOLUTION
CONJUGATE
GRADIENT
d = 2 Units H =19 Units W =
13.4 Units
Genetic
d
Algorithm
TYPICAL
APPLICATIONS OF GA
Machine Learning
Speech Recognition
Criminal Suspect Detection
Music Composition
Training of Neural Networks
Aircraft Design
Turbine Blade Design
Protein Structure Determination
Bidding Strategies
Image Processing
SUCCESS OF GA SIMULATIONS
GA PARAMETERS
NUMBER OF FUNCTION
EVALUATIONS N = G x P
G is found to be approximately
G2L
P 1.4 L
Hence N 3 x L 2
GA PROBABILITIES VALUES Pc
and Pm
Mutation Probability Pm
Pm = 1 / P 1 / L
GA STRATEGY
Run the smallest population size (N).
GA STRATEGY
If the function evaluation is costly
then GA may take a very long time
If G = 200 and P = 20 the N = 4000
If we are dealing with simple airfoil
computations using CFD, each run
may take say 2 hours on a parallel
machine ( 4 or 5 Processors ).
Then 4000 evaluations may take
8000 hours i.e. ( an year !! )
GA STRATEGY
As GA proceeds, number of function
Conclusions