Soc 1 hour shift fixed + some german -> english translations in ems

This commit is contained in:
Andreas
2024-12-22 12:03:48 +01:00
committed by Andreas
parent 3c646fcd66
commit 9edc2d20d3
7 changed files with 422 additions and 421 deletions

View File

@@ -244,7 +244,7 @@ def test_simulation(create_ems_instance):
# Simulate starting from hour 1 (this value can be adjusted)
result = ems.simuliere(start_stunde=start_hour)
result = ems.simuliere(start_hour=start_hour)
# visualisiere_ergebnisse(
# ems.gesamtlast,
@@ -330,11 +330,11 @@ def test_simulation(create_ems_instance):
# Check the values in 'akku_soc_pro_stunde'
assert (
result["akku_soc_pro_stunde"][-1] == 28.675
), "The value at index -1 of 'akku_soc_pro_stunde' should be 28.675."
result["akku_soc_pro_stunde"][-1] == 42.151590909090906
), "The value at index -1 of 'akku_soc_pro_stunde' should be 42.151590909090906."
assert (
result["akku_soc_pro_stunde"][1] == 25.379090909090905
), "The value at index 1 of 'akku_soc_pro_stunde' should be 25.379090909090905."
result["akku_soc_pro_stunde"][1] == 60.08659090909091
), "The value at index 1 of 'akku_soc_pro_stunde' should be 60.08659090909091."
# Check home appliances
assert (

View File

@@ -154,7 +154,7 @@ def test_simulation(create_ems_instance):
ems = create_ems_instance
# Simulate starting from hour 0 (this value can be adjusted)
result = ems.simuliere(start_stunde=start_hour)
result = ems.simuliere(start_hour=start_hour)
# --- Pls do not remove! ---
# visualisiere_ergebnisse(
@@ -224,12 +224,12 @@ def test_simulation(create_ems_instance):
), "The length of 'akku_soc_pro_stunde' should be 48."
# Verfify DC and AC Charge Bins
assert (
abs(result["akku_soc_pro_stunde"][2] - 44.70681818181818) < 1e-5
), "'akku_soc_pro_stunde[2]' should be 44.70681818181818."
assert (
abs(result["akku_soc_pro_stunde"][10] - 10.0) < 1e-5
), "'akku_soc_pro_stunde[10]' should be 10."
assert (
abs(result["akku_soc_pro_stunde"][11] - 79.275184) < 1e-5
), "'akku_soc_pro_stunde[11]' should be 79.275184."
assert (
abs(result["Netzeinspeisung_Wh_pro_Stunde"][10] - 3946.93) < 1e-3
@@ -240,8 +240,8 @@ def test_simulation(create_ems_instance):
), "'Netzeinspeisung_Wh_pro_Stunde[11]' should be 0.0."
assert (
abs(result["akku_soc_pro_stunde"][20] - 98) < 1e-5
), "'akku_soc_pro_stunde[11]' should be 98."
abs(result["akku_soc_pro_stunde"][20] - 10) < 1e-5
), "'akku_soc_pro_stunde[20]' should be 10."
assert (
abs(result["Last_Wh_pro_Stunde"][20] - 6050.98) < 1e-3
), "'Netzeinspeisung_Wh_pro_Stunde[11]' should be 0.0."

View File

