![機(jī)械優(yōu)化設(shè)計(jì)作業(yè)_第1頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/3/1f29be16-9f07-40ea-a1bc-9fe59f1c3880/1f29be16-9f07-40ea-a1bc-9fe59f1c38801.gif)
![機(jī)械優(yōu)化設(shè)計(jì)作業(yè)_第2頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/3/1f29be16-9f07-40ea-a1bc-9fe59f1c3880/1f29be16-9f07-40ea-a1bc-9fe59f1c38802.gif)
![機(jī)械優(yōu)化設(shè)計(jì)作業(yè)_第3頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/3/1f29be16-9f07-40ea-a1bc-9fe59f1c3880/1f29be16-9f07-40ea-a1bc-9fe59f1c38803.gif)
![機(jī)械優(yōu)化設(shè)計(jì)作業(yè)_第4頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/3/1f29be16-9f07-40ea-a1bc-9fe59f1c3880/1f29be16-9f07-40ea-a1bc-9fe59f1c38804.gif)
![機(jī)械優(yōu)化設(shè)計(jì)作業(yè)_第5頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/3/1f29be16-9f07-40ea-a1bc-9fe59f1c3880/1f29be16-9f07-40ea-a1bc-9fe59f1c38805.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、機(jī)械優(yōu)化設(shè)計(jì)作業(yè)在MATLAB下編程如下:在MATLAB下編程如下:先編寫M文件,建立目標(biāo)函數(shù)function f=zuoye2(x)f=-x(1)*x(2)*x(3); 主程序如下: x0=1;1;1;A=-1,-2 ,-2;1,2,2;b=0;72;lb=zeros(3,1);x,fval,exitflag,output=fmincon(zuoye2,x0,A,b,lb)Warning: Trust-region-reflective algorithm does not solve this type of problem, using active-setalgorithm. You
2、could also try the interior-point or sqp algorithms: set the Algorithm option tointerior-point or sqp and rerun. For more help, see Choosing the Algorithm in the documentation. In fmincon at 472Local minimum possible. Constraints satisfied.fmincon stopped because the predicted change in the objectiv
3、e functionis less than the default value of the function tolerance and constraints were satisfied to within the default value of the constraint tolerance.Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin 2 x = 23.9997 12.0001 12.0001fval = -3.4560e+003exitflag =
4、 5output = iterations: 9 funcCount: 42 lssteplength: 1 stepsize: 3.3708e-004 algorithm: medium-scale: SQP, Quasi-Newton, line-search firstorderopt: 0.0025 constrviolation: 0 message: 1x777 char 由題,先選取設(shè)計(jì)變量。一、設(shè)計(jì)變量由于材料已經(jīng)給定,其質(zhì)量只是內(nèi)徑d、外徑D、跨距L及外伸端a的函數(shù)。因此設(shè)計(jì)變量為X=x1,x2,x2T=l,D,aT (1)二、目標(biāo)函數(shù)依據(jù)題意,以主軸自身質(zhì)量最小為設(shè)計(jì)目標(biāo),
5、即Fx=14x1+x3x22-d2 (2)為材料密度。三、約束條件1)撓度要求y=Fa2(l+a)3EIy0 (3)上式中慣性矩I=(D4-d4)64,E為主軸彈性模量。將I、E代入得:64Fx32(x1+x3)3E(x24-d4)y0 (4)2)強(qiáng)度要求max=MmaxWz (5)Wz=(D4-d4)32D (6)由(5)(6)式可得:32Fx2x3(x24-d4) (7)3)邊界約束條件300x1650,60x2110,90x3150 (8)四、將物理模型轉(zhuǎn)化為數(shù)學(xué)模型minfx=14x1+x3x22-d2 (9)S.t.(10)在MATLAB中先建立目標(biāo)函數(shù)M文件function f=m
6、yfun(x)f=6.16225*(x(1)+x(3)*(x(2)2-900)/1000000;因?yàn)榧s束為非線性,所以同樣建立非線性約束M文件function c,ceq=mycon(x)F=15000;y0=0.05;c(1)=9.71*x(3)2*(x(1)+x(3)/(x(2)4-304)-1;c(2)=32*F*x(2)*x(3)/(3.14*(x(2)4-304)*180)-1;ceq=;在MATLAB命令窗口給出初始搜索值和線性約束,并調(diào)用優(yōu)化程序:a=-1/300 0 0 0 -1/60 0 0 1/110 0 0 0 -1/90; 注:相比較式(10)的約束作了一個(gè)變形b=-1
7、;-1;1;-1; x0=300;100;100; lb=zeros(3,1);x,fval,exitflag,output=fmincon(myfun,x0,a,b,lb,mycon)Warning: Trust-region-reflective algorithm does not solve this type of problem, using active-setalgorithm. You could also try the interior-point or sqp algorithms: set the Algorithm option tointerior-point o
8、r sqp and rerun. For more help, see Choosing the Algorithm in the documentation. In fmincon at 472Local minimum found that satisfies the constraints.Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance,a
9、nd constraints were satisfied to within the default value of the constraint tolerance.Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin 1 1 4 x = 300.0000 74.9069 90.0000fval = 11.3220exitflag = 1output = iterations: 7 funcCount: 33 lssteplength: 1 stepsize: 2.9
10、587e-005 algorithm: medium-scale: SQP, Quasi-Newton, line-search firstorderopt: 1.1603e-009 constrviolation: 1.6105e-012 message: 1x788 char經(jīng)比較可發(fā)現(xiàn)和此前的結(jié)果一致。同上,先建立目標(biāo)函數(shù)M文件function f=fun(x)f=(x(1)-3)2+x(2)2;再建立非線性約束M文件function c,ceq=funcon(x)c(1)=x(1)2+x(2)-4;ceq=;在MATLAB命令窗口給出初始搜索值和線性約束,并調(diào)用優(yōu)化程序: x0=1,1; a=-1 0;0 -1 b=-0.5;0 lb=zeros(2,1) x,fval,exitflag,output=fmincon(fun,x0,a,b,lb,funcon)Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin 2 2 1x = 2.0000 0fval = 1.0000exitflag = 1output = iterations: 4 funcCount: 1
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 裝修進(jìn)度款支付合同
- 藥品冷鏈運(yùn)輸保密合同
- 商業(yè)空間裝修施工合同范本
- 包包購銷合同
- 咨詢服務(wù)合同終止協(xié)議書年
- 互聯(lián)網(wǎng)廣告投放策略與實(shí)踐案例
- 建筑項(xiàng)目居間合同
- 出租打印機(jī)合同年
- 圖書購銷合同范例
- 工程管理咨詢合同
- 2 找春天 公開課一等獎(jiǎng)創(chuàng)新教學(xué)設(shè)計(jì)
- 2025年江蘇南京水務(wù)集團(tuán)有限公司招聘筆試參考題庫含答案解析
- 護(hù)理人文知識(shí)培訓(xùn)課件
- 建筑工程施工安全管理課件
- 2025年春新人教版數(shù)學(xué)七年級(jí)下冊(cè)教學(xué)課件 7.2.3 平行線的性質(zhì)(第1課時(shí))
- 安徽省合肥市2025年高三第一次教學(xué)質(zhì)量檢測地理試題(含答案)
- 2025年上半年畢節(jié)市威寧自治縣事業(yè)單位招考考試(443名)易考易錯(cuò)模擬試題(共500題)試卷后附參考答案
- 第六編元代文學(xué)
- 高考語文古詩詞必背重點(diǎn)提綱
- 超星爾雅學(xué)習(xí)通《大學(xué)生心理健康教育(蘭州大學(xué)版)》章節(jié)測試含答案
- 2020譯林版高中英語選擇性必修二單詞默寫表
評(píng)論
0/150
提交評(píng)論