define the variables
var wrenches >=0; #number of wrenches to produce
var pliers >=0;
objective function
maximize earnings: 0.13 * wrenches + 0.10 * pliers;
contraints
subject to steel: 1.5 * wrenches + 1.0 * pliers;
subject to molding: 1 * wrenches + 1 * pliers;
subject to assembly: 0.3 * wrenches + 0.5 * pliers;
subject to demand1: wrencehs <=15000;
subject to demand2: pliers <=16000;
subject to nonneg1: wrenches>=0;
subject to nonneg2: pliers>=0;
The above is my input
I tried this
ampl? model gtc.mod;
ampl: solve;
No variables declared.
ampl:
ANd I get no variables declared