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/12/25 12:41:05
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