include description of rule groups
* and reduce corresponding sections in readme * and modify environment docs * and add bibtex support (tentative)
This commit is contained in:
parent
9fe3fa54fe
commit
067d259ff6
164
README.md
164
README.md
@ -34,167 +34,3 @@ The dataset consists of:
|
||||
[OPSD project](https://open-power-system-data.org/).
|
||||
- Renewable time series based on ERA5 and SARAH, assembled using the [atlite tool](https://github.com/FRESNA/atlite).
|
||||
- Geographical potentials for wind and solar generators based on land use (CORINE) and excluding nature reserves (Natura2000) are computed with the [vresutils library](https://github.com/FRESNA/vresutils).
|
||||
|
||||
Building the model with the scripts in this repository uses up to 20GB of
|
||||
memory. Computing optimal investment and operation scenarios requires a strong
|
||||
interior-point solver compatible with the modelling library
|
||||
[PYOMO](https://github.com/Pyomo/pyomo) like Gurobi or CPLEX with up to 100GB of
|
||||
memory (for the 356-bus approximation).
|
||||
|
||||
This project is maintained by the [Energy System Modelling
|
||||
group](https://www.iai.kit.edu/english/2338.php) at the [Institute for
|
||||
Automation and Applied
|
||||
Informatics](https://www.iai.kit.edu/english/index.php) at the
|
||||
[Karlsruhe Institute of
|
||||
Technology](http://www.kit.edu/english/index.php). It is currently
|
||||
funded by the [Helmholtz
|
||||
Association](https://www.helmholtz.de/en/). Previous versions were
|
||||
developed by the [Renewable Energy
|
||||
Group](https://fias.uni-frankfurt.de/physics/schramm/renewable-energy-system-and-network-analysis/)
|
||||
at [FIAS](https://fias.uni-frankfurt.de/) to carry out simulations for
|
||||
the [CoNDyNet project](http://condynet.de/), financed by the [German
|
||||
Federal Ministry for Education and Research
|
||||
(BMBF)](https://www.bmbf.de/en/index.html) as part of the [Stromnetze
|
||||
Research
|
||||
Initiative](http://forschung-stromnetze.info/projekte/grundlagen-und-konzepte-fuer-effiziente-dezentrale-stromnetze/).
|
||||
|
||||
# Installation
|
||||
|
||||
The steps are demonstrated as shell commands, where the path before the `%` sign denotes the
|
||||
directory in which the commands following the `%` should be entered.
|
||||
|
||||
Clone the repository using `git` (**to a directory without any spaces in the path**)
|
||||
```shell
|
||||
/some/other/path % cd /some/path/without/spaces
|
||||
/some/path/without/spaces % git clone https://github.com/PyPSA/pypsa-eur.git
|
||||
```
|
||||
|
||||
## Python dependencies
|
||||
The python package requirements are curated in the conda [environment.yaml](environment.yaml) file.
|
||||
The environment can be installed and activated using
|
||||
```shell
|
||||
.../pypsa-eur % conda env create -f environment.yaml
|
||||
.../pypsa-eur % conda activate pypsa-eur # or source activate pypsa-eur on older linux installations
|
||||
```
|
||||
|
||||
**Note that activation is local to the currently open shell! After opening a new terminal window, one needs to reissue the second command!**
|
||||
|
||||
## Data dependencies
|
||||
Not all data dependencies are shipped with the git repository (since git is not suited for handling large changing files). Instead we provide two separate data bundles:
|
||||
1. [pypsa-eur-data-bundle.tar.xz](https://vfs.fias.science/d/0a0ca1e2fb/files/?p=/pypsa-eur-data-bundle.tar.xz) contains common GIS datasets like NUTS3 shapes, EEZ shapes, CORINE Landcover, Natura 2000 and also electricity specific summary statistics like historic per country yearly totals of hydro generation, GDP and POP on NUTS3 levels and per-country load time-series. It should be extracted in the `data` subdirectory (so that all files are in the `data/bundle` subdirectory)
|
||||
```shell
|
||||
.../pypsa-eur/data % curl -OL "https://vfs.fias.science/d/0a0ca1e2fb/files/?dl=1&p=/pypsa-eur-data-bundle.tar.xz"
|
||||
.../pypsa-eur/data % tar xJf pypsa-eur-data-bundle.tar.xz
|
||||
```
|
||||
2. [pypsa-eur-cutouts.tar.xz](https://vfs.fias.science/d/0a0ca1e2fb/files/?p=/pypsa-eur-cutouts.tar.xz) are spatiotemporal subsets of the European weather data from the [ECMWF ERA5](https://software.ecmwf.int/wiki/display/CKB/ERA5+data+documentation) reanalysis dataset and the [CMSAF SARAH-2](https://wui.cmsaf.eu/safira/action/viewDoiDetails?acronym=SARAH_V002) solar surface radiation dataset for the year 2013. They have been prepared by and are for use with the [atlite](https://github.com/FRESNA/atlite) tool. You can either generate them yourself using the `build_cutouts` snakemake rule or extract them directly in the `pypsa-eur` directory (extracting the bundle is recommended, since procuring the source weather data files for atlite is not properly documented at the moment):
|
||||
```shell
|
||||
.../pypsa-eur % curl -OL "https://vfs.fias.science/d/0a0ca1e2fb/files/?dl=1&p=/pypsa-eur-cutouts.tar.xz"
|
||||
.../pypsa-eur % tar xJf pypsa-eur-cutouts.tar.xz
|
||||
```
|
||||
|
||||
3. Optionally, you can download a rasterized version of the NATURA dataset [natura.tiff](https://vfs.fias.science/d/0a0ca1e2fb/files/?p=/natura.tiff&dl=1) and put it into the `resources` sub-directory. If you don't, it will be generated automatically, which takes several hours.
|
||||
|
||||
```shell
|
||||
.../pypsa-eur % curl -L "https://vfs.fias.science/d/0a0ca1e2fb/files/?p=/natura.tiff&dl=1" -o "resources/natura.tiff"
|
||||
```
|
||||
|
||||
4. Optionally, if you want to save disk space, you can delete `data/pypsa-eur-data-bundle.tar.xz` and `pypsa-eur-cutouts.tar.xz` once extracting the bundles is complete. E.g.
|
||||
|
||||
```shell
|
||||
.../pypsa-eur % rm -rf data/pypsa-eur-data-bundle.tar.xz pypsa-eur-cutouts.tar.xz
|
||||
```
|
||||
|
||||
# Script overview
|
||||
|
||||
The model has several configuration options collected in the [config.yaml](config.yaml) file
|
||||
located in the root directory.
|
||||
|
||||
## Model workflow
|
||||
The generation of the model is controlled by the workflow management system
|
||||
[Snakemake](https://snakemake.bitbucket.io/). In a nutshell, one declares in the
|
||||
`Snakefile` for each python script in the `scripts` directory a rule which
|
||||
describes which files the scripts consume and produce. `snakemake` then runs the
|
||||
scripts in the correct order and is able to track, what parts of the workflow
|
||||
have to be regenerated, when a data file or script is updated. For instance,
|
||||
with the [Snakefile of pypsa-eur](Snakefile), an invocation to
|
||||
```shell
|
||||
snakemake networks/elec_s_128.nc
|
||||
```
|
||||
follows the dependency graph
|
||||
![Dependency graph for network elec_s_128](doc/img/dependencies-elec_s_128.png)
|
||||
|
||||
## Building the network
|
||||
In detail this means it has to run the independent scripts,
|
||||
- `build_shapes` to generate GeoJSON files with country, exclusive economic zones and nuts3 shapes
|
||||
- `build_cutout` to prepare smaller weather data portions from ERA5 for cutout `europe-2013-era5` and SARAH for cutout `europe-2013-sarah`.
|
||||
|
||||
With these and the externally extracted `ENTSO-E online map topology`, it can build the PyPSA basis model
|
||||
- `base_network` stored at `networks/base.nc` with all `buses`, HVAC `lines` and HVDC `links`, and in
|
||||
- `build_bus_regions` determine the Voronoi cell of each substation.
|
||||
|
||||
Then it hands these over to the scripts for generating renewable and hydro feedin data,
|
||||
- `build_hydro_profile` for the hourly hydro energy availability,
|
||||
- `build_renewable_potentials` for the landuse/natura2000 constrained installation potentials for PV and wind,
|
||||
- `build_renewable_profiles` for the PV and wind hourly capacity factors in each Voronoi cell.
|
||||
- `build_powerplants` uses [powerplantmatching](https://github.com/FRESNA/powerplantmatching) to determine today's thermal power plant capacities and then locates the closest substation for each powerplant.
|
||||
|
||||
The central rule `add_electricity` then ties all the different data inputs together to a detailed PyPSA model stored in `networks/elec.nc`, containing:
|
||||
|
||||
- Today's transmission topology and capacities (optionally including lines which are under construction according to the config settings `lines: under_construction` and `links: under_construction`)
|
||||
- Today's thermal and hydro generation capacities (for the technologies listed in the config setting `electricity: conventional_carriers`)
|
||||
- Today's load time-series (upsampled according to population and gross domestic product)
|
||||
|
||||
It further adds extendable `generators` and `storage_units` with *zero* capacity for
|
||||
- wind and pv installations with today's locational, hourly wind and solar pv capacity factors (but **no** capacities)
|
||||
- long-term hydrogen and short-term battery storage units (if listed in `electricity: extendable_carriers`)
|
||||
- additional open-cycle gas turbines (if `OCGT` is listed in `electricity: extendable_carriers`)
|
||||
|
||||
The additional rules prepare approximations of the full model, in which generation, storage and transmission capacities can be co-optimized
|
||||
- `simplify_network` transforms the transmission grid to a 380 kV-only equivalent network, while
|
||||
- `cluster_network` uses a kmeans based clustering technique to partition the network into a certain number of zones and then reduce the network to a representation with one bus per zone.
|
||||
|
||||
The simplification and clustering steps are described in detail in the paper
|
||||
[The role of spatial scale in joint optimisations of generation and transmission for European highly renewable scenarios](https://arxiv.org/abs/1705.07617), 2017, [arXiv:1705.07617](https://arxiv.org/abs/1705.07617), [doi:10.1109/EEM.2017.7982024](https://doi.org/10.1109/EEM.2017.7982024).
|
||||
|
||||
## Solving the network
|
||||
After generating the network it can be solved by using 'solve_all_elec_networks'. This runs the following rules:
|
||||
- 'cluster_network'
|
||||
- 'prepare_network'
|
||||
- 'solve_all_elec_networks'
|
||||
- 'solve_network'
|
||||
|
||||
## Summarising the results and making plots
|
||||
The following rule can be used to summarize the results in seperate .csv files:
|
||||
```
|
||||
snakemake results/summaries/elec_s_all_lall_Co2L-3H_all
|
||||
^ clusters
|
||||
^ line volume or cost cap
|
||||
^- options
|
||||
^- all countries
|
||||
```
|
||||
the line volume/cost cap field can be set to one of the following:
|
||||
* `lv1.25` for a particular line volume extension by 25%
|
||||
* `lc1.25` for a line cost extension by 25 %
|
||||
* `lall` for all evalutated caps
|
||||
* `lvall` for all line volume caps
|
||||
* `lcall` for all line cost caps
|
||||
|
||||
Replacing '/summaries/' with '/plots/' creates nice colored maps of the results.
|
||||
|
||||
# Solver choice
|
||||
Default choice for the solver is Gurobi (freely available under academic license) or CPLEX. If you want to go fully opensource the CBC solver (https://projects.coin-or.org/Cbc) can be used. To install CBC run 'conda install -c conda-forge coincbc'.
|
||||
|
||||
# Hints
|
||||
|
||||
For the use of `snakemake`, it makes sense to familiarize oneself quickly with its [basic tutorial](https://snakemake.readthedocs.io/en/stable/tutorial/basics.html) and then read carefully through the section [Executing Snakemake](https://snakemake.readthedocs.io/en/stable/executable.html), noting the arguments `-n`, `-r`, but also `--dag`, `-R` and `-t`.
|
||||
|
||||
The dependency graph shown above was generated using
|
||||
```shell
|
||||
snakemake --dag networks/elec_s_128.nc | dot -Tpng > dependency-graph-elec_s_128.png
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
The code in PyPSA-Eur is released as free software under the
|
||||
[GPLv3](http://www.gnu.org/licenses/gpl-3.0.en.html), see
|
||||
[LICENSE](LICENSE.txt).
|
||||
|
@ -36,6 +36,7 @@ extensions = [
|
||||
'sphinx.ext.todo',
|
||||
'sphinx.ext.mathjax',
|
||||
'sphinx.ext.napoleon',
|
||||
'sphinxcontrib.bibtex',
|
||||
#'sphinx.ext.pngmath',
|
||||
#'sphinxcontrib.tikz',
|
||||
#'rinoh.frontend.sphinx',
|
||||
|
@ -1,7 +1,25 @@
|
||||
PyPSA-Eur: An Open Optimisation Model of the European Transmission System
|
||||
=========================================================================
|
||||
|
||||
TODO: insert badges
|
||||
.. image:: https://img.shields.io/github/tag-date/pypsa/pypsa-eur
|
||||
:alt: GitHub tag
|
||||
|
||||
.. image:: https://readthedocs.org/projects/pypsa-eur/badge/?version=latest
|
||||
:target: https://pypsa-eur.readthedocs.io/en/latest/?badge=latest
|
||||
:alt: Documentation Status
|
||||
|
||||
.. image:: https://img.shields.io/github/license/pypsa/pypsa-eur
|
||||
:alt: GitHub
|
||||
|
||||
.. image:: https://img.shields.io/github/repo-size/pypsa/pypsa-eur
|
||||
:alt: GitHub repo size
|
||||
|
||||
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1246852.svg
|
||||
:target: https://doi.org/10.5281/zenodo.1246852
|
||||
|
||||
.. image:: https://badges.gitter.im/PyPSA/community.svg
|
||||
:target: https://gitter.im/PyPSA/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
|
||||
:alt: Chat on Gitter
|
||||
|
||||
PyPSA-Eur is an open model dataset of the European power system at the
|
||||
transmission network level that covers the full ENTSO-E area.
|
||||
@ -12,9 +30,9 @@ The model is suitable both for operational studies and generation and transmissi
|
||||
|
||||
The restriction to freely available and open data encourages the open exchange of model data developments and eases the comparison of model results. It provides a full, automated software pipeline to assemble the load-flow-ready model from the original datasets, which enables easy replacement and improvement of the individual parts.
|
||||
|
||||
PyPSA-Eur is designed to be imported into the open toolbox `PyPSA <https://www.pypsa.org>`_ for which `documentation <>`_ is available as well.
|
||||
PyPSA-Eur is designed to be imported into the open toolbox `PyPSA <https://www.pypsa.org>`_ for which `documentation <https://pypsa.org/doc>`_ is available as well.
|
||||
|
||||
This project is maintained by the `Energy System Modelling group <https://www.iai.kit.edu/english/2338.php>`_ at the `Institute for Automation and Applied Informatics <https://www.iai.kit.edu/english/index.php>`_ at the `Karlsruhe Institute of Technology <http://www.kit.edu/english/index.php>`_. The group is funded by the `Helmholtz Association <https://www.helmholtz.de/en/>`_ until 2024. Previous versions were developed by the `Renewable Energy Group <https://fias.uni-frankfurt.de/physics/schramm/renewable-energy-system-and-network-analysis/>`_ at `FIAS <https://fias.uni-frankfurt.de/>`_ to carry out simulations for the `CoNDyNet project <http://condynet.de/>`_, financed by the `German Federal Ministry for Education and Research (BMBF) <https://www.bmbf.de/en/index.html>` as part of the `Stromnetze Research Initiative <http://forschung-stromnetze.info/projekte/grundlagen-und-konzepte-fuer-effiziente-dezentrale-stromnetze/>`_.
|
||||
This project is maintained by the `Energy System Modelling group <https://www.iai.kit.edu/english/2338.php>`_ at the `Institute for Automation and Applied Informatics <https://www.iai.kit.edu/english/index.php>`_ at the `Karlsruhe Institute of Technology <http://www.kit.edu/english/index.php>`_. The group is funded by the `Helmholtz Association <https://www.helmholtz.de/en/>`_ until 2024. Previous versions were developed by the `Renewable Energy Group <https://fias.uni-frankfurt.de/physics/schramm/renewable-energy-system-and-network-analysis/>`_ at `FIAS <https://fias.uni-frankfurt.de/>`_ to carry out simulations for the `CoNDyNet project <http://condynet.de/>`_, financed by the `German Federal Ministry for Education and Research (BMBF) <https://www.bmbf.de/en/index.html>`_ as part of the `Stromnetze Research Initiative <http://forschung-stromnetze.info/projekte/grundlagen-und-konzepte-fuer-effiziente-dezentrale-stromnetze/>`_.
|
||||
|
||||
Documentation
|
||||
=============
|
||||
@ -70,14 +88,15 @@ Documentation
|
||||
Citing PyPSA-Eur
|
||||
================
|
||||
|
||||
If you use PyPSA-Eur for your research, we would appreciate it if you would cite the following paper:
|
||||
If you use PyPSA-Eur for your research, we would appreciate it if you would cite the following paper :cite:`PyPSAEur`:
|
||||
|
||||
- J. Hörsch, F. Hofmann, D. Schlachtberger, T. Brown, `PyPSA-Eur: An Open Optimisation Model of the European Transmission System <https://arxiv.org/abs/1806.01613>`_, 2018, Energy Strategy Reviews, Volume 22, November 2018, Pages 207-215, `10.1016/j.esr.2018.08.012 <https://doi.org/10.1016/j.esr.2018.08.012>`_, `arXiv:1806.01613 <https://arxiv.org/abs/1806.01613>`_
|
||||
.. bibliography:: references.bib
|
||||
:cited:
|
||||
|
||||
Please use the following BibTeX: ::
|
||||
|
||||
@article{PyPSAEur,
|
||||
author = "Jonas H\"orsch and Fabian Hofmann and David Schlachtberger and Tom Brown",
|
||||
author = "Jonas Hoersch and Fabian Hofmann and David Schlachtberger and Tom Brown",
|
||||
title = "PyPSA-Eur: An open optimisation model of the European transmission system",
|
||||
journal = "Energy Strategy Reviews",
|
||||
volume = "22",
|
||||
@ -85,12 +104,11 @@ Please use the following BibTeX: ::
|
||||
year = "2018",
|
||||
issn = "2211-467X",
|
||||
doi = "10.1016/j.esr.2018.08.012",
|
||||
url = "https://doi.org/10.1016/j.esr.2018.08.012",
|
||||
eprint = "1806.01613"
|
||||
}
|
||||
|
||||
|
||||
TODO: actually add versions to zenodo
|
||||
.. todo:: Add versions to zenodo
|
||||
|
||||
If you want to cite a specific PyPSA-Eur version, each release of PyPSA-Eur is stored on Zenodo with a release-specific DOI.
|
||||
This can be found linked from the overall PyPSA-Eur Zenodo DOI:
|
||||
|
@ -4,7 +4,7 @@
|
||||
Installation
|
||||
##########################################
|
||||
|
||||
TODO: install via bash installation script
|
||||
.. todo:: install instructions via bash installation script
|
||||
|
||||
.. note::
|
||||
The steps are demonstrated as shell commands, where the path before the ``%`` sign denotes the
|
||||
@ -30,7 +30,7 @@ Clone the PyPSA-Eur repository using ``git``
|
||||
Install Python Dependencies
|
||||
===============================
|
||||
|
||||
TODO: conda link
|
||||
.. todo:: conda explanation
|
||||
|
||||
The python package requirements are curated in the conda `environment.yaml <https://github.com/PyPSA/pypsa-eur/blob/master/environment.yaml>`_ file.
|
||||
The environment can be installed and activated using
|
||||
|
@ -34,7 +34,7 @@ For the use of ``snakemake``, it makes sense to familiarize oneself quickly with
|
||||
Modification
|
||||
============
|
||||
|
||||
TODO: wildcards modification
|
||||
.. todo:: wildcards modification
|
||||
|
||||
The model has several configuration options collected in the ``config.yaml`` file
|
||||
located in the root directory.
|
||||
|
@ -5,14 +5,37 @@ Plotting and Summary
|
||||
Make Summary
|
||||
============
|
||||
|
||||
.. todo:: move to ``make_summary`` autodoc
|
||||
|
||||
The following rule can be used to summarize the results in seperate .csv files:
|
||||
|
||||
.. code::
|
||||
snakemake results/summaries/elec_s_all_lall_Co2L-3H_all
|
||||
^ clusters
|
||||
^ line volume or cost cap
|
||||
^- options
|
||||
^- all countries
|
||||
|
||||
the line volume/cost cap field can be set to one of the following:
|
||||
* ``lv1.25`` for a particular line volume extension by 25%
|
||||
* ``lc1.25`` for a line cost extension by 25 %
|
||||
* ``lall`` for all evalutated caps
|
||||
* ``lvall`` for all line volume caps
|
||||
* ``lcall`` for all line cost caps
|
||||
|
||||
Replacing '/summaries/' with '/plots/' creates nice colored maps of the results.
|
||||
|
||||
.. automodule:: make_summary
|
||||
|
||||
Plot Summary
|
||||
============
|
||||
|
||||
.. automodule:: plot_summary
|
||||
|
||||
Plot Network
|
||||
============
|
||||
|
||||
.. automodule:: plot_network
|
||||
|
||||
.. image:: img/tech-colors.png
|
||||
:align: center
|
@ -2,30 +2,36 @@
|
||||
Preparing Networks
|
||||
##########################################
|
||||
|
||||
In detail this means it has to run the independent scripts,
|
||||
- `build_shapes` to generate GeoJSON files with country, exclusive economic zones and nuts3 shapes
|
||||
- `build_cutout` to prepare smaller weather data portions from ERA5 for cutout `europe-2013-era5` and SARAH for cutout `europe-2013-sarah`.
|
||||
The preparation process of the PyPSA-Eur energy system model consists of a group of ``snakemake`` rules which are briefly outlined and explained in detail in the sections below:
|
||||
|
||||
With these and the externally extracted `ENTSO-E online map topology`, it can build the PyPSA basis model
|
||||
- `base_network` stored at `networks/base.nc` with all `buses`, HVAC `lines` and HVDC `links`, and in
|
||||
- `build_bus_regions` determine the Voronoi cell of each substation.
|
||||
- ``build_shapes`` to generate GeoJSON files with shapes of the countries, exclusive economic zones and `NUTS3 <https://en.wikipedia.org/wiki/Nomenclature_of_Territorial_Units_for_Statistics>`_ areas.
|
||||
- ``build_cutout`` to prepare smaller weather data portions from `ERA5 <https://www.ecmwf.int/en/forecasts/datasets/reanalysis-datasets/era5>`_ for cutout ``europe-2013-era5`` and SARAH for cutout ``europe-2013-sarah``.
|
||||
|
||||
Then it hands these over to the scripts for generating renewable and hydro feedin data,
|
||||
- `build_hydro_profile` for the hourly hydro energy availability,
|
||||
- `build_renewable_potentials` for the landuse/natura2000 constrained installation potentials for PV and wind,
|
||||
- `build_renewable_profiles` for the PV and wind hourly capacity factors in each Voronoi cell.
|
||||
- `build_powerplants` uses [powerplantmatching](https://github.com/FRESNA/powerplantmatching) to determine today's thermal power plant capacities and then locates the closest substation for each powerplant.
|
||||
With these and the externally extracted ENTSO-E online map topology (``data/entsoegridkit``), it can build a base ``PyPSA`` network with the following rules:
|
||||
|
||||
The central rule `add_electricity` then ties all the different data inputs together to a detailed PyPSA model stored in `networks/elec.nc`, containing:
|
||||
- ``base_network`` builds and stores the base network with all buses, HVAC lines and HVDC links, while
|
||||
- ``build_bus_regions`` determines `Voronoi cells <https://en.wikipedia.org/wiki/Voronoi_diagram>`_ for all substations.
|
||||
|
||||
- Today's transmission topology and capacities (optionally including lines which are under construction according to the config settings `lines: under_construction` and `links: under_construction`)
|
||||
- Today's thermal and hydro generation capacities (for the technologies listed in the config setting `electricity: conventional_carriers`)
|
||||
- Today's load time-series (upsampled according to population and gross domestic product)
|
||||
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:
|
||||
|
||||
It further adds extendable `generators` and `storage_units` with *zero* capacity for
|
||||
- wind and pv installations with today's locational, hourly wind and solar pv capacity factors (but **no** capacities)
|
||||
- long-term hydrogen and short-term battery storage units (if listed in `electricity: extendable_carriers`)
|
||||
- additional open-cycle gas turbines (if `OCGT` is listed in `electricity: extendable_carriers`)
|
||||
- ``build_powerplants`` for today's thermal power plant capacities using `powerplantmatching <https://github.com/FRESNA/powerplantmatching>`_ allocating these to the closest substation for each powerplant,
|
||||
- ``build_renewable_potentials`` for the installation potentials for solar panels, onshore and offshore wind turbines constrained by landuse restrictions and natural protection areas,
|
||||
- ``build_renewable_profiles`` for the hourly capacity factors in each substation's Voronoi cell for PV, onshore and offshore wind, and
|
||||
- ``build_hydro_profile`` for the hourly per-unit hydro power availability time series.
|
||||
|
||||
The central rule ``add_electricity`` then ties all the different data inputs together into a detailed `PyPSA` network stored in ``networks/elec.nc`` containing
|
||||
|
||||
.. todo:: probably move parts into ``add_electricity`` docstring
|
||||
|
||||
- today's transmission topology and transfer capacities (optionally including lines which are under construction according to the config settings ``lines: under_construction`` and ``links: under_construction``),
|
||||
- today's thermal and hydro power generation capacities (for the technologies listed in the config setting ``electricity: conventional_carriers``), and
|
||||
- today's load time-series (upsampled in a top-down approach according to population and gross domestic product)
|
||||
|
||||
It further adds extendable ``generators`` and ``storage_units`` with **zero** capacity for
|
||||
|
||||
- photovoltaic, onshore and offshore wind installations with today's locational, hourly wind and solar pv capacity factors (but **no** current capacities)
|
||||
- long-term hydrogen and short-term battery storage units (if listed in the config setting ``electricity: extendable_carriers``)
|
||||
- additional open- and combined-cycle gas turbines (if ``OCGT`` and/or ``CCGT`` is listed in the config setting ``electricity: extendable_carriers``)
|
||||
|
||||
.. each rule description should have a list of parameters
|
||||
.. from the config.yaml that affect this rule.
|
||||
|
11
doc/references.bib
Normal file
11
doc/references.bib
Normal file
@ -0,0 +1,11 @@
|
||||
@article{PyPSAEur,
|
||||
author = "Jonas Hoersch and Fabian Hofmann and David Schlachtberger and Tom Brown",
|
||||
title = "PyPSA-Eur: An open optimisation model of the European transmission system",
|
||||
journal = "Energy Strategy Reviews",
|
||||
volume = "22",
|
||||
pages = "207 - 215",
|
||||
year = "2018",
|
||||
issn = "2211-467X",
|
||||
doi = "10.1016/j.esr.2018.08.012",
|
||||
eprint = "1806.01613"
|
||||
}
|
@ -4,56 +4,27 @@
|
||||
Simplifying Networks
|
||||
##########################################
|
||||
|
||||
The additional rules prepare approximations of the full model, in which generation, storage and transmission capacities can be co-optimized
|
||||
- `simplify_network` transforms the transmission grid to a 380 kV-only equivalent network, while
|
||||
- `cluster_network` uses a kmeans based clustering technique to partition the network into a certain number of zones and then reduce the network to a representation with one bus per zone.
|
||||
The simplification ``snakemake`` rule prepare approximations of the full model, in which it is computationally viable to co-optimize generation, storage and transmission capacities.
|
||||
|
||||
- ``simplify_network`` transforms the transmission grid to a 380 kV only equivalent network, while
|
||||
- ``cluster_network`` uses a `k-means <https://en.wikipedia.org/wiki/K-means_clustering>`_ based clustering technique to partition the network into a given number of zones and then reduce the network to a representation with one bus per zone.
|
||||
|
||||
The simplification and clustering steps are described in detail in the paper
|
||||
[The role of spatial scale in joint optimisations of generation and transmission for European highly renewable scenarios](https://arxiv.org/abs/1705.07617), 2017, [arXiv:1705.07617](https://arxiv.org/abs/1705.07617), [doi:10.1109/EEM.2017.7982024](https://doi.org/10.1109/EEM.2017.7982024).
|
||||
|
||||
.. bibliography:: references.bib
|
||||
|
||||
Simplify Network
|
||||
================
|
||||
|
||||
The rule simplify_network does up to four things:
|
||||
|
||||
1. Create an equivalent transmission network in which all voltage levels are mapped to the 380 kV level by the function ``simplify_network(...)``.
|
||||
|
||||
2. DC only sub-networks that are connected at only two buses to the AC network are reduced to a single representative link by the function ``simplify_links(...)``. The components attached to buses in between are moved to the nearest endpoint. The grid connection cost of offshore wind generators are added to the captial costs of the generator.
|
||||
|
||||
3. Stub lines and links, i.e. dead-ends of the network, are sequentially removed from the network by the function ``remove_stubs(...)``. Components are moved along.
|
||||
|
||||
4. If a number was provided after the s (as in elec_s500_...), the network is clustered to this number of clusters with the routines from the cluster_network rule by the function cluster. This step is usually skipped.
|
||||
|
||||
.. automodule:: simplify_network
|
||||
|
||||
Cluster Network
|
||||
===============
|
||||
|
||||
The rule cluster_network instead clusters the network to a given number of buses.
|
||||
|
||||
-Why is this cluster function used?
|
||||
-Why the user can set a number behind the elec_sXXX for simplification?
|
||||
|
||||
As you found out for yourself, elec_s100_50.nc for example is a network in which simplify_network clusters the network to 100 buses and in a second step cluster_network reduces it down to 50 buses.
|
||||
|
||||
Well, let me provide a use-case where this makes sense:
|
||||
|
||||
In preliminary tests, it turns out, that the principal effect of changing spatial resolution is actually only partially due to the transmission network. It is more important to differentiate between wind generators with higher capacity factors from those with lower capacity factors, ie to have a higher spatial resolution in the renewable generation than in the number of buses.
|
||||
|
||||
This two-step clustering can take advantage of that fact (and allows to study it)
|
||||
by looking at networks like networks/elec_s100_50m.nc (note the additional m in the cluster wildcard). For this example simplify_network clusters to 100 buses and then cluster_network clusters to 50m buses, which means 50 buses for the network topology but only moving instead of aggregating the generators to the clustered buses. So in this network you still have up to 100 different wind generators, 2 at each bus on average.
|
||||
|
||||
In combination these two features allow you to study the spatial resolution of the transmission network separately from the spatial resolution of renewable generators. Beware: There is no clear evidence telling you what is a good representation of the full model. These options are under active study.
|
||||
|
||||
Why we have a cluster function inside of the simplification method?
|
||||
|
||||
Why are you asking three times the same question?
|
||||
|
||||
Is it possible to run the model without the simplification method / rule?
|
||||
I tryed to run the snakemake without the s for simplification.
|
||||
|
||||
No, the network clustering methods in PyPSA's networkclustering module don't work reliably with multiple voltage levels and transformers. If it is somehow necessary for you we could include switches to make Step 2 and 3 optional as well. But that's about it.
|
||||
|
||||
.. automodule:: cluster_network
|
||||
|
||||
Prepare Network
|
||||
===============
|
||||
|
||||
.. automodule:: prepare_network
|
||||
|
@ -2,18 +2,19 @@
|
||||
Solving Networks
|
||||
##########################################
|
||||
|
||||
After generating the network it can be solved by using 'solve_all_elec_networks'. This runs the following rules:
|
||||
- 'cluster_network'
|
||||
- 'prepare_network'
|
||||
- 'solve_all_elec_networks'
|
||||
- 'solve_network'
|
||||
|
||||
After generating all networks they can be solved through the rule ``solve_network`` by using the collection rule ``solve_all_elec_networks``.
|
||||
|
||||
Solve Network
|
||||
=============
|
||||
|
||||
.. automodule:: solve_network
|
||||
|
||||
Trace Solve Network
|
||||
===================
|
||||
|
||||
.. automodule:: trace_solve_network
|
||||
|
||||
Solve Operations Network
|
||||
========================
|
||||
|
||||
.. automodule:: solve_operations_network
|
||||
|
@ -45,3 +45,4 @@ dependencies:
|
||||
- git+https://github.com/FRESNA/powerplantmatching.git#egg=powerplantmatching
|
||||
- sphinx
|
||||
- sphinx_rtd_theme
|
||||
- sphinxcontrib-bibtex
|
@ -48,6 +48,7 @@ underwater_fraction (bus) - the fraction of the average connection distance
|
||||
which is under water
|
||||
|
||||
Long description:
|
||||
-----------------
|
||||
|
||||
First the script computes how much of the technology can be installed at each
|
||||
cutout grid cell and each node using the library `GLAES
|
||||
|
@ -1,6 +1,35 @@
|
||||
# coding: utf-8
|
||||
"""
|
||||
Create networks clustered to `cluster` number of zones with aggregated buses, generators and transmission corridors
|
||||
|
||||
Summary
|
||||
-------
|
||||
|
||||
The rule cluster_network instead clusters the network to a given number of buses.
|
||||
|
||||
-Why is this cluster function used?
|
||||
-Why the user can set a number behind the elec_sXXX for simplification?
|
||||
|
||||
As you found out for yourself, elec_s100_50.nc for example is a network in which simplify_network clusters the network to 100 buses and in a second step cluster_network reduces it down to 50 buses.
|
||||
|
||||
Well, let me provide a use-case where this makes sense:
|
||||
|
||||
In preliminary tests, it turns out, that the principal effect of changing spatial resolution is actually only partially due to the transmission network. It is more important to differentiate between wind generators with higher capacity factors from those with lower capacity factors, ie to have a higher spatial resolution in the renewable generation than in the number of buses.
|
||||
|
||||
This two-step clustering can take advantage of that fact (and allows to study it)
|
||||
by looking at networks like networks/elec_s100_50m.nc (note the additional m in the cluster wildcard). For this example simplify_network clusters to 100 buses and then cluster_network clusters to 50m buses, which means 50 buses for the network topology but only moving instead of aggregating the generators to the clustered buses. So in this network you still have up to 100 different wind generators, 2 at each bus on average.
|
||||
|
||||
In combination these two features allow you to study the spatial resolution of the transmission network separately from the spatial resolution of renewable generators. Beware: There is no clear evidence telling you what is a good representation of the full model. These options are under active study.
|
||||
|
||||
Why we have a cluster function inside of the simplification method?
|
||||
|
||||
Why are you asking three times the same question?
|
||||
|
||||
Is it possible to run the model without the simplification method / rule?
|
||||
I tryed to run the snakemake without the s for simplification.
|
||||
|
||||
No, the network clustering methods in PyPSA's networkclustering module don't work reliably with multiple voltage levels and transformers. If it is somehow necessary for you we could include switches to make Step 2 and 3 optional as well. But that's about it.
|
||||
|
||||
"""
|
||||
|
||||
import pandas as pd
|
||||
|
@ -2,6 +2,16 @@
|
||||
"""Bring electrical transmission network to a single 380kV voltage layer,
|
||||
remove network dead-ends, and reduce multi-hop linear HVDC connections to a
|
||||
single link
|
||||
|
||||
The rule simplify_network does up to four things:
|
||||
|
||||
1. Create an equivalent transmission network in which all voltage levels are mapped to the 380 kV level by the function ``simplify_network(...)``.
|
||||
|
||||
2. DC only sub-networks that are connected at only two buses to the AC network are reduced to a single representative link by the function ``simplify_links(...)``. The components attached to buses in between are moved to the nearest endpoint. The grid connection cost of offshore wind generators are added to the captial costs of the generator.
|
||||
|
||||
3. Stub lines and links, i.e. dead-ends of the network, are sequentially removed from the network by the function ``remove_stubs(...)``. Components are moved along.
|
||||
|
||||
4. If a number was provided after the s (as in elec_s500_...), the network is clustered to this number of clusters with the routines from the cluster_network rule by the function cluster. This step is usually skipped.
|
||||
"""
|
||||
|
||||
import pandas as pd
|
||||
|
Loading…
Reference in New Issue
Block a user