I am trying to code a constraint of the form:
$$\sum_i y_i < K\,\text{where}\,\begin{cases}y_i = x_i\quad\text{if}\,x_i>k_i\\0\quad\text{otherwise}.\end{cases}$$
In other words, I want to constrain the sum of $x_i$ (only) for those $x_i>k_i$, where $k_i$ are fixed and all positive, and $x_i$ are free and all positive.
I think this is a straightforward MIP, but wondering if it can be coded in LP. I can't show it's not convex.
Any suggestions appreciated.