8000 Python: Fix `constraints_get` by FreyJo · Pull Request #1556 · acados/acados · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Python: Fix constraints_get #1556

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 23, 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
8000
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions interfaces/acados_c/ocp_nlp_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,16 +1172,6 @@ void ocp_nlp_cost_dims_get_from_attr(ocp_nlp_config *config, ocp_nlp_dims *dims,
dims_out[0] = dims->nx[stage] + dims->nu[stage];
dims_out[1] = dims->nx[stage] + dims->nu[stage];
}
else if (!strcmp(field, "C"))
{
dims_out[0] = dims->ng[stage];
dims_out[1] = dims->nx[stage];
}
else if (!strcmp(field, "D"))
{
dims_out[0] = dims->ng[stage];
dims_out[1] = dims->nu[stage];
}
else if (!strcmp(field, "scaling"))
{
dims_out[0] = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1959,7 +1959,7 @@ def constraints_get(self, stage_: int, field_: str) -> np.ndarray:
dims_ = np.zeros((2,), dtype=np.intc, order="C")
dims_data = cast(dims_.ctypes.data, POINTER(c_int))

self.__acados_lib.ocp_nlp_cost_dims_get_from_attr(self.nlp_config, \
self.__acados_lib.ocp_nlp_constraint_dims_get_from_attr(self.nlp_config, \
self.nlp_dims, self.nlp_out, stage_, field, dims_data)

# check whether field is vector-valued
Expand Down
Loading
0