Data Science, Machine Learning, Causal Inference, AI, Linear Programming.
at most 1 treatment. for i in range(num_custs): solver.Add(solver.Sum([x[i, j] for j in range(num_treatments)]) <= 1) # Cost constraints solver.Add(sum([costs[i][j] * x[i, j] for j in range(num_treatments) for i in range(num_custs)]) <= max_cost) solver.Add(sum([costs[i][j] * x[i, j] for j in