How can model this conditional constraint?

43 Views Asked by At

I have a known matrix, $S$ of size $N_U\times N_B$. For each row, the elements are sorted in ascending order.

I have also defined a binary variable $X$ of size $N_U\times N_B$.

I want to formulate a constraint such that if the first element in each row is greater than some threshold $t_\text{thrsld}$, then the corresponding element in matrix $X$ will be $1$.

So, for $u=1,2,\dots,N_U$ if $S_{u,1}\ge t_\text{thrsld}$

Then, $X_{u,1}=1$.

1

There are 1 best solutions below

0
On

Depending on what language you are using, there might be a distinction between temporarily assigning $X_{u,1}=1$ and fixing $X_{u,1}=1$. In the first case, the solver is free to choose a different value.