From 9545b757b0ce087d034ba988ea62ca7e3e5bba3d Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Tue, 21 May 2024 15:28:03 +0200 Subject: [PATCH] correctly trigger add_solar_potential_constraints --- scripts/solve_network.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 7dd53597..9d4521db 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -997,7 +997,11 @@ def extra_functionality(n, snapshots): if EQ_o := constraints["EQ"]: add_EQ_constraints(n, EQ_o.replace("EQ", "")) - if {"solar-hsat", "solar"}.issubset(config["renewable"].keys()): + if {"solar-hsat", "solar"}.issubset( + config["electricity"]["renewable_carriers"] + ) and {"solar-hsat", "solar"}.issubset( + config["electricity"]["extendable_carriers"]["Generator"] + ): add_solar_potential_constraints(n, config) add_battery_constraints(n)