bugGNU Octave - Bugs: bug #50067, function: qp.m, incorrect vectors...

 
 

bug #50067: function: qp.m, incorrect vectors dimension

Submitter:  nicodemus <nicmus>
Submitted:  Tue 17 Jan 2017 03:07:14 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 08 Feb 2017 05:33:43 AM UTC, comment #3: 

I think this was a copy/paste error or something trivial like that.  I reverted the two lines in qp.m to match the script from Octave version 4.0.3 and this example works again.  See http://hg.savannah.gnu.org/hgweb/octave/rev/c7fb1f95842e.

Fixed, closing report.

Rik <rik5>
Group administrator
Thu 19 Jan 2017 07:57:20 AM UTC, comment #2: 


H = eye(2);
A = [1 -1];
b = 0;
Ai = [-1 -1];
bi = [-1];
x0 = [-10;10];

[x,~,info] = qp (x0,2*H,0*x0,A,b,[],[],[],Ai,bi);


the code fails with the following error in 4.2.0:


error: glpk: A must be 1 by 3, not 1 by 2
error: called from
    glpk at line 506 column 5
    qp at line 382 column 27
    t1 at line 9 column 11


This script runs smoothly if the default qp.m shipped with 4.2.0 is edited to match the previous version. That is to say changing in lines 376,377 n -> n-n_eq.

nicodemus <nicmus>
Wed 18 Jan 2017 06:40:30 PM UTC, comment #1: 

Could you post example code that works in 4.0.3 and fails in 4.2.0?

Rik <rik5>
Group administrator
Tue 17 Jan 2017 03:07:14 PM UTC, original submission:  

With the new release 4.2.0 the call to the function qp.m results in a crash for an infeasible initial guess x0.

The function that aborts the execution is glpk called at qp.m:380.

The problem seems to be due to bad dimension of vectors ctmp and lb.

Octave 4.2.0 on microsoft windows
------------------------------------
376: ctmp = [zeros(n, 1); ones(n_in, 1)];
377: lb = [-Inf(n,1); zeros(n_in,1)];

Octave 4.0.3 on linux
------------------------------------
376: ctmp = [zeros(n-n_eq, 1); ones(n_in, 1)];
377: lb = [-Inf(n-n_eq,1); zeros(n_in,1)];

The problem is solved by using the old version of qp.m

nicodemus <nicmus>

 

(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 jwe (Updated the item)
  • -email is unavailable- added by nicmus (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-08 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
        Operating SystemMicrosoft Windows Any
    2017-01-18 rik5 StatusNone Need Info
    2017-01-17 jwe Item GroupSegfault, Bus Error, etc. Unexpected Error or Warning

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code