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

Consider points of varying quantity in availability #336

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

boehan
Copy link

@boehan boehan commented Jun 20, 2024

For availability current parsing only considers start and end of timeInterval in the given Available_Period per document. However, for some outages, the period is split up to multiple points, which indicate varying quantity during the period.
As an example (full file):

...
            <Available_Period>
                <timeInterval>
                    <start>2023-02-27T06:00Z</start>
                    <end>2023-03-07T05:00Z</end>
                </timeInterval>
                <resolution>PT15M</resolution>
                    <Point>
                        <position>1</position>
                        <quantity>547.5</quantity>
                    </Point>
                    <Point>
                        <position>121</position>
                        <quantity>365</quantity>
                    </Point>
                    <Point>
                        <position>137</position>
                        <quantity>547.5</quantity>
                    </Point>
            </Available_Period>
...

The proposed change extends the existing parser by returning an outage period for each point instead of the period as a whole.

@fboerman
Copy link
Collaborator

hi @boehan many thanks for this contribution! could you please provide a quick code snippet of before and after as well as what data is exactly changed? Then I can do a quick verification and merge this

@boehan
Copy link
Author

boehan commented Oct 26, 2024

Test code:

from entsoe import EntsoePandasClient  
import pandas as pd

client = EntsoePandasClient(api_key='b2d897d1-12f1-453a-9228-f1b0f7d53b9f')

start = pd.Timestamp('2023-01-17 13:00:00', tz='Europe/Vienna')  
end = pd.Timestamp('2023-01-17 16:00:00', tz='Europe/Vienna')

result = client.query_unavailability_of_generation_units('AT', start, end, docstatus=None, periodstartupdate=None, periodendupdate=None)  
print(result[result['production_resource_name'] == 'Malta-Hauptstufe'])

result after change:

                          avail_qty biddingzone_domain  ... revision                     start
created_doc_time                                        ...                                   
2023-01-17 14:20:16+01:00     547.5                 AT  ...        2 2023-01-17 13:00:00+01:00
2023-02-07 17:34:24+01:00     547.5                 AT  ...        2 2023-01-17 13:00:00+01:00
2023-02-07 17:34:29+01:00     547.5                 AT  ...        5 2023-01-17 13:00:00+01:00
2023-02-07 17:34:29+01:00       365                 AT  ...        5 2023-01-17 14:00:00+01:00
2023-02-07 17:34:29+01:00     547.5                 AT  ...        5 2023-01-17 15:15:00+01:00

[5 rows x 18 columns]

result before:

                          avail_qty biddingzone_domain  ... revision                     start
created_doc_time                                        ...                                   
2023-01-17 14:20:16+01:00     547.5                 AT  ...        2 2023-01-17 13:00:00+01:00
2023-02-07 17:34:24+01:00     547.5                 AT  ...        2 2023-01-17 13:00:00+01:00
2023-02-07 17:34:29+01:00     547.5                 AT  ...        5 2023-01-17 13:00:00+01:00

[3 rows x 18 columns]

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.

2 participants