I'm trying to formulate the following logic:
If $y_i =1$, then $c_i \leq x_i$
If $y_i =0$, then $c_i \leq 0$
Where $y_i$, $c_i$, and $x_i$ are decision variables.
The easy way would be to write: $$c_i \leq x_i y_i$$ But that is a quadratic formulation. I was wondering if there is a way to write the constraint as a linear one.
Consider that $c_i$, $x_i$ $\geq 0$ and $y_i \in \{0,1\}$.