I have the following discontinuous function:
$f(x) = 10 $ if $x = 0$ or $f(x) = 5 + 8x $ if $x > 0$ where $ x \in [0,30]$
I'd like to formulate as a bilinear program using binary variables but I am unclear as to how to capture the following relationship between binary variable $y = [0 \ or \ 1]$ and x for the following constraints/equations:
$x = 0 \implies y = 0$
$x > 0 \implies y = 1$
If I can represent the above then f(x) becomes a single function of x and y such that:
$f(x,y) = 10(1-y) + (5+8x)y$
Specify a small constant tolerance $\epsilon>0$ and impose linear "big-M" constraints: \begin{align} \epsilon y \le x &\le 30 y \\ (5-10) y \le f - 10 &\le (245-10) y \\ f - (5+8x) &= (10-5) (1-y) \\ \end{align}
If $y=0$, then $x = 0$ and $f=10$.
If $y=1$, then $\epsilon \le x \le 30$, $5 \le f \le 245$, and $f = 5+8x$.