Hi Dear all,
I have a question that in my programming, I have already setted the lower bound of every variable is zero. Why there is still some variables lower than zero?
Thank you

 Akzeptierte Antwort

Matt J
Matt J am 9 Mai 2014
Bearbeitet: Matt J am 9 Mai 2014

0 Stimmen

Only certain algorithms enforce bounds strictly (sqp, interior-point with 'AlwaysHonorConstraints' option active). Otherwise, they can be violated up to the TolCon tolerance parameter. Also, fmincon may have failed to find a solution. You need to check the exitflag output to see if it reported success.

4 Kommentare

Wanying
Wanying am 10 Mai 2014
sorry, could u tell me what does it mean, fial to find a solution? thank u
Matt J
Matt J am 11 Mai 2014
Bearbeitet: Matt J am 11 Mai 2014
fmincon uses iterative algorithms to find a solution. It generates a sequence x1,x2,x3... which is supposed to converge to the optimum x*. But there are various ways that the convergence can fail. For example, there is a an option parameter MaxIter which sets a limit on the number of iterations it can do. If MaxIter is reached, the algorithm will simply stop, regardless of how close it is to a solution and how well the constraints are satisfied.
Wanying
Wanying am 11 Mai 2014
Hi,your answer is really really useful for me, Thank u so much. However, I have another question, what does it mean F-count which is shown in the command window. I know the meaning of it is the cumulative number of times Rosenbrock's function was evaluated. But, what kind of information I can get from it . Or how can i know soem information after knowing this value? Thank u
Matt J
Matt J am 11 Mai 2014
You should post that as a different question (and close this one).

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Gefragt:

am 9 Mai 2014

Kommentiert:

am 11 Mai 2014

Community Treasure Hunt

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

Start Hunting!

Translated by