cluster_network: update solver_name if clause style

This commit is contained in:
Fabian Hofmann 2024-02-27 11:39:26 +01:00 committed by GitHub
parent 1db30ae63b
commit 58bcef4625
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -267,7 +267,7 @@ def distribute_clusters(n, n_clusters, focus_weights=None, solver_name="scip"):
m.objective = (clusters * clusters - 2 * clusters * L * n_clusters).sum()
if solver_name == "gurobi":
logging.getLogger("gurobipy").propagate = False
elif solver_name != "scip" and solver_name != "cplex":
elif solver_name not in ["scip", "cplex"]:
logger.info(
f"The configured solver `{solver_name}` does not support quadratic objectives. Falling back to `scip`."
)