Fri May 3 10:53:49 2013, original submission:
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+lbRC45la.^7 lb+lcRC3IbIc IaRC+Ib+87RC IbIc.^3+Ic/(Ia+Icla) RCIaIalc laRCIb+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 helpoctave for more details.
Thanks a lot in advance!
