E-Auto/Wallbox wird jetzt mit diskreten Ladezuständen versehen, in der

config.py einstellbar
Jeder DisCharge = 0 (Akkus nicht benutzen) wird mit 1Cent Strafe belegt,
da die Lastverteilung fehlt. Also wenn es egal ist, soll er den Akku
anschalten.
This commit is contained in:
Bla Bla
2024-09-04 08:23:17 +02:00
parent c03d5f386a
commit 8f1d23fe9d
3 changed files with 111 additions and 171 deletions

170
test.py
View File

@@ -23,7 +23,7 @@ import os
start_hour = 13
start_hour = 10
pv_forecast= [
0,
@@ -33,45 +33,45 @@ pv_forecast= [
0,
0,
0,
35.4104640357043,
436.191574979506,
734.585613834398,
914.346108603927,
1019.5228214119,
1766.84136350058,
5980.60975052259,
6236.00681862336,
5893.38154543782,
4309.88538120413,
3338.29004915145,
2177.55660706753,
1091.00542545193,
437.819525591319,
44.2226537829726,
8.05499380056326,
352.906710152794,
728.510230116837,
930.282113186742,
1043.25445504815,
1106.74498341506,
1161.69140358941,
6018.82237954771,
5519.06508185542,
3969.87633262384,
3017.96293205546,
1943.06957539177,
1007.17065928121,
319.672404988219,
7.87634136648885,
0,
0,
0,
0,
-0.0269415125679914,
0,
0,
0,
0,
25.5745140893473,
494.188146846569,
943.821134036728,
1458.66413119635,
1819.46147983229,
2127.45430524539,
2267.78128099068,
5944.86706099518,
5337.1322153025,
4376.56125932204,
3020.00212091936,
2414.53994231359,
1373.626161377,
517.764497317134,
35.619750070296,
0,
5.04340865393592,
335.585179721385,
705.32093965119,
1121.11845108965,
1604.78796905453,
2157.38417470292,
1433.25331647539,
5718.48693381975,
4553.95522042393,
3027.5471975751,
2574.46499468404,
1720.39712914078,
963.402827741714,
383.299960578605,
0,
0,
0
]
@@ -177,60 +177,60 @@ strompreis_euro_pro_wh = [
0.00027800228
]
gesamtlast= [
546.16318964697,
893.072526185525,
448.7325491406,
460.696954446666,
497.688171532182,
468.186120420737,
424.440426628658,
454.341890696582,
1070.45287392313,
1096.46234344204,
1199.71317588613,
1294.39989535284,
1459.42631059004,
1295.23757474948,
1304.65748778424,
1187.47511606455,
1309.49984671163,
1106.60773651081,
1098.98136451936,
2112.82264661039,
1143.37118921705,
858.863135790621,
787.018517493612,
693.683533270357,
545.860858342826,
892.702692835489,
448.372058076642,
460.284228901714,
498.457870099476,
469.01826331988,
424.293997897019,
454.660942633609,
1070.71990586461,
1096.44557410693,
1199.72027861112,
1294.75410706442,
1459.61174223338,
1295.77661554687,
1304.95591385395,
1188.62778631227,
1310.43099742786,
1108.58589249073,
1101.73849714744,
2114.05576978017,
1143.68031998738,
858.607350786608,
786.574111043611,
693.463415886943
676.712691350422,
876.187995931743,
527.13496018672,
468.8832716908,
531.379343927472,
517.948592590007,
483.146247717859,
472.284832630916,
1011.67951144825,
995.004317471209,
1053.06955100748,
1063.9080395892,
1320.56143113193,
1132.02504127723,
1163.67246837107,
1176.81613875329,
1216.21914051274,
1103.77675478374,
1129.12158352941,
1178.70748410006,
1050.97894301995,
988.55813665172,
912.383030600675,
704.613809064162,
516.371536532904,
868.049462163551,
694.342395302237,
608.791374542592,
556.310160150771,
488.88509383088,
506.910948217211,
804.891484351704,
1141.97850300923,
1056.97012155463,
992.46421110044,
1155.98941936038,
827.012550864246,
1257.97979633947,
1232.66876472966,
871.261677859026,
860.884647456424,
1158.02879027548,
1222.71811626233,
1221.03860924522,
949.989048056282,
987.007654562746,
733.993140774617,
592.972573276025
]
start_solution= [
0,
1,
0,
1,
1,
1,
0,
1,
@@ -325,11 +325,11 @@ start_solution= [
1,
1
]
parameter= {"preis_euro_pro_wh_akku": 30e-05,'pv_soc': 95.00, 'pv_akku_cap': 30000, 'year_energy': 4100000, 'einspeiseverguetung_euro_pro_wh': 7e-05, 'max_heizleistung': 1000,"gesamtlast":gesamtlast, 'pv_forecast': pv_forecast, "temperature_forecast":temperature_forecast, "strompreis_euro_pro_wh":strompreis_euro_pro_wh, 'eauto_min_soc': 0, 'eauto_cap': 60000, 'eauto_charge_efficiency': 0.95, 'eauto_charge_power': 7590, 'eauto_soc': 53, 'pvpowernow': 211.137503624, 'start_solution': start_solution, 'haushaltsgeraet_wh': 937, 'haushaltsgeraet_dauer': 0}
parameter= {"preis_euro_pro_wh_akku": 10e-05,'pv_soc': 80, 'pv_akku_cap': 26400, 'year_energy': 4100000, 'einspeiseverguetung_euro_pro_wh': 7e-05, 'max_heizleistung': 1000,"gesamtlast":gesamtlast, 'pv_forecast': pv_forecast, "temperature_forecast":temperature_forecast, "strompreis_euro_pro_wh":strompreis_euro_pro_wh, 'eauto_min_soc': 0, 'eauto_cap': 60000, 'eauto_charge_efficiency': 0.95, 'eauto_charge_power': 11040, 'eauto_soc': 54, 'pvpowernow': 211.137503624, 'start_solution': start_solution, 'haushaltsgeraet_wh': 937, 'haushaltsgeraet_dauer': 0}
opt_class = optimization_problem(prediction_hours=48, strafe=10,optimization_hours=24)
ergebnis = opt_class.optimierung_ems(parameter=parameter, start_hour=start_hour)
print(ergebnis)
print(jsonify(ergebnis))
#print(ergebnis)
#print(jsonify(ergebnis))