Hi there,
I want to implement a constraint of the form A |x| <= b. I am currently doing it by introducing the positive and negative parts of x such that x = x_p - x_n and |x| = x_p + x_n. Of course I also have to ensure that the non-zero elements of x_p and x_n are mutually exclusive, and I'm doing this by modifying my objective (to by minimised) as obj = <other terms> + gamma * (||x_p||_2 + ||x_n||_2).
gamma requires a bit of tuning to ensure <x_p, x_n> is within an acceptable tolerance from zero. However, I also find that the problem is sometimes 'distorted' even when the constraint is not biting (meaning the answer is different from the version without the constraint).
Is this the most straightforward way to implement such a constraint? I know it can also be formulated as a mixed-integer problem, but I want to avoid this as my application is sensitive to compute time.
Many thanks for your help!
Jaco Vermaak