11-13-2015 11:02 AM
Say I have multiple decision variables x1,x2,x3, x4. Is there a simple way to set x4=max(x1,x2,x3), or x4=abs(x1) using MIP? I know CPLEX can do this by using maxl and abs functions. I suppose SAS/OR can do the same thing?
11-15-2015 08:54 AM - edited 11-15-2015 09:02 AM
For the NLP solver, you can use the MAX and ABS functions with variables as arguments. In that case, PROC OPTMODEL recognizes the nondifferentiability and uses numeric derivatives instead. But no automatic linearization is performed.
If you just want to assign x4 to a value, outside of a solver call rather than as a constraint, the syntax you provided is perfectly legal.
02-09-2016 01:30 PM
Direct support for mixed integer nonlinear problems in PROC OPTMODEL is on our road map. Until then, you might consider using PROC OPTLSO:
Also, you can model some nonlinearity with integer variables in PROC OPTMODEL by using the ELEMENT predicate in the CLP solver: