-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vlad Iftime Kiflin PPBC #95
base: main
Are you sure you want to change the base?
Conversation
…C control type to work only with TUNES RM (for now). Signed-off-by: Victor Garcia Reolid <[email protected]>
Signed-off-by: Victor Garcia Reolid <[email protected]>
…TUNES/send-system-description-to-fm # Conflicts: # README.rst # src/flexmeasures_client/client.py
…TUNES/send-system-description-to-fm # Conflicts: # setup.cfg
…ption-to-fm' into feature/TUNES/send-system-description-to-fm
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
d607033
to
2c373bd
Compare
86cb3d4
to
b7694ff
Compare
…ftime-Kiflin-PPBC Signed-off-by: VladIftime <[email protected]>
Signed-off-by: Vlad Iftime <[email protected]>
0e39df6
to
c8d7e26
Compare
…TUNES/send-system-description-to-fm # Conflicts: # README.rst
…system-description-to-fm' into VladIftime-Kiflin-PPBC # Conflicts: # README.rst # src/flexmeasures_client/client.py # tests/test_client.py
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
…ation mode is set to that of the Tarnoc Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
async def send_schedule_instruction(self, instruction: PPBCScheduleInstruction): | ||
await self._fm_client.post_schedule( | ||
self._power_sensor_id, | ||
start=self.now(), | ||
values=instruction.power_values, | ||
unit="MW", | ||
duration=self._schedule_duration, | ||
price_sensor_id=self._price_sensor_id, | ||
price_values=instruction.price_values, | ||
price_unit="EUR/MWh", | ||
valid_from=self.now() + self._valid_from_shift, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function isn't called anywhere yet. It looks like a placeholder for future work. There's also no client.post_schedule
. I'm adding a todo to that extent.
Content-wise, I think it confuses sending a PPBCScheduleInstruction
to the RM with asking the FlexMeasures server for a schedule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw the TODO's comments and I agree. I do think that before I can do a proper implementation for trigger_schedule I would need the new scheduler to be implemented so that I can figure out what kind of flex_model I need to pass. Is that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing PPBC should map to the flex-model for our ProcessScheduler
. This function should then just call the same trigger_and_get_schedule
method.
FlexMeasures currently does not support choosing which scheduler to use at the same time as triggering a schedule (not explicitly in the trigger message nor implicitly by checking what type of flex-model is given). Instead, I believe the scheduler is picked based on a sensor attribute (custom-scheduler
) or possibly based on the asset type of the asset that the sensor belongs to. That means we should either make it possible to select a specific scheduler in the API call that triggers a schedule, or we have the flexmeasures-client set the dedicated sensor attribute when the PPBC control type is selected, and set it back to the StorageScheduler
when the FRBC control type is selected. I prefer the latter as a short-term solution.
Can you create an issue where we can discuss the mapping PPBC <-> ProcessScheduler
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why get rid of the S2Message
wrapper that adds the dt
attribute (for doing simulations)?
tests/test_s2_models.py
Outdated
"provides_power_measurement_types": ["ELECTRIC.POWER.3_PHASE_SYMMETRIC"], | ||
"message_type": "ResourceManagerDetails", | ||
}, | ||
"metadata": {"dt": "2023-01-01T00:00:00"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, these should be forced to be timezone aware datetimes (and following the ISO 8601 standard), e.g. "2023-01-01T00:00:00+00"
.
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
Signed-off-by: F.N. Claessen <[email protected]>
…system-description-to-fm' into VladIftime-Kiflin-PPBC
…tarted implemenation of trigger_schedule for PPBC simple
Added the skeleton for PPBC implementation into flex measures