cluster_network: allow more solvers that can handle quadratic problems
This commit is contained in:
parent
899c8828f0
commit
d0951abded
@ -10,6 +10,8 @@ Release Notes
|
|||||||
Upcoming Release
|
Upcoming Release
|
||||||
================
|
================
|
||||||
|
|
||||||
|
* Allow the use of more solvers in clustering (Xpress, COPT, Gurobi, CPLEX, SCIP, MOSEK).
|
||||||
|
|
||||||
* Enhanced support for choosing different weather years
|
* Enhanced support for choosing different weather years
|
||||||
(https://github.com/PyPSA/pypsa-eur/pull/204):
|
(https://github.com/PyPSA/pypsa-eur/pull/204):
|
||||||
|
|
||||||
|
@ -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()
|
m.objective = (clusters * clusters - 2 * clusters * L * n_clusters).sum()
|
||||||
if solver_name == "gurobi":
|
if solver_name == "gurobi":
|
||||||
logging.getLogger("gurobipy").propagate = False
|
logging.getLogger("gurobipy").propagate = False
|
||||||
elif solver_name not in ["scip", "cplex"]:
|
elif solver_name not in ["scip", "cplex", "xpress", "copt", "mosek"]:
|
||||||
logger.info(
|
logger.info(
|
||||||
f"The configured solver `{solver_name}` does not support quadratic objectives. Falling back to `scip`."
|
f"The configured solver `{solver_name}` does not support quadratic objectives. Falling back to `scip`."
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user