linearize non differentiable function IP programming

46 Views Asked by At

I'm struggling to linearize this non-differentiable function as follows:

$y = x - 2 $ where $y = 0 $ if $ x- 2 \le 0$ otherwise $y = x-2$

x is a continuous variable with bounds $[0,6]$ and thus y is bounded to continuous region $[0,4]$

2

There are 2 best solutions below

1
On

I don't understand what you mean. Typically, you can only linearize a function over a small interval around a point where the function is differentiable.

0
On

The problem has been solved using piecewiese linear approximation, shown below:

$x = \sum_i c_i \lambda_i$ where c = [0,2,6]

$y = \sum_i d_i \lambda_i$ where d = [0,0,4]

Additional linear constraints imposed on the polyhedron:

$\sum_i \lambda_i = 1 $ Additional constraints to ensure only lambda neighbors can be active in any given feasible solution realized through binary variable constraint impositions.