# Absolute value in linear constraint

 3 the way you state it means that either x1+x2+x3 = 1 or x1+x2+x3 = -1. This cannot be stated as a linear constraint, you need a binary variable z for this, like x1+x2+x3 = -1 + 2z. (ok, this is a linear constraint, admitted) edited after you posted a clarification of the question: :-) nice, it is of great importance to ask the right questions... typically, a sum of binary variables equal to one is a well-behaving structure. What solver do you use, of what size is your model? Is there anything else you would add to your question before we start more guessing? answered 07 May '14, 16:17 Marco Luebbecke ♦ 3.4k●1●6●15 accept rate: 16%
 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:

×127
×65
×14