Skip to content

feat: refactors temporal aggregation as a separate rule#1916

Open
tgilon wants to merge 5 commits intoPyPSA:masterfrom
tgilon:feat/time-agg
Open

feat: refactors temporal aggregation as a separate rule#1916
tgilon wants to merge 5 commits intoPyPSA:masterfrom
tgilon:feat/time-agg

Conversation

@tgilon
Copy link
Collaborator

@tgilon tgilon commented Nov 21, 2025

Closes # (if applicable).

Changes proposed in this Pull Request

This PR introduces a new distinct rule to apply the time aggregation on the time-varying network data. To achieve this:

  • It refactors the temporal aggregation of a sector-coupled model as a separate rule,
  • It renames previous temporal_aggregation as build_snapshot_weightings, and
  • It introduces a new rule temporal_aggregation after prepare_sector_network that effectively applies the aggregation.

The benefit of doing this is that it makes the prepared network more explicit at hourly resolution.

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to pixi.toml (using pixi add <dependency-name>).
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • Sources of newly added data are documented in doc/data_sources.rst.
  • A release note doc/release_notes.rst is added.

@tgilon tgilon self-assigned this Nov 21, 2025
@fneum
Copy link
Member

fneum commented Dec 10, 2025

This PR would not be compatible with the approach proposed in #1838. @FabianHofmann presented this today and to me it looks like #1838 would be preferable (without having reviewed the code in detail yet) as it elegantly unifies overnight, myopic, and perfect foresight code.

I would give that PR priority. One could always export the hourly model for reference as additional output. I will keep it open for now but close if #1838 gets merged.

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.

[SUB] Refactor temporal aggregation as a separate rule

2 participants