8000 fix `N_horizon` check in templates by FreyJo · Pull Request #1539 · acados/acados · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix N_horizon check in templates #1539

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 2 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{%- set qp_solver = "FULL_CONDENSING_HPIPM" %}
{%- endif %}

{%- if solver_options.N_horizon %}
{% if problem_class != "SIM" %}
{%- set N_horizon = solver_options.N_horizon %}
{%- else %}
{%- set N_horizon = 1 %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{%- set qp_solver = "FULL_CONDENSING_HPIPM" %}
{%- endif %}

{%- if solver_options.N_horizon %}
{% if problem_class != "SIM" %}
{%- set N_horizon = solver_options.N_horizon %}
{%- else %}
{%- set N_horizon = 1 %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ int main()
ocp_nlp_solver *nlp_solver = {{ name }}_acados_get_nlp_solver(acados_ocp_capsule);
void *nlp_opts = {{ name }}_acados_get_nlp_opts(acados_ocp_capsule);

{%- if dims.nbx_0 > 0 %}
// initial condition
double lbx0[NBX0];
double ubx0[NBX0];
Expand All @@ -87,6 +88,7 @@ int main()

ocp_nlp_constraints_model_set(nlp_config, nlp_dims, nlp_in, nlp_out, 0, "lbx", lbx0);
ocp_nlp_constraints_model_set(nlp_config, nlp_dims, nlp_in, nlp_out, 0, "ubx", ubx0);
{%- endif %}

// initialization for state values
double x_init[NX];
Expand Down
Loading
0