help-octave
[Top][All Lists]
Advanced

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

Re: Urgent help with qp


From: Mathieu Dubois
Subject: Re: Urgent help with qp
Date: Sat, 23 Feb 2013 17:30:30 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

Hello,

I dont know the qp function but I think that

[X, OBJ, INFO, LAMBDA] = qp([],H,c,A,b,lb,ub,options);

should work (it works on my computer).

AFAIU, if you pass bounds (A, B, LB, UB, A_LB, A_UB), octave will also need the A_in matrix and check for it's size (line 252).
This which is wrong in your call because A_in is empty.

Note that the help don't mention if bounds are empty that A_in matrix must nevertheless have the correct size.
Maybe that should be changed.

Just for the record, INFO contains:

octave:22> INFO

INFO =
  scalar structure containing the fields:
    solveiter =  3

    info = 0

If I understand correctly this means that the solution is found in 3 iterations.

HTH,
Mathieu

Le 23/02/2013 16:41, Myriam Abramson a écrit :
Hello,

I am trying to use qp and I need to specify the maximum number of
iterations but I don't know how to do that. I did the following with
no success. I have Octave 3.4.3 on Ubuntu 12.04. Please help!

H=[1.0 0.5 0 0;0.5 1 0 0;0 0 0 0; 0 0 0 0];
A=[1 2 1 0;1 1 0 1];
lb=[0 0 0 0];
ub=[1.0e+22 1.0e+22 1.0e+22 1.0e+22 ];
b=[7;5];
c=[10;11;0;0];
options=optimset('MaxIter',1000);

octave> qp([],H,c,A,b,lb,ub,[],[],[],options);
error: qp: inequality constraint matrix has incorrect column dimension
error: called from:
error:   /usr/local/share/octave/3.4.3/m/optimization/qp.m at line 252, column 9



reply via email to

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