Local and global optimization

One issue that often confuses users is local versus global optimization in Maple. I'm just going to give an overview here and will explore specific optimization topics more deeply in future blog entries. Please note that I'm covering only the numeric optimization methods here. I'll leave discussion of the exact methods in Maple to others more knowledgeable about those areas.

The Optimization package is built into Maple and is available to all users. This is primarily a local optimization package, using mostly routines provided by the Numerical Algorithms Group (NAG). There is just one exception: there is a global branch-and-bound method available for univariate problems with finite bounds and no general constraints, accessible through the NLPSolve command. "Local optimization" means that the method attempts to find a local minimum, and there is no guarantee that you will get the global minimum for the problem. There are some cases (convex problems like linear programs) where the local minimum found will in fact be the global minimum. However, for most situations, don't expect "the best answer" when using a local optimization algorithm.

Local optimization algorithms generally depend on derivatives of the cost function and constraints to aid in the search. Thus, there are strict requirements on the input. For example, NLPSolve requires that these functions be real-valued and twice continuously differentiable. Occasionally, NLPSolve will work even when the input does not fulfill these requirements, but there is no guarantee it will get the expected answer. I often get questions like the following, "NLPSolve works just fine for Case A which does not satisfy the input requirements, but it fails for Case B which is only slightly different, so is there a bug in the program?" The answer is often, "NLPSolve is working as expected. It could have failed for Case A but did not because you were lucky."

Local optimization also depends on an initial point. Even though we made the initial point optional for convenience, you really should provide one for cases where there are multiple local minima. The minimum that is returned depends on the initial point you provide.

Maplesoft also offers the Global Optimization Toolbox (GOT), which is a separate add-on to the Maple product. If you really do need a global solution, this is the product you should use. If a local solution will suffice or you have a convex problem, then use the Optimization package, as those algorithms are more efficient for that purpose.

The GOT accepts a much wider range of input than the local methods. For the default multi-start adaptive random search algorithm, only continuity of the functions is required. Again, people often ask me why it works "correctly" with discontinuous functions, and I can only reply that I'm glad it worked but I can't guarantee it'll work on a different case.

A misconception with the GOT is that "it always returns the best answer." A more accurate description is "it returns the best answer until the termination criteria are met." Because we're dealing with a numeric and not exact solver, and we're using randomized search, the search for the "best answer" continues until the maximum number of function evaluations has been reached, an arbitrary time limit has been reached, or there's been no change in the cost function in the last N evaluations. The documentation contains a more precise description of the termination criteria and how to adjust the parameters.

Having laid out all the limitations, I should say that, in practice, the GOT has proven to be very robust and effective for a lot of applications. As mentioned, it is frequently successful in cases where it's not theoretically guaranteed to work. It uses as its engine the established LGO software authored by Janos Pinter.

Comments

Global optimization

A lot of researchers deal almost in a daily basis with optimization problems (fitting, parameter finding, etc.). A lot of them are nonlinear. In these cases you aren’t sure if the problem you are involved is non-convex (meaning there are more than one local optima), unless you plot the function and see the behaviour in the whole domain. But what happens if you have to find 3 or more parameters? Can you plot the function? I guess not.

Then global optimization is a MUST. You have to be sure that you reached the best answer, or, as Paulina says, "the best answer until the termination criteria are met".

Another difficult task is when you don’t have a function, but rather a procedure (e.g. you want to find an upper limit of an integral with the latter equaling a value, or you have a matrix/vector of experimental data and a set of ODEs which describe its behaviour, so you want to find parameters by reducing the error between experimental and calculated values). These algorithms are difficult to find, or they are difficult to be implemented, which result to the same thing: you can’t deal with these problems.

So, there is a need not only for global optimization, but for examples, procedures and other stuff, supportive to the implementation.

convex optimization

Convex Optimization is the art of
transforming nonconvex problems into
convex problems.
Many probems believed nonconvex
can be shown to be convex. There are instances
of researchers posing problems in the literature
that they believe to be
nonconvex; e.g., ch.7.2.1 in
Convex Optimization & Euclidean Distance Geometry,
the "stress problem" in statistics and
operations research.

There are good software tools allowing intuitive
interface with Matlab; CVX allows writing a convex
optimization problem in Matlab almost identically
to how you would write it on a piece of paper.
http://www.stanford.edu/~boyd/cvx/

Jon Dattorro
http://convexoptimization.com
http://watchmykidspc.com

Convex conversation

I guess that the best way one to show the advantages of the transformation of a non-convex problem into a convex one is to give an example in Maple. While we are lacking the principles of convex programming, examples can be most intuitive.

Can all non-convex problems be transformed to convex? Then I guess that global optimization collapses (Theory: if a local minimum exists, then it is a global minimum [for convex programming]). Is this so?

Can we make our life easier finding algorithms for the said transformation? The link proposed above mentions: “Nevertheless, there remains a significant impediment to the more widespread adoption of convex programming: the high level of expertise required to use it” – by M. Grant, S. Boyd, and Y. Ye.

I would be fortunate to discover convex programming advantages or ways to optimize a procedure by the best method provided. I am not an expert in optimization, but I am a good listener and a quite fair reader.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}