PyPSA / pypsa-eur

PyPSA-Eur: A Sector-Coupled Open Optimisation Model of the European Energy System
https://pypsa-eur.readthedocs.io/
342 stars 242 forks source link

Negative electricity demand when temporal resolution is 24h #1145

Closed cerealice closed 1 month ago

cerealice commented 4 months ago

Checklist

Describe the Bug

Running the config file for a clustering temporal resolution of more than 1h for the electricity sector, in "scripts/prepare_sector_network.py" I believe there is a bug at lines 3202-3206 factor = ( 1

In this case the numerator is an annual value while the denominator is not. I would fix it with some code like this: Line 2562: timestep = n.snapshot_weightings.iloc[0,0] Then the previous lines would be: factor = ( 1

Let me know :)

fneum commented 1 month ago

duplicate of #1278