sets:row/1..7/:;col/1..16/:C;link(row,col):x,S;endsetsmax=@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));