声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2334|回复: 2

[1stopt] 求助dingda

[复制链接]
发表于 2010-9-20 22:43 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
想要求一个方程组,但其中的一个变量S可以取300到1000之间的任何值,步长为10,一次一次改S的值很麻烦,不知道能不能批处理,请dingda先生给予解决,谢谢啦。。。
Parameter x[500,1200],y[0,7],z[0,2];
constant S;
Function (2629.32072130138*x+0.676902938787872*x^2+2.06200660659653*10^(-4)*x^3-1.03386752205615*10^(-7)*x^4)-(2629.32072130138*S+0.676902938787872*S^2+2.06200660659653*10^(-4)*S^3-1.03386752205615*10^(-7)*S^4)+y*10^3*(-188.127606061783-0.0724019483237287*x+4.27818764486488*10^(-5)*x^2-7.97241646880469*10^(-9)*x^3)+z*10^3*(-146.463309091062-0.0699590675983468*x+2.73132867122831*10^(-5)*x^2-1.89277389234656*10^(-9)*x^3)=0;
exp((203.313957575831-0.187374285159722*x-6.36978438221116*10^(-5)*x^2+2.05433177929587*10^(-8)*x^3)/(8.314*x)/1000)=(y+2*z)*(26+y+z)*(100-2*y-2*z)^2/(7-y)/(59-3*y-4*z)^3/100;
exp((161.469181816515-0.139830396262278*x-7.39304195921339*10^(-5)*x^2+2.22226107277689*10^(-8)*x^3)/(8.314*x)/1000)=(y+2*z)^2*(26+y+z)*(100-2*y-2*z)^2/(2-z)/(59-3*y-4*z)^4/100;
回复
分享到:

使用道具 举报

发表于 2010-10-8 20:55 | 显示全部楼层
回复 lxx244lxx 的帖子


constant s;
这一行改为
loopconstant s=300:10:400;
即可。

结果为:
************** 循环常数(LoopConstant) s=400 **************
====== 结果 ======

循环最好: 5.75402975707141E-9 [2]
循环运算数: 11/11
迭代数: 35
计算用时(时:分:秒:毫秒): 00:00:04:125
计算中止原因: 达到收敛判定标准
优化算法: 通用全局优化法(UGO1)
函数表达式 1: (2629.32072130138*x+0.676902938787872*x^2+2.06200660659653*10^(-4)*x^3-1.03386752205615*10^(-7)*x^4)
            -(2629.32072130138*(400)+0.676902938787872*(400)^2+2.06200660659653*10^(-4)*(400)^3-1.03386752205615
            *10^(-7)*(400)^4)+y*10^3*(-188.127606061783-0.0724019483237287*x+4.27818764486488*10^(-5)*x^2-7.97241646880469
            *10^(-9)*x^3)+z*10^3*(-146.463309091062-0.0699590675983468*x+2.73132867122831*10^(-5)*x^2-1.89277389234656
            *10^(-9)*x^3)-(0) = -2.69326847E-7
         2: exp((203.313957575831-0.187374285159722*x-6.36978438221116*10^(-5)*x^2+2.05433177929587*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)*(26+y+z)*(100-2*y-2*z)^2/(7-y)/(59-3*y-4*z)^3/100) = 3.959922758E-5
         3: exp((161.469181816515-0.139830396262278*x-7.39304195921339*10^(-5)*x^2+2.22226107277689*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)^2*(26+y+z)*(100-2*y-2*z)^2/(2-z)/(59-3*y-4*z)^4/100) = -0.00173280857
目标函数值(最小): 1.4383325852083E-7
x: 882.77502369333
y: 6.3284505409633
z: 1.79734813702061

====== 计算结束 ======

************** 循环常数(LoopConstant) s=390 **************
====== 结果 ======

