Adds inverter AC/DC efficiency and break-even penalty (#888)
Some checks failed
Bump Version / Bump Version Workflow (push) Has been cancelled
docker-build / platform-excludes (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled
pre-commit / pre-commit (push) Has been cancelled
Run Pytest on Pull Request / test (push) Has been cancelled

* feat: add inverter AC/DC efficiency and break-even penalty

* test: update tests/test_geneticoptimize.py with new ac_charge_break_even parameter

* docs: update documentation

* chore: update version numbers in configuration files to v0.2.0.dev2602272006923535
This commit is contained in:
Christopher Nadler
2026-02-27 23:12:08 +01:00
committed by GitHub
parent 04420e66ab
commit 3ccc25d731
30 changed files with 3043 additions and 152 deletions

720
tests/testdata/optimize_result_1_be.json vendored Normal file
View File

@@ -0,0 +1,720 @@
{
"ac_charge": [
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,
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,
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": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0
],
"discharge_allowed": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
1,
1,
1,
0,
0,
0,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
1,
1,
1,
0,
0,
1,
0,
1,
1,
1,
1,
1,
0,
1,
1,
1,
0
],
"eautocharge_hours_float": null,
"result": {
"Last_Wh_pro_Stunde": [
1053.07,
1063.91,
1320.56,
1132.03,
1163.67,
1176.82,
1216.22,
1103.78,
1129.12,
1178.71,
1050.98,
988.56,
912.38,
704.61,
516.37,
868.05,
694.34,
608.79,
556.31,
488.89,
506.91,
804.89,
1141.98,
1056.97,
992.46,
1155.99,
827.01,
1257.98,
1232.67,
871.26,
860.88,
1158.03,
1222.72,
1221.04,
949.99,
987.01,
733.99,
592.97
],
"EAuto_SoC_pro_Stunde": [
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0,
54.0
],
"Einnahmen_Euro_pro_Stunde": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.20401973777039792,
0.18681973047764083,
0.12880892587597292,
0.04260510586128589,
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,
0.0,
0.0,
0.07946910594375262,
0.14608958812480227,
0.07926913850394514,
0.010404817872487553,
0.0,
0.0,
0.0,
0.0,
0.0
],
"Gesamt_Verluste": 3181.0071533862283,
"Gesamtbilanz_Euro": 0.5201969277249601,
"Gesamteinnahmen_Euro": 0.8774861504302851,
"Gesamtkosten_Euro": 1.3976830781552452,
"Home_appliance_wh_per_hour": [
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,
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,
0.0,
0.0
],
"Kosten_Euro_pro_Stunde": [
0.027996119999999992,
0.0,
0.0,
0.0018232052307313393,
0.0,
0.0,
0.0,
0.016809914659344942,
0.061530097476751734,
0.05480703000000003,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.22802125600000003,
0.199865757,
0.182970359,
0.162995926,
0.16677339,
0.0,
0.0,
0.0,
0.007989913613567745,
0.028255713342252034,
0.0,
0.010682755832597498,
0.0,
0.0,
0.0,
0.0,
0.0,
0.08231598,
0.0,
0.0,
0.0,
0.16484566
],
"Netzbezug_Wh_pro_Stunde": [
122.78999999999996,
0.0,
0.0,
9.703061366318996,
0.0,
0.0,
0.0,
74.05248748610107,
205.30563055305882,
171.54000000000008,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
694.34,
608.79,
556.31,
488.89,
506.91,
0.0,
0.0,
0.0,
35.04348076126204,
127.73830624887898,
0.0,
56.853410498124,
0.0,
0.0,
0.0,
0.0,
0.0,
257.64,
0.0,
0.0,
0.0,
592.97
],
"Netzeinspeisung_Wh_pro_Stunde": [
0.0,
0.0,
0.0,
0.0,
0.0,
2914.5676824342563,
2668.8532925377262,
1840.127512513899,
608.6443694469413,
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,
0.0,
0.0,
1135.2729420536089,
2086.994116068604,
1132.4162643420734,
148.64025532125078,
0.0,
0.0,
0.0,
0.0,
0.0
],
"Verluste_Pro_Stunde": [
0.0,
2.817272727272737,
29.157272727272726,
2.3948326360417305,
582.6180000000041,
171.3218781078929,
10.782457846871594,
0.0,
0.0,
0.0,
99.72409090909093,
133.72909090909081,
124.41545454545451,
96.08318181818186,
70.41409090909087,
118.37045454545455,
0.0,
0.0,
0.0,
0.0,
0.0,
109.0704545454546,
109.96227272727276,
47.952272727272714,
11.233982308648535,
38.52740325013451,
161.62968357967037,
14.209990740225123,
538.2984000000038,
305.7193589211809,
10.13011689299087,
36.109951963721926,
44.377460775206174,
0.0,
77.27590909090907,
134.59227272727276,
100.08954545454549,
0.0
],
"akku_soc_pro_stunde": [
80.0,
79.91107093663912,
78.99070247933885,
79.05722560811779,
95.24105894144923,
100.0,
100.0,
100.0,
100.0,
100.0,
96.85214359504131,
92.63089703856748,
88.7036415289256,
85.67071280991735,
83.44804579889806,
79.71160468319557,
79.71160468319557,
79.71160468319557,
79.71160468319557,
79.71160468319557,
79.71160468319557,
76.26872417355371,
72.79769283746555,
71.28404786501376,
71.59610292914289,
72.66630857497995,
76.17424245972133,
76.56896442472758,
91.52169775805919,
100.0,
100.0,
100.0,
100.0,
100.0,
97.56073519283747,
93.3122417355372,
90.15284951790635,
90.15284951790635
],
"Electricity_price": [
0.000228,
0.0002212,
0.0002093,
0.0001879,
0.0001838,
0.0002004,
0.0002198,
0.000227,
0.0002997,
0.0003195,
0.0003081,
0.0002969,
0.0002921,
0.000278,
0.0003384,
0.0003318,
0.0003284,
0.0003283,
0.0003289,
0.0003334,
0.000329,
0.0003302,
0.0003042,
0.000243,
0.000228,
0.0002212,
0.0002093,
0.0001879,
0.0001838,
0.0002004,
0.0002198,
0.000227,
0.0002997,
0.0003195,
0.0003081,
0.0002969,
0.0002921,
0.000278
]
},
"eauto_obj": {
"device_id": "ev1",
"hours": 48,
"charge_array": [
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,
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,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"discharge_array": [
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"discharging_efficiency": 1.0,
"capacity_wh": 60000,
"charging_efficiency": 0.95,
"max_charge_power_w": 11040,
"soc_wh": 32400.000000000004,
"initial_soc_percentage": 54
},
"start_solution": [
15.0,
5.0,
12.0,
19.0,
7.0,
17.0,
15.0,
20.0,
3.0,
7.0,
3.0,
9.0,
13.0,
14.0,
10.0,
7.0,
13.0,
3.0,
5.0,
4.0,
9.0,
11.0,
11.0,
12.0,
13.0,
7.0,
14.0,
4.0,
5.0,
5.0,
5.0,
13.0,
10.0,
8.0,
4.0,
6.0,
10.0,
3.0,
10.0,
8.0,
10.0,
13.0,
12.0,
14.0,
11.0,
12.0,
8.0,
1.0
],
"washingstart": null
}

818
tests/testdata/optimize_result_2_be.json vendored Normal file
View File

@@ -0,0 +1,818 @@
{
"ac_charge": [
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.75,
0.0,
0.75,
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,
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
],
"dc_charge": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0
],
"discharge_allowed": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
1,
0,
1,
1,
1,
1,
1,
0,
1,
1,
0,
0,
0,
0,
0,
1,
1,
0,
1,
0,
1,
0,
0,
1,
0,
0,
0,
1,
1,
1,
0
],
"eautocharge_hours_float": [
0.375,
0.5,
0.625,
1.0,
0.0,
0.5,
0.5,
0.75,
0.625,
0.5,
1.0,
0.0,
0.0,
0.5,
1.0,
0.75,
0.625,
0.625,
0.0,
1.0,
0.625,
0.625,
0.625,
0.0,
0.375,
0.375,
0.625,
0.375,
0.875,
0.625,
0.75,
0.0,
0.875,
0.5,
0.0,
0.75,
1.0,
0.5,
0.625,
0.375,
0.625,
1.0,
0.5,
0.0,
1.0,
0.875,
0.625,
0.5
],
"result": {
"Last_Wh_pro_Stunde": [
13416.07,
1063.91,
1320.56,
10126.029999999999,
14151.67,
12042.82,
7771.22,
7658.78,
1129.12,
10617.91,
1050.98,
988.56,
912.38,
704.61,
516.37,
868.05,
694.34,
608.79,
556.31,
488.89,
506.91,
804.89,
1141.98,
1056.97,
992.46,
1155.99,
827.01,
1257.98,
3732.67,
871.26,
860.88,
1158.03,
1222.72,
1221.04,
949.99,
987.01,
733.99,
592.97
],
"EAuto_SoC_pro_Stunde": [
5.0,
22.48,
22.48,
22.48,
31.22,
48.699999999999996,
61.809999999999995,
72.735,
83.66,
83.66,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392,
99.392
],
"Einnahmen_Euro_pro_Stunde": [
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,
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,
0.0,
0.0
],
"Gesamt_Verluste": 8129.042662637932,
"Gesamtbilanz_Euro": 11.91553407959862,
"Gesamteinnahmen_Euro": 0.0,
"Gesamtkosten_Euro": 11.91553407959862,
"Home_appliance_wh_per_hour": [
0.0,
0.0,
0.0,
0.0,
2500.0,
2500.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.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
],
"Kosten_Euro_pro_Stunde": [
2.84676012,
0.0,
0.0,
1.684399486,
1.4948178300000001,
1.3073595,
0.835534532,
0.05466613999999993,
0.061530097476751734,
1.66483143,
0.0,
0.0,
0.0,
0.0,
0.174739608,
0.0,
0.0,
0.199865757,
0.182970359,
0.162995926,
0.16677339,
0.26411047,
0.0,
0.0,
0.007989913613567745,
0.0,
0.025392879919306634,
0.0,
0.4595000000000417,
0.0003442778967139274,
0.0,
0.028137079449292023,
0.04565364324294593,
0.08231598,
0.0,
0.0,
0.0,
0.16484566
],
"Netzbezug_Wh_pro_Stunde": [
12485.789999999999,
0.0,
0.0,
8964.34,
8132.85,
6523.75,
3801.34,
240.8199999999997,
205.30563055305882,
5210.74,
0.0,
0.0,
0.0,
0.0,
516.37,
0.0,
0.0,
608.79,
556.31,
488.89,
506.91,
799.85,
0.0,
0.0,
35.04348076126204,
0.0,
121.32288542430308,
0.0,
2500.000000000227,
1.7179535764168035,
0.0,
123.95189184710142,
152.3311419517715,
257.64,
0.0,
0.0,
0.0,
592.97
],
"Netzeinspeisung_Wh_pro_Stunde": [
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,
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,
0.0,
0.0
],
"Verluste_Pro_Stunde": [
777.0,
2.817272727272737,
29.157272727272726,
726.0,
552.0,
474.0,
345.0,
945.0,
73.03732433363291,
1096.800000000001,
99.72409090909093,
133.72909090909081,
124.41545454545451,
96.08318181818186,
0.0,
118.37045454545455,
94.68272727272722,
0.0,
0.0,
0.0,
0.0,
0.0,
109.96227272727276,
47.952272727272714,
11.233982308648535,
55.946263193163475,
145.08565374908358,
21.962728535423857,
838.2983999999728,
441.7178455708299,
260.56941082122324,
155.09737297834772,
41.441862965787436,
0.0,
77.27590909090907,
134.59227272727276,
100.08954545454549,
0.0
],
"akku_soc_pro_stunde": [
80.0,
86.16107093663912,
85.24070247933885,
85.24070247933885,
97.74070247933885,
97.74070247933885,
99.40736914600552,
80.46797520661157,
82.49678977143472,
63.557395832040775,
60.4095394270821,
56.18829287060828,
52.2610373609664,
49.22810864195814,
49.22810864195814,
45.49166752625566,
42.502945074465025,
42.502945074465025,
42.502945074465025,
42.502945074465025,
42.502945074465025,
42.502945074465025,
39.03191373837687,
37.518268765925086,
37.830323830054205,
38.35069172516435,
42.38084877375001,
42.53085048006944,
57.48358381340202,
78.08685730148063,
85.04350435504266,
89.35176471555232,
90.50292757571307,
90.50292757571307,
88.06366276855056,
83.81516931125029,
80.65577709361943,
80.65577709361943
],
"Electricity_price": [
0.000228,
0.0002212,
0.0002093,
0.0001879,
0.0001838,
0.0002004,
0.0002198,
0.000227,
0.0002997,
0.0003195,
0.0003081,
0.0002969,
0.0002921,
0.000278,
0.0003384,
0.0003318,
0.0003284,
0.0003283,
0.0003289,
0.0003334,
0.000329,
0.0003302,
0.0003042,
0.000243,
0.000228,
0.0002212,
0.0002093,
0.0001879,
0.0001838,
0.0002004,
0.0002198,
0.000227,
0.0002997,
0.0003195,
0.0003081,
0.0002969,
0.0002921,
0.000278
]
},
"eauto_obj": {
"device_id": "ev1",
"hours": 48,
"charge_array": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.5,
1.0,
0.75,
0.625,
0.625,
0.0,
0.9,
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,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"discharge_array": [
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"discharging_efficiency": 1.0,
"capacity_wh": 60000,
"charging_efficiency": 0.95,
"max_charge_power_w": 11040,
"soc_wh": 59635.2,
"initial_soc_percentage": 5
},
"start_solution": [
0.0,
4.0,
13.0,
17.0,
14.0,
12.0,
9.0,
9.0,
17.0,
13.0,
15.0,
12.0,
9.0,
18.0,
14.0,
18.0,
14.0,
9.0,
2.0,
8.0,
10.0,
12.0,
10.0,
10.0,
14.0,
8.0,
7.0,
2.0,
6.0,
4.0,
4.0,
2.0,
8.0,
12.0,
2.0,
9.0,
14.0,
13.0,
16.0,
6.0,
8.0,
5.0,
1.0,
2.0,
13.0,
10.0,
9.0,
5.0,
1.0,
2.0,
3.0,
6.0,
0.0,
2.0,
2.0,
4.0,
3.0,
2.0,
6.0,
0.0,
0.0,
2.0,
6.0,
4.0,
3.0,
3.0,
0.0,
6.0,
3.0,
3.0,
3.0,
0.0,
1.0,
1.0,
3.0,
1.0,
5.0,
3.0,
4.0,
0.0,
5.0,
2.0,
0.0,
4.0,
6.0,
2.0,
3.0,
1.0,
3.0,
6.0,
2.0,
0.0,
6.0,
5.0,
3.0,
2.0,
14.0
],
"washingstart": 14
}