energy_methods.storage_peak_shift#

Auditable renewable-surplus-to-evening-peak battery dispatch.

This energy-balance screening method does not optimize prices, guarantee firm capacity, or calculate storage obligations under any country’s regulation.

class energy_methods.storage_peak_shift.StorageStep(charged_input_mwh, delivered_mwh, curtailed_mwh, unmet_peak_mwh, soc_mwh)[source]#

Bases: object

Energy accounting for one timestep (all energy fields in MWh).

Parameters:
  • charged_input_mwh (float)

  • delivered_mwh (float)

  • curtailed_mwh (float)

  • unmet_peak_mwh (float)

  • soc_mwh (float)

charged_input_mwh: float#
delivered_mwh: float#
curtailed_mwh: float#
unmet_peak_mwh: float#
soc_mwh: float#
class energy_methods.storage_peak_shift.StorageShiftResult(steps, peak_shortfall_mwh, peak_delivered_mwh, peak_coverage, curtailed_mwh, final_soc_mwh)[source]#

Bases: object

Storage shift output with an audit-ready energy-balance trace.

Parameters:
  • steps (tuple[StorageStep, ...])

  • peak_shortfall_mwh (float)

  • peak_delivered_mwh (float)

  • peak_coverage (float)

  • curtailed_mwh (float)

  • final_soc_mwh (float)

steps: tuple[StorageStep, ...]#
peak_shortfall_mwh: float#
peak_delivered_mwh: float#
peak_coverage: float#
curtailed_mwh: float#
final_soc_mwh: float#
energy_methods.storage_peak_shift.simulate_storage_peak_shift(surplus_mw, peak_shortfall_mw, *, battery_power_mw, battery_energy_mwh, round_trip_efficiency=0.9, timestep_hours=1.0, initial_soc_mwh=0.0)[source]#

Charge only from renewable surplus and discharge only into peak shortfall.

surplus_mw is renewable generation remaining after serving contemporaneous load, not total PV generation. peak_shortfall_mw is the remaining evening/peak demand to be covered by storage. Both must be nonnegative, and cannot simultaneously be positive. The battery never charges from the grid.

A greedy sequential schedule is calculated without look-ahead. A single symmetric charge/discharge efficiency sqrt(round_trip_efficiency) is used. Storage energy capacity represents usable SOC range. Self-discharge, degradation, grid export limits, operating reserves and costs are omitted.

Parameters:
  • surplus_mw (Sequence[float])

  • peak_shortfall_mw (Sequence[float])

  • battery_power_mw (float)

  • battery_energy_mwh (float)

  • round_trip_efficiency (float)

  • timestep_hours (float)

  • initial_soc_mwh (float)

Return type:

StorageShiftResult