From 2f9e9075e8134139afe2ab89aea9ee4a9f9c4735 Mon Sep 17 00:00:00 2001 From: pz-max Date: Tue, 23 Mar 2021 17:29:59 +0000 Subject: [PATCH 1/5] adding marginal cost for storage --- config.default.yaml | 2 +- scripts/add_extra_components.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/config.default.yaml b/config.default.yaml index cca71e61..195990d9 100755 --- a/config.default.yaml +++ b/config.default.yaml @@ -179,7 +179,7 @@ costs: year: 2030 discountrate: 0.07 # From a Lion Hirth paper, also reflects average of Noothout et al 2016 USD2013_to_EUR2013: 0.7532 # [EUR/USD] ECB: https://www.ecb.europa.eu/stats/exchange/eurofxref/html/eurofxref-graph-usd.en.html - marginal_cost: + marginal_cost: # EUR/MWh solar: 0.01 onwind: 0.015 offwind: 0.015 diff --git a/scripts/add_extra_components.py b/scripts/add_extra_components.py index 00851d87..da871715 100644 --- a/scripts/add_extra_components.py +++ b/scripts/add_extra_components.py @@ -114,7 +114,8 @@ def attach_stores(n, costs): carrier='H2 electrolysis', p_nom_extendable=True, efficiency=costs.at["electrolysis", "efficiency"], - capital_cost=costs.at["electrolysis", "capital_cost"]) + capital_cost=costs.at["electrolysis", "capital_cost"], + marginal_cost=snakemake.config['costs']['marginal_cost'].get('H2')) n.madd("Link", h2_buses_i + " Fuel Cell", bus0=h2_buses_i, @@ -123,7 +124,8 @@ def attach_stores(n, costs): p_nom_extendable=True, 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"]) + capital_cost=costs.at["fuel cell", "capital_cost"] * costs.at["fuel cell", "efficiency"], + marginal_cost=snakemake.config['costs']['marginal_cost'].get('H2')) if 'battery' in carriers: b_buses_i = n.madd("Bus", buses_i + " battery", carrier="battery", **bus_sub_dict) @@ -141,7 +143,8 @@ def attach_stores(n, costs): carrier='battery charger', efficiency=costs.at['battery inverter', 'efficiency'], capital_cost=costs.at['battery inverter', 'capital_cost'], - p_nom_extendable=True) + p_nom_extendable=True, + marginal_cost=snakemake.config['costs']['marginal_cost'].get('battery'))) n.madd("Link", b_buses_i + " discharger", bus0=b_buses_i, @@ -149,7 +152,8 @@ def attach_stores(n, costs): carrier='battery discharger', efficiency=costs.at['battery inverter','efficiency'], capital_cost=costs.at['battery inverter', 'capital_cost'], - p_nom_extendable=True) + p_nom_extendable=True, + marginal_cost=snakemake.config['costs']['marginal_cost'].get('battery'))) def attach_hydrogen_pipelines(n, costs): From 165148d26c84bd234716f690c06985949b66090f Mon Sep 17 00:00:00 2001 From: Max Parzen Date: Tue, 23 Mar 2021 19:22:39 +0000 Subject: [PATCH 2/5] Update scripts/add_extra_components.py Co-authored-by: Fabian Neumann --- scripts/add_extra_components.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/add_extra_components.py b/scripts/add_extra_components.py index da871715..b2b2b6a7 100644 --- a/scripts/add_extra_components.py +++ b/scripts/add_extra_components.py @@ -115,7 +115,7 @@ def attach_stores(n, costs): p_nom_extendable=True, efficiency=costs.at["electrolysis", "efficiency"], capital_cost=costs.at["electrolysis", "capital_cost"], - marginal_cost=snakemake.config['costs']['marginal_cost'].get('H2')) + marginal_cost=costs.at["electrolysis", "marginal_cost"]) n.madd("Link", h2_buses_i + " Fuel Cell", bus0=h2_buses_i, From b4a992c4db68c5a15ba09bdfc69ea681c744d7b1 Mon Sep 17 00:00:00 2001 From: Max Parzen Date: Tue, 23 Mar 2021 19:30:06 +0000 Subject: [PATCH 3/5] update config.yaml adding to marginal costs: - electroysis - fuel cell - battery inverter --- config.default.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.default.yaml b/config.default.yaml index 195990d9..7db6d18c 100755 --- a/config.default.yaml +++ b/config.default.yaml @@ -185,7 +185,10 @@ costs: offwind: 0.015 hydro: 0. H2: 0. + electrolysis: 0. + fuel cell: 0. battery: 0. + battery inverter: 0. emission_prices: # in currency per tonne emission, only used with the option Ep co2: 0. From f9e73690e1ee1a721a765257161ff9051fd1aec6 Mon Sep 17 00:00:00 2001 From: Max Parzen Date: Tue, 23 Mar 2021 19:34:13 +0000 Subject: [PATCH 4/5] 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): From 184b060903b00f8d3347e2c5f01f14c6aa70b362 Mon Sep 17 00:00:00 2001 From: Max Parzen Date: Tue, 23 Mar 2021 20:27:13 +0000 Subject: [PATCH 5/5] syntax correction --- scripts/add_extra_components.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/add_extra_components.py b/scripts/add_extra_components.py index ce78e493..6faced60 100644 --- a/scripts/add_extra_components.py +++ b/scripts/add_extra_components.py @@ -155,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=costs.at["battery inverter", "marginal_cost"])) + marginal_cost=costs.at["battery inverter", "marginal_cost"]) def attach_hydrogen_pipelines(n, costs):