model:
sets:
cabin/1..3/:wet,vol;
goods/1..4/:m,v,p;
link(goods,cabin):x;
endsets
data:
wet=10,16,8;
vol=6800,8700,5300;
m=18,15,23,12;
v=480,650,580,390;
p=3100,3800,3500,2850;
enddata
max=@sum(goods(i):p(i)*@sum(cabin(j):x(i,j)));
@for(goods(i):@sum(cabin(j):x(i,j))<m(i));
@for(cabin(j):@sum(goods(i):x(i,j))<wet(j));
@for(cabin(j):@sum(goods(i):x(i,j)*v(i))<vol(j));
@for(cabin(j):
@for(cabin(k)|k#GT#j:
@sum(goods(i):x(i,j)/wet(j))=@sum(goods(i):x(i,k))/wet(k)));
end