You will have to use binary variables for that.
For each variable in your model you will have to add an extra binary variable, add constraints to make it 0 if your variable is 0 and 1 if non-zero and then add an extra contraint that the sum of the added binary vars is >= n
Peter
--- In
lp_solve@..., "annaf02" <annaf02@...> wrote:
>
> Dear All,
>
> Is it possible to ask lpsolve to find a solution of a problem with say m variables such that at least n (<m) of them are not zero?
> I had a look at the special ordered sets but it seems to be something like the opposite of the restriction I am looking for.
>
> Any help is very much appreciated.
> Anna
>