循环最好: 5.75402975707141E-9 [2]
循环运算数: 10/11
迭代数: 25
计算用时(时:分:秒:毫秒): 00:00:03:78
计算中止原因: 达到收敛判定标准
优化算法: 通用全局优化法(UGO1)
函数表达式 1: (2629.32072130138*x+0.676902938787872*x^2+2.06200660659653*10^(-4)*x^3-1.03386752205615*10^(-7)*x^4)
            -(2629.32072130138*(390)+0.676902938787872*(390)^2+2.06200660659653*10^(-4)*(390)^3-1.03386752205615
            *10^(-7)*(390)^4)+y*10^3*(-188.127606061783-0.0724019483237287*x+4.27818764486488*10^(-5)*x^2-7.97241646880469
            *10^(-9)*x^3)+z*10^3*(-146.463309091062-0.0699590675983468*x+2.73132867122831*10^(-5)*x^2-1.89277389234656
            *10^(-9)*x^3)-(0) = -2.659508027E-7
         2: exp((203.313957575831-0.187374285159722*x-6.36978438221116*10^(-5)*x^2+2.05433177929587*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)*(26+y+z)*(100-2*y-2*z)^2/(7-y)/(59-3*y-4*z)^3/100) = -0.0001500765038
         3: exp((161.469181816515-0.139830396262278*x-7.39304195921339*10^(-5)*x^2+2.22226107277689*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)^2*(26+y+z)*(100-2*y-2*z)^2/(2-z)/(59-3*y-4*z)^4/100) = -0.001700892691
目标函数值(最小): 2.11329937340161E-7
x: 874.419259088073
y: 6.32855809932954
z: 1.79733252858204

====== 计算结束 ======

************** 循环常数(LoopConstant) s=380 **************
====== 结果 ======

循环最好: 5.75402975707141E-9 [2]
循环运算数: 9/11
迭代数: 35
计算用时(时:分:秒:毫秒): 00:00:04:359
计算中止原因: 达到收敛判定标准
优化算法: 通用全局优化法(UGO1)
函数表达式 1: (2629.32072130138*x+0.676902938787872*x^2+2.06200660659653*10^(-4)*x^3-1.03386752205615*10^(-7)*x^4)
            -(2629.32072130138*(380)+0.676902938787872*(380)^2+2.06200660659653*10^(-4)*(380)^3-1.03386752205615
            *10^(-7)*(380)^4)+y*10^3*(-188.127606061783-0.0724019483237287*x+4.27818764486488*10^(-5)*x^2-7.97241646880469
            *10^(-9)*x^3)+z*10^3*(-146.463309091062-0.0699590675983468*x+2.73132867122831*10^(-5)*x^2-1.89277389234656
            *10^(-9)*x^3)-(0) = -2.423184924E-7
         2: exp((203.313957575831-0.187374285159722*x-6.36978438221116*10^(-5)*x^2+2.05433177929587*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)*(26+y+z)*(100-2*y-2*z)^2/(7-y)/(59-3*y-4*z)^3/100) = 0.0002064548616
         3: exp((161.469181816515-0.139830396262278*x-7.39304195921339*10^(-5)*x^2+2.22226107277689*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)^2*(26+y+z)*(100-2*y-2*z)^2/(2-z)/(59-3*y-4*z)^4/100) = -0.001717193895
目标函数值(最小): 1.94343716403099E-7
x: 866.056795704515
y: 6.32835862794973
z: 1.79735422234355

====== 计算结束 ======

************** 循环常数(LoopConstant) s=370 **************
====== 结果 ======

循环最好: 5.75402975707141E-9 [2]
循环运算数: 8/11
迭代数: 29
计算用时(时:分:秒:毫秒): 00:00:03:297
计算中止原因: 达到收敛判定标准
优化算法: 通用全局优化法(UGO1)
函数表达式 1: (2629.32072130138*x+0.676902938787872*x^2+2.06200660659653*10^(-4)*x^3-1.03386752205615*10^(-7)*x^4)
            -(2629.32072130138*(370)+0.676902938787872*(370)^2+2.06200660659653*10^(-4)*(370)^3-1.03386752205615
            *10^(-7)*(370)^4)+y*10^3*(-188.127606061783-0.0724019483237287*x+4.27818764486488*10^(-5)*x^2-7.97241646880469
            *10^(-9)*x^3)+z*10^3*(-146.463309091062-0.0699590675983468*x+2.73132867122831*10^(-5)*x^2-1.89277389234656
            *10^(-9)*x^3)-(0) = -2.824235708E-7
         2: exp((203.313957575831-0.187374285159722*x-6.36978438221116*10^(-5)*x^2+2.05433177929587*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)*(26+y+z)*(100-2*y-2*z)^2/(7-y)/(59-3*y-4*z)^3/100) = 1.846801434E-5
         3: exp((161.469181816515-0.139830396262278*x-7.39304195921339*10^(-5)*x^2+2.22226107277689*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)^2*(26+y+z)*(100-2*y-2*z)^2/(2-z)/(59-3*y-4*z)^4/100) = -0.001620216791
