From 2c06fef22b2c63dc94356a96df69fb25d480ded6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20H=C3=B6rsch?= Date: Mon, 24 Sep 2018 18:28:59 +0200 Subject: [PATCH] prepare_network: Scale security margin from 0.5 at 37 clusters to 0.7 at 200 clusters --- scripts/prepare_network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/prepare_network.py b/scripts/prepare_network.py index 17a9b4e4..e98d9ff1 100644 --- a/scripts/prepare_network.py +++ b/scripts/prepare_network.py @@ -31,9 +31,9 @@ def add_emission_prices(n, emission_prices=None, exclude_co2=False): n.storage_units['marginal_cost'] += n.storage_units.carrier.map(ep) def set_line_s_max_pu(n): - # set n-1 security margin to 0.5 for 45 clusters and to 0.7 from 200 clusters + # 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 - 45) / (200 - 45), 0.5, 0.7) + s_max_pu = np.clip(0.5 + 0.2 * (n_clusters - 37) / (200 - 45), 0.5, 0.7) n.lines['s_max_pu'] = s_max_pu dc_b = n.links.carrier == 'DC'