solve¶
Class method.
-
do_mpc.controller.MPC.solve(self)¶ Solves the optmization problem.
The current problem is defined by the parameters in the
opt_p_numCasADi structured Data.Typically,
opt_p_numis prepared for the current iteration in themake_step()method. It is, however, valid and possible to directly set paramters inopt_p_numbefore callingsolve().The method updates the
opt_p_numandopt_x_numattributes of the class. By resettingopt_x_numto the current solution, the method implicitly enables warmstarting the optimizer for the next iteration, since this vector is always used as the initial guess.Warning
The method is part of the public API but it is generally not advised to use it. Instead we recommend to call
make_step()at each iterations, which acts as a wrapper forsolve().Raises: asssertion – Optimizer was not setup yet. Returns: None Return type: None
This page is auto-generated. Page source is not available on Github.