I have an optimization problem in which a constraint should hold if the variable $x$ is inside the interval $[a,b]$. I assume you can model it by introducing a binary variable $z$ with $z=1$ if $x \in [a,b]$. So I would like to have something like
$$ x \in [a,b] \Rightarrow z=1 $$
Is there a way to model this with linear constraints or how would you model this in general?