attach_ev_storage#
- popo.scenarios.attach_ev_storage(dss, customers, penetration, profiles, rng, kv, battery=None, schedule=None, controller=None, power_factor=0.99, connection=None, interval_hours=0.5)#
Give a fraction of customers an electric vehicle that can discharge to the network.
Each vehicle is a
Loadfollowing its recorded charging sessions, as inpopo.scenarios.attach_charging()(same customers and vehicles for the same seed), plus aStorageelement on the same phase for the vehicle-to-grid exchange: a fixedV2GScheduleby default, or an OpenDSSStorageControllerwithcontroller.- Parameters:
dss (
Any) – Anopendssdirectmodule with a compiled circuit.customers (
Sequence[tuple[str,str]]) –(load name, bus)pairs eligible for a vehicle.penetration (
float) – Fraction of customers given a vehicle, in[0, 1].profiles (
ndarray) – Recorded charging power, shape(intervals, vehicles).rng (
Generator) – Seeded generator.kv (
float) – Service voltage of the connection.battery (
EVBattery|None) – The vehicles’ battery; defaults toEVBattery.schedule (
V2GSchedule|None) – Fixed exchange schedule; defaults toV2GSchedulewhencontrollerisNone.controller (
EVPeakShave|None) – Dispatch the exchange with aStorageControllerinstead of a schedule.power_factor (
float) – Power factor of the charging load.connection (
str|None) – Bus phase suffix forced on every vehicle;Noneuses each customer’s own phase (popo.scenarios.service_connection()).interval_hours (
float) – Length of one interval ofprofiles.
- Return type:
- Returns:
Number of vehicles installed.
- Raises:
ValueError – If both
scheduleandcontrollerare given.