linear programming : Absolute value in constraint in mathematical model

3,366

Write the inequality with the absolute value in two seperate inequalities. First define

$y_i-t_i=a_i$

$t_i-y_i=b_i$

Then $x_i$ have to be larger or equal to $a_i$ and $b_i$:

$x_i\geq a_i$

$x_i \geq b_i$

$\texttt{numerical example:}$

Case 1: Suppose $y_i=3$ and $t_i=2$. $a_i$ becomes 1 and $b_i$ becomes -1. Therefore $x_i$ has to be greater or equal than 1.

Case 2: Suppose $y_i=2$ and $t_i=3$. $a_i$ becomes -1 and $b_i$ becomes 1. Therefore $x_i$ has to be greater or equal than 1.

In both cases $x_i$ has to be greater or equal than 1.

Share:
3,366

Related videos on Youtube

Luis Infante
Author by

Luis Infante

Updated on July 23, 2020

Comments

  • Luis Infante
    Luis Infante over 3 years

    I have a model have an constraint with evaluation of absolute value , a example can be:

    function objective : $\max \sum(x_i)$ statement: $x_i\geq |(y_i-t_i)|$ for all $i$

    but value absolute not is permitted in solver complex , the model is non-convex

    • Narasimham
      Narasimham over 8 years
      Constraint: $ x_i\geq \sqrt {(y_i-t_i)^2} $ .. Abs is not ok,It is a trick for convexity although am not sure..
    • reuns
      reuns over 8 years
      yes that's a problem, it is solved by tree exploring algorithm (branch and cut for example), I don't know why matlab doesn't offer a function to solve this kind of linear programming with absolute values problems. netherless, some matlab toolboxes should have that function.