help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Implementing conditional amount constraints using binar


From: Yaron Kretchmer
Subject: Re: [Help-glpk] Implementing conditional amount constraints using binary variables
Date: Wed, 3 Jun 2009 07:04:08 -0700

a,b should be positive

On Wed, Jun 3, 2009 at 12:19 AM, L Sundaravalli <address@hidden> 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 <address@hidden> wrote:

From: Yaron Kretchmer <address@hidden>
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
 
 


--- On Wed, 6/3/09, Yaron Kretchmer <address@hidden> wrote:

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-----

_______________________________________________
Help-glpk mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk





reply via email to

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