Lastprofile angepasst, variable Zahl an Producer+Consumer
This commit is contained in:
19
main.py
19
main.py
@@ -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()
|
||||
Reference in New Issue
Block a user