diff --git a/envs/environment.yaml b/envs/environment.yaml index e52cf4348..631958eb9 100644 --- a/envs/environment.yaml +++ b/envs/environment.yaml @@ -11,7 +11,7 @@ dependencies: - pip # Inhouse packages -- pypsa>=0.31 +- pypsa>=0.32 - atlite>=0.2.9 - linopy - powerplantmatching>=0.5.15,<0.6 diff --git a/scripts/make_summary.py b/scripts/make_summary.py index 10a5ccefd..51698c787 100644 --- a/scripts/make_summary.py +++ b/scripts/make_summary.py @@ -540,14 +540,12 @@ def calculate_prices(n, label, prices): def calculate_weighted_prices(n, label, weighted_prices): - carriers = n.buses.carrier.unique() for carrier in carriers: - grouper = n.statistics.groupers.get_bus_and_carrier load = ( n.statistics.withdrawal( - groupby=grouper, + groupby=pypsa.statistics.groupers["bus", "carrier"], aggregate_time=False, nice_names=False, bus_carrier=carrier, diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 1709e8201..7332c5947 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -2175,7 +2175,7 @@ def add_heat( # add resource heat_carrier = f"{heat_system} {heat_source} heat" n.add("Carrier", heat_carrier) - n.madd( + n.add( "Bus", nodes, suffix=f" {heat_carrier}", @@ -2196,7 +2196,7 @@ def add_heat( else: capital_cost = 0.0 lifetime = np.inf - n.madd( + n.add( "Generator", nodes, suffix=f" {heat_carrier}", @@ -2209,7 +2209,7 @@ def add_heat( ) # add heat pump converting source heat + electricity to urban central heat - n.madd( + n.add( "Link", nodes, suffix=f" {heat_system} {heat_source} heat pump", @@ -2237,7 +2237,7 @@ def add_heat( .reindex(index=n.snapshots) ) # add link for direct usage of heat source when source temperature exceeds forward temperature - n.madd( + n.add( "Link", nodes, suffix=f" {heat_system} {heat_source} heat direct utilisation", @@ -2248,7 +2248,7 @@ def add_heat( p_nom_extendable=True, ) else: - n.madd( + n.add( "Link", nodes, suffix=f" {heat_system} {heat_source} heat pump",