From f9e73690e1ee1a721a765257161ff9051fd1aec6 Mon Sep 17 00:00:00 2001 From: Max Parzen Date: Tue, 23 Mar 2021 19:34:13 +0000 Subject: [PATCH] Update add_extra_components --- scripts/add_extra_components.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/add_extra_components.py b/scripts/add_extra_components.py index b2b2b6a7..ce78e493 100644 --- a/scripts/add_extra_components.py +++ b/scripts/add_extra_components.py @@ -106,7 +106,8 @@ def attach_stores(n, costs): carrier='H2', e_nom_extendable=True, e_cyclic=True, - capital_cost=costs.at["hydrogen storage", "capital_cost"]) + capital_cost=costs.at["hydrogen storage", "capital_cost"], + marginal_cost=costs.at["H2", "marginal_cost"]) n.madd("Link", h2_buses_i + " Electrolysis", bus0=buses_i, @@ -125,7 +126,7 @@ def attach_stores(n, costs): efficiency=costs.at["fuel cell", "efficiency"], #NB: fixed cost is per MWel capital_cost=costs.at["fuel cell", "capital_cost"] * costs.at["fuel cell", "efficiency"], - marginal_cost=snakemake.config['costs']['marginal_cost'].get('H2')) + marginal_cost=costs.at["fuel cell", "marginal_cost"]) if 'battery' in carriers: b_buses_i = n.madd("Bus", buses_i + " battery", carrier="battery", **bus_sub_dict) @@ -135,7 +136,8 @@ def attach_stores(n, costs): carrier='battery', e_cyclic=True, e_nom_extendable=True, - capital_cost=costs.at['battery storage', 'capital_cost']) + capital_cost=costs.at['battery storage', 'capital_cost'], + marginal_cost=costs.at["battery", "marginal_cost"]) n.madd("Link", b_buses_i + " charger", bus0=buses_i, @@ -144,7 +146,7 @@ def attach_stores(n, costs): efficiency=costs.at['battery inverter', 'efficiency'], capital_cost=costs.at['battery inverter', 'capital_cost'], p_nom_extendable=True, - marginal_cost=snakemake.config['costs']['marginal_cost'].get('battery'))) + marginal_cost=costs.at["battery inverter", "marginal_cost"]) n.madd("Link", b_buses_i + " discharger", bus0=b_buses_i, @@ -153,7 +155,7 @@ def attach_stores(n, costs): efficiency=costs.at['battery inverter','efficiency'], capital_cost=costs.at['battery inverter', 'capital_cost'], p_nom_extendable=True, - marginal_cost=snakemake.config['costs']['marginal_cost'].get('battery'))) + marginal_cost=costs.at["battery inverter", "marginal_cost"])) def attach_hydrogen_pipelines(n, costs):