lingo报错如下:Index variables may not share names with other variables.老是遇到这个问题,model:sets:at/a1..a3/:x;bt/b1..b4/:s1,s2;ct/c1..c3/:s3;links(at,bt):r;endsetsmin=@sum(at:x);@sum(at:x)>=26;@sum(bt:x)=s1(j));@for(ct(j):@sum(bt(i):r
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/15 06:36:38
![lingo报错如下:Index variables may not share names with other variables.老是遇到这个问题,model:sets:at/a1..a3/:x;bt/b1..b4/:s1,s2;ct/c1..c3/:s3;links(at,bt):r;endsetsmin=@sum(at:x);@sum(at:x)>=26;@sum(bt:x)=s1(j));@for(ct(j):@sum(bt(i):r](/uploads/image/z/14971025-65-5.jpg?t=lingo%E6%8A%A5%E9%94%99%E5%A6%82%E4%B8%8B%EF%BC%9AIndex+variables+may+not+share+names+with+other+variables.%E8%80%81%E6%98%AF%E9%81%87%E5%88%B0%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%2Cmodel%3Asets%3Aat%2Fa1..a3%2F%3Ax%3Bbt%2Fb1..b4%2F%3As1%2Cs2%3Bct%2Fc1..c3%2F%3As3%3Blinks%28at%2Cbt%29%3Ar%3Bendsetsmin%3D%40sum%28at%3Ax%29%3B%40sum%28at%3Ax%29%3E%3D26%3B%40sum%28bt%3Ax%29%3Ds1%28j%29%29%3B%40for%28ct%28j%29%3A%40sum%28bt%28i%29%3Ar)
lingo报错如下:Index variables may not share names with other variables.老是遇到这个问题,model:sets:at/a1..a3/:x;bt/b1..b4/:s1,s2;ct/c1..c3/:s3;links(at,bt):r;endsetsmin=@sum(at:x);@sum(at:x)>=26;@sum(bt:x)=s1(j));@for(ct(j):@sum(bt(i):r
lingo报错如下:Index variables may not share names with other variables.老是遇到这个问题,
model:
sets:
at/a1..a3/:x;
bt/b1..b4/:s1,s2;
ct/c1..c3/:s3;
links(at,bt):r;
endsets
min=@sum(at:x);
@sum(at:x)>=26;
@sum(bt:x)=s1(j));
@for(ct(j):@sum(bt(i):r(i,j)*s2(i))=16);
data:
s1=50 10 20 15;
s2=4 5 6 8;
enddata
end
lingo报错如下:Index variables may not share names with other variables.老是遇到这个问题,model:sets:at/a1..a3/:x;bt/b1..b4/:s1,s2;ct/c1..c3/:s3;links(at,bt):r;endsetsmin=@sum(at:x);@sum(at:x)>=26;@sum(bt:x)=s1(j));@for(ct(j):@sum(bt(i):r
model:
sets:
at/a1..a3/:x;
bt/b1..b4/:s1,s2;
ct/c1..c3/:s3;
links(bt,at):r;
endsets
min=@sum(at:x);
@sum(at:x)>=26;
@sum(at:x)<=31;
@for(bt(i):@sum(ct(j):r(i,j)*x(j))>=s1(i));
@for(ct(j):@sum(bt(i):r(i,j)*s2(i))<=19);
@for(at(j):@sum(bt(i):r(i,j)*s2(i))>=16);
data:
s1=50 10 20 15;
s2=4 5 6 8;
enddata
end