Aims to minimize the function f(x, y), where the range of x and y are provided. f(x, y) is calculated by the ratio of functions g(x, y) and h(x, y, z), where h(x, y, z) is minimized for each (x, y) and the range z is provided. Example: f(x, y)=g(x, y)/min (h(x, y, z)); g(x, y)=1/x+1/y; h(x, y, z)=x/z+y; The below code is definitely not working but I like to show what the picture is proc iml; start funch(x) global(var1 var2); f = var1/x[1]+var2; *where var1 and var2 are x[1] and x[2] in funcf return (f); finish funch; start funcf(x); con = {1, 10}; x0 = {1}; optn = {1 1}; call nlphqn(rc, xres, "funch", x0, optn) blc=con; h=x[1]/xrec+x[2]; g=1/x[1]+1/x[2]; f = g/h; return (f); finish funcf; con = {0.01 0.02, 0.05 0.05}; x0 = {0.01 0.02}; optn = {1 1}; call nlphqn(rc, xres, "funcf", x0, optn) blc=con; print xres; Your help would be appreciated!
... View more