attach_storage#
- popo.scenarios.attach_storage(dss, customers, penetration, rng, kv, dispatch=None, interval_hours=0.5, connection=None)#
Give a fraction of customers a battery that charges on a fixed daily window.
To test storage as a mitigation for rooftop export, pass the customers that hold generation, e.g. the buses of
popo.network.Circuit.pvsystems, so each battery sits behind the array it is meant to absorb.- Parameters:
dss (
Any) – Anopendssdirectmodule with a compiled circuit.customers (
Sequence[tuple[str,str]]) –(load name, bus)pairs eligible for installation.penetration (
float) – Fraction of customers to fit, in[0, 1].rng (
Generator) – Seeded generator, so the same customers are chosen at every level.kv (
float) – Service voltage of the connection.dispatch (
StorageDispatch|None) – Rating and windows; defaults to a 3 kW, 10 kWh unit charging from 10:00 to 17:00 and discharging from 18:00 to 22:00.interval_hours (
float) – Interval length of the dispatch shape, in hours.connection (
str|None) – Bus phase suffix forced on every installation;Noneconnects each on its customer’s own phase.
- Return type:
- Returns:
Number of installations made.