spice_ev.battery.Battery.unload

Battery.unload(timedelta, max_power=None, target_soc=None, target_power=None)

Discharge battery.

Adjust SoC and return average power provided for a given timedelta and a maximum of power that can be handled by connected device. A target SoC or target output power may be given, but not both. If neither is provided, the battery just discharges.

Parameters:
  • timedelta (timedelta) – time period in which battery can be discharged

  • max_power (numeric) – maximum power connected device can receive

  • target_soc (numeric) – desired soc

  • target_power (numeric) – desired output power [kW]

Returns:

average power and soc_delta

Return type:

dict