Replace _ with - in technology_data and prenetworks_brownfield
Preferred by kubernetes. Also updated the documentation accordingly.
This commit is contained in:
parent
9b2fa7c140
commit
d4368a966a
@ -313,7 +313,7 @@ if config["foresight"] == "myopic":
|
|||||||
costs=config['costs_dir'] + "costs_{}.csv".format(config['scenario']['planning_horizons'][0]),
|
costs=config['costs_dir'] + "costs_{}.csv".format(config['scenario']['planning_horizons'][0]),
|
||||||
cop_soil_total="resources/cop_soil_total_{network}_s{simpl}_{clusters}.nc",
|
cop_soil_total="resources/cop_soil_total_{network}_s{simpl}_{clusters}.nc",
|
||||||
cop_air_total="resources/cop_air_total_{network}_s{simpl}_{clusters}.nc"
|
cop_air_total="resources/cop_air_total_{network}_s{simpl}_{clusters}.nc"
|
||||||
output: config['results_dir'] + config['run'] + '/prenetworks_brownfield/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{co2_budget_name}_{planning_horizons}.nc'
|
output: config['results_dir'] + config['run'] + '/prenetworks-brownfield/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{co2_budget_name}_{planning_horizons}.nc'
|
||||||
wildcard_constraints:
|
wildcard_constraints:
|
||||||
planning_horizons=config['scenario']['planning_horizons'][0] #only applies to baseyear
|
planning_horizons=config['scenario']['planning_horizons'][0] #only applies to baseyear
|
||||||
threads: 1
|
threads: 1
|
||||||
@ -333,7 +333,7 @@ if config["foresight"] == "myopic":
|
|||||||
cop_soil_total="resources/cop_soil_total_{network}_s{simpl}_{clusters}.nc",
|
cop_soil_total="resources/cop_soil_total_{network}_s{simpl}_{clusters}.nc",
|
||||||
cop_air_total="resources/cop_air_total_{network}_s{simpl}_{clusters}.nc"
|
cop_air_total="resources/cop_air_total_{network}_s{simpl}_{clusters}.nc"
|
||||||
|
|
||||||
output: config['results_dir'] + config['run'] + "/prenetworks_brownfield/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{co2_budget_name}_{planning_horizons}.nc"
|
output: config['results_dir'] + config['run'] + "/prenetworks-brownfield/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{co2_budget_name}_{planning_horizons}.nc"
|
||||||
threads: 4
|
threads: 4
|
||||||
resources: mem_mb=2000
|
resources: mem_mb=2000
|
||||||
script: "scripts/add_brownfield.py"
|
script: "scripts/add_brownfield.py"
|
||||||
@ -342,7 +342,7 @@ if config["foresight"] == "myopic":
|
|||||||
|
|
||||||
rule solve_network_myopic:
|
rule solve_network_myopic:
|
||||||
input:
|
input:
|
||||||
network=config['results_dir'] + config['run'] + "/prenetworks_brownfield/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{co2_budget_name}_{planning_horizons}.nc",
|
network=config['results_dir'] + config['run'] + "/prenetworks-brownfield/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{co2_budget_name}_{planning_horizons}.nc",
|
||||||
costs=config['costs_dir'] + "costs_{planning_horizons}.csv",
|
costs=config['costs_dir'] + "costs_{planning_horizons}.csv",
|
||||||
config=config['summary_dir'] + '/' + config['run'] + '/configs/config.yaml'
|
config=config['summary_dir'] + '/' + config['run'] + '/configs/config.yaml'
|
||||||
output: config['results_dir'] + config['run'] + "/postnetworks/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{co2_budget_name}_{planning_horizons}.nc"
|
output: config['results_dir'] + config['run'] + "/postnetworks/{network}_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{co2_budget_name}_{planning_horizons}.nc"
|
||||||
|
@ -2,7 +2,7 @@ logging_level: INFO
|
|||||||
|
|
||||||
results_dir: 'results/'
|
results_dir: 'results/'
|
||||||
summary_dir: results
|
summary_dir: results
|
||||||
costs_dir: '../technology_data/outputs/'
|
costs_dir: '../technology-data/outputs/'
|
||||||
run: 'your-run-name' # use this to keep track of runs with different settings
|
run: 'your-run-name' # use this to keep track of runs with different settings
|
||||||
foresight: 'overnight' #options are overnight, myopic, perfect (perfect is not yet implemented)
|
foresight: 'overnight' #options are overnight, myopic, perfect (perfect is not yet implemented)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ logging_level: INFO
|
|||||||
|
|
||||||
results_dir: 'results/'
|
results_dir: 'results/'
|
||||||
summary_dir: results
|
summary_dir: results
|
||||||
costs_dir: '../technology_data/outputs/'
|
costs_dir: '../technology-data/outputs/'
|
||||||
run: 'your-run-name' # use this to keep track of runs with different settings
|
run: 'your-run-name' # use this to keep track of runs with different settings
|
||||||
foresight: 'myopic' #options are overnight, myopic, perfect (perfect is not yet implemented)
|
foresight: 'myopic' #options are overnight, myopic, perfect (perfect is not yet implemented)
|
||||||
|
|
||||||
|
@ -116,15 +116,17 @@ Documentation
|
|||||||
|
|
||||||
installation
|
installation
|
||||||
|
|
||||||
**Myopic transition path**
|
**Foresight options**
|
||||||
|
|
||||||
|
* :doc:`overnight`
|
||||||
* :doc:`myopic`
|
* :doc:`myopic`
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:hidden:
|
:hidden:
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
:caption: Myopic transition path
|
:caption: Foresight options
|
||||||
|
|
||||||
|
overnight
|
||||||
myopic
|
myopic
|
||||||
|
|
||||||
**References**
|
**References**
|
||||||
|
@ -7,8 +7,8 @@ Installation
|
|||||||
The subsequently described installation steps are demonstrated as shell commands, where the path before the ``%`` sign denotes the
|
The subsequently described installation steps are demonstrated as shell commands, where the path before the ``%`` sign denotes the
|
||||||
directory in which the commands following the ``%`` should be entered.
|
directory in which the commands following the ``%`` should be entered.
|
||||||
|
|
||||||
Install PyPSA-Eur
|
Install PyPSA-Eur and its data
|
||||||
=================
|
==============================
|
||||||
|
|
||||||
First install `PyPSA-Eur <https://github.com/PyPSA/pypsa-eur>`_ and all
|
First install `PyPSA-Eur <https://github.com/PyPSA/pypsa-eur>`_ and all
|
||||||
its dependencies. Clone the repository:
|
its dependencies. Clone the repository:
|
||||||
@ -21,6 +21,16 @@ its dependencies. Clone the repository:
|
|||||||
then download and unpack all the PyPSA-Eur data files.
|
then download and unpack all the PyPSA-Eur data files.
|
||||||
|
|
||||||
|
|
||||||
|
Clone technology-data repository
|
||||||
|
================================
|
||||||
|
|
||||||
|
Create a parallel directory for the technology costs and other assumptions:
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
projects % git clone git@github.com:PyPSA/technology-data.git
|
||||||
|
|
||||||
|
|
||||||
Clone PyPSA-Eur-Sec repository
|
Clone PyPSA-Eur-Sec repository
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
@ -61,7 +71,10 @@ To download and extract it on the command line:
|
|||||||
Set up the default configuration
|
Set up the default configuration
|
||||||
================================
|
================================
|
||||||
|
|
||||||
First make your own copy of the ``config.yaml``:
|
First make your own copy of the ``config.yaml``. For overnight
|
||||||
|
scenarios, use ``config.default.yaml``. For a pathway optimization
|
||||||
|
with myopic foresight (which is still experimental), use
|
||||||
|
``config.myopic.yaml``. For example:
|
||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
@ -81,7 +94,7 @@ To run the full optimization with your settings:
|
|||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
projects/pypsa-eur-sec % snakemake
|
projects/pypsa-eur-sec % snakemake -j1
|
||||||
|
|
||||||
Warning: you may need a computer cluster for this (with e.g. 10-100 GB of RAM
|
Warning: you may need a computer cluster for this (with e.g. 10-100 GB of RAM
|
||||||
and several processors).
|
and several processors).
|
||||||
@ -90,4 +103,4 @@ To only prepare the networks, you can run the scripts up to the point before opt
|
|||||||
|
|
||||||
.. code:: bash
|
.. code:: bash
|
||||||
|
|
||||||
projects/pypsa-eur-sec % snakemake prepare_sector_networks
|
projects/pypsa-eur-sec % snakemake -j1 prepare_sector_networks
|
||||||
|
@ -17,13 +17,11 @@ The transport sector and industry are not affected by the myopic code. In essenc
|
|||||||
Configuration
|
Configuration
|
||||||
=================
|
=================
|
||||||
|
|
||||||
PyPSA-Eur-Sec has several configuration options which are collected in a config.yaml file located in the root directory. Users should copy the provided default configuration (`config.default.yaml <https://github.com/martavp/pypsa-eur-sec/blob/master/config.default.yaml>`__) and amend their own modifications and assumptions in the user-specific configuration file (config.yaml).
|
PyPSA-Eur-Sec has several configuration options which are collected in a config.yaml file located in the root directory. For myopic optimization, users should copy the provided myopic configuration ``config.myopic.yaml`` and make their own modifications and assumptions in the user-specific configuration file (``config.yaml``).
|
||||||
|
|
||||||
The following options included in the config.yaml file are relevant for the myopic code.
|
The following options included in the config.yaml file are relevant for the myopic code.
|
||||||
|
|
||||||
To activate the myopic option select
|
To activate the myopic option select ``foresight: 'myopic'`` in ``config.yaml``.
|
||||||
|
|
||||||
foresight: 'myopic'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -76,19 +74,19 @@ General myopic code structure
|
|||||||
|
|
||||||
The myopic code solves the network for the time steps included in planning_horizons in a recursive loop, so that:
|
The myopic code solves the network for the time steps included in planning_horizons in a recursive loop, so that:
|
||||||
|
|
||||||
1.The existing capacities (those installed before the base year are added as fixed capacities with p_nom=value, p_nom_extendable=False). E.g. for baseyear=2020, capacities installed before 2020 are added. In addition, the network comprises additional generator, storage, and link capacities with p_nom_extendable=True. The non-solved network is saved in ‘results/run_name/networks/prenetworks_bronwfield’.
|
1.The existing capacities (those installed before the base year are added as fixed capacities with p_nom=value, p_nom_extendable=False). E.g. for baseyear=2020, capacities installed before 2020 are added. In addition, the network comprises additional generator, storage, and link capacities with p_nom_extendable=True. The non-solved network is saved in ``results/run_name/networks/prenetworks-brownfield``.
|
||||||
|
|
||||||
The base year is the first element in planning_horizons. Step 1 is implemented with the rule add_baseyear for the base year and with the rule add_brownfield for the remaining planning_horizons.
|
The base year is the first element in planning_horizons. Step 1 is implemented with the rule add_baseyear for the base year and with the rule add_brownfield for the remaining planning_horizons.
|
||||||
|
|
||||||
2.The 2020 network is optimized. The solved network is saved in ‘results/run_name/networks/postnetworks’
|
2.The 2020 network is optimized. The solved network is saved in ‘results/run_name/networks/postnetworks’
|
||||||
|
|
||||||
3.For the next planning horizon, e.g. 2030, the capacities from a previous time step are added if they are still in operation (i.e., if they fulfil planning horizon <= commissioned year + lifetime). In addition, the network comprises additional generator, storage, and link capacities with p_nom_extendable=True. The non-solved network is saved in ‘results/run_name/networks/prenetworks_bronwfield’.
|
3.For the next planning horizon, e.g. 2030, the capacities from a previous time step are added if they are still in operation (i.e., if they fulfil planning horizon <= commissioned year + lifetime). In addition, the network comprises additional generator, storage, and link capacities with p_nom_extendable=True. The non-solved network is saved in ``results/run_name/networks/prenetworks-brownfield``.
|
||||||
|
|
||||||
Steps 2 and 3 are solved recursively for all the planning_horizons included in the configuration file.
|
Steps 2 and 3 are solved recursively for all the planning_horizons included in the configuration file.
|
||||||
|
|
||||||
|
|
||||||
rule add_existing baseyear
|
rule add_existing baseyear
|
||||||
=======================
|
==========================
|
||||||
|
|
||||||
The rule add_existing_baseyear loads the network in ‘results/run_name/networks/prenetworks’ and performs the following operations:
|
The rule add_existing_baseyear loads the network in ‘results/run_name/networks/prenetworks’ and performs the following operations:
|
||||||
|
|
||||||
@ -105,14 +103,13 @@ Existing heating capacities are retrieved from the report `Mapping and analyses
|
|||||||
|
|
||||||
The heating capacities are assumed to have a lifetime indicated by the parameter lifetime in the configuration file, e.g 25 years. They are assumed to be decommissioned linearly starting on the base year, e.g., from 2020 to 2045.
|
The heating capacities are assumed to have a lifetime indicated by the parameter lifetime in the configuration file, e.g 25 years. They are assumed to be decommissioned linearly starting on the base year, e.g., from 2020 to 2045.
|
||||||
|
|
||||||
Then, the resulting network is saved in ‘results/run_name/networks/prenetworks_brownfield’
|
Then, the resulting network is saved in ``results/run_name/networks/prenetworks-brownfield``.
|
||||||
|
|
||||||
rule add_brownfield
|
rule add_brownfield
|
||||||
================
|
===================
|
||||||
|
|
||||||
The rule add_brownfield loads the network in ‘results/run_name/networks/prenetworks’ and performs the following operation:
|
The rule add_brownfield loads the network in ‘results/run_name/networks/prenetworks’ and performs the following operation:
|
||||||
|
|
||||||
1.Read the capacities optimized in the previous time step and add them to the network if they are still in operation (i.e., if they fulfil planning horizon < commissioned year + lifetime)
|
1.Read the capacities optimized in the previous time step and add them to the network if they are still in operation (i.e., if they fulfil planning horizon < commissioned year + lifetime)
|
||||||
|
|
||||||
Then, the resulting network is saved in ‘results/run_name/networks/prenetworks_brownfield.’
|
Then, the resulting network is saved in ``results/run_name/networks/prenetworks_brownfield``.
|
||||||
|
|
||||||
|
9
doc/overnight.rst
Normal file
9
doc/overnight.rst
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
.. _overnight:
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
Overnight (greenfield) scenarios
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
The default is to calculate a rebuilding of the energy system to meet demand, a so-called overnight or greenfield approach.
|
||||||
|
|
||||||
|
For this, use ``foresight : 'overnight'`` in ``config.yaml``, like the example in ``config.default.yaml``.
|
Loading…
Reference in New Issue
Block a user