help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Conditions for glpsol


From: Andrew Makhorin
Subject: Re: [Help-glpk] Conditions for glpsol
Date: Thu, 24 May 2012 21:49:23 +0400

> Could somebody tell me how to express the following condition in a
> linear constraint ?
> 
> if A = 1 and B = 1 then C = 1 
> if A = 1 and B = 0 then C = 0 
> if A = 0 and B = 1 then C = 0 
> if A = 0 and B = 0 then C = 0 
>  
> Ps: just for precision it is not a logical AND the difference is that
> in my case i should to have the value zero for C if A or B or both are
> equal to 0.

According to the conditions you wrote it is just the logical AND:
C = A AND B.

See http://lists.gnu.org/archive/html/help-glpk/2012-05/msg00013.html .




reply via email to

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