-
Notifications
You must be signed in to change notification settings - Fork 272
C: avoid using local variable sqp_iter
#1496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. If comments are addressed, and tests pass, can be merged
@@ -990,7 +990,7 @@ static int prepare_and_solve_QP(ocp_nlp_config* config, ocp_nlp_sqp_wfqp_opts* o | |||
if (solve_feasibility_qp && opts->use_constraint_hessian_in_feas_qp) | |||
{ | |||
// LM for feasibility QP | |||
ocp_nlp_add_levenberg_marquardt_term(config, dims, nlp_in, nlp_out, opts->nlp_opts, nlp_mem, nlp_work, mem->alpha, sqp_iter, qp_in); | |||
ocp_nlp_add_levenberg_marquardt_term(config, dims, nlp_in, nlp_out, opts->nlp_opts, nlp_mem, nlp_work, mem->alpha, nlp_mem->iter, qp_in); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since nlp_mem is passed. Do we need nlp_mem->iter as additional argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In SQP_RTI
, this function is called with iter=0. I don't know the reason, but I don't want to change the behavior.
…prev commit" This reverts commit 9a75a59.
Follow-up of #1492.
The changed tests in #1492 have been reverted as the iteration reference was still wrong there. Now I verified by printing.