Skip to content

Conversation

@VladIftime
Copy link
Contributor

Added the skeleton for PPBC implementation into flex measures

Victor Garcia Reolid and others added 18 commits August 7, 2024 15:56
…C control type to work only with TUNES RM (for now).

Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
Signed-off-by: Victor Garcia Reolid <victor@seita.nl>
…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 <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
@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
Signed-off-by: Vlad Iftime <vladiftime60@gmail.com>
@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 <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…ation mode is set to that of the Tarnoc

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
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 <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…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
@nhoening
Copy link
Contributor

Can this be closed, or salvaged?

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