BookmarkSubscribeRSS Feed
cloudyhill
Fluorite | Level 6

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?

5 REPLIES 5
RobPratt
SAS Super FREQ

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.

cloudyhill
Fluorite | Level 6

Thanks! I really hope the next version of SAS/OR can integrate those functions in the mixed integer programming solver. 

PatrickYang
Obsidian | Level 7

I hope the NLP solver in PROC OPTMODEL can handle integer decision variables in the future so that no linearization is needed.

RobPratt
SAS Super FREQ

Direct support for mixed integer nonlinear problems in PROC OPTMODEL is on our road map.  Until then, you might consider using PROC OPTLSO:

http://support.sas.com/documentation/cdl/en/orlsoug/68155/HTML/default/viewer.htm#orlsoug_hplso_toc....

 

Also, you can model some nonlinearity with integer variables in PROC OPTMODEL by using the ELEMENT predicate in the CLP solver:

http://support.sas.com/documentation/cdl/en/ormpug/68156/HTML/default/viewer.htm#ormpug_clpsolver_ex...

PatrickYang
Obsidian | Level 7

Thank you much, Rob.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Multiple Linear Regression in SAS

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.

Discussion stats
  • 5 replies
  • 1611 views
  • 1 like
  • 3 in conversation