17 lines
578 B
Python
17 lines
578 B
Python
from neighborhood import Producer, Consumer, Neighborhood
|
|
|
|
# Anzahl Haushalte ohne PV-Anlagen
|
|
num_consumer = 50
|
|
avg_consumption_per_consumer = 10
|
|
|
|
# Anzahl Haushalte mit PV-Anlagen
|
|
num_producer = 10
|
|
avg_production_per_producer = 20
|
|
|
|
# Instanzen für Erzeuger und Verbraucher anlegen
|
|
consumer = Consumer(num_consumer, avg_consumption_per_consumer)
|
|
producer = Producer(num_producer, avg_consumption_per_consumer, avg_production_per_producer)
|
|
|
|
# Instanz für Nachbarschaft anlegen und Ergebnis plotten
|
|
neighborhood = Neighborhood(producer, consumer)
|
|
neighborhood.plot_consumption() |