# Need Help With Conditional Logic IF Y = 0 THEN Z = 0 Where Z is Integer

 0 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 11●1 accept rate: 0%

 1 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 Rubin ♦♦ 14.6k●5●13 accept rate: 19% Thanks for your answer. This now makes total sense. (19 Sep '17, 18:23) fulton
 toggle preview community wiki

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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

Tags:

×71
×26
×21
×7
×2