octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #38875] strange errors using sqp


From: Urs Hackstein
Subject: [Octave-bug-tracker] [bug #38875] strange errors using sqp
Date: Fri, 03 May 2013 10:53:50 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.24) Gecko/20111101 SUSE/3.6.24-0.2.1 Firefox/3.6.24

URL:
  <http://savannah.gnu.org/bugs/?38875>

                 Summary: strange errors using sqp
                 Project: GNU Octave
            Submitted by: uhackstein
            Submitted on: Fr 03 Mai 2013 10:53:49 GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.4
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Hello,

I wrote a program grenzlinietest2.m which uses sqp and produces strange
errors. 

If I use octave version 3.2.4, everything works fine. After we updated to
version 3.6.4 and installed the package optim, we received the following
error

warning: sqp: QP subproblem failed to converge in 200 iterations
warning: sqp: QP subproblem failed to converge in 200 iterations
warning: sqp: QP subproblem failed to converge in 200 iterations
warning: sqp: QP subproblem failed to converge in 200 iterations
warning: sqp: QP subproblem failed to converge in 200 iterations
warning: sqp: QP subproblem failed to converge in 200 iterations
warning: sqp: QP subproblem failed to converge in 200 iterations
warning: sqp: QP subproblem failed to converge in 200 iterations
error: __qp__: operator *: nonconformant arguments (op1 is 6x6, op2 is 7x1)
error: called from:
error:   /usr/local/share/octave/3.6.4/m/optimization/qp.m at line 393, column
26
error:   /usr/local/share/octave/3.6.4/m/optimization/sqp.m at line 414,
column 32
error:   /home/hackstein/Dominantepole5/minimize6test2.m at line 9, column 5
error:   /home/hackstein/Dominantepole5/verschiebungize3test2.m at line 8,
column 3
error:   /home/hackstein/Dominantepole5/grenzlinietest2.m at line 10, column
7

For the functions, see the attachment. As I can attach only four functions, I
post three of them here:

function erg=funp6test2(x,p)
erg=(p(1)-real(dominant2(roots(polytest2(x(1),x(2),x(3),x(4),x(5),x(6),x(7)))))).^2+(p(2)-imag(dominant2(roots(polytest2(x(1),x(2),x(3),x(4),x(5),x(6),x(7)))))).^2
endfunction


function mini=minimize6test2(b)
funp6test2wrap = @(x)funp6test2(x,[real(b),imag(b)])
y0  = 2*ones(7,1);
lbound = [0.5,0.5,0.5,0.5,0.5,0.5,5]';
ubound = [20,20,20,20,20,20,200]';
mini=sqp (y0,funp6test2wrap,[],[],lbound,ubound)
endfunction 

function poly=polytest2(la, lb, lc, Ia, Ib, Ic, RC)
poly=[1 la+lb*RC*45*la.^7 lb+lc-RC-3*Ib*Ic Ia*RC+Ib+87*RC
Ib*Ic.^3+Ic/(Ia+Ic-la) RC-Ia*Ia*lc la*RC*Ib+Ia*RC
koeff0(la,lb,lc,Ia,Ib,Ic,RC)]
endfunction

Minimize6test2.m minimizes the function
(real(b)-real(dominant2(roots(polytest2(x(1),x(2),x(3),x(4),x(5),x(6),x(7)))))).^2+(imag(b)-imag(dominant2(roots(polytest2(x(1),x(2),x(3),x(4),x(5),x(6),x(7)))))).^2

Here b is a complex number and polytest2(x(1),x(2),x(3),x(4),x(5),x(6),x(7))
is a polynomial of degree 7, parametrized by the seven real parameters
x(1),x(2),x(3),x(4),x(5),x(6) and x(7). 
dominant2 selects the root of the polynomial with the biggest real part. The
term should be minimized with respect to
0.5<=x(1),x(2),x(3),x(4),x(5),x(6)<=20 and 5<=x(7)<=200.

The error above is produced by the function call
grenzlinietest2(2,4,6,1,2,6,50). Note that more strange errors occur if one
takes a polynomial more complicated than polytest2. See the discussion on
help-octave for more details.
Thanks a lot in advance!



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fr 03 Mai 2013 10:53:49 GMT  Name: grenzlinietest2.m  Size: 636B   By:
uhackstein

<http://savannah.gnu.org/bugs/download.php?file_id=28003>
-------------------------------------------------------
Date: Fr 03 Mai 2013 10:53:49 GMT  Name: verschiebungize3test2.m  Size: 2kB  
By: uhackstein

<http://savannah.gnu.org/bugs/download.php?file_id=28004>
-------------------------------------------------------
Date: Fr 03 Mai 2013 10:53:49 GMT  Name: dominant2.m  Size: 2kB   By:
uhackstein

<http://savannah.gnu.org/bugs/download.php?file_id=28005>
-------------------------------------------------------
Date: Fr 03 Mai 2013 10:53:49 GMT  Name: koeff0.m  Size: 1kB   By: uhackstein

<http://savannah.gnu.org/bugs/download.php?file_id=28006>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?38875>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]