scaling¶
Class attribute.
-
MPC.
scaling
¶ Query and set scaling of the optimization variables. The
Optimizer.scaling()
method is an indexed property, meaning getting and setting this property requires an index and calls this function. The power index (elements are seperated by comas) must contain atleast the following elements:order index name valid options 1 variable type _x
,_u
and_z
(and_p_est
for MHE)2 variable name Names defined in do_mpc.model.Model
.Further indices are possible (but not neccessary) when the referenced variable is a vector or matrix.
Example:
# Set with: optimizer.scaling['_x', 'phi_1'] = 2 optimizer.scaling['_x', 'phi_2'] = 2 # Query with: optimizer.scaling['_x', 'phi_1']
Note
Scaling the optimization problem is suggested when states and / or inputs take on values which differ by orders of magnitude.
This page is auto-generated. Page source is not available on Github.