Skip to content

Commit

Permalink
make multi-task amendment
Browse files Browse the repository at this point in the history
  • Loading branch information
HellevdM committed Jun 4, 2024
1 parent 1ee41e7 commit f3547f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gbmtsplits/split.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,8 @@ def _merge_clusters_with_balancing_mapping(
for m in range(S):
for t in range(M):
cs = [c for c in range(N) if A[t,c] != 0]
prob += LpAffineExpression([(x[c+m*N],A[t,c]) for c in cs]) - X[m] <= fractional_sizes[m]
prob += LpAffineExpression([(x[c+m*N],A[t,c]) for c in cs]) + X[m] >= fractional_sizes[m]
prob += LpAffineExpression([(x[c+m*N],A[t,c]) for c in cs]) - X[m*M+t] <= fractional_sizes[m]
prob += LpAffineExpression([(x[c+m*N],A[t,c]) for c in cs]) + X[m*M+t] >= fractional_sizes[m]

# Solve the model
prob.solve(PULP_CBC_CMD(gapAbs = absolute_gap, timeLimit = time_limit_seconds, threads = max_N_threads, msg=False))
Expand Down

0 comments on commit f3547f0

Please sign in to comment.