# Conversion of IF-THEN constraint to a convex one

I need to use the following constraint in my CVX_Gurobi optimization problem:

CVX Code:

variables x1 x2 x3 x4 binary

if (x1 + x4) <= 1
x2 + x3 == 0 ;
end

However, CVX does not accept IF-THEN type of constraints. I can convert that constraint to the following analytic one:

x2 + x3 <= 2 * max( x1 + x4 - 1 , 0)

However, the new constraint is not convex since a convex function (instead of a concave function) has fallen in the side of the greater-than-equal-to side.

Any suggestion how I can convert that statement to a convex one?

Thanks,

Nazmul

1)
If the first constraint was x_1+x_4<1 then you could introduce an auxiliary binary variable y and use the following linear constraint expressions (this is the Big-M method):
-(x_1+x_4) + 1 \leq M \cdot y; x_2+x_3 \leq M \cdot y. You may see that for each value of y, one expression is valid and the other is redundant. However in your case, I am not sure you can do this.

2) If you manage to do a linear reformulation like this, then you will also have a binary variable as well, so the problem would not be convex (although you could solve it by an MILP solver like Gurobi or Mosek).

a.