作业帮 > 综合 > 作业

lingo哪错了?MODEL:sets:Quarters/1..4/:a,k,d,c,t,p;endsetsdata:k

来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/11 13:03:11
lingo哪错了?
MODEL:
sets:
Quarters/1..4/:a,k,d,c,t,p;
endsets
data:
k=25,35,30,10;
d=10,15,25,20;
c=1000,800,800,1000;
t=13,12,12,10;
p=7.04,7.04,7.04,7.04;
enddata
min=@sum(Quarters:a*c*p*0.0001+(0.75t+1.08*p^3+15.71*p^2+76.80*p-116.55)*a+0.15*@sum(quarters(i):@sum(quarters(j)|j#LE#i:a(j)-d(j)));
@for(quarters:a>=0);
@for(quarters:a=0);
end
lingo哪错了?MODEL:sets:Quarters/1..4/:a,k,d,c,t,p;endsetsdata:k
没看出你那个i是用来做啥的.
MODEL:
sets:
Quarters/1..4/:a,k,d,c,t,p;
endsets
data:
k=25,35,30,10;
d=10,15,25,20;
c=1000,800,800,1000;
t=13,12,12,10;
p=7.04,7.04,7.04,7.04;
enddata
min=@sum(Quarters:a*c*p*0.0001+(0.75*t+1.08*p^3+15.71*p^2+76.80*p-116.55)*a+0.15*@sum(quarters(i):@sum(quarters(j)|j#LE#i:a(j)-d(j))));
!@for(quarters:a>=0);!lingo默认变量非负的;
@for(quarters:a=0);
end
再问: min=@sum(Quarters:a*c*p*0.0001+(0.75t+1.08*p^3+15.71*p^2+76.80*p-116.55)*a+0.15*@sum(quarters(i):@sum(quarters(j)|j#LE#i:a(j)-d(j))); 这一句似乎有问题
再答: 没有语法错误,至于模型问题就需要你自己检查一下了。。。