MILP if then check statements?

349 Views Asked by At

Suppose I want to check $\forall i\in\{1,\dots,n\}\quad x_i\in\mathbb R$ if $-b\leq x_i\leq b$ then $Ax\leq c$ holds (where $x=(x_1,\dots,x_n)'$ with $'$ being transpose) is there a way to do this in MILP with least number of binary variables (with just one or two (the same variable might suffice for all $i$))?

Can something like this work?

First:

$$((|x_1|\leq b)\wedge(|x_2|\leq b)\wedge\dots\wedge(|x_n|\leq b)) \Longleftrightarrow\delta = 0$$

This can be formulated as: $$\begin{align} &-b+M\delta\le x_i\le b+M\delta\\ &\delta \in \{0,1\} \end{align}$$

Next we want: $$\begin{align} &\delta=0 \Longrightarrow Ax\leq c \end{align}$$ This can be written as: $$\begin{align} &Ax+M\delta I_n\le c\\ \end{align}$$ where $I_n$ is identity.

1

There are 1 best solutions below

3
On

A first approach would be define a binary indicator variable $b_i$ for each $-b\leq x_i\leq c$ and the an inequality of the type $Ax -b \leq \sum_1^n (1-b_i) M 1_n$, where $M$ is large enough and $1_n$ is $n$-dimensional vector of 1s. The relaxation of this approach would be quite bad though.