set_uncertainty_values

Class method.

do_mpc.controller.MPC.set_uncertainty_values(self, **kwargs)

Define scenarios for the uncertain parameters. High-level API method to conveniently set all possible scenarios for multistage MPC. For more details on robust multi-stage MPC please read our background article.

Pass a number of keyword arguments, where each keyword refers to a user defined parameter name from the model definition. The value for each parameter must be an array (or list), with an arbitrary number of possible values for this parameter. The first element is the nominal case.

Example:

# in model definition:
alpha = model.set_variable(var_type='_p', var_name='alpha')
beta = model.set_variable(var_type='_p', var_name='beta')
gamma = model.set_variable(var_type='_p', var_name='gamma')
...
# in MPC configuration:
alpha_var = np.array([1., 0.9, 1.1])
beta_var = np.array([1., 1.05])
MPC.set_uncertainty_values(
    alpha = alpha_var,
    beta = beta_var
)

Note

Parameters that are not imporant for the MPC controller (e.g. MHE tuning matrices) can be ignored with the new interface (see gamma in the example above).

Note the nominal case is now: alpha = 1, beta = 1 which is determined by the order in the arrays above (first element is nominal).

Parameters:kwargs – Arbitrary number of keyword arguments.
Returns:None
Return type:None

This page is auto-generated. Page source is not available on Github.