- model:
- sets:
- ro/1..100/:y;
- co/1..20/:d;
- link(ro,co):x,c;
- endsets
- data:
- y=?;
- d=?;
- c=?;
- enddata
- @for(ro(i):@sum(co(j):x(i,j))=3*y(i));
- @for(co(j):@sum(ro(i):x(i,j))<=d(j));
- @for(link(i,j):@bin(x));
- @for(ro(i):@bin(y));
- min=@sum(link(i,j)|c(i,j)#ne#0:(x(i,j)/c(i,j))^2);
复制代码
可能还有小问题,你自己调一下吧 |