필터 지우기
필터 지우기

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