From 1d709913edd92fdb2569e9a5e1c0f69c9e29ac4a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:42:20 +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 | 48 ++++++++++++++++++------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 54057b71..a0a988a9 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2905,7 +2905,10 @@ def add_industry(n, costs): investment_year, ) - if snakemake.config["industry"]["waste_to_energy"] and options["regional_oil_demand"]: + if ( + snakemake.config["industry"]["waste_to_energy"] + and options["regional_oil_demand"] + ): n.madd( "Bus", @@ -2913,7 +2916,7 @@ def add_industry(n, costs): location=spatial.oil.demand_locations, carrier="non-sequestered HVC", unit="MWh_LHV", - ) + ) n.madd( "Link", @@ -2924,7 +2927,9 @@ def add_industry(n, costs): bus3=spatial.co2.process_emissions, carrier="naphtha for industry", p_nom_extendable=True, - efficiency2=non_sequestered*emitted_co2_per_naphtha/costs.at["oil", "CO2 intensity"], + efficiency2=non_sequestered + * emitted_co2_per_naphtha + / costs.at["oil", "CO2 intensity"], efficiency3=process_co2_per_naphtha, ) @@ -2938,7 +2943,7 @@ def add_industry(n, costs): efficiency=costs.at["oil", "CO2 intensity"], ) - #TODO add heat + # TODO add heat n.madd( "Link", spatial.oil.demand_locations + " waste CHP", @@ -2948,14 +2953,16 @@ def add_industry(n, costs): carrier="waste CHP", p_nom_extendable=True, # p_nom=biomass_potential['municipal solid waste'] / 8760, - capital_cost=costs.at['waste CHP', 'fixed'] * costs.at['waste CHP', 'efficiency'], - marginal_cost=costs.at['waste CHP', 'VOM'], - efficiency=costs.at['waste CHP', 'efficiency'], - #efficiency4=costs.at['waste CHP', 'efficiency-heat'], - efficiency2=costs.at['oil', 'CO2 intensity'], - lifetime=costs.at['waste CHP', 'lifetime']) + capital_cost=costs.at["waste CHP", "fixed"] + * costs.at["waste CHP", "efficiency"], + marginal_cost=costs.at["waste CHP", "VOM"], + efficiency=costs.at["waste CHP", "efficiency"], + # efficiency4=costs.at['waste CHP', 'efficiency-heat'], + efficiency2=costs.at["oil", "CO2 intensity"], + lifetime=costs.at["waste CHP", "lifetime"], + ) - #TODO add heat + # TODO add heat n.madd( "Link", spatial.oil.demand_locations + " waste CHP CC", @@ -2966,14 +2973,15 @@ def add_industry(n, costs): carrier="waste CHP CC", p_nom_extendable=True, # p_nom=biomass_potential['municipal solid waste'] / 8760, - capital_cost=costs.at['waste CHP CC', 'fixed'] * costs.at['waste CHP CC', 'efficiency'], - marginal_cost=costs.at['waste CHP CC', 'VOM'], - efficiency=costs.at['waste CHP CC', 'efficiency'], - #efficiency4=costs.at['waste CHP', 'efficiency-heat'], - efficiency2=costs.at['oil', 'CO2 intensity']*(1 - options["cc_fraction"]), - efficiency3=costs.at['oil', 'CO2 intensity']*options["cc_fraction"], - lifetime=costs.at['waste CHP CC', 'lifetime']) - + capital_cost=costs.at["waste CHP CC", "fixed"] + * costs.at["waste CHP CC", "efficiency"], + marginal_cost=costs.at["waste CHP CC", "VOM"], + efficiency=costs.at["waste CHP CC", "efficiency"], + # efficiency4=costs.at['waste CHP', 'efficiency-heat'], + efficiency2=costs.at["oil", "CO2 intensity"] * (1 - options["cc_fraction"]), + efficiency3=costs.at["oil", "CO2 intensity"] * options["cc_fraction"], + lifetime=costs.at["waste CHP CC", "lifetime"], + ) else: @@ -2986,7 +2994,7 @@ def add_industry(n, costs): bus3=spatial.co2.process_emissions, carrier="naphtha for industry", p_nom_extendable=True, - efficiency2=emitted_co2_per_naphtha*non_sequestered, + efficiency2=emitted_co2_per_naphtha * non_sequestered, efficiency3=process_co2_per_naphtha, )