MODEL:
SETS:
QUARTERS/1,2,3,4/:DEM,RP,OP,INV;
ENDSETS
MIN=@sum{QUARTERS:400*RP(i)+450*OP+20*INV};
@FOR{QUARTERS{I}:RP{I}<40};
@FOR{QUARTERS{I}|I#GT#1:
INV{I}=INV{I-1}+RP{I}+OP{I}-DEM{I};};
INV{1}=10+RP{1}+OP{1}-DEM{1};
DATA:
DEM=40,60,75,25;
ENDDATA
END