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!

  • 1
    $\begingroup$ Which are variables and which are constants? What types are the variables? $\endgroup$
    – RobPratt
    Nov 16, 2020 at 13:53
  • 1
    $\begingroup$ What's the difference between the first two implications (assuming $x$ and $y$ are both variables)? $\endgroup$ Nov 16, 2020 at 14:42
  • 1
    $\begingroup$ In any case, see whether this answers your question: or.stackexchange.com/q/76/38 $\endgroup$ Nov 16, 2020 at 14:43
  • $\begingroup$ Hi, I have just edited my question. Sorry for the prior unclear description. Thank you! $\endgroup$
    – Mike
    Nov 17, 2020 at 2:29

1 Answer 1


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 $$

  • $\begingroup$ Thanks! Guess I overcomplicated stuff myself. $\endgroup$
    – Mike
    Nov 17, 2020 at 3:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.