Skip to content

Make flex-config more explicit about production vs consumption #2041

@nhoening

Description

@nhoening

It should be more clear which sensors in the flex-model are consumption and which production. For some this is done (e.g. soc-usage vs. soc-gain), but we are ambiguous for others.

  • We try to explain our approach here (users should save data in the way they want, but when it comes to schedules, we need one unified way)
  • We worked on a quick fix in Fix/scheduling/sign #1348 but that still works via a marker attribute (consumption_is_positive)
  • That attribute should be retired and replaced with explicit flex-model fields

TODO:

  • Migrate inflexible-devices to inflexible-loads and inflexible-generators on flex-context. Change schema, UI and interpretation in scheduler (positive load data is treated as consumption, negative load data is treated as generation, and vice versa for generators). The data migration would assume that existing inflexible devices are meant to be loads generators, unless they had the consumption_is_positive attribute on the sensor, in which case they were meant to be loads.
  • Migrate sensor field on flex-model to consumption: {"sensor": x} or production: {"sensor": x}. Only one of them is accepted. Change schema, UI and interpretation in scheduler. The data migration would assume that existing sensor entries were meant to be storing consumption production, or consumption in case of the consumption_is_positive attribute.
  • Expand the documentation section linked above with a better example (the one with solar and PV can be clearer)

Q: In the migration, if a sensor has consumption_is_positive, how should we treat it? If it is set to True, would we change the default assumption and store them as generators? We can document that of course, and we can also ask in the next TSC if people use this attribute.
A: We could have the migration deal with relevant flex-model fields stored on the db, but exactly opposite to what you suggest: we would assume generators by default and if the consumption_is_positive attribute is set to True, we would assume a load instead. Furthermore, we should keep the original attribute on the sensor, in case they were used in combination with relevant flex-model fields in the trigger message (which we can not migrate).

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions