Group: sci.op-research
From: "xgeneral57@gmail.com"
Date: Friday, March 21, 2008 5:35 PM
Subject: Re: Counting zero continuous variables

On Mar 21, 4:51=A0pm, Wit Jakuczun wrote:
> Dnia Fri, 21 Mar 2008 13:40:32 -0700 (PDT)
> "xgenera...@gmail.com" napisa=B3(a):
>
>
>
>
>
> > On Mar 21, 4:30=A0pm, Wit Jakuczun wrote:
> > > Dnia Fri, 21 Mar 2008 13:13:32 -0700 (PDT)
> > > "xgenera...@gmail.com" napisa=B3(a):
>
> > > > I have a set of continuous variables x(i), i=3D1,.., N where x(i) ca=
n be
> > > > negative, zero or positive. I'm trying to count, in some way, how ma=
ny
> > > > of x(i)'s are exactly zero. Is there any way to do so using linear
> > > > constraints?
>
> > > Without introducing binary variables it is not possible. This means
> > > you must switch to MIP. Moreover x(i)'s must be bounded.
>
> > > Best regards
> > > --
> > > [ Wit Jakuczun =A0 =A0 ]
> > > [ WLOG Solutions =A0http://www.wlogsolutions.com]
>
> > x(i)'s ae actually bounded above and below: =A0LB(i) <=3D x(i) <=3D UB(i=
).
> > But the problem is that x(i)'s can be either positive or negative.
>
> Represent each x(i) with a sum of two auxiliary variables that
> cannot be greater than zero at the same time.
>
> Best
> --
> [ Wit Jakuczun =A0 =A0 ]
> [ WLOG Solutions =A0http://www.wlogsolutions.com]- Hide quoted text -
>
> - Show quoted text -

if x(i)=3Dxp(i)-xn(i) where xp(i) and xn(i) are two nonnegative slack
variables, then to enforce exactly one of them to be zero I would
need to maximize
|x(i)|=3Dz=3Dxp(i)+xn(i).
But this is not the case for me.