Startpunkt setzbar und Prognosezeitraum ebenfalls.

This commit is contained in:
Bla Bla
2024-02-25 16:47:28 +01:00
parent 33a6d59bcb
commit 239ad276c9
7 changed files with 140 additions and 130 deletions

View File

@@ -1,18 +1,19 @@
import numpy as np
class PVAkku:
def __init__(self, kapazitaet_wh):
def __init__(self, kapazitaet_wh, hours):
# Kapazität des Akkus in Wh
self.kapazitaet_wh = kapazitaet_wh
# Initialer Ladezustand des Akkus in Wh
self.soc_wh = 0
self.discharge_array = np.full(24, 1)
self.hours = hours
self.discharge_array = np.full(self.hours, 1)
def reset(self):
self.soc_wh = 0
self.discharge_array = np.full(24, 1)
self.discharge_array = np.full(self.hours, 1)
def set_discharge_per_hour(self, discharge_array):
assert(len(discharge_array) == 24)
assert(len(discharge_array) == self.hours)
self.discharge_array = discharge_array
def ladezustand_in_prozent(self):