aux¶
Class attribute.
-
Model.
aux
¶ Auxiliary expressions. CasADi symbolic structure, can be indexed with user-defined variable names.
Note
Expressions are introduced with
Model.set_expression()
Use this property only to query variables.Example:
model = do_mpc.model.Model('continuous') model.set_variable('_x','temperature', 4) # 4 states dt = model.x['temperature',0]- model.x['temperature', 1] model.set_expression('dtemp', dt) # Query: model.aux['dtemp', 0] # 0th element of variable model.aux['dtemp'] # all elements of variable
Usefull CasADi symbolic structure methods:
.shape
.keys()
.labels()
Raises: assertion – Cannot set aux direcly. Use set_expression instead.
This page is auto-generated. Page source is not available on Github.