"Greater than AND smaller than" condition in integer linear program with a binary variable
Thanks MrHug, I should have thought of this myself after your first hint.

after using the solution from here twice with the resulting binaries $A_1$ and $A_2$ we can form another problem:
$$A = \begin{cases} 1 &amp; \text{if } A_1+A_2 \geq 2 \\ 0 &amp; \text{otherwise}\end{cases}$$

This one can be solved with a little hint from there:

$$A_1 + A_2 \geq 2 - M * (1-A) \\
2 - \epsilon \geq A_1 + A_2 - M * A$$

where $M$ is a big value and $\epsilon$ is a very small value (above 0, below 1).

It's a bit unfortunate that so many variables are needed as $A$, $A_1$ and $A_2$ are cubic in my case. But I'm glad about this solution.