From 18759053f01476f6ab2cf624d13ce3d20b3b03c0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:42:18 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/prepare_sector_network.py | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 23863067..71b50439 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2830,8 +2830,11 @@ def add_biomass(n, costs): ) if options["bioH2"]: - name = (pd.Index(spatial.biomass.nodes) + " " - + pd.Index(spatial.h2.nodes.str.replace(" H2", ""))) + name = ( + pd.Index(spatial.biomass.nodes) + + " " + + pd.Index(spatial.h2.nodes.str.replace(" H2", "")) + ) n.madd( "Link", name, @@ -2841,16 +2844,22 @@ def add_biomass(n, costs): bus2=spatial.co2.nodes, bus3="co2 atmosphere", carrier="solid biomass to hydrogen", - efficiency=costs.at['solid biomass to hydrogen', 'efficiency'], - efficiency2=costs.at['solid biomass', 'CO2 intensity'] * options["cc_fraction"], - efficiency3=-costs.at['solid biomass', 'CO2 intensity'] * options["cc_fraction"], + efficiency=costs.at["solid biomass to hydrogen", "efficiency"], + efficiency2=costs.at["solid biomass", "CO2 intensity"] + * options["cc_fraction"], + efficiency3=-costs.at["solid biomass", "CO2 intensity"] + * options["cc_fraction"], p_nom_extendable=True, - capital_cost=costs.at['solid biomass to hydrogen', 'fixed'] * costs.at['solid biomass to hydrogen', 'efficiency'] - + costs.at['biomass CHP capture', 'fixed'] * costs.at['solid biomass', 'CO2 intensity'], - overnight_cost=costs.at['solid biomass to hydrogen', 'investment'] * costs.at['solid biomass to hydrogen', 'efficiency'] - + costs.at['biomass CHP capture', 'investment'] * costs.at['solid biomass', 'CO2 intensity'], - marginal_cost=0., - ) + capital_cost=costs.at["solid biomass to hydrogen", "fixed"] + * costs.at["solid biomass to hydrogen", "efficiency"] + + costs.at["biomass CHP capture", "fixed"] + * costs.at["solid biomass", "CO2 intensity"], + overnight_cost=costs.at["solid biomass to hydrogen", "investment"] + * costs.at["solid biomass to hydrogen", "efficiency"] + + costs.at["biomass CHP capture", "investment"] + * costs.at["solid biomass", "CO2 intensity"], + marginal_cost=0.0, + ) def add_industry(n, costs):