coin-or/Ipopt

Help about use of tiny_step_tol

mottelet opened this issue · 2 comments

Hello,
I am solving a numerically kind of ill-posed optimization problem (my gradient is not exact as it is approximated) and I have difficulties to stop the optimization. I try to use the tiny_step_tol parameter, but it does not seem to work. I have read in the documentation that only repeated violation of the step tolerance will stop the optimization. How do you control the macimum number of repeated violations ?

S.

I think it is 2:

if( tiny_step )
{
IpData().Set_info_ls_count(0);
if( tiny_step_last_iteration_ )
{
IpData().Set_info_alpha_primal_char('T');
IpData().Set_tiny_step_flag(true);
}
}
else
{
IpData().Set_info_alpha_primal_char('t');
}
// If the step in the dual variables is also small, we remember
// that we just did a tiny step so that next time we might
// decide to quit
Number delta_y_norm = Max(IpData().delta()->y_c()->Amax(), IpData().delta()->y_d()->Amax());
if( delta_y_norm < tiny_step_y_tol_ )
{
tiny_step_last_iteration_ = true;
}
else
{
tiny_step_last_iteration_ = false;
}

But it needs the step in the dual variables to be tiny (tiny_step_y_tol) as well for the first time.
(The t/T character is shown in the iteration log.)
In the next iteration, only tiny_step_tol is relevant to set the tiny_step flag in IpData().
If that is set, and no update for mu is computed, then Ipopt will terminate:

if( !mu_changed && tiny_step_flag )
{
THROW_EXCEPTION(TINY_STEP_DETECTED, "Problem solved to best possible numerical accuracy");
}

However, there is some probably undocumented condition in the detection of a tiny step. If the constraint violation is still "large", then there can be no tiny steps, apparently:

// make sure that the infeasibility is not large - in that case we
// might be at a starting point that is already a local minimizer
// of the constraint violation
const Number cviol = IpCq().curr_constraint_violation();
if( cviol > 1e-4 ) // ToDo: adapt parameter?
{
return false;
}

OK thanks.