Wallbox Leistung wird von der Lastprognose abgezogen

This commit is contained in:
Bla Bla
2024-08-30 11:49:44 +02:00
parent 5d5514c901
commit 65ecf4cf3c
6 changed files with 442 additions and 204 deletions

View File

@@ -29,7 +29,7 @@ from config import *
app = Flask(__name__)
opt_class = optimization_problem(prediction_hours=48, strafe=10)
opt_class = optimization_problem(prediction_hours=prediction_hours, strafe=10, optimization_hours=optimization_hours)
@@ -224,7 +224,7 @@ def flask_optimize():
parameter = request.json
# Erforderliche Parameter prüfen
erforderliche_parameter = [ 'strompreis_euro_pro_wh', "gesamtlast",'pv_akku_cap', "einspeiseverguetung_euro_pro_wh", 'pv_forecast','temperature_forecast', 'eauto_min_soc', "eauto_cap","eauto_charge_efficiency","eauto_charge_power","eauto_soc","pv_soc","start_solution","haushaltsgeraet_dauer","haushaltsgeraet_wh"]
erforderliche_parameter = [ 'preis_euro_pro_wh_akku','strompreis_euro_pro_wh', "gesamtlast",'pv_akku_cap', "einspeiseverguetung_euro_pro_wh", 'pv_forecast','temperature_forecast', 'eauto_min_soc', "eauto_cap","eauto_charge_efficiency","eauto_charge_power","eauto_soc","pv_soc","start_solution","haushaltsgeraet_dauer","haushaltsgeraet_wh"]
for p in erforderliche_parameter:
if p not in parameter:
return jsonify({"error": f"Fehlender Parameter: {p}"}), 400