Initialization of OCP solver ( Matlab )

I am using the Matlab interface.

In order to initialize the MPC for the next step I’ve seen that this can be done explicitly in every iteration with these functions:
ocp.set(‘init_x’, x_traj)
ocp.set('init_u, u_traj)

If I don’t use these functions, I think the initialization method depends in the option:
The options are:
(0) cold start
(1) warm start primal variables
(2) warm start and dual variables

¿What do these options mean?
I’m only familiar whit shift initialization and the simple warm start, in which the initial guess is the previous solution with both states and inputs. I want to perform a simple warm start, ¿which option should I use?

Thanks in advance!

Hi Antonio,

the option qp_solver_warm_start really only corresponds to the warm starting of the QP solver.
Warm / hot start of QP solvers is a complex topic and there are several papers about it.

I think you are mainly talking about the initialization of the SQP method.
If you don’t initialize anything explicitly between consecutive calls to the OCP solver, the solver is initialized with the previous primal and dual solution.


1 Like