model:
sets:
count/1..5/:p;
month/1..6/;
cost(month,count):price,x,y;
endsets
data:
price=1100 1200 1300 1100 1150
1300 1300 1100 900 1150
1100 1400 1300 1000 950
1200 1100 1200 1200 1250
1000 1200 1500 1100 1050
900 1000 1400 800 1350;
p=8.8 6.1 2.0 4.2 5;
enddata
max <a href="mailt=@sum(cost(i,j):1500*y(i,j)-price(i,j)*x(i,j)-(i-1)*50*(x(i,j)-y(i,j" target="_blank" >=@sum(cost(i,j):1500*y(i,j)-price(i,j)*x(i,j)-(i-1)*50*(x(i,j)-y(i,j</A>)))
@sum(cost(i,j):x(i,j)-y(i,j))=0;
@for(cost(i,j)y(i,1)+y(i,2))<200);
@for(cost(i,j)y(i,3)+y(i,4)+y(i,5))<250);
@for(cost(i,j):x<1000);
@for(cost(i,j)sum(count(j):p*y(i,j))<@sum(count(j):y(i,j))*6);
@sum(cost(i,j)sum(count(j):p*y(i,j))>@sum(count(j):y(i,j))*3);
@for(costgin(x));
@for(cost:@gin(y));
@for(cost(i,j):@sum(month(i):x(i,j)-y(i-1,j))<1000);
end
高手帮忙看看,谢谢了 |