一下优化问题怎么用lingo编程来解决?

2025-01-02 14:29:14
推荐回答(1个)
回答1:

sets:
row/1..7/:;
col/1..16/:C;
link(row,col):x,S;
endsets
max=@sum(link(i,j):C(j)*x(i,j)+S(i,j)*x(i,j));
@for(col(j):@sum(row(i):x(i,j))<=1);
@for(row(i):1<=@sum(col(j):x(i,j));@sum(col(j):x(i,j))<=2);
@for(link:@bin(x));