set_initial_state¶
Class method.
-
do_mpc.optimizer.Optimizer.
set_initial_state
(self, x0, p_est0=None, reset_history=False, set_intial_guess=True)¶ Set the intial state of the optimizer. Optionally resets the history. The history is empty upon creation of the optimizer.
Optionally update the initial guess. The initial guess is first created with the
.setup()
method (MHE/MPC) and uses the class attributesx0
,u0
,z0
for all time instances, collocation points (if applicable) and scenarios (if applicable). If these values were not explicitly set by the user, they default to all zeros.Warning
This method is depreciated. Use the x0 (and p_est0 for MHE) property of the class to set the intial values instead.
Parameters: - x0 (numpy array) – Initial state
- reset_history (bool (,optional)) – Resets the history of the optimizer, defaults to False
- set_intial_guess (bool (,optional)) – Setting the initial state also updates the intial guess for the optimizer.
Returns: None
Return type: None
This page is auto-generated. Page source is not available on Github.