model:
sets:
row/
1..
4/
:a,c,e;
col/
1..
3/
:b,d;
link(row,col):x;
endsets
data:
a=
18 15 23 12;
b=
10 16 8;
c=
480 650 580 390;
d=
6800 8700 5300;
e=
3100 3800 3500 2850;
enddata
max = @sum(row(i):@sum(col(j):x(i,j))*
e(i));
@for(row(i):@sum(col(j):x(i,j))<=
a(i));
@for(col(j):@sum(row(i):x(i,j))<=
b(j));
@for(col(j):@sum(row(i):x(i,j)*c(i))<=
d(j));
End
转载于:https://www.cnblogs.com/Arvin-9/p/4336983.html
相关资源:lingo软件下载