Lingo代码
MODEL:
sets:
item/1..9/:x;
endsets
min=@sum(item(i):x(i));
x(1)+x(2)+x(3)+x(4)+x(5)>=2;
x(3)+x(5)+x(6)+x(8)+x(9)>=3;
x(4)+x(6)+x(7)+x(9)>=2;
x(3)<=x1;
x(3)<=x2;
x(4)<=x7;
x(5)<=x1;
x(5)<=x2;
x(6)<=x7;
x(8)<=x5;
x(9)<=x1;
x(9)<=x2;
@for(item(i):@bin(x(i)));
END
来源:CSDN
作者:至始至终jy
链接:https://blog.csdn.net/qq_43527713/article/details/103846234