I am currently using acados for a MPC formulation. In my formulation I want to alter the bounds on my slack variables. I am using acados in Python3.
My system is in discrete time.
For example, I predict 40 time steps, and in time steps 20-25, I want to set the bounds on my slack variables to 0, in all other time steps, I set them to a fixed value, say, 10^6.
Is this possible in acados?
In the documentation there is the api constraints_set, but this does not allow to set the bounds of the slack variables, for example ush.
Yes, that is what I want to do. I want for some stages the nonlinear constraint h to be a soft constraint while for some other stages to be a hard constraint.
Hi Peter, this can be implemented via a multi-phase formulation. The main idea is to specify multiple OCPs, one for each phase, and specify which shooting nodes belong to which phase. In your example, you will need three phases, node 1 to 19, node 20 to 25, node 26 to 40.
Here is an example that illustrates how to formulate MOCPs: