6

Suppose $0\le x \le 1$ is a decision variable and $\gamma(x)$ is defined as follows: $$ \gamma(x)= \begin{cases} \theta & x>0\\ 0 & x=0 \end{cases} $$ where $0\le \theta\le 1$.

In my model, I have both $\gamma(x)$ and $x \gamma(x)$ and I want to convert them to linear programs. I used the following constraints: \begin{align} \Gamma&\ge \theta x - (1- y ) \\ \Gamma&\le y \\ \gamma&=\theta y \\ y &\ge x \end{align}

Here, the problem is that $x$ can take value 0 and then, $\gamma = \theta$ at the same time. I can add the constraint $y \le 10000 x$, but it is will exclude some parts of the solution space.

Amin
  • 2,150
  • 7
  • 20

2 Answers2

8

You need a tolerance $\epsilon>0$, and you can strengthen your first two inequality constraints: \begin{align} \Gamma &= \theta x \\ \gamma &= \theta y \\ \epsilon y \le x &\le y \end{align}

RobPratt
  • 32,006
  • 1
  • 44
  • 84
  • Thanks. I tried it but there is a problem. My model tends to maximize $\gamma$. So, it set $x=\epsilon$ to make $y=1$. However, based on logics, it should not do this. – Amin Aug 20 '21 at 01:11
  • 3
    Maybe your $\epsilon$ is not big enough to be considered "really" positive. – RobPratt Aug 20 '21 at 01:33
4

There is no perfect fix for this, since strict inequalities are not supported in MILP models. So you will have to either live with the ambiguity when $x=0$ or exclude a portion of the solution space.

prubin
  • 39,078
  • 3
  • 37
  • 104