8000 Adjoint solution sensitivities with respect to global parameters by FreyJo · Pull Request #1331 · acados/acados · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Adjoint solution sensitivities with respect to global parameters #1331

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 22 commits into from
Oct 31, 2024

Conversation

FreyJo
Copy link
Member
@FreyJo FreyJo commented Oct 29, 2024
  • can be used from Python via AcadosOcpSolver.eval_adjoint_solution_sensitivity()
Evaluate the adjoint sensitivity of the solution with respect to the parameters.
    :param seed_x : np.ndarray or list of np.ndarrays - seed for the states at stage `stages`
    :param seed_u : np.ndarray or list of np.ndarrays - seed for the controls at stage `stages`
    :param stages_seed_x : int or list of int - stages corresponding to the seeds_x
    :param stages_seed_u : int or list of int - stages corresponding to the seeds_u
    :param with_respect_to : string in ["p_global"]
    :param sanity_checks : bool - whether to perform sanity checks, turn off for minimal overhead, default: True
  • chain-mass example solution_sensitivity_example.py: fix wrt global parameters, extend to also evaluate an adjoint sensitivity and compare timings of forward vs adjoint solution sensitivities.
  • Python: gather solution sensitivity specific tests in function sanity_check_parametric_sensitivities()
  • add test / example: examples/acados_python/pendulum_on_cart/solution_sensitivities/forw_vs_adj_param_sens.py

@FreyJo FreyJo requested a review from sandmaennchen October 29, 2024 12:05
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.

love it! 😍

@sandmaennchen sandmaennchen merged commit 4f92fd6 into acados:master Oct 31, 2024
13 checks passed
@sandmaennchen sandmaennchen deleted the adj_param_sens_new branch October 31, 2024 09:28
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