| 1 | 1/1 | 返回列表 |
| 查看: 342 | 回復: 0 | ||
[求助]
用1stopt迭代求參數(shù),求高手幫我看看代碼哪里有問題,謝謝
|
|
我是菜鳥一個,昨天才接觸1Stopt,更加不會pascal語言。想迭代求解參數(shù),使方程值最小。但是,點了“執(zhí)行”后確沒有啥反應。我用的1.5pro版本。跪求高手指點!謝謝 algorithm=5par_retrieval ; constant theta(1:9)=[30,32.5,35,37.5,40,42.5,45,47.5,50] ; constant TBh_obs(1:9)=[241.17748,240.65136,239.83198,238.66749,237.10444,235.08808,232.56285,229.47270,225.76159] ; constant p=0.01744,mus=0.1; parameter eb[3,30],tau[0,1.0],omega[0,0.5],rms[0.0025,0.03],cl[0.05,0.5]; minimum; startprogram [pascal]; procedure mainmodel; var i:integer; tt:array[1..9] of double; Ah:array[1..9] of double; Bh:array[1..9] of double; Ch:array[1..9] of double; rh:array[1..9] of double; eh:array[1..9] of double; E_eff:array[1..9] of double; cf,temp:double; Begin cf:=0.0 tt[1]:=exp(-tau/COS(theta[1]*p)) ; rh[1]:=ABS((mus*COS(theta[1]*p)-SQRT(mus*eb-SIN(theta[1]*p)*SIN(theta[1]*p)))/(mus*COS(theta[1]*p)+SQRT(mus*eb-SIN(theta[1]*p)*SIN(theta[1]*p))))^2; Ah[1]:=0.068502*(theta[1]*p)^2 -0.058486*(theta[1]*p) +0.976321; Bh[1]:=-0.051377*(theta[1]*p)^2 +0.014978*(theta[1]*p) +0.045456 ; Ch[1]:=0.601618*(theta[1]*p)^2 -0.151848*(theta[1]*p) -0.607679; eh[1]:=1-rh[1]*Ah[1]*exp(Bh[1]*(rms^2/cl)^2+Ch[1]*(rms^2/cl)) ; E_eff[1]:=eh[1]*tt[1]+(1-tt[1])*(1-omega)+(1-eh[1])*(1-omega)*(1-tt[1])*tt[1]; for i:=2 to 9 do begin tt:=exp(-tau/COS(theta*p)) ; rh:=ABS((mus*COS(theta*p)-SQRT(mus*eb-SIN(theta*p)*SIN(theta*p)))/(mus*COS(theta*p)+SQRT(mus*eb-SIN(theta*p)*SIN(theta*p))))^2; Ah:=0.068502*(theta*p)^2 -0.058486*(theta*p) +0.976321; Bh:=-0.051377*(theta*p)^2 +0.014978*(theta*p) +0.045456 ; Ch:=0.601618*(theta*p)^2 -0.151848*(theta*p) -0.607679; eh:=1-rh*Ah*exp(Bh*(rms^2/cl)^2+Ch*(rms^2/cl)) ; E_eff:=eh*tt+(1-tt)*(1-omega)+(1-eh)*(1-omega)*(1-tt)*tt; cf:=cf+(E_eff/E_eff[1]-TBh_obs/TBh_obs[1])^2 ; temp:=cf; end ; Functionresult:=temp ; End; Endprogram; |
找到一些相關的精華帖子,希望有用哦~
| 1 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 北科281學碩材料求調(diào)劑 +6 | tcxiaoxx 2026-03-20 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 311求調(diào)劑 +6 | 冬十三 2026-03-18 | 6/300 |
|
|
[考研] 招08考數(shù)學 +4 | laoshidan 2026-03-20 | 8/400 |
|
|
[考研] 289求調(diào)劑 +7 | 懷瑾握瑜l 2026-03-20 | 7/350 |
|
|
[考研] 070300化學求調(diào)劑 +3 | 苑豆豆 2026-03-20 | 3/150 |
|
|
[考研] 初試 317 +7 | 半拉月丙 2026-03-20 | 7/350 |
|
|
[考研] 083200學碩321分一志愿暨南大學求調(diào)劑 +3 | innocenceF 2026-03-17 | 3/150 |
|
|
[考研] 化學求調(diào)劑 +4 | 臨澤境llllll 2026-03-17 | 5/250 |
|
|
[考研] 一志愿 西北大學 ,070300化學學碩,總分287,雙非一本,求調(diào)劑。 +3 | 晨昏線與星海 2026-03-18 | 3/150 |
|
|
[考研] 304求調(diào)劑 +6 | 曼殊2266 2026-03-18 | 6/300 |
|
|
[考研] 296求調(diào)劑 +6 | www_q 2026-03-18 | 10/500 |
|
|
[考研] 288求調(diào)劑 +16 | 于海海海海 2026-03-19 | 16/800 |
|
|
[考研] 295材料求調(diào)劑,一志愿武漢理工085601專碩 +5 | Charlieyq 2026-03-19 | 5/250 |
|
|
[考研] 環(huán)境工程調(diào)劑 +9 | 大可digkids 2026-03-16 | 9/450 |
|
|
[考研] 求調(diào)劑 +3 | 暗涌afhb 2026-03-16 | 3/150 |
|
|
[考研]
|
不想起名字112 2026-03-19 | 3/150 |
|
|
[考研] 0703化學調(diào)劑 +4 | 18889395102 2026-03-18 | 4/200 |
|
|
[考研] 材料工程專碩調(diào)劑 +5 | 204818@lcx 2026-03-17 | 6/300 |
|
|
[考研] 一志愿南京大學,080500材料科學與工程,調(diào)劑 +4 | Jy? 2026-03-16 | 4/200 |
|
|
[考研] 275求調(diào)劑 +4 | 太陽花天天開心 2026-03-16 | 4/200 |
|