Class attribute.


Full MPC parameter vector.

This attribute is used when calling the MPC solver to pass all required parameters, including

  • initial state
  • uncertain scenario parameters
  • time-varying parameters
  • previous input sequence

do-mpc handles setting these parameters automatically in the make_step() method. However, you can set these values manually and directly call solve().

The attribute is a CasADi numeric structure with nested power indices. It can be indexed as follows:

# initial state:
opt_p_num['_x0', _x_name]
# uncertain scenario parameters
opt_p_num['_p', scenario, _p_name]
# time-varying parameters:
opt_p_num['_tvp', time_step, _tvp_name]
# input at time k-1:
opt_p_num['_u_prev', time_step, scenario]

The names refer to those given in the do_mpc.model.Model configuration. Further indices are possible, if the variables are itself vectors or matrices.


Do not tweak or overwrite this attribute unless you known what you are doing.


The attribute is populated when calling setup()

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