update

Class method.

do_mpc.data.MPCData.update(self, **kwargs)

Update value(s) of the data structure with key word arguments. These key word arguments must exist in the data fields of the data objective. See self.data_fields for a complete list of data fields.

Example:

_x = np.ones((1, 3))
_u = np.ones((1, 2))
data.update('_x': _x, '_u': _u)

or:
data.update('_x': _x)
data.update('_u': _u)

Alternatively:
data_dict = {
    '_x':np.ones((1, 3)),
    '_u':np.ones((1, 2))
}

data.update(**data_dict)
Parameters:kwargs (casadi.DM or numpy.ndarray) – Arbitrary number of key word arguments for data fields that should be updated.
Raises:assertion – Keyword must be in existing data_fields.
Returns:None

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