mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-10-08 23:46:38 +00:00
The energy still stored when the horizon ends keeps its worth: it replaces grid imports that are paid for afterwards. Crediting that with a single price per kWh cannot describe it, because the value is not linear in the amount stored. The first kWh replaces the most expensive hour that PV cannot cover, the next one the second most expensive, and once every such hour is served, further energy replaces nothing. A scalar has to pick one slope for all of it. High enough for the first kWh means hoarding a full battery; low enough for the last kWh means running it empty by the end of the horizon - which is exactly what the previous default of 0 EUR/kWh did. terminal_value_mode = AUTO (the new default) builds the curve instead. There is no forecast beyond the horizon, so its trailing window stands in for the day that follows: residual load max(load - PV, 0) per slot, priced at its import price, sorted and accumulated. LCOS is subtracted from every marginal value so stored energy is not credited twice, and the tail beyond the residual load is only credited when direct marketing allows an export. The curve is built once per run; the search only interpolates on it. The solution reports what a run used as terminal_value, curve included, so the shape can be inspected instead of guessed. FIXED restores the previous scalar behaviour. In a 48 h scenario with two cheap slots at the end, AUTO keeps the battery at 50 % and credits 3.85 EUR where FIXED with 0 EUR/kWh drains it to empty. The stored optimization results move accordingly - the objective changed.
10 KiB
10 KiB
Full example Config
{
"adapter": {
"provider": [
"HomeAssistant"
],
"homeassistant": {
"config_entity_ids": null,
"load_emr_entity_ids": null,
"grid_export_emr_entity_ids": null,
"grid_import_emr_entity_ids": null,
"pv_production_emr_entity_ids": null,
"device_measurement_entity_ids": null,
"device_instruction_entity_ids": null,
"solution_entity_ids": null
},
"nodered": {
"host": "127.0.0.1",
"port": 1880
}
},
"cache": {
"subpath": "cache",
"cleanup_interval": 300.0
},
"database": {
"provider": "LMDB",
"compression_level": 0,
"initial_load_window_h": 48,
"keep_duration_h": 48,
"autosave_interval_sec": 5,
"compaction_interval_sec": 604800,
"batch_size": 100
},
"devices": {
"batteries": [
{
"device_id": "battery1",
"capacity_wh": 8000,
"charging_efficiency": 0.88,
"discharging_efficiency": 0.88,
"levelized_cost_of_storage_kwh": 0.0,
"max_charge_power_w": 5000,
"min_charge_power_w": 50,
"charge_rates": [
0.0,
0.1,
0.2,
0.3,
0.4,
0.5,
0.6,
0.7,
0.8,
0.9,
1.0
],
"grid_export_rates": [
0.25,
0.5,
0.75,
1.0
],
"min_soc_percentage": 0,
"max_soc_percentage": 100
}
],
"max_batteries": 1,
"electric_vehicles": [
{
"device_id": "battery1",
"capacity_wh": 8000,
"charging_efficiency": 0.88,
"discharging_efficiency": 0.88,
"levelized_cost_of_storage_kwh": 0.0,
"max_charge_power_w": 5000,
"min_charge_power_w": 50,
"charge_rates": [
0.0,
0.1,
0.2,
0.3,
0.4,
0.5,
0.6,
0.7,
0.8,
0.9,
1.0
],
"grid_export_rates": [
0.25,
0.5,
0.75,
1.0
],
"min_soc_percentage": 0,
"max_soc_percentage": 100
}
],
"max_electric_vehicles": 1,
"inverters": [],
"max_inverters": 1,
"home_appliances": [],
"max_home_appliances": 1
},
"elecprice": {
"provider": "ElecPriceAkkudoktor",
"charges_kwh": 0.21,
"vat_rate": 1.19,
"elecpricefixed": {
"time_windows": {
"windows": []
}
},
"elecpriceimport": {
"import_file_path": null,
"import_json": null
},
"energycharts": {
"bidding_zone": "DE-LU"
},
"tibber": {
"access_token": null,
"home_id": null
},
"charge_components_kwh": {
"electricity_tax": 0.0205,
"concession_fee": 0.0132,
"kwkg_levy": 0.00446,
"section_19_levy": 0.01559,
"offshore_grid_levy": 0.00941,
"supplier_markup": 0.0
},
"smard": {
"filter_id": 4169,
"region": "DE"
},
"network_fees_kwh": {
"windows": [
{
"start_time": "00:00:00.000000",
"duration": "7 hours",
"day_of_week": null,
"date": null,
"locale": null,
"value": 0.0095
},
{
"start_time": "07:00:00.000000",
"duration": "8 hours",
"day_of_week": null,
"date": null,
"locale": null,
"value": 0.0953
},
{
"start_time": "15:00:00.000000",
"duration": "5 hours",
"day_of_week": null,
"date": null,
"locale": null,
"value": 0.1565
},
{
"start_time": "20:00:00.000000",
"duration": "4 hours",
"day_of_week": null,
"date": null,
"locale": null,
"value": 0.0953
}
]
}
},
"ems": {
"startup_delay": 5.0,
"interval": 300.0,
"mode": "OPTIMIZATION"
},
"feedintariff": {
"direct_marketing_enabled": false,
"provider": "FeedInTariffAkkudoktor",
"provider_settings": {
"FeedInTariffAkkudoktor": null,
"FeedInTariffFixed": null,
"FeedInTariffEnergyCharts": null,
"FeedInTariffImport": null,
"FeedInTariffTibber": null,
"FeedInTariffSMARD": null
}
},
"general": {
"config_save_mode": "AUTOMATIC",
"config_save_interval_sec": 60,
"version": "0.0.0",
"data_folder_path": "/home/user/.local/share/net.akkudoktoreos.net",
"data_output_subpath": "output",
"latitude": 52.52,
"longitude": 13.405
},
"load": {
"provider": "LoadAkkudoktor",
"loadakkudoktor": {
"loadakkudoktor_year_energy_kwh": null
},
"loadvrm": {
"load_vrm_token": "your-token",
"load_vrm_idsite": 12345
},
"loadimport": {
"import_file_path": null,
"import_json": null
}
},
"logging": {
"console_level": "TRACE",
"file_level": "TRACE"
},
"measurement": {
"historic_hours": 17520,
"load_emr_keys": [
"load0_emr"
],
"grid_export_emr_keys": [
"grid_export_emr"
],
"grid_import_emr_keys": [
"grid_import_emr"
],
"pv_production_emr_keys": [
"pv1_emr"
]
},
"optimization": {
"horizon_hours": 24,
"interval": 3600,
"algorithm": "GENETIC",
"visualize_pdf": true,
"terminal_value_mode": "AUTO",
"terminal_value_euro_per_kwh": 0.0,
"terminal_value_window_hours": 24,
"genetic": {
"individuals": 400,
"generations": 400,
"seed": null,
"penalties": {
"ev_soc_miss": 10
}
}
},
"prediction": {
"hours": 48,
"historic_hours": 48
},
"pvforecast": {
"provider": "PVForecastAkkudoktor",
"provider_settings": {
"PVForecastImport": null,
"PVForecastVrm": null,
"PVForecastPVNode": null,
"PVForecastForecastSolar": null,
"PVForecastSolcast": null
},
"planes": [
{
"surface_tilt": 10.0,
"surface_azimuth": 180.0,
"userhorizon": [
10.0,
20.0,
30.0
],
"peakpower": 5.0,
"pvtechchoice": "crystSi",
"mountingplace": "free",
"loss": 14.0,
"trackingtype": 0,
"optimal_surface_tilt": false,
"optimalangles": false,
"albedo": null,
"module_model": null,
"inverter_model": null,
"inverter_paco": 6000,
"modules_per_string": 20,
"strings_per_inverter": 2
},
{
"surface_tilt": 20.0,
"surface_azimuth": 90.0,
"userhorizon": [
5.0,
15.0,
25.0
],
"peakpower": 3.5,
"pvtechchoice": "crystSi",
"mountingplace": "free",
"loss": 14.0,
"trackingtype": 1,
"optimal_surface_tilt": false,
"optimalangles": false,
"albedo": null,
"module_model": null,
"inverter_model": null,
"inverter_paco": 4000,
"modules_per_string": 20,
"strings_per_inverter": 2
}
],
"max_planes": 1
},
"server": {
"host": "127.0.0.1",
"port": 8503,
"verbose": false,
"startup_eosdash": true,
"eosdash_host": "127.0.0.1",
"eosdash_port": 8504,
"eosdash_supervise_interval_sec": 10,
"run_as_user": null,
"reload": true
},
"utils": {},
"weather": {
"provider": "WeatherImport",
"provider_settings": {
"WeatherImport": null
}
}
}