中职 优化计算方法及其MATLAB程序实现第8章电子课件 高教版 .pdf
1/37JJIIJIBackClosezO9MATLABSy1l 52/37JJIIJIBackClose?zK?5,?5m?X.d?,?zK?5.?55?E5?zK?:.8.1?K?5?!?5ue?Kmin f(x),x Rn,s.t.hi(x)=0,i=1,2,l.(8.1)?K?B,K(8.1)?.KFL(x,)=f(x)lXi=1ihi(x),(8.2):=(1,2,l)Tf.3/37JJIIJIBackClosee?.KFn?K(8.1)?4?7,?KKT(Karush-Kuhn-Tucker).n8.1(.KFn)b?xK(8.1)?4?:,f(x)hi(x)(i=1,2,l)3x?,?SY.e|hi(x)(i=1,2,l)5,K3f=(1,2,l)T?xL(x,)=0,=f(x)lXi=1ihi(x)=0.y PH=?h1(x),h2(x),hl(x)?.4/37JJIIJIBackClosedn?b?H?.d,el=n,KH_?,l?H?Rn?|,?3 Rl(l=n)?f(x)=lXi=1ihi(x),d(?y.e?l uz?,?yh(u(z),z)u(z)+zh(u(z),z)=0,?u(z)=HT1HT2.(8.3)3zNC,dh(u(z),z)=0z?zKminzRnlf(u(z),z)?4?:,?kzf(u(z),z)=0,6/37JJIIJIBackClose=u(z)Tyf(y,z)+zf(y,z)=0.5?x=(y,z),(8.3)“,?H2H11yf(x)+zf(x)=0.-=H11yf(x),Kkyf(x)=H1,zf(x)=H2.5=f(x)=yf(x)zf(x)=H1H2=lXi=1ihi(x).y.?7/37JJIIJIBackClose?K?7,I?(8.2)?.KFL(x,)?Fux?Hesse?.OLXe:L(x,)=xL(x,)L(x,)=f(x)lPi=1ihi(x)h(x),2xxL(x,)=2f(x)lXi=1i2hi(x).XJ8I?Y?,K?5.n8.2u?K(8.1),b?f(x)hi(x)(i=1,2,l)?Y?,3(x,)Rn Rl?L(x,)=0.e?0 6=d Rn,hi(x)Td=0(i=1,2,l),kdT2xxL(x,)d 0,KxK(8.1)?8/37JJIIJIBackClose4?:.yy.ex4?:,K73?N(x,)9ux?S?xk,?xk N(x,),xk6=x,kf(x)f(xk),hi(xk)=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q:,xTzK?430/37JJIIJIBackClose?:.y 5?uzK,.KFL(x,)=f(x)lXi=1ihi(x)mXi=1igi(x)ux,?d?5(n1.4),kL(x,)L(x,)+xL(x,)T(x x)=L(x,),=L(x,)6 L(x,).,u?(,)RlRm+,kL(x,)L(x,)=lXi=1(i i)hi(x)mXi=1(i i)gi(x)31/37JJIIJIBackClose=mXi=1igi(x)6 0,=L(x,)6 L(x,),?(x,)Q:,xzK?4?:.y.?e?zK?K.u?zK(8.11),XeP:H(x)=?h1(x),hl(x)?T,G(x)=?g1(x),gm(x)?T.-y Rl,z Rm,L(x,y,z)=f(x)H(x)Ty G(x)Tz9(y,z)=infxRnL(x,y,z).32/37JJIIJIBackClose(y,z)u(y,z).?K(8.11)?.KFmax(y,z),s.t.y Rl,z Rm+.(8.17)?K(8.11)?Wolfemax L(x,y,z),s.t.xL(x,y,z)=0,y Rl,z Rm+.(8.18)5?3,?.,u.KF,du8I(y,z)?.KFux?4?,w,kxL(x,y,z)=0.?.KF?,?Wolfe.33/37JJIIJIBackCloseu55yK?g5yK,.KF(8.17)k?/.ef.8.2?k55yKmin cTx,s.t.Ax=b,x 0.(8.19)?.KF.).KFL(x,y,z)=cTx yT(Ax b)zTx.ux4?.-xL(x,y,z)=c ATy z=0.34/37JJIIJIBackClose“.KF,?(y,z)=infxRnL(x,y,z)=infxRn(c ATy z)Tx+yTb=yTb=bTy.5?z=c ATy 0,ukmax bTy,s.t.ATy 6 c.(8.20)55yK(8.19)?5y.?8.3?g5yKmin12xTBx+cTx,s.t.Ax 6 b,(8.21)35/37JJIIJIBackClose:B Rnn?;A Rmn.?g5yK(8.21)?5y.)k?TK?.KFL(x,z)=12xTBx+cTx zT(b Ax).ux4?.duB?,?L(x,z)ux.-xL(x,z)=Bx+c+ATz=0,)?x=B1(c+ATz).“.KF,?(z)=infxRnL(x,z)=infxRn?(Bx+c+ATz)Tx zTb 12xTBx?=bTz 12B1(c+ATz)TBB1(c+ATz)36/37JJIIJIBackClose=bTz 12(cT+zTA)B1(c+ATz)=(b AB1c)Tz 12zT(AB1AT)z 12cTB1c.-d=b AB1c,D=AB1AT,Kk(z)=12zTDz+dTz 12cTB1c.5?fz 0,d?g5yK(8.21)?.KFmax12zTDz+dTz 12cTB1c,s.t.z 0.?e?KK?8Im?X.37/37JJIIJIBackClosen8.9(fn)?x(y,z)O?K(8.11)K(8.17)?1),Kk(y,z)6 f(x).y x(y,z)O?K(8.11)K(8.17)?1),?(y,z)=infxRn?f(x)yTH(x)zTG(x)?6 f(x)yTH(x)zTG(x)=f(x).y.?