From e2a67d624f10823a1e52b7c6180aaaaa8b0bc6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20H=C3=B6rsch?= Date: Wed, 25 Jul 2018 23:57:58 +0200 Subject: [PATCH] add_electricity: Fix unit mistake, since inflow is in MW instead of pu --- scripts/add_electricity.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/add_electricity.py b/scripts/add_electricity.py index 955c679c..122b7c8e 100644 --- a/scripts/add_electricity.py +++ b/scripts/add_electricity.py @@ -196,7 +196,7 @@ def attach_hydro(n, costs, ppl): .assign_coords(name=ppl.index[ppl.has_inflow]) .transpose('time', 'name') .to_pandas() - .multiply(dist_key / ppl.loc[ppl.has_inflow, 'p_nom'], axis=1) + .multiply(dist_key, axis=1) ) if 'ror' in carriers: @@ -209,6 +209,7 @@ def attach_hydro(n, costs, ppl): capital_cost=costs.at['ror', 'capital_cost'], weight=ror['p_nom'], p_max_pu=(inflow_t.loc[:, ror.index] + .divide(ror['p_nom'], axis=1) .where(lambda df: df<=1., other=1.))) if 'PHS' in carriers: