[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [Help-glpk] logical operators

**From**: |
Michael Hennebry |

**Subject**: |
Re: [Help-glpk] logical operators |

**Date**: |
Wed, 12 Aug 2009 21:39:35 -0500 (CDT) |

**User-agent**: |
Alpine 1.00 (DEB 882 2007-12-20) |

On Wed, 12 Aug 2009, Yaron Kretchmer wrote:

a,b,c are binary variables.
I want c to be 1 if and only if a=b=1. What Big-M forumlation do I need?

c <= a, b
c >= a + b - 1
c >= 0
Note that with a and b binary,
the above four constraints make c binary.
One could, if one wanted, omit c's integrality and <=1 constraints.
Whether that is a good idea depends on the algorithm of the solver.
--
Michael address@hidden
"Pessimist: The glass is half empty.
Optimist: The glass is half full.
Engineer: The glass is twice as big as it needs to be."