solve_network script and config: add base load constraint
This commit is contained in:
parent
0aace90b9d
commit
17337070f1
@ -42,6 +42,15 @@ electricity:
|
|||||||
co2limit: 7.75e+7 # 0.05 * 3.1e9*0.5
|
co2limit: 7.75e+7 # 0.05 * 3.1e9*0.5
|
||||||
co2base: 1.487e+9
|
co2base: 1.487e+9
|
||||||
agg_p_nom_limits: data/agg_p_nom_minmax.csv
|
agg_p_nom_limits: data/agg_p_nom_minmax.csv
|
||||||
|
# parameters used for the min renewable constraint, can be used with the RE wildcard in opts
|
||||||
|
renewable_aim: # installed capacity aim 2030 of BMWi for Germany https://www.bmwi.de/Redaktion/DE/Downloads/Energie/220111_eroeffnungsbilanz_klimaschutz.pdf?__blob=publicationFile&v=22
|
||||||
|
onwind: 100 #GW
|
||||||
|
offwind: 30 #GW
|
||||||
|
solar: 200 #GW
|
||||||
|
# parameters used for the base load constraint, can be used with the BL wildcard in opts
|
||||||
|
base_load:
|
||||||
|
lignite: 0.2 #min_p_pu value for lignite
|
||||||
|
nuclear: 0.354
|
||||||
|
|
||||||
extendable_carriers:
|
extendable_carriers:
|
||||||
Generator: []
|
Generator: []
|
||||||
|
@ -233,6 +233,15 @@ def add_minRenew_constraints(n, config, o):
|
|||||||
rhs= config["electricity"]["renewable_aim"][tech] * 1000 #in GW
|
rhs= config["electricity"]["renewable_aim"][tech] * 1000 #in GW
|
||||||
define_constraints(n, lhs, '>=', rhs, 'Carrier', f'min_capacity_{tech}')
|
define_constraints(n, lhs, '>=', rhs, 'Carrier', f'min_capacity_{tech}')
|
||||||
|
|
||||||
|
def add_base_load_constraint(n, config):
|
||||||
|
'''
|
||||||
|
Adds the constraint that conventional carriers defined in the config have a base load namely p_min_pu.
|
||||||
|
To use this constraint simply add the wildcard BL in the opts wildcard.
|
||||||
|
'''
|
||||||
|
carriers=config["electricity"]["base_load"].keys()
|
||||||
|
for carrier in carriers:
|
||||||
|
filter=n.generators.query("carrier==@carrier").index
|
||||||
|
n.generators.loc[filter,"p_min_pu"]=config["electricity"]["base_load"][carrier]
|
||||||
|
|
||||||
def add_battery_constraints(n):
|
def add_battery_constraints(n):
|
||||||
nodes = n.buses.index[n.buses.carrier == "battery"]
|
nodes = n.buses.index[n.buses.carrier == "battery"]
|
||||||
@ -259,6 +268,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 "BL":
|
||||||
|
add_base_load_constraint(n, config)
|
||||||
for o in opts:
|
for o in opts:
|
||||||
if "EQ" in o:
|
if "EQ" in o:
|
||||||
add_EQ_constraints(n, o)
|
add_EQ_constraints(n, o)
|
||||||
|
Loading…
Reference in New Issue
Block a user