From 8d22df6482593275e02829ab368e93589c025f37 Mon Sep 17 00:00:00 2001 From: martavp <30744159+martavp@users.noreply.github.com> Date: Tue, 24 Aug 2021 18:38:24 +0200 Subject: [PATCH] Update plot_network.py Some links producing heat have more than 2 ports (e.g. Fischer-Tropsch). This enables capturing them when plotting heat time series. --- scripts/plot_network.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/plot_network.py b/scripts/plot_network.py index cd74d3ea..c97956a0 100644 --- a/scripts/plot_network.py +++ b/scripts/plot_network.py @@ -398,7 +398,8 @@ def plot_series(network, carrier="AC", name="test"): supply = pd.DataFrame(index=n.snapshots) for c in n.iterate_components(n.branch_components): - for i in range(2): + n_port = 4 if c.name=='Link' else 2 + for i in range(n_port): supply = pd.concat((supply, (-1) * c.pnl["p" + str(i)].loc[:, c.df.index[c.df["bus" + str(i)].isin(buses)]].groupby(c.df.carrier,