fmincon multiple optimal solution

7 次查看(过去 30 天)
amin re
amin re 2014-1-31
评论: hscbsc 2016-8-5
Hi,
I use fmincon to solve an optimization. The problem is that, I know theoretically my cost function will have multiple optimal points, however fmincon generates different solutions at each run. I expect it should stick to one solution. The algorithm is 'trust-region', as it uses finite difference method for hessian estimation, I suspect if some sort of randomness is behind it, causing different optimal solutions at each run.
Thanks for any comment and solution, how to get a unique solution.
  3 个评论
Igor
Igor 2014-1-31
编辑:Igor 2014-1-31
The results must be exactly the same if you keep the same start point and all of the options associated with the 'fmincon' algorithm. 'fmincon' is a deterministic solver, which means nothing should alter the way it works unless there are uncertainties. For example, if your objective is noisy rather than deterministic, you might get a different result each time.
If you would like to get many local minima, use 'MultiStart' from the Global Optimization Toolbox. That would give you an idea about the "landscape" of your objective. If you need a single "global" solution (global minimum), use 'GlobalSearch' from the same toolbox. Even though it is effective enough, there is no guarantee the solution produced will be global. The more information you know about your objective and possible solution bounds, the better your chances of finding a solution you want to have.
hscbsc
hscbsc 2016-8-5
Hi,
I am facing a similar problem. Different fmincon runs give different answer. Not drastically different but differs at e-02 level or so. In my case my function is unsolvable for certain values, for this I render the objective function to a high value (10e+10). I use exactly the same options same initial points.

请先登录,再进行评论。

回答(2 个)

Shashank Prasanna
Shashank Prasanna 2014-1-31
If you use the same starting point you must get the same results. If you use the Trust-Region-Reflective algorithm for the solver and if x0 is not strictly feasible, fmincon chooses a new strictly feasible (centered) starting point.
More information can be found here:
Make sure there is no randomness associated with the objective function. If you do have access to the global optimization toolbox, you can use Multistart with fmincon to find the global minima:
Or use PATTERNSEARCH:

Matt J
Matt J 2014-1-31
编辑:Matt J 2014-1-31
I know theoretically my cost function will have multiple optimal points
If the multiple optimal points you mention form a continuum, for example when the objective function has the form f(A*x) where the matrix A has non-zero null vectors, then your problem is ill-posed/unstable and needs to be reformulated. As the others have been saying, you should expect to get the same solution if run repeatedly on the same machine, the same input data, and from the exact same initial point. However, if you change architecture at all, or make even small changes to the input data, you can't rule out arbitrarily large jumps in the result.

类别

Help CenterFile Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by