From 34f5d2eb68f4dd35dcb77a7e813e3af91685b406 Mon Sep 17 00:00:00 2001 From: Michael Lindner Date: Tue, 3 Sep 2024 16:04:00 +0200 Subject: [PATCH 1/3] bugfix missing oil generator: remove else clause --- scripts/prepare_sector_network.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 5f579c5d9..6c0fc6c3d 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -604,16 +604,14 @@ def add_carrier_buses(n, carrier, nodes=None): suffix = " primary" - else: - - n.madd( - "Generator", - nodes + suffix, - bus=nodes + suffix, - p_nom_extendable=True, - carrier=carrier + suffix, - marginal_cost=costs.at[carrier, "fuel"], - ) + n.madd( + "Generator", + nodes + suffix, + bus=nodes + suffix, + p_nom_extendable=True, + carrier=carrier + suffix, + marginal_cost=costs.at[carrier, "fuel"], + ) # TODO: PyPSA-Eur merge issue From 0b30aef50be43fc8c7c678334b647fcf6fa70062 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 14:38:25 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/release_notes.rst | 4 ++-- doc/tutorial.rst | 2 +- envs/environment.fixed.yaml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index dd39fcbca..2a009fe56 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -100,7 +100,7 @@ PyPSA-Eur 0.12.0 (30th August 2024) share_unsustainable_use_retained`` and ``biomass: share_sustainable_potential_available``. (https://github.com/PyPSA/pypsa-eur/pull/1139) - + * Added energy penalty for BECC applications. (https://github.com/PyPSA/pypsa-eur/pull/1130) @@ -258,7 +258,7 @@ PyPSA-Eur 0.12.0 (30th August 2024) :mod:`prepare_sector_network`. (https://github.com/PyPSA/pypsa-eur/pull/1106) * Fixed PDF encoding in ``build_biomass_transport_costs``. - (https://github.com/PyPSA/pypsa-eur/pull/1219) + (https://github.com/PyPSA/pypsa-eur/pull/1219) * Dropped ``pycountry`` dependency in favour of ``country_converter``. (https://github.com/PyPSA/pypsa-eur/pull/1188) diff --git a/doc/tutorial.rst b/doc/tutorial.rst index 73b4df8b8..f514491e2 100644 --- a/doc/tutorial.rst +++ b/doc/tutorial.rst @@ -224,7 +224,7 @@ This triggers a workflow of multiple preceding jobs that depend on each rule's i 7 -> 24 26 -> 25 27 -> 25 - } + } | diff --git a/envs/environment.fixed.yaml b/envs/environment.fixed.yaml index d625a5b16..df58a5ae9 100644 --- a/envs/environment.fixed.yaml +++ b/envs/environment.fixed.yaml @@ -1,6 +1,6 @@ name: pypsa-eur-20240812 channels: - - http://conda.anaconda.org/gurobi - - conda-forge - - defaults +- http://conda.anaconda.org/gurobi +- conda-forge +- defaults prefix: /home/fneum/miniconda3/envs/pypsa-eur-20240812 From f100504a1d25d1c49c90f2f987bf1541701f7b77 Mon Sep 17 00:00:00 2001 From: Michael Lindner Date: Tue, 3 Sep 2024 16:40:21 +0200 Subject: [PATCH 3/3] add release-note --- doc/release_notes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 2a009fe56..325462adc 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -11,6 +11,8 @@ Release Notes .. Upcoming Release .. ================ +* bugfix: The oil generator was incorrectly dropped when the config `oil_refining_emissions` was greater than zero. This was the default behaviour in 0.12.0. + PyPSA-Eur 0.12.0 (30th August 2024) ===================================