資源描述:
《優(yōu)化設(shè)計(jì)黃金分割發(fā)以及迭代法》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。
1、機(jī)械優(yōu)化設(shè)計(jì)課程論文院系專業(yè)班級(jí)二2姓名學(xué)號(hào)一、優(yōu)化題目應(yīng)用所學(xué)計(jì)算機(jī)語言編寫一維搜索的優(yōu)化計(jì)算程序,完成計(jì)算結(jié)果和輸出。二、建立優(yōu)化數(shù)學(xué)模型1、目標(biāo)函數(shù)方程式:y=pow(x,4)-1*pow(x,3)?3*pow(x,2)?16*x+102、變量:x3、初始值:初始值xl=5初始步長tt=0.01三、所選用的優(yōu)化方法1、采用外推法確定搜索區(qū)間2、釆用黃金分割法求函數(shù)最優(yōu)3、計(jì)算框圖:仃)、外推法程序框圖(2)、黃金分割法程序框圖3-5進(jìn)退算法確定單峰區(qū)間的計(jì)算框黃金分割法計(jì)算框四、計(jì)算輸出內(nèi)容:c:
2、C:TliD0VSsysteB32cBd.exe4.9000^x13.5148^x12.6586,xl2.6586,xl2.3317,xl2.3317.X12.3317.X1=2.2546,xl=2.2546,xi=2.2546,xi=2.2364,xl=2.2364,xi=2.2364,xl=2.2321,xl=2.2294,xi=2.2294,xl=2.2294,xl=2.2288,xi=2.2288,xl=2.2286,xi=2.2284,xl=2.2283,xl=2.2283,xl2■6
3、586j.x22.1299,x21.8028^x22.1299,x22.0049,x22.1299,x22.2069,x2=2.1??6,x2=2.2069,x2=2.2252,x2=2.2181,x2=2.2252,x2=2.2294,x2=2.22?8,x2=2.2268,x2=2.2278,x2=2.2284x2=2.2282,x2=2.2284,x2=2.2283,x2=2.2283.x2=2.2283,x2=2.2283,x23.5148.fl=-22.5745,f22.6586,fl=-26
4、.7705,f22.1299,fl=-23.8918,f22.3317,fl=-26.7705,f22?1299.£"-26?0386』22.2069,fi=-26.7705,f22.2546H—-26.9492H2=2.2069,fl=-26.9074,f2=2.2252.fl=-26.9492,f2=2.2364,£1=-26.9584H2=2.2252,fl=-26.9564,f2=2.2294,fl=-26.9584,f2=2.2321,fl=-26.9586,f2=2.2294,fl=-26.
5、9586,£2=2.2278,fl=-26.9585,f2=2.2284,fl=-26.9586,f2=2.2288.fl=-26.9586,£2=2.2284,fl=-26.9586,£2=2.2286,fl=-26.9586,f2=2.2284,fl=-26.9586H2=2.2283,26.9586,£2=2.2283,fl=-26.9586,f2=2.2283,fl=-26.9586,f225.8993-22.5745-26.7705-26.7356-26.7705-26.9492-26.944
6、?=-26.9492=-26.9584=-26.9573=-26.9584=-26.9586=—26.9583=-26.9586=-26.9586=-26.9586=-26.9586=-26.9586=-26.9586=-26.9586=-26.9586=-26.9586=-26.9586n=2,a=-0.9675,b=4.9000,xl=1.2739^x2=2.6586.fl=-14.6841,f2=-22.5745n=3,a=l.2739,h=n=4,a=1.2?39,b=n=5,a=l.2?39,
7、b=n=6J.a=l.8028J.h=n=7,a=l.8028^b=n=8J.a=2.0049J.b=n=9J.a=2.1299,b=n=10,a=2.1299,bn=ll.a=2.1?76,bn=12.a=2?2069,bn=13J.a=2.2069j.bn=14?a=2.2181,bn=15.2252^bn=16,a=2.2252』n=17^d=2■2252鼻bn=18,^=2.2268,bn=19,d=2■2278,bn=20?d=2■2278rbn=21尸d=2?2282尸bn=22?d=2■2
8、282*bn=23鼻d=2■2282jtbn=24#d=2.2282n=25,d=2■2283尸hTheminis2.2283andtheresultis-26.9586五、優(yōu)化的源程序文件:#include#include#definee0.0001#definett0.01floatf(doublex){floaty=pow(x,4)-1*pow(x,3)?3*pow(x,2)?16*x+10;retu