EVPeakShave#

class popo.scenarios.EVPeakShave(element, kw_target, kw_target_low, terminal=1, band_pct=2.0, charge_rate_pct=50.0)#

Bases: object

Fleet dispatch by an OpenDSS StorageController watching one element.

The controller discharges the vehicles while the monitored element’s power is above kw_target (ModeDischarge=PeakShave) and recharges them while it is below kw_target_low (ModeCharge=PeakShaveLow): peak shaving and valley filling. Between the two targets the vehicles idle. A separate low target matters: recharging on a fixed hour while the element is still above the high target makes the controller alternate between charging and discharging until OpenDSS stops it.

The controller knows nothing of whether a vehicle is home, so it assumes every vehicle is available whenever it dispatches; that holds for an evening peak and a night valley, not for a daytime one.

Variables:
  • element – The monitored element, e.g. "Transformer.tr1".

  • kw_target – Power above which the fleet discharges.

  • kw_target_low – Power below which the fleet recharges; must be below kw_target.

  • terminal – Terminal of element that is measured.

  • band_pct – Dead band around each target, in percent of it.

  • charge_rate_pct – Recharge power limit, in percent of each vehicle’s charger rating.