[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #64369] sqp does not handle qp info=2 properly
From: |
Julien Bect |
Subject: |
[Octave-bug-tracker] [bug #64369] sqp does not handle qp info=2 properly |
Date: |
Thu, 29 Jun 2023 16:32:05 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?64369>
Summary: sqp does not handle qp info=2 properly
Group: GNU Octave
Submitter: jbect
Submitted: jeu. 29 juin 2023 20:32:03
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: stable
Discussion Lock: Any
Operating System: Any
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: jeu. 29 juin 2023 20:32:03 By: Julien Bect <jbect>
sqp does not handle qp info=2 properly.
In fact, when qp return with info=2, sqp simply issues a warning and then
continues as if nothing happened (cf lines 434-443):
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");
lambda = old_lambda; # The return value was size 0x0 in this case.
endswitch
The problem is that lambda is empty in this case, which implies a very
inelegant crash a few lines below, with the following cryptic error message:
error: operator *: nonconformant arguments (op1 is 3x6, op2 is 0x0)
error: called from
sqp at line 482 column 9
This behaviour is unsatifactory IMHO, since 1) the user gets a very opaque
error message, and 2) the function does not return the best point found so
far.
A few possible and easy workarounds:
*Option 1*: Exit properly with a dedicated error code, for instance 105: QP
subproblem not convex. (info=2 occurs, in the current implementation, when
the matrix is not positive definite)
*Option 2*: Proceed as in the case info=6, i.e., keep the previous vector of
Lagrange multipliers (lambda = old_lambda).
*Option 3*: Use option 2, but not more than, say, 10 times in a row. After
that, fold back to option 1.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64369>
_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #64369] sqp does not handle qp info=2 properly,
Julien Bect <=