PV-Ausrichtung angepasst, Neighborhood formatiert
This commit is contained in:
@@ -63,30 +63,45 @@ class Neighborhood:
|
||||
# Gesamterzeugung, Gesamtverbrauch und Nettoverbrauch plotten
|
||||
def plot_consumption(self):
|
||||
total_consumption = -1*(self.consumer.final_consumption + self.producer.final_consumption)
|
||||
total_consumption_mean = total_consumption.rolling(168).mean()
|
||||
total_production = self.producer.final_production
|
||||
total_production_mean = total_production.rolling(168).mean()
|
||||
net_value = total_consumption + total_production
|
||||
net_value_mean = net_value.rolling(168).mean()
|
||||
|
||||
# X-Werte anlegen, einen Wert löschen da 8761 Werte vorhanden sind, aber nur 8760 benötigt werden
|
||||
x = pd.date_range(start='2018-12-31', end ='2019-12-31', freq='1h')
|
||||
x = x[:-1]
|
||||
|
||||
# Plot dimensionieren
|
||||
plt.figure(figsize=(10, 6))
|
||||
# y-Werte den x-Werten zuordnen
|
||||
plt.bar(x, total_consumption)
|
||||
plt.bar(x, total_production)
|
||||
plt.bar(x, net_value)
|
||||
#plt.plot(x, net_value, '-')
|
||||
plt.figure(figsize=(15, 9))
|
||||
|
||||
# Barplot anlegen
|
||||
|
||||
#plt.bar(x, total_consumption)
|
||||
#plt.bar(x, total_production,color='orange')
|
||||
#plt.bar(x, net_value,color='forestgreen')
|
||||
|
||||
# Rollendes Mittel plotten
|
||||
#plt.plot(x, net_value_mean,'-',color='forestgreen')
|
||||
|
||||
# Titel und Achsenbeschriftungen anlegen
|
||||
plt.xlabel('Stunde')
|
||||
plt.ylabel('Strom (kWh)')
|
||||
plt.title('Produktion/Verbrauch Nachbarschaft')
|
||||
plt.xlabel('Kalendertag')
|
||||
plt.ylabel('Leistung (W)')
|
||||
#plt.title('Nettoleistung Nachbarschaft Standardfalll')
|
||||
plt.title('Rollendes Mittel (7 Tage) Netto-Leistung Nachbarschaft Standardfall')
|
||||
|
||||
# X-Ticks nur monatlich plotten
|
||||
monthly_ticks = pd.date_range(start='2018-12-31', end ='2019-12-31', freq='1MS')
|
||||
plt.xticks(monthly_ticks)
|
||||
|
||||
# Legende anlegen
|
||||
plt.legend(['Verbrauch', 'Produktion', 'Netto-Wert'], loc='upper right')
|
||||
#plt.legend(['Verbrauch', 'Erzeugung'], loc='upper right')
|
||||
#plt.legend(['Verbrauch', 'Erzeugung', 'Netto-Wert'], loc='upper right')
|
||||
|
||||
# X-Labels rotieren
|
||||
plt.xticks(rotation=45)
|
||||
|
||||
# Grid anlegen
|
||||
plt.grid(color='black', axis='y', linestyle='--', linewidth=0.5)
|
||||
plt.show()
|
||||
|
||||
@@ -20,8 +20,6 @@ from pvlib.temperature import TEMPERATURE_MODEL_PARAMETERS
|
||||
latitude = 47.2675
|
||||
longitude = 11.3910
|
||||
tz = 'Europe/Vienna'
|
||||
surface_tilt = 0
|
||||
surface_azimuth = 180
|
||||
year = 2019
|
||||
|
||||
# Daten für Datenbank -> Module + WR
|
||||
@@ -33,8 +31,8 @@ inverter = database_inverter['ABB__PVI_4_2_OUTD_US__208V_']
|
||||
# PV-Anlage definieren
|
||||
modules_per_string = 10
|
||||
strings_per_inverter = 2
|
||||
surface_tilt = 0
|
||||
surface_azimuth = 180
|
||||
surface_tilt = 20
|
||||
surface_azimuth = 150
|
||||
|
||||
# Temperaturparameter definieren
|
||||
temperature_parameters = TEMPERATURE_MODEL_PARAMETERS['sapm']['open_rack_glass_glass']
|
||||
@@ -62,7 +60,7 @@ def create_production_profile():
|
||||
|
||||
# Hier ist Süden Azimuth = 0°, bei PVLib ist es 180°
|
||||
poa_data, meta, inputs = pvlib.iotools.get_pvgis_hourly(latitude=latitude, longitude=longitude, start=year, end=year, raddatabase='PVGIS-SARAH3', components=True, surface_tilt=surface_tilt,
|
||||
surface_azimuth=surface_azimuth-180, outputformat='json', usehorizon=True, userhorizon=None, pvcalculation=False, peakpower=None,
|
||||
surface_azimuth=surface_azimuth-150, outputformat='json', usehorizon=True, userhorizon=None, pvcalculation=False, peakpower=None,
|
||||
pvtechchoice='crystSi', mountingplace='free', loss=0, trackingtype=0, optimal_surface_tilt=False, optimalangles=False,
|
||||
url='https://re.jrc.ec.europa.eu/api/', map_variables=True, timeout=30)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user