* Correct plan duration and add test for long last slot * Split planning and evaluating plan
666 B
666 B
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
Edge cases
- Target time elapsed: inactive
- No tariff: active if after or equal start time