Lastprofile angepasst, variable Zahl an Producer+Consumer

This commit is contained in:
2025-01-07 21:04:56 +01:00
parent 210a2f9bc3
commit 54657cffd5
3 changed files with 8831 additions and 8805 deletions

19
main.py
View File

@@ -1,16 +1,17 @@
from neighborhood import Producer, Consumer, Neighborhood
# Anzahl Haushalte ohne PV-Anlagen
num_consumer = 5
# Anzahl Haushalte mit PV-Anlagen
num_producer = 5
# Consumer-Instanzen anlegen
standard_consumer = Consumer(quantity=10, profile_type='std')
wp_consumer = Consumer(quantity=0, profile_type='wp')
ea_consumer = Consumer(quantity=0, profile_type='ea')
# Instanzen für Erzeuger und Verbraucher anlegen
producer = Producer(num_producer)
consumer = Consumer(num_consumer)
# Producer-Instanz anlegen
standard_producer = Producer(quantity=0, profile_type='std')
wp_producer = Producer(quantity=0, profile_type='wp')
ea_producer = Producer(quantity=0, profile_type='ea')
# Instanz für Nachbarschaft anlegen und Ergebnis plotten
neighborhood = Neighborhood(producer, consumer)
neighborhood = Neighborhood(producers=[standard_producer, wp_producer, ea_producer], consumers=[standard_consumer, wp_consumer, ea_consumer])
neighborhood.plot_consumption()