早教吧作业答案频道 -->英语-->
lingo报错如下:Indexvariablesmaynotsharenameswithothervariables.老是遇到这个问题,model:sets:nd/1..10/:i,x,k,e,a;hy/1..4/:j;ch/1..3/:l,z,s,f;links(nd,hy):y,b,c,g;links1(nd,nd):d;endsetsmin=0.4*(@sum(nd:x*a)-91690)^2+0.3*(@sum(link
题目详情
lingo报错如下:Index variables may not share names with other variables.老是遇到这个问题,
model:
sets:
nd/1..10/:i,x,k,e,a;
hy/1..4/:j;
ch/1..3/:l,z,s,f;
links(nd,hy):y,b,c,g;
links1(nd,nd):d;
endsets
min=0.4*(@sum(nd:x*a)-91690)^2+0.3*(@sum(links:y*b*c)+@sum(ch:z*s))+0.3*(@sum(nd(i):@sum(hy(j):y(i,j))*@sum(nd(k):d(i,k)));
@sum(nd:e*x)>908;
@sum(ch:f*z)>908;
@sum(links:b*y)=6;
@sum(links:g*b*y)>908;
@for(nd(i):@bin(x));
@for(links:@bin(y));
@for(nd(i):@for(hy(j):y(i,j)
model:
sets:
nd/1..10/:i,x,k,e,a;
hy/1..4/:j;
ch/1..3/:l,z,s,f;
links(nd,hy):y,b,c,g;
links1(nd,nd):d;
endsets
min=0.4*(@sum(nd:x*a)-91690)^2+0.3*(@sum(links:y*b*c)+@sum(ch:z*s))+0.3*(@sum(nd(i):@sum(hy(j):y(i,j))*@sum(nd(k):d(i,k)));
@sum(nd:e*x)>908;
@sum(ch:f*z)>908;
@sum(links:b*y)=6;
@sum(links:g*b*y)>908;
@for(nd(i):@bin(x));
@for(links:@bin(y));
@for(nd(i):@for(hy(j):y(i,j)
▼优质解答
答案和解析
你的i j k 都只是下标 并不是集里面的元素 不要在集里面定义 否则会出错
另外你还有括号配对错误等问题 自己根据lingo
另外你还有括号配对错误等问题 自己根据lingo
看了 lingo报错如下:Inde...的网友还看了以下: