a,b should be positive On Wed, Jun 3, 2009 at 12:19 AM, L Sundaravalli <sundar1...@yahoo.com>wrote:
> Are values of a and b restricted - or they can be 0 or +ve or -ve? > > Sundar > > --- On *Wed, 6/3/09, Yaron Kretchmer <yaronkretch...@gmail.com>* wrote: > > > From: Yaron Kretchmer <yaronkretch...@gmail.com> > Subject: Re: [Help-glpk] Implementing conditional amount constraints using > binary variables > To: "L Sundaravalli" <sundar1...@yahoo.com> > Date: Wednesday, June 3, 2009, 12:11 PM > > > Thanks Sundar, but won't that formulation allow for (for instance), b=5, > a=4, which doesn't meet my criteria? > > Thanks > Kretch > > On Tue, Jun 2, 2009 at 11:13 PM, L Sundaravalli > <sundar1...@yahoo.com<http://us.mc05g.mail.yahoo.com/mc/compose?to=sundar1...@yahoo.com> > > wrote: > >> Hi, >> >> Assuming your b is positive, this should work: >> >> b - a >= 0 >> >> Regards. >> >> Sundar >> >> >> >> >> --- On *Wed, 6/3/09, Yaron Kretchmer >> <yaronkretch...@gmail.com<http://us.mc05g.mail.yahoo.com/mc/compose?to=yaronkretch...@gmail.com> >> >* wrote: >> >> >> From: Yaron Kretchmer >> <yaronkretch...@gmail.com<http://us.mc05g.mail.yahoo.com/mc/compose?to=yaronkretch...@gmail.com> >> > >> Subject: [Help-glpk] Implementing conditional amount constraints using >> binary variables >> To: >> help-glpk@gnu.org<http://us.mc05g.mail.yahoo.com/mc/compose?to=help-g...@gnu.org> >> Date: Wednesday, June 3, 2009, 9:54 AM >> >> Hi All. >> I would like to implement the following condition on two variables: >> *) If the amount of variable *a* is greater than 0, then the amount of >> variable *b* needs to be equal to that of a. >> *) If the amount of variable a is zero, then the amount of variable b is >> not restricted. >> >> I have a hunch this can be done with binary helper variables *a_bin,b_bin >> *which describe if a>0 and b>0, but I can't find a way of describing the >> relationship. >> >> Any insights welcome >> >> Kretch >> >> -----Inline Attachment Follows----- >> >> _______________________________________________ >> Help-glpk mailing list >> Help-glpk@gnu.org<http://us.mc05g.mail.yahoo.com/mc/compose?to=help-g...@gnu.org> >> http://lists.gnu.org/mailman/listinfo/help-glpk >> >> >> > >
_______________________________________________ Help-glpk mailing list Help-glpk@gnu.org http://lists.gnu.org/mailman/listinfo/help-glpk