inthesky 发表于 2012-5-25 18:08

求1stopt高手帮忙解答

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




parameters x1,x2,x3,x4;
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;

dingd 发表于 2012-5-30 15:53

1::公式中出现了“xx1”,应该写成“x1”吧?
2:"Log10"在1stOpt中应该直接写成“log”,自然对数用“ln”

改正后应该运行没问题。

xw_bai 发表于 2012-6-3 16:42

{:{13}:}
页: [1]
查看完整版本: 求1stopt高手帮忙解答