Question: Optimization syntax/usage

I am trying to solve an optimization problem but I am getting an error message which does not make sense.

 

I have a procedure file called f. The decsiion vector is x[1..4]. and returns the objective function value Ls.

I then specify the constraints as a set and ask it to optimize

constraints:={x[1]+x[2]+x[3]+x[4]=65,x[1]<=20,x[2]<=15,x[3]<=20,x[4]<=15};

sol := NLPSolve( f,constraints, assume=nonnegative,minimize);

Error, (in Optimization:-NLPSolve) constraints must be specified as a set or list of procedures

 

This error makes no sense to me. Can anyone help?

Please Wait...