For maximizing the objective function $\sum_i{d_i y_i}+ A x - B \cdot \mathbb{I}_{x>0}$, how can I linearize $ A x - B \cdot \mathbb{I}_{x>0}$ term where $d_i, A$ and $B$ are positive constants and $x, y_i$ are continuous non-negative variables? Can you explain the logic of linearization? There are many other constraints involving $y_i, x$.
1 Answer
$\begingroup$
$\endgroup$
2
If $M$ is a (small) upper bound on $x$, introduce a binary variable $z$ and big-M constraint $x \le M z$. The idea is that $x>0$ implies $z=1$. Now use $B z$ in the objective.