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

account correctely for msw co2 #1256

Merged
merged 5 commits into from
Sep 4, 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
4 changes: 4 additions & 0 deletions envs/environment.fixed.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: : 2017-2024 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: CC0-1.0

name: pypsa-eur-20240812
channels:
- http://conda.anaconda.org/gurobi
Expand Down
15 changes: 8 additions & 7 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -2355,7 +2355,7 @@ def add_biomass(n, costs):
if (
options["municipal_solid_waste"]
and not options["industry"]
and (cf_industry["waste_to_energy"] or cf_industry["waste_to_energy_cc"])
and not (cf_industry["waste_to_energy"] or cf_industry["waste_to_energy_cc"])
):
logger.warning(
"Flag municipal_solid_waste can be only used with industry "
Expand All @@ -2375,12 +2375,9 @@ def add_biomass(n, costs):
carrier="municipal solid waste",
)

e_max_pu = np.array(
len(spatial.msw.nodes) * [[1] * (len(n.snapshots) - 1) + [0]]
).T
e_max_pu = pd.DataFrame(
e_max_pu, index=n.snapshots, columns=spatial.msw.nodes
).astype(float)
e_max_pu = pd.DataFrame(1, index=n.snapshots, columns=spatial.msw.nodes)
e_max_pu.iloc[-1] = 0

n.madd(
"Store",
spatial.msw.nodes,
Expand Down Expand Up @@ -3381,9 +3378,13 @@ def add_industry(n, costs):
spatial.msw.locations,
bus0=spatial.msw.nodes,
bus1=non_sequestered_hvc_locations,
bus2="co2 atmosphere",
carrier="municipal solid waste",
p_nom_extendable=True,
efficiency=1.0,
efficiency2=-costs.at[
"oil", "CO2 intensity"
], # because msw is co2 neutral and will be burned in waste CHP or decomposed as oil
)

n.madd(
Expand Down
Loading