From 1a42b0c9288b89d565725e48ae2594e317241e2e Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 26 Apr 2023 15:44:45 +0200 Subject: [PATCH] update uc attributes --- scripts/solve_network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 615e8508..8586145c 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -598,10 +598,10 @@ def add_unit_commitment(n, fn): """ Add unit commitment. """ - c = "Link" if ("sector_opts" in snakemake.wildcards.keys()) else "Generator" + c = "Generator" uc_data = pd.read_csv(fn, index_col=0) for attr in uc_data.index: - n.df(c)[attr] = n.df(c)["carrier"].map(uc_data.loc[attr]) + n.df(c)[attr].update(n.df(c)["carrier"].map(uc_data.loc[attr]).dropna()) def solve_network(n, config, opts="", **kwargs):