MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4).

## If then condition on mixed linear integer programming

Hi all. Let $a$ and $b$ be two real variables such that $0 \le a \le a_{max}$ and $0 \le b \le b_{max}$. I must write the following if-then-else condition with linear inequalities:

if $a < a_{max}$ then $b = 0$ else $b \ge 0$.

Is it possible by adding a single binary variable $y$?

-

Yes.

$a_{\text{max}} y \leq a \leq (1-y)(a_{\text{max}} - \epsilon) + a_{\text{max}}y$

$0 \leq b \leq b_{\text{max}} y$

where $y \in \{{0,1\}}$ and $\epsilon$ is a small positive real.

-
 $epsilon$ is emulating the "<" condition, right? If I set $epsilon=0$ then I get the $a \le a_{max}$ condition. I'll mark as an answer. – ashade Aug 14 at 23:51 In general, you cannot write strict inequality constraints (< or >) in numerical math programs. The $\epsilon$ is used as an approximation, and is usually set to your solver's numerical tolerance. – Gilead Aug 15 at 5:30