evcc-io/core/planner/planner.md
andig 48f22d5ab3
Refactor charge planning (#5569)
* Correct plan duration and add test for long last slot
* Split planning and evaluating plan
2022-12-26 11:41:36 +01:00

14 lines
666 B
Markdown

# Planner
The `planner` is responsible for developing a lowest-cost plan for charging a `required duration` until `target time`. A plan consists of a number of slots in ascending order of cost.
If the `planner` has an associated `tariff`, costs are derived from the tariff's prices. Without `tariff`, the planner will only evaluate time, but not cost.
The developed plan is then evaluated in terms of total cost and being "active". A plan is considered active when the current time is covered by one of the plan's slots.
## Cases
<img src="planner.svg" width="600">
## Edge cases
- Target time elapsed: inactive
- No tariff: active if after or equal start time