From ca70cab40d93ba6b43e48fbdfd09b80f6d219fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20H=C3=B6rsch?= Date: Wed, 14 Mar 2018 15:49:15 +0100 Subject: [PATCH] solve_network: Only zero lines below 100MW There are 6 links between 250 MW and 500 MW, which are deleted otherwise! --- scripts/solve_network.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 7a8893ca..c0e94b9d 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -227,7 +227,7 @@ def solve_network(n, config=None, gurobi_log=None, opts=None): status, termination_condition = run_lopf(n, allow_warning_status=True) - update_line_parameters(n, zero_lines_below=500) + update_line_parameters(n, zero_lines_below=100) logger.info("Starting last run with fixed extendable lines") @@ -239,12 +239,12 @@ def solve_network(n, config=None, gurobi_log=None, opts=None): status, termination_condition = run_lopf(n, fix_ext_lines=True) # Drop zero lines from network - zero_lines_i = n.lines.index[(n.lines.s_nom_opt == 0.) & n.lines.s_nom_extendable] - if len(zero_lines_i): - n.mremove("Line", zero_lines_i) - zero_links_i = n.links.index[(n.links.p_nom_opt == 0.) & n.links.p_nom_extendable] - if len(zero_links_i): - n.mremove("Link", zero_links_i) + # zero_lines_i = n.lines.index[(n.lines.s_nom_opt == 0.) & n.lines.s_nom_extendable] + # if len(zero_lines_i): + # n.mremove("Line", zero_lines_i) + # zero_links_i = n.links.index[(n.links.p_nom_opt == 0.) & n.links.p_nom_extendable] + # if len(zero_links_i): + # n.mremove("Link", zero_links_i) return n