I have a model that considers real values and that uses a binary variable $x$. In this model, the following conditions should apply:
\begin{equation} x= \begin{cases} 0, & \text{if}\ y > s \\ 1, & \text{otherwise}~(y \le s) \end{cases} \end{equation}
with $y \ge 0$ and $s \ge 0$.
First I tried these two restrictions:
$$ (s - y) - M x \le 0\\ (y - s) - M (1-x) \le 0 $$
where $M$ is a very large constant.
Unfortunately, if $y = s$ the binary variable can be either $1$ or $0$. It is also not possible to enforce one value by the objective function. To fix this problem, I added an very small value $\epsilon$ to the first restriction:
$(s - y) + \epsilon - M x \le 0$
This solution works, but is there a way I can model that without the $\epsilon$ value?