FlexMeasures / flexmeasures

The intelligent & developer-friendly EMS to support real-time energy flexibility apps, rapidly and scalable.
https://flexmeasures.io
Apache License 2.0
133 stars 34 forks source link

feature: add get_schedule for asset schedules #1086

Open Flix6x opened 1 month ago

Flix6x commented 1 month ago

Description

Look & Feel

{
    "schedule": [
        {
            "sensor": 1,
            "values": [
                2.15,
                3,
                2
            ],
            "start": "2015-06-02T10:00:00+00:00",
            "duration": "PT45M",
            "unit": "MW"
        },
        {
            "sensor": 2,
            "values": [
                2.15,
                3,
                2
            ],
            "start": "2015-06-02T10:00:00+00:00",
            "duration": "PT45M",
            "unit": "MW"
        }
    ]
}

How to test

Further Improvements

Related Items

Follow-up to #1065.

victorgarcia98 commented 1 month ago

On the side, I wonder about the case where we do a centralized planning and we want the assets to get their schedules. Maybe in this case the devices can query the schedule "blindly" with certain frequency.

Flix6x commented 1 month ago

On the side, I wonder about the case where we do a centralized planning and we want the assets to get their schedules. Maybe in this case the devices can query the schedule "blindly" with certain frequency.

If we do a centralized planning, we plan them all at once, so either none of them are done or all of them are done, right?

victorgarcia98 commented 1 month ago

On the side, I wonder about the case where we do a centralized planning and we want the assets to get their schedules. Maybe in this case the devices can query the schedule "blindly" with certain frequency.

If we do a centralized planning, we plan them all at once, so either none of them are done or all of them are done, right?

Yes but the planning needs to happen from only one point. I'm thinking in the case where we do trigger the plan on our side (for example via a CLI on a cronjob) and the devices request their schedules. This is one idea we had for TUNES.

Flix6x commented 1 month ago

Oh yes, you are absolutely right. Thanks for jolting my memory. It should be made possible for the individual devices to get their own schedule using the job ID of the collective scheduling job. I can make that happen, probably by adding a few lines on the original get_schedule endpoint.