help-octave
[Top][All Lists]
Advanced

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

strange errors usig sqp


From: Urs Hackstein
Subject: strange errors usig sqp
Date: Wed, 1 May 2013 14:19:46 +0200

Hello,

I wrote a program which uses sqp and produces strange errors. Could anyone explain me why these errors occur?
If I use octave version 3.2.4, everything works fine. After we updated to version 3.6.4; we received the error
warning: sqp: QP subproblem failed to converge in 200 iterations

When we installed the optim package and took y0=[5 5 5 5 5 5 5] as initial value, the error changed to

error: __qp__: operator *: nonconformant arguments (op1 is 5x5, 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/minimize6.m at line 8, column 5
error:   /home/hackstein/Dominantepole5/verschiebungize3.m at line 8, column 3
error:   /home/hackstein/Dominantepole5/grenzlinie.m at line 4, column 7

If we take y0=[7 7 7 7 7 7 7], the error changed to 

warning: sqp: QP subproblem failed to converge in 200 iterations
error: __qp__: operator *: nonconformant arguments (op1 is 4x4, 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/minimize6.m at line 8, column 5
error:   /home/hackstein/Dominantepole5/verschiebungize3.m at line 8, column 3
error:   /home/hackstein/Dominantepole5/grenzlinie.m at line 4, column 7

Why is op1 ow 4x4?

For the functions, see the attachment. Minimize6.m minimizes the function
(real(b)-real(dominant2(roots(poly(x(1),x(2),x(3),x(4),x(5),x(6),x(7)))))).^2+(imag(b)-imag(dominant2(roots(poly(x(1),x(2),x(3),x(4),x(5),x(6),x(7)))))).^2

Here b is a complex number and poly(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). Note that poly is here not octave's build-in-function poly.m. 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.
As a test case, we can take
function poly=poly(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 la-lb*lc+Ia*Ib/RC+(la.^2*lb*lc-Ia)]
endfunction

Thanks a lot in advance!

Attachment: minimize6.m
Description: Text Data

Attachment: funp6.m
Description: Text Data

Attachment: dominant2.m
Description: Text Data


reply via email to

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