http://www.mathworks.com/matlabcentral/newsreader/view_thread/326234
MATLAB Central Newsreader  First order optimality Measure
Feed for thread: First order optimality Measure
enus
©19942014 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Wed, 30 Jan 2013 18:05:08 +0000
First order optimality Measure
http://www.mathworks.com/matlabcentral/newsreader/view_thread/326234#896659
George A.
Hello all,<br>
<br>
I am trying to solve a system of nonlinear equations <br>
I have 2 formulations of the system. <br>
The one formulation is better scaled, exploiting some algebra. I solve this using lsqnonlin and get a solution, with a function norm and first order optimality measure within the tolerances I set (10^10).<br>
<br>
I then give this solution to the 2nd formulation to check that it is recognized as a solution in this formulation as well. Although the function norm at this point (the solution found for the 1st formulation) is still "pretty small" (greater than before but still 10^7), the first order optimality measure is huge (10^4). Both with the Jacobian turned 'on' or 'off'.<br>
<br>
Could there be any Matlabrelated reason why this is happening? <br>
<br>
Any thoughts are appreciated,<br>
George

Wed, 30 Jan 2013 18:21:08 +0000
Re: First order optimality Measure
http://www.mathworks.com/matlabcentral/newsreader/view_thread/326234#896664
Matt J
"George A." <ga2311@columbia.edu> wrote in message <kebnck$oln$1@newscl01ah.mathworks.com>...<br>
><br>
> I then give this solution to the 2nd formulation to check that it is recognized as a solution in this formulation as well. Although the function norm at this point (the solution found for the 1st formulation) is still "pretty small" (greater than before but still 10^7), the first order optimality measure is huge (10^4). Both with the Jacobian turned 'on' or 'off'.<br>
> <br>
> Could there be any Matlabrelated reason why this is happening? <br>
==================<br>
<br>
Any differences in bound constraints imposed in the second formulation? The first order optimality measure would have to take those into account, too.

Thu, 31 Jan 2013 17:15:12 +0000
Re: First order optimality Measure
http://www.mathworks.com/matlabcentral/newsreader/view_thread/326234#896766
George A.
"Matt J" wrote in message <keboak$skq$1@newscl01ah.mathworks.com>...<br>
> "George A." <ga2311@columbia.edu> wrote in message <kebnck$oln$1@newscl01ah.mathworks.com>...<br>
> ><br>
> > I then give this solution to the 2nd formulation to check that it is recognized as a solution in this formulation as well. Although the function norm at this point (the solution found for the 1st formulation) is still "pretty small" (greater than before but still 10^7), the first order optimality measure is huge (10^4). Both with the Jacobian turned 'on' or 'off'.<br>
> > <br>
> > Could there be any Matlabrelated reason why this is happening? <br>
> ==================<br>
> <br>
> Any differences in bound constraints imposed in the second formulation? The first order optimality measure would have to take those into account, too.<br>
========================<br>
<br>
Thank you for this Matt.<br>
No the bounds are the same in both cases [0,inf], and the tolerances as well

Fri, 01 Feb 2013 20:59:05 +0000
Re: First order optimality Measure
http://www.mathworks.com/matlabcentral/newsreader/view_thread/326234#896870
Matt J
"George A." <ga2311@columbia.edu> wrote in message <kee8r0$mka$1@newscl01ah.mathworks.com>...<br>
><br>
> Thank you for this Matt.<br>
> No the bounds are the same in both cases [0,inf], and the tolerances as well<br>
===============<br>
<br>
OK. Well, it could be happening for purely mathematical reasons. Consider even the very simple linear scalar lsq problem<br>
<br>
min f(x) = (a*x)^2/2<br>
<br>
where a=1e5. Then at x0=1e8, the objective function is quite small<br>
<br>
f(x0) = 5e7<br>
<br>
but the first order optimality measure, i.e. the derivative, is 100....considerably larger.

Mon, 04 Feb 2013 04:10:07 +0000
Re: First order optimality Measure
http://www.mathworks.com/matlabcentral/newsreader/view_thread/326234#897052
George A.
"Matt J" wrote in message <kehaap$qts$1@newscl01ah.mathworks.com>...<br>
> "George A." <ga2311@columbia.edu> wrote in message <kee8r0$mka$1@newscl01ah.mathworks.com>...<br>
> ><br>
> > Thank you for this Matt.<br>
> > No the bounds are the same in both cases [0,inf], and the tolerances as well<br>
> ===============<br>
> <br>
> OK. Well, it could be happening for purely mathematical reasons. Consider even the very simple linear scalar lsq problem<br>
> <br>
> min f(x) = (a*x)^2/2<br>
> <br>
> where a=1e5. Then at x0=1e8, the objective function is quite small<br>
> <br>
> f(x0) = 5e7<br>
> <br>
> but the first order optimality measure, i.e. the derivative, is 100....considerably larger.<br>
================<br>
<br>
Well, I don't think this should be the case here, because I already have a point found as a solution for the first formulation (norm and 1st order optimality measure < 10^6), but this same point when provided as initial point to the second (equivalent) formulation gives a 1st order optimality measure of 10^4..

Mon, 04 Feb 2013 21:36:11 +0000
Re: First order optimality Measure
http://www.mathworks.com/matlabcentral/newsreader/view_thread/326234#897116
George A.
"George A." <ga2311@columbia.edu> wrote in message <kencav$mhu$1@newscl01ah.mathworks.com>...<br>
> "Matt J" wrote in message <kehaap$qts$1@newscl01ah.mathworks.com>...<br>
> > "George A." <ga2311@columbia.edu> wrote in message <kee8r0$mka$1@newscl01ah.mathworks.com>...<br>
> > ><br>
> > > Thank you for this Matt.<br>
> > > No the bounds are the same in both cases [0,inf], and the tolerances as well<br>
> > ===============<br>
> > <br>
> > OK. Well, it could be happening for purely mathematical reasons. Consider even the very simple linear scalar lsq problem<br>
> > <br>
> > min f(x) = (a*x)^2/2<br>
> > <br>
> > where a=1e5. Then at x0=1e8, the objective function is quite small<br>
> > <br>
> > f(x0) = 5e7<br>
> > <br>
> > but the first order optimality measure, i.e. the derivative, is 100....considerably larger.<br>
> ================<br>
> <br>
> Well, I don't think this should be the case here, because I already have a point found as a solution for the first formulation (norm and 1st order optimality measure < 10^6), but this same point when provided as initial point to the second (equivalent) formulation gives a 1st order optimality measure of 10^4..<br>
<br>
Let me rephrase my question:<br>
Since I have 2 formulations of the same problem, which are equivalent in algebraic terms. Is there any possible explanation (scaling problem of one of the 2 formulations, significant nonlinearities or anything) why the numerical solution given to one, is not recognized as a (numerical) solution to the other? <br>
In other words could it be the case that equivalence in algebraic terms, does not necessarily mean equivalence in numerical terms? Or this is absurd and the only explanation can be an error with my code in one of the 2 versions (although I have not managed to find such an error up to now)

Tue, 05 Feb 2013 16:00:14 +0000
Re: First order optimality Measure
http://www.mathworks.com/matlabcentral/newsreader/view_thread/326234#897181
George A.
"George A." <ga2311@columbia.edu> wrote in message <kep9kb$j1c$1@newscl01ah.mathworks.com>...<br>
> "George A." <ga2311@columbia.edu> wrote in message <kencav$mhu$1@newscl01ah.mathworks.com>...<br>
> > "Matt J" wrote in message <kehaap$qts$1@newscl01ah.mathworks.com>...<br>
> > > "George A." <ga2311@columbia.edu> wrote in message <kee8r0$mka$1@newscl01ah.mathworks.com>...<br>
> > > ><br>
> > > > Thank you for this Matt.<br>
> > > > No the bounds are the same in both cases [0,inf], and the tolerances as well<br>
> > > ===============<br>
> > > <br>
> > > OK. Well, it could be happening for purely mathematical reasons. Consider even the very simple linear scalar lsq problem<br>
> > > <br>
> > > min f(x) = (a*x)^2/2<br>
> > > <br>
> > > where a=1e5. Then at x0=1e8, the objective function is quite small<br>
> > > <br>
> > > f(x0) = 5e7<br>
> > > <br>
> > > but the first order optimality measure, i.e. the derivative, is 100....considerably larger.<br>
================<br>
<br>
Well, I don't think this should be the case here, because I already have a point found as a solution for the first formulation (norm and 1st order optimality measure < 10^6), but this same point when provided as initial point to the second (equivalent) formulation gives a 1st order optimality measure of 10^4..<br>
<br>
Let me rephrase my question:<br>
Since I have 2 formulations of the same problem, which are equivalent in algebraic terms. Is there any possible explanation (scaling problem of one of the 2 formulations, significant nonlinearities or anything) why the numerical solution given to one, is not recognized as a (numerical) solution to the other? <br>
In other words could it be the case that equivalence in algebraic terms, does not necessarily mean equivalence in numerical terms? Or this sounds absurd?