Multidisciplinary System System Design Optimization (MSDO) (MSDO) How to Break “Robust” Optimizers Recitation 6 Andrew March 1 © Massachusetts Institute of Technology - Prof. de Weck and Prof. Willcox Engineering Systems Division and Dept. of Aeronautics and Astronautics Today’s Topics Topics • fmincon – What the options are – What it’s doing – How to break it • GA toolbox on Stellar • MATLAB® GA Toolbox – Some options – How to break it • Questions 2 © Massachusetts Institute of Technology - Prof. de Weck and Prof. Willcox Engineering Systems Division and Dept. of Aeronautics and Astronautics Sequential Quadratic Programming • Create Quadratic Approximation: B(x k ) ≈ ∇ xx L(x k ); B (x k ) f 0 sk = xk +1 − xk mineq meq mineq meq ⎛ ⎞ ⎛ ⎞ qk = ⎜⎜ ∇f (xk +1 ) + ∑ λi ∇gi (xk +1 ) + ∑ λ j ∇h j (xk +1 ) ⎟⎟ − ⎜⎜ ∇f (xk ) + ∑ λi ∇gi (xk ) + ∑ λ j ∇h j (xk ) ⎟⎟ i=1 j=1 i=1 j=1 ⎝ ⎠ ⎝ ⎠ qk qkT BkT skT sk Bk Bk +1 = Bk + T − T qk sk sk Bk sk • Solve Quadratic Program: 1 minn d T Bk d + ∇f (xk )T d d∈ℜ 2 s.t. Aeq d = beq Ad ≤ b • Evaluate merit function: meq mineq i=1 i=1 Ψ(x) = f (x) + ∑ ri hi (x) + ∑ ri ⋅ max[gi (x),0] Ψ ( xk + αd k ) • Compute step length: α k = arg α∈A(min αd )≤b • Take step: xk +1 = xk + α k d k • Repeat until αkdk≤ε Interior Point Algorithm • Two equivalent optimization problems: mineq minn f (x) min f (x) − μ ∑ log si x,s∈ℜ x,s∈ℜn s.t. h(x) = 0 g(x) + s = 0 s ≥ 0 • KKT Conditions: m ineq s.t. meq ∇f (x) + ∑ zi ∇gi (x) + ∑ y j ∇h j (x) i=1 j=1 sz − μe = 0 i=1 h(x) = 0 g(x) + s = 0 mineq meq i=1 j=1 ∇f (x) + ∑ zi ∇gi (x) + ∑ y j ∇h j (x) − μS −1e + z = 0 h(x) = 0 g(x) + s = 0 h(x) = 0 g(x) + s = 0 • Solve KKT system with Newton’s method, for directions. • Compute step length: α s = max{0 < α ≤ 1: s + αd s ≥ (1 − τ )s} (τ~0.995) α = max{0 < α ≤ 1: z + αd ≥ (1 − τ )z} z xk +1 = xk + α s d x sk +1 = sk + α s d s yk +1 = yk + α z d y zk +1 = zk + α z d z Repeat until KKT Conditions satisfied to within μk Repeat entire process with μk+1=σμk ,0<σ<1 • Take step: • • z Genetic Algorithm Initialize Population (initialization) next generation Select individual for mating (selection) Mate individuals and produce children (crossover) Mutate children (mutation) Insert children into population (insertion) n Are stopping criteria satisfied ? y Finish 5 Ref: Goldberg (1989) © Massachusetts Institute of Technology - Prof. de Weck and Prof. Willcox Engineering Systems Division and Dept. of Aeronautics and Astronautics GA Toolbox • BUG!!! • Add into genetic.m – Line 118: stats=[]; Fitness Function • Only has Roulette Wheel selection – You can add others… • Roulette Wheel f (x k ) Ρ= ∑ f (x k ) k • Are there any restrictions on f(x)? Matlab GA Toolbox • Constraint Handling • Augmented Lagrangian/Penalty method: mineq minn f (x) − ∑ λi si log(gi (x) − si ) x∈ℜ i=1 gi (x) − sk < 0 sk = 1 μk λk – μ0≥1 – σ>1; μk+1=σμk • Disclaimer: this is one of three papers referenced, it may not be exactly what’s in MATLAB Summary • There are many optimization toolboxes available to you. • Everyone of them has limitations. • Know what they are doing. • Assure your problem fits within the assumptions that algorithm makes! MIT OpenCourseWare http://ocw.mit.edu ESD.77 / 16.888 Multidisciplinary System Design Optimization Spring 2010 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.