Suppose you have IF Y = 0 THEN Z = 0

If both Y and Z are binary this becomes two OR statements

Y >= 1 - M * YTEMP Z <= 0 + M * (1 - YTEMP) where YTEMP is binary and M is BigM

However, my problem is that Z is integer. In fact, Z = A - B + 1 where A and B are integer.

In my example, A is the first arc counter and B is the second arc counter of network flow of arc A into arc B.

How can I formulate Z = 0 when Z is integer?

Any help would be appreciated.

Regards Fulton Loebel

asked 19 Sep '17, 07:51

fulton's gravatar image

accept rate: 0%

If \(y\) and \(z\) are both binary, this becomes a single constraint: \(z \le y\).

If \(y\) is binary and \(z\) is general integer with domain \([L, U]\) (\(L\) and \(U\) both constants), this becomes two constraints: \(z\le U y\) and \(z\ge L y\).


answered 19 Sep '17, 16:18

Paul%20Rubin's gravatar image

Paul Rubin ♦♦
accept rate: 19%

Thanks for your answer. This now makes total sense.

(19 Sep '17, 18:23) fulton
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 19 Sep '17, 07:51

Seen: 539 times

Last updated: 22 Sep '17, 15:42

OR-Exchange! Your site for questions, answers, and announcements about operations research.