help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Linear program - Difficulty expressing a constraint


From: Andrew Makhorin
Subject: Re: [Help-glpk] Linear program - Difficulty expressing a constraint
Date: Sun, 30 Sep 2007 12:49:59 +0400

> I am sorry for the last post. That is not what I am looking at.
> Basically, I have n non-negative variables and I want to ensure that
> one of them has to be zero. Others could be zero or non-zero but not
> all can be non-zero at once. How can I impose this constraint?

   0 <= x[j] <= M[j] * z[j]   for all j in 1..n

   sum{j in 1..n} z[j] <= n - 1

where x[j] are non-negative variables, z[j] are binary variables,
M[j] is appropriate upper bound of x[j].





reply via email to

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