diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 756b3dae..dafbd200 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -35,7 +35,10 @@ Upcoming Release * Use `mamba` (https://github.com/mamba-org/mamba) for faster Travis CI builds (`#196 `_) -* The mappings for clustered lines and buses produced by the ``simplify_network`` and ``cluster_network`` rules changed from Hierarchical Data Format (.h5) to Comma-Separated Values format (.csv) (`#198 `_) +* The N-1 security margin for transmission lines is now fixed to a provided value in ``config.yaml``, removing an undocumented linear interpolation between 0.5 and 0.7 in the range between 37 and 200 nodes. + +* The mappings for clustered lines and buses produced by the ``simplify_network`` and ``cluster_network`` rules changed from Hierarchical Data Format (.h5) to Comma-Separated Values format (.csv) (`#198 `_) + PyPSA-Eur 0.2.0 (8th June 2020) ================================== diff --git a/scripts/prepare_network.py b/scripts/prepare_network.py index 4ce82536..b1f9313d 100755 --- a/scripts/prepare_network.py +++ b/scripts/prepare_network.py @@ -93,10 +93,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 - 37), 0.5, 0.7) + s_max_pu = snakemake.config['lines']['s_max_pu'] n.lines['s_max_pu'] = s_max_pu + logger.info(f"N-1 security margin of lines set to {s_max_pu}") def set_transmission_limit(n, ll_type, factor, Nyears=1):