# set_initial_guess¶

Class method.

do_mpc.controller.MPC.set_initial_guess(self)

Initial guess for optimization variables. Uses the current class attributes x0, z0 and u0 to create the initial guess. The initial guess is simply the initial values for all $$k=0,\dots,N$$ instances of $$x_k$$, $$u_k$$ and $$z_k$$.

Warning

If no initial values for x0, z0 and u0 were supplied during setup, these default to zero.

Note

The initial guess is fully customizable by directly setting values on the class attribute: opt_x_num.