I am quite new to the field of optimization and currently having a problem of formulating a constraint with binary variable.
For each value of $b$, if there exists one value of k such that $z_1[b, k]$ or $z_2[b, k]$ or $z_3[b, k]$ is greater than $0$, then set all other values of $z_1[b, k], z_2[b, k], z_3[b, k]$ to $0$ for that particular $b$.
Because $z$ is binary, it is quite easy, the constraint should be $sum(z) <= 1$.
Now, I want to relax binary variable, so the constraint $sum(z) <= 1$ is not true any more.
I came up with the idea to rewrite this constraint as: $sum(z) == max(z)$ for each $b$, but it seems not to be a convex constraint.
Is there any way to formulate it as a convex constraint?
Thank you,