From 7665de61d3f163005392a8f12130439274e61803 Mon Sep 17 00:00:00 2001
From: Philipp Glaum
Date: Thu, 29 Aug 2024 15:34:44 +0200
Subject: [PATCH] prepare_sector_network: convert e_max_pu timeseries for msw
stores to pd.DataFrame.
---
scripts/prepare_sector_network.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py
index b6644d6d..cc4c7f3a 100644
--- a/scripts/prepare_sector_network.py
+++ b/scripts/prepare_sector_network.py
@@ -2345,7 +2345,12 @@ def add_biomass(n, costs):
carrier="municipal solid waste",
)
- e_max_pu = pd.Series([1] * (len(n.snapshots) - 1) + [0], index=n.snapshots)
+ 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)
n.madd(
"Store",
spatial.msw.nodes,