Skip to content
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

Open
wants to merge 86 commits into
base: main
Choose a base branch
from
Open

Vlad Iftime Kiflin PPBC #95

wants to merge 86 commits into from

Conversation

VladIftime
Copy link
Contributor

Added the skeleton for PPBC implementation into flex measures

@VladIftime VladIftime force-pushed the VladIftime-Kiflin-PPBC branch 2 times, most recently from d607033 to 2c373bd Compare December 25, 2024 00:54
@Flix6x Flix6x changed the base branch from main to feature/TUNES/send-system-description-to-fm December 26, 2024 09:04
VladIftime and others added 2 commits January 10, 2025 14:19
@VladIftime VladIftime force-pushed the VladIftime-Kiflin-PPBC branch from 0e39df6 to c8d7e26 Compare January 10, 2025 15:53
Flix6x and others added 19 commits January 11, 2025 02:47
…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]>
…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]>
Comment on lines +41 to +52
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,
)
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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?

Copy link
Contributor

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)?

"provides_power_measurement_types": ["ELECTRIC.POWER.3_PHASE_SYMMETRIC"],
"message_type": "ResourceManagerDetails",
},
"metadata": {"dt": "2023-01-01T00:00:00"},
Copy link
Contributor

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".

Flix6x and others added 6 commits January 15, 2025 21:55
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
Base automatically changed from feature/TUNES/send-system-description-to-fm to main January 23, 2025 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants