Apply suggestion from code review to add switch

This commit is contained in:
Fabian Neumann 2022-04-07 15:22:10 +02:00
parent 3678e5c523
commit 84e146834c
2 changed files with 3 additions and 1 deletions

View File

@ -45,6 +45,7 @@ electricity:
agg_p_nom_limits: data/agg_p_nom_minmax.csv agg_p_nom_limits: data/agg_p_nom_minmax.csv
operational_reserve: # like https://genxproject.github.io/GenX/dev/core/#Reserves operational_reserve: # like https://genxproject.github.io/GenX/dev/core/#Reserves
activate: true
epsilon_load: 0.02 # share of total load epsilon_load: 0.02 # share of total load
epsilon_vres: 0.02 # share of total renewable supply epsilon_vres: 0.02 # share of total renewable supply
contingency: 4000 # fixed capacity in MW contingency: 4000 # fixed capacity in MW

View File

@ -304,7 +304,8 @@ def extra_functionality(n, snapshots):
add_SAFE_constraints(n, config) add_SAFE_constraints(n, config)
if 'CCL' in opts and n.generators.p_nom_extendable.any(): if 'CCL' in opts and n.generators.p_nom_extendable.any():
add_CCL_constraints(n, config) add_CCL_constraints(n, config)
if config["electricity"].get("operational_reserve"): reserve = config["electricity"].get("operational_reserve", {})
if reserve.get("activate"):
add_operational_reserve_margin(n, snapshots, config) add_operational_reserve_margin(n, snapshots, config)
for o in opts: for o in opts:
if "EQ" in o: if "EQ" in o: