mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-03-09 08:06:17 +00:00
fix: load data for automatic optimization (#731)
Automatic optimization used to take the adjusted load data even if there were no measurements leading to 0 load values. Split LoadAkkudoktor into LoadAkkudoktor and LoadAkkudoktorAdjusted. This allows to select load data either purely from the load data database or load data additionally adjusted by load measurements. Some value names have been adapted to denote also the unit of a value. For better load bug squashing the optimization solution data availability was improved. For better data visbility prediction data can now be distinguished from solution data in the generic optimization solution. Some predictions that may be of interest to understand the solution were added. Documentation was updated to resemble the addition load prediction provider and the value name changes. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
@@ -1243,7 +1243,7 @@ async def fastapi_gesamtlast(request: GesamtlastRequest) -> list[float]:
|
||||
filled with the first available prediction value.
|
||||
|
||||
Note:
|
||||
Use '/v1/prediction/list?key=load_mean_adjusted' instead.
|
||||
Use '/v1/prediction/list?key=loadforecast_power_w' instead.
|
||||
Load energy meter readings to be added to EOS measurement by:
|
||||
'/v1/measurement/value' or
|
||||
'/v1/measurement/series' or
|
||||
@@ -1255,10 +1255,10 @@ async def fastapi_gesamtlast(request: GesamtlastRequest) -> list[float]:
|
||||
"hours": request.hours,
|
||||
},
|
||||
"load": {
|
||||
"provider": "LoadAkkudoktor",
|
||||
"provider": "LoadAkkudoktorAdjusted",
|
||||
"provider_settings": {
|
||||
"LoadAkkudoktor": {
|
||||
"loadakkudoktor_year_energy": request.year_energy,
|
||||
"loadakkudoktor_year_energy_kwh": request.year_energy,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -1317,7 +1317,7 @@ async def fastapi_gesamtlast(request: GesamtlastRequest) -> list[float]:
|
||||
end_datetime = start_datetime.add(days=2)
|
||||
try:
|
||||
prediction_list = prediction_eos.key_to_array(
|
||||
key="load_mean_adjusted",
|
||||
key="loadforecast_power_w",
|
||||
start_datetime=start_datetime,
|
||||
end_datetime=end_datetime,
|
||||
).tolist()
|
||||
@@ -1347,14 +1347,14 @@ async def fastapi_gesamtlast_simple(year_energy: float) -> list[float]:
|
||||
Set LoadAkkudoktor as provider, then update data with
|
||||
'/v1/prediction/update'
|
||||
and then request data with
|
||||
'/v1/prediction/list?key=load_mean' instead.
|
||||
'/v1/prediction/list?key=loadforecast_power_w' instead.
|
||||
"""
|
||||
settings = SettingsEOS(
|
||||
load=LoadCommonSettings(
|
||||
provider="LoadAkkudoktor",
|
||||
provider_settings=LoadCommonProviderSettings(
|
||||
LoadAkkudoktor=LoadAkkudoktorCommonSettings(
|
||||
loadakkudoktor_year_energy=year_energy / 1000, # Convert to kWh
|
||||
loadakkudoktor_year_energy_kwh=year_energy / 1000, # Convert to kWh
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -1378,7 +1378,7 @@ async def fastapi_gesamtlast_simple(year_energy: float) -> list[float]:
|
||||
end_datetime = start_datetime.add(days=2)
|
||||
try:
|
||||
prediction_list = prediction_eos.key_to_array(
|
||||
key="load_mean",
|
||||
key="loadforecast_power_w",
|
||||
start_datetime=start_datetime,
|
||||
end_datetime=end_datetime,
|
||||
).tolist()
|
||||
|
||||
Reference in New Issue
Block a user