set PROD; # a set of products # parameters param profit {PROD}; # unit profit param usage {PROD} > 0; # unit usage of material param avail >= 0; # available material (wood) param demand {PROD} >= 0; # market demand limit # variables: quantities to produce var make {p in PROD} >= 0, <= demand[p]; # Objective: total profits from all products maximize total_profit: sum {p in PROD} profit[p] * make[p]; # Constraint: total use of material by all # products may not exceed the available subject to Availability: sum {p in PROD} usage[p] * make[p] <= avail;