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

Negative electricity demand when temporal resolution is 24h #1145

Closed
2 tasks
cerealice opened this issue Jul 11, 2024 · 1 comment
Closed
2 tasks

Negative electricity demand when temporal resolution is 24h #1145

cerealice opened this issue Jul 11, 2024 · 1 comment
Labels

Comments

@cerealice
Copy link

cerealice commented Jul 11, 2024

Checklist

  • I am using the current master branch or the latest release. Please indicate. v 0.11.0
  • I am running on an up-to-date pypsa-eur environment. Update via conda env update -f envs/environment.yaml.

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
- industrial_demand.loc[loads_i, "current electricity"].sum()
/ n.loads_t.p_set[loads_i].sum().sum()
)

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
- industrial_demand.loc[loads_i, "current electricity"].sum()
/ (n.loads_t.p_set[loads_i].sum().sum()*timestep)
)

Let me know :)

@cerealice cerealice added the bug label Jul 11, 2024
@fneum
Copy link
Member

fneum commented Sep 24, 2024

duplicate of #1278

@fneum fneum closed this as completed Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants