8000 Solution sensitivities refactoring by FreyJo · Pull Request #1343 · acados/acados · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Solution sensitivities refactoring #1343

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 11 commits into from
Nov 6, 2024
Merged

Conversation

FreyJo
Copy link
Member
@FreyJo FreyJo commented Nov 6, 2024

refactor functionality in ocp_nlp_params_jac_compute.
New description of this function:

this function sets up: jac_lag_stat_p_global, jac_ineq_p_global, jac_dyn_p_global
    - jac_dyn_p_global is computed in dynamics module
    - jac_ineq_p_global is computed in constraints module (TODO!)
    - jac_lag_stat_p_global: first dynamics writes its contribution, then cost and constraints modules add their contribution.

Detailed:

  • split tmp_nvninx_np_global into matrices jac_lag_stat_p_global, jac_ineq_p_global, jac_dyn_p_global
  • fix shape of inequality part jac_ineq_p_global, should be 2*ni
  • directly set up those matrices in the cost and dynamics modules instead of taking out columns in ocp_nlp_common
  • avoid copying

This resulted in significant speed-up in the chain benchmark example:
Minimum time for eval rhs on my machine
Before the changes: 775 ms
After the changes: 527 ms

@FreyJo FreyJo requested a review from sandmaennchen November 6, 2024 10:28
Copy link
Contributor
@sandmaennchen sandmaennchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@FreyJo FreyJo merged commit 5f797a8 into acados:master Nov 6, 2024
13 checks passed
@FreyJo FreyJo deleted the solution_sens_refactor 6563 branch November 6, 2024 12:03
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