Softening Constraints with IPOPT

196 views
Skip to first unread message

Adam Hall

unread,
Sep 1, 2022, 9:51:49 AM9/1/22
to CasADi
Hello,

I'm working on a nmpc like formulation using IPOPT and the opti stack. I am having a lot of feasiblity issues. Either I get infeasible solutions or often 'restoration failure!' and wish to soften the constraints, in particular the dynamics equality constraints (my dynamics are a little strange). Is there an easy way to do this using IPOPT? I think there is a option constr_viol_tol, which defaults to 0.0001. Is there a way to apply this to only some of the constraints?

Alternatively, is the best way to just add slack variables?

Thanks.

Fabio B

unread,
Sep 3, 2022, 6:06:09 AM9/3/22
to CasADi
I think that the easiest way is to manually add slack variables to the problem. You may also bound them to make sure they don't exceed threshold values.

Adam Hall

unread,
Sep 7, 2022, 12:07:40 PM9/7/22
to CasADi
Okay. Thanks. I will try that.

Tong Zhao

unread,
Oct 7, 2022, 6:26:14 PM10/7/22
to CasADi
Hi Fabio,

Could you elaborate on what you mean by "add slack variables to the problem"? In Adam's problem, he mentioned that he wanted to soften the dynamic equality constraints. Do you suggest that one could use slack variables to soften the equality constraints?

Thanks

On Saturday, September 3, 2022 at 6:06:09 AM UTC-4 Fabio B wrote:
Reply all
Reply to author
Forward
0 new messages