[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
qp() lambdas -- fewer than constraints?
From: |
fork |
Subject: |
qp() lambdas -- fewer than constraints? |
Date: |
Thu, 18 Apr 2013 19:14:17 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Hi all,
I am trying to debug some code that uses sqp(), and I get the following
error:
error: sqp: operator *: nonconformant arguments (op1 is 9x9, op2 is 6x1) ...
stopped in C:\Software\Octave-
3.7.2+\share\octave\3.7.2+\m\optimization\sqp.m at line 451
451: t = ((A_new - A)'*lambda);
I looked at the source for sqp, and on line 407, there is a call to qp()
that sets the value for lambda. In this problem, there are three equality
constraints and six inequality constraints, all of which I verified are
passed to qp(), but lambda has a dimension of 6x1.
Seems like a bug? Any ideas?
The code driving all this could be shared, but it is pretty convoluted (I
would put it on a github snippet or something if neccessary). Here is some
data from the debugging session, though.
>From sqp (edited for clarity):
[p, obj_qp, INFO, lambda] = qp (x
, B # H
, c # q
, F # equality A
, g # equality b
, [] # lb
, [] # ub
, d # A_lb
, C # A_in
, Inf (size (d) # A_ub
));
>From the debugging session:
x =
0.3414935
0.4466654
0.0929296
0.3929162
0.3173447
0.3836578
0.2076896
-0.3596342
0.4752160
B =
41.353000 0.000000 0.000000 189.680000 0.000000
0.000000 1511.381500 0.000000 0.000000
0.000000 41.353000 0.000000 0.000000 189.680000
0.000000 0.000000 1511.381500 0.000000
0.000000 0.000000 41.353000 0.000000 0.000000
189.680000 0.000000 0.000000 1511.381500
189.680000 0.000000 0.000000 1255.479700 0.000000
0.000000 9276.867700 0.000000 0.000000
0.000000 189.680000 0.000000 0.000000 1255.479700
0.000000 0.000000 9276.867700 0.000000
0.000000 0.000000 189.680000 0.000000 0.000000
1255.479700 0.000000 0.000000 9276.867700
1511.381500 0.000000 0.000000 9276.867700 0.000000
0.000000 96970.979400 0.000000 0.000000
0.000000 1511.381500 0.000000 0.000000 9276.867700
0.000000 0.000000 96970.979400 0.000000
0.000000 0.000000 1511.381500 0.000000 0.000000
9276.867700 0.000000 0.000000 96970.979400
F =
0 0 1 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 1 0
g =
-0.0929296
-0.3929162
0.3596342
d =
-Inf
-Inf
-Inf
-0.211841
-0.298997
-0.524784
C =
1 1 0 0 0 0 0 0 0
0 0 0 0 1 1 0 0 0
0 0 0 0 0 0 0 0 1
-1 -1 -0 -0 -0 -0 -0 -0 -0
-0 -0 -0 -0 -1 -1 -0 -0 -0
-0 -0 -0 -0 -0 -0 -0 -0 -1
lambda =
-177.320724
19.679615
-1310.239361
0.000000
68.952235
0.000000
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- qp() lambdas -- fewer than constraints?,
fork <=