UnbalancedEnergyModule.as_source#

UnbalancedEnergyModule.as_source(energy_demand)[source]#

Act as an energy source to the microgrid.

Microgrid will attempt to provide energy_demand amount of energy. Examples of this include discharging a battery, importing from a grid, or using renewables.

It is assumed that energy_demand>=0.

Parameters#

energy_demandfloat

Amount of energy that the microgrid is requesting. Must be non-negative.

Returns#

rewardfloat

Reward/cost after attempting the satisfy the energy demand.

donebool

Whether the module terminates.

infodict

Additional information from this step. Will include``provided_energy`` as a key, denoting the amount of energy this module provided to the microgrid.

Raises#

AssertionError

If energy_demand<0 or the module is not a source.