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