-
Notifications
You must be signed in to change notification settings - Fork 302
AcadosCasadiOCP: Add support for soft nonlinear constraints
#1585
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
interfaces/acados_template/acados_template/acados_casadi_ocp_solver.py
Outdated
Show resolved
Hide resolved
interfaces/acados_template/acados_template/acados_casadi_ocp_solver.py
Outdated
Show resolved
Hide resolved
…ive code, write set() function for soft
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.
I added some minor comments, but it already looks pretty good!
interfaces/acados_template/acados_template/acados_casadi_ocp_solver.py
Outdated
Show resolved
Hide resolved
interfaces/acados_template/acados_template/acados_casadi_ocp_solver.py
Outdated
Show resolved
Hide resolved
interfaces/acados_template/acados_template/acados_casadi_ocp_solver.py
Outdated
Show resolved
Hide resolved
| lb_slack_node.append(0 * ca.DM.ones((dims.ns_0, 1))) | ||
| ub_slack_node.append(np.inf * ca.DM.ones((dims.ns_0, 1))) | ||
| elif i < N_horizon and dims.ns: | ||
| lb_slack_node.append(0 * ca.DM.ones((dims.ns, 1))) |
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.
Instead of the zeros it should be:
It should be [lsbu, lsbx, lsg, lsh, lsphi].
Off course those values are zero in the vast majority of cases though.
AcadosCasadiOCPget()andset()for slack variables inAcadosCasadiOcpSolver