XOR Statement in integer programming
For binary variables you could just write $x_1 = 1 - x_2$, but I see that in your case $x_1,x_2 \in \{1,2,3\}$. You can still use the same trick once you force a boolean variable $y_i$ to be 1 if and only if $x_i \ge 1$:
$$
\begin{align*}
3 y_1 &amp;\ge x_1 \\
y_1 &amp;\le x_1 \\[6pt]
3 y_2 &amp;\ge x_2 \\
y_2 &amp;\le x_2 \\[6pt]
y_1 &amp;= 1-y_2 \\[6pt]
y_1, y_2 &amp;\in \{0,1\}
\end{align*}
$$