How to implement v=(a==b) using Linear Programming? $$ v= \begin{cases} True, a=b\\ False, a≠b\\ \end{cases} $$
Until now I tried the big M-Method.
To show a≤b: $$a-b+Mv≤M$$ $$-a+b-Mv≤-1$$
To show b≤a: $$-a+b+Mv≤M$$ $$a-b-Mv≤-1$$
When they are equal everything is okay, but when a≠b it doesn't work.