Are values of a and b restricted - or they can be 0 or +ve or -ve? Subject: Re: [Help-glpk] Implementing conditional amount constraints using binary variables To: "L Sundaravalli" <address@hidden>
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 <address@hidden> wrote:
Hi,
Assuming your b is positive, this should work:
b - a >= 0
Regards.
Sundar
From: Yaron Kretchmer <address@hidden>
Subject: [Help-glpk] Implementing conditional amount constraints using binary variables To: address@hidden
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-----
|
|