Merge pull request #784 from PyPSA/load_shedding_all_carriers

add load shedding for all carriers
This commit is contained in:
Fabian Neumann 2023-11-24 09:55:51 +01:00 committed by GitHub
commit b1d999f35d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -350,7 +350,7 @@ def prepare_network(
# http://journal.frontiersin.org/article/10.3389/fenrg.2015.00055/full
# TODO: retrieve color and nice name from config
n.add("Carrier", "load", color="#dd2e23", nice_name="Load shedding")
buses_i = n.buses.query("carrier == 'AC'").index
buses_i = n.buses.index
if not np.isscalar(load_shedding):
# TODO: do not scale via sign attribute (use Eur/MWh instead of Eur/kWh)
load_shedding = 1e2 # Eur/kWh