Loading [MathJax]/jax/output/CommonHTML/jax.js

Monday, November 28, 2016

Reformulation of non-differentiable term

In a non-linear programming model with a rather complicated objective I see a term

p2(|x|+x)

that is minimized. It is also noted that p>0.

image

From a picture of y=|x|+x2 we can see this is just a more complicated way of writing:

pmax{0,x}

I don’t see much advantage in using the first form. Both these expressions are non-differentiable at x=0. Almost always a better formulation is to replace max{0,x} by a new positive variable y0, and add a constraint:

yx

Although we are making the model slightly larger (we add a variable and an equation) in general this is good trade-off: we now have a simpler, even linear term in the objective.

No comments:

Post a Comment