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

Bugfix: integrate build_bus_regions into base_network #1051

Merged
merged 5 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified doc/img/intro-workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/img/workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ as part of the `Stromnetze Research Initiative
Workflow
========

.. image:: ../graphics/workflow.png
.. image:: img/workflow.png
:class: full-width
:align: center

Expand Down
10 changes: 1 addition & 9 deletions doc/preparation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ Having downloaded the necessary data,
With these and the externally extracted ENTSO-E online map topology
(``data/entsoegridkit``), it can build a base PyPSA network with the following rules:

- :mod:`base_network` builds and stores the base network with all buses, HVAC lines and HVDC links, while
- :mod:`build_bus_regions` determines `Voronoi cells <https://en.wikipedia.org/wiki/Voronoi_diagram>`__ for all substations.
- :mod:`base_network` builds and stores the base network with all buses, HVAC lines and HVDC links, and determines `Voronoi cells <https://en.wikipedia.org/wiki/Voronoi_diagram>`__ for all substations.

Then the process continues by calculating conventional power plant capacities, potentials, and per-unit availability time series for variable renewable energy carriers and hydro power plants with the following rules:

Expand All @@ -35,13 +34,6 @@ Then the process continues by calculating conventional power plant capacities, p
The central rule :mod:`add_electricity` then ties all the different data inputs
together into a detailed PyPSA network stored in ``networks/elec.nc``.

.. _busregions:

Rule ``build_bus_regions``
=============================

.. automodule:: build_bus_regions

.. _cutout:

Rule ``build_cutout``
Expand Down
2 changes: 1 addition & 1 deletion doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Upcoming Release

* Data on existing renewable capacities is now consistently taken from powerplantmatching (instead of being retrieved separately); the dataset has also been updated to include 2023 values.

* Added shapes to .nc file for different stages of the network object in `base_network`, `build_bus_regions`, and `cluster_network`.
* Added shapes to .nc file for different stages of the network object in `base_network`, `simplify_network`, and `cluster_network`; the `build_bus_regions` rule is now integrated into the `base_network` rule.

* Fix p_nom_min of renewables generators for myopic approach and add check of existing capacities in `add_land_use_constraint_m`.

