270 likes | 401 Views
Flexibility index analysis using Genetic Algorithm. Jeonghwa Moon Sep 13 th , 2006 Laboratory for Product and Process Design, Department of Chemical Engineering, University of Illinois, Chicago, IL 60607, U.S.A. Contents. Introduction Flexibility analysis Genetic algorithm
E N D
Flexibility index analysis using Genetic Algorithm Jeonghwa Moon Sep 13th , 2006 Laboratory for Product and Process Design, Department of Chemical Engineering, University of Illinois, Chicago, IL 60607, U.S.A.
Contents • Introduction • Flexibility analysis • Genetic algorithm • Cost Function • 1st term :Distance from constraint • 2nd term :Deviation • How to combine two terms • Case studies • Future work
Introduction • Flexibility index problem (analysis) • determine the maximum parameter (q) range that a design can tolerate for feasible operation • Applying traditional method for solving this problem is not efficient! • Gradient based method can find solution only with good initial guess-local solution • Maybe stochastic method (Genetic algorithm ,etc) is efficient
Introduction • Genetic algorithm • Stochastic optimization method which mimics natural selection and principles of genetics . • It is globally convergent, so good initial guess is not necessary! • One of most important aspects of GA is “to define exact cost function” which represents each chromosome’s value. • This presentation shows how Cost Function of flexibility problem is defined! Define cost function & parameters Generate initial population Find cost for each chromosome Natural Selection Mating Mutation No Is convergent? Yes End
Problem definition • Case study 0-nonconvex • Solutions using rSQP Critical point
Nominal point Best critical point Cost Function-definition • The Objective : we want to find out ‘critical point’ which : • lies on the constraints.(1st term) • is closest to nominal point. (2nd term) • Cost ≈ & Distance from constraint Distance* from nominal point + = 1st Term 2nd Term * This distance does not mean Euclidian distance
Cost Function-1st Term • Distance from constraint • Calculate all distances from every constraint. • Then select minimum one.
Cost Function -1st Term • How to get a distance from one point to constraint(2-dimensional ) Eqn of tangent plane ,l g(x,y) P=(x,y) l Po=(x0,y0) n(a,b) Q=(x1,y1) QP0 is parallel to n, Can this way be applied to more than 3 dimensional space? (1) (2) By solving two equations, we can get P0
Cost Function-1st Term(Cont.) • di vs gi • for the distance from constraint, |gi(x)| can be used. • gi can not represent the value of 1st term efficiently. • But gi is easy to get. Results using gi value Results using di value Little difference! More study and comparison between two is needed! d1=1,d2=1,|g1|=-1,|g2|= -22.0830
Cost Function-2nd Term • 2nd Term must represent relationship between nominal point and potential solution. • Why not Euclidian distance? • Even though, d1 is less than d2, Θ1 is not exact solution. • That means, Euclidian distance is not suitable value for 2nd term d1=1.13967846572336 d2=1.414213562373 θ 1 : Solution suggested by GA θ 2 : Real solution
Cost Function-2nd Term • Deviation must be considered! (why?) • In n-dimensional space, n deviations can be obtained! * • Feasible region is defined as* • For cost function, maximum δ is always selected! (why?) * In this presentation ,
Cost Function-2nd Term • Why deviation? (scaled) • Why maximum deviation? Θ2(0,1) Θ1(-1,1) Θ3(1,1) Θ4(2,0) ΘN(0,0) Θ5(2,-1) same deviations make same feasible reason! T(F1) Θ(2,1) T(F2) ΘN(0,0) Only maximum region has
Cost Fn-How to combine two terms? • Generally, two terms are combined like: • Proper parameter values are very important: • In terms of exact cost function • In terms of efficiency
Cost Fn-How to combine two terms? • Some results with various values of w1 and n1 Exact solution (5,5) , cost=1.25 Pop size=400, iteration =300,
Cost Fn-How to combine two terms? • Contour plot of Cost function Nominal point=(5,4),w1=10,n1=1
Cost Fn-How to combine two terms? • Contour plot of Cost function Nominal point=5,4, w1=2500, n1=2
Case Study 1 • Nonconvex: 3rd polynomial and linear 4y+9x-198≤0 20y-(x-4)(x-8)(x-12)-240 ≤0 -y ≤0 Pop size :400 Iteration :300 Selection ratio :0.5 Mutation ratio :0.1
Case Study 2 • Nonconvex: 3rd polynomial and sin fn 4y+9x-198-4sin(2x)≤0 20y-(x-4)(x-8)(x-12)-240 ≤0 -y ≤0 Pop size :400 Iteration :300 Selection ratio :0.5 Mutation ratio :0.1
Case Study 3 • Nonconvex: 3rd polynomial and sin fns 4y+9x-198-4sin(2x)≤0 20y-(x-4)(x-8)(x-12)-240 ≤0 sin(2x)+2+0.0125x2-y ≤0 Pop size :400 Iteration :300 Selection ratio :0.5 Mutation ratio :0.1
Conclusion-Future work • Short term • Case study of di & gi values must be continued • Apply this method to more than 3 dimensional problems. • Values of w1 and n1 must be studied. • Long term • Another evolutionary algorithm (PSO?) • Some hybrid algorithm (simplex GA) is needed for efficiency and accuracy of solution.
Cost Function-2nd Term • Candidate solutions we may consider • Euclidian distance • Min (dx,dy) • Max(dx,dy) • Angle • …
Cost Fn-How to combine two terms? • Results respect to various values of w1 and n1 W1=2500,n1=2, iteration =300
Cost Function -1st Term • N-dimensional Q
y=gi(x) l T=(t,g(t)) l’ P1=(a,b) Cost Function -1st Term • How to get a distance from one point to constraint(2-dimensional ) Eqn of l’ P1(a,b) is on the line l’ Can this way be applied to more than 3 dimensional space?