UnbalancedEnergyModule.get_cost#

UnbalancedEnergyModule.get_cost(energy_amount, as_source, as_sink)[source]#

Get the cost of unmet load or excess production.

Parameters#

energy_amountfloat>=0

Amount of unmet load or excess production.

as_sourcebool

Whether the energy is unmet load.

as_sinkbool

Whether the energy is excess production.

Returns#

cost : float

Raises#

TypeError

If both as_source and as_sink are True or neither are.