optimization - Matlab fmincon Not Yielding Global Maximum/Minimum -


i new matlab, apologies if question silly. using fmincon function derive elements of m x n matrix (x) maximize following objective function subject non-negativity constraint and:

sum(x_{ij}) < 100

{f(x(1,1))+(f(x(1,2))+...+f(x(1,n))} + beta*{f(x(2,1))+(f(x(2,2))+...+f(x(2,n))}+...+(beta^(m-1))*{f(x(m,1))+(f(x(m,2))+...+f(x(m,n))}

where

f(xij)=zeta*[((alpha*pf*(xij^delta))-(pw*xij))^gamma]

in code used fmincon used, objective function non-linear:

function optim = optim(m,n) a= ones(1,m*n); b = 100; z = zeros(m,n); in = inf(m,n); x = ones(m,n);  [x, bestval] = fmincon(@myfun2,x,a,b,[],[],z,in,[])    function f = myfun2(x)   alpha = 5;   %kappa = 5;   zeta = 5;   beta = 0.90909;   delta = 0.4;   gamma = 0.4;   pf = 1;   pw = 1;    i= 1:m      f=0;      sum(i)=0;         j=1:n         sum(i) = sum(i) +((beta^(i-1))*(-1)*(zeta)*(((alpha*pf.*((x(i,j)).^delta))-                   (pw.*x(i,j)))^gamma));           end      f = f+sum(i)    end   end end 

when code run 5x5 matrix (optim(5,5)), resulting solution x =

1.5439    1.5439    1.5439    1.5439    1.5439 1.5439    1.5439    1.5439    1.5439    1.5439 1.5439    1.5439    1.5439    1.5439    1.5439 1.5439    1.5439    1.5439    1.5439    1.5439 3.1748    3.1748    3.1748    3.1748    3.1748   bestval =  -31.8780  

but not global minimum - marginal conditions specify @ global minimum have (for 1st row):

f'(x11)=...=f'(x1n)

and on each row. have each column:

f'(x11)=beta*f'(x21)=...=(beta^m-1)*f'(xm1)

for first column , on. none of these conditions satisfied resulting matrix. have looked @ the related questions in stack overflow , documentation , have no inkling of how better results. there problem code? can code tweaked better results?

can make marginal conditions stopping conditions , how go doing that. or can use jacobian in way? appreciated. thank you.

no optimization technique guaranteed return global minimum. algorithms guaranteed find local minimum if hessian positive definite, there no mathematical way determine function values , nth derivatives if local minimum global minimum.

now termination conditions. can pass in options structure fmincon, has parameters control operation of fmincon. can choose different algorithm best suit problem. read docs options structure, , see if there fits trying do.

http://www.mathworks.com/help/optim/ug/optimoptions.html


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -