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 electrical demand with coarse time resolution #1278

Closed
2 tasks done
cerealice opened this issue Sep 11, 2024 · 2 comments
Closed
2 tasks done

Negative electrical demand with coarse time resolution #1278

cerealice opened this issue Sep 11, 2024 · 2 comments
Labels

Comments

@cerealice
Copy link

cerealice commented Sep 11, 2024

Checklist

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

Describe the Bug

When I use a very aggregated time resolution (876H) my electricity demand becomes negative because in prepare_sector_network in add_industry the factor to remove the industrial electricity demand does not take into account the fact that the load is not on an hourly basis.
I solved this by creating inside add_industry a timesteo variable timestep = n.snapshot_weightings.iloc[0,0] and then using it to weight better the loads_t.p

image
@cerealice cerealice added the bug label Sep 11, 2024
@koen-vg
Copy link
Contributor

koen-vg commented Sep 23, 2024

Could this simply be caused by setting resolution_elec to some non-false value but running a sector-coupled network? Currently, prepare_sector_network.py basically expects resolution_elec to be False, i.e. the network is not "supposed" to be time-aggreggated, and for sector-coupled networks this is only supposed to happen through resolution_sector. See also the discussion in #1277. I will note that this is warned against in the documentation (https://pypsa-eur.readthedocs.io/en/latest/configuration.html#clustering), but that's of course easy to miss, and as I've written in the linked issue I don't think there should be any reason to allow two separate configuration option for elec-only and sector-coupled time resolution; by joining them we could avoid the kind of issues like the present one.

Hopefully the problem with negative demand goes away when you set resolution_elec: false. If it does, I would close this issue and we can keep discussing potential improvements to how time-aggregation in implemented in #1277.

@cerealice
Copy link
Author

I confirm that the problem is solved when running a sector coupled network but with resolution_elec: false. It is indeed specified in the documentation
Still it would be interesting to continue on #1277.
Thanks for your help!

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