The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: fmincon tolfun tolx and tolcon question/clarification
Replies: 4   Last Post: Jan 28, 2013 10:48 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jesse Sipple

Posts: 8
Registered: 7/21/11
Re: fmincon tolfun tolx and tolcon question/clarification
Posted: Jan 24, 2013 9:14 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Alan_Weiss <> wrote in message <kdrca6$33a$>...
> On 1/23/2013 9:08 PM, Jesse Sipple wrote:
> > I've been using fmincon (interior-point, bounded, with no nonlinear
> > constraints, not specifying a gradient) for an optimization problem.
> > I've had great success with the method and spent much time reading the
> > literature before coming to the final decision to use this algorithm
> > to assist me in solving my optimization problem.
> >
> > I have setup the problem such that the objective function is
> > normalized by it's initial value so that it starts from 1 with a goal
> > of going to 0. My parameters that I am passing are unitless, and can
> > be thought of as a percent running from 2 (200%) to 0 (0%) and
> > starting at 1 (100%).
> > Recently, I have needed to push the optimization a bit since as I
> > modify my problem, I encounter parameters that are slightly less
> > sensitive than what I have been dealing with in the past.
> > Typically, the constraints on the problem I have set are delta(x)
> > (TolX) = 1e-4 which ends up being one hundredth of a percent and
> > delta(f) (TolCon) = 1e-8 (which is TolX^2).
> >
> > When I was reviewing the literature to see how to make both TolX and
> > TolCon tighter constraints, I ran into this graph:
> >
> > (found here:
> >
> > This led me to believe that I have been specifying TolCon wrong all
> > along, what I wanted to specify was a tolerance to constrain the
> > change in the objective function. Looking further into the material
> > online, I found that TolCon was the "tolerance on the constraint
> > violation".
> >
> > So I thought I have been doing it wrong all along and removed
> > specifying TolCon and specified TolFun as 1e-8 and the optimization
> > stopped even sooner than before, since the default for TolCon is 1e-6.
> >
> > So my question is, why isn't TolFun seeming to be what it appears to
> > be in the graph
> > (, and what is
> > TolCon doing? I'm nowhere near the bounds of the problem when it
> > stops. And what specifically is the "constraint violation" that
> > TolCon is controlling? The optimization seems to be prematurely
> > stopping due to the TolCon constraint but I don't want to change the
> > value for that without knowing exactly what it's controlling.
> >
> > Thanks for your help!

> Take a look at the documentation of tolerances:
> Alan Weiss
> MATLAB mathematical toolbox documentation

Thanks for responding so quickly!

I've looked at that documentation before but I looked at it again and it is still unclear.

From studying that and looking at some more descriptions in optimtool, it seems that TolCon is the constraint for the nonlinear constraints (c(x) > TolCon or |ceq(x)| > TolCon). However, in this problem I do not have any nonlinear constraints (in the syntax for fmincon I place [] where the nonlinear constraints would be) so why is the stopping criteria detailed message saying that the optimization has stopped due to criteria involving TolCon when I have no nonlinear constraints? Or is it just including TolCon in the output message since, as described in the website you provided, TolCon is more of a secondary tolerance and won't halt an optimization unless another tolerance is met?

Also, in the documentation it refers to "eps" (...Generally set tolerances such as TolFun and TolX to be well above eps...), what does eps mean here?

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.