Hello,
I would do it with PROC OPTMODEL, but you can do it with PROC OPTLSO:
proc optlso
primalout = work.solution /* opt solution */
variables = opt_fl_o.variable_limits
/* variables= dataset with decision variable limits LB UB */
objective = work.objdata
lincon =work.lincondata /* work.lincondata OR _null_ */
NLINCON=work.nonlincondata /* work.nonlincondata OR _null_ */
loglevel = 1 printlevel = 1 seed = 100
;
run;
%PUT &=_OROPTLSO_; /*variable that gives feedback about opt status*/
You get the ERROR
ERROR: FCMP function evaluation failed
when you forgot to include one or more decision variables in the decision variable limits dataset (where you specify lower and upper bounds).
You can also get this same ERROR
when you use (the variable name of) non-decision variables among the function arguments and within the formula's when defining the non-linear constraints. Remove your non-decision variable from the list of function arguments and pass on its (fixed scalar) value to the formula in the return statement by means of a macro variable (for example).
Good luck,
Koen