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$.

  • $\begingroup$ Minimize or maximize? $\endgroup$ – RobPratt Sep 8 at 22:43
  • $\begingroup$ @RobPratt Maximize $\endgroup$ – Al Guy Sep 8 at 22:53

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.

| improve this answer | |
  • $\begingroup$ But x=0 doesn’t imply z=0. Is it handled by requirement of maximization of the objective? $\endgroup$ – Al Guy Sep 9 at 3:07
  • 1
    $\begingroup$ Yes, the objective will naturally drive that. $\endgroup$ – RobPratt Sep 9 at 3:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.