Update Clustering authored by David Huckebrink's avatar David Huckebrink
......@@ -30,12 +30,13 @@ This chapter was written and tested for the commit cfb979a0d0f037a24b9d916b72680
- Create a PyPSA-eur-network with desired config-settings (clustering.custom_busmap in the PyPSA-eur config file must be set to `false` at this step).
- Modify `custom_clustering.py.ipynb` (in backbone_tools) such that it meets your needs.
- Execute it. It will create a `custom_busmap_elec_s_{clusters}.csv` file where `clusters` is analogous to its use in the PyPSA-eur snakefile. It will be written to the PyPSA-eur-folder "data".
- Execute it. It will create a `custom_busmap_elec_s\_{clusters}.csv` file where `clusters` is analogous to its use in the PyPSA-eur snakefile. It will be written to the PyPSA-eur-folder "data".
- Delete all files in the PyPSA-eur-folder "network", "results" and "resources".
- Enable clustering.custom_busmap in the PyPSA-eur config file by setting it to `true`.
- Create the final PyPSA-eur-network with desired settings (remember to match the wildcard `{clusters}` to `custom_busmap_elec_s_{clusters}.csv`).
- Create the final PyPSA-eur-network with desired settings (remember to match the wildcard `{clusters}` to `custom_busmap_elec_s\_{clusters}.csv`).
## The result
Clustering as described above yields the following map. Note that colours only serve the purpose of visually separating clusters.
| explanation | figure |
|-------------|--------|
......@@ -43,6 +44,7 @@ Clustering as described above yields the following map. Note that colours only s
| DE (NUTS 2 level), AT (NUTS 0) & IT (NUTS 0) with buses | ![custom_cluster_de_at_it](uploads/36175c205aac99db03c8b5aabb5e6cf3/custom_cluster_de_at_it.png) |
## The errors
Several errors were encountered, when developing/using this tool. The following list serves as a short quick-fix guide reconstructed from the top of my head:
| description | what caused it/what to do |
|-------------|---------------------------|
......@@ -92,7 +94,8 @@ def _make_consense(component, attr):
Alter the differing country for the corresponding bus in your custom_busmap_elec_s_NUMBERNODES.csv and restart your snakemake command.
**Further Applications of Custom Clustering** Another application of custom clustering is the representation of the four control areas in Germany.
# Further Applications of Custom Clustering
Another application of custom clustering is the representation of the four control areas in Germany.
![custom_clustering_DE_Regelzonen](uploads/5dbba7ca8cce63ab4eb9cce2e1f7ac38/custom_clustering_DE_Regelzonen.png)
......
......