...bounds on variable,请高手指点!!!(一直LINGO菜鸟)
发布网友
发布时间:2024-10-10 16:24
我来回答
共1个回答
热心网友
时间:2024-11-18 17:24
model:
sets:
vec0/1..8/:y;
vec1/1..4/:d,z,s;
vec2/1..2/:m,b,j,u,t,zv,zh,zr,yr,yb,yfs;
!vec5(vec2,vec2)/1,4/:m/@cos(j);
!vec6(vec1,vec2)/1,6/:b/d;
endsets
DATA:
y=4.5 960 20 1.4 1.5 10 540 167;
!p=4.5;!n=960;!u0=20;!kh=1.4; !kf=1.5; !l=10; !flagh=540; !flagf=167;
Pi=3.1415926536;
ze=189.8;
enddata
s(1)=0.5*d(4)*@sum(vec1:d);
s(2)=Pi*d(4)^2/16;
s(3)=(d(1)+d(2))^2/8;
s(4)=(d(3)+d(4))*(d(2)+d(4))/8;
d(1)=m(1)*z(1)/@cos(j(1));
d(2)=m(1)*z(2)/@cos(j(1));
d(3)=m(2)*z(3)/@cos(j(2));
d(4)=m(2)*z(4)/@cos(j(2));
zv(1)=z(1)/(@cos(j(1)))^3;
zv(2)=z(3)/(@cos(j(2)))^3;
u(1)=z(2)/z(1);
u(2)=z(4)/z(3);
y(3)=u(1)*u(2);
@for(vec2(i):zh(i)=2.27235*((@cos(j(i)))^2+0.1325)^(3/4)/(@cos(j(i)))^0.5);
@for(vec2(i):(zr(i))^2*((0.5875-1/z(i)-1/z(i+1))*@cos(j(i)))=0.75354^2);
t(1)=950000*y(1)/y(2);
t(2)=0.97*u(1)*t(1);
@for(vec2(i):yr(i)=zr(i)^2);
@for(vec2(i):yb(i)=1-j(i)/140);
@for(vec2(i):yfs(i)=@if(zv(i)#le#23,8.16-1.276*@log(zv(i)),@if(zv(i)#le#60,4.85-0.224*@log(zv(i)),@if(zv(i)#le#100,3.952-0.00607*@log(zv(i)),3.658+0.0577*@log(zv(i))))));
MIN=(@sum(vec2(i):b(i))+y(6))*@sum(vec1(i):s(i));
@for(vec2:m-1.5>=0);
@for(vec2:zv>=17);
@for(vec2:@bnd(8*Pi/180,j,15*Pi/180));
u(1)<=1.5*u(2);
u(1)>=1.1*u(1);
b(1)<=1.2*d(1);
b(1)>=0.6*d(1);
b(2)<=1.2*d(3);
b(2)>=0.6*d(3);
ze*zh(1)*zr(1)*(0.475*y(4)*t(1)*(u(1)+1)/(u(1)*b(1)*d(1)*d(1)))^0.5<=y(7);
ze*zh(2)*zr(2)*(0.475*y(4)*t(2)*(u(2)+1)/(u(2)*b(2)*d(3)*d(3)))^0.5<=y(7);
yfs(1)*yr(1)*yb(1)*0.475*y(5)*t(1)/(b(1)*d(1)*m(1))<=y(8);
yfs(2)*yr(2)*yb(2)*0.475*y(5)*t(2)/(b(2)*d(3)*m(2))<=y(8);
@for(vec2(i):b(i)*@sin(j(i))/(Pi*m(i))>=1);
d(3)+d(4)>d(2);
end
这样改没有语法错误了 可以运行 但是没有可行解
你写的程序太乱了 开方和除法 三角函数都用的太多了
x前面根本没出现过 不知道你写了干什么用 具体是否有可行解这些要看具体的模型 你自己看看不加限制的解吧
你自己看看没加限制的解 自己算一下看看 我没法给你看 没有题目没有数据
语法没错