# HG changeset patch # User jwe # Date 1188924859 0 # Node ID 8057825b748f7a1c64c8207c780499c7f8b173b6 # Parent 5fddcbbe880ee62c8f16501ed557a220a3e7fa33 [project @ 2007-09-04 16:54:19 by jwe] diff -r 5fddcbbe880e -r 8057825b748f src/ChangeLog --- a/src/ChangeLog Tue Sep 04 12:59:42 2007 +0000 +++ b/src/ChangeLog Tue Sep 04 16:54:19 2007 +0000 @@ -1,3 +1,9 @@ +2007-09-04 Gabriele Pannocchia + + * DLD-FUNCTIONS/__qp__.cc (qp): Use Wact(j) == i - n_eq when + checking for blocking constraint. Don't resize lambda_tmp. Only + compute Y = Aact.pseudo_inverse () if it is needed. + 2007-08-31 Michael Goffioul * ls-mat-ascii.cc (get_lines_and_columns): Check beg variable for diff -r 5fddcbbe880e -r 8057825b748f src/DLD-FUNCTIONS/__qp__.cc --- a/src/DLD-FUNCTIONS/__qp__.cc Tue Sep 04 12:59:42 2007 +0000 +++ b/src/DLD-FUNCTIONS/__qp__.cc Tue Sep 04 16:54:19 2007 +0000 @@ -227,9 +227,6 @@ // FIXME -- still remain to handle the case of // non-full rank active set matrix. - // Computing the Y matrix (orthogonal to Z) - Y = Aact.pseudo_inverse (); - // Reduced Hessian Matrix Zt = Z.transpose (); Matrix rH = Zt * H * Z; @@ -317,16 +314,10 @@ // Computing the multipliers only for the inequality // constraints that are active. We do NOT compute // multipliers for the equality constraints. + Y = Aact.pseudo_inverse (); Matrix Yt = Y.transpose (); Yt = Yt.extract_n (n_eq, 0, n_act-n_eq, n); lambda_tmp = Yt * (g + H * p); - if (n_act - n_eq < n_in) - { - lambda_tmp.resize (n_in, 0.0); - - for (octave_idx_type i = n_act-n_eq; i < n_in; i++) - lambda_tmp(i) = 0; - } // Checking the multipliers. We remove the most // negative from the set (if any). @@ -389,7 +380,7 @@ for (octave_idx_type j = 0; j < n_act-n_eq; j++) { - if (Wact(j) == i) + if (Wact(j) == i - n_eq) { found = true; break;