BatteryModule.default_transition_model#

static BatteryModule.default_transition_model(external_energy_change, efficiency, **transition_kwargs)[source]#

A simple battery transition model.

In this model, the amount of energy retained is given by efficiency.

For example, if a microgrid requests 100 kWh of energy and efficiency=0.5, the battery must use 200 kWh of energy. Alternatively, if a microgrid sends a battery 100 kWh of energy and efficiency=0.5, the battery’s charge will increase by 50 kWh.

Parameters#

external_energy_changefloat

Amount of energy that is being requested externally. If energy > 0, it is energy that is absorbed by the battery – a charge. If energy < 0, it is energy provided by the battery: a discharge.

efficiencyfloat

Battery efficiency.

transition_kwargsdict

State transition values given by BatteryModule.transition_kwargs().

Returns#

internal_energyfloat

Amount of energy that the battery must use or will retain given the external amount of energy.