gesamtlast_simple

This commit is contained in:
Bla Bla 2024-09-05 14:16:43 +02:00
parent 93d30ffc29
commit 992d1b085e

View File

@ -168,31 +168,31 @@ def flask_gesamtlast():
return jsonify(last.tolist()) return jsonify(last.tolist())
# # @app.route('/gesamtlast', methods=['GET']) @app.route('/gesamtlast_simple', methods=['GET'])
# # def flask_gesamtlast(): def flask_gesamtlast():
# # if request.method == 'GET': if request.method == 'GET':
# # year_energy = float(request.args.get("year_energy")) year_energy = float(request.args.get("year_energy"))
# # date_now,date = get_start_enddate(prediction_hours,startdate=datetime.now().date()) date_now,date = get_start_enddate(prediction_hours,startdate=datetime.now().date())
# # ############### ###############
# # # Load Forecast # Load Forecast
# # ############### ###############
# # lf = LoadForecast(filepath=r'load_profiles.npz', year_energy=year_energy) lf = LoadForecast(filepath=r'load_profiles.npz', year_energy=year_energy)
# # #leistung_haushalt = lf.get_daily_stats(date)[0,...] # Datum anpassen #leistung_haushalt = lf.get_daily_stats(date)[0,...] # Datum anpassen
# # leistung_haushalt = lf.get_stats_for_date_range(date_now,date)[0] # Nur Erwartungswert! leistung_haushalt = lf.get_stats_for_date_range(date_now,date)[0] # Nur Erwartungswert!
# # gesamtlast = Gesamtlast(prediction_hours=prediction_hours) gesamtlast = Gesamtlast(prediction_hours=prediction_hours)
# # gesamtlast.hinzufuegen("Haushalt", leistung_haushalt) gesamtlast.hinzufuegen("Haushalt", leistung_haushalt)
# # # ############### # ###############
# # # # WP # # WP
# # # ############## # ##############
# # # leistung_wp = wp.simulate_24h(temperature_forecast) # leistung_wp = wp.simulate_24h(temperature_forecast)
# # # gesamtlast.hinzufuegen("Heatpump", leistung_wp) # gesamtlast.hinzufuegen("Heatpump", leistung_wp)
# # last = gesamtlast.gesamtlast_berechnen() last = gesamtlast.gesamtlast_berechnen()
# # print(last) print(last)
# # #print(specific_date_prices) #print(specific_date_prices)
# # return jsonify(last.tolist()) return jsonify(last.tolist())
@app.route('/pvforecast', methods=['GET']) @app.route('/pvforecast', methods=['GET'])
def flask_pvprognose(): def flask_pvprognose():