0

I am trying to use a continuous constraint to replace a discrete equation $A = |B|$ in my model. Since the linear programming method for absolute value is inapplicable in my model, I come up with constraints $$ A^2 = B^2;\\A \ge 0 $$ to enforce $A$ to equal to $|B|$.

I tried $$ f(x) = A^2 - B^2;\\ f(tx+(1-t)y) - tf(x) - (1-t)f(y); $$ It seems with the fact that $A = |B|$, the $f(tx+(1-t)y) - tf(x) - (1-t)f(y) \ge 0$, which indicates $f(x)$ is convex.

Is the constraint is really convex?

Cheers,

Dylan

Dylan Lan
  • 327
  • 1
  • 2
  • 9

1 Answers1

1

The constraint is not convex: the pairs of values for $(A,B)$ given by $(1,1)$ and $(1,-1)$ satisfy the constraint $|A|=B$, but the pair half-way between them not: $(1,0)$.

Only linear equations give rise to convex sets.

daw
  • 49,113
  • 2
  • 38
  • 76
  • Your last sentence is not technically true (consider $\lfloor x^2+y^2\rfloor=0$), but it's true enough for practical purposes. :) –  Jul 17 '15 at 11:03
  • Thank you daw. It is so obvious when someone tell the answer :) – Dylan Lan Jul 17 '15 at 12:00