필터 지우기
필터 지우기

What is the meaning of -10 exit flag in optimization toolbox?

조회 수: 2 (최근 30일)
Stefan
Stefan 2012년 4월 6일
I am doing some optimization using the global optimization toolbox and am getting a lot of -10 exit flags from the local runs of MultiStart. While, the documentation says that this means an error in the user supplied functions, this does not help me much in trying to figure out what is going on.
Could this be a result of the fact that my problem might not be guaranteed to be smooth? I do get a solution in at least 1 of the local runs that terminates with a flag of 1.
I am currently using MultiStart and fmincon, should I change to patternsearch instead?
Any help is appreciated.

채택된 답변

Walter Roberson
Walter Roberson 2012년 4월 6일
An error in the user defined function could mean that your function went complex, inf, or NaN. If you had been using fzero() instead of fmincon() then it could indicate the supplied endpoints did not have different signs when evaluated for the function.
Other possibilities include that your user function generated an error, such as if you made an assumption about vector sizes that turned out not to be true under some conditions (a horzcat or vertcat error), or if you accidentally coded matrix multiplication or matrix division or matrix power where you wanted element-by-element calculations.
  댓글 수: 3
Walter Roberson
Walter Roberson 2012년 4월 7일
An error does get thrown in that case, but fmincon() is catching the error and smoothly returning an error flag result that the multistart routine is turning into its own error flag result.
If your quest at this point is to find out what error is being generated, use
dbstop if caught error
You might also want to try
dbstop if naninf
Stefan
Stefan 2012년 6월 8일
Sorry for the late reply, thanks for the advice, I managed to clear things up!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Direct Search에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by