Merge pull request #949 from aodenweller/cplexFix

Allow CPLEX for MIQP in cluster_network
This commit is contained in:
Fabian Hofmann 2024-02-27 15:04:51 +01:00 committed by GitHub
commit 7e9599cf4f
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":
elif solver_name not in ["scip", "cplex"]:
logger.info(
f"The configured solver `{solver_name}` does not support quadratic objectives. Falling back to `scip`."
)