目标函数值(最小): 8.926810177328E-8
x: 857.719123919532
y: 6.32846870163267
z: 1.7973271911533

====== 计算结束 ======

************** 循环常数(LoopConstant) s=360 **************
====== 结果 ======

循环最好: 5.75402975707141E-9 [2]
循环运算数: 7/11
迭代数: 57
计算用时(时:分:秒:毫秒): 00:00:06:719
计算中止原因: 达到收敛判定标准
优化算法: 通用全局优化法(UGO1)
函数表达式 1: (2629.32072130138*x+0.676902938787872*x^2+2.06200660659653*10^(-4)*x^3-1.03386752205615*10^(-7)*x^4)
            -(2629.32072130138*(360)+0.676902938787872*(360)^2+2.06200660659653*10^(-4)*(360)^3-1.03386752205615
            *10^(-7)*(360)^4)+y*10^3*(-188.127606061783-0.0724019483237287*x+4.27818764486488*10^(-5)*x^2-7.97241646880469
            *10^(-9)*x^3)+z*10^3*(-146.463309091062-0.0699590675983468*x+2.73132867122831*10^(-5)*x^2-1.89277389234656
            *10^(-9)*x^3)-(0) = -2.422602847E-7
         2: exp((203.313957575831-0.187374285159722*x-6.36978438221116*10^(-5)*x^2+2.05433177929587*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)*(26+y+z)*(100-2*y-2*z)^2/(7-y)/(59-3*y-4*z)^3/100) = 7.349923021E-5
         3: exp((161.469181816515-0.139830396262278*x-7.39304195921339*10^(-5)*x^2+2.22226107277689*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)^2*(26+y+z)*(100-2*y-2*z)^2/(2-z)/(59-3*y-4*z)^4/100) = -0.001641849872
目标函数值(最小): 1.52754308717459E-7
x: 849.383851111312
y: 6.32843704140737
z: 1.79733394710515

====== 计算结束 ======

************** 循环常数(LoopConstant) s=350 **************
====== 结果 ======

循环最好: 5.75402975707141E-9 [2]
循环运算数: 6/11
迭代数: 36
计算用时(时:分:秒:毫秒): 00:00:04:265
计算中止原因: 达到收敛判定标准
优化算法: 通用全局优化法(UGO1)
函数表达式 1: (2629.32072130138*x+0.676902938787872*x^2+2.06200660659653*10^(-4)*x^3-1.03386752205615*10^(-7)*x^4)
            -(2629.32072130138*(350)+0.676902938787872*(350)^2+2.06200660659653*10^(-4)*(350)^3-1.03386752205615
            *10^(-7)*(350)^4)+y*10^3*(-188.127606061783-0.0724019483237287*x+4.27818764486488*10^(-5)*x^2-7.97241646880469
            *10^(-9)*x^3)+z*10^3*(-146.463309091062-0.0699590675983468*x+2.73132867122831*10^(-5)*x^2-1.89277389234656
            *10^(-9)*x^3)-(0) = -2.835295163E-7
         2: exp((203.313957575831-0.187374285159722*x-6.36978438221116*10^(-5)*x^2+2.05433177929587*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)*(26+y+z)*(100-2*y-2*z)^2/(7-y)/(59-3*y-4*z)^3/100) = 0.001516006757
         3: exp((161.469181816515-0.139830396262278*x-7.39304195921339*10^(-5)*x^2+2.22226107277689*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)^2*(26+y+z)*(100-2*y-2*z)^2/(2-z)/(59-3*y-4*z)^4/100) = -0.001349600203
目标函数值(最小): 1.66093045883778E-6
x: 841.013695380206
y: 6.32764734938586
z: 1.79735835410628

====== 计算结束 ======

************** 循环常数(LoopConstant) s=340 **************
====== 结果 ======

