From 593995675e43d860c120b568ab19f8ffade31b32 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Thu, 4 Jan 2024 12:44:47 +0100 Subject: [PATCH] gurobi: avoid double-logging to console --- scripts/solve_network.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 2f170dff..ecf56a24 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -854,6 +854,9 @@ def solve_network(n, config, solving, opts="", **kwargs): ) kwargs["assign_all_duals"] = cf_solving.get("assign_all_duals", False) + if kwargs["solver_name"] == "gurobi": + logging.getLogger('gurobipy').setLevel(logging.CRITICAL) + rolling_horizon = cf_solving.pop("rolling_horizon", False) skip_iterations = cf_solving.pop("skip_iterations", False) if not n.lines.s_nom_extendable.any():