Disturbances¶
-
class
mpcpy.Disturbances(data, periodic=True, extra_time=604800.0, zoh_keys=None)[source]¶ A class to define disturbances in the format required by mpcpy.
Create a disturbances object.
Parameters: data : dict
Actual boundary conditions and a time vector.
periodic : boolean, optional
Determines how to determine values when time is larger than the boundary conditions time.
extra_time : float, optional
Maximum allowed time outside the boundary conditions time, should be at least as large as the control horizon.
zoh_keys : list of strings, optional
Keys which will be interpolated with zero-order hold. All other values are interpolated linearly.
Examples
>>> dst = Disturbances({'time': np.arange(0.,24*3600.+1,3600.), 'T_amb':np.random.random(25)}) >>> dst(12.1*3600)