From 9c6e5e0ed055b4ab0196ce26552df6ae9920a3c2 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 5 Jul 2023 11:34:07 +0200 Subject: [PATCH] config: remove unneeded plotting entries --- config/config.default.yaml | 42 ----------------------------------- doc/configtables/plotting.csv | 9 -------- scripts/solve_network.py | 9 ++++---- 3 files changed, 5 insertions(+), 55 deletions(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index 6e5fba77..57477618 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -665,48 +665,6 @@ plotting: energy_max: 20000 energy_min: -20000 energy_threshold: 50. - vre_techs: - - onwind - - offwind-ac - - offwind-dc - - solar - - ror - renewable_storage_techs: - - PHS - - hydro - conv_techs: - - OCGT - - CCGT - - Nuclear - - Coal - storage_techs: - - hydro+PHS - - battery - - H2 - load_carriers: - - AC load - AC_carriers: - - AC line - - AC transformer - link_carriers: - - DC line - - Converter AC-DC - heat_links: - - heat pump - - resistive heater - - CHP heat - - CHP electric - - gas boiler - - central heat pump - - central resistive heater - - central CHP heat - - central CHP electric - - central gas boiler - heat_generators: - - gas boiler - - central gas boiler - - solar thermal collector - - central solar thermal collector nice_names: OCGT: "Open-Cycle Gas" diff --git a/doc/configtables/plotting.csv b/doc/configtables/plotting.csv index 82bf7af6..ed5d9c9f 100644 --- a/doc/configtables/plotting.csv +++ b/doc/configtables/plotting.csv @@ -7,13 +7,4 @@ energy_max,TWh,float,Upper y-axis limit in energy bar plots. energy_min,TWh,float,Lower y-axis limit in energy bar plots. energy_threshold,TWh,float,Threshold below which technologies will not be shown in energy bar plots. tech_colors,--,carrier -> HEX colour code,Mapping from network ``carrier`` to a colour (`HEX colour code `_). -vre_techs ,--,subset of carriers,Value not in use -renewable_storage_techs ,--,subset of carriers,Value not in use -conv_techs ,--,subset of carriers,Value in use with unworthy significance. Used as the definition of conventional carrier in solve_network -storage_techs ,--,subset of carriers,Value not in use -load_carriers ,--,subset of carriers,Value not in use -AC_carriers ,--,subset of carriers,Value not in use -link_carriers ,--,subset of carriers,Value not in use -heat_links ,--,subset of carriers,Value not in use -heat_generators ,--,subset of carriers,Value not in use nice_names,--,str -> str,Mapping from network ``carrier`` to a more readable name. diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 58f4db72..37dea162 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -378,13 +378,14 @@ def add_SAFE_constraints(n, config): peakdemand = n.loads_t.p_set.sum(axis=1).max() margin = 1.0 + config["electricity"]["SAFE_reservemargin"] reserve_margin = peakdemand * margin - # TODO: do not take this from the plotting config! - conv_techs = config["plotting"]["conv_techs"] - ext_gens_i = n.generators.query("carrier in @conv_techs & p_nom_extendable").index + conventional_carriers = config["electricity"]["conventional_carriers"] + ext_gens_i = n.generators.query( + "carrier in @conventional_carriers & p_nom_extendable" + ).index p_nom = n.model["Generator-p_nom"].loc[ext_gens_i] lhs = p_nom.sum() exist_conv_caps = n.generators.query( - "~p_nom_extendable & carrier in @conv_techs" + "~p_nom_extendable & carrier in @conventional_carriers" ).p_nom.sum() rhs = reserve_margin - exist_conv_caps n.model.add_constraints(lhs >= rhs, name="safe_mintotalcap")