From ddbc02ba354216578686038a6e5f5949757cc4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20H=C3=B6rsch?= Date: Fri, 26 Oct 2018 10:31:44 +0200 Subject: [PATCH] prepare_network: Fix set_line_s_max_pu - Wrong denominator in linear s_max_pu - DC lines do not have a security margin --- scripts/prepare_network.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/prepare_network.py b/scripts/prepare_network.py index 585a8a73..dd7300a0 100644 --- a/scripts/prepare_network.py +++ b/scripts/prepare_network.py @@ -34,13 +34,9 @@ def add_emission_prices(n, emission_prices=None, exclude_co2=False): def set_line_s_max_pu(n): # set n-1 security margin to 0.5 for 37 clusters and to 0.7 from 200 clusters n_clusters = len(n.buses) - s_max_pu = np.clip(0.5 + 0.2 * (n_clusters - 37) / (200 - 45), 0.5, 0.7) + s_max_pu = np.clip(0.5 + 0.2 * (n_clusters - 37) / (200 - 37), 0.5, 0.7) n.lines['s_max_pu'] = s_max_pu - dc_b = n.links.carrier == 'DC' - n.links.loc[dc_b, 'p_max_pu'] = s_max_pu - n.links.loc[dc_b, 'p_min_pu'] = - s_max_pu - def set_line_volume_limit(n, lv, Nyears=1.): links_dc_b = n.links.carrier == 'DC'