z

Class attribute.

Model.z

Algebraic states. 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('_z','temperature', shape=(4,1))
# Query:
model.z['temperature', 0] # 0th element of variable
model.z['temperature']    # all elements of variable
model.z['temperature', 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.