microgrid.forecast package

Module contents

The forecast module provides functions to generate forecasts fot the uncertain quantities impacting the operation of the microgrid.

class microgrid.forecast.Forecaster(database)[source]
__init__(database)[source]

A Forecaster object allows to generate forecast of any of the uncertain quantities referenced in the database.

Parameters:database – A Database object used for training the forecaster
forecast(column, dt_from, dt_to)[source]

Forecast an uncertain quantity over a specified time range with a hourly resolution. Each time a forecast is asked, a new forecaster is trained using all previous values of the quantity until dt_from.

Parameters:
  • column – Name of the series to forecast
  • dt_from – A date_time object specifying the start of the prediction horizon
  • dt_to – A date_time object specifying the end of the prediction horizon
Returns:

The forecast as a numpy array. The length of the array is equal to the number of hours between dt_from and dt_to, rounded down