Improve genetic optimizer convergence

This commit is contained in:
Andreas
2026-07-16 14:32:20 +02:00
parent 6465e22f07
commit 4dfd4b275b
9 changed files with 1084 additions and 665 deletions
+1 -1
View File
@@ -430,7 +430,7 @@ def run_optimization(
start_datetime=start_datetime,
mode=EnergyManagementMode.OPTIMIZATION,
genetic_parameters=parameters,
genetic_individuals=ngen,
genetic_generations=ngen,
genetic_seed=seed,
)
)
+140 -5
View File
@@ -1,5 +1,5 @@
from types import SimpleNamespace
from unittest.mock import patch
from unittest.mock import MagicMock, patch
import numpy as np
import pytest
@@ -7,6 +7,7 @@ from deap import creator
from akkudoktoreos.config.config import ConfigEOS
from akkudoktoreos.core.coreabc import get_ems
from akkudoktoreos.core.emsettings import EnergyManagementMode
from akkudoktoreos.optimization.genetic.genetic import GeneticOptimization
from akkudoktoreos.utils.datetimeutil import to_datetime
@@ -21,6 +22,36 @@ def _configure_hourly_grid(config_eos: ConfigEOS, *, start_hour: int = 0) -> Non
get_ems(init=True).set_start_datetime(to_datetime().set(hour=start_hour, minute=0))
def test_energy_management_forwards_individuals_and_generations_separately(
config_eos: ConfigEOS,
):
_configure_hourly_grid(config_eos)
config_eos.optimization.genetic.individuals = 100
config_eos.optimization.genetic.generations = 80
ems = get_ems(init=True)
parameters = MagicMock()
solution = MagicMock()
optimizer = MagicMock()
optimizer.optimierung_ems.return_value = solution
with (
patch("akkudoktoreos.adapter.adapterabc.AdapterContainer.update_data"),
patch("akkudoktoreos.core.ems.GeneticOptimization", return_value=optimizer),
):
ems._run(
start_datetime=to_datetime().set(hour=0, minute=0),
mode=EnergyManagementMode.OPTIMIZATION,
genetic_parameters=parameters,
)
optimizer.optimierung_ems.assert_called_once_with(
start_hour=0,
parameters=parameters,
ngen=80,
individuals=100,
)
def test_ev_repair_is_resimulated_before_fitness_assignment(config_eos: ConfigEOS):
_configure_hourly_grid(config_eos)
opt = GeneticOptimization(fixed_seed=42)
@@ -44,7 +75,9 @@ def test_ev_repair_is_resimulated_before_fitness_assignment(config_eos: ConfigEO
eauto=None,
)
with patch.object(opt, "evaluate_inner", side_effect=[first_result, repaired_result]) as evaluate:
with patch.object(
opt, "evaluate_inner", side_effect=[first_result, repaired_result]
) as evaluate:
fitness = opt.evaluate(individual, parameters, start_hour=0, worst_case=False) # type: ignore[arg-type]
assert evaluate.call_count == 2
@@ -124,7 +157,9 @@ def test_mutated_warm_start_neighbors_keep_elapsed_slots(config_eos: ConfigEOS):
assert all(neighbor != start_solution for neighbor in neighbors)
def test_initial_population_uses_fixed_seed_budget_and_150_survivors(config_eos: ConfigEOS):
def test_initial_population_uses_fixed_seed_budget_and_configured_population(
config_eos: ConfigEOS,
):
_configure_hourly_grid(config_eos)
config_eos.optimization.genetic.individuals = 300
opt = GeneticOptimization(fixed_seed=42)
@@ -164,8 +199,108 @@ def test_initial_population_uses_fixed_seed_budget_and_150_survivors(config_eos:
assert first_genes.count(6) == 50
assert first_genes.count(7) == 100
assert first_genes.count(9) == 140
assert captured["mu"] == 150
assert captured["lambda"] == 150
assert captured["mu"] == 300
assert captured["lambda"] == 300
def test_small_population_scales_warm_and_educated_seed_families(config_eos: ConfigEOS):
_configure_hourly_grid(config_eos)
config_eos.optimization.genetic.individuals = 100
opt = GeneticOptimization(fixed_seed=42)
opt.optimize_ev = False
opt.setup_deap_environment({"home_appliance": 0}, start_hour=0)
start_solution = [5] * opt.total_slots
captured: dict[str, object] = {}
def warm_neighbors(_solution, count):
captured["warm_count"] = count
return [[6] * opt.total_slots for _ in range(count)]
def educated(count):
captured["educated_count"] = count
return [[7] * opt.total_slots for _ in range(count)]
def fake_ea(population, toolbox, **kwargs):
captured["population"] = list(population)
captured["mu"] = kwargs["mu"]
captured["lambda"] = kwargs["lambda_"]
for individual in population:
individual.fitness.values = (float(sum(individual)),)
individual.extra_data = (0.0, 0.0, 0.0)
kwargs["halloffame"].update(population)
return population, SimpleNamespace(select=lambda _name: [])
with (
patch.object(opt, "_mutated_warm_start_neighbors", side_effect=warm_neighbors),
patch.object(opt, "_educated_guess_individuals", side_effect=educated),
patch.object(
opt.toolbox,
"population",
side_effect=lambda n: [creator.Individual([9] * opt.total_slots) for _ in range(n)],
),
patch("akkudoktoreos.optimization.genetic.genetic.algorithms.eaMuPlusLambda", fake_ea),
):
opt.optimize(start_solution=start_solution, ngen=1)
population = captured["population"]
first_genes = [individual[0] for individual in population] # type: ignore[union-attr]
assert len(population) == 100 # type: ignore[arg-type]
assert first_genes.count(5) == 10
assert first_genes.count(6) == 20
assert first_genes.count(7) == 40
assert first_genes.count(9) == 30
assert captured["warm_count"] == 20
assert captured["educated_count"] == 40
assert captured["mu"] == 100
assert captured["lambda"] == 100
def test_local_search_moves_weak_export_to_later_expensive_import(config_eos: ConfigEOS):
_configure_hourly_grid(config_eos)
opt = GeneticOptimization(fixed_seed=42)
opt.optimize_ev = False
opt.optimize_dc_charge = True
opt.optimize_battery_grid_export = True
opt.bat_possible_charge_values = [1.0]
opt.setup_deap_environment({"home_appliance": 0}, start_hour=0)
slots = opt.total_slots
export_state = 5
self_consumption_state = 6
discharge_state = 1
source = 10
targets = list(range(20, 32))
base = [self_consumption_state] * slots
base[source] = export_state
for slot in targets:
base[slot] = 0
opt.simulation.elect_price_hourly = np.full(slots, 0.10)
opt.simulation.elect_price_hourly[targets] = 0.30
opt.simulation.elect_revenue_per_hour_arr = np.full(slots, 0.05)
opt.simulation.elect_revenue_per_hour_arr[source] = 0.20
opt.simulation.pv_prediction_wh = np.zeros(slots)
opt.simulation.load_energy_array = np.full(slots, 100.0)
def evaluate(individual):
export_value = -0.20 if individual[source] == export_state else 0.0
avoided_import = -0.05 * sum(individual[slot] == discharge_state for slot in targets)
return (export_value + avoided_import,)
opt.toolbox.register("evaluate", evaluate)
incumbent = creator.Individual(base)
incumbent.fitness.values = evaluate(incumbent)
best, evaluations, improvements, initial, final = opt._locally_improve_grid_export(
incumbent,
max_evaluations=96,
)
assert evaluations > 0
assert improvements == 1
assert final < initial
assert best[source] == self_consumption_state
assert sum(best[slot] == discharge_state for slot in targets) >= 6
def test_educated_guesses_encode_high_price_direct_marketing(config_eos: ConfigEOS):
+68 -68
View File
@@ -110,16 +110,16 @@
0,
0,
0,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
1,
0,
@@ -237,12 +237,11 @@
0.0,
0.0,
0.0,
0.0,
0.21367321450420126,
0.022582049506752234,
0.3039575,
0.19320652266312205,
0.1358062627100041,
0.0692592282596561,
0.023370695807696434,
0.0,
0.0,
0.0,
@@ -262,7 +261,8 @@
0.0,
0.0,
0.0,
0.11745809857246167,
0.0,
0.09514375330616998,
0.15236390731688437,
0.10316291465819699,
0.05435777788576338,
@@ -272,10 +272,10 @@
0.0,
0.0
],
"Gesamt_Verluste": 3638.132237848992,
"Gesamtbilanz_Euro": 0.5580695656866563,
"Gesamteinnahmen_Euro": 1.0626586223779864,
"Gesamtkosten_Euro": 1.6207281880646427,
"Gesamt_Verluste": 3421.6165248449383,
"Gesamtbilanz_Euro": 0.5951993628823129,
"Gesamteinnahmen_Euro": 1.1298399163065491,
"Gesamtkosten_Euro": 1.725039279188862,
"Home_appliance_wh_per_hour": [
0.0,
0.0,
@@ -318,16 +318,16 @@
],
"home_appliance_energy_wh": {},
"Kosten_Euro_pro_Stunde": [
0.0,
0.0,
0.10013413727316416,
0.09007999454232955,
0.11436917344552285,
0.0,
0.07557452231671152,
0.0,
4.55656845588237e-17,
0.001414013162203277,
0.005881449073870462,
0.05258762370598476,
0.1614775630079859,
0.0,
0.0,
0.0,
0.26650619799999997,
@@ -358,16 +358,16 @@
0.16484566
],
"Netzbezug_Wh_pro_Stunde": [
0.0,
0.0,
439.1848126015972,
407.23324838304495,
546.436566868241,
0.0,
402.20607938643707,
0.0,
2.2737367544323206e-13,
6.433180901743754,
25.909467285772962,
175.4675465665157,
505.40708296709204,
0.0,
0.0,
0.0,
912.38,
@@ -402,12 +402,11 @@
0.0,
0.0,
0.0,
0.0,
3052.474492917161,
322.60070723931767,
4342.25,
2760.093180901744,
1940.089467285773,
989.4175465665157,
333.86708296709196,
0.0,
0.0,
0.0,
@@ -427,7 +426,8 @@
0.0,
0.0,
0.0,
1677.9728367494527,
0.0,
1359.1964758024283,
2176.6272473840627,
1473.7559236885286,
776.5396840823341,
@@ -438,16 +438,16 @@
0.0
],
"Verluste_Pro_Stunde": [
97.85621559422765,
101.92059640365329,
37.96737751219166,
46.38878980596536,
39.91398802418894,
106.67021307906845,
582.6179999999995,
154.77306084994075,
51.82392952637247,
543.9059151312817,
0.0,
0.0,
0.0,
0.0,
108.98319763338179,
106.80230977350088,
133.7321802766326,
0.0,
@@ -467,7 +467,7 @@
165.15986945297027,
65.92300791736113,
538.2984000000001,
240.58122702042965,
278.8343903340726,
0.0,
0.0,
0.0,
@@ -479,35 +479,35 @@
],
"akku_soc_pro_stunde": [
80.0,
79.16421888032488,
78.69989843940196,
79.80862032896276,
79.51691497639054,
95.70074830972388,
81.05464937533866,
82.3432268699488,
83.45194875950959,
84.8915023574644,
100.0,
100.0,
100.0,
100.0,
100.0,
96.82533215994886,
92.60407390132525,
92.60407390132525,
92.60407390132525,
90.38140689030597,
86.64496577460349,
83.65624332281286,
81.03576295091202,
78.64117789581559,
76.53679600876325,
74.35484869471367,
70.91195845376538,
67.41428833522274,
68.03406859993031,
69.53927969874645,
71.94548598914552,
76.53326014061692,
78.36445480498806,
93.3171881383214,
98.93741213017658,
95.76274429012544,
91.54148603150185,
91.54148603150185,
91.54148603150185,
89.31881902048255,
85.58237790478007,
82.59365545298944,
79.97317508108861,
77.57859002599218,
75.47420813893983,
73.29226082489025,
69.84937058394196,
66.35170046539932,
66.97148073010689,
68.47669182892304,
70.8828981193221,
75.4706722707935,
77.30186693516465,
92.254600268498,
100.0,
100.0,
100.0,
@@ -717,18 +717,18 @@
0.0,
0.0,
0.0,
2.0,
2.0,
1.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,
1.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
1.0,
1.0,
0.0,
+284 -284
View File
@@ -15,7 +15,7 @@
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
@@ -110,23 +110,23 @@
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
1,
1,
1,
0,
0,
1,
1,
1,
0,
1,
1,
1,
@@ -145,7 +145,7 @@
0,
1,
1,
1,
0,
0,
0
],
@@ -161,16 +161,16 @@
0.0,
0.0,
0.0,
0.875,
0.625,
0.625,
0.375,
0.875,
0.75,
0.75,
0.375,
0.1,
1.0,
0.0,
0.375,
0.625,
1.0,
0.625,
0.875,
0.0,
0.3,
0.0,
0.0,
0.0,
@@ -202,16 +202,16 @@
],
"result": {
"Last_Wh_pro_Stunde": [
10713.07,
7963.91,
8220.56,
7772.03,
13323.67,
9456.82,
9496.22,
5243.78,
2233.12,
1178.71,
7953.07,
12103.91,
1320.56,
5272.03,
8063.67,
17059.173961709643,
8116.22,
10763.78,
1129.12,
4490.71,
1050.98,
988.56,
912.38,
@@ -231,8 +231,8 @@
827.01,
1257.98,
1232.67,
871.26,
860.88,
3371.26,
3360.88,
1158.03,
1222.72,
1221.04,
@@ -243,43 +243,43 @@
],
"EAuto_SoC_pro_Stunde": [
5.0,
20.294999999999998,
31.22,
42.144999999999996,
48.699999999999996,
63.995000000000005,
77.105,
90.215,
96.77,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518,
98.518
15.925,
33.405,
33.405,
39.96,
50.885000000000005,
68.365,
79.29,
94.585,
94.585,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001
],
"Einnahmen_Euro_pro_Stunde": [
0.0,
@@ -313,19 +313,45 @@
0.0,
0.0,
0.0,
0.053661230306193436,
0.05435777788576338,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"Gesamt_Verluste": 6227.580163897914,
"Gesamtbilanz_Euro": 12.033027623527284,
"Gesamteinnahmen_Euro": 0.10801900819195681,
"Gesamtkosten_Euro": 12.14104663171924,
"Gesamt_Verluste": 8756.080717524794,
"Gesamtbilanz_Euro": 9.985237573040141,
"Gesamteinnahmen_Euro": 0.0,
"Gesamtkosten_Euro": 9.985237573040141,
"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,
@@ -337,36 +363,36 @@
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"home_appliance_energy_wh": {
"dishwasher1": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
@@ -378,112 +404,86 @@
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
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.23047612,
1.5308798733801507,
1.4889564723943407,
1.242149738556099,
1.3742255912165289,
0.8479283355019763,
1.2336553365360492,
0.5407163922683618,
0.20558284318867343,
0.1614775630079859,
0.5980075076051746,
1.473337992,
0.0,
0.0,
0.0,
2.3442290999999997,
0.9428514400845971,
1.762926136273946,
0.05258762370598476,
0.0,
0.0,
0.0,
0.26650619799999997,
0.19588158,
0.0,
0.0,
0.22802125600000003,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.08281196422730584,
0.16677339,
0.264113778992023,
0.2536463762855701,
0.1306329312971816,
0.07362195915902499,
0.060401289430882174,
0.009619897970888898,
0.07029121023060134,
4.179128154646605e-17,
2.3325608707865465e-05,
0.0021886029750169123,
0.04064749825228731,
0.1994538035279033,
0.013012984677295973,
0.08357424731947552,
0.0,
0.0,
0.0,
0.293043269,
0.214398479,
0.16484566
],
"Netzbezug_Wh_pro_Stunde": [
9782.789999999999,
6920.795087613701,
7113.9821901306295,
6610.695787951565,
7476.74423948057,
4231.179318872138,
5612.626644840988,
2382.0105386271443,
685.962106068313,
505.40708296709204,
2622.8399456367306,
6660.66,
0.0,
0.0,
0.0,
11697.75,
4289.587989465865,
7766.194432924872,
175.4675465665157,
0.0,
0.0,
0.0,
912.38,
704.61,
0.0,
0.0,
694.34,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
248.38621543882974,
506.91,
799.8600211751151,
833.8145177040436,
537.58407941227,
322.9033296448464,
273.0618871197205,
45.96224544141853,
374.088399311343,
2.2737367544323206e-13,
0.11639525303326081,
9.957247384062384,
202.83182760622412,
907.4331370696236,
57.32592368852852,
278.85968408233407,
0.0,
0.0,
0.0,
987.01,
733.99,
592.97
],
@@ -519,8 +519,8 @@
0.0,
0.0,
0.0,
766.589004374192,
776.5396840823341,
0.0,
0.0,
0.0,
0.0,
0.0,
@@ -528,84 +528,84 @@
0.0
],
"Verluste_Pro_Stunde": [
483.0,
345.0162105136441,
345.0194628156755,
207.04269455418785,
503.6273087376684,
449.2115182646565,
424.3543973809186,
225.74286463525735,
102.70945272819762,
40.06404995605101,
945.0059934764078,
1152.0,
114.42806532440363,
768.1700560862765,
752.877211603942,
1152.0,
362.1897587359037,
485.44493195098454,
118.73010558798194,
641.287728412984,
106.80230977350088,
133.7321802766326,
0.0,
0.0,
70.41409090909087,
118.37045454545455,
94.68272727272722,
0.0,
83.01681818181817,
75.86045454545456,
66.66681818181814,
69.12409090909085,
109.07302361034766,
116.99491129525349,
32.79597062197777,
0.0,
0.0012025410138062752,
3.292931608338464,
22.312089529472388,
54.18759955738153,
86.6234264543665,
165.15986945297027,
65.92300791736113,
538.2984000000001,
441.9379674303641,
261.1952696860876,
84.86003031772043,
0.0,
166.26381931274682,
68.89237644835487,
176.85071084262336,
93.18476208988011,
111.78035844493081,
90.18403329253945,
134.59227272727276,
0.0,
0.0,
0.0
],
"akku_soc_pro_stunde": [
80.0,
80.0,
80.00045029204567,
80.00099092581443,
80.00217688565297,
80.57515768392155,
81.55325541349534,
81.8408775629653,
82.36151269172245,
83.68121971195016,
84.79410998850713,
81.619442148456,
77.39818388983241,
77.39818388983241,
77.39818388983241,
75.17551687881311,
71.43907576311062,
68.45035331131999,
65.82987293941916,
63.43528788432273,
61.33090599727039,
59.14895868322081,
55.706068442272525,
52.208398323729895,
52.82817858843747,
54.33338968725362,
56.73959597765268,
61.327370129124084,
63.158564793495216,
78.11129812682856,
90.387352777672,
97.64277693561888,
100.0,
100.0,
98.60068046043587,
96.11252124341868,
91.86402778611841,
91.86402778611841
61.060772546061834,
42.12137860666789,
40.878014722863334,
23.18290087405168,
13.89226749676402,
30.55893416343069,
31.036427461650234,
31.104342238066472,
34.40240072662152,
19.405325997784466,
16.23065815773333,
12.00939989910972,
12.00939989910972,
12.00939989910972,
9.786732888090437,
6.050291772387957,
6.050291772387957,
3.429811400487131,
1.0352263453907122,
0.0,
0.0,
3.3403917050174315e-05,
0.09144092700684212,
0.7112211917144087,
2.216432290530563,
4.622638580929631,
9.210412732401027,
11.04160739677217,
25.994340730105503,
30.612780155459586,
32.526457279024996,
37.438977024653425,
40.027442638261206,
38.62812309869707,
36.139963881679876,
36.139963881679876,
36.139963881679876
],
"Electricity_price": [
0.000228,
@@ -702,16 +702,16 @@
0.0,
0.0,
0.0,
0.875,
0.625,
0.625,
0.375,
0.875,
0.75,
0.75,
0.375,
0.1,
1.0,
0.0,
0.375,
0.625,
1.0,
0.625,
0.875,
0.0,
0.3,
0.0,
0.0,
0.0,
@@ -795,37 +795,37 @@
"capacity_wh": 60000,
"charging_efficiency": 0.95,
"max_charge_power_w": 11040,
"soc_wh": 59110.8,
"soc_wh": 59897.4,
"initial_soc_percentage": 5
},
"start_solution": [
0.0,
0.0,
1.0,
2.0,
1.0,
1.0,
0.0,
0.0,
0.0,
2.0,
1.0,
1.0,
1.0,
1.0,
1.0,
2.0,
0.0,
0.0,
0.0,
0.0,
0.0,
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,
0.0,
0.0,
1.0,
1.0,
1.0,
0.0,
1.0,
1.0,
1.0,
@@ -844,63 +844,63 @@
0.0,
1.0,
1.0,
1.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
2.0,
3.0,
1.0,
4.0,
3.0,
6.0,
0.0,
1.0,
3.0,
6.0,
3.0,
5.0,
0.0,
2.0,
3.0,
3.0,
5.0,
4.0,
6.0,
3.0,
0.0,
0.0,
1.0,
5.0,
0.0,
3.0,
6.0,
3.0,
1.0,
3.0,
2.0,
0.0,
2.0,
2.0,
4.0,
5.0,
6.0,
0.0,
1.0,
2.0,
0.0,
5.0,
3.0,
3.0,
1.0,
5.0,
4.0,
4.0,
1.0,
1.0,
2.0,
2.0,
1.0,
4.0,
6.0,
4.0,
5.0,
6.0,
3.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
3.0
2.0,
29.0
],
"washingstart": 13,
"washingstart": 39,
"appliance_starts": {
"dishwasher1": [
"2025-01-15 13:00:00+01:00"
"2025-01-16 15:00:00+01:00"
]
}
}
+236 -236
View File
@@ -15,7 +15,7 @@
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
@@ -112,6 +112,29 @@
0,
1,
1,
1,
1,
1,
0,
0,
0,
0,
1,
1,
1,
0,
0,
1,
1,
0,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
@@ -124,29 +147,6 @@
1,
0,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
1,
0,
0
],
"battery_grid_export_allowed": [],
@@ -161,16 +161,16 @@
0.0,
0.0,
0.0,
0.625,
1.0,
0.5,
0.75,
0.0,
0.375,
0.625,
1.0,
0.625,
0.875,
0.5,
0.375,
1.0,
0.375,
0.0,
0.0,
0.3,
0.0,
0.0,
0.0,
@@ -202,16 +202,16 @@
],
"result": {
"Last_Wh_pro_Stunde": [
12093.07,
6583.91,
9600.56,
10792.03,
6683.67,
5316.82,
12256.22,
5243.78,
7953.07,
12103.91,
1320.56,
5272.03,
8063.67,
17059.173961709643,
8116.22,
10763.78,
1129.12,
1178.71,
4490.71,
1050.98,
988.56,
912.38,
@@ -229,10 +229,10 @@
992.46,
1155.99,
827.01,
3757.98,
3732.67,
871.26,
860.88,
1257.98,
1232.67,
3371.26,
3360.88,
1158.03,
1222.72,
1221.04,
@@ -243,43 +243,43 @@
],
"EAuto_SoC_pro_Stunde": [
5.0,
22.48,
31.22,
44.330000000000005,
59.62499999999999,
15.925,
33.405,
33.405,
39.96,
50.885000000000005,
68.365,
74.92,
92.4,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955,
98.955
79.29,
94.585,
94.585,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001,
99.82900000000001
],
"Einnahmen_Euro_pro_Stunde": [
0.0,
@@ -321,10 +321,10 @@
0.0,
0.0
],
"Gesamt_Verluste": 7415.050669156861,
"Gesamtbilanz_Euro": 10.086958235191952,
"Gesamt_Verluste": 8756.080717524794,
"Gesamtbilanz_Euro": 9.985237573040141,
"Gesamteinnahmen_Euro": 0.0,
"Gesamtkosten_Euro": 10.086958235191952,
"Gesamtkosten_Euro": 9.985237573040141,
"Home_appliance_wh_per_hour": [
0.0,
0.0,
@@ -353,10 +353,10 @@
0.0,
0.0,
0.0,
2500.0,
2500.0,
0.0,
0.0,
2500.0,
2500.0,
0.0,
0.0,
0.0,
@@ -394,10 +394,10 @@
0.0,
0.0,
0.0,
2500.0,
2500.0,
0.0,
0.0,
2500.0,
2500.0,
0.0,
0.0,
0.0,
@@ -408,82 +408,82 @@
]
},
"Kosten_Euro_pro_Stunde": [
1.5419161199999998,
0.2524105556335792,
1.7777665549410084,
1.809540886,
0.24971825220475874,
0.12061259291950001,
1.83015129135275,
0.5407163922683618,
0.5980075076051746,
1.473337992,
0.0,
0.0,
0.0,
2.3442290999999997,
0.9428514400845971,
1.762926136273946,
0.05258762370598476,
0.1614775630079859,
0.0,
0.0,
0.0,
0.26650619799999997,
0.19588158,
0.0,
0.0,
0.22802125600000003,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.08281196422730584,
0.16677339,
0.264113778992023,
0.2536463762855701,
0.1306329312971816,
0.07362195915902499,
0.060401289430882174,
0.009619897970888898,
0.4410873661898387,
0.0,
2.3325608707865465e-05,
0.0021886029750169123,
0.07029121023060134,
4.179128154646605e-17,
0.04064749825228731,
0.1994538035279033,
0.013012984677295973,
0.0,
0.17784012884918773,
0.08357424731947552,
0.0,
0.0,
0.293043269,
0.214398479,
0.16484566
],
"Netzbezug_Wh_pro_Stunde": [
6762.789999999999,
1141.0965444556023,
8493.867916583891,
9630.34,
1358.64119806724,
601.8592461052895,
8326.43899614536,
2382.0105386271443,
2622.8399456367306,
6660.66,
0.0,
0.0,
0.0,
11697.75,
4289.587989465865,
7766.194432924872,
175.4675465665157,
505.40708296709204,
0.0,
0.0,
0.0,
912.38,
704.61,
0.0,
0.0,
694.34,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
248.38621543882974,
506.91,
799.8600211751151,
833.8145177040436,
537.58407941227,
322.9033296448464,
273.0618871197205,
45.96224544141853,
2347.45804252176,
0.0,
0.11639525303326081,
9.957247384062384,
374.088399311343,
2.2737367544323206e-13,
202.83182760622412,
907.4331370696236,
57.32592368852852,
0.0,
556.6201215937018,
278.85968408233407,
0.0,
0.0,
987.01,
733.99,
592.97
],
@@ -528,84 +528,84 @@
0.0
],
"Verluste_Pro_Stunde": [
945.0059934764078,
1152.0,
876.0523853346722,
414.00574999006693,
483.0,
359.25494376806876,
303.4931095326348,
556.8118795374434,
225.74286463525735,
114.42806532440363,
768.1700560862765,
752.877211603942,
1152.0,
362.1897587359037,
485.44493195098454,
118.73010558798194,
40.06404995605101,
641.287728412984,
106.80230977350088,
133.7321802766326,
0.0,
0.0,
70.41409090909087,
118.37045454545455,
94.68272727272722,
0.0,
83.01681818181817,
75.86045454545456,
66.66681818181814,
69.12409090909085,
109.07302361034766,
116.99491129525349,
32.79597062197777,
0.0,
0.0012025410138062752,
3.292931608338464,
22.312089529472388,
54.18759955738153,
86.6234264543665,
165.15986945297027,
2.727365102611202,
238.2983999999999,
441.9379674303641,
261.1952696860876,
65.92300791736113,
538.2984000000001,
166.26381931274682,
68.89237644835487,
176.85071084262336,
131.21108264656203,
35.877614591244196,
93.18476208988011,
111.78035844493081,
90.18403329253945,
134.59227272727276,
0.0,
0.0,
0.0
],
"akku_soc_pro_stunde": [
80.0,
61.06060606060606,
42.12266726939745,
42.122826991343764,
42.122826991343764,
44.435464318234565,
47.11582847191886,
47.249491792403404,
47.770126921160546,
51.0681854097156,
52.181075686272585,
49.006407846221435,
44.78514958759783,
44.78514958759783,
44.78514958759783,
42.562482576578546,
38.82604146087607,
35.837319009085434,
33.2168386371846,
30.822253582088187,
28.717871695035846,
26.53592438098626,
23.09303414003797,
19.595364021495346,
20.215144286202914,
21.72035538501907,
24.126561675418138,
28.71433582688953,
28.79009596862873,
35.40949596862873,
47.68555061947217,
54.94097477741905,
59.85349452304748,
61.241634361507465,
62.2382347668198,
59.7500755498026,
55.50158209250233,
55.50158209250233
61.060772546061834,
42.12137860666789,
40.878014722863334,
23.18290087405168,
13.89226749676402,
30.55893416343069,
31.036427461650234,
31.104342238066472,
34.40240072662152,
19.405325997784466,
16.23065815773333,
12.00939989910972,
12.00939989910972,
12.00939989910972,
9.786732888090437,
6.050291772387957,
6.050291772387957,
3.429811400487131,
1.0352263453907122,
0.0,
0.0,
3.3403917050174315e-05,
0.09144092700684212,
0.7112211917144087,
2.216432290530563,
4.622638580929631,
9.210412732401027,
11.04160739677217,
25.994340730105503,
30.612780155459586,
32.526457279024996,
37.438977024653425,
40.027442638261206,
38.62812309869707,
36.139963881679876,
36.139963881679876,
36.139963881679876
],
"Electricity_price": [
0.000228,
@@ -702,16 +702,16 @@
0.0,
0.0,
0.0,
0.625,
1.0,
0.5,
0.75,
0.0,
0.375,
0.625,
1.0,
0.625,
0.875,
0.5,
0.375,
1.0,
0.375,
0.0,
0.0,
0.3,
0.0,
0.0,
0.0,
@@ -795,43 +795,44 @@
"capacity_wh": 60000,
"charging_efficiency": 0.95,
"max_charge_power_w": 11040,
"soc_wh": 59373.0,
"soc_wh": 59897.4,
"initial_soc_percentage": 5
},
"start_solution": [
1.0,
0.0,
2.0,
2.0,
0.0,
1.0,
2.0,
2.0,
1.0,
2.0,
1.0,
1.0,
0.0,
0.0,
0.0,
0.0,
0.0,
2.0,
1.0,
1.0,
1.0,
1.0,
1.0,
2.0,
0.0,
0.0,
0.0,
1.0,
1.0,
1.0,
0.0,
0.0,
1.0,
1.0,
0.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
0.0,
0.0,
0.0,
0.0,
@@ -842,65 +843,64 @@
0.0,
0.0,
1.0,
1.0,
0.0,
0.0,
0.0,
0.0,
0.0,
1.0,
1.0,
0.0,
0.0,
0.0,
0.0,
2.0,
3.0,
6.0,
1.0,
4.0,
3.0,
1.0,
6.0,
0.0,
1.0,
3.0,
6.0,
2.0,
4.0,
3.0,
5.0,
2.0,
1.0,
6.0,
1.0,
3.0,
4.0,
3.0,
3.0,
0.0,
2.0,
3.0,
0.0,
0.0,
6.0,
4.0,
5.0,
6.0,
1.0,
2.0,
4.0,
3.0,
3.0,
0.0,
6.0,
5.0,
4.0,
1.0,
6.0,
3.0,
0.0,
0.0,
1.0,
5.0,
0.0,
3.0,
6.0,
3.0,
1.0,
3.0,
2.0,
0.0,
2.0,
2.0,
4.0,
3.0,
1.0,
6.0,
1.0,
4.0,
27.0
5.0,
5.0,
3.0,
0.0,
2.0,
29.0
],
"washingstart": 37,
"washingstart": 39,
"appliance_starts": {
"dishwasher1": [
"2025-01-16 13:00:00+01:00"
"2025-01-16 15:00:00+01:00"
]
}
}