01-15-2014 02:22 PM
I want to solve a optimization problem where my objective function includes call of a user defined function. Since SAS do not allow us to create a user-defined function I have to use a macro to use it as if it is a function.
I am stating my problem mathematically below:
var x, y;
min z =x**2-x-2*y-x*y+y**2+function(x,y);
print x y;
Above function is very simple but it is analogous to my function which is very complicated.
So how should I do this kind of optimization in SAS using proc optmodel.
Thanks in advance for your support.
01-16-2014 09:14 AM
Do the data change in real time? If not, you might be able to load it into PROC OPTMODEL sets and arrays, write an impvar that does the same function evaluation, then use that impvar in your objective.