I have a problem with a nonlinear constraint. The non-linearity stems from a term of the form $xb$, where $x \in \mathbb{R}^+$, $x < M$ and $b \in \{0, 1\}$. I am able to remove this non-linearity by using McCormick envelopes.

If I solve the problem using this relaxation, am I actually solving the problem or am I just finding a very tight lower bound?. Remember that one of the variables is binary.

What if $b \in \mathbb{N}$ instead?

  • $\begingroup$ `lower bound' -- what is your objective sense, how does the constraint look like $\endgroup$ Commented Jun 7, 2019 at 23:30
  • 2
    $\begingroup$ Possibly related question $\endgroup$
    – David M.
    Commented Jun 8, 2019 at 0:09

1 Answer 1


For real $x\in[l,u]$ and binary $b\in\{0,1\}$ the McCormick envelope gives you bounds on $w=xy$

$$\begin{align} lb & \leq w \leq ub,\\ ub+x-u& \leq w\leq x+lb-l. \end{align}$$

By case analysis you can see that this is equal to $w=xb$, so you will indeed solve the problem.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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