Mercurial > hg > octave-nkf
changeset 13206:658aa9fd8665
sqp: provide warnings for QP subproblem failures
* sqp.m: Warn if the QP subproblem is non-convex and unbounded,
infeasible, or the solution fails to converge.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 24 Sep 2011 10:38:19 -0400 |
parents | abf1e00111dd |
children | 0257eb36e15a |
files | scripts/optimization/sqp.m |
diffstat | 1 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/optimization/sqp.m +++ b/scripts/optimization/sqp.m @@ -443,7 +443,19 @@ info = INFO.info; - ## Check QP solution and attempt to recover if it has failed. + ## FIXME -- check QP solution and attempt to recover if it has + ## failed. For now, just warn about possible problems. + + id = "Octave:SQP-QP-subproblem"; + switch (info) + case 2 + warning (id, "sqp: QP subproblem is non-convex and unbounded"); + case 3 + warning (id, "sqp: QP subproblem failed to converge in %d iterations", + INFO.solveiter); + case 6 + warning (id, "sqp: QP subproblem is infeasible"); + endswitch ## Choose mu such that p is a descent direction for the chosen ## merit function phi.