help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Setting a constraint


From: Andrew Makhorin
Subject: Re: [Help-glpk] Setting a constraint
Date: Mon, 21 Nov 2005 12:07:18 +0300

> Is it possible to set this constraint ?
>  
> SUM (Xi * Yj) <= 1
>  
> where Xi and Yj are variables in {0,1}.

Your inequality can be written as follows:

   sum zk <= 1

where zk are binary variables such that zk = xi * yj (or,
equivalently, zk = xi & yj). The latter constraints are still
non-linear, however, they can be written as the following equivalent
linear constraints:

   0 <= xi + yj - 2 * zk <= 1

which describe the same polytope.





reply via email to

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