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

Add more options for temporal aggregation #261

Merged
merged 3 commits into from
Sep 14, 2022
Merged

Conversation

lisazeyen
Copy link
Collaborator

@lisazeyen lisazeyen commented Aug 8, 2022

This PR should add two more options to aggregate the network temporally:
(1) aggregate timeseries to representative snapshots with e.g. 25sn as sector_opts would results in taking every 25th snapshot
(2) using segmentation method from tsam similar to PyPSA-Eur, except that all time-dependent data is considered (to include e.g. also the COP of heat pumps) and that the options is added to overwrite the pypsa time-series with time profiles generated by tsam. For example 60SEG in sector_opts would results in 60 representative snapshots of the original timeseries.

@lisazeyen lisazeyen requested a review from fneum August 8, 2022 07:03
@lisazeyen
Copy link
Collaborator Author

I am actually pretty sure that the options to aggregate to x representative snapshots with xsn was tat some point in the code. @fneum to you have any experience with overwriting the timeseries of pypsa with the ones generated by the tsam package? I just did a quick check but they didn't seem to be very similar. Therefore, I am currently setting the option to overwrite them as False and haven't moved the option to the config. We could also remove this part if it is not helpful.

Copy link
Member

@fneum fneum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice PR!

Stylewise, just minor comments, in particular using n.iterate_components().

Results with segmented time series (here 2190 snapshots ~ 4H resolution) look good. The peak and trough shaving is an expected inaccuracy of the temporal aggregation. I didn't check whether there are further options to tweak the segmentation clustering in tsam.

solar:

solar

wind:
onwind

heat demand:
heat

electricity demand:
electricity

One thing I'm unsure about is the temporal aggregation of e_min_pu. We use this to set the required SOC of electric vehicles in the mornings. The higher the temporal aggregation is, the more this constraint gets washed out. In any case, I don't think it should play into the temporal clustering.

Another thing to be careful about is resource consumption. It took quite a while for tsam to do the temporal clustering.

scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
scripts/prepare_sector_network.py Outdated Show resolved Hide resolved
@lisazeyen
Copy link
Collaborator Author

Thanks a lot for the review @fneum !

@lisazeyen lisazeyen closed this Sep 14, 2022
@lisazeyen lisazeyen reopened this Sep 14, 2022
@lisazeyen lisazeyen merged commit 14ad15d into master Sep 14, 2022
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