mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-10-09 07:56:40 +00:00
feat(optimization): concave terminal value for the energy left in the battery
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.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Akkudoktor-EOS
|
||||
|
||||
**Version**: `v0.3.0.dev2609031505836006`
|
||||
**Version**: `v0.3.0.dev2609040861878062`
|
||||
|
||||
<!-- pyml disable line-length -->
|
||||
**Description**: This project provides a comprehensive solution for simulating and optimizing an energy system based on renewable energy sources. With a focus on photovoltaic (PV) systems, battery storage (batteries), load management (consumer requirements), heat pumps, electric vehicles, and consideration of electricity price data, this system enables forecasting and optimization of energy flow and costs over a specified period.
|
||||
|
||||
Reference in New Issue
Block a user