microgrid.simulate package

Module contents

The simulate module defines the simulator which, given a grid model, some realized data, and a controller, evaluates the decisions of the controller on the realized data in the microgrid.

class microgrid.simulate.Simulator(grid, controller, database)[source]
__init__(grid, controller, database)[source]
Parameters:
  • grid – A description of the grid as a Grid object
  • controller – tool that decides, based on a forecast, a grid state and a model, which decisions to apply to the system now, until the next reoptimization
  • database – (true) evolution of the exogeneous quantities over the simulation period
run(start_date, end_date, decision_horizon=1, optim_horizon=12)[source]

Run the simulation.

Parameters:
  • start_date – start period of the simulation
  • end_date – end period of the simulation
  • decision_horizon – resolution of the simulation, in hours
  • optim_horizon – parameter passed to the controller in case the latter computes decisions over an optimization horizon longer than 1 period.
Returns:

class microgrid.simulate.GridState(grid, date_time)[source]
__init__(grid, date_time)[source]

Representation of the state of the system in the simulator. The state includes the state of charge of storage devices plus information regarding past operation of the system.

Parameters:
  • grid – A Grid object
  • date_time – The time at which the system in this state