From 6dacc40f44fd1a91778b63ab13677c8829cbc0fa Mon Sep 17 00:00:00 2001 From: ClaraBuettner Date: Wed, 27 Sep 2023 13:27:13 +0200 Subject: [PATCH] Limit gas usage only if a certain amount of snapshotes is considered --- etrago/tools/constraints.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etrago/tools/constraints.py b/etrago/tools/constraints.py index 82a5037b9..3d9fbaa55 100755 --- a/etrago/tools/constraints.py +++ b/etrago/tools/constraints.py @@ -2737,7 +2737,9 @@ def functionality(self, network, snapshots): if "CH4" in network.buses.carrier.values: if self.args["method"]["pyomo"]: add_chp_constraints(network, snapshots) - if self.args["scn_name"] != "status2019": + if (self.args["scn_name"] != "status2019") & ( + len(network.snapshots) > 1500 + ): add_ch4_constraints(self, network, snapshots) else: add_chp_constraints_nmp(network)