flexmeasures
flexmeasures copied to clipboard
Make `capacity_in_mw` attribute optional.
The capacity_in_mw
attribute is required in some parts of the code. This ticket will replace any logic using it, such that it becomes a completely optional attribute.
It's at least used to set the scale range on the latest state plot, and by schedulers to set constraints on the power flow. For the former we can use a max on the history, or let it go altogether (let the chart determine the scale range), and for the latter we can let constraints be set through a dedicated UDI event field (an optional field, in case the sensor attribute is set as a fallback).
Originally posted by @Flix6x in https://github.com/FlexMeasures/flexmeasures/pull/334#pullrequestreview-862005566
Note: Later on, we might move to represent the capacity of a sensor by another sensor. But if this attribute approach works well, we might also stick with it for the capacity. In the end, many sensors will never change their capacity.