nlp_obj¶
Class attribute.
-
MHE.
nlp_obj
¶ Query and modify (symbolically) the NLP objective function. Use the variables in
opt_x
andopt_p
.It is advised to add to the current objective, e.g.:
mpc.prepare_nlp() # Modify the objective mpc.nlp_obj += sum1(vertcat(*mpc.opt_x['_x', -1, 0])**2) # Finish creating the NLP mpc.create_nlp()
See the documentation of
opt_x
andopt_p
on how to query these attributes.Warning
This is a VERY low level feature and should be used with extreme caution. It is easy to break the code.
Be especially careful NOT to accidentially overwrite the default objective.
Note
Modifications must be done after calling
prepare_nlp()
and before callingcreate_nlp()
This page is auto-generated. Page source is not available on Github.