循环最好: 5.75402975707141E-9 [2]
循环运算数: 5/11
迭代数: 44
计算用时(时:分:秒:毫秒): 00:00:05:312
计算中止原因: 达到收敛判定标准
优化算法: 通用全局优化法(UGO1)
函数表达式 1: (2629.32072130138*x+0.676902938787872*x^2+2.06200660659653*10^(-4)*x^3-1.03386752205615*10^(-7)*x^4)
            -(2629.32072130138*(340)+0.676902938787872*(340)^2+2.06200660659653*10^(-4)*(340)^3-1.03386752205615
            *10^(-7)*(340)^4)+y*10^3*(-188.127606061783-0.0724019483237287*x+4.27818764486488*10^(-5)*x^2-7.97241646880469
            *10^(-9)*x^3)+z*10^3*(-146.463309091062-0.0699590675983468*x+2.73132867122831*10^(-5)*x^2-1.89277389234656
            *10^(-9)*x^3)-(0) = -2.215965651E-7
         2: exp((203.313957575831-0.187374285159722*x-6.36978438221116*10^(-5)*x^2+2.05433177929587*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)*(26+y+z)*(100-2*y-2*z)^2/(7-y)/(59-3*y-4*z)^3/100) = 0.0004477347936
         3: exp((161.469181816515-0.139830396262278*x-7.39304195921339*10^(-5)*x^2+2.22226107277689*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)^2*(26+y+z)*(100-2*y-2*z)^2/(2-z)/(59-3*y-4*z)^4/100) = -0.001486353658
目标函数值(最小): 7.60184999992666E-8
x: 832.730534101659
y: 6.32823682972746
z: 1.79732621825223

====== 计算结束 ======

************** 循环常数(LoopConstant) s=330 **************
====== 结果 ======

循环最好: 5.75402975707141E-9 [2]
循环运算数: 4/11
迭代数: 32
计算用时(时:分:秒:毫秒): 00:00:03:953
计算中止原因: 达到收敛判定标准
优化算法: 通用全局优化法(UGO1)
函数表达式 1: (2629.32072130138*x+0.676902938787872*x^2+2.06200660659653*10^(-4)*x^3-1.03386752205615*10^(-7)*x^4)
            -(2629.32072130138*(330)+0.676902938787872*(330)^2+2.06200660659653*10^(-4)*(330)^3-1.03386752205615
            *10^(-7)*(330)^4)+y*10^3*(-188.127606061783-0.0724019483237287*x+4.27818764486488*10^(-5)*x^2-7.97241646880469
            *10^(-9)*x^3)+z*10^3*(-146.463309091062-0.0699590675983468*x+2.73132867122831*10^(-5)*x^2-1.89277389234656
            *10^(-9)*x^3)-(0) = -2.204906195E-7
         2: exp((203.313957575831-0.187374285159722*x-6.36978438221116*10^(-5)*x^2+2.05433177929587*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)*(26+y+z)*(100-2*y-2*z)^2/(7-y)/(59-3*y-4*z)^3/100) = -2.805038639E-5
         3: exp((161.469181816515-0.139830396262278*x-7.39304195921339*10^(-5)*x^2+2.22226107277689*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)^2*(26+y+z)*(100-2*y-2*z)^2/(2-z)/(59-3*y-4*z)^4/100) = -0.001546348527
目标函数值(最小): 1.39864382864845E-7
x: 824.437621294838
y: 6.32849917032731
z: 1.7973117914537

====== 计算结束 ======

************** 循环常数(LoopConstant) s=320 **************
====== 结果 ======

循环最好: 5.75402975707141E-9 [2]
循环运算数: 3/11
迭代数: 46
计算用时(时:分:秒:毫秒): 00:00:05:704
计算中止原因: 达到收敛判定标准
优化算法: 通用全局优化法(UGO1)
函数表达式 1: (2629.32072130138*x+0.676902938787872*x^2+2.06200660659653*10^(-4)*x^3-1.03386752205615*10^(-7)*x^4)
            -(2629.32072130138*(320)+0.676902938787872*(320)^2+2.06200660659653*10^(-4)*(320)^3-1.03386752205615
            *10^(-7)*(320)^4)+y*10^3*(-188.127606061783-0.0724019483237287*x+4.27818764486488*10^(-5)*x^2-7.97241646880469
            *10^(-9)*x^3)+z*10^3*(-146.463309091062-0.0699590675983468*x+2.73132867122831*10^(-5)*x^2-1.89277389234656
            *10^(-9)*x^3)-(0) = -2.408050932E-7
         2: exp((203.313957575831-0.187374285159722*x-6.36978438221116*10^(-5)*x^2+2.05433177929587*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)*(26+y+z)*(100-2*y-2*z)^2/(7-y)/(59-3*y-4*z)^3/100) = 0.0004661750118
         3: exp((161.469181816515-0.139830396262278*x-7.39304195921339*10^(-5)*x^2+2.22226107277689*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)^2*(26+y+z)*(100-2*y-2*z)^2/(2-z)/(59-3*y-4*z)^4/100) = -0.001413752816
