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?
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.
Thanks! I really hope the next version of SAS/OR can integrate those functions in the mixed integer programming solver.
I hope the NLP solver in PROC OPTMODEL can handle integer decision variables in the future so that no linearization is needed.
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:
Thank you much, Rob.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.