From 8c9e650febb10774345176bb9f2591f80252aac1 Mon Sep 17 00:00:00 2001 From: Jonas Hoersch Date: Wed, 6 Feb 2019 11:46:33 +0100 Subject: [PATCH] fixup! trace_solve_network: Save intermediate line capacities --- cluster.yaml | 3 +++ scripts/solve_network.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cluster.yaml b/cluster.yaml index 02bb07ab..0aab28a6 100644 --- a/cluster.yaml +++ b/cluster.yaml @@ -7,6 +7,9 @@ feedin_preparation: solve_network: walltime: "05:00:00:00" +trace_solve_network: + walltime: "05:00:00:00" + solve: walltime: "05:00:00:00" threads: 4 # Group threads are not aggregated diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 67251671..e859e480 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -176,6 +176,7 @@ def solve_network(n, config=None, solver_log=None, opts=None, callback=None): return status, termination_condition + iteration = 0 lines_ext_b = n.lines.s_nom_extendable if lines_ext_b.any(): # puh: ok, we need to iterate, since there is a relation @@ -208,8 +209,7 @@ def solve_network(n, config=None, solver_log=None, opts=None, callback=None): ) logger.debug("lines.num_parallel={}".format(n.lines.loc[lines_ext_typed_b, 'num_parallel'])) - iteration = 1 - + iteration += 1 lines['s_nom_opt'] = lines['s_nom'] * n.lines['num_parallel'].where(n.lines.type != '', 1.) status, termination_condition = run_lopf(n, allow_warning_status=True) if callback is not None: callback(n, iteration, status)