lingo提示错误missing right parenthesis

model:sets:factory/p1..p6/:p;warhouse/w1..w4/:a,f,g;customer/c1..c6/:d;tr/tr1..tr4/:z... model:
sets:
factory/p1..p6/:p;
warhouse/w1..w4/:a,f,g;
customer/c1..c6/:d;
tr/tr1..tr4/:z;
link1(factory,warhouse):c,w;
link2(warhouse,customer):h,x;
endsets
data:
p=40000 50000 60000 70000 60000 40000;
a=70000 60000 70000 50000;
f=500000 300000 400000 400000;
g=3 2 5 4;
d=10000 20000 10000 20000 30000 10000;
c=6 5 4 2
2 3 4 9
6 8 7 5
7 4 2 3
4 2 5 1
3 4 1 7;
h=3 2 7 4 7 5
6 1 4 2 5 3
2 4 5 3 6 8
5 6 3 7 4 6;
enddata
min=@sum(link1(k,i):c(k,i)*w(k,i))+@sum(link2(i,j):h(i,j)*x(i,j))+@sum(link1(k,i):g(i)*w(k,i))+@sum(warhouse(i):f(i)*z(i));
@for(factory(k):
@sum(link1(k,i):w(k,i))<=p(k);
@for(warhouse(i):
@sum(link2(i,j):x(i,j))=@sum(link1(k,i):w(k,i));
@for(customer(j):
@sum(link2(i,j):x(i,j))>=d(j));
@sum(warhouse(i):
@sum(link1(k,i):w(k,i))<=(a(i)*z(i)));
@sum(tr(i):z(i))<=3;
@for(tr(i):@bin(z));
end

提示出错的是:@sum(link1(k,i):w(k,i))<=(a(i)*z(i)));
请各位大虾帮忙~~
展开
 我来答
wswhk
2011-09-28 · TA获得超过7.1万个赞
知道顶级答主
回答量:4.6万
采纳率:68%
帮助的人:7.4亿
展开全部
model:
sets:
factory/p1..p6/:p;
warhouse/w1..w4/:a,f,g;
customer/c1..c6/:d;
tr/tr1..tr4/:z;
link1(factory,warhouse):c,w;
link2(warhouse,customer):h,x;
endsets
data:
p=40000 50000 60000 70000 60000 40000;
a=70000 60000 70000 50000;
f=500000 300000 400000 400000;
g=3 2 5 4;
d=10000 20000 10000 20000 30000 10000;
c=6 5 4 2
2 3 4 9
6 8 7 5
7 4 2 3
4 2 5 1
3 4 1 7;
h=3 2 7 4 7 5
6 1 4 2 5 3
2 4 5 3 6 8
5 6 3 7 4 6;
enddata
min=@sum(link1(k,i):c(k,i)*w(k,i))+@sum(link2(i,j):h(i,j)*x(i,j))+@sum(link1(k,i):g(i)*w(k,i))+@sum(warhouse(i):f(i)*z(i));
@for(factory(k):
@sum(link1(k,i):w(k,i))<=p(k));
@for(warhouse(i):
@sum(customer(j):x(i,j))=@sum(factory(k):w(k,i)));
@for(customer(j):
@sum(warhouse(i):x(i,j))>=d(j));
@for(warhouse(i):
@sum(factory(k):w(k,i))<=(a(i)*z(i)));
@sum(tr(i):z(i))<=3;
@for(tr(i):@bin(z(i)));
end
追问
非诚感谢您~~
这个程序是一篇文献当中的,我用您的程序算了一下,跟文献中给出的答案稍有出入。
请问我给出的程序是哪里出错了呢?
追答
那就不知道了 你自己对照模型看一下跟这个写的是不是一致 我不知道你的问题是什么没法说
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式