Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: correct objective function for fmincon
Date: Sat, 22 Nov 2008 22:47:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 40
Message-ID: <gga256$79i$1@fred.mathworks.com>
References: <gg4mbo$rpr$1@fred.mathworks.com> <gg7864$l68$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1227394022 7474 172.30.248.35 (22 Nov 2008 22:47:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 22 Nov 2008 22:47:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1179973
Xref: news.mathworks.com comp.soft-sys.matlab:502552


Thanks a lot

I've missed the option "DiffMinChange" of the fmincon. By adjusting this option I've fixed my problem
-
Dmytro 
Marcelo Marazzi <mREMOVEmaALLraCAPITALSzzi@mathworks.com> wrote in message <gg7864$l68$1@fred.mathworks.com>...
> If you're not providing the gradients, fmincon will estimate them 
> internally via finite differences. You mention that the solver
> returns with a zero gradient. There is a chance that the function
> is flat around the initial point and therefore has zero gradient.
> Assuming the constraints are satisfied, then it's a stationary
> point and the solver may very well return that point (which is
> a local solution as far as fmincon is concerned).
> 
> You might want to test the value of the gradient yourself (via finite 
> differences) at the initial point and check it's value. If the function 
> is noisy, you may need to choose and appropriate stepsize.
> 
> -Marcelo
> 
> Dmytro Vasylenko wrote:
> > After the first iteration in fmincon I receive a gradient=0 and the answer:
> >  "Optimization terminated: first-order optimality measure less
> >  than options.TolFun and maximum constraint violation is less
> >  than options.TolCon.
> > No active inequalities."
> > 
> > My objective function is not Matlab code , the Matlab code is simply calling an external executable and feeds the results to the optimizer. I knew already an optimum solution and try to set the starting guess near this value. But it doesn't help.
> > 
> > For example the optimum solution is [34.04	  9.86	23.98	29.11	43.46	54.88	50.8	30.31]
> > 
> > By varying the first variable in the range 34.01-34.05 the objective function supply
> > [0.230	 0.1816 	0.141	0.1287 	0.1529]
> > that is the objective function is not highly extremal
> > 
> > What can be wrong in the objective function?
> > 
> > Thanks for your help in advance
> > 
> >