From e523cb4cb542fc6c7eada1069f58dc245ca6239c Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Tue, 26 Jul 2022 15:01:21 +0200 Subject: [PATCH] doc: minor updates --- config.default.yaml | 4 ++-- config.tutorial.yaml | 2 +- doc/configtables/electricity.csv | 26 ++++++++++++++++++-------- doc/configtables/offwind-ac.csv | 1 - doc/configtables/offwind-dc.csv | 1 - doc/configtables/onwind.csv | 1 - doc/configtables/solar.csv | 1 - doc/configuration.rst | 22 +++++++++++++++++++--- doc/costs.rst | 9 +++++---- doc/installation.rst | 1 + doc/tutorial.rst | 6 ++---- envs/environment.yaml | 1 - test/config.test1.yaml | 2 +- 13 files changed, 49 insertions(+), 28 deletions(-) diff --git a/config.default.yaml b/config.default.yaml index 61621153..1d31beaa 100755 --- a/config.default.yaml +++ b/config.default.yaml @@ -64,7 +64,7 @@ electricity: renewable_carriers: [solar, onwind, offwind-ac, offwind-dc, hydro] estimate_renewable_capacities: - enable: true + enable: false # Add capacities from OPSD data from_opsd: true # Renewable capacities are based on existing capacities reported by IRENA @@ -218,7 +218,7 @@ load: costs: year: 2030 - version: v0.1.0 + version: v0.4.0 rooftop_share: 0.14 # based on the potentials, assuming (0.1 kW/m2 and 10 m2/person) fill_values: FOM: 0 diff --git a/config.tutorial.yaml b/config.tutorial.yaml index 223486b7..751b361d 100755 --- a/config.tutorial.yaml +++ b/config.tutorial.yaml @@ -155,7 +155,7 @@ load: costs: year: 2030 - version: v0.1.0 + version: v0.4.0 rooftop_share: 0.14 fill_values: FOM: 0 diff --git a/doc/configtables/electricity.csv b/doc/configtables/electricity.csv index 5abae842..eb9a2379 100644 --- a/doc/configtables/electricity.csv +++ b/doc/configtables/electricity.csv @@ -1,19 +1,29 @@ ,Unit,Values,Description -voltages,kV,"Any subset of {220., 300., 380.}",Voltage levels to consider when +voltages,kV,"Any subset of {220., 300., 380.}",Voltage levels to consider +gaslimit,MWhth,"float or false",Global gas usage limit co2limit,:math:`t_{CO_2-eq}/a`,float,Cap on total annual system carbon dioxide emissions co2base,:math:`t_{CO_2-eq}/a`,float,Reference value of total annual system carbon dioxide emissions if relative emission reduction target is specified in ``{opts}`` wildcard. agg_p_nom_limits,file,path,Reference to ``.csv`` file specifying per carrier generator nominal capacity constraints for individual countries if ``'CCL'`` is in ``{opts}`` wildcard. Defaults to ``data/agg_p_nom_minmax.csv``. -extendable_carriers,,, --- Generator,--,"Any extendable carrier",Defines existing or non-existing conventional and renewable power plants to be extendable during the optimization. Conventional generators can only be built/expanded where already existent today. If a listed conventional carrier is not included in the ``conventional_carriers`` list, the lower limit of the capacity expansion is set to 0. --- StorageUnit,--,"Any subset of {'battery','H2'}",Adds extendable storage units (battery and/or hydrogen) at every node/bus after clustering without capacity limits and with zero initial capacity. --- Store,--,"Any subset of {'battery','H2'}",Adds extendable storage units (battery and/or hydrogen) at every node/bus after clustering without capacity limits and with zero initial capacity. --- Link,--,Any subset of {'H2 pipeline'},Adds extendable links (H2 pipelines only) at every connection where there are lines or HVDC links without capacity limits and with zero initial capacity. Hydrogen pipelines require hydrogen storage to be modelled as ``Store``. +operational_reserve,,,"Settings for reserve requirements following like `GenX `_" +-- activate,bool,"true or false","Whether to take operational reserve requirements into account during optimisation" +-- epsilon_load,--,float,share of total load +-- epsilon_vres,--,float,share of total renewable supply +-- contingency,MW,float,fixed reserve capacity max_hours,,, -- battery,h,float,Maximum state of charge capacity of the battery in terms of hours at full output capacity ``p_nom``. Cf. `PyPSA documentation `_. -- H2,h,float,Maximum state of charge capacity of the hydrogen storage in terms of hours at full output capacity ``p_nom``. Cf. `PyPSA documentation `_. +extendable_carriers,,, +-- Generator,--,"Any extendable carrier","Defines existing or non-existing conventional and renewable power plants to be extendable during the optimization. Conventional generators can only be built/expanded where already existent today. If a listed conventional carrier is not included in the ``conventional_carriers`` list, the lower limit of the capacity expansion is set to 0." +-- StorageUnit,--,"Any subset of {'battery','H2'}",Adds extendable storage units (battery and/or hydrogen) at every node/bus after clustering without capacity limits and with zero initial capacity. +-- Store,--,"Any subset of {'battery','H2'}",Adds extendable storage units (battery and/or hydrogen) at every node/bus after clustering without capacity limits and with zero initial capacity. +-- Link,--,Any subset of {'H2 pipeline'},Adds extendable links (H2 pipelines only) at every connection where there are lines or HVDC links without capacity limits and with zero initial capacity. Hydrogen pipelines require hydrogen storage to be modelled as ``Store``. powerplants_filter,--,"use `pandas.query `_ strings here, e.g. Country not in ['Germany']",Filter query for the default powerplant database. custom_powerplants,--,"use `pandas.query `_ strings here, e.g. Country in ['Germany']",Filter query for the custom powerplant database. -conventional_carriers,--,"Any subset of {nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass}",List of conventional power plants to include in the model from ``resources/powerplants.csv``. If an included carrier is also listed in `extendable_carriers`, the capacity is taken as a lower bound. +conventional_carriers,--,"Any subset of {nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass}","List of conventional power plants to include in the model from ``resources/powerplants.csv``. If an included carrier is also listed in `extendable_carriers`, the capacity is taken as a lower bound." renewable_carriers,--,"Any subset of {solar, onwind, offwind-ac, offwind-dc, hydro}",List of renewable generators to include in the model. estimate_renewable_capacities,,, -"-- Fueltype [ppm], e.g. Wind",,"list of fueltypes strings in PyPSA-Eur, e.g. [onwind, offwind-ac, offwind-dc]",converts ppm Fueltype to PyPSA-EUR Fueltype +-- enable,,bool,"Activate routine to estimate renewable capacities" +-- from_opsd,--,bool,"Add capacities from OPSD data" +-- year,--,bool,"Renewable capacities are based on existing capacities reported by IRENA for the specified year" +-- expansion_limit,--,float or false,"Artificially limit maximum capacities to factor * (IRENA capacities), i.e. 110% of 's capacities => expansion_limit: 1.1 false: Use estimated renewable potentials determine by the workflow" +-- technology_mapping,,,"Mapping between powerplantmatching and PyPSA-Eur technology names" \ No newline at end of file diff --git a/doc/configtables/offwind-ac.csv b/doc/configtables/offwind-ac.csv index e5bbc847..def73e4c 100644 --- a/doc/configtables/offwind-ac.csv +++ b/doc/configtables/offwind-ac.csv @@ -10,4 +10,3 @@ max_depth,m,float,"Maximum sea water depth at which wind turbines can be build. min_shore_distance,m,float,"Minimum distance to the shore below which wind turbines cannot be build. Such areas close to the shore are excluded in the process of calculating the AC-connected offshore wind potential." potential,--,"One of {'simple', 'conservative'}","Method to compute the maximal installable potential for a node; confer :ref:`renewableprofiles`" clip_p_max_pu,p.u.,float,"To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero." -keep_all_available_areas,bool,"{'true', 'false'}","Use all availabe weather cells for renewable profile and potential generation. The default ignores weather cells where only less than 1 MW can be installed." diff --git a/doc/configtables/offwind-dc.csv b/doc/configtables/offwind-dc.csv index 06b82ba0..17edafca 100644 --- a/doc/configtables/offwind-dc.csv +++ b/doc/configtables/offwind-dc.csv @@ -10,4 +10,3 @@ max_depth,m,float,"Maximum sea water depth at which wind turbines can be build. min_shore_distance,m,float,"Minimum distance to the shore below which wind turbines cannot be build. Such areas close to the shore are excluded in the process of calculating the AC-connected offshore wind potential." potential,--,"One of {'simple', 'conservative'}","Method to compute the maximal installable potential for a node; confer :ref:`renewableprofiles`" clip_p_max_pu,p.u.,float,"To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero." -keep_all_available_areas,bool,"{'true', 'false'}","Use all availabe weather cells for renewable profile and potential generation. The default ignores weather cells where only less than 1 MW can be installed." diff --git a/doc/configtables/onwind.csv b/doc/configtables/onwind.csv index 31884183..c5f9da20 100644 --- a/doc/configtables/onwind.csv +++ b/doc/configtables/onwind.csv @@ -11,4 +11,3 @@ corine,,, natura,bool,"{true, false}","Switch to exclude `Natura 2000 `_ natural protection areas. Area is excluded if ``true``." potential,--,"One of {'simple', 'conservative'}","Method to compute the maximal installable potential for a node; confer :ref:`renewableprofiles`" clip_p_max_pu,p.u.,float,"To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero." -keep_all_available_areas,bool,"{'true', 'false'}","Use all availabe weather cells for renewable profile and potential generation. The default ignores weather cells where only less than 1 MW can be installed." diff --git a/doc/configtables/solar.csv b/doc/configtables/solar.csv index 7be39c04..9aa24268 100644 --- a/doc/configtables/solar.csv +++ b/doc/configtables/solar.csv @@ -12,4 +12,3 @@ corine,--,"Any subset of the `CORINE Land Cover code list `_ natural protection areas. Area is excluded if ``true``." potential,--,"One of {'simple', 'conservative'}","Method to compute the maximal installable potential for a node; confer :ref:`renewableprofiles`" clip_p_max_pu,p.u.,float,"To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero." -keep_all_available_areas,bool,"{'true', 'false'}","Use all availabe weather cells for renewable profile and potential generation. The default ignores weather cells where only less than 1 MW can be installed." diff --git a/doc/configuration.rst b/doc/configuration.rst index f7e07c2b..a982fd09 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -241,8 +241,7 @@ Define additional generator attribute for conventional carrier types. If a scala .. literalinclude:: ../config.default.yaml :language: yaml - :start-at: load: - :end-before: costs: + :lines: 212-217 .. csv-table:: :header-rows: 1 @@ -257,7 +256,7 @@ Define additional generator attribute for conventional carrier types. If a scala .. literalinclude:: ../config.default.yaml :language: yaml :start-after: scaling_factor: - :end-before: solving: + :end-before: clustering: .. csv-table:: :header-rows: 1 @@ -268,6 +267,23 @@ Define additional generator attribute for conventional carrier types. If a scala To change cost assumptions in more detail (i.e. other than ``marginal_cost`` and ``capital_cost``), consider modifying cost assumptions directly in ``resources/costs.csv`` as this is not yet supported through the config file. You can also build multiple different cost databases. Make a renamed copy of ``resources/costs.csv`` (e.g. ``data/costs-optimistic.csv``) and set the variable ``COSTS=data/costs-optimistic.csv`` in the ``Snakefile``. + +.. _clustering_cf: + +``clustering`` +============== + +.. literalinclude:: ../config.default.yaml + :language: yaml + :start-after: co2: + :end-before: solving: + +.. csv-table:: + :header-rows: 1 + :widths: 25,7,22,30 + :file: configtables/clustering.csv + + .. _solving_cf: ``solving`` diff --git a/doc/costs.rst b/doc/costs.rst index ef0b4d37..4b11146f 100644 --- a/doc/costs.rst +++ b/doc/costs.rst @@ -7,7 +7,11 @@ Cost Assumptions ################## -The database of cost assumptions is retrieved from the repository `PyPSA/technology-data `_ and then saved to``resources/costs.csv``. Cost assumptions of previous PyPSA-Eur versions can be restored by setting in the ``Snakefile``: ``COSTS="data/costs.csv". +The database of cost assumptions is retrieved from the repository +`PyPSA/technology-data `_ and then +saved to ``resources/costs.csv``. Cost assumptions of previous PyPSA-Eur +versions can be restored by setting in the ``Snakefile``: +``COSTS="data/costs.csv"``. The ``config.yaml`` provides options to choose a reference year (``costs: year:``) and use a specific version of the repository ``costs: version:``. @@ -32,9 +36,6 @@ with a discount rate of :math:`r` over the economic lifetime :math:`n` using the Based on the parameters above the ``marginal_cost`` and ``capital_cost`` of the system components are calculated. -.. note:: - - Another great resource for cost assumptions is the `cost database from the Danish Energy Agency `_. Modifying Cost Assumptions ========================== diff --git a/doc/installation.rst b/doc/installation.rst index aea25a42..4e4eed73 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -71,6 +71,7 @@ PyPSA is known to work with the free software - `Ipopt `_ - `Cbc `_ - `GLPK `_ (`WinGLKP `_) +- `HiGHS `_ and the non-free, commercial software (for some of which free academic licenses are available) diff --git a/doc/tutorial.rst b/doc/tutorial.rst index 7b41b2f0..5d996348 100644 --- a/doc/tutorial.rst +++ b/doc/tutorial.rst @@ -83,14 +83,14 @@ For example, we may want to use the ERA-5 dataset for solar and not the default .. literalinclude:: ../config.tutorial.yaml :language: yaml - :lines: 62,105,106 + :lines: 63,106,107 Finally, it is possible to pick a solver. For instance, this tutorial uses the open-source solvers CBC and Ipopt and does not rely on the commercial solvers Gurobi or CPLEX (for which free academic licenses are available). .. literalinclude:: ../config.tutorial.yaml :language: yaml - :lines: 187,197,198 + :lines: 188,198,199 .. note:: @@ -272,8 +272,6 @@ the wildcards given in ``scenario`` in the configuration file ``config.yaml`` ar :start-at: scenario: :end-before: countries: -In this example we would not only solve a 6-node model of Germany but also a 2-node model. - How to analyse solved networks? =============================== diff --git a/envs/environment.yaml b/envs/environment.yaml index e60a2261..176c6781 100644 --- a/envs/environment.yaml +++ b/envs/environment.yaml @@ -53,7 +53,6 @@ dependencies: - tqdm - pytz - tabula-py - - mergedeep - pyxlsb - pip: diff --git a/test/config.test1.yaml b/test/config.test1.yaml index 3f179078..a67cadc5 100755 --- a/test/config.test1.yaml +++ b/test/config.test1.yaml @@ -153,7 +153,7 @@ load: costs: year: 2030 - version: v0.1.0 + version: v0.4.0 rooftop_share: 0.14 fill_values: FOM: 0