lingo这个错误报告index variables may not share names with other variables是怎么回事?model:sets:var/1..12/:a;obj(var,var):x;endsetsdata:a=2.8 3.2 1.2 4 2.70.9 2.5 3.3 1.7 2.5 3.6 4.7;enddatamin=@sum(var(i):@sum(obj(k,l)|k#le#i:x(k,j)*a(j)))
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/29 10:25:49
lingo这个错误报告index variables may not share names with other variables是怎么回事?model:sets:var/1..12/:a;obj(var,var):x;endsetsdata:a=2.8 3.2 1.2 4 2.70.9 2.5 3.3 1.7 2.5 3.6 4.7;enddatamin=@sum(var(i):@sum(obj(k,l)|k#le#i:x(k,j)*a(j)))
lingo这个错误报告index variables may not share names with other variables是怎么回事?
model:
sets:
var/1..12/:a;
obj(var,var):x;
endsets
data:
a=2.8 3.2 1.2 4 2.70.9 2.5 3.3 1.7 2.5 3.6 4.7;
enddata
min=@sum(var(i):@sum(obj(k,l)|k#le#i:x(k,j)*a(j)));
@for(obj:@bin(x));
@for(var(i):@sum(var(j):x(i,j))=1);
@for(var(j):@sum(var(i):x(i,j))=1);
end
这那错了啊.求大神指导.
lingo这个错误报告index variables may not share names with other variables是怎么回事?model:sets:var/1..12/:a;obj(var,var):x;endsetsdata:a=2.8 3.2 1.2 4 2.70.9 2.5 3.3 1.7 2.5 3.6 4.7;enddatamin=@sum(var(i):@sum(obj(k,l)|k#le#i:x(k,j)*a(j)))
model:
sets:
var/1..12/:a;
obj(var,var):x;
endsets
data:
a=2.8 3.2 1.2 4 2.7 0.9 2.5 3.3 1.7 2.5 3.6 4.7;
enddata
min=@sum(var(i):@sum(obj(k,l)|k#le#i:x(k,l)*a(l)));
@for(obj:@bin(x));
@for(var(i):@sum(var(j):x(i,j))=1);
@for(var(j):@sum(var(i):x(i,j))=1);
end