prepare_sector_networks: account correctely for msw co2

environment.yaml: add license comment
This commit is contained in:
Philipp Glaum 2024-09-03 14:10:20 +02:00
parent d2e7562962
commit 30bcddb66a
2 changed files with 14 additions and 9 deletions

View File

@ -1,6 +1,10 @@
# SPDX-FileCopyrightText: : 2017-2024 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: CC0-1.0
name: pypsa-eur-20240812 name: pypsa-eur-20240812
channels: channels:
- http://conda.anaconda.org/gurobi - http://conda.anaconda.org/gurobi
- conda-forge - conda-forge
- defaults - defaults
prefix: /home/fneum/miniconda3/envs/pypsa-eur-20240812 prefix: /home/fneum/miniconda3/envs/pypsa-eur-20240812

View File

@ -2377,12 +2377,9 @@ def add_biomass(n, costs):
carrier="municipal solid waste", carrier="municipal solid waste",
) )
e_max_pu = np.array( e_max_pu = pd.DataFrame(1, index=n.snapshots, columns=spatial.msw.nodes)
len(spatial.msw.nodes) * [[1] * (len(n.snapshots) - 1) + [0]] e_max_pu.iloc[-1] = 0
).T
e_max_pu = pd.DataFrame(
e_max_pu, index=n.snapshots, columns=spatial.msw.nodes
).astype(float)
n.madd( n.madd(
"Store", "Store",
spatial.msw.nodes, spatial.msw.nodes,
@ -3383,9 +3380,13 @@ def add_industry(n, costs):
spatial.msw.locations, spatial.msw.locations,
bus0=spatial.msw.nodes, bus0=spatial.msw.nodes,
bus1=non_sequestered_hvc_locations, bus1=non_sequestered_hvc_locations,
bus2="co2 atmosphere",
carrier="municipal solid waste", carrier="municipal solid waste",
p_nom_extendable=True, p_nom_extendable=True,
efficiency=1.0, 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( n.madd(