@@ -62,8 +62,8 @@ def test_optimize(
start_hour = 10
# Activate with pytest --full-run
if ngen > 10 and not is_full_run:
pytest.skip()
# if ngen > 10 and not is_full_run:
# pytest.skip()
visualize_filename = str((DIR_TESTDATA / f"new_{fn_out}").with_suffix(".pdf"))

View File

@@ -476,6 +476,7 @@
0.0
],
"akku_soc_pro_stunde": [
80.0,
80.0,
79.91107093663912,
79.91107093663912,
@@ -512,7 +513,6 @@
100.0,
100.0,
100.0,
96.84060778236915,
96.84060778236915
],
"Electricity_price": [

View File

@@ -170,7 +170,7 @@
0.0,
0.5,
0.625,
0.0,
0.75,
0.0,
0.0,
0.0,
@@ -211,7 +211,7 @@
1103.78,
6373.12,
7733.71,
1050.98,
4299.98,
988.56,
912.38,
704.61,
@@ -241,6 +241,7 @@
592.97
],
"EAuto_SoC_pro_Stunde": [
5.0,
11.555,
11.555,
26.85,
@@ -251,34 +252,33 @@
74.92,
83.66,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585,
94.585
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0,
100.0
],
"Einnahmen_Euro_pro_Stunde": [
0.0,
@@ -320,7 +320,7 @@
0.0,
0.0
],
"Gesamt_Verluste": 9258.73062020124,
"Gesamt_Verluste": 9872.776074746695,
"Gesamtbilanz_Euro": 12.332782378812306,
"Gesamteinnahmen_Euro": 0.0,
"Gesamtkosten_Euro": 12.332782378812306,
@@ -495,7 +495,7 @@
230.91336797704525,
880.0977272727268,
1026.818181818182,
99.72409090909093,
713.7695454545456,
133.72909090909081,
124.41545454545451,
96.08318181818186,
@@ -525,6 +525,7 @@
0.0
],
"akku_soc_pro_stunde": [
80.0,
62.54222623966943,
62.54222623966943,
75.04222623966943,
@@ -535,34 +536,33 @@
83.83265434833275,
64.76391295714818,
43.24187438965506,
40.094017984696386,
35.87277142822256,
31.945515918580686,
28.912587199572425,
28.912587199572425,
25.176146083869945,
22.187423632079316,
22.187423632079316,
22.187423632079316,
22.187423632079316,
34.68742363207931,
34.68742363207931,
34.68742363207931,
34.68742363207931,
34.99947869620843,
36.0696843420455,
40.099841390631155,
40.249843096950585,
55.20257643028218,
67.47251658502745,
84.99550697329678,
88.77022785443704,
89.9213907145978,
89.9213907145978,
89.9213907145978,
89.9213907145978,
89.9213907145978,
89.9213907145978
26.108997323539356,
21.88775076706553,
17.96049525742366,
14.927566538415393,
14.927566538415393,
11.191125422712915,
8.20240297092228,
8.20240297092228,
8.20240297092228,
8.20240297092228,
20.70240297092228,
20.70240297092228,
20.70240297092228,
20.70240297092228,
21.014458035051405,
22.08466368088848,
26.114820729474133,
26.264822435793555,
41.217555769125156,
53.48749592387043,
71.01048631213975,
74.78520719328002,
75.93637005344077,
75.93637005344077,
75.93637005344077,
75.93637005344077,
75.93637005344077
],
"Electricity_price": [
0.000228,
@@ -711,7 +711,7 @@
"kapazitaet_wh": 60000,
"lade_effizienz": 0.95,
"max_ladeleistung_w": 11040,
"soc_wh": 56751.0,
"soc_wh": 60000.0,
"start_soc_prozent": 5
},
"start_solution": [
@@ -783,7 +783,7 @@
0.0,
2.0,
3.0,
0.0,
4.0,
0.0,
0.0,
0.0,

View File

@@ -1,29 +1,15 @@
{
"ac_charge": [
0.75,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.375,
0.0,
1.0,
0.0,
0.0,
0.0,
0.75,
0.0,
0.0,
1.0,
0.75,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.5,
0.0,
0.0,
0.0,
@@ -47,6 +33,20 @@
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"dc_charge": [
@@ -100,13 +100,13 @@
1.0
],
"discharge_allowed": [
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
1,
0,
@@ -115,6 +115,11 @@
1,
0,
0,
0,
1,
1,
0,
1,
1,
0,
1,
@@ -123,26 +128,21 @@
1,
1,
1,
0,
1,
1,
0,
1,
1,
1,
0,
1,
1,
1,
1,
0,
1,
0,
0,
1,
1,
0,
0,
1,
0,
1,
1,
1,
1,
@@ -150,50 +150,50 @@
1
],
"eautocharge_hours_float": [
0.5,
0.375,
0.625,
0.75,
0.625,
0.5,
0.5,
0.75,
0.0,
0.5,
0.375,
0.0,
0.0,
0.5,
0.5,
0.625,
1.0,
0.0,
0.375,
0.0,
0.5,
0.75,
1.0,
0.0,
0.375,
1.0,
0.0,
0.75,
0.375,
0.0,
0.375,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.5,
0.0,
0.5,
0.0,
0.0,
0.0,
0.0,
0.0,
0.5,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.375,
0.0,
0.0,
0.0,
0.375,
0.0,
0.0,
0.625,
0.0,
0.0,
0.0,
0.0,
@@ -201,15 +201,15 @@
],
"result": {
"Last_Wh_pro_Stunde": [
1053.07,
4996.91,
11808.56,
4882.03,
9029.67,
7609.82,
7466.22,
5036.78,
1129.12,
4986.07,
1063.91,
1320.56,
8876.029999999999,
8907.67,
7731.82,
6460.22,
6347.78,
3629.12,
1178.71,
1050.98,
988.56,
@@ -223,18 +223,18 @@
488.89,
506.91,
804.89,
3641.98,
1141.98,
1056.97,
992.46,
6399.99,
5088.99,
827.01,
6501.98,
1257.98,
1232.67,
871.26,
4804.26,
860.88,
1158.03,
1222.72,
6465.04,
7777.72,
1221.04,
949.99,
987.01,
733.99,
@@ -243,37 +243,37 @@
"EAuto_SoC_pro_Stunde": [
5.0,
11.555,
11.555,
11.555,
20.294999999999998,
29.035,
29.035,
42.144999999999996,
39.96,
48.699999999999996,
48.699999999999996,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
55.254999999999995,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
57.440000000000005,
63.995000000000005,
63.995000000000005,
72.735,
72.735,
72.735,
72.735,
72.735,
72.735,
63.995000000000005,
63.995000000000005,
70.55,
70.55,
70.55,
81.475,
81.475,
81.475,
@@ -320,13 +320,11 @@
0.0,
0.0
],
"Gesamt_Verluste": 10116.23845689936,
"Gesamtbilanz_Euro": 5.609399525190347,
"Gesamt_Verluste": 7755.845910804702,
"Gesamtbilanz_Euro": 4.690157296412734,
"Gesamteinnahmen_Euro": 0.0,
"Gesamtkosten_Euro": 5.609399525190347,
"Gesamtkosten_Euro": 4.690157296412734,
"Home_appliance_wh_per_hour": [
0.0,
0.0,
0.0,
0.0,
0.0,
@@ -362,87 +360,89 @@
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"Kosten_Euro_pro_Stunde": [
0.0,
0.0,
1.193390926,
0.7064482052307314,
0.5533942300000001,
0.0,
0.880004468,
1.4495244859999996,
0.53097063,
0.44343509999999997,
0.0,
0.0,
0.8107800974767518,
0.0,
0.0,
0.291163892,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.182970359,
0.0,
0.0,
0.26411047,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
1.005803838,
0.0,
0.007989913613567745,
1.06069824,
0.0,
0.012914366999999916,
4.174095896658514e-14,
0.0003442778967139274,
0.002459704740224363,
0.0,
0.028137079449292023,
0.0,
0.16027398000000012,
0.05016012000000004,
0.0076430797975209205,
0.0,
0.31687880399999996,
0.0,
0.0,
0.0,
0.0
0.16722497978466921,
0.16484566
],
"Netzbezug_Wh_pro_Stunde": [
0.0,
0.0,
5701.82,
3759.703061366319,
3010.8500000000004,
0.0,
4003.66,
7714.339999999998,
2888.8500000000004,
2212.75,
0.0,
0.0,
2705.305630553059,
0.0,
0.0,
980.68,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
556.31,
0.0,
0.0,
799.85,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
3306.3900000000003,
0.0,
35.04348076126204,
4795.2,
0.0,
68.72999999999956,
2.270998855635753e-10,
1.7179535764168035,
11.752053226107805,
0.0,
123.95189184710142,
0.0,
501.6400000000003,
250.30000000000018,
34.77288351920346,
0.0,
1057.3199999999997,
0.0,
0.0,
0.0,
0.0
572.4922279516235,
592.97
],
"Netzeinspeisung_Wh_pro_Stunde": [
0.0,
@@ -485,84 +485,84 @@
0.0
],
"Verluste_Pro_Stunde": [
16.744090909090914,
746.1354545454542,
1233.818181818182,
452.3948326360417,
414.0,
492.1022727272725,
450.0,
482.2936363636363,
101.0335466817773,
760.062272727273,
2.817272727272737,
29.157272727272726,
276.0,
276.0,
345.0,
615.5918181818183,
730.0663636363638,
373.0373243336329,
23.391818181818195,
99.72409090909093,
133.72909090909081,
0.0,
124.41545454545451,
96.08318181818186,
70.41409090909087,
118.37045454545455,
94.68272727272722,
83.01681818181817,
75.86045454545456,
0.0,
66.66681818181814,
69.12409090909085,
109.0704545454546,
300.0,
0.0,
109.96227272727276,
47.952272727272714,
11.233982308648535,
276.0,
161.62968357967037,
957.818181818182,
538.2983999999728,
441.7178455708299,
260.56941082122324,
155.09737297834772,
62.214291413756285,
957.818181818182,
682.1181818181817,
160.0271308670193,
21.962728535423857,
538.2984000000038,
207.0,
255.8276539776955,
171.99990368477063,
1026.818181818182,
35.132727272727266,
77.27590909090907,
134.59227272727276,
100.08954545454549,
80.85954545454547
22.022423461142267,
0.0
],
"akku_soc_pro_stunde": [
79.4714617768595,
80.0,
62.54222623966943,
62.45329717630854,
40.931258608815426,
53.49778173759437,
53.49778173759437,
44.49834131059713,
56.998341310597134,
48.308516930431836,
49.4536123554777,
48.71523425630414,
45.56737785134547,
41.34613129487165,
37.41887578522978,
34.38594706622151,
32.16328005520223,
28.42683893949975,
25.438116487709117,
22.81763611580829,
20.42305106071187,
18.318669173659533,
16.136721859609946,
12.693841349968071,
21.027174683301403,
19.51352971084961,
19.82558477497874,
19.82558477497874,
23.333518659720113,
1.8114800922269987,
16.764213425559575,
29.03415358030485,
35.990800633866854,
40.29906099437652,
40.79452851211402,
19.272489944620908,
16.833225137458374,
12.584731680158098,
9.425339462527244,
6.872954820653964
61.532928719008275,
61.532928719008275,
61.532928719008275,
61.532928719008275,
50.81349001377411,
36.480587121212125,
46.842735019368604,
46.10435692019505,
42.95650051523637,
42.95650051523637,
39.029245005594504,
35.996316286586236,
33.77364927556696,
30.03720815986448,
27.048485708073848,
24.428005336173022,
24.428005336173022,
22.32362344912068,
20.141676135071094,
20.141676135071094,
16.670644798982938,
15.156999826531148,
15.469054890660274,
0.471637535288375,
4.030157048585656,
4.180158754905081,
19.132892088236673,
19.132892088236673,
26.239215809839333,
30.01393669097958,
8.49189812348647,
7.382910520180684,
4.9436457130181495,
0.6951522557178741,
0.0
],
"Electricity_price": [
0.000228,
@@ -715,103 +715,103 @@
"start_soc_prozent": 5
},
"start_solution": [
18.0,
3.0,
2.0,
1.0,
1.0,
8.0,
10.0,
15.0,
14.0,
13.0,
20.0,
12.0,
9.0,
13.0,
18.0,
0.0,
7.0,
20.0,
20.0,
18.0,
7.0,
5.0,
3.0,
9.0,
9.0,
10.0,
12.0,
10.0,
11.0,
13.0,
8.0,
12.0,
12.0,
10.0,
10.0,
7.0,
8.0,
16.0,
12.0,
6.0,
0.0,
12.0,
13.0,
5.0,
14.0,
9.0,
5.0,
13.0,
8.0,
10.0,
10.0,
4.0,
0.0,
14.0,
11.0,
9.0,
16.0,
8.0,
9.0,
5.0,
10.0,
13.0,
13.0,
8.0,
8.0,
9.0,
5.0,
10.0,
7.0,
2.0,
8.0,
12.0,
2.0,
9.0,
11.0,
10.0,
10.0,
6.0,
1.0,
12.0,
9.0,
12.0,
13.0,
10.0,
13.0,
11.0,
2.0,
1.0,
3.0,
4.0,
3.0,
2.0,
2.0,
4.0,
0.0,
2.0,
1.0,
0.0,
0.0,
2.0,
2.0,
3.0,
6.0,
0.0,
1.0,
0.0,
2.0,
4.0,
6.0,
0.0,
1.0,
6.0,
0.0,
4.0,
1.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
2.0,
0.0,
2.0,
0.0,
0.0,
0.0,
0.0,
0.0,
2.0,
0.0,
0.0,
0.0,
0.0,
15.0
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
3.0,
0.0,
0.0,
0.0,
0.0,
0.0,
13.0
],
"washingstart": 15
"washingstart": 13
}