help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Pseudo boolean constraint


From: Henri Gourvest
Subject: Re: [Help-glpk] Pseudo boolean constraint
Date: Thu, 03 Jun 2004 11:36:12 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4

Michael Hennebry wrote:

On Wed, 2 Jun 2004, Henri Gourvest wrote:

I have a special constraint:

  x1 + x2 + x3 >=  2
or
  x1 + x2 + x3 <= 0

I want the result set to be:
0 0 0
1 1 0
1 0 1
0 1 1
1 1 1

But the constraints seem to be unsatisfaible because I don't know how to
write the "OR" constraint.
I'm not sure it is possible but perhaps someone have an idea ...

This is really a MILP question, not a GLPK question.

I'm assuming that x1, x2, and x3 are binary variables.
There are 3 combinations you want to eliminate:
001, 010, and 100.
Add the following constraints:
 x1 + x2 - x3 >= 0
 x1 - x2 + x3 >= 0
-x1 + x2 + x3 >= 0

This technique won't always get you the convex hull,
but in this case I think that it does.

Thank you Mike,

It works fine !
Sorry if it is not the correct newsgroup, do you know another newsgroup for this kind of problem ?

Regards.

Henri




reply via email to

[Prev in Thread] Current Thread [Next in Thread]