We have decision variables $x\in\{0,1\}$ and $y>0$. We know that $x=1$ if and only if $y\leq D$ and $x=0$ iff $y>D$. $D>0$ is a model parameter.
How I modeled these constraints is \begin{align*} xy&\leq D\\ y&>D(1-x) \end{align*}
But there are two problems, I think. It works well if $x=1$, but when $x=0$, in the first constraint we get $D\geq 0$ is that ok?
Also, the first constraint is nonlinear and we preferably would like to avoid linearization techniques here.
How do I model this?