Expand Down
124 changes: 57 additions & 67 deletions doc/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,32 +133,31 @@ This triggers a workflow of multiple preceding jobs that depend on each rule's i
graph[bgcolor=white, margin=0];
node[shape=box, style=rounded, fontname=sans, fontsize=10, penwidth=2];
edge[penwidth=2, color=grey];
0[label = "solve_network", color = "0.39 0.6 0.85", style="rounded"];
1[label = "prepare_network\nll: copt\nopts: Co2L-24H", color = "0.29 0.6 0.85", style="rounded"];
2[label = "add_extra_components", color = "0.28 0.6 0.85", style="rounded"];
3[label = "cluster_network\nclusters: 6", color = "0.19 0.6 0.85", style="rounded"];
4[label = "simplify_network\nsimpl: ", color = "0.01 0.6 0.85", style="rounded"];
5[label = "add_electricity", color = "0.49 0.6 0.85", style="rounded"];
6[label = "build_renewable_profiles\ntechnology: solar", color = "0.21 0.6 0.85", style="rounded"];
7[label = "base_network", color = "0.27 0.6 0.85", style="rounded"];
8[label = "build_shapes", color = "0.26 0.6 0.85", style="rounded"];
9[label = "retrieve_databundle", color = "0.59 0.6 0.85", style="rounded"];
10[label = "retrieve_natura_raster", color = "0.47 0.6 0.85", style="rounded"];
11[label = "build_bus_regions", color = "0.13 0.6 0.85", style="rounded"];
12[label = "retrieve_cutout\ncutout: be-03-2013-era5", color = "0.36 0.6 0.85", style="rounded,dashed"];
13[label = "build_renewable_profiles\ntechnology: onwind", color = "0.21 0.6 0.85", style="rounded"];
14[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.21 0.6 0.85", style="rounded"];
15[label = "build_ship_raster", color = "0.00 0.6 0.85", style="rounded"];
16[label = "retrieve_ship_raster", color = "0.51 0.6 0.85", style="rounded,dashed"];
17[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.21 0.6 0.85", style="rounded"];
18[label = "build_line_rating", color = "0.05 0.6 0.85", style="rounded"];
19[label = "retrieve_cost_data\nyear: 2030", color = "0.15 0.6 0.85", style="rounded"];
20[label = "build_powerplants", color = "0.54 0.6 0.85", style="rounded"];
21[label = "build_electricity_demand", color = "0.52 0.6 0.85", style="rounded"];
22[label = "retrieve_electricity_demand", color = "0.22 0.6 0.85", style="rounded"];
23[label = "copy_config", color = "0.44 0.6 0.85", style="rounded"];
0[label = "solve_network", color = "0.24 0.6 0.85", style="rounded"];
1[label = "prepare_network\nll: vopt\nopts: Co2L-3H", color = "0.10 0.6 0.85", style="rounded"];
2[label = "add_extra_components", color = "0.33 0.6 0.85", style="rounded"];
3[label = "cluster_network\nclusters: 128", color = "0.59 0.6 0.85", style="rounded"];
4[label = "simplify_network\nsimpl: ", color = "0.18 0.6 0.85", style="rounded"];
5[label = "add_electricity", color = "0.48 0.6 0.85", style="rounded"];
6[label = "build_renewable_profiles\ntechnology: solar", color = "0.29 0.6 0.85", style="rounded"];
7[label = "base_network", color = "0.30 0.6 0.85", style="rounded"];
8[label = "build_shapes", color = "0.61 0.6 0.85", style="rounded"];
9[label = "retrieve_databundle", color = "0.06 0.6 0.85", style="rounded"];
10[label = "retrieve_natura_raster", color = "0.03 0.6 0.85", style="rounded"];
11[label = "retrieve_cutout\ncutout: europe-2013-sarah", color = "0.50 0.6 0.85", style="rounded"];
12[label = "build_renewable_profiles\ntechnology: onwind", color = "0.29 0.6 0.85", style="rounded"];
13[label = "retrieve_cutout\ncutout: europe-2013-era5", color = "0.50 0.6 0.85", style="rounded"];
14[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.29 0.6 0.85", style="rounded"];
15[label = "build_ship_raster", color = "0.16 0.6 0.85", style="rounded"];
16[label = "retrieve_ship_raster", color = "0.53 0.6 0.85", style="rounded"];
17[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.29 0.6 0.85", style="rounded"];
18[label = "build_hydro_profile", color = "0.47 0.6 0.85", style="rounded"];
19[label = "retrieve_cost_data\nyear: 2030", color = "0.21 0.6 0.85", style="rounded"];
20[label = "build_powerplants", color = "0.56 0.6 0.85", style="rounded"];
21[label = "build_electricity_demand", color = "0.54 0.6 0.85", style="rounded"];
22[label = "retrieve_electricity_demand", color = "0.34 0.6 0.85", style="rounded"];
23[label = "retrieve_synthetic_electricity_demand", color = "0.65 0.6 0.85", style="rounded"];
1 -> 0
23 -> 0
2 -> 1
19 -> 1
3 -> 2
Expand All @@ -167,15 +166,14 @@ This triggers a workflow of multiple preceding jobs that depend on each rule's i
19 -> 3
5 -> 4
19 -> 4
11 -> 4
7 -> 4
6 -> 5
13 -> 5
12 -> 5
14 -> 5
17 -> 5
7 -> 5
18 -> 5
7 -> 5
19 -> 5
11 -> 5
20 -> 5
9 -> 5
21 -> 5
Expand All @@ -185,37 +183,32 @@ This triggers a workflow of multiple preceding jobs that depend on each rule's i
10 -> 6
8 -> 6
11 -> 6
12 -> 6
8 -> 7
9 -> 8
8 -> 11
7 -> 11
7 -> 13
9 -> 13
10 -> 13
8 -> 13
11 -> 13
12 -> 13
7 -> 12
9 -> 12
10 -> 12
8 -> 12
13 -> 12
7 -> 14
9 -> 14
10 -> 14
15 -> 14
8 -> 14
11 -> 14
12 -> 14
13 -> 14
16 -> 15
12 -> 15
13 -> 15
7 -> 17
9 -> 17
10 -> 17
15 -> 17
8 -> 17
11 -> 17
12 -> 17
7 -> 18
12 -> 18
13 -> 17
8 -> 18
13 -> 18
7 -> 20
22 -> 21
23 -> 21
}

|
Expand All @@ -226,28 +219,25 @@ In the terminal, this will show up as a list of jobs to be run:

Building DAG of jobs...
Job stats:
job count
--------------------------- -------
add_electricity 1
add_extra_components 1
base_network 1
build_bus_regions 1
build_electricity_demand 1
build_line_rating 1
build_powerplants 1
build_renewable_profiles 4
build_shapes 1
build_ship_raster 1
cluster_network 1
copy_config 1
prepare_network 1
retrieve_cost_data 1
retrieve_databundle 1
retrieve_electricity_demand 1
retrieve_natura_raster 1
simplify_network 1
solve_network 1
total 22
job count
------------------------------------- -------
add_electricity 1
add_extra_components 1
build_line_rating 1
build_renewable_profiles 4
build_ship_raster 1
cluster_network 1
prepare_network 1
retrieve_cost_data 1
retrieve_cutout 1
retrieve_databundle 1
retrieve_electricity_demand 1
retrieve_natura_raster 1
retrieve_ship_raster 1
retrieve_synthetic_electricity_demand 1
simplify_network 1
solve_network 1
total 19


``snakemake`` then runs these jobs in the correct order.
Expand Down
Loading
Loading