mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-12-14 07:46:18 +00:00
- Akku mit Verlusten + Bug in der test.py Gesamtlast kein update
This commit is contained in:
@@ -1,19 +1,13 @@
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
from modules.class_load_container import Gesamtlast # Stellen Sie sicher, dass dies dem tatsächlichen Importpfad entspricht
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
|
||||
|
||||
def visualisiere_ergebnisse(gesamtlast,leistung_haushalt,leistung_wp, pv_forecast, strompreise, ergebnisse):
|
||||
|
||||
|
||||
def visualisiere_ergebnisse(gesamtlast,leistung_haushalt,leistung_wp, pv_forecast, strompreise, ergebnisse, soc_eauto, discharge_hours, laden_moeglich):
|
||||
# Last und PV-Erzeugung
|
||||
plt.figure(figsize=(14, 10))
|
||||
|
||||
plt.subplot(3, 1, 1)
|
||||
plt.subplot(3, 2, 1)
|
||||
stunden = np.arange(1, len(next(iter(gesamtlast.lasten.values()))) + 1)
|
||||
|
||||
|
||||
@@ -31,9 +25,13 @@ def visualisiere_ergebnisse(gesamtlast,leistung_haushalt,leistung_wp, pv_forecas
|
||||
plt.grid(True)
|
||||
plt.legend()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Strompreise
|
||||
stundenp = np.arange(1, len(strompreise)+1)
|
||||
plt.subplot(3, 1, 2)
|
||||
plt.subplot(3, 2, 2)
|
||||
plt.plot(stundenp, strompreise, label='Strompreis (€/Wh)', color='purple', marker='s')
|
||||
plt.title('Strompreise')
|
||||
plt.xlabel('Stunde des Tages')
|
||||
@@ -41,26 +39,44 @@ def visualisiere_ergebnisse(gesamtlast,leistung_haushalt,leistung_wp, pv_forecas
|
||||
plt.legend()
|
||||
plt.grid(True)
|
||||
|
||||
print(pv_forecast.shape)
|
||||
print(len(ergebnisse['Eigenverbrauch_Wh_pro_Stunde']))
|
||||
|
||||
plt.figure(figsize=(18, 12))
|
||||
|
||||
stunden = np.arange(1, len(ergebnisse['Eigenverbrauch_Wh_pro_Stunde'])+1)
|
||||
# Eigenverbrauch, Netzeinspeisung und Netzbezug
|
||||
plt.subplot(3, 2, 1)
|
||||
plt.subplot(3, 2, 3)
|
||||
plt.plot(stunden, ergebnisse['Eigenverbrauch_Wh_pro_Stunde'], label='Eigenverbrauch (Wh)', marker='o')
|
||||
plt.plot(stunden, ergebnisse['Netzeinspeisung_Wh_pro_Stunde'], label='Netzeinspeisung (Wh)', marker='x')
|
||||
plt.plot(stunden, ergebnisse['akku_soc_pro_stunde'], label='Akku (%)', marker='x')
|
||||
plt.plot(stunden, ergebnisse['Netzbezug_Wh_pro_Stunde'], label='Netzbezug (Wh)', marker='^')
|
||||
#plt.plot(stunden, pv_forecast, label='PV-Erzeugung (Wh)', marker='x')
|
||||
plt.plot(stunden, pv_forecast, label='PV-Erzeugung (Wh)', marker='x')
|
||||
#plt.plot(stunden, last, label='Last (Wh)', marker='o')
|
||||
|
||||
plt.title('Energiefluss pro Stunde')
|
||||
plt.xlabel('Stunde')
|
||||
plt.ylabel('Energie (Wh)')
|
||||
plt.legend()
|
||||
plt.grid(True)
|
||||
|
||||
plt.subplot(3, 2, 4)
|
||||
plt.plot(stunden, ergebnisse['akku_soc_pro_stunde'], label='Akku (%)', marker='x')
|
||||
plt.plot(stunden, soc_eauto, label='Eauto Akku (%)', marker='x')
|
||||
plt.legend(loc='upper left')
|
||||
|
||||
ax1 = plt.subplot(3, 2, 5)
|
||||
for hour, value in enumerate(discharge_hours):
|
||||
if value == 1:
|
||||
ax1.axvspan(hour, hour+1, color='red', alpha=0.3, label='Entlademöglichkeit' if hour == 0 else "")
|
||||
for hour, value in enumerate(laden_moeglich):
|
||||
if value == 1:
|
||||
ax1.axvspan(hour, hour+1, color='green', alpha=0.3, label='Lademöglichkeit' if hour == 0 else "")
|
||||
ax1.legend(loc='upper left')
|
||||
|
||||
|
||||
|
||||
|
||||
plt.grid(True)
|
||||
plt.figure(figsize=(14, 10))
|
||||
# Kosten und Einnahmen pro Stunde
|
||||
plt.subplot(3, 2, 2)
|
||||
plt.subplot(1, 2, 1)
|
||||
plt.plot(stunden, ergebnisse['Kosten_Euro_pro_Stunde'], label='Kosten (Euro)', marker='o', color='red')
|
||||
plt.plot(stunden, ergebnisse['Einnahmen_Euro_pro_Stunde'], label='Einnahmen (Euro)', marker='x', color='green')
|
||||
plt.title('Finanzielle Bilanz pro Stunde')
|
||||
@@ -70,7 +86,7 @@ def visualisiere_ergebnisse(gesamtlast,leistung_haushalt,leistung_wp, pv_forecas
|
||||
plt.grid(True)
|
||||
|
||||
# Zusammenfassende Finanzen
|
||||
plt.subplot(3, 2, 3)
|
||||
plt.subplot(1, 2, 2)
|
||||
gesamtkosten = ergebnisse['Gesamtkosten_Euro']
|
||||
gesamteinnahmen = ergebnisse['Gesamteinnahmen_Euro']
|
||||
gesamtbilanz = ergebnisse['Gesamtbilanz_Euro']
|
||||
|
||||
Reference in New Issue
Block a user