Feat: Return inflexible device schedules from StorageScheduler#1994
Feat: Return inflexible device schedules from StorageScheduler#1994Ahmad-Wahid wants to merge 10 commits into
Conversation
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Documentation build overview
Show files changed (1 files in total): 📝 1 modified | ➕ 0 added | ➖ 0 deleted
|
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
Signed-off-by: Ahmad-Wahid <ahmedwahid16101@gmail.com>
|
@Ahmad-Wahid what about this PR? |
| if not self.config_deserialized: | ||
| self.deserialize_config() | ||
|
|
||
| # todo: look for the reason why flex_model has an object(dict) without a sensor, and fix the root cause if possible, instead of filtering it out here |
There was a problem hiding this comment.
I know why this can happen. It happens when the db flex model of an asset is picked up when its parent asset is being scheduled. That means some devices are included in the optimization with only an asset ID known, and the power sensor ID to save the results is not guaranteed to be known.
Let's discuss what that means for this PR.
There was a problem hiding this comment.
I actually want to keep support for device flex-models that don't have a power sensor defined. Such a device may have a complete flex-model description, but just lacking a place to store its scheduling results. And by now we also have the consumption and production fields that users can use to define where results need to be stored.
| inflexible_device_schedules = [ | ||
| { | ||
| "name": "inflexible_device_schedule", | ||
| "sensor": sensor, | ||
| "data": inflexible_schedules[sensor], | ||
| "unit": sensor.unit, | ||
| } | ||
| for sensor in inflexible_schedules.keys() | ||
| if sensor is not None | ||
| ] |
There was a problem hiding this comment.
This also means data/services/scheduling.py ends up saving the inflexible schedules to the sensors where their forecasts were being read from. Does that have added value?
…duling # Conflicts: # flexmeasures/data/models/planning/storage.py
Description
sensor=None(TODO: fix root cause).inflexible_device_sensorsthrough_prepare()and extract their schedules from the EMS solution.return_multiple=True, includeinflexible_device_scheduleoutputs (with unit conversion + resampling/rounding aligned with storage schedules).How to test
Sign-off