bugGNU Octave - Bugs: bug #64369, sqp does not handle qp info=2...

 
 

bug #64369: sqp does not handle qp info=2 properly

Submitter:  Julien Bect <jbect>
Submitted:  Thu 29 Jun 2023 08:32:03 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * stable Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 02 Jul 2023 12:36:32 PM UTC, comment #1: 

Hi,

I have observed this sqp related error message.  Line number may not be exact as distribution.  I modified (add 2 lines) sqp to write out iteration information.  Thanks.  

error: operator *: nonconformant arguments (op1 is 15x31, op2 is 0x0)
error: called from sqp at line 482 column 9

Liang Tang <lt1234>
Thu 29 Jun 2023 08:32:03 PM UTC, original submission:  

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.

Julien Bect <jbect>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lt1234 (Posted a comment)
  • -email is unavailable- added by jbect (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-c373.
    Corresponding source code