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_num
CasADi structured Data.Typically,
opt_p_num
is prepared for the current iteration in themake_step()
method. It is, however, valid and possible to directly set paramters inopt_p_num
before callingsolve()
.The method updates the
opt_p_num
andopt_x_num
attributes of the class. By resettingopt_x_num
to 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.