bugGNU Octave - Bugs: bug #29577, 'sqp' function returns an...

 
 

bug #29577: 'sqp' function returns an error-code which is not contemplated in the documentation

Submitter:  Guido Walter Pettinari <coccoinomane>
Submitted:  Fri 16 Apr 2010 04:56:10 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.2.3 Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 23 Apr 2010 03:03:37 AM UTC, comment #1: 

Thanks for noticing this. 

I patched the problem with your provided solution in Mercurial changeset 83de7b060e91.  You will need to build from source to see the fix or wait until the next release.

Rik <rik5>
Group administrator
Fri 16 Apr 2010 04:56:10 PM UTC, original submission:  

Hello world!

In my current project I extensively use the minimization function 'sqp', which is a wrapper to 'qp'. This function returns the error state of the minimizer in the output variable 'info'. According to the documentation, the possible values of 'info' are 101 (success), 102 (failure) and 103 (exceeded number of iterations).

However, I often get 'info = 0'. I checked the file 'sqp.m' and I found out that this is basically a sign of success (0 is the return value of 'qp' on success). 'sqp' simply misses a line to translate the info state from qp's zero to 101. I believe that the fix would be simply to include the line:
"""
info = 101
"""
just before the break statement in:
""""
if (t2 && t3 && max ([t0; t1; t4]) < tol)
break;
endif
"""

Cheers,

Guido

Guido Walter Pettinari <coccoinomane>

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by coccoinomane (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.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-04-23 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code