Writing different constraints using equivalent variables

29 Views Asked by At

Let $z_{ij}\in\{0,1\}$ be a binary variable and $t_{ij}\geqslant0$ be a continuous variable. I have the following equivalence: $$z_{ij}=1\iff t_{ij}>0.$$

Since we have an equivalence between $z_{ij}$ and $t_{ij}$, is it possible to write the following constraints $$\sum_{i=1}^nz_{ij}\leqslant B,\forall j,$$ in terms of $t_{ij}$?

Like for example $$\sum_{i=1}^nt_{ij}\leqslant C,\forall j?$$

1

There are 1 best solutions below

0
On BEST ANSWER

The standard way to limit the number of positive values to $B$ is to introduce a binary variable $z_{i,j}$ with $\sum_i z_{i,j} \le B$, as you have done. The remaining part is to enforce $t_{i,j} >0 \implies z_{i,j}=1$, which is accomplished via linear constraint $t_{i,j} \le T_i z_{i,j}$.