MCPcopy Create free account
hub / github.com/ahalev/python-microgrid / _size_battery

Method _size_battery

src/pymgrid/MicrogridGenerator.py:388–392  ·  view source on GitHub ↗

Function that returns the capacity of the battery, equivalent to 3 to 5 hours of mean load.

(self, load)

Source from the content-addressed store, hash-verified

386
387
388 def _size_battery(self, load):
389 """ Function that returns the capacity of the battery, equivalent to 3 to 5 hours of mean load. """
390 #energy duration
391 battery = int(np.ceil(np.random.randint(low=3,high=6)*np.mean(load, axis=0).item()))
392 return battery
393
394
395 ###########################################

Callers 2

_size_mgMethod · 0.95
test_size_batteryMethod · 0.80

Calls 1

itemMethod · 0.80

Tested by 1

test_size_batteryMethod · 0.64