opt_x

Class attribute.

MHE.opt_x

Full structure of the (symbolic) MHE optimization variables.

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

# dynamic states:
opt_x['_x', time_step, collocation_point, _x_name]
# algebraic states:
opt_x['_z', time_step, collocation_point, _z_name]
# inputs:
opt_x['_u', time_step, _u_name]
# estimated parameters:
opt_x_Num['_p_est', _p_names]
# slack variables for soft constraints:
opt_x['_eps', time_step, _nl_cons_name]

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.

The attribute can be used to alter the objective function or constraints of the NLP.

Note

The attribute opt_x carries the scaled values of all variables.

Warning

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

Note

The attribute is populated when calling setup() or prepare_nlp()

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