求lingo高手解答 25

求高手解答下这个程序的错误所在!model:sets:collect:i;recycle:s;handle:p;kind:j;r0(recycle,0):G;h0(han... 求高手解答下这个程序的错误所在!
model:
sets:
collect:i;
recycle:s;
handle:p;
kind:j;
r0(recycle,0):G;
h0(handle,0):T;
cr(collect,recycle):dist;
rh(recycle,handle):road;
crk(collect,recycle,kind):x,y;
rhk(recycle,handle,kind):z,u;
ck(collect,kind):A;
rk(recycle,kind):E;
hk(handle,kind):Q,F;
endsets
data
!流量约束;
@for(ck(I,J):
@sum(recycle(S):x(I,S,J))+@sum(recycle(S)|S#gt#1:y(I,S,J))=A(I,J));
@for(rk(1,J):
@sum(collect(I):x(I,1,J))-@sum(handle(P):x(1,P,J))-@sum(handle(P)|P#gt#1:y(1,P,J))=0);
@for(rk(S,J)|S#ge#2 and S#le#39:
@sum(collect(I):x(I,S,J)+y(I,S,J))-@sum(handle(p):z(s,p,j))-@sum(handle(p)|p#ge#2:u(s,p,j))=0);
@for(hk(1,j):
@sum(recycle(s):z(s,1,j)=Q(1,j)));
@for(hk(p,j)|p#ge#2:
@sum(recycle(s):z(s,p,j)+u(s,p,j))=Q(p,j));

!能力约束;
@sum(ck(i,j):x(i,1,j))>=30*G(1,0);
@sum(ck(i,j):x(i,1,j))<=60*G(1,0);
@sum(rk(s,j):z(s,1,j))>=45*T(1,0);
@sum(rk(s,j):z(s,1,j))<=70*T(1,0);
@for(recycle(s)|s#ge#2:
@sum(ck(i,j):x(i,s,j))>=30*G(s,0);
@sum(ck(i,j):x(i,s,j))<=60*G(s,0));
@for(rk(s,j)|s#ge#2:
@sum(collect(i):y(i,s,j))>=25*E(s,j);
@sum(collect(i):y(i,s,j))<=50*E(s,j));
@for(handle(p)|p#ge#2:
@sum(rk(s,j):z(s,p,j))>=45*T(p,0);
@sum(rk(s,j):z(s,p,j))<=70*T(p,0));
@for(rh(p,j)|p#ge#2:
@sum(handle(s):u(s,p,j))>=40*F(s,j);
@sum(handle(s):u(s,p,j))<=80*F(s,j));
!新建工厂的数量限制;
@sum(rk(s,j)|s#ge#2:G(s,j)<=3);
@sum(hk(p,j)|p#ge#2:T(s,j)<=4);
!目标函数;
min=@sum(crk(i,s,j):0.0003*dist(i,s)*x(i,s,j))+@sum(crk(i,s,j)|s#ge#2:0.0003*dist(i,s)*y(i,s,j))
+@sum(rhk(s,p,j):0.0003*road(s,p)*z(s,p,j))+@sum(rhk(s,p,j)|p#ge#2:0.0003*road(s,p)*u(s,p,j))
+@sum(crk(i,s,j):0.4*x(i,s,j))+@sum(crk(i,s,j)|s#ge#2:0.4*y(i,s,j))
+@sum(rhk(s,p,j):0.7*z(s,p,j))+@sum(rhk(s,p,j)|p#ge#2:0.7*u(s,p,j))
+@sum(handle(s)|s#ge#2:50*E(s,1)+40*E(s,2)+60*G(s,0))
+@sum(handle(p)|p#ge#2:700*F(p,1)+600*F(p,2)+800*T(p,0));
enddata
data
collect,recycle,handle,kind,A,dist,road=@ole('e:\collect.xls');
enddata
@for(r0(s,0):@bin(G));
@for(T0(p,0):@bin(T));
@for(rk(s,j)|s#ge#2:@bin(E));
@for(hk(p,j)|p#ge#2:@bin(F));
end
我的分数很少,请各位高手多多指正!不甚感激啊。
展开
 我来答
wswhk
2009-09-05 · TA获得超过7.1万个赞
知道顶级答主
回答量:4.6万
采纳率:68%
帮助的人:7.3亿
展开全部
开始集的定义就不对
r0(recycle,0):G;
h0(handle,0):T;
这个两句不符合lingo语法 括号里面必须要是集
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
百度网友a5f578b
2009-09-05 · TA获得超过753个赞
知道小有建树答主
回答量:360
采纳率:50%
帮助的人:334万
展开全部
r0(recycle,0):G;
h0(handle,0):T;
cr(collect,recycle):dist;
rh(recycle,handle):road;
crk(collect,recycle,kind):x,y;
rhk(recycle,handle,kind):z,u;
ck(collect,kind):A;
rk(recycle,kind):E;
hk(handle,kind):Q,F;
衍生集合定义方式不对
而且你定义的集合都没有元素,大量都没有元素的,对你以后的修改不好。最好加上集合元素
把错误信息号码发给我看看
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式