I am new to AMPL and learning the language along with my course: operations research. This is my code(basic level) :=
set tool;
set machine;
param maxweight=15000;
param profit{tool};
param demand{tool};
param time{tool,machine};
param maxtime{machine};
param weight{tool};
var number{tool};
maximize money: sum{i in tool} profit[i]*number[i];
subject to steel: sum{i in tool} weight[i]*number[i]<=maxweight;
subject to mouldandassemb {i in tool}:
sum{j in machine} time[i,j]*number[i]<=maxtime[j]; # error j is not defined
subject to totaldemand {i in tool}: tool[i]<=demand[i];
Please point out any syntax or parenthesis mistakes
Thanks,