Update scripts/cluster_network.py
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
This commit is contained in:
parent
3d946e62c7
commit
9c558a3e46
@ -260,7 +260,7 @@ def distribute_clusters(n, n_clusters, focus_weights=None, solver_name="scip"):
|
||||
lower=1, upper=N, coords=[L.index], name="n", integer=True
|
||||
)
|
||||
m.add_constraints(clusters.sum() == n_clusters, name="tot")
|
||||
# leave out constant in objective L * n_clusters ** 2
|
||||
# leave out constant in objective (L * n_clusters) ** 2
|
||||
m.objective = (clusters * clusters - 2 * clusters * L * n_clusters).sum()
|
||||
if solver_name == "gurobi":
|
||||
logging.getLogger("gurobipy").propagate = False
|
||||
|
Loading…
Reference in New Issue
Block a user