Prediction

class mpcpy.Prediction(boundaryconditions, parameters=None)[source]

Base class for defining the predictions for an mpc the “prediction” method can be redefined in a child class. If not it returns a perfect prediction of all future disturbances.

Parameters:

boundaryconditions: mpcpy.Boundaryconditions

An mpcpy.Boundaryconditions object to derive the predictions from.

parameters : dict

A dictionary of parameters used by the prediction algorithm.

prediction(time)[source]

Defines perfect predictions, returns the exact boundary conditions dict Can be redefined in a child class to contain an actual prediction algorithm.

Parameters:

time : np.array

The times at which the predictions are required

Returns:

dict

A dictionary with the predictions at the specified times