声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2801|回复: 2

[1stopt] 求1stopt高手帮忙解答

[复制链接]
发表于 2012-5-25 18:08 | 显示全部楼层 |阅读模式

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

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

x
小弟最近刚接触1stopt,需求解一个四阶非线性方程组,但用1.5版本运行时出现‘函数表达式有误’提示,仔细看了看,输入的没问题。不知道是不是版本过低的问题,求高手帮忙运行一下,非常感谢。代码如下:




parameters x1[0,1000],x2[0,1000],x3[0,1000],x4[0,1000];
constant

f1=0.2,f2=0.01,r=10,r1=0.1,GG=14e+3,UU1=7.7884,UU2=7.7780,UU3=7.2193,UU4

=5.8261,gre1=0,gre2=3.567e+4,gre3=2.7122e+004,gre4=10604.262330186127655

90660274028778076171875;
Function  -2*r*(f1*(0.38887*(x2/2+x1/2)^0.1532-0.371)+f2*(-

3.5332+9.6273*(x2/2+x1/2)-0.1282*(x2/2+x1/2)^2+5e-4*(x2/2+x1/2)^3)+(1-

f1-f2)*(10^(1.9153+1.7202*log10((x2/2+x1/2))-0.4146*log10((x2/2+x1/2))

^2)))*(x2-x1)+(f1*6550*(0.152+2.10*10^(-3)*x1^3)+f2*6380*(1.1-0.4*x1+5e

-2*x1^2-4e-5*x1^3)+(1-f1-f2)*8940*(7.582e-4*x1^3))*(x1-UU1)-1/xx1*r1*

(f1*(0.38887*(x2/2+x1/2)^0.1532-0.371)+f2*(-3.5332+9.6273*(x2/2+x1/2)-

0.1282*(x2/2+x1/2)^2+5e-4*(x2/2+x1/2)^3)+(1-f1-f2)*(10^

(1.9153+1.7202*log10((x2/2+x1/2))-0.4146*log10((x2/2+x1/2))^2)))*(x2-

x1)-GG+gre1=0;
          r*(f1*(0.38887*(x2/2+x1/2)^0.1532-0.371)+f2*(-3.5332+9.6273*

(x2/2+x1/2)-0.1282*(x2/2+x1/2)^2+5e-4*(x2/2+x1/2)^3)+(1-f1-f2)*(10^

(1.9153+1.7202*log10((x2/2+x1/2))-0.4146*log10((x2/2+x1/2))^2)))*(x2-

x1)+(f1*6550*(0.152+2.10*10^(-3)*x2^3)+f2*6380*(1.1-0.4*x2+5e-2*x2^2-4e

-5*x2^3)+(1-f1-f2)*8940*(7.582e-4*x2^3))*(x2-UU2)-r*(f1*(0.38887*

(x3/2+x2/2)^0.1532-0.371)+f2*(-3.5332+9.6273*(x3/2+x2/2)-0.1282*

(x3/2+x2/2)^2+5e-4*(x3/2+x2/2)^3)+(1-f1-f2)*(10^(1.9153+1.7202*log10

((x3/2+x2/2))-0.4146*log10((x3/2+x2/2))^2)))*(x3-x2)-1/x(2)*r1*(f1*

(0.38887*(x3/2+x2/2)^0.1532-0.371)+f2*(-3.5332+9.6273*(x3/2+x2/2)-

0.1282*(x3/2+x2/2)^2+5e-4*(x3/2+x2/2)^3)+(1-f1-f2)*(10^

(1.9153+1.7202*log10((x3/2+x2/2))-0.4146*log10((x3/2+x2/2))^2)))*(x3-

x2)-GG+gre2=0;
          r*(f1*(0.38887*(x3/2+x2/2)^0.1532-0.371)+f2*(-3.5332+9.6273*

(x3/2+x2/2)-0.1282*(x3/2+x2/2)^2+5e-4*(x3/2+x2/2)^3)+(1-f1-f2)*(10^

(1.9153+1.7202*log10((x3/2+x2/2))-0.4146*log10((x3/2+x2/2))^2)))*(x3-

x2)+(f1*6550*(0.152+2.10*10^(-3)*x3^3)+f2*6380*(1.1-0.4*x3+5e-2*x3^2-4e

-5*x3^3)+(1-f1-f2)*8940*(7.582e-4*x3^3))*(x3-UU3)-r*(f1*(0.38887*

(x4/2+x3/2)^0.1532-0.371)+f2*(-3.5332+9.6273*(x4/2+x3/2)-0.1282*

(x4/2+x3/2)^2+5e-4*(x4/2+x3/2)^3)+(1-f1-f2)*(10^(1.9153+1.7202*log10

((x4/2+x3/2))-0.4146*log10((x4/2+x3/2))^2)))*(x4-x3)-1/x(3)*r1*(f1*

(0.38887*(x4/2+x3/2)^0.1532-0.371)+f2*(-3.5332+9.6273*(x4/2+x3/2)-

0.1282*(x4/2+x3/2)^2+5e-4*(x4/2+x3/2)^3)+(1-f1-f2)*(10^

(1.9153+1.7202*log10((x4/2+x3/2))-0.4146*log10((x4/2+x3/2))^2)))*(x4-

x3)-GG+gre3=0;
          r*(f1*(0.38887*(x4/2+x3/2)^0.1532-0.371)+f2*(-3.5332+9.6273*

(x4/2+x3/2)-0.1282*(x4/2+x3/2)^2+5e-4*(x4/2+x3/2)^3)+(1-f1-f2)*(10^

(1.9153+1.7202*log10((x4/2+x3/2))-0.4146*log10((x4/2+x3/2))^2)))*(x4-

x3)+(f1*6550*(0.152+2.10*10^(-3)*x4^3)+f2*6380*(1.1-0.4*x4+5e-2*x4^2-4e

-5*x4^3)+(1-f1-f2)*8940*(7.582e-4*x4^3))*(x4-UU4)-r*(f1*(0.38887*

(x5/2+x4/2)^0.1532-0.371)+f2*(-3.5332+9.6273*(x5/2+x4/2)-0.1282*

(x5/2+x4/2)^2+5e-4*(x5/2+x4/2)^3)+(1-f1-f2)*(10^(1.9153+1.7202*log10

((x5/2+x4/2))-0.4146*log10((x5/2+x4/2))^2)))*(x5-x4)-1/x(4)*r1*(f1*

(0.38887*(x5/2+x4/2)^0.1532-0.371)+f2*(-3.5332+9.6273*(x5/2+x4/2)-

0.1282*(x5/2+x4/2)^2+5e-4*(x5/2+x4/2)^3)+(1-f1-f2)*(10^

(1.9153+1.7202*log10((x5/2+x4/2))-0.4146*log10((x5/2+x4/2))^2)))*(x5-

x4)-GG+gre4=0;
回复
分享到:

使用道具 举报

发表于 2012-5-30 15:53 | 显示全部楼层
1::公式中出现了“xx1”,应该写成“x1”吧?
2:"Log10"在1stOpt中应该直接写成“log”,自然对数用“ln”

改正后应该运行没问题。
发表于 2012-6-3 16:42 | 显示全部楼层
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

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

GMT+8, 2024-11-24 22:37 , Processed in 0.057280 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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