-
Notifications
You must be signed in to change notification settings - Fork 272
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
Conversation
…ints, also add N_horizon == 0 checks until setting of integrator time
…gs that should not be freed
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.
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;
interfaces/acados_template/acados_template/c_templates_tera/acados_solver.in.c
Outdated
Show resolved
Hide resolved
Please someone look at the maratos example, it fails :) |
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.
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.
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.