@@ -141,19 +141,21 @@ def extra_functionality(n, snapshots):
141141 # Define constraint application functions in a registry
142142 # Each function should take network and necessary parameters
143143 constraint_registry = {
144- "RPS" : lambda : add_RPS_constraints (n , config , sector_enabled , global_snakemake )
145- if n .generators .p_nom_extendable .any ()
146- else None ,
144+ "RPS" : lambda : (
145+ add_RPS_constraints (n , config , sector_enabled , global_snakemake )
146+ if n .generators .p_nom_extendable .any ()
147+ else None
148+ ),
147149 "REM" : lambda : add_regional_co2limit (n , config ) if n .generators .p_nom_extendable .any () else None ,
148- "PRM" : lambda : add_PRM_constraints ( n , config , global_snakemake )
149- if n .generators .p_nom_extendable .any ()
150- else None ,
151- "ERM" : lambda : add_ERM_constraints ( n , config , global_snakemake )
152- if n .generators .p_nom_extendable .any ()
153- else None ,
154- "TCT" : lambda : add_technology_capacity_target_constraints ( n , config )
155- if n .generators .p_nom_extendable .any ()
156- else None ,
150+ "PRM" : lambda : (
151+ add_PRM_constraints ( n , config , global_snakemake ) if n .generators .p_nom_extendable .any () else None
152+ ) ,
153+ "ERM" : lambda : (
154+ add_ERM_constraints ( n , config , global_snakemake ) if n .generators .p_nom_extendable .any () else None
155+ ) ,
156+ "TCT" : lambda : (
157+ add_technology_capacity_target_constraints ( n , config ) if n .generators .p_nom_extendable .any () else None
158+ ) ,
157159 }
158160
159161 # Apply constraints based on options
0 commit comments