Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare for pypsa 0.32.0 #1445

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion envs/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions scripts/make_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand All @@ -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}",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
Loading