中职 优化计算方法及其MATLAB程序实现第5章电子课件 高教版 .pdf
《中职 优化计算方法及其MATLAB程序实现第5章电子课件 高教版 .pdf》由会员分享,可在线阅读,更多相关《中职 优化计算方法及其MATLAB程序实现第5章电子课件 高教版 .pdf(55页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、1/55JJIIJIBackClosezO9MATLABSy1 2/55JJIIJIBackClose130?:k?,?Hesse?G(xk)=2f(xk)?,U?y?)?8I3xk?e.AO/,?G(xk),UY?1e?.+?,?k?Jr,LL?K?.d?,?zS“I8I?,=Hesse?,u5?KO?.?=0?:.20-V50c“,InDavidongJ?.?,?$FletcherPowelly?ykQq-?.3?20cp,?zK?9:.3OLIO8I?Hesse?,%3,ekHesse?.d,)?zK3/55JJIIJIBackClose?k?.5.195?g:3?2Hesse?Gk=2
2、f(xk)?,Cq?Bk?“Gk.,BkAke?nA:(1)3,ekBk Gk,?A?)?Cqu,(?k?;(2)k?k,Bk?,l?)?f3xk?e;(3)?Bk#5K?,=12?1?.e0?vnA:?Bk?E.?f:Rn R34/55JJIIJIBackClosem8D Rn?gY.o,f3xk+1?gCq?.f(x)f(xk+1)+gTk+1(x xk+1)+12(x xk+1)TGk+1(x xk+1).?,?g(x)gk+1+Gk+1(x xk+1).-x=xk,sk=xk+1 xk,F?yk=gk+1 gk,KkGk+1sk yk.5?,u?gf,(?.y3,3?EHesse?Cq
3、?BkvX,=Bk+1sk=yk.(5.1)(5.1).-Hk+1=B1k+1,K?5/55JJIIJIBackClose?,/:Hk+1yk=sk,(5.2):Hk+1Hesse?_?Cq.|ddk=HkgkBkdk=gk(.Bk(Hk)?1nA:,-Bk+1=Bk+Ek,Hk+1=Hk+Dk,(5.3):Ek,Dk12?.d(5.1)(5.2)?5K(5.3)(?.e0?1?.3(5.3)?Ek=ukuTk(1?),R,uk Rn.d(5.1),?(Bk+ukuTk)sk=yk,6/55JJIIJIBackClose=k(uTksk)uk=yk Bksk.(5.4)(5.4)Luk1uyk
4、 Bksk,=3?uk=(yk Bksk).dkEk=2(yk Bksk)(yk Bksk)T.u,d(5.4),?2(yk Bksk)Tsk(yk Bksk)=yk Bksk.dd,e(yk Bksk)Tsk6=0,?2(yk Bksk)Tsk=1,=2=1(yk Bksk)Tsk,Ek=(yk Bksk)(yk Bksk)T(yk Bksk)Tsk.?1?Xe:Bk+1=Bk+(yk Bksk)(yk Bksk)T(yk Bksk)Tsk.(5.5)7/55JJIIJIBackCloseaq/,|(5.2),Hk?11?,?Hk+1=Hk+(sk Hkyk)(sk Hkyk)T(sk Hk
5、yk)Tyk.(5.6)k?1?,|?E)?zK?,Xe.5.1(1)0,?:x0 Rn,?0 6?1,?H0(?In).-k:=0.1,ekgkk 6,xkCq4?:.2,O|dk=Hkgk.3,|Efk.4,-xk+1:=xk+kdk,d1?(5.6)(Hk+1.8/55JJIIJIBackClose5,-k:=k+1,=1.euArmijo(|?1?MATLABS.S5.1(1S)function k,x,val=sr1(fun,gfun,x0,epsilon,N)%U:1)?K:min f(x)%:fun,gfunO8I9F,x0:,%epsilonNN?,NS“g%:kS“g,x,v
6、alOCq:if nargin5,N=1000;endif nargin4,epsilon=1.e-5;endbeta=0.55;sigma=0.4;n=length(x0);Hk=eye(n);k=0;9/55JJIIJIBackClosewhile(kN)gk=feval(gfun,x0);%OFdk=-Hk*gk;%O|if(norm(gk)epsilon),break;end%u?OKm=0;mk=0;while(m20)%Armijo|if(feval(fun,x0+betam*dk)x0=1.0;1.0;12/55JJIIJIBackClose k,x,val=sr1(fun,gf
7、un,x0)fun,gfunO8I9F?m.5.2 BFGS9MATLAByBFGS?8c61k?,dBroy-den!Fletcher!GoldfarbShanno31970cgJ?,?BFGS.?g:3(5.3)?Ek2?Ek=ukuTk+vkvTk,:uk,vk Rn;,R.u,d(5.1),?(Bk+ukuTk+vkvTk)sk=yk,13/55JJIIJIBackClose?d/(uTksk)uk+(vTksk)vk=yk Bksk.(5.7)Juy,v(5.7)?ukvk,?ukvkO1uBkskyk,=-uk=Bksk,v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uSy?0.(5.11)18/55JJIIJIBackCloseJuy,B0?,?(5.11)?y?S?Bk?5.euArmijo(|OK?BFGS?.5.2(BFGS)0,?(0,1),(0,0.5),:x0 Rn,?0 6?1,?B0(?G(x0)?In).-k:=0.1,Ogk=f(xk)
12、.ekgkk 6,xkCq4?:.2,)5|Bkd=gk,(5.12)?)dk.19/55JJIIJIBackClose3,?mkve?K?m:f(xk+mdk)6 f(xk)+mgTkdk.(5.13)-k:=mk,xk+1:=xk+kdk.4,d?(5.11)(Bk+1.5,-k:=k+1,=1.euArmijo(|?BFGS?MATLABS.S5.2(BFGSS)function k,x,val=bfgs(fun,gfun,x0,varargin)%U:BFGS)?K:min f(x)%:fun,gfunO8I9F,x0:,%varargin?CC,NBFGS?20/55JJIIJIBa
13、ckClose%,?eSNTSu-?%:kS“g,x,valOCq:N=1000;%S“gepsilon=1.e-5;%NN?beta=0.55;sigma=0.4;n=length(x0);Bk=eye(n);k=0;while(kN)gk=feval(gfun,x0,varargin:);%OFif(norm(gk)epsilon),break;end%u?OKdk=-Bkgk;%)|Bk*dk=-gk,O|m=0;mk=0;while(m20)%Armijo|21/55JJIIJIBackClosenewf=feval(fun,x0+betam*dk,varargin:);oldf=fe
14、val(fun,x0,varargin:);if(newf0)Bk=Bk-(Bk*sk*sk*Bk)/(sk*Bk*sk)+(yk*yk)/(yk*sk);22/55JJIIJIBackCloseendk=k+1;x0=x;endval=feval(fun,x0,varargin:);5.2|BFGS(S5.2)?zKminxR2f(x)=2(x1 x22)2+(x2 2)2.TKk?4?:x=(4,2)T,4?f(x)=0.)5.1?O8I9F?m,-#|.|S5.2,OK?kf(xk)k 6 105.?:,(JXL5.2?.23/55JJIIJIBackCloseL5.2 BFGS?(J:
15、(x0)S“g(k)8I(f(xk)(1.0,1.0)T106.0956 1014(1.0,1.0)T132.4356 1012(2.0,1.0)T161.9396 1015(1.0,2.0)T123.8232 1015(10.0,10.0)T202.0524 1017L5.1w,BFGS1k?.5.3 DFP9MATLAByDFP?1?,1959cdDavidonJ?,?FletcherPowell)U?,DFP,)?zKk?.aquBFGS?,?DFP?Xe:Hk+1=HkHkykyTkHkyTkHkyk+sksTksTkyk.(5.14)24/55JJIIJIBackClose?,Juy
16、,d(5.14),eHk,?Hk+1,aqun5.1?y,?DFP?Xe5.n5.3?Hk?,Hk+1dDFP?(5.14)(,oHk+1?sTkyk 0.aqun5.2,y,?(|Wolfe|OK,?S?Hk?5sTkyk 0?v.?5,Armijo|OKUv,IXe?:Hk+1=Hk,sTkyk6 0,HkHkykyTkHkyTkHkyk+sksTksTkyk,yTksk 0.(5.15)euArmijo(|OK?DFP?.25/55JJIIJIBackClose5.3(DFP)0,?(0,1),(0,0.5),:x0 Rn,?0 6?1,?H0(?G(x0)1?In).-k:=0.1,O
17、gk=f(xk).ekgkk 6,xkCq4?:.2,O|:dk=Hkgk.(5.16)3,?mkve?K?m:f(xk+mdk)6 f(xk)+mgTkdk.(5.17)-k:=mk,xk+1:=xk+kdk.4,d?(5.15)(Hk+1.26/55JJIIJIBackClose5,-k:=k+1,=1.euArmijo(|?DFP?MATLABS.S5.3(DFPS)function k,x,val=dfp(fun,gfun,x0,epsilon,N)%U:DFP)?zK:min f(x)%:fun,gfunO8I9F,x0:,%epsilonNN?,NS“g%:kS“g,x,valOC
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 中职 优化计算方法及其MATLAB程序实现第5章电子课件 高教版 优化 计算方法 及其 MATLAB 程序 实现 电子 课件 高教
限制150内