目标函数值(最小): 6.59891214748941E-8
x: 816.122445679797
y: 6.32823070002178
z: 1.79731440553371

====== 计算结束 ======

************** 循环常数(LoopConstant) s=310 **************
====== 结果 ======

循环最好: 5.75402975707141E-9 [2]
循环运算数: 2/11
迭代数: 51
计算用时(时:分:秒:毫秒): 00:00:05:578
计算中止原因: 达到收敛判定标准
优化算法: 通用全局优化法(UGO1)
函数表达式 1: (2629.32072130138*x+0.676902938787872*x^2+2.06200660659653*10^(-4)*x^3-1.03386752205615*10^(-7)*x^4)
            -(2629.32072130138*(310)+0.676902938787872*(310)^2+2.06200660659653*10^(-4)*(310)^3-1.03386752205615
            *10^(-7)*(310)^4)+y*10^3*(-188.127606061783-0.0724019483237287*x+4.27818764486488*10^(-5)*x^2-7.97241646880469
            *10^(-9)*x^3)+z*10^3*(-146.463309091062-0.0699590675983468*x+2.73132867122831*10^(-5)*x^2-1.89277389234656
            *10^(-9)*x^3)-(0) = -1.98953785E-7
         2: exp((203.313957575831-0.187374285159722*x-6.36978438221116*10^(-5)*x^2+2.05433177929587*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)*(26+y+z)*(100-2*y-2*z)^2/(7-y)/(59-3*y-4*z)^3/100) = 0.000197999513
         3: exp((161.469181816515-0.139830396262278*x-7.39304195921339*10^(-5)*x^2+2.22226107277689*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)^2*(26+y+z)*(100-2*y-2*z)^2/(2-z)/(59-3*y-4*z)^4/100) = -0.001423204704
目标函数值(最小): 5.75402975707141E-9
x: 807.839491790817
y: 6.32837995885227
z: 1.79730197411813

====== 计算结束 ======

************** 循环常数(LoopConstant) s=300 **************
====== 结果 ======

循环运算数: 1/11
迭代数: 32
计算用时(时:分:秒:毫秒): 00:00:04:375
计算中止原因: 达到收敛判定标准
优化算法: 通用全局优化法(UGO1)
函数表达式 1: (2629.32072130138*x+0.676902938787872*x^2+2.06200660659653*10^(-4)*x^3-1.03386752205615*10^(-7)*x^4)
            -(2629.32072130138*(300)+0.676902938787872*(300)^2+2.06200660659653*10^(-4)*(300)^3-1.03386752205615
            *10^(-7)*(300)^4)+y*10^3*(-188.127606061783-0.0724019483237287*x+4.27818764486488*10^(-5)*x^2-7.97241646880469
            *10^(-9)*x^3)+z*10^3*(-146.463309091062-0.0699590675983468*x+2.73132867122831*10^(-5)*x^2-1.89277389234656
            *10^(-9)*x^3)-(0) = -2.325396053E-7
         2: exp((203.313957575831-0.187374285159722*x-6.36978438221116*10^(-5)*x^2+2.05433177929587*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)*(26+y+z)*(100-2*y-2*z)^2/(7-y)/(59-3*y-4*z)^3/100) = -4.739967952E-5
         3: exp((161.469181816515-0.139830396262278*x-7.39304195921339*10^(-5)*x^2+2.22226107277689*10^(-8)*x^3)
            /(8.314*x)/1000)-((y+2*z)^2*(26+y+z)*(100-2*y-2*z)^2/(2-z)/(59-3*y-4*z)^4/100) = -0.001453509401
目标函数值(最小): 1.17682781787427E-7
x: 799.563987513939
y: 6.32851536048123
z: 1.797294439407

====== 计算结束 ======
作为示例,我将上限只取到了400。

评分

1

查看全部评分

 楼主| 发表于 2010-10-11 17:46 | 显示全部楼层
谢谢啊。。
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-12-23 11:34 , Processed in 0.065956 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表