[Coin-ipopt] Limiting line search step

Chusslove Illich caslav.ilic at gmx.net
Fri Nov 30 08:38:57 EST 2007


> [: Andreas Waechter :]
> look for the declaration of alpha_primal_max (l.635 in the current trunk
> version), and add a few lines after that as the following:
>
>   ----- 8< -----------------------------
>        // Compute primal fraction-to-the-boundary value
>        Number alpha_primal_max =
>          IpCq().primal_frac_to_the_bound(IpData().curr_tau(),
>                                          *actual_delta->x(),
>                                          *actual_delta->s());
>        const Number dx_nrm2 = actual_delta->x()->Nrm2();
>        if (dx_nrm2 > 0.) {
>          const Number MaxDelta = 10.;
>          alpha_primal_max = Min(alpha_primal_max, MaxDelta/dx_nrm2);
>        }
>   ----- 8< -----------------------------

Actually, to determine the alpha limit, at this point I have to operate on
the elements of the current iterate and the line search direction. I thought
these would be IpData().curr()->x() and actual_delta->x(), but in
restoration iterations, their Dim() reports more elements than in normal
iterations (e.g. 103 instead of 99).

I would basically need these two as plain Number* arrays and their size,
same as the eval_* functions use. Nipped this segment to do it:

  // v is the ...->x() of the above
  const DenseVector *d_v = static_cast<const DenseVector*>(v);
  const Number *p_v = d_v->Values();

but that delivers me the "wrong" size vectors.

-- 
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://list.coin-or.org/pipermail/ipopt/attachments/20071130/d3ba26fa/attachment.bin 


More information about the Coin-ipopt mailing list