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

GKGKGK
113
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\).

link

answered 08 Dec '15, 17:12

Paul%20Rubin's gravatar image

Paul Rubin ♦♦
14.6k412
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

By RSS:

Answers

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

Tags:

×231

Asked: 08 Dec '15, 15:42

Seen: 416 times

Last updated: 09 Dec '15, 09:41

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