Skip to content

Compute first unmet targets in schedule lookup #2030

@Flix6x

Description

@Flix6x

We'd like the API endpoint for fetching a schedule to return extra information, under a separate key in the response JSON, next to the "scheduler_info" key:

  • For the first upcoming "soc-minima" value, return the difference between the scheduled SoC at that time and the "soc-minima" value.
  • Likewise for "soc-maxima".
  • The "soc-targets" can be left out for now, as they are still modelled as hard constraints (so by definition the scheduler won't allow any deviation). This should be documented, though.
  • The scheduling job should do the computation, so we either need to store the computed values in a sensor, or make use of the job results to store the computed values. We prefer using the job results, for which Allow retrieving schedules/forecasts from Redis over Postgres #2028 is a related issue. Do not tackle that issue in the same PR, but use it as context in choosing a design for the job results. Create a new JSON serializable class for the scheduling job results.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions