Merge pull request #320 from PyPSA/load-shedding-carrier

solve_network: fix load shedding attributes
This commit is contained in:
Fabian Neumann 2022-06-24 20:20:05 +02:00 committed by GitHub
commit 54f88b871a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,7 @@ def prepare_network(n, solve_opts):
df.where(df>solve_opts['clip_p_max_pu'], other=0., inplace=True)
if solve_opts.get('load_shedding'):
n.add("Carrier", "Load")
n.add("Carrier", "load", color="#dd2e23", nice_name="Load shedding")
buses_i = n.buses.query("carrier == 'AC'").index
n.madd("Generator", buses_i, " load",
bus=buses_i,