Steel
lp
OOQP
AMPL
short
0;
param avail>= 0;
param profit {PROD};
param market {PROD};
var Make {p in PROD} >= 0, <= market[p] ;
maximize total_profit : sum {p in PROD} profit[p] * Make[p] ;
subject to Time : sum {p in PROD} (1/rate[p]) * Make[p] <= avail;
]]>
set PROD := bands coils ;
param: rate profit market :=
bands 200 25 6000
coils 140 30 4000 ;
param avail := 40;
solve;
display Make;
"Steel" example from chapter 1 of AMPL book. More examples
are available at:
http://www.ampl.com/cm/cs/what/ampl/BOOK/EXAMPLES/index_files.html