Update constraint bounds in Matlab

Hi everyone :slight_smile:

I am using acoods with the interface Matlab.
I want to tighten my constraints (multiplied by a coefficient less than 1) after each step in the closed loopsimultion.
This is a method mentioned in an article I found about tmpc.
1657870454056

I tried changing some code of adocos but they didn’t work.


What I want to do is , the value of ubx gradually shrinks, and the value of lbx gradually becomes larger along the simulation.
I would like to ask if this can be achieved under matlab with acados?
Regards and thank a lot
Max

Hi Max,

yes, you can just change the bounds in Matlab using something like:

ocp.set('constr_lbx', lbx, stage_index);
ocp.set('constr_ubx', ubx, stage_index);

Cheers,
Jonathan