10000 Allow `solver_options.N_horizon=0` by Confectio · Pull Request #1498 · acados/acados · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Allow solver_options.N_horizon=0 #1498

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 67 commits into from
Apr 14, 2025
Merged

Allow solver_options.N_horizon=0 #1498

merged 67 commits into from
Apr 14, 2025

Conversation

Confectio
Copy link
Contributor
@Confectio Confectio commented Apr 11, 2025

This PR modifies the Matlab and Python interfaces to allow formulating optimization problems without any shooting-structure and solver_options.N_horizon=0 .
If solver_options.N_horizon=0, only the terminal costs and constraints will be regarded.
In particular, also no dynamics, other costs, and constraints have to be defined.

We have also updated some examples to use this feature instead of the workarounds.

Confectio added 30 commits April 8, 2025 15:08
…ints, also add N_horizon == 0 checks until setting of integrator time
@Confectio Confectio requested a review from Copilot April 11, 2025 05:18
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 9 out of 13 changed files in this pull request and generated 1 comment.

Files not reviewed (4)
  • examples/acados_matlab_octave/convex_problem_globalization_needed/convex_problem_globalization_necessary.m: Language not supported
  • examples/acados_matlab_octave/convex_problem_globalization_needed/env.sh: Language not supported
  • examples/acados_matlab_octave/generic_nlp/env.sh: Language not supported
  • examples/acados_matlab_octave/generic_nlp/main.m: Language not supported
Comments suppressed due to low confidence (1)

interfaces/acados_template/acados_template/c_templates_tera/acados_solver.in.c:148

  • The return statement after exit(1) in update_time_steps() is unreachable and can be removed for clarity.
return -1;

@Confectio Confectio marked this pull request as ready for review April 11, 2025 14:43
@Confectio
Copy link
Contributor Author

Please someone look at the maratos example, it fails :)

Copy link
Member
@FreyJo FreyJo left a comment

Choose a reason for hiding this comment

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

Very good!
It is not clear what is going on in the maratos example after looking into it a bit.
I refactored it to easily switch between the old and new formulations and to log iterates without for looping.
The difference in behavior should be investigated a bit more closely later.

@FreyJo FreyJo merged commit 0f042a1 into acados:main Apr 14, 2025
14 checks passed
@FreyJo FreyJo deleted the NequalsZero branch April 14, 2025 07:38
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