Hi all:
I define 4 numeric variables: a, b, c, d and want to calculate the minimal value of objective function, and meet a problem.
When interating, the a variable named flag is based on variable a, b : flag=max(a,b), and the flag variable is also involved in the objective function, for example:
min f= X + a*Y * flag - ........;
that means the flag variable value and the objective function will change during each interation. So how to define them in proc optmodel.
Thanks!
I answer it by myself.
Use PROC FCMP to create some functions to solve it, the mechanism of SAS is a little different with that of MATLAB.
I answer it by myself.
Use PROC FCMP to create some functions to solve it, the mechanism of SAS is a little different with that of MATLAB.
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.
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.