I have the following constraint: $$f\geq C_1\left(d-z-E_1-E_2\right)+C_2\left(E_1+E_2\right).$$
Here $f, d,z\in \mathbb{R}_{\geq 0}$ and $y\in \{0,1\}$ are variables and $C_1$, $C_2$, $E_1$, and $E_2$ are parameters.
I want to have this constraint active only if $(d-z-E_1-E_2)\geq 0$ and $y=1$.
My current solution is the following. I introduce $v\in \{0,1\}$ and use the following constraints to make sure that $v=1$ only if $\left(d-z-E_1-E_2\right)\geq 0$. The parameter $M$ is a big $M$.
\begin{equation} \begin{aligned} f\geq C_1\left(d-z-E_1-E_2\right)+C_2\left(E_1+E_2\right)-M\left(2-y-v\right) \end{aligned} \end{equation} \begin{equation} \begin{aligned} \left(d-z-E_1-E_2\right)\leq Mv \end{aligned} \end{equation}
However, the above solution is not sufficient because I want $v = 0$ when $\left(d-z-E_1-E_2\right)<0$. I couldn't come up with that simple inequality constraint. Please let me know if you have a better solution.