Hi, I want to write a constraint such that

if x=y then z=1

otherwise z=0

x={0,1,2} y={0,1,2} z={0,1}

do you have any idea=

asked 08 Dec '15, 15:42

GKGKGK's gravatar image

accept rate: 0%

Have a look at link text. Make the following substitutions: my \(y\) is your \(x-y\), my \(m\) is 0 in your case, and my \(x\) is your \(z\).


answered 08 Dec '15, 17:12

Paul%20Rubin's gravatar image

Paul Rubin ♦♦
accept rate: 19%

thank you so much!

(09 Dec '15, 09:41) GKGKGK
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](http://url.com/ "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: 08 Dec '15, 15:42

Seen: 445 times

Last updated: 09 Dec '15, 09:41

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