v2g_dispatch#
- popo.scenarios.v2g_dispatch(charging_kw, charger_kw, battery, schedule, interval_hours=0.5)#
The Storage exchange for one vehicle, in kW, positive when discharging to the network.
Each day the vehicle discharges in the evening window, at the scheduled power and at steps where it is not charging, until it reaches its reserve; the energy drawn, divided by the round-trip efficiency, is then recharged in the following recharge window using the charger capacity the recorded charging leaves free. Energy not recharged by the end of the window is carried to the next window, so the battery never drifts below its reserve.
- Parameters:
charging_kw (
ndarray) – The vehicle’s recorded charging power per interval.charger_kw (
float) – The charger’s rating, shared by charging and the exchange.battery (
EVBattery) – The battery the exchange draws on.schedule (
V2GSchedule) – When to discharge and recharge.interval_hours (
float) – Length of one interval.
- Return type:
- Returns:
Exchange power per interval, positive for discharge and negative for recharge.