上传者: 42202078
|
上传时间: 2022-03-05 16:41:37
|
文件大小: 488KB
|
文件类型: -
LINGO解法
model:
sets:
var/1..5/;
link(var,var):c,x;
endsets
data:
c= 3 8 2 10 3
8 7 2 9 7
6 4 2 7 5
8 4 2 3 5
9 10 6 9 10;
enddata
min=@sum(link:c*x);!取遍link中的值作为下标;
@for(var(i):@sum(var(j):x(i,j))=1);
@for(var(j):@sum(var(i):x(i,j))=1);
@for(link:@bin(x));!限定x为0,;
end