On Nov 22, 2010, at 3:51 AM, Julius Ziegler wrote:
Steven G. Johnson wrote:
On Nov 9, 2010, at 1:47 PM, Julius Ziegler wrote:
Never mind, I had a signed-ned bug in the code that was setting up
the constraints, so none where defined in the case that I
reported! It works perfectly now, even when initialising x from
outside the solution set!
I'm glad it works for you. The algorithms with nonlinear
constraints all attempt to work even if you have a starting point
that violates the constraints (is "infeasible").
However, I should point out that local optimization algorithms
(like SLSQP, MMA, and COBYLA) can only guarantee convergence to a
local optimum if you give a feasible starting point (one that
satisfies the constraints). The reason is that you can construct
nonlinear problems where finding a feasible point in the first
place requires global optimization.
Thanks for the additional information, Steven. I wonder how NLOPT
decides on how "hard" to try on solving the constraints? I had set
up some problems with difficult constraints and initialisation far
inside of the infeasible set. NLOPT (I am using SQP or AUGLAG/LBFGS
for most of the time) then occasionally fails with a generic
"std::runtime_error, what(): nlopt failure" exception. How does the
algorithm know (or guess) that further iterations won't bring it
into the feasible set? Is there a way to set up the termination
criteria that makes the algorithm try harder?
First, you should realize that SQP and LBFGS are local optimization
algorithms. They can only go "downhill", i.e. move based on what the
functions are doing locally. If they get trapped at a point where
improving one constraint worsens another no matter what direction one
moves in, then there is nothing whatsoever that they can do to find a
feasible region. This is why local optimization algorithms cannot be
guaranteed to converge if you don't give them a feasible starting point.
Most likely, this is why SLSQP is returning FAILURE, which it does
when its local solver gets stuck because the inequality constraints
are incompatible.
If you need to solve this kind of problem, you must use global
optimization. Currently, the only global optimizers in NLopt that
handle nonlinear constraints are AUGLAG (although deciding on
termination criteria for the inner global solver is tricky) or ISRES.
Steven
_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss