You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@victorgarcia98 I don't think we actually support passing this as a sensor ID. It looks like in `MetaStorageScheduler._prepare` we only support a `Quantity` right now:
The text was updated successfully, but these errors were encountered:
victorgarcia98
changed the title
Passing the power capacity as a sensor ID is not supported
Passing the power capacity with a sensor ID is not supported
Feb 20, 2024
Rather than reverting the schema change for the site-power-capacity back to QuantityField, I believe the implementation is straightforward.
In MetaStorageScheduler._prepare the site power capacity is used as a max_value of get_continuous_series_sensor_or_quantity, which uses it to do a .clip(upper=max_value) under the hood. Here, Pandas already supports passing a pd.Series.
So, it should be a matter of simply adjusting some type annotations and fetching the sensor data using get_continuous_series_sensor_or_quantity instead of raising in case the site power capacity is pointing to a sensor.
flexmeasures/flexmeasures/data/models/planning/storage.py
Lines 114 to 134 in 8b25ae9
Originally posted by @Flix6x in #897 (comment)
The text was updated successfully, but these errors were encountered: