Division in linear program

1.6k Views Asked by At

In my linear program, I have an inequality constraint as follows. $$ x + \frac{y}{g(z)} \leq c $$ where $x \in \mathbf{R}^+, y \in \{0, 1\}$, and $g(z)$ is a function of $z \in \mathbf{Z}_{\geq 0}$ and $ a \leq g(z) \leq b $. Here $x, y$ and $z$ are optimization variables.

I would like to linearize this constraint. So my question is: Can I replace $\frac{1}{g(z)}$ with another continuous variable $\frac{1}{b} \leq z' \leq \frac{1}{a}$, and use the big-M method to linearize this product?

Note that $g(z)$ cannot be zero due to the problem specifics, and $a, b \geq 0$.

2

There are 2 best solutions below

1
On BEST ANSWER

You have $x\leq c$ when $y=0$ and $x + \frac{1}{g(x)} \leq c$ when $y=1$.

Let $U$ be an upper bound on $z$. Introduce $U+1$ binaries $\delta_i$ to represent which value $z$ has, $z = \sum_{i = 0}^U \delta_i i$ where $\sum_{i = 0}^U \delta_i = 1$. The complicating term can now be expressed linearly as $\sum_{i=0}^N \delta_i \frac{1}{g(i)}$

The logics for selecting constraint with $y$ is standard big-M modelling, and you end up with

$$ x \leq c + My,~x + \sum_{i=0}^U \frac{\delta_i}{g(i)} \leq c + M(1-y), ~z = \sum_{i = 0}^U \delta_i i,~\sum_{i=0}^U \delta_i = 1$$

0
On

You have $x \le c$, and you can linearize $y=1 \implies x + z' \le c$ by using a big-M constraint: $$x + z' - c \le (c + 1/a - c) (1 - y),$$ equivalently, $$x + z' +\frac{1}{a}y \le c + \frac{1}{a}.$$ But you still have nonlinearity with $z'=1/g(z)$, unless $g(z)$ is the reciprocal of a linear function of $z$.