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

Useful CasADi symbolic structure methods:

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

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