reflect filename changes in documentation

This commit is contained in:
Fabian Neumann 2020-10-18 14:47:46 +02:00
parent cb2b78ad97
commit ca0ad08438
15 changed files with 36 additions and 36 deletions

View File

@ -31,6 +31,6 @@ before_install:
script: script:
- cp ./test/config.test1.yaml ./config.yaml - cp ./test/config.test1.yaml ./config.yaml
- snakemake -j all solve_all_elec_networks - snakemake -j all solve_all_networks
- rm -rf resources/*.nc resources/*.geojson resources/*.h5 networks results - rm -rf resources/*.nc resources/*.geojson resources/*.h5 networks results
# could repeat for more configurations in future # could repeat for more configurations in future

View File

@ -60,7 +60,7 @@ Now a window with the machine details will open. You have to configure the follo
You can edit your machine configuration later. So use a cheap machine type configuration to transfer data and You can edit your machine configuration later. So use a cheap machine type configuration to transfer data and
only when everything is ready and tested, your expensive machine type, for instance a custom 8 vCPU with 160 GB memory. only when everything is ready and tested, your expensive machine type, for instance a custom 8 vCPU with 160 GB memory.
Solvers do not parallelise well, so we recommend not to choose more than 8 vCPU. Solvers do not parallelise well, so we recommend not to choose more than 8 vCPU.
Check ``snakemake -j -n 1 solve_all_elec_networks`` as a dry run to see how much memory is required. Check ``snakemake -j -n 1 solve_all_networks`` as a dry run to see how much memory is required.
The memory requirements will vary depending on the spatial and temporal resoulution of your optimisation. The memory requirements will vary depending on the spatial and temporal resoulution of your optimisation.
Example: for an hourly, 181 node full European network, set 8 vCPU and 150 GB memory since the dry-run calculated a 135 GB memory requirement.) Example: for an hourly, 181 node full European network, set 8 vCPU and 150 GB memory since the dry-run calculated a 135 GB memory requirement.)
- Boot disk: As default, your VM is created with 10 GB. Depending on how much you want to handle on one VM you should increase the disk size. - Boot disk: As default, your VM is created with 10 GB. Depending on how much you want to handle on one VM you should increase the disk size.

View File

@ -40,9 +40,9 @@ facilitate running multiple scenarios through a single command
.. code:: bash .. code:: bash
snakemake -j 1 solve_all_elec_networks snakemake -j 1 solve_all_networks
For each wildcard, a **list of values** is provided. The rule ``solve_all_elec_networks`` will trigger the rules for creating ``results/networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc`` for **all combinations** of the provided wildcard values as defined by Python's `itertools.product(...) <https://docs.python.org/2/library/itertools.html#itertools.product>`_ function that snakemake's `expand(...) function <https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#targets>`_ uses. For each wildcard, a **list of values** is provided. The rule ``solve_all_networks`` will trigger the rules for creating ``results/networks/elec{year}_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc`` for **all combinations** of the provided wildcard values as defined by Python's `itertools.product(...) <https://docs.python.org/2/library/itertools.html#itertools.product>`_ function that snakemake's `expand(...) function <https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#targets>`_ uses.
An exemplary dependency graph (starting from the simplification rules) then looks like this: An exemplary dependency graph (starting from the simplification rules) then looks like this:

View File

@ -124,7 +124,7 @@ Release Process
* Upload code to `zenodo code repository <https://doi.org/10.5281/zenodo.3520875>`_ with `GNU GPL 3.0 <https://www.gnu.org/licenses/gpl-3.0.en.html>`_ license. * Upload code to `zenodo code repository <https://doi.org/10.5281/zenodo.3520875>`_ with `GNU GPL 3.0 <https://www.gnu.org/licenses/gpl-3.0.en.html>`_ license.
* Create pre-built networks for ``config.default.yaml`` by running ``snakemake -j 1 extra_components_all_elec_networks``. * Create pre-built networks for ``config.default.yaml`` by running ``snakemake -j 1 extra_components_all_networks``.
* Upload pre-built networks to `zenodo data repository <https://doi.org/10.5281/zenodo.3601882>`_ with `CC BY 4.0 <https://creativecommons.org/licenses/by/4.0/>`_ license. * Upload pre-built networks to `zenodo data repository <https://doi.org/10.5281/zenodo.3601882>`_ with `CC BY 4.0 <https://creativecommons.org/licenses/by/4.0/>`_ license.

View File

@ -7,7 +7,7 @@
Solving Networks Solving Networks
########################################## ##########################################
After generating and simplifying the networks they can be solved through the rule :mod:`solve_network` by using the collection rule :mod:`solve_all_elec_networks`. Moreover, networks can be solved for another focus with the derivative rules :mod:`solve_network` by using the collection rule :mod:`solve_operations_network` for dispatch-only analyses on an already solved network. After generating and simplifying the networks they can be solved through the rule :mod:`solve_network` by using the collection rule :mod:`solve_all_networks`. Moreover, networks can be solved for another focus with the derivative rules :mod:`solve_network` by using the collection rule :mod:`solve_operations_network` for dispatch-only analyses on an already solved network.
.. toctree:: .. toctree::
:caption: Overview :caption: Overview

View File

@ -119,8 +119,8 @@ orders ``snakemake`` to run the script ``solve_network`` that produces the solve
.. code:: .. code::
rule solve_network: rule solve_network:
input: "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc" input: "networks/elec{year}_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc"
output: "results/networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc" output: "results/networks/elec{year}_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc"
[...] [...]
script: "scripts/solve_network.py" script: "scripts/solve_network.py"
@ -129,7 +129,7 @@ orders ``snakemake`` to run the script ``solve_network`` that produces the solve
.. warning:: .. warning::
On Windows the previous command may currently cause a ``MissingRuleException`` due to problems with output files in subfolders. On Windows the previous command may currently cause a ``MissingRuleException`` due to problems with output files in subfolders.
This is an `open issue <https://github.com/snakemake/snakemake/issues/46>`_ at `snakemake <https://snakemake.readthedocs.io/>`_. This is an `open issue <https://github.com/snakemake/snakemake/issues/46>`_ at `snakemake <https://snakemake.readthedocs.io/>`_.
Windows users should add the option ``--keep-target-files`` to the command or instead run ``snakemake -j 1 solve_all_elec_networks``. Windows users should add the option ``--keep-target-files`` to the command or instead run ``snakemake -j 1 solve_all_networks``.
This triggers a workflow of multiple preceding jobs that depend on each rule's inputs and outputs: This triggers a workflow of multiple preceding jobs that depend on each rule's inputs and outputs:

View File

@ -524,8 +524,8 @@ if __name__ == "__main__":
n = pypsa.Network(snakemake.input.base_network) n = pypsa.Network(snakemake.input.base_network)
year = int(snakemake.wildcards.year) year = snakemake.wildcards.year
snapshots = dict(start=str(year), end=str(year+1), closed="left") if year else snakememake.config['snapshots'] snapshots = dict(start=year, end=str(int(year)+1), closed="left") if year else snakememake.config['snapshots']
n.set_snapshots(pd.date_range(freq='h', **snapshots)) n.set_snapshots(pd.date_range(freq='h', **snapshots))
n.snapshot_weightings[:] *= 8760. / n.snapshot_weightings.sum() n.snapshot_weightings[:] *= 8760. / n.snapshot_weightings.sum()
Nyears = n.snapshot_weightings.sum() / 8760. Nyears = n.snapshot_weightings.sum() / 8760.

View File

@ -37,13 +37,13 @@ Inputs
Outputs Outputs
------- -------
- ``networks/elec_s{simpl}_{clusters}_ec.nc``: - ``networks/elec{year}_s{simpl}_{clusters}_ec.nc``:
Description Description
----------- -----------
The rule :mod:`add_extra_components` attaches additional extendable components to the clustered and simplified network. These can be configured in the ``config.yaml`` at ``electricity: extendable_carriers: ``. It processes ``networks/elec_s{simpl}_{clusters}.nc`` to build ``networks/elec_s{simpl}_{clusters}_ec.nc``, which in contrast to the former (depending on the configuration) contain with **zero** initial capacity The rule :mod:`add_extra_components` attaches additional extendable components to the clustered and simplified network. These can be configured in the ``config.yaml`` at ``electricity: extendable_carriers: ``. It processes ``networks/elec{year}_s{simpl}_{clusters}.nc`` to build ``networks/elec{year}_s{simpl}_{clusters}_ec.nc``, which in contrast to the former (depending on the configuration) contain with **zero** initial capacity
- ``StorageUnits`` of carrier 'H2' and/or 'battery'. If this option is chosen, every bus is given an extendable ``StorageUnit`` of the corresponding carrier. The energy and power capacities are linked through a parameter that specifies the energy capacity as maximum hours at full dispatch power and is configured in ``electricity: max_hours:``. This linkage leads to one investment variable per storage unit. The default ``max_hours`` lead to long-term hydrogen and short-term battery storage units. - ``StorageUnits`` of carrier 'H2' and/or 'battery'. If this option is chosen, every bus is given an extendable ``StorageUnit`` of the corresponding carrier. The energy and power capacities are linked through a parameter that specifies the energy capacity as maximum hours at full dispatch power and is configured in ``electricity: max_hours:``. This linkage leads to one investment variable per storage unit. The default ``max_hours`` lead to long-term hydrogen and short-term battery storage units.

View File

@ -165,8 +165,8 @@ if __name__ == '__main__':
config = snakemake.config['renewable'][snakemake.wildcards.technology] config = snakemake.config['renewable'][snakemake.wildcards.technology]
year = int(snakemake.wildcards.year) year = snakemake.wildcards.year
snapshots = dict(start=str(year), end=str(year+1), closed="left") if year else snakememake.config['snapshots'] snapshots = dict(start=year, end=str(int(year)+1), closed="left") if year else snakememake.config['snapshots']
time = pd.date_range(freq='m', **snapshots) time = pd.date_range(freq='m', **snapshots)
params = dict(years=slice(*time.year[[0, -1]]), months=slice(*time.month[[0, -1]])) params = dict(years=slice(*time.year[[0, -1]]), months=slice(*time.month[[0, -1]]))

View File

@ -284,8 +284,8 @@ if __name__ == '__main__':
config = snakemake.config['renewable'][snakemake.wildcards.technology] config = snakemake.config['renewable'][snakemake.wildcards.technology]
year = int(snakemake.wildcards.year) year = snakemake.wildcards.year
snapshots = dict(start=str(year), end=str(year+1), closed="left") if year else snakememake.config['snapshots'] snapshots = dict(start=year, end=str(int(year)+1), closed="left") if year else snakememake.config['snapshots']
time = pd.date_range(freq='m', **snapshots) time = pd.date_range(freq='m', **snapshots)
params = dict(years=slice(*time.year[[0, -1]]), months=slice(*time.month[[0, -1]])) params = dict(years=slice(*time.year[[0, -1]]), months=slice(*time.month[[0, -1]]))

View File

@ -31,26 +31,26 @@ Relevant Settings
Inputs Inputs
------ ------
- ``resources/regions_onshore_elec_s{simpl}.geojson``: confer :ref:`simplify` - ``resources/regions_onshore_elec{year}_s{simpl}.geojson``: confer :ref:`simplify`
- ``resources/regions_offshore_elec_s{simpl}.geojson``: confer :ref:`simplify` - ``resources/regions_offshore_elec{year}_s{simpl}.geojson``: confer :ref:`simplify`
- ``resources/clustermaps_elec_s{simpl}.h5``: confer :ref:`simplify` - ``resources/clustermaps_elec{year}_s{simpl}.h5``: confer :ref:`simplify`
- ``networks/elec_s{simpl}.nc``: confer :ref:`simplify` - ``networks/elec{year}_s{simpl}.nc``: confer :ref:`simplify`
Outputs Outputs
------- -------
- ``resources/regions_onshore_elec_s{simpl}_{clusters}.geojson``: - ``resources/regions_onshore_elec{year}_s{simpl}_{clusters}.geojson``:
.. image:: ../img/regions_onshore_elec_s_X.png .. image:: ../img/regions_onshore_elec_s_X.png
:scale: 33 % :scale: 33 %
- ``resources/regions_offshore_elec_s{simpl}_{clusters}.geojson``: - ``resources/regions_offshore_elec{year}_s{simpl}_{clusters}.geojson``:
.. image:: ../img/regions_offshore_elec_s_X.png .. image:: ../img/regions_offshore_elec_s_X.png
:scale: 33 % :scale: 33 %
- ``resources/clustermaps_elec_s{simpl}_{clusters}.h5``: Mapping of buses and lines from ``networks/elec_s{simpl}.nc`` to ``networks/elec_s{simpl}_{clusters}.nc``; has keys ['/busmap', '/busmap_s', '/linemap', '/linemap_negative', '/linemap_positive'] - ``resources/clustermaps_elec{year}_s{simpl}_{clusters}.h5``: Mapping of buses and lines from ``networks/elec{year}_s{simpl}.nc`` to ``networks/elec{year}_s{simpl}_{clusters}.nc``; has keys ['/busmap', '/busmap_s', '/linemap', '/linemap_negative', '/linemap_positive']
- ``networks/elec_s{simpl}_{clusters}.nc``: - ``networks/elec{year}_s{simpl}_{clusters}.nc``:
.. image:: ../img/elec_s_X.png .. image:: ../img/elec_s_X.png
:scale: 40 % :scale: 40 %

View File

@ -37,12 +37,12 @@ Inputs
------ ------
- ``data/costs.csv``: The database of cost assumptions for all included technologies for specific years from various sources; e.g. discount rate, lifetime, investment (CAPEX), fixed operation and maintenance (FOM), variable operation and maintenance (VOM), fuel costs, efficiency, carbon-dioxide intensity. - ``data/costs.csv``: The database of cost assumptions for all included technologies for specific years from various sources; e.g. discount rate, lifetime, investment (CAPEX), fixed operation and maintenance (FOM), variable operation and maintenance (VOM), fuel costs, efficiency, carbon-dioxide intensity.
- ``networks/elec_s{simpl}_{clusters}.nc``: confer :ref:`cluster` - ``networks/elec{year}_s{simpl}_{clusters}.nc``: confer :ref:`cluster`
Outputs Outputs
------- -------
- ``networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc``: Complete PyPSA network that will be handed to the ``solve_network`` rule. - ``networks/elec{year}_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc``: Complete PyPSA network that will be handed to the ``solve_network`` rule.
Description Description
----------- -----------

View File

@ -52,18 +52,18 @@ Inputs
Outputs Outputs
------- -------
- ``resources/regions_onshore_elec_s{simpl}.geojson``: - ``resources/regions_onshore_elec{year}_s{simpl}.geojson``:
.. image:: ../img/regions_onshore_elec_s.png .. image:: ../img/regions_onshore_elec_s.png
:scale: 33 % :scale: 33 %
- ``resources/regions_offshore_elec_s{simpl}.geojson``: - ``resources/regions_offshore_elec{year}_s{simpl}.geojson``:
.. image:: ../img/regions_offshore_elec_s .png .. image:: ../img/regions_offshore_elec_s .png
:scale: 33 % :scale: 33 %
- ``resources/clustermaps_elec_s{simpl}.h5``: Mapping of buses from ``networks/elec.nc`` to ``networks/elec_s{simpl}.nc``; has keys ['/busmap_s'] - ``resources/clustermaps_elec{year}_s{simpl}.h5``: Mapping of buses from ``networks/elec.nc`` to ``networks/elec{year}_s{simpl}.nc``; has keys ['/busmap_s']
- ``networks/elec_s{simpl}.nc``: - ``networks/elec{year}_s{simpl}.nc``:
.. image:: ../img/elec_s.png .. image:: ../img/elec_s.png
:scale: 33 % :scale: 33 %

View File

@ -40,12 +40,12 @@ Relevant Settings
Inputs Inputs
------ ------
- ``networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc``: confer :ref:`prepare` - ``networks/elec{year}_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc``: confer :ref:`prepare`
Outputs Outputs
------- -------
- ``results/networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc``: Solved PyPSA network including optimisation results - ``results/networks/elec{year}_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc``: Solved PyPSA network including optimisation results
.. image:: ../img/results.png .. image:: ../img/results.png
:scale: 40 % :scale: 40 %

View File

@ -32,13 +32,13 @@ Relevant Settings
Inputs Inputs
------ ------
- ``networks/elec_s{simpl}_{clusters}.nc``: confer :ref:`cluster` - ``networks/elec{year}_s{simpl}_{clusters}.nc``: confer :ref:`cluster`
- ``results/networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc``: confer :ref:`solve` - ``results/networks/elec{year}_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc``: confer :ref:`solve`
Outputs Outputs
------- -------
- ``results/networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}_op.nc``: Solved PyPSA network for optimal dispatch including optimisation results - ``results/networks/elec{year}_s{simpl}_{clusters}_ec_l{ll}_{opts}_op.nc``: Solved PyPSA network for optimal dispatch including optimisation results
Description Description
----------- -----------