Having an integer variable $D \in \{-k,-k+1,...,-1,0,1,...,k-1,k\}$, how do I make it affect another variable only when $D = 0$?
Specifically, I have a binary variable $U$ in my model. I want it to be set to $1$ when $D = 0$, but leave it free in other cases.
What constraint or constraints can I add in order to achieve this?