Update Clustering authored by Christine Nowak's avatar Christine Nowak
...@@ -26,12 +26,12 @@ It currently is still an [issue](https://github.com/PyPSA/pypsa-eur/issues/124) ...@@ -26,12 +26,12 @@ It currently is still an [issue](https://github.com/PyPSA/pypsa-eur/issues/124)
The goal was to define a model with higher resolution for Germany ([nuts2](https://ec.europa.eu/eurostat/de/web/gisco/geodata/reference-data/administrative-units-statistical-units/nuts)) and limit modelling of neighbouring countries to a minimum. While the current solution is specific to Germany, it can easily be adapted to other countries. The goal was to define a model with higher resolution for Germany ([nuts2](https://ec.europa.eu/eurostat/de/web/gisco/geodata/reference-data/administrative-units-statistical-units/nuts)) and limit modelling of neighbouring countries to a minimum. While the current solution is specific to Germany, it can easily be adapted to other countries.
**The way** **The way**
- 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) - 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. - 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" - 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`. - 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** **The result**
Clustering as described above yields the following map. Note that colours only serve the purpose of visually separating clusters. Clustering as described above yields the following map. Note that colours only serve the purpose of visually separating clusters.
... ...
......