Skip to content

Commit

Permalink
size battery and genset over axis=0a
Browse files Browse the repository at this point in the history
  • Loading branch information
ahalev committed Mar 14, 2024
1 parent 4bc369e commit b6c9990
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pymgrid/MicrogridGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,15 +380,15 @@ def _size_genset(self, load, max_operating_loading = 0.9):
#random number > 3 < 20
# polynomial for fuel consumption

_size_genset = int(np.ceil(np.max(load)/max_operating_loading))
_size_genset = int(np.ceil(np.max(load, axis=0)/max_operating_loading))

return _size_genset


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


Expand Down

0 comments on commit b6c9990

Please sign in to comment.