8000 C: avoid using local variable `sqp_iter` by FreyJo · Pull Request #1496 · acados/acados · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 7 commits into from
Apr 10, 2025
Merged

C: avoid using local variable sqp_iter #1496

merged 7 commits into from
Apr 10, 2025

Conversation

FreyJo
Copy link
Member
@FreyJo FreyJo commented Apr 10, 2025

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.

@FreyJo FreyJo requested a review from david0oo April 10, 2025 08:22
Copy link
Contributor
@david0oo david0oo left a 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);
Copy link
Contributor

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?

Copy link
Member Author

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.

@FreyJo FreyJo requested a review from david0oo April 10, 2025 09:45
@FreyJo FreyJo merged commit 053dbda into acados:main Apr 10, 2025
14 checks passed
@FreyJo FreyJo deleted the sqp_iter branch April 10, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0