bugGNU Octave - Bugs: bug #54542, sqp: diffrence between...

 
 

bug #54542: sqp: diffrence between documentation and running results

Submitter:  Avinoam Kalma <avinoam>
Submitted:  Mon 20 Aug 2018 08:25:19 AM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Documentation
Status:  Confirmed Assigned to:  None
Originator Name:  Avinoam Open/Closed:  * Open
Release:  * 4.4.1 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 22 Aug 2018 04:38:33 AM UTC, comment #7: 

Running on Ubuntu 16.04, I get


>> test_sqp
x =

  -1.71714
   1.59571
   1.82725
  -0.76364
  -0.76364

obj =  0.053950
info =  101
iter =  10
nf =  15
lambda =

  -0.0401627
   0.0379578
  -0.0052227


... yet another result....

Avinoam Kalma <avinoam>
Group Member
Tue 21 Aug 2018 07:07:23 PM UTC, comment #6: 

Uh, yet another result.

Marco Caliari <caliari>
Group Member
Tue 21 Aug 2018 05:22:33 PM UTC, comment #5: 

with the patch applied I get:

x =

  -1.71714
   1.59571
   1.82725
  -0.76364
  -0.76364

obj =  0.053950
info =  101
iter =  10
nf =  10
lambda =

  -0.0401627
   0.0379578
  -0.0052227


Doug Stewart <dastew>
Tue 21 Aug 2018 04:16:07 PM UTC, comment #4: 

@Avinoam: strange, I see


octave:3> test_sqp
x =

  -1.71714
   1.59571
   1.82725
  -0.76364
  -0.76364

obj =  0.053950
info =  101
iter =  9
nf =  9
lambda =

  -0.0401627
   0.0379578
  -0.0052227


@Doug: does my patch work for you?

Marco Caliari <caliari>
Group Member
Tue 21 Aug 2018 05:41:46 AM UTC, comment #3: 

Running test_sqp from comment #1 with the revised sqp, I get


>> test_sqp
x =

  -1.71714
   1.59571
   1.82725
  -0.76364
  -0.76364

obj =  0.053950
info =  104
iter =  9
nf =  9
lambda =

  -0.0401627
   0.0379578
  -0.0052227


iter is now equals 9, but info is still 104.

Avinoam Kalma <avinoam>
Group Member
Mon 20 Aug 2018 02:39:28 PM UTC, comment #2: 

This discrepancy was introduced in #32008, comment #4. If you comment the break just after info = 104;, you see that at the next iteration sqp terminates with 101. I think it is a bit too strict to exit with 104 as soon as delx < tol * x, whitout testing whether x_new and company satisfies the problem. What about the attached proposal?

(file #44815)

Marco Caliari <caliari>
Group Member
Mon 20 Aug 2018 11:51:30 AM UTC, comment #1: 

On ubuntu 18.04 and octave 4.4.1
confirmed.
I see the same as OP

Doug Stewart <dastew>
Mon 20 Aug 2018 08:25:19 AM UTC, original submission:  


Running the examaple given in sqp documentation (test_sqp.m, attached)

I get:


>> test_sqp
x =

  -1.71714
   1.59571
   1.82725
  -0.76364
  -0.76364

obj =  0.053950
info =  104
iter =  8
nf =  9
lambda =

  -0.0401627
   0.0379578
  -0.0052227


info = 104 (The stepsize has become too smal), nf = 9,
while in the documentation info=101 (The algorithm terminated normally), and nf=10.

Is it a documentation error or function error?

Avinoam Kalma <avinoam>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44815:  sqp.diff added by caliari (1KiB - application/x-tex)
file #44814:  test_sqp.m added by avinoam (337B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by caliari (Updated the item)
  • -email is unavailable- added by dastew (Posted a comment)
  • -email is unavailable- added by avinoam (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-20 caliari Attached File- Added sqp.diff, #44815
        Operating SystemMicrosoft Windows Any
    2018-08-20 avinoam StatusNone Confirmed
    2018-08-20 avinoam Attached File- Added test_sqp.m, #44814

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code