help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Strange Constrain


From: Michael Hennebry
Subject: Re: [Help-glpk] Strange Constrain
Date: Wed, 14 Jan 2004 13:14:28 -0600 (CST)

On Wed, 14 Jan 2004, Dan Popovici wrote:

> I have a few variables that are integer x[1] .. x[n] . I want to have
> constraints of the form sum {i} min(x[i],1) < 100(I want no more that
> 100 variabiles to be different from 0). Can I do that with linear
> programming, or is that already not linear any more.

Well, integer is nonlinear.
If you have upper bounds on your variables,
you can add zero-one variables to do the job:
bit[j]*bound[j]>=x[j]
sum {j} bit[j] <= 100

The continuous relaxation is likely to be rather loose.
That is not good for solvers.

-- 
Mike   address@hidden
"History is written by the winners."  --  the losers





reply via email to

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