I have two continuous variables $A$, $B$ and two binary variables $x$, $y$.
Condition: if $A = B \wedge x = 1 \wedge y=1$ then $z = 1$ else $z = 0$ from
My current attempt is:
\begin{align} A-B + \delta+x+y &\leq 2 + M \cdot k_1\\ B - A - \delta-x-y &\leq - 2 + M \cdot(1 - k_1)\\ B-A + \delta+x+y &\leq 2 + M \cdot k_2\\ A - B - \delta-x-y &\leq -2 + M \cdot(1 - k_2)\\ k_1 + k_2 - 1 &\leq z \\k_1 &\geq z \\k_2 &\geq z \end{align}
where $k_1, k_2$ are boolean variables, but I am not getting the expected result.