1

I would like to seek some advice on modeling the following (chain of) logical implication:

For instance $\omega_{xy}$ might indicate precedence, i.e., $x$, $y$ being the nodes $x$ and $y$, respectively. Thus if $\omega_{xy}$$=1$, it implies that the departure time of the vehicle from node $x $ is to be less than or equal to the arrival time at node $y$.

Say for instance, there is an additional node $z$, which also to be visited as is always behind temporally, and for other nodes that are also temporally behind $z$, such as $z_1...z_n$

Hence, I would like to force the logical implication such that

$\omega_{xy}$$=1$ $\implies$ $\omega_{xz}$$=1$

$\omega_{xy}$$=1$ $\implies$ $\omega_{xz_1}$$=1$

...

$\omega_{xy}$$=1$ $\implies$ $\omega_{xz_n}$$=1$

Appreciate your kind guidance.

Thank you!

Mike
  • 707
  • 7
  • 14

1 Answers1

3

To enforce $x = 1 \implies y = 1$ for binary variables $x$ and $y$, impose linear constraint $x \le y$. You can derive this constraint via conjunctive normal form: $$ x \implies y \\ \lnot x \lor y \\ (1 - x) + y \ge 1 \\ x \le y $$

RobPratt
  • 32,006
  • 1
  • 44
  • 84