There are four variables: $x_1, x_2, x_3, x_4$.
If you choose either $x_3$ or $x_4$ or both — then you should choose exactly one of $x_1$ or $x_2$.
If you choose neither $x_3$ or $x_4$ — then there is no restriction in choosing $x_1$ or $x_2$.
I have come up with the following if else logic for this, but cannot proceed from there.
If $x_3+x_4 = 0$ then $x_1 + x_2 \ge 0$
If $x_3 + x_4 \ge 1$ then $x_1 + x_2 = 1$
Can you let me know how to come up with an integer linear program with this understanding?
Then use material implication and exclusive or http://blog.adamfurmanek.pl/2015/08/22/ilp-part-1/
– user1543037 Apr 01 '21 at 06:19