You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the current code computes the objective to the feasibility restoration problem as f = \sum(p+n) + eta/2*two_norm(DR*(x-x_ref))^2
(see equation (30a) in the implementation paper and the corresponding code here)
However, it computes the gradient and Hessian for the second term as: eta*DR*(x-x_ref) and eta*DR, see grad_f and h, respective.
I believe DR^2 should be used in computing grad_f and h.
For example, to compute grad_f, we add one line:
SmartPtr<Vector> x_only = c_vec->GetCompNonConst(0);
x_only->Copy(*x_only_in);
x_only->Axpy(-1.0, *x_ref_);
x_only->ElementWiseMultiply(*dr_x_);
x_only->ElementWiseMultiply(*dr_x_); // add this line
x_only->Scal(Eta(mu));
The text was updated successfully, but these errors were encountered:
Great observation! I really appreciate that you took the effort to look into the code.
It is difficult to believe that this was undiscovered for so long. How did you find that? Did you debug a problem where the restoration NLP wasn't solved or did you just read the code out of interest?
@svigerske I found this and mentioned it to Andreas 2 years ago, when I developed feasibility problem in another solver. Then we forgot to address it in Ipopt. :-)
Recently I have problems requiring feasibility restoration, hence I checked the source code again and noticed that the bug still exists.
The new commit looks good to me. Thanks for the quick response.
I believe the current code computes the objective to the feasibility restoration problem as
f = \sum(p+n) + eta/2*two_norm(DR*(x-x_ref))^2
(see equation (30a) in the implementation paper and the corresponding code here)
However, it computes the gradient and Hessian for the second term as:
eta*DR*(x-x_ref)
andeta*DR
, see grad_f and h, respective.I believe
DR^2
should be used in computinggrad_f
andh
.For example, to compute
grad_f
, we add one line:The text was updated successfully, but these errors were encountered: