What is the meaning of -10 exit flag in optimization toolbox?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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.
0 Commenti
Risposta accettata
Walter Roberson
il 6 Apr 2012
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 Commenti
Walter Roberson
il 7 Apr 2012
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
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Direct Search in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!