u

Class attribute.

Model.u

Inputs. CasADi symbolic structure, can be indexed with user-defined variable names.

Note

Variables are introduced with Model.set_variable() Use this property only to query variables.

Example:

model = do_mpc.model.Model('continuous')
model.set_variable('_u','heating', shape=(4,1))
# Query:
model.u['heating', 0] # 0th element of variable
model.u['heating']    # all elements of variable
model.u['heating', 0:2]    # 0th and 1st element

Usefull CasADi symbolic structure methods:

  • .shape
  • .keys()
  • .labels()
Raises:assertion – Cannot set model variables direcly. Use set_variable instead.

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