Saving an AcadosOcp object in MATLAB

I have an AcadosOcp object with a range of possible initial conditions. Thus, I set lbx_0, ubx_0, idxbx_0, and idxbxe_0 manually.

Using MATLAB, when I save my workspace to a MAT file, the following message prints to the screen,

x0 is not set. You can set it or specify lbx_0, ubx_0, idxbx_0, idxbxe_0 to implement general bounds on x0.

It also prints the current values of lbx_0, ubx_0, idxbx_0, idxbxe_0. Is there a way to avoid printing that message when I save my workspace?

Here is a minimal example that recreates the message.

ocp = AcadosOcp();

ocp.constraints.idxbx_0  = 0;   
ocp.constraints.idxbxe_0 = 0;    
ocp.constraints.ubx_0    = 0; 
ocp.constraints.lbx_0    = 0; 

save test

Hi,

If you want to solve an OCP with with a range of possible initial conditions, you should just create the solver once and then update the values of x0, as e.g. demonstrated in this example: acados/examples/acados_matlab_octave/getting_started/minimal_example_closed_loop.m at main · acados/acados · GitHub

Best,